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.



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

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)


514
515
516
# File 'lib/google/apis/merchantapi_datasources_v1beta/classes.rb', line 514

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)


523
524
525
# File 'lib/google/apis/merchantapi_datasources_v1beta/classes.rb', line 523

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


530
531
532
# File 'lib/google/apis/merchantapi_datasources_v1beta/classes.rb', line 530

def countries
  @countries
end

#default_ruleGoogle::Apis::MerchantapiDatasourcesV1beta::DefaultRule

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



535
536
537
# File 'lib/google/apis/merchantapi_datasources_v1beta/classes.rb', line 535

def default_rule
  @default_rule
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)


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

def feed_label
  @feed_label
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



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

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