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.



335
336
337
# File 'lib/google/apis/merchantapi_datasources_v1beta/classes.rb', line 335

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

Instance Attribute Details

#channelString

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

Returns:

  • (String)


305
306
307
# File 'lib/google/apis/merchantapi_datasources_v1beta/classes.rb', line 305

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)


314
315
316
# File 'lib/google/apis/merchantapi_datasources_v1beta/classes.rb', line 314

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>)


321
322
323
# File 'lib/google/apis/merchantapi_datasources_v1beta/classes.rb', line 321

def countries
  @countries
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 (-). See also migration to feed labels. 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)


333
334
335
# File 'lib/google/apis/merchantapi_datasources_v1beta/classes.rb', line 333

def feed_label
  @feed_label
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



340
341
342
343
344
345
# File 'lib/google/apis/merchantapi_datasources_v1beta/classes.rb', line 340

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)
  @feed_label = args[:feed_label] if args.key?(:feed_label)
end