Class: Google::Apis::DfareportingV4::GeoTargeting
- Inherits:
-
Object
- Object
- Google::Apis::DfareportingV4::GeoTargeting
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/dfareporting_v4/classes.rb,
lib/google/apis/dfareporting_v4/representations.rb,
lib/google/apis/dfareporting_v4/representations.rb
Overview
Geographical Targeting.
Instance Attribute Summary collapse
-
#cities ⇒ Array<Google::Apis::DfareportingV4::City>
Cities to be targeted.
-
#countries ⇒ Array<Google::Apis::DfareportingV4::Country>
Countries to be targeted or excluded from targeting, depending on the setting of the excludeCountries field.
-
#exclude_countries ⇒ Boolean
(also: #exclude_countries?)
Whether or not to exclude the countries in the countries field from targeting.
-
#metros ⇒ Array<Google::Apis::DfareportingV4::Metro>
Metros to be targeted.
-
#postal_codes ⇒ Array<Google::Apis::DfareportingV4::PostalCode>
Postal codes to be targeted.
-
#regions ⇒ Array<Google::Apis::DfareportingV4::Region>
Regions to be targeted.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GeoTargeting
constructor
A new instance of GeoTargeting.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GeoTargeting
Returns a new instance of GeoTargeting.
8068 8069 8070 |
# File 'lib/google/apis/dfareporting_v4/classes.rb', line 8068 def initialize(**args) update!(**args) end |
Instance Attribute Details
#cities ⇒ Array<Google::Apis::DfareportingV4::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
8027 8028 8029 |
# File 'lib/google/apis/dfareporting_v4/classes.rb', line 8027 def cities @cities end |
#countries ⇒ Array<Google::Apis::DfareportingV4::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
8036 8037 8038 |
# File 'lib/google/apis/dfareporting_v4/classes.rb', line 8036 def countries @countries end |
#exclude_countries ⇒ Boolean 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
8043 8044 8045 |
# File 'lib/google/apis/dfareporting_v4/classes.rb', line 8043 def exclude_countries @exclude_countries end |
#metros ⇒ Array<Google::Apis::DfareportingV4::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
8051 8052 8053 |
# File 'lib/google/apis/dfareporting_v4/classes.rb', line 8051 def metros @metros end |
#postal_codes ⇒ Array<Google::Apis::DfareportingV4::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
8059 8060 8061 |
# File 'lib/google/apis/dfareporting_v4/classes.rb', line 8059 def postal_codes @postal_codes end |
#regions ⇒ Array<Google::Apis::DfareportingV4::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
8066 8067 8068 |
# File 'lib/google/apis/dfareporting_v4/classes.rb', line 8066 def regions @regions end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
8073 8074 8075 8076 8077 8078 8079 8080 |
# File 'lib/google/apis/dfareporting_v4/classes.rb', line 8073 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 |