Class: Google::Apis::MerchantapiProductsV1beta::Product
- Inherits:
-
Object
- Object
- Google::Apis::MerchantapiProductsV1beta::Product
- 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
The processed product, built from multiple product inputs after applying rules and supplemental data sources. This processed product matches what is shown in your Merchant Center account and in Shopping ads and other surfaces across Google. Each product is built from exactly one primary data source product input, and multiple supplemental data source inputs. After inserting, updating, or deleting a product input, it may take several minutes before the updated processed product can be retrieved. All fields in the processed product and its sub-messages match the name of their corresponding attribute in the Product data specification with some exceptions.
Instance Attribute Summary collapse
-
#attributes ⇒ Google::Apis::MerchantapiProductsV1beta::Attributes
Attributes.
-
#channel ⇒ String
Output only.
-
#content_language ⇒ String
Output only.
-
#custom_attributes ⇒ Array<Google::Apis::MerchantapiProductsV1beta::CustomAttribute>
Output only.
-
#data_source ⇒ String
Output only.
-
#feed_label ⇒ String
Output only.
-
#name ⇒ String
The name of the product.
-
#offer_id ⇒ String
Output only.
-
#product_status ⇒ Google::Apis::MerchantapiProductsV1beta::ProductStatus
The status of a product, data validation issues, that is, information about a product computed asynchronously.
-
#version_number ⇒ Fixnum
Output only.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Product
constructor
A new instance of Product.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Product
Returns a new instance of Product.
1240 1241 1242 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1240 def initialize(**args) update!(**args) end |
Instance Attribute Details
#attributes ⇒ Google::Apis::MerchantapiProductsV1beta::Attributes
Attributes.
Corresponds to the JSON property attributes
1173 1174 1175 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1173 def attributes @attributes end |
#channel ⇒ String
Output only. The channel
of the product.
Corresponds to the JSON property channel
1179 1180 1181 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1179 def channel @channel end |
#content_language ⇒ String
Output only. The two-letter ISO 639-1
language code for the product.
Corresponds to the JSON property contentLanguage
1185 1186 1187 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1185 def content_language @content_language end |
#custom_attributes ⇒ Array<Google::Apis::MerchantapiProductsV1beta::CustomAttribute>
Output only. A list of custom (merchant-provided) attributes. It can also be
used to submit 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.
Corresponds to the JSON property customAttributes
1194 1195 1196 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1194 def custom_attributes @custom_attributes end |
#data_source ⇒ String
Output only. The primary data source of the product.
Corresponds to the JSON property dataSource
1199 1200 1201 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1199 def data_source @data_source end |
#feed_label ⇒ String
Output only. The feed label for the product.
Corresponds to the JSON property feedLabel
1204 1205 1206 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1204 def feed_label @feed_label end |
#name ⇒ String
The name of the product. Format: "product.name=accounts/account/products/
product" where the last section product consists of 4 parts: channel~
content_language~feed_label~offer_id example for product name is "accounts/123/
products/online~en~US~sku123"
Corresponds to the JSON property name
1212 1213 1214 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1212 def name @name end |
#offer_id ⇒ String
Output only. 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 product data specification for details.
Corresponds to the JSON property offerId
1221 1222 1223 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1221 def offer_id @offer_id end |
#product_status ⇒ Google::Apis::MerchantapiProductsV1beta::ProductStatus
The status of a product, data validation issues, that is, information about a
product computed asynchronously.
Corresponds to the JSON property productStatus
1227 1228 1229 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1227 def product_status @product_status end |
#version_number ⇒ Fixnum
Output only. 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
1238 1239 1240 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1238 def version_number @version_number end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1245 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) @data_source = args[:data_source] if args.key?(:data_source) @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_status = args[:product_status] if args.key?(:product_status) @version_number = args[:version_number] if args.key?(:version_number) end |