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.
1422 1423 1424 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1422 def initialize(**args) update!(**args) end |
Instance Attribute Details
#attributes ⇒ Google::Apis::MerchantapiProductsV1beta::Attributes
Attributes.
Corresponds to the JSON property attributes
1357 1358 1359 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1357 def attributes @attributes end |
#channel ⇒ String
Required. Immutable. The channel of the product.
Corresponds to the JSON property channel
1363 1364 1365 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1363 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
1369 1370 1371 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1369 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
1382 1383 1384 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1382 def custom_attributes @custom_attributes end |
#feed_label ⇒ String
Required. Immutable. The feed label for the product.
Corresponds to the JSON property feedLabel
1388 1389 1390 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1388 def feed_label @feed_label end |
#name ⇒ String
Identifier. The name of the product input. Format: "
productinput.name=
accounts/account
/productInputs/productinput
"
Corresponds to the JSON property name
1394 1395 1396 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1394 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
1403 1404 1405 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1403 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
1409 1410 1411 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1409 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
1420 1421 1422 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1420 def version_number @version_number end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1427 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 |