Class: Google::Apis::ContentV2_1::DatafeedTarget

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ DatafeedTarget

Returns a new instance of DatafeedTarget.



4049
4050
4051
# File 'lib/google/apis/content_v2_1/classes.rb', line 4049

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

Instance Attribute Details

#countryString

Deprecated. Use feedLabel instead. The country where the items in the feed will be included in the search index, represented as a CLDR territory code. Corresponds to the JSON property country

Returns:

  • (String)


4011
4012
4013
# File 'lib/google/apis/content_v2_1/classes.rb', line 4011

def country
  @country
end

#excluded_destinationsArray<String>

The list of destinations to exclude for this target (corresponds to cleared check boxes in Merchant Center). Products that are excluded from all destinations for more than 7 days are automatically deleted. Corresponds to the JSON property excludedDestinations

Returns:

  • (Array<String>)


4019
4020
4021
# File 'lib/google/apis/content_v2_1/classes.rb', line 4019

def excluded_destinations
  @excluded_destinations
end

#feed_labelString

Feed label for the DatafeedTarget. Either country or feedLabel is required. If both feedLabel and country is specified, the values must match. Must be less than or equal to 20 uppercase letters (A-Z), numbers (0-9), and dashes (-). Corresponds to the JSON property feedLabel

Returns:

  • (String)


4027
4028
4029
# File 'lib/google/apis/content_v2_1/classes.rb', line 4027

def feed_label
  @feed_label
end

#included_destinationsArray<String>

The list of destinations to include for this target (corresponds to checked check boxes in Merchant Center). Default destinations are always included unless provided in excludedDestinations. Corresponds to the JSON property includedDestinations

Returns:

  • (Array<String>)


4035
4036
4037
# File 'lib/google/apis/content_v2_1/classes.rb', line 4035

def included_destinations
  @included_destinations
end

#languageString

The two-letter ISO 639-1 language of the items in the feed. Must be a valid language for targets[].country. Corresponds to the JSON property language

Returns:

  • (String)


4041
4042
4043
# File 'lib/google/apis/content_v2_1/classes.rb', line 4041

def language
  @language
end

#target_countriesArray<String>

The countries where the items may be displayed. Represented as a CLDR territory code. Will be ignored for "product inventory" feeds. Corresponds to the JSON property targetCountries

Returns:

  • (Array<String>)


4047
4048
4049
# File 'lib/google/apis/content_v2_1/classes.rb', line 4047

def target_countries
  @target_countries
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4054
4055
4056
4057
4058
4059
4060
4061
# File 'lib/google/apis/content_v2_1/classes.rb', line 4054

def update!(**args)
  @country = args[:country] if args.key?(:country)
  @excluded_destinations = args[:excluded_destinations] if args.key?(:excluded_destinations)
  @feed_label = args[:feed_label] if args.key?(:feed_label)
  @included_destinations = args[:included_destinations] if args.key?(:included_destinations)
  @language = args[:language] if args.key?(:language)
  @target_countries = args[:target_countries] if args.key?(:target_countries)
end