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. 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
-
#archived ⇒ Boolean
(also: #archived?)
Output only.
-
#attributes ⇒ Google::Apis::MerchantapiProductsV1beta::Attributes
Attributes.
-
#automated_discounts ⇒ Google::Apis::MerchantapiProductsV1beta::AutomatedDiscounts
Information regarding Automated Discounts.
-
#base64_encoded_name ⇒ String
Output only.
-
#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.
1354 1355 1356 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1354 def initialize(**args) update!(**args) end |
Instance Attribute Details
#archived ⇒ Boolean Also known as: archived?
Output only. Determines whether the product is archived. To archive or restore your product,
visit Merchant Center products page. Learn also more about offer visibility.
Corresponds to the JSON property archived
1257 1258 1259 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1257 def archived @archived end |
#attributes ⇒ Google::Apis::MerchantapiProductsV1beta::Attributes
Attributes.
Corresponds to the JSON property attributes
1263 1264 1265 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1263 def attributes @attributes end |
#automated_discounts ⇒ Google::Apis::MerchantapiProductsV1beta::AutomatedDiscounts
Information regarding Automated Discounts.
Corresponds to the JSON property automatedDiscounts
1268 1269 1270 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1268 def automated_discounts @automated_discounts end |
#base64_encoded_name ⇒ String
Output only. The unpadded base64url encoded name of the product. Format:
accounts/account/products/product`where the last sectionproductis the
unpadded base64url encoding of thecontent_language~feed_label~offer_idname.
Example:accounts/123/products/ZW5-VVN-c2t1LzEyMwfor the decoded product
nameaccounts/123/products/en~US~sku/123. This field can be used directly as
input to the API methods that require the product name to be encoded if it
contains special characters, for example [GetProduct](https://developers.
google.com/merchant/api/reference/rest/products_v1beta/accounts.products/get).
Corresponds to the JSON propertybase64EncodedName`
1280 1281 1282 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1280 def base64_encoded_name @base64_encoded_name end |
#channel ⇒ String
Output only. The channel
of the product.
Corresponds to the JSON property channel
1286 1287 1288 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1286 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
1292 1293 1294 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1292 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
1301 1302 1303 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1301 def custom_attributes @custom_attributes end |
#data_source ⇒ String
Output only. The primary data source of the product.
Corresponds to the JSON property dataSource
1306 1307 1308 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1306 def data_source @data_source end |
#feed_label ⇒ String
Output only. The feed label lets you categorize and identify your products.
The maximum allowed characters is 20 and the supported characters areA-Z, 0-
9, hyphen and underscore. The feed label must not include any spaces. For
more information, see Using feed labels
Corresponds to the JSON property feedLabel
1315 1316 1317 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1315 def feed_label @feed_label end |
#name ⇒ String
The name of the product. Format: accounts/account/products/product`where
the last sectionproductconsists of:content_language~feed_label~offer_id
example for product name isaccounts/123/products/en~US~sku123. A legacy
local product name would beaccounts/123/products/local~en~US~sku123. Note:
For calls to the v1beta version, theproductsection consists of:channel~
content_language~feed_label~offer_id, for example:accounts/123/products/
online~en~US~sku123.
Corresponds to the JSON propertyname`
1326 1327 1328 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1326 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
1335 1336 1337 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1335 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
1341 1342 1343 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1341 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
1352 1353 1354 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1352 def version_number @version_number end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1359 def update!(**args) @archived = args[:archived] if args.key?(:archived) @attributes = args[:attributes] if args.key?(:attributes) @automated_discounts = args[:automated_discounts] if args.key?(:automated_discounts) @base64_encoded_name = args[:base64_encoded_name] if args.key?(:base64_encoded_name) @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 |