Class: Google::Apis::MerchantapiDatasourcesV1beta::PrimaryProductDataSource

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

Overview

The primary data source for local and online products.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ PrimaryProductDataSource

Returns a new instance of PrimaryProductDataSource.



597
598
599
# File 'lib/google/apis/merchantapi_datasources_v1beta/classes.rb', line 597

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

Instance Attribute Details

#channelString

Optional. Immutable. Specifies the type of data source channel. Corresponds to the JSON property channel

Returns:

  • (String)


548
549
550
# File 'lib/google/apis/merchantapi_datasources_v1beta/classes.rb', line 548

def channel
  @channel
end

#content_languageString

Optional. Immutable. The two-letter ISO 639-1 language of the items in the data source. feedLabel and contentLanguage must be either both set or unset. The fields can only be unset for data sources without file input. If set, the data source will only accept products matching this combination. If unset, the data source will accept products without that restriction. Corresponds to the JSON property contentLanguage

Returns:

  • (String)


557
558
559
# File 'lib/google/apis/merchantapi_datasources_v1beta/classes.rb', line 557

def content_language
  @content_language
end

#countriesArray<String>

Optional. The countries where the items may be displayed. Represented as a CLDR territory code. Corresponds to the JSON property countries

Returns:

  • (Array<String>)


564
565
566
# File 'lib/google/apis/merchantapi_datasources_v1beta/classes.rb', line 564

def countries
  @countries
end

#default_ruleGoogle::Apis::MerchantapiDatasourcesV1beta::DefaultRule

Default rule management of the data source. Corresponds to the JSON property defaultRule



569
570
571
# File 'lib/google/apis/merchantapi_datasources_v1beta/classes.rb', line 569

def default_rule
  @default_rule
end

#destinationsArray<Google::Apis::MerchantapiDatasourcesV1beta::Destination>

Optional. A list of destinations describing where products of the data source can be shown. When retrieving the data source, the list contains all the destinations that can be used for the data source, including the ones that are disabled for the data source but enabled for the account. Only destinations that are enabled on the account, for example through program participation, can be enabled on the data source. If unset, during creation, the destinations will be inherited based on the account level program participation. If set, during creation or update, the data source will be set only for the specified destinations. Updating this field requires at least one destination. Corresponds to the JSON property destinations



582
583
584
# File 'lib/google/apis/merchantapi_datasources_v1beta/classes.rb', line 582

def destinations
  @destinations
end

#feed_labelString

Optional. Immutable. The feed label that is specified on the data source level. Must be less than or equal to 20 uppercase letters (A-Z), numbers (0-9), and dashes (-). For more information about feed label, see Create a primary data source for products. feedLabel and contentLanguage must be either both set or unset for data sources with product content type. They must be set for data sources with a file input. If set, the data source will only accept products matching this combination. If unset, the data source will accept products without that restriction. Corresponds to the JSON property feedLabel

Returns:

  • (String)


595
596
597
# File 'lib/google/apis/merchantapi_datasources_v1beta/classes.rb', line 595

def feed_label
  @feed_label
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



602
603
604
605
606
607
608
609
# File 'lib/google/apis/merchantapi_datasources_v1beta/classes.rb', line 602

def update!(**args)
  @channel = args[:channel] if args.key?(:channel)
  @content_language = args[:content_language] if args.key?(:content_language)
  @countries = args[:countries] if args.key?(:countries)
  @default_rule = args[:default_rule] if args.key?(:default_rule)
  @destinations = args[:destinations] if args.key?(:destinations)
  @feed_label = args[:feed_label] if args.key?(:feed_label)
end