Class: Google::Apis::DfareportingV5::GeoTargeting

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/dfareporting_v5/classes.rb,
lib/google/apis/dfareporting_v5/representations.rb,
lib/google/apis/dfareporting_v5/representations.rb

Overview

Geographical Targeting.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GeoTargeting

Returns a new instance of GeoTargeting.



7929
7930
7931
# File 'lib/google/apis/dfareporting_v5/classes.rb', line 7929

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#citiesArray<Google::Apis::DfareportingV5::City>

Cities to be targeted. For each city only dartId is required. The other fields are populated automatically when the ad is inserted or updated. If targeting a city, do not target or exclude the country of the city, and do not target the metro or region of the city. Corresponds to the JSON property cities



7888
7889
7890
# File 'lib/google/apis/dfareporting_v5/classes.rb', line 7888

def cities
  @cities
end

#countriesArray<Google::Apis::DfareportingV5::Country>

Countries to be targeted or excluded from targeting, depending on the setting of the excludeCountries field. For each country only dartId is required. The other fields are populated automatically when the ad is inserted or updated. If targeting or excluding a country, do not target regions, cities, metros, or postal codes in the same country. Corresponds to the JSON property countries



7897
7898
7899
# File 'lib/google/apis/dfareporting_v5/classes.rb', line 7897

def countries
  @countries
end

#exclude_countriesBoolean Also known as: exclude_countries?

Whether or not to exclude the countries in the countries field from targeting. If false, the countries field refers to countries which will be targeted by the ad. Corresponds to the JSON property excludeCountries

Returns:

  • (Boolean)


7904
7905
7906
# File 'lib/google/apis/dfareporting_v5/classes.rb', line 7904

def exclude_countries
  @exclude_countries
end

#metrosArray<Google::Apis::DfareportingV5::Metro>

Metros to be targeted. For each metro only dmaId is required. The other fields are populated automatically when the ad is inserted or updated. If targeting a metro, do not target or exclude the country of the metro. Corresponds to the JSON property metros



7912
7913
7914
# File 'lib/google/apis/dfareporting_v5/classes.rb', line 7912

def metros
  @metros
end

#postal_codesArray<Google::Apis::DfareportingV5::PostalCode>

Postal codes to be targeted. For each postal code only id is required. The other fields are populated automatically when the ad is inserted or updated. If targeting a postal code, do not target or exclude the country of the postal code. Corresponds to the JSON property postalCodes



7920
7921
7922
# File 'lib/google/apis/dfareporting_v5/classes.rb', line 7920

def postal_codes
  @postal_codes
end

#regionsArray<Google::Apis::DfareportingV5::Region>

Regions to be targeted. For each region only dartId is required. The other fields are populated automatically when the ad is inserted or updated. If targeting a region, do not target or exclude the country of the region. Corresponds to the JSON property regions



7927
7928
7929
# File 'lib/google/apis/dfareporting_v5/classes.rb', line 7927

def regions
  @regions
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



7934
7935
7936
7937
7938
7939
7940
7941
# File 'lib/google/apis/dfareporting_v5/classes.rb', line 7934

def update!(**args)
  @cities = args[:cities] if args.key?(:cities)
  @countries = args[:countries] if args.key?(:countries)
  @exclude_countries = args[:exclude_countries] if args.key?(:exclude_countries)
  @metros = args[:metros] if args.key?(:metros)
  @postal_codes = args[:postal_codes] if args.key?(:postal_codes)
  @regions = args[:regions] if args.key?(:regions)
end