@googleapis/merchantapi 5.0.0 → 8.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +50 -0
- package/README.md +9 -0
- package/accounts_v1beta.ts +6487 -518
- package/build/accounts_v1beta.d.ts +4773 -229
- package/build/accounts_v1beta.js +560 -12
- package/build/accounts_v1beta.js.map +1 -1
- package/build/conversions_v1beta.d.ts +349 -14
- package/build/conversions_v1beta.js.map +1 -1
- package/build/datasources_v1beta.d.ts +427 -18
- package/build/datasources_v1beta.js.map +1 -1
- package/build/index.d.ts +11 -1
- package/build/index.js +7 -1
- package/build/index.js.map +1 -1
- package/build/inventories_v1beta.d.ts +349 -15
- package/build/inventories_v1beta.js.map +1 -1
- package/build/issueresolution_v1beta.d.ts +1027 -0
- package/build/issueresolution_v1beta.js +196 -0
- package/build/issueresolution_v1beta.js.map +1 -0
- package/build/lfp_v1beta.d.ts +451 -18
- package/build/lfp_v1beta.js.map +1 -1
- package/build/notifications_v1beta.d.ts +283 -12
- package/build/notifications_v1beta.js.map +1 -1
- package/build/ordertracking_v1beta.d.ts +459 -0
- package/build/ordertracking_v1beta.js +91 -0
- package/build/ordertracking_v1beta.js.map +1 -0
- package/build/products_v1beta.d.ts +358 -55
- package/build/products_v1beta.js.map +1 -1
- package/build/promotions_v1beta.d.ts +178 -11
- package/build/promotions_v1beta.js.map +1 -1
- package/build/quota_v1beta.d.ts +55 -4
- package/build/quota_v1beta.js.map +1 -1
- package/build/reports_v1beta.d.ts +61 -4
- package/build/reports_v1beta.js.map +1 -1
- package/build/reviews_v1beta.d.ts +443 -19
- package/build/reviews_v1beta.js.map +1 -1
- package/conversions_v1beta.ts +371 -21
- package/datasources_v1beta.ts +453 -26
- package/index.ts +24 -1
- package/inventories_v1beta.ts +367 -24
- package/issueresolution_v1beta.ts +1426 -0
- package/lfp_v1beta.ts +477 -26
- package/notifications_v1beta.ts +299 -21
- package/ordertracking_v1beta.ts +599 -0
- package/package.json +2 -2
- package/products_v1beta.ts +376 -61
- package/promotions_v1beta.ts +188 -15
- package/quota_v1beta.ts +57 -6
- package/reports_v1beta.ts +65 -5
- package/reviews_v1beta.ts +471 -29
package/products_v1beta.ts
CHANGED
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
Compute,
|
|
24
24
|
UserRefreshClient,
|
|
25
25
|
BaseExternalAccountClient,
|
|
26
|
-
|
|
26
|
+
GaxiosResponseWithHTTP2,
|
|
27
27
|
GoogleConfigurable,
|
|
28
28
|
createAPIRequest,
|
|
29
29
|
MethodOptions,
|
|
@@ -133,7 +133,7 @@ export namespace merchantapi_products_v1beta {
|
|
|
133
133
|
*/
|
|
134
134
|
additionalImageLinks?: string[] | null;
|
|
135
135
|
/**
|
|
136
|
-
* Used to group items in an arbitrary way. Only for CPA%, discouraged otherwise.
|
|
136
|
+
* Used to group items in an arbitrary way. Only for CPA%, discouraged otherwise. For more information, see [Display ads attribute](https://support.google.com/merchants/answer/6069387).
|
|
137
137
|
*/
|
|
138
138
|
adsGrouping?: string | null;
|
|
139
139
|
/**
|
|
@@ -153,11 +153,11 @@ export namespace merchantapi_products_v1beta {
|
|
|
153
153
|
*/
|
|
154
154
|
ageGroup?: string | null;
|
|
155
155
|
/**
|
|
156
|
-
* A safeguard in the
|
|
156
|
+
* A safeguard in the [automated discounts] (https://support.google.com/merchants/answer/10295759) and "Dynamic Promotions" (https://support.google.com/merchants/answer/13949249) projects, ensuring that discounts on business offers do not fall below this value, thereby preserving the offer's value and profitability.
|
|
157
157
|
*/
|
|
158
158
|
autoPricingMinPrice?: Schema$Price;
|
|
159
159
|
/**
|
|
160
|
-
* Availability status of the item.
|
|
160
|
+
* [Availability](https://support.google.com/merchants/answer/6324448) status of the item. For example, "in_stock" or "out_of_stock".
|
|
161
161
|
*/
|
|
162
162
|
availability?: string | null;
|
|
163
163
|
/**
|
|
@@ -165,7 +165,7 @@ export namespace merchantapi_products_v1beta {
|
|
|
165
165
|
*/
|
|
166
166
|
availabilityDate?: string | null;
|
|
167
167
|
/**
|
|
168
|
-
* Brand of the item.
|
|
168
|
+
* [Brand](https://support.google.com/merchants/answer/6324351) of the item. For example, "Google".
|
|
169
169
|
*/
|
|
170
170
|
brand?: string | null;
|
|
171
171
|
/**
|
|
@@ -181,11 +181,11 @@ export namespace merchantapi_products_v1beta {
|
|
|
181
181
|
*/
|
|
182
182
|
cloudExportAdditionalProperties?: Schema$CloudExportAdditionalProperties[];
|
|
183
183
|
/**
|
|
184
|
-
* Color of the item.
|
|
184
|
+
* [Color](https://support.google.com/merchants/answer/6324487) of the item. For example, "red".
|
|
185
185
|
*/
|
|
186
186
|
color?: string | null;
|
|
187
187
|
/**
|
|
188
|
-
* Condition or state of the item.
|
|
188
|
+
* [Condition](https://support.google.com/merchants/answer/6324469) or state of the item. For example, "new" or "used".
|
|
189
189
|
*/
|
|
190
190
|
condition?: string | null;
|
|
191
191
|
/**
|
|
@@ -193,23 +193,23 @@ export namespace merchantapi_products_v1beta {
|
|
|
193
193
|
*/
|
|
194
194
|
costOfGoodsSold?: Schema$Price;
|
|
195
195
|
/**
|
|
196
|
-
* Custom label 0 for custom grouping of items in a Shopping campaign.
|
|
196
|
+
* [Custom label 0](https://support.google.com/merchants/answer/6324473) for custom grouping of items in a Shopping campaign.
|
|
197
197
|
*/
|
|
198
198
|
customLabel0?: string | null;
|
|
199
199
|
/**
|
|
200
|
-
* Custom label 1 for custom grouping of items in a Shopping campaign.
|
|
200
|
+
* [Custom label 1](https://support.google.com/merchants/answer/6324473) for custom grouping of items in a Shopping campaign.
|
|
201
201
|
*/
|
|
202
202
|
customLabel1?: string | null;
|
|
203
203
|
/**
|
|
204
|
-
* Custom label 2 for custom grouping of items in a Shopping campaign.
|
|
204
|
+
* [Custom label 2](https://support.google.com/merchants/answer/6324473) for custom grouping of items in a Shopping campaign.
|
|
205
205
|
*/
|
|
206
206
|
customLabel2?: string | null;
|
|
207
207
|
/**
|
|
208
|
-
* Custom label 3 for custom grouping of items in a Shopping campaign.
|
|
208
|
+
* [Custom label 3](https://support.google.com/merchants/answer/6324473) for custom grouping of items in a Shopping campaign.
|
|
209
209
|
*/
|
|
210
210
|
customLabel3?: string | null;
|
|
211
211
|
/**
|
|
212
|
-
* Custom label 4 for custom grouping of items in a Shopping campaign.
|
|
212
|
+
* [Custom label 4](https://support.google.com/merchants/answer/6324473) for custom grouping of items in a Shopping campaign.
|
|
213
213
|
*/
|
|
214
214
|
customLabel4?: string | null;
|
|
215
215
|
/**
|
|
@@ -217,7 +217,7 @@ export namespace merchantapi_products_v1beta {
|
|
|
217
217
|
*/
|
|
218
218
|
description?: string | null;
|
|
219
219
|
/**
|
|
220
|
-
* The date time when an offer becomes visible in search results across Google’s YouTube surfaces, in [ISO 8601](http://en.wikipedia.org/wiki/ISO_8601) format. See [Disclosure date](
|
|
220
|
+
* The date time when an offer becomes visible in search results across Google’s YouTube surfaces, in [ISO 8601](http://en.wikipedia.org/wiki/ISO_8601) format. See [Disclosure date](https://support.google.com/merchants/answer/13034208) for more information.
|
|
221
221
|
*/
|
|
222
222
|
disclosureDate?: string | null;
|
|
223
223
|
/**
|
|
@@ -229,7 +229,7 @@ export namespace merchantapi_products_v1beta {
|
|
|
229
229
|
*/
|
|
230
230
|
displayAdsLink?: string | null;
|
|
231
231
|
/**
|
|
232
|
-
* Advertiser-specified recommendations.
|
|
232
|
+
* Advertiser-specified recommendations. For more information, see [Display ads attribute specification](https://support.google.com/merchants/answer/6069387).
|
|
233
233
|
*/
|
|
234
234
|
displayAdsSimilarIds?: string[] | null;
|
|
235
235
|
/**
|
|
@@ -237,7 +237,7 @@ export namespace merchantapi_products_v1beta {
|
|
|
237
237
|
*/
|
|
238
238
|
displayAdsTitle?: string | null;
|
|
239
239
|
/**
|
|
240
|
-
* Offer margin for dynamic remarketing campaigns.
|
|
240
|
+
* Offer margin for dynamic remarketing campaigns. For more information, see [Display ads attribute](https://support.google.com/merchants/answer/6069387).
|
|
241
241
|
*/
|
|
242
242
|
displayAdsValue?: number | null;
|
|
243
243
|
/**
|
|
@@ -245,7 +245,7 @@ export namespace merchantapi_products_v1beta {
|
|
|
245
245
|
*/
|
|
246
246
|
energyEfficiencyClass?: string | null;
|
|
247
247
|
/**
|
|
248
|
-
* The list of destinations to exclude for this target (corresponds to unchecked check boxes in Merchant Center).
|
|
248
|
+
* The list of destinations to exclude for this target (corresponds to unchecked check boxes in Merchant Center). For more information, see [Excluded destination](https://support.google.com/merchants/answer/6324486). Note: We recommend setting destinations on datasources level for most use cases. Use this field within products to only setup exceptions.
|
|
249
249
|
*/
|
|
250
250
|
excludedDestinations?: string[] | null;
|
|
251
251
|
/**
|
|
@@ -261,7 +261,7 @@ export namespace merchantapi_products_v1beta {
|
|
|
261
261
|
*/
|
|
262
262
|
freeShippingThreshold?: Schema$FreeShippingThreshold[];
|
|
263
263
|
/**
|
|
264
|
-
* Target gender of the item.
|
|
264
|
+
* Target [gender](https://support.google.com/merchants/answer/6324479) of the item. For example, "male" or "female".
|
|
265
265
|
*/
|
|
266
266
|
gender?: string | null;
|
|
267
267
|
/**
|
|
@@ -281,7 +281,7 @@ export namespace merchantapi_products_v1beta {
|
|
|
281
281
|
*/
|
|
282
282
|
imageLink?: string | null;
|
|
283
283
|
/**
|
|
284
|
-
* The list of destinations to include for this target (corresponds to checked check boxes in Merchant Center). Default destinations are always included unless provided in `excludedDestinations`.
|
|
284
|
+
* The list of destinations to include for this target (corresponds to checked check boxes in Merchant Center). Default destinations are always included unless provided in `excludedDestinations`. For more information, see [Included destination](https://support.google.com/merchants/answer/7501026). Note: We recommend setting destinations on datasources level for most use cases. Use this field within products to only setup exceptions.
|
|
285
285
|
*/
|
|
286
286
|
includedDestinations?: string[] | null;
|
|
287
287
|
/**
|
|
@@ -289,7 +289,7 @@ export namespace merchantapi_products_v1beta {
|
|
|
289
289
|
*/
|
|
290
290
|
installment?: Schema$Installment;
|
|
291
291
|
/**
|
|
292
|
-
* Whether the item is a
|
|
292
|
+
* Whether the item is a business-defined sub-API. A [sub-API] (https://support.google.com/merchants/answer/6324449) is a custom grouping of different products sold by a business for a single price.
|
|
293
293
|
*/
|
|
294
294
|
isBundle?: boolean | null;
|
|
295
295
|
/**
|
|
@@ -305,7 +305,7 @@ export namespace merchantapi_products_v1beta {
|
|
|
305
305
|
*/
|
|
306
306
|
link?: string | null;
|
|
307
307
|
/**
|
|
308
|
-
* Link template for
|
|
308
|
+
* [Link template](https://support.google.com/merchants/answer/13871172) for business hosted local storefront.
|
|
309
309
|
*/
|
|
310
310
|
linkTemplate?: string | null;
|
|
311
311
|
/**
|
|
@@ -317,7 +317,7 @@ export namespace merchantapi_products_v1beta {
|
|
|
317
317
|
*/
|
|
318
318
|
loyaltyPrograms?: Schema$LoyaltyProgram[];
|
|
319
319
|
/**
|
|
320
|
-
* The material of which the item is made.
|
|
320
|
+
* The [material](https://support.google.com/merchants/answer/6324410) of which the item is made. For example, "Leather" or "Cotton".
|
|
321
321
|
*/
|
|
322
322
|
material?: string | null;
|
|
323
323
|
/**
|
|
@@ -328,6 +328,10 @@ export namespace merchantapi_products_v1beta {
|
|
|
328
328
|
* Maximal product handling time (in business days).
|
|
329
329
|
*/
|
|
330
330
|
maxHandlingTime?: string | null;
|
|
331
|
+
/**
|
|
332
|
+
* Maximum retail price (MRP) of the item. Applicable to India only.
|
|
333
|
+
*/
|
|
334
|
+
maximumRetailPrice?: Schema$Price;
|
|
331
335
|
/**
|
|
332
336
|
* The energy efficiency class as defined in EU directive 2010/30/EU.
|
|
333
337
|
*/
|
|
@@ -341,7 +345,7 @@ export namespace merchantapi_products_v1beta {
|
|
|
341
345
|
*/
|
|
342
346
|
mobileLink?: string | null;
|
|
343
347
|
/**
|
|
344
|
-
* Link template for
|
|
348
|
+
* [Link template](https://support.google.com/merchants/answer/13870216) for business hosted local storefront optimized for mobile devices.
|
|
345
349
|
*/
|
|
346
350
|
mobileLinkTemplate?: string | null;
|
|
347
351
|
/**
|
|
@@ -349,11 +353,11 @@ export namespace merchantapi_products_v1beta {
|
|
|
349
353
|
*/
|
|
350
354
|
mpn?: string | null;
|
|
351
355
|
/**
|
|
352
|
-
* The number of identical products in a
|
|
356
|
+
* The number of identical products in a business-defined multipack.
|
|
353
357
|
*/
|
|
354
358
|
multipack?: string | null;
|
|
355
359
|
/**
|
|
356
|
-
* The item's pattern
|
|
360
|
+
* The item's [pattern](https://support.google.com/merchants/answer/6324483). For example, polka dots.
|
|
357
361
|
*/
|
|
358
362
|
pattern?: string | null;
|
|
359
363
|
/**
|
|
@@ -361,11 +365,11 @@ export namespace merchantapi_products_v1beta {
|
|
|
361
365
|
*/
|
|
362
366
|
pause?: string | null;
|
|
363
367
|
/**
|
|
364
|
-
* The
|
|
368
|
+
* The [pickup](https://support.google.com/merchants/answer/14634021) option for the item.
|
|
365
369
|
*/
|
|
366
370
|
pickupMethod?: string | null;
|
|
367
371
|
/**
|
|
368
|
-
* Item store pickup timeline.
|
|
372
|
+
* Item store pickup timeline. For more information, see [Pickup SLA](https://support.google.com/merchants/answer/14635400).
|
|
369
373
|
*/
|
|
370
374
|
pickupSla?: string | null;
|
|
371
375
|
/**
|
|
@@ -381,7 +385,7 @@ export namespace merchantapi_products_v1beta {
|
|
|
381
385
|
*/
|
|
382
386
|
productHeight?: Schema$ProductDimension;
|
|
383
387
|
/**
|
|
384
|
-
* Bullet points describing the most relevant highlights
|
|
388
|
+
* Bullet points describing the most relevant [product highlights](https://support.google.com/merchants/answer/9216100).
|
|
385
389
|
*/
|
|
386
390
|
productHighlights?: string[] | null;
|
|
387
391
|
/**
|
|
@@ -389,7 +393,7 @@ export namespace merchantapi_products_v1beta {
|
|
|
389
393
|
*/
|
|
390
394
|
productLength?: Schema$ProductDimension;
|
|
391
395
|
/**
|
|
392
|
-
* Categories of the item (formatted as in [product data specification](https://support.google.com/merchants/answer/
|
|
396
|
+
* Categories of the item (formatted as in [product data specification](https://support.google.com/merchants/answer/7052112#product_category)).
|
|
393
397
|
*/
|
|
394
398
|
productTypes?: string[] | null;
|
|
395
399
|
/**
|
|
@@ -409,7 +413,7 @@ export namespace merchantapi_products_v1beta {
|
|
|
409
413
|
*/
|
|
410
414
|
salePrice?: Schema$Price;
|
|
411
415
|
/**
|
|
412
|
-
* Date range during which the item is on sale
|
|
416
|
+
* Date range during which the item is on sale, see [product data specification](https://support.google.com/merchants/answer/7052112#price_and_availability).
|
|
413
417
|
*/
|
|
414
418
|
salePriceEffectiveDate?: Schema$Interval;
|
|
415
419
|
/**
|
|
@@ -441,19 +445,19 @@ export namespace merchantapi_products_v1beta {
|
|
|
441
445
|
*/
|
|
442
446
|
shippingWidth?: Schema$ShippingDimension;
|
|
443
447
|
/**
|
|
444
|
-
* List of country codes (ISO 3166-1 alpha-2) to exclude the offer from Shopping Ads destination. Countries from this list are removed from countries configured in data source settings.
|
|
448
|
+
* List of country codes [(ISO 3166-1 alpha-2)](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) to exclude the offer from Shopping Ads destination. Countries from this list are removed from countries configured in data source settings.
|
|
445
449
|
*/
|
|
446
450
|
shoppingAdsExcludedCountries?: string[] | null;
|
|
447
451
|
/**
|
|
448
|
-
* Size of the item. Only one value is allowed. For variants with different sizes, insert a separate product for each size with the same `itemGroupId` value
|
|
452
|
+
* Size of the item. Only one value is allowed. For variants with different sizes, insert a separate product for each size with the same `itemGroupId` value, see [Size](https://support.google.com/merchants/answer/6324492).
|
|
449
453
|
*/
|
|
450
454
|
size?: string | null;
|
|
451
455
|
/**
|
|
452
|
-
* System in which the size is specified. Recommended for apparel items.
|
|
456
|
+
* System in which the size is specified. Recommended for apparel items. For example, "US", "UK", "DE". For more information, see [Size system](https://support.google.com/merchants/answer/6324502).
|
|
453
457
|
*/
|
|
454
458
|
sizeSystem?: string | null;
|
|
455
459
|
/**
|
|
456
|
-
* The cut of the item. It can be used to represent combined size types for apparel items. Maximum two of size types can be provided
|
|
460
|
+
* The cut of the item. It can be used to represent combined size types for apparel items. Maximum two of size types can be provided, see [Size type](https://support.google.com/merchants/answer/6324497). For example, "petite", "plus size".
|
|
457
461
|
*/
|
|
458
462
|
sizeTypes?: string[] | null;
|
|
459
463
|
/**
|
|
@@ -473,7 +477,7 @@ export namespace merchantapi_products_v1beta {
|
|
|
473
477
|
*/
|
|
474
478
|
sustainabilityIncentives?: Schema$ProductSustainabilityIncentive[];
|
|
475
479
|
/**
|
|
476
|
-
* The tax category of the product.
|
|
480
|
+
* The [tax category](https://support.google.com/merchants/answer/7569847) of the product.
|
|
477
481
|
*/
|
|
478
482
|
taxCategory?: string | null;
|
|
479
483
|
/**
|
|
@@ -698,7 +702,7 @@ export namespace merchantapi_products_v1beta {
|
|
|
698
702
|
*/
|
|
699
703
|
reportingContext?: string | null;
|
|
700
704
|
/**
|
|
701
|
-
* Whether the issue can be resolved by the
|
|
705
|
+
* Whether the issue can be resolved by the business.
|
|
702
706
|
*/
|
|
703
707
|
resolution?: string | null;
|
|
704
708
|
/**
|
|
@@ -757,7 +761,7 @@ export namespace merchantapi_products_v1beta {
|
|
|
757
761
|
*/
|
|
758
762
|
price?: Schema$Price;
|
|
759
763
|
/**
|
|
760
|
-
* The label of the loyalty program. This is an internal label that uniquely identifies the relationship between a
|
|
764
|
+
* The label of the loyalty program. This is an internal label that uniquely identifies the relationship between a business entity and a loyalty program entity. The label must be provided so that the system can associate the assets below (for example, price and points) with a business. The corresponding program must be linked to the Merchant Center account.
|
|
761
765
|
*/
|
|
762
766
|
programLabel?: string | null;
|
|
763
767
|
/**
|
|
@@ -811,7 +815,7 @@ export namespace merchantapi_products_v1beta {
|
|
|
811
815
|
*/
|
|
812
816
|
dataSource?: string | null;
|
|
813
817
|
/**
|
|
814
|
-
* Output only. The feed label
|
|
818
|
+
* Output only. The feed label lets you categorize and identify your products. The maximum allowed characters is 20 and the supported characters are`A-Z`, `0-9`, hyphen and underscore. The feed label must not include any spaces. For more information, see [Using feed labels](//support.google.com/merchants/answer/14994087)
|
|
815
819
|
*/
|
|
816
820
|
feedLabel?: string | null;
|
|
817
821
|
/**
|
|
@@ -883,7 +887,7 @@ export namespace merchantapi_products_v1beta {
|
|
|
883
887
|
value?: number | null;
|
|
884
888
|
}
|
|
885
889
|
/**
|
|
886
|
-
* 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](https://support.google.com/merchants/answer/188494). 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 [Products Data Specification](https://support.google.com/merchants/answer/188494) with [some exceptions](https://support.google.com/merchants/answer/7052112). The following reference documentation lists the field names in the **camelCase** casing style while the Products Data Specification lists the names in the **snake_case** casing style.
|
|
890
|
+
* 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. For more information, see [Manage products](/merchant/api/guides/products/overview). Required product input attributes to pass data validation checks are primarily defined in the [Products Data Specification](https://support.google.com/merchants/answer/188494). 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 [Products Data Specification](https://support.google.com/merchants/answer/188494) with [some exceptions](https://support.google.com/merchants/answer/7052112). The following reference documentation lists the field names in the **camelCase** casing style while the Products Data Specification lists the names in the **snake_case** casing style.
|
|
887
891
|
*/
|
|
888
892
|
export interface Schema$ProductInput {
|
|
889
893
|
/**
|
|
@@ -903,7 +907,7 @@ export namespace merchantapi_products_v1beta {
|
|
|
903
907
|
*/
|
|
904
908
|
customAttributes?: Schema$CustomAttribute[];
|
|
905
909
|
/**
|
|
906
|
-
* Required. Immutable. The [feed
|
|
910
|
+
* Required. Immutable. The label that lets you categorize and identify your products. The maximum allowed characters are 20, and the supported characters are `A-Z`, `0-9`, hyphen, and underscore. The feed label must not include any spaces. For more information, see [Using feed labels](//support.google.com/merchants/answer/14994087).
|
|
907
911
|
*/
|
|
908
912
|
feedLabel?: string | null;
|
|
909
913
|
/**
|
|
@@ -969,7 +973,7 @@ export namespace merchantapi_products_v1beta {
|
|
|
969
973
|
*/
|
|
970
974
|
eventTime?: string | null;
|
|
971
975
|
/**
|
|
972
|
-
* Optional. The product expiration time. This field will not
|
|
976
|
+
* Optional. The product expiration time. This field will not be set if the notification is sent for a product deletion event.
|
|
973
977
|
*/
|
|
974
978
|
expirationTime?: string | null;
|
|
975
979
|
/**
|
|
@@ -1212,6 +1216,52 @@ export namespace merchantapi_products_v1beta {
|
|
|
1212
1216
|
|
|
1213
1217
|
/**
|
|
1214
1218
|
* Deletes a product input from your Merchant Center account. After inserting, updating, or deleting a product input, it may take several minutes before the processed product can be retrieved.
|
|
1219
|
+
* @example
|
|
1220
|
+
* ```js
|
|
1221
|
+
* // Before running the sample:
|
|
1222
|
+
* // - Enable the API at:
|
|
1223
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
1224
|
+
* // - Login into gcloud by running:
|
|
1225
|
+
* // ```sh
|
|
1226
|
+
* // $ gcloud auth application-default login
|
|
1227
|
+
* // ```
|
|
1228
|
+
* // - Install the npm module by running:
|
|
1229
|
+
* // ```sh
|
|
1230
|
+
* // $ npm install googleapis
|
|
1231
|
+
* // ```
|
|
1232
|
+
*
|
|
1233
|
+
* const {google} = require('googleapis');
|
|
1234
|
+
* const merchantapi = google.merchantapi('products_v1beta');
|
|
1235
|
+
*
|
|
1236
|
+
* async function main() {
|
|
1237
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1238
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1239
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
1240
|
+
* });
|
|
1241
|
+
*
|
|
1242
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1243
|
+
* const authClient = await auth.getClient();
|
|
1244
|
+
* google.options({auth: authClient});
|
|
1245
|
+
*
|
|
1246
|
+
* // Do the magic
|
|
1247
|
+
* const res = await merchantapi.accounts.productInputs.delete({
|
|
1248
|
+
* // Required. The primary or supplemental data source from which the product input should be deleted. Format: `accounts/{account\}/dataSources/{datasource\}`. For example, `accounts/123456/dataSources/104628`.
|
|
1249
|
+
* dataSource: 'placeholder-value',
|
|
1250
|
+
* // Required. The name of the product input resource to delete. Format: `accounts/{account\}/productInputs/{product\}` where the last section `product` consists of 4 parts: `channel~content_language~feed_label~offer_id` example for product name is `accounts/123/productInputs/online~en~US~sku123`.
|
|
1251
|
+
* name: 'accounts/my-account/productInputs/my-productInput',
|
|
1252
|
+
* });
|
|
1253
|
+
* console.log(res.data);
|
|
1254
|
+
*
|
|
1255
|
+
* // Example response
|
|
1256
|
+
* // {}
|
|
1257
|
+
* }
|
|
1258
|
+
*
|
|
1259
|
+
* main().catch(e => {
|
|
1260
|
+
* console.error(e);
|
|
1261
|
+
* throw e;
|
|
1262
|
+
* });
|
|
1263
|
+
*
|
|
1264
|
+
* ```
|
|
1215
1265
|
*
|
|
1216
1266
|
* @param params - Parameters for request
|
|
1217
1267
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1221,11 +1271,11 @@ export namespace merchantapi_products_v1beta {
|
|
|
1221
1271
|
delete(
|
|
1222
1272
|
params: Params$Resource$Accounts$Productinputs$Delete,
|
|
1223
1273
|
options: StreamMethodOptions
|
|
1224
|
-
):
|
|
1274
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
1225
1275
|
delete(
|
|
1226
1276
|
params?: Params$Resource$Accounts$Productinputs$Delete,
|
|
1227
1277
|
options?: MethodOptions
|
|
1228
|
-
):
|
|
1278
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Empty>>;
|
|
1229
1279
|
delete(
|
|
1230
1280
|
params: Params$Resource$Accounts$Productinputs$Delete,
|
|
1231
1281
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -1254,7 +1304,10 @@ export namespace merchantapi_products_v1beta {
|
|
|
1254
1304
|
callback?:
|
|
1255
1305
|
| BodyResponseCallback<Schema$Empty>
|
|
1256
1306
|
| BodyResponseCallback<Readable>
|
|
1257
|
-
):
|
|
1307
|
+
):
|
|
1308
|
+
| void
|
|
1309
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Empty>>
|
|
1310
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
1258
1311
|
let params = (paramsOrCallback ||
|
|
1259
1312
|
{}) as Params$Resource$Accounts$Productinputs$Delete;
|
|
1260
1313
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -1299,7 +1352,79 @@ export namespace merchantapi_products_v1beta {
|
|
|
1299
1352
|
}
|
|
1300
1353
|
|
|
1301
1354
|
/**
|
|
1302
|
-
* Uploads a product input to your Merchant Center account. If an input with the same contentLanguage, offerId, and dataSource already exists, this method replaces that entry. After inserting, updating, or deleting a product input, it may take several minutes before the processed product can be retrieved.
|
|
1355
|
+
* [Uploads a product input to your Merchant Center account](/merchant/api/guides/products/overview#upload-product-input). You must have a products data source to be able to insert a product. The unique identifier of the data source is passed as a query parameter in the request URL. If an input with the same contentLanguage, offerId, and dataSource already exists, this method replaces that entry. After inserting, updating, or deleting a product input, it may take several minutes before the processed product can be retrieved.
|
|
1356
|
+
* @example
|
|
1357
|
+
* ```js
|
|
1358
|
+
* // Before running the sample:
|
|
1359
|
+
* // - Enable the API at:
|
|
1360
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
1361
|
+
* // - Login into gcloud by running:
|
|
1362
|
+
* // ```sh
|
|
1363
|
+
* // $ gcloud auth application-default login
|
|
1364
|
+
* // ```
|
|
1365
|
+
* // - Install the npm module by running:
|
|
1366
|
+
* // ```sh
|
|
1367
|
+
* // $ npm install googleapis
|
|
1368
|
+
* // ```
|
|
1369
|
+
*
|
|
1370
|
+
* const {google} = require('googleapis');
|
|
1371
|
+
* const merchantapi = google.merchantapi('products_v1beta');
|
|
1372
|
+
*
|
|
1373
|
+
* async function main() {
|
|
1374
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1375
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1376
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
1377
|
+
* });
|
|
1378
|
+
*
|
|
1379
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1380
|
+
* const authClient = await auth.getClient();
|
|
1381
|
+
* google.options({auth: authClient});
|
|
1382
|
+
*
|
|
1383
|
+
* // Do the magic
|
|
1384
|
+
* const res = await merchantapi.accounts.productInputs.insert({
|
|
1385
|
+
* // Required. The primary or supplemental product data source name. If the product already exists and data source provided is different, then the product will be moved to a new data source. For more information, see [Overview of Data sources sub-API](/merchant/api/guides/data-sources/overview). Only API data sources are supported. Format: `accounts/{account\}/dataSources/{datasource\}`. For example, `accounts/123456/dataSources/104628`.
|
|
1386
|
+
* dataSource: 'placeholder-value',
|
|
1387
|
+
* // Required. The account where this product will be inserted. Format: `accounts/{account\}`
|
|
1388
|
+
* parent: 'accounts/my-account',
|
|
1389
|
+
*
|
|
1390
|
+
* // Request body metadata
|
|
1391
|
+
* requestBody: {
|
|
1392
|
+
* // request body parameters
|
|
1393
|
+
* // {
|
|
1394
|
+
* // "attributes": {},
|
|
1395
|
+
* // "channel": "my_channel",
|
|
1396
|
+
* // "contentLanguage": "my_contentLanguage",
|
|
1397
|
+
* // "customAttributes": [],
|
|
1398
|
+
* // "feedLabel": "my_feedLabel",
|
|
1399
|
+
* // "name": "my_name",
|
|
1400
|
+
* // "offerId": "my_offerId",
|
|
1401
|
+
* // "product": "my_product",
|
|
1402
|
+
* // "versionNumber": "my_versionNumber"
|
|
1403
|
+
* // }
|
|
1404
|
+
* },
|
|
1405
|
+
* });
|
|
1406
|
+
* console.log(res.data);
|
|
1407
|
+
*
|
|
1408
|
+
* // Example response
|
|
1409
|
+
* // {
|
|
1410
|
+
* // "attributes": {},
|
|
1411
|
+
* // "channel": "my_channel",
|
|
1412
|
+
* // "contentLanguage": "my_contentLanguage",
|
|
1413
|
+
* // "customAttributes": [],
|
|
1414
|
+
* // "feedLabel": "my_feedLabel",
|
|
1415
|
+
* // "name": "my_name",
|
|
1416
|
+
* // "offerId": "my_offerId",
|
|
1417
|
+
* // "product": "my_product",
|
|
1418
|
+
* // "versionNumber": "my_versionNumber"
|
|
1419
|
+
* // }
|
|
1420
|
+
* }
|
|
1421
|
+
*
|
|
1422
|
+
* main().catch(e => {
|
|
1423
|
+
* console.error(e);
|
|
1424
|
+
* throw e;
|
|
1425
|
+
* });
|
|
1426
|
+
*
|
|
1427
|
+
* ```
|
|
1303
1428
|
*
|
|
1304
1429
|
* @param params - Parameters for request
|
|
1305
1430
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1309,11 +1434,11 @@ export namespace merchantapi_products_v1beta {
|
|
|
1309
1434
|
insert(
|
|
1310
1435
|
params: Params$Resource$Accounts$Productinputs$Insert,
|
|
1311
1436
|
options: StreamMethodOptions
|
|
1312
|
-
):
|
|
1437
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
1313
1438
|
insert(
|
|
1314
1439
|
params?: Params$Resource$Accounts$Productinputs$Insert,
|
|
1315
1440
|
options?: MethodOptions
|
|
1316
|
-
):
|
|
1441
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$ProductInput>>;
|
|
1317
1442
|
insert(
|
|
1318
1443
|
params: Params$Resource$Accounts$Productinputs$Insert,
|
|
1319
1444
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -1342,7 +1467,10 @@ export namespace merchantapi_products_v1beta {
|
|
|
1342
1467
|
callback?:
|
|
1343
1468
|
| BodyResponseCallback<Schema$ProductInput>
|
|
1344
1469
|
| BodyResponseCallback<Readable>
|
|
1345
|
-
):
|
|
1470
|
+
):
|
|
1471
|
+
| void
|
|
1472
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$ProductInput>>
|
|
1473
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
1346
1474
|
let params = (paramsOrCallback ||
|
|
1347
1475
|
{}) as Params$Resource$Accounts$Productinputs$Insert;
|
|
1348
1476
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -1387,6 +1515,80 @@ export namespace merchantapi_products_v1beta {
|
|
|
1387
1515
|
|
|
1388
1516
|
/**
|
|
1389
1517
|
* Updates the existing product input in your Merchant Center account. After inserting, updating, or deleting a product input, it may take several minutes before the processed product can be retrieved.
|
|
1518
|
+
* @example
|
|
1519
|
+
* ```js
|
|
1520
|
+
* // Before running the sample:
|
|
1521
|
+
* // - Enable the API at:
|
|
1522
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
1523
|
+
* // - Login into gcloud by running:
|
|
1524
|
+
* // ```sh
|
|
1525
|
+
* // $ gcloud auth application-default login
|
|
1526
|
+
* // ```
|
|
1527
|
+
* // - Install the npm module by running:
|
|
1528
|
+
* // ```sh
|
|
1529
|
+
* // $ npm install googleapis
|
|
1530
|
+
* // ```
|
|
1531
|
+
*
|
|
1532
|
+
* const {google} = require('googleapis');
|
|
1533
|
+
* const merchantapi = google.merchantapi('products_v1beta');
|
|
1534
|
+
*
|
|
1535
|
+
* async function main() {
|
|
1536
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1537
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1538
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
1539
|
+
* });
|
|
1540
|
+
*
|
|
1541
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1542
|
+
* const authClient = await auth.getClient();
|
|
1543
|
+
* google.options({auth: authClient});
|
|
1544
|
+
*
|
|
1545
|
+
* // Do the magic
|
|
1546
|
+
* const res = await merchantapi.accounts.productInputs.patch({
|
|
1547
|
+
* // Required. The primary or supplemental product data source where `data_source` name identifies the product input to be updated. Only API data sources are supported. Format: `accounts/{account\}/dataSources/{datasource\}`. For example, `accounts/123456/dataSources/104628`.
|
|
1548
|
+
* dataSource: 'placeholder-value',
|
|
1549
|
+
* // Identifier. The name of the product input. Format: `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`
|
|
1550
|
+
* name: 'accounts/my-account/productInputs/my-productInput',
|
|
1551
|
+
* // Optional. The list of product attributes to be updated. If the update mask is omitted, then it is treated as implied field mask equivalent to all fields that are populated (have a non-empty value). Attributes specified in the update mask without a value specified in the body will be deleted from the product. Update mask can only be specified for top level fields in attributes and custom attributes. To specify the update mask for custom attributes you need to add the `custom_attribute.` prefix. Providing special "*" value for full product replacement is not supported.
|
|
1552
|
+
* updateMask: 'placeholder-value',
|
|
1553
|
+
*
|
|
1554
|
+
* // Request body metadata
|
|
1555
|
+
* requestBody: {
|
|
1556
|
+
* // request body parameters
|
|
1557
|
+
* // {
|
|
1558
|
+
* // "attributes": {},
|
|
1559
|
+
* // "channel": "my_channel",
|
|
1560
|
+
* // "contentLanguage": "my_contentLanguage",
|
|
1561
|
+
* // "customAttributes": [],
|
|
1562
|
+
* // "feedLabel": "my_feedLabel",
|
|
1563
|
+
* // "name": "my_name",
|
|
1564
|
+
* // "offerId": "my_offerId",
|
|
1565
|
+
* // "product": "my_product",
|
|
1566
|
+
* // "versionNumber": "my_versionNumber"
|
|
1567
|
+
* // }
|
|
1568
|
+
* },
|
|
1569
|
+
* });
|
|
1570
|
+
* console.log(res.data);
|
|
1571
|
+
*
|
|
1572
|
+
* // Example response
|
|
1573
|
+
* // {
|
|
1574
|
+
* // "attributes": {},
|
|
1575
|
+
* // "channel": "my_channel",
|
|
1576
|
+
* // "contentLanguage": "my_contentLanguage",
|
|
1577
|
+
* // "customAttributes": [],
|
|
1578
|
+
* // "feedLabel": "my_feedLabel",
|
|
1579
|
+
* // "name": "my_name",
|
|
1580
|
+
* // "offerId": "my_offerId",
|
|
1581
|
+
* // "product": "my_product",
|
|
1582
|
+
* // "versionNumber": "my_versionNumber"
|
|
1583
|
+
* // }
|
|
1584
|
+
* }
|
|
1585
|
+
*
|
|
1586
|
+
* main().catch(e => {
|
|
1587
|
+
* console.error(e);
|
|
1588
|
+
* throw e;
|
|
1589
|
+
* });
|
|
1590
|
+
*
|
|
1591
|
+
* ```
|
|
1390
1592
|
*
|
|
1391
1593
|
* @param params - Parameters for request
|
|
1392
1594
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1396,11 +1598,11 @@ export namespace merchantapi_products_v1beta {
|
|
|
1396
1598
|
patch(
|
|
1397
1599
|
params: Params$Resource$Accounts$Productinputs$Patch,
|
|
1398
1600
|
options: StreamMethodOptions
|
|
1399
|
-
):
|
|
1601
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
1400
1602
|
patch(
|
|
1401
1603
|
params?: Params$Resource$Accounts$Productinputs$Patch,
|
|
1402
1604
|
options?: MethodOptions
|
|
1403
|
-
):
|
|
1605
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$ProductInput>>;
|
|
1404
1606
|
patch(
|
|
1405
1607
|
params: Params$Resource$Accounts$Productinputs$Patch,
|
|
1406
1608
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -1429,7 +1631,10 @@ export namespace merchantapi_products_v1beta {
|
|
|
1429
1631
|
callback?:
|
|
1430
1632
|
| BodyResponseCallback<Schema$ProductInput>
|
|
1431
1633
|
| BodyResponseCallback<Readable>
|
|
1432
|
-
):
|
|
1634
|
+
):
|
|
1635
|
+
| void
|
|
1636
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$ProductInput>>
|
|
1637
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
1433
1638
|
let params = (paramsOrCallback ||
|
|
1434
1639
|
{}) as Params$Resource$Accounts$Productinputs$Patch;
|
|
1435
1640
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -1477,7 +1682,7 @@ export namespace merchantapi_products_v1beta {
|
|
|
1477
1682
|
export interface Params$Resource$Accounts$Productinputs$Delete
|
|
1478
1683
|
extends StandardParameters {
|
|
1479
1684
|
/**
|
|
1480
|
-
* Required. The primary or supplemental data source from which the product input should be deleted. Format: `accounts/{account\}/dataSources/{datasource\}`.
|
|
1685
|
+
* Required. The primary or supplemental data source from which the product input should be deleted. Format: `accounts/{account\}/dataSources/{datasource\}`. For example, `accounts/123456/dataSources/104628`.
|
|
1481
1686
|
*/
|
|
1482
1687
|
dataSource?: string;
|
|
1483
1688
|
/**
|
|
@@ -1488,7 +1693,7 @@ export namespace merchantapi_products_v1beta {
|
|
|
1488
1693
|
export interface Params$Resource$Accounts$Productinputs$Insert
|
|
1489
1694
|
extends StandardParameters {
|
|
1490
1695
|
/**
|
|
1491
|
-
* Required. The primary or supplemental product data source name. If the product already exists and data source provided is different, then the product will be moved to a new data source. Only API data sources are supported. Format: `accounts/{account\}/dataSources/{datasource\}`.
|
|
1696
|
+
* Required. The primary or supplemental product data source name. If the product already exists and data source provided is different, then the product will be moved to a new data source. For more information, see [Overview of Data sources sub-API](/merchant/api/guides/data-sources/overview). Only API data sources are supported. Format: `accounts/{account\}/dataSources/{datasource\}`. For example, `accounts/123456/dataSources/104628`.
|
|
1492
1697
|
*/
|
|
1493
1698
|
dataSource?: string;
|
|
1494
1699
|
/**
|
|
@@ -1504,7 +1709,7 @@ export namespace merchantapi_products_v1beta {
|
|
|
1504
1709
|
export interface Params$Resource$Accounts$Productinputs$Patch
|
|
1505
1710
|
extends StandardParameters {
|
|
1506
1711
|
/**
|
|
1507
|
-
* Required. The primary or supplemental product data source where `data_source` name identifies the product input to be updated. Only API data sources are supported. Format: `accounts/{account\}/dataSources/{datasource\}`.
|
|
1712
|
+
* Required. The primary or supplemental product data source where `data_source` name identifies the product input to be updated. Only API data sources are supported. Format: `accounts/{account\}/dataSources/{datasource\}`. For example, `accounts/123456/dataSources/104628`.
|
|
1508
1713
|
*/
|
|
1509
1714
|
dataSource?: string;
|
|
1510
1715
|
/**
|
|
@@ -1530,6 +1735,62 @@ export namespace merchantapi_products_v1beta {
|
|
|
1530
1735
|
|
|
1531
1736
|
/**
|
|
1532
1737
|
* Retrieves the processed product from your Merchant Center account. After inserting, updating, or deleting a product input, it may take several minutes before the updated final product can be retrieved.
|
|
1738
|
+
* @example
|
|
1739
|
+
* ```js
|
|
1740
|
+
* // Before running the sample:
|
|
1741
|
+
* // - Enable the API at:
|
|
1742
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
1743
|
+
* // - Login into gcloud by running:
|
|
1744
|
+
* // ```sh
|
|
1745
|
+
* // $ gcloud auth application-default login
|
|
1746
|
+
* // ```
|
|
1747
|
+
* // - Install the npm module by running:
|
|
1748
|
+
* // ```sh
|
|
1749
|
+
* // $ npm install googleapis
|
|
1750
|
+
* // ```
|
|
1751
|
+
*
|
|
1752
|
+
* const {google} = require('googleapis');
|
|
1753
|
+
* const merchantapi = google.merchantapi('products_v1beta');
|
|
1754
|
+
*
|
|
1755
|
+
* async function main() {
|
|
1756
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1757
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1758
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
1759
|
+
* });
|
|
1760
|
+
*
|
|
1761
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1762
|
+
* const authClient = await auth.getClient();
|
|
1763
|
+
* google.options({auth: authClient});
|
|
1764
|
+
*
|
|
1765
|
+
* // Do the magic
|
|
1766
|
+
* const res = await merchantapi.accounts.products.get({
|
|
1767
|
+
* // Required. The name of the product to retrieve. Format: `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`
|
|
1768
|
+
* name: 'accounts/my-account/products/my-product',
|
|
1769
|
+
* });
|
|
1770
|
+
* console.log(res.data);
|
|
1771
|
+
*
|
|
1772
|
+
* // Example response
|
|
1773
|
+
* // {
|
|
1774
|
+
* // "attributes": {},
|
|
1775
|
+
* // "automatedDiscounts": {},
|
|
1776
|
+
* // "channel": "my_channel",
|
|
1777
|
+
* // "contentLanguage": "my_contentLanguage",
|
|
1778
|
+
* // "customAttributes": [],
|
|
1779
|
+
* // "dataSource": "my_dataSource",
|
|
1780
|
+
* // "feedLabel": "my_feedLabel",
|
|
1781
|
+
* // "name": "my_name",
|
|
1782
|
+
* // "offerId": "my_offerId",
|
|
1783
|
+
* // "productStatus": {},
|
|
1784
|
+
* // "versionNumber": "my_versionNumber"
|
|
1785
|
+
* // }
|
|
1786
|
+
* }
|
|
1787
|
+
*
|
|
1788
|
+
* main().catch(e => {
|
|
1789
|
+
* console.error(e);
|
|
1790
|
+
* throw e;
|
|
1791
|
+
* });
|
|
1792
|
+
*
|
|
1793
|
+
* ```
|
|
1533
1794
|
*
|
|
1534
1795
|
* @param params - Parameters for request
|
|
1535
1796
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1539,11 +1800,11 @@ export namespace merchantapi_products_v1beta {
|
|
|
1539
1800
|
get(
|
|
1540
1801
|
params: Params$Resource$Accounts$Products$Get,
|
|
1541
1802
|
options: StreamMethodOptions
|
|
1542
|
-
):
|
|
1803
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
1543
1804
|
get(
|
|
1544
1805
|
params?: Params$Resource$Accounts$Products$Get,
|
|
1545
1806
|
options?: MethodOptions
|
|
1546
|
-
):
|
|
1807
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Product>>;
|
|
1547
1808
|
get(
|
|
1548
1809
|
params: Params$Resource$Accounts$Products$Get,
|
|
1549
1810
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -1572,7 +1833,10 @@ export namespace merchantapi_products_v1beta {
|
|
|
1572
1833
|
callback?:
|
|
1573
1834
|
| BodyResponseCallback<Schema$Product>
|
|
1574
1835
|
| BodyResponseCallback<Readable>
|
|
1575
|
-
):
|
|
1836
|
+
):
|
|
1837
|
+
| void
|
|
1838
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Product>>
|
|
1839
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
1576
1840
|
let params = (paramsOrCallback ||
|
|
1577
1841
|
{}) as Params$Resource$Accounts$Products$Get;
|
|
1578
1842
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -1618,6 +1882,57 @@ export namespace merchantapi_products_v1beta {
|
|
|
1618
1882
|
|
|
1619
1883
|
/**
|
|
1620
1884
|
* Lists the processed products in your Merchant Center account. The response might contain fewer items than specified by `pageSize`. Rely on `pageToken` to determine if there are more items to be requested. After inserting, updating, or deleting a product input, it may take several minutes before the updated processed product can be retrieved.
|
|
1885
|
+
* @example
|
|
1886
|
+
* ```js
|
|
1887
|
+
* // Before running the sample:
|
|
1888
|
+
* // - Enable the API at:
|
|
1889
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
1890
|
+
* // - Login into gcloud by running:
|
|
1891
|
+
* // ```sh
|
|
1892
|
+
* // $ gcloud auth application-default login
|
|
1893
|
+
* // ```
|
|
1894
|
+
* // - Install the npm module by running:
|
|
1895
|
+
* // ```sh
|
|
1896
|
+
* // $ npm install googleapis
|
|
1897
|
+
* // ```
|
|
1898
|
+
*
|
|
1899
|
+
* const {google} = require('googleapis');
|
|
1900
|
+
* const merchantapi = google.merchantapi('products_v1beta');
|
|
1901
|
+
*
|
|
1902
|
+
* async function main() {
|
|
1903
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1904
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1905
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
1906
|
+
* });
|
|
1907
|
+
*
|
|
1908
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1909
|
+
* const authClient = await auth.getClient();
|
|
1910
|
+
* google.options({auth: authClient});
|
|
1911
|
+
*
|
|
1912
|
+
* // Do the magic
|
|
1913
|
+
* const res = await merchantapi.accounts.products.list({
|
|
1914
|
+
* // The maximum number of products to return. The service may return fewer than this value. The maximum value is 1000; values above 1000 will be coerced to 1000. If unspecified, the maximum number of products will be returned.
|
|
1915
|
+
* pageSize: 'placeholder-value',
|
|
1916
|
+
* // A page token, received from a previous `ListProducts` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListProducts` must match the call that provided the page token.
|
|
1917
|
+
* pageToken: 'placeholder-value',
|
|
1918
|
+
* // Required. The account to list processed products for. Format: `accounts/{account\}`
|
|
1919
|
+
* parent: 'accounts/my-account',
|
|
1920
|
+
* });
|
|
1921
|
+
* console.log(res.data);
|
|
1922
|
+
*
|
|
1923
|
+
* // Example response
|
|
1924
|
+
* // {
|
|
1925
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
1926
|
+
* // "products": []
|
|
1927
|
+
* // }
|
|
1928
|
+
* }
|
|
1929
|
+
*
|
|
1930
|
+
* main().catch(e => {
|
|
1931
|
+
* console.error(e);
|
|
1932
|
+
* throw e;
|
|
1933
|
+
* });
|
|
1934
|
+
*
|
|
1935
|
+
* ```
|
|
1621
1936
|
*
|
|
1622
1937
|
* @param params - Parameters for request
|
|
1623
1938
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1627,11 +1942,11 @@ export namespace merchantapi_products_v1beta {
|
|
|
1627
1942
|
list(
|
|
1628
1943
|
params: Params$Resource$Accounts$Products$List,
|
|
1629
1944
|
options: StreamMethodOptions
|
|
1630
|
-
):
|
|
1945
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
1631
1946
|
list(
|
|
1632
1947
|
params?: Params$Resource$Accounts$Products$List,
|
|
1633
1948
|
options?: MethodOptions
|
|
1634
|
-
):
|
|
1949
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$ListProductsResponse>>;
|
|
1635
1950
|
list(
|
|
1636
1951
|
params: Params$Resource$Accounts$Products$List,
|
|
1637
1952
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -1664,8 +1979,8 @@ export namespace merchantapi_products_v1beta {
|
|
|
1664
1979
|
| BodyResponseCallback<Readable>
|
|
1665
1980
|
):
|
|
1666
1981
|
| void
|
|
1667
|
-
|
|
|
1668
|
-
|
|
|
1982
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$ListProductsResponse>>
|
|
1983
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
1669
1984
|
let params = (paramsOrCallback ||
|
|
1670
1985
|
{}) as Params$Resource$Accounts$Products$List;
|
|
1671
1986
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -1720,7 +2035,7 @@ export namespace merchantapi_products_v1beta {
|
|
|
1720
2035
|
export interface Params$Resource$Accounts$Products$List
|
|
1721
2036
|
extends StandardParameters {
|
|
1722
2037
|
/**
|
|
1723
|
-
* The maximum number of products to return. The service may return fewer than this value. The maximum value is
|
|
2038
|
+
* The maximum number of products to return. The service may return fewer than this value. The maximum value is 1000; values above 1000 will be coerced to 1000. If unspecified, the maximum number of products will be returned.
|
|
1724
2039
|
*/
|
|
1725
2040
|
pageSize?: number;
|
|
1726
2041
|
/**
|