Skip to content

Commit 08a9fae

Browse files
feat: Automated regeneration of merchantapi products_v1beta client (googleapis#22354)
Auto-created at 2025-04-06 09:28:30 +0000 using the toys pull request generator.
1 parent 972dfcc commit 08a9fae

File tree

6 files changed

+106
-44
lines changed

6 files changed

+106
-44
lines changed

api_names_out.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270046,6 +270046,10 @@
270046270046
"/merchantapi:products_v1beta/Attributes/unitPricingBaseMeasure": unit_pricing_base_measure
270047270047
"/merchantapi:products_v1beta/Attributes/unitPricingMeasure": unit_pricing_measure
270048270048
"/merchantapi:products_v1beta/Attributes/virtualModelLink": virtual_model_link
270049+
"/merchantapi:products_v1beta/AutomatedDiscounts": automated_discounts
270050+
"/merchantapi:products_v1beta/AutomatedDiscounts/gadPrice": gad_price
270051+
"/merchantapi:products_v1beta/AutomatedDiscounts/priorPrice": prior_price
270052+
"/merchantapi:products_v1beta/AutomatedDiscounts/priorPriceProgressive": prior_price_progressive
270049270053
"/merchantapi:products_v1beta/Certification": certification
270050270054
"/merchantapi:products_v1beta/Certification/certificationAuthority": certification_authority
270051270055
"/merchantapi:products_v1beta/Certification/certificationCode": certification_code
@@ -270120,6 +270124,7 @@
270120270124
"/merchantapi:products_v1beta/Price/currencyCode": currency_code
270121270125
"/merchantapi:products_v1beta/Product": product
270122270126
"/merchantapi:products_v1beta/Product/attributes": attributes
270127+
"/merchantapi:products_v1beta/Product/automatedDiscounts": automated_discounts
270123270128
"/merchantapi:products_v1beta/Product/channel": channel
270124270129
"/merchantapi:products_v1beta/Product/contentLanguage": content_language
270125270130
"/merchantapi:products_v1beta/Product/customAttributes": custom_attributes

generated/google-apis-merchantapi_products_v1beta/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Release history for google-apis-merchantapi_products_v1beta
22

3+
### v0.11.0 (2025-04-06)
4+
5+
* Regenerated from discovery document revision 20250404
6+
37
### v0.10.0 (2025-03-23)
48

59
* Regenerated from discovery document revision 20250317

generated/google-apis-merchantapi_products_v1beta/lib/google/apis/merchantapi_products_v1beta/classes.rb

Lines changed: 59 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -641,6 +641,37 @@ def update!(**args)
641641
end
642642
end
643643

644+
# Information regarding Automated Discounts.
645+
class AutomatedDiscounts
646+
include Google::Apis::Core::Hashable
647+
648+
# The price represented as a number and currency.
649+
# Corresponds to the JSON property `gadPrice`
650+
# @return [Google::Apis::MerchantapiProductsV1beta::Price]
651+
attr_accessor :gad_price
652+
653+
# The price represented as a number and currency.
654+
# Corresponds to the JSON property `priorPrice`
655+
# @return [Google::Apis::MerchantapiProductsV1beta::Price]
656+
attr_accessor :prior_price
657+
658+
# The price represented as a number and currency.
659+
# Corresponds to the JSON property `priorPriceProgressive`
660+
# @return [Google::Apis::MerchantapiProductsV1beta::Price]
661+
attr_accessor :prior_price_progressive
662+
663+
def initialize(**args)
664+
update!(**args)
665+
end
666+
667+
# Update properties of this object
668+
def update!(**args)
669+
@gad_price = args[:gad_price] if args.key?(:gad_price)
670+
@prior_price = args[:prior_price] if args.key?(:prior_price)
671+
@prior_price_progressive = args[:prior_price_progressive] if args.key?(:prior_price_progressive)
672+
end
673+
end
674+
644675
# Product [certification](https://support.google.com/merchants/answer/13528839),
645676
# initially introduced for EU energy efficiency labeling compliance using the EU
646677
# EPREL database.
@@ -1156,14 +1187,13 @@ def update!(**args)
11561187

11571188
# The processed product, built from multiple product inputs after applying rules
11581189
# and supplemental data sources. This processed product matches what is shown in
1159-
# your Merchant Center account and in Shopping ads and other surfaces across
1160-
# Google. Each product is built from exactly one primary data source product
1161-
# input, and multiple supplemental data source inputs. After inserting, updating,
1162-
# or deleting a product input, it may take several minutes before the updated
1163-
# processed product can be retrieved. All fields in the processed product and
1164-
# its sub-messages match the name of their corresponding attribute in the [
1165-
# Product data specification](https://support.google.com/merchants/answer/
1166-
# 7052112) with some exceptions.
1190+
# your Merchant Center account. Each product is built from exactly one primary
1191+
# data source product input, and multiple supplemental data source inputs. After
1192+
# inserting, updating, or deleting a product input, it may take several minutes
1193+
# before the updated processed product can be retrieved. All fields in the
1194+
# processed product and its sub-messages match the name of their corresponding
1195+
# attribute in the [Product data specification](https://support.google.com/
1196+
# merchants/answer/7052112) with some exceptions.
11671197
class Product
11681198
include Google::Apis::Core::Hashable
11691199

@@ -1172,6 +1202,11 @@ class Product
11721202
# @return [Google::Apis::MerchantapiProductsV1beta::Attributes]
11731203
attr_accessor :attributes
11741204

1205+
# Information regarding Automated Discounts.
1206+
# Corresponds to the JSON property `automatedDiscounts`
1207+
# @return [Google::Apis::MerchantapiProductsV1beta::AutomatedDiscounts]
1208+
attr_accessor :automated_discounts
1209+
11751210
# Output only. The [channel](https://support.google.com/merchants/answer/7361332)
11761211
# of the product.
11771212
# Corresponds to the JSON property `channel`
@@ -1203,10 +1238,10 @@ class Product
12031238
# @return [String]
12041239
attr_accessor :feed_label
12051240

1206-
# The name of the product. Format: `"`product.name=accounts/`account`/products/`
1207-
# product``"` where the last section `product` consists of 4 parts: channel~
1208-
# content_language~feed_label~offer_id example for product name is "accounts/123/
1209-
# products/online~en~US~sku123"
1241+
# The name of the product. Format: `accounts/`account`/products/`product`` where
1242+
# the last section `product` consists of 4 parts: `channel~content_language~
1243+
# feed_label~offer_id` example for product name is `accounts/123/products/online~
1244+
# en~US~sku123`
12101245
# Corresponds to the JSON property `name`
12111246
# @return [String]
12121247
attr_accessor :name
@@ -1244,6 +1279,7 @@ def initialize(**args)
12441279
# Update properties of this object
12451280
def update!(**args)
12461281
@attributes = args[:attributes] if args.key?(:attributes)
1282+
@automated_discounts = args[:automated_discounts] if args.key?(:automated_discounts)
12471283
@channel = args[:channel] if args.key?(:channel)
12481284
@content_language = args[:content_language] if args.key?(:content_language)
12491285
@custom_attributes = args[:custom_attributes] if args.key?(:custom_attributes)
@@ -1395,12 +1431,11 @@ class ProductInput
13951431
# Optional. A list of custom (merchant-provided) attributes. It can also be used
13961432
# for submitting any attribute of the data specification in its generic form (
13971433
# for example, `` "name": "size type", "value": "regular" ``). This is useful
1398-
# for submitting attributes not explicitly exposed by the API, such as
1399-
# additional attributes used for Buy on Google. Maximum allowed number of
1400-
# characters for each custom attribute is 10240 (represents sum of characters
1401-
# for name and value). Maximum 2500 custom attributes can be set per product,
1402-
# with total size of 102.4kB. Underscores in custom attribute names are replaced
1403-
# by spaces upon insertion.
1434+
# for submitting attributes not explicitly exposed by the API. Maximum allowed
1435+
# number of characters for each custom attribute is 10240 (represents sum of
1436+
# characters for name and value). Maximum 2500 custom attributes can be set per
1437+
# product, with total size of 102.4kB. Underscores in custom attribute names are
1438+
# replaced by spaces upon insertion.
14041439
# Corresponds to the JSON property `customAttributes`
14051440
# @return [Array<Google::Apis::MerchantapiProductsV1beta::CustomAttribute>]
14061441
attr_accessor :custom_attributes
@@ -1411,11 +1446,10 @@ class ProductInput
14111446
# @return [String]
14121447
attr_accessor :feed_label
14131448

1414-
# Identifier. The name of the product input. Format: `"`productinput.name=
1415-
# accounts/`account`/productInputs/`productinput``"` where the last section `
1416-
# productinput` consists of 4 parts: channel~content_language~feed_label~
1417-
# offer_id example for product input name is "accounts/123/productInputs/online~
1418-
# en~US~sku123"
1449+
# Identifier. The name of the product input. Format: `accounts/`account`/
1450+
# productInputs/`productinput`` where the last section `productinput` consists
1451+
# of 4 parts: `channel~content_language~feed_label~offer_id` example for product
1452+
# input name is `accounts/123/productInputs/online~en~US~sku123`
14191453
# Corresponds to the JSON property `name`
14201454
# @return [String]
14211455
attr_accessor :name
@@ -1429,8 +1463,8 @@ class ProductInput
14291463
# @return [String]
14301464
attr_accessor :offer_id
14311465

1432-
# Output only. The name of the processed product. Format: `"`product.name=
1433-
# accounts/`account`/products/`product``"`
1466+
# Output only. The name of the processed product. Format: `accounts/`account`/
1467+
# products/`product``
14341468
# Corresponds to the JSON property `product`
14351469
# @return [String]
14361470
attr_accessor :product

generated/google-apis-merchantapi_products_v1beta/lib/google/apis/merchantapi_products_v1beta/gem_version.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ module Google
1616
module Apis
1717
module MerchantapiProductsV1beta
1818
# Version of the google-apis-merchantapi_products_v1beta gem
19-
GEM_VERSION = "0.10.0"
19+
GEM_VERSION = "0.11.0"
2020

2121
# Version of the code generator used to generate this client
2222
GENERATOR_VERSION = "0.16.0"
2323

2424
# Revision of the discovery document this client was generated from
25-
REVISION = "20250317"
25+
REVISION = "20250404"
2626
end
2727
end
2828
end

generated/google-apis-merchantapi_products_v1beta/lib/google/apis/merchantapi_products_v1beta/representations.rb

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ class Representation < Google::Apis::Core::JsonRepresentation; end
2828
include Google::Apis::Core::JsonObjectSupport
2929
end
3030

31+
class AutomatedDiscounts
32+
class Representation < Google::Apis::Core::JsonRepresentation; end
33+
34+
include Google::Apis::Core::JsonObjectSupport
35+
end
36+
3137
class Certification
3238
class Representation < Google::Apis::Core::JsonRepresentation; end
3339

@@ -341,6 +347,18 @@ class Representation < Google::Apis::Core::JsonRepresentation
341347
end
342348
end
343349

350+
class AutomatedDiscounts
351+
# @private
352+
class Representation < Google::Apis::Core::JsonRepresentation
353+
property :gad_price, as: 'gadPrice', class: Google::Apis::MerchantapiProductsV1beta::Price, decorator: Google::Apis::MerchantapiProductsV1beta::Price::Representation
354+
355+
property :prior_price, as: 'priorPrice', class: Google::Apis::MerchantapiProductsV1beta::Price, decorator: Google::Apis::MerchantapiProductsV1beta::Price::Representation
356+
357+
property :prior_price_progressive, as: 'priorPriceProgressive', class: Google::Apis::MerchantapiProductsV1beta::Price, decorator: Google::Apis::MerchantapiProductsV1beta::Price::Representation
358+
359+
end
360+
end
361+
344362
class Certification
345363
# @private
346364
class Representation < Google::Apis::Core::JsonRepresentation
@@ -482,6 +500,8 @@ class Product
482500
class Representation < Google::Apis::Core::JsonRepresentation
483501
property :attributes, as: 'attributes', class: Google::Apis::MerchantapiProductsV1beta::Attributes, decorator: Google::Apis::MerchantapiProductsV1beta::Attributes::Representation
484502

503+
property :automated_discounts, as: 'automatedDiscounts', class: Google::Apis::MerchantapiProductsV1beta::AutomatedDiscounts, decorator: Google::Apis::MerchantapiProductsV1beta::AutomatedDiscounts::Representation
504+
485505
property :channel, as: 'channel'
486506
property :content_language, as: 'contentLanguage'
487507
collection :custom_attributes, as: 'customAttributes', class: Google::Apis::MerchantapiProductsV1beta::CustomAttribute, decorator: Google::Apis::MerchantapiProductsV1beta::CustomAttribute::Representation

generated/google-apis-merchantapi_products_v1beta/lib/google/apis/merchantapi_products_v1beta/service.rb

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ def initialize
5555
# updating, or deleting a product input, it may take several minutes before the
5656
# processed product can be retrieved.
5757
# @param [String] name
58-
# Required. The name of the product input resource to delete. Format: accounts/`
59-
# account`/productInputs/`product` where the last section `product` consists of
60-
# 4 parts: channel~content_language~feed_label~offer_id example for product name
61-
# is "accounts/123/productInputs/online~en~US~sku123"
58+
# Required. The name of the product input resource to delete. Format: `accounts/`
59+
# account`/productInputs/`product`` where the last section `product` consists of
60+
# 4 parts: `channel~content_language~feed_label~offer_id` example for product
61+
# name is `accounts/123/productInputs/online~en~US~sku123`.
6262
# @param [String] data_source
6363
# Required. The primary or supplemental data source from which the product input
6464
# should be deleted. Format: `accounts/`account`/dataSources/`datasource``.
@@ -95,8 +95,8 @@ def delete_account_product_input(name, data_source: nil, fields: nil, quota_user
9595
# replaces that entry. After inserting, updating, or deleting a product input,
9696
# it may take several minutes before the processed product can be retrieved.
9797
# @param [String] parent
98-
# Required. The account where this product will be inserted. Format: accounts/`
99-
# account`
98+
# Required. The account where this product will be inserted. Format: `accounts/`
99+
# account``
100100
# @param [Google::Apis::MerchantapiProductsV1beta::ProductInput] product_input_object
101101
# @param [String] data_source
102102
# Required. The primary or supplemental product data source name. If the product
@@ -137,11 +137,10 @@ def insert_account_product_input(parent, product_input_object = nil, data_source
137137
# inserting, updating, or deleting a product input, it may take several minutes
138138
# before the processed product can be retrieved.
139139
# @param [String] name
140-
# Identifier. The name of the product input. Format: `"`productinput.name=
141-
# accounts/`account`/productInputs/`productinput``"` where the last section `
142-
# productinput` consists of 4 parts: channel~content_language~feed_label~
143-
# offer_id example for product input name is "accounts/123/productInputs/online~
144-
# en~US~sku123"
140+
# Identifier. The name of the product input. Format: `accounts/`account`/
141+
# productInputs/`productinput`` where the last section `productinput` consists
142+
# of 4 parts: `channel~content_language~feed_label~offer_id` example for product
143+
# input name is `accounts/123/productInputs/online~en~US~sku123`
145144
# @param [Google::Apis::MerchantapiProductsV1beta::ProductInput] product_input_object
146145
# @param [String] data_source
147146
# Required. The primary or supplemental product data source where `data_source`
@@ -192,9 +191,9 @@ def patch_account_product_input(name, product_input_object = nil, data_source: n
192191
# before the updated final product can be retrieved.
193192
# @param [String] name
194193
# Required. The name of the product to retrieve. Format: `accounts/`account`/
195-
# products/`product`` where the last section `product` consists of 4 parts:
196-
# channel~content_language~feed_label~offer_id example for product name is "
197-
# accounts/123/products/online~en~US~sku123"
194+
# products/`product`` where the last section `product` consists of 4 parts: `
195+
# channel~content_language~feed_label~offer_id` example for product name is `
196+
# accounts/123/products/online~en~US~sku123`
198197
# @param [String] fields
199198
# Selector specifying which fields to include in a partial response.
200199
# @param [String] quota_user
@@ -223,13 +222,13 @@ def get_account_product(name, fields: nil, quota_user: nil, options: nil, &block
223222
end
224223

225224
# Lists the processed products in your Merchant Center account. The response
226-
# might contain fewer items than specified by pageSize. Rely on pageToken to
225+
# might contain fewer items than specified by `pageSize`. Rely on `pageToken` to
227226
# determine if there are more items to be requested. After inserting, updating,
228227
# or deleting a product input, it may take several minutes before the updated
229228
# processed product can be retrieved.
230229
# @param [String] parent
231-
# Required. The account to list processed products for. Format: accounts/`
232-
# account`
230+
# Required. The account to list processed products for. Format: `accounts/`
231+
# account``
233232
# @param [Fixnum] page_size
234233
# The maximum number of products to return. The service may return fewer than
235234
# this value. The maximum value is 250; values above 250 will be coerced to 250.

0 commit comments

Comments
 (0)