Class: Google::Apis::DfareportingV2_1::GeoTargeting

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable
Defined in:
generated/google/apis/dfareporting_v2_1/classes.rb,
generated/google/apis/dfareporting_v2_1/representations.rb,
generated/google/apis/dfareporting_v2_1/representations.rb

Overview

Geographical Targeting.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ GeoTargeting

Returns a new instance of GeoTargeting.


5847
5848
5849
# File 'generated/google/apis/dfareporting_v2_1/classes.rb', line 5847

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

Instance Attribute Details

#citiesArray<Google::Apis::DfareportingV2_1::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


5806
5807
5808
# File 'generated/google/apis/dfareporting_v2_1/classes.rb', line 5806

def cities
  @cities
end

#countriesArray<Google::Apis::DfareportingV2_1::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


5815
5816
5817
# File 'generated/google/apis/dfareporting_v2_1/classes.rb', line 5815

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)

5822
5823
5824
# File 'generated/google/apis/dfareporting_v2_1/classes.rb', line 5822

def exclude_countries
  @exclude_countries
end

#metrosArray<Google::Apis::DfareportingV2_1::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


5830
5831
5832
# File 'generated/google/apis/dfareporting_v2_1/classes.rb', line 5830

def metros
  @metros
end

#postal_codesArray<Google::Apis::DfareportingV2_1::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


5838
5839
5840
# File 'generated/google/apis/dfareporting_v2_1/classes.rb', line 5838

def postal_codes
  @postal_codes
end

#regionsArray<Google::Apis::DfareportingV2_1::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


5845
5846
5847
# File 'generated/google/apis/dfareporting_v2_1/classes.rb', line 5845

def regions
  @regions
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


5852
5853
5854
5855
5856
5857
5858
5859
# File 'generated/google/apis/dfareporting_v2_1/classes.rb', line 5852

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