Class: Google::Apis::MerchantapiProductsV1beta::ProductInput
- Inherits:
-
Object
- Object
- Google::Apis::MerchantapiProductsV1beta::ProductInput
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/merchantapi_products_v1beta/classes.rb,
lib/google/apis/merchantapi_products_v1beta/representations.rb,
lib/google/apis/merchantapi_products_v1beta/representations.rb
Overview
This resource represents input data you submit for a product, not the processed product that you see in Merchant Center, in Shopping ads, or across Google surfaces. Product inputs, rules and supplemental data source data are combined to create the processed Product. Required product input attributes to pass data validation checks are primarily defined in the Products Data Specification. The following attributes are required: feedLabel, contentLanguage and offerId. After inserting, updating, or deleting a product input, it may take several minutes before the processed product can be retrieved. All fields in the product input and its sub-messages match the English name of their corresponding attribute in the vertical spec with some exceptions.
Instance Attribute Summary collapse
-
#attributes ⇒ Google::Apis::MerchantapiProductsV1beta::Attributes
Attributes.
-
#channel ⇒ String
Required.
-
#content_language ⇒ String
Required.
-
#custom_attributes ⇒ Array<Google::Apis::MerchantapiProductsV1beta::CustomAttribute>
Optional.
-
#feed_label ⇒ String
Required.
-
#name ⇒ String
Identifier.
-
#offer_id ⇒ String
Required.
-
#product ⇒ String
Output only.
-
#version_number ⇒ Fixnum
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ ProductInput
constructor
A new instance of ProductInput.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ ProductInput
Returns a new instance of ProductInput.
1440 1441 1442 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1440 def initialize(**args) update!(**args) end |
Instance Attribute Details
#attributes ⇒ Google::Apis::MerchantapiProductsV1beta::Attributes
Attributes.
Corresponds to the JSON property attributes
1372 1373 1374 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1372 def attributes @attributes end |
#channel ⇒ String
Required. Immutable. The channel of the product.
Corresponds to the JSON property channel
1378 1379 1380 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1378 def channel @channel end |
#content_language ⇒ String
Required. Immutable. The two-letter ISO 639-1 language code for the product.
Corresponds to the JSON property contentLanguage
1384 1385 1386 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1384 def content_language @content_language end |
#custom_attributes ⇒ Array<Google::Apis::MerchantapiProductsV1beta::CustomAttribute>
Optional. A list of custom (merchant-provided) attributes. It can also be used
for submitting any attribute of the data specification in its generic form (
for example, "name": "size type", "value": "regular"). This is useful
for submitting attributes not explicitly exposed by the API, such as
additional attributes used for Buy on Google. Maximum allowed number of
characters for each custom attribute is 10240 (represents sum of characters
for name and value). Maximum 2500 custom attributes can be set per product,
with total size of 102.4kB. Underscores in custom attribute names are replaced
by spaces upon insertion.
Corresponds to the JSON property customAttributes
1397 1398 1399 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1397 def custom_attributes @custom_attributes end |
#feed_label ⇒ String
Required. Immutable. The feed label for the product.
Corresponds to the JSON property feedLabel
1403 1404 1405 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1403 def feed_label @feed_label end |
#name ⇒ String
Identifier. The name of the product input. Format: "productinput.name=
accounts/account/productInputs/productinput" where the last section
productinput consists of 4 parts: channel~content_language~feed_label~
offer_id example for product input name is "accounts/123/productInputs/online~
en~US~sku123"
Corresponds to the JSON property name
1412 1413 1414 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1412 def name @name end |
#offer_id ⇒ String
Required. Immutable. Your unique identifier for the product. This is the same
for the product input and processed product. Leading and trailing whitespaces
are stripped and multiple whitespaces are replaced by a single whitespace upon
submission. See the products data specification for details.
Corresponds to the JSON property offerId
1421 1422 1423 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1421 def offer_id @offer_id end |
#product ⇒ String
Output only. The name of the processed product. Format: "product.name=
accounts/account/products/product"
Corresponds to the JSON property product
1427 1428 1429 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1427 def product @product end |
#version_number ⇒ Fixnum
Optional. Represents the existing version (freshness) of the product, which
can be used to preserve the right order when multiple updates are done at the
same time. If set, the insertion is prevented when version number is lower
than the current version number of the existing product. Re-insertion (for
example, product refresh after 30 days) can be performed with the current
version_number. Only supported for insertions into primary data sources. If
the operation is prevented, the aborted exception will be thrown.
Corresponds to the JSON property versionNumber
1438 1439 1440 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1438 def version_number @version_number end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1445 def update!(**args) @attributes = args[:attributes] if args.key?(:attributes) @channel = args[:channel] if args.key?(:channel) @content_language = args[:content_language] if args.key?(:content_language) @custom_attributes = args[:custom_attributes] if args.key?(:custom_attributes) @feed_label = args[:feed_label] if args.key?(:feed_label) @name = args[:name] if args.key?(:name) @offer_id = args[:offer_id] if args.key?(:offer_id) @product = args[:product] if args.key?(:product) @version_number = args[:version_number] if args.key?(:version_number) end |