Skip to content

Commit 8746072

Browse files
yoshi-automationsofisl
authored andcommitted
feat(merchantapi): update the API
#### merchantapi:accounts_v1beta The following keys were changed: - schemas.OnlineReturnPolicy.properties.policy.description - schemas.OnlineReturnPolicy.properties.restockingFee.description #### merchantapi:products_v1beta The following keys were added: - resources.accounts.resources.productInputs.methods.patch.description - resources.accounts.resources.productInputs.methods.patch.flatPath - resources.accounts.resources.productInputs.methods.patch.httpMethod - resources.accounts.resources.productInputs.methods.patch.id - resources.accounts.resources.productInputs.methods.patch.parameterOrder - resources.accounts.resources.productInputs.methods.patch.parameters.dataSource.description - resources.accounts.resources.productInputs.methods.patch.parameters.dataSource.location - resources.accounts.resources.productInputs.methods.patch.parameters.dataSource.type - resources.accounts.resources.productInputs.methods.patch.parameters.name.description - resources.accounts.resources.productInputs.methods.patch.parameters.name.location - resources.accounts.resources.productInputs.methods.patch.parameters.name.pattern - resources.accounts.resources.productInputs.methods.patch.parameters.name.required - resources.accounts.resources.productInputs.methods.patch.parameters.name.type - resources.accounts.resources.productInputs.methods.patch.parameters.updateMask.description - resources.accounts.resources.productInputs.methods.patch.parameters.updateMask.format - resources.accounts.resources.productInputs.methods.patch.parameters.updateMask.location - resources.accounts.resources.productInputs.methods.patch.parameters.updateMask.type - resources.accounts.resources.productInputs.methods.patch.path - resources.accounts.resources.productInputs.methods.patch.request.$ref - resources.accounts.resources.productInputs.methods.patch.response.$ref - resources.accounts.resources.productInputs.methods.patch.scopes
1 parent aec1a0d commit 8746072

File tree

4 files changed

+153
-6
lines changed

4 files changed

+153
-6
lines changed

‎discovery/merchantapi-accounts_v1beta.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1476,7 +1476,7 @@
14761476
}
14771477
}
14781478
},
1479-
"revision": "20250311",
1479+
"revision": "20250317",
14801480
"rootUrl": "https://merchantapi.googleapis.com/",
14811481
"schemas": {
14821482
"Accepted": {
@@ -2651,7 +2651,7 @@
26512651
},
26522652
"policy": {
26532653
"$ref": "Policy",
2654-
"description": "The return policy."
2654+
"description": "Optional. The return policy."
26552655
},
26562656
"processRefundDays": {
26572657
"description": "The field specifies the number of days it takes for merchants to process refunds, field is optional.",
@@ -2660,7 +2660,7 @@
26602660
},
26612661
"restockingFee": {
26622662
"$ref": "RestockingFee",
2663-
"description": "The restocking fee that applies to all return reason categories. This would be treated as a free restocking fee if the value is not set."
2663+
"description": "Optional. The restocking fee that applies to all return reason categories. This would be treated as a free restocking fee if the value is not set."
26642664
},
26652665
"returnMethods": {
26662666
"description": "Optional. The return methods of how customers can return an item. This value is required to not be empty unless the type of return policy is noReturns.",

‎discovery/merchantapi-products_v1beta.json

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,45 @@
171171
"scopes": [
172172
"https://www.googleapis.com/auth/content"
173173
]
174+
},
175+
"patch": {
176+
"description": "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.",
177+
"flatPath": "products/v1beta/accounts/{accountsId}/productInputs/{productInputsId}",
178+
"httpMethod": "PATCH",
179+
"id": "merchantapi.accounts.productInputs.patch",
180+
"parameterOrder": [
181+
"name"
182+
],
183+
"parameters": {
184+
"dataSource": {
185+
"description": "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}`.",
186+
"location": "query",
187+
"type": "string"
188+
},
189+
"name": {
190+
"description": "Identifier. The name of the product input. Format: `\"{productinput.name=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\"",
191+
"location": "path",
192+
"pattern": "^accounts/[^/]+/productInputs/[^/]+$",
193+
"required": true,
194+
"type": "string"
195+
},
196+
"updateMask": {
197+
"description": "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.",
198+
"format": "google-fieldmask",
199+
"location": "query",
200+
"type": "string"
201+
}
202+
},
203+
"path": "products/v1beta/{+name}",
204+
"request": {
205+
"$ref": "ProductInput"
206+
},
207+
"response": {
208+
"$ref": "ProductInput"
209+
},
210+
"scopes": [
211+
"https://www.googleapis.com/auth/content"
212+
]
174213
}
175214
}
176215
},
@@ -242,7 +281,7 @@
242281
}
243282
}
244283
},
245-
"revision": "20250311",
284+
"revision": "20250317",
246285
"rootUrl": "https://merchantapi.googleapis.com/",
247286
"schemas": {
248287
"Attributes": {

‎src/apis/merchantapi/accounts_v1beta.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -928,15 +928,15 @@ export namespace merchantapi_accounts_v1beta {
928928
*/
929929
name?: string | null;
930930
/**
931-
* The return policy.
931+
* Optional. The return policy.
932932
*/
933933
policy?: Schema$Policy;
934934
/**
935935
* The field specifies the number of days it takes for merchants to process refunds, field is optional.
936936
*/
937937
processRefundDays?: number | null;
938938
/**
939-
* The restocking fee that applies to all return reason categories. This would be treated as a free restocking fee if the value is not set.
939+
* Optional. The restocking fee that applies to all return reason categories. This would be treated as a free restocking fee if the value is not set.
940940
*/
941941
restockingFee?: Schema$RestockingFee;
942942
/**

‎src/apis/merchantapi/products_v1beta.ts

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1363,6 +1363,94 @@ export namespace merchantapi_products_v1beta {
13631363
return createAPIRequest<Schema$ProductInput>(parameters);
13641364
}
13651365
}
1366+
1367+
/**
1368+
* 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.
1369+
*
1370+
* @param params - Parameters for request
1371+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1372+
* @param callback - Optional callback that handles the response.
1373+
* @returns A promise if used with async/await, or void if used with a callback.
1374+
*/
1375+
patch(
1376+
params: Params$Resource$Accounts$Productinputs$Patch,
1377+
options: StreamMethodOptions
1378+
): GaxiosPromise<Readable>;
1379+
patch(
1380+
params?: Params$Resource$Accounts$Productinputs$Patch,
1381+
options?: MethodOptions
1382+
): GaxiosPromise<Schema$ProductInput>;
1383+
patch(
1384+
params: Params$Resource$Accounts$Productinputs$Patch,
1385+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
1386+
callback: BodyResponseCallback<Readable>
1387+
): void;
1388+
patch(
1389+
params: Params$Resource$Accounts$Productinputs$Patch,
1390+
options: MethodOptions | BodyResponseCallback<Schema$ProductInput>,
1391+
callback: BodyResponseCallback<Schema$ProductInput>
1392+
): void;
1393+
patch(
1394+
params: Params$Resource$Accounts$Productinputs$Patch,
1395+
callback: BodyResponseCallback<Schema$ProductInput>
1396+
): void;
1397+
patch(callback: BodyResponseCallback<Schema$ProductInput>): void;
1398+
patch(
1399+
paramsOrCallback?:
1400+
| Params$Resource$Accounts$Productinputs$Patch
1401+
| BodyResponseCallback<Schema$ProductInput>
1402+
| BodyResponseCallback<Readable>,
1403+
optionsOrCallback?:
1404+
| MethodOptions
1405+
| StreamMethodOptions
1406+
| BodyResponseCallback<Schema$ProductInput>
1407+
| BodyResponseCallback<Readable>,
1408+
callback?:
1409+
| BodyResponseCallback<Schema$ProductInput>
1410+
| BodyResponseCallback<Readable>
1411+
): void | GaxiosPromise<Schema$ProductInput> | GaxiosPromise<Readable> {
1412+
let params = (paramsOrCallback ||
1413+
{}) as Params$Resource$Accounts$Productinputs$Patch;
1414+
let options = (optionsOrCallback || {}) as MethodOptions;
1415+
1416+
if (typeof paramsOrCallback === 'function') {
1417+
callback = paramsOrCallback;
1418+
params = {} as Params$Resource$Accounts$Productinputs$Patch;
1419+
options = {};
1420+
}
1421+
1422+
if (typeof optionsOrCallback === 'function') {
1423+
callback = optionsOrCallback;
1424+
options = {};
1425+
}
1426+
1427+
const rootUrl = options.rootUrl || 'https://merchantapi.googleapis.com/';
1428+
const parameters = {
1429+
options: Object.assign(
1430+
{
1431+
url: (rootUrl + '/products/v1beta/{+name}').replace(
1432+
/([^:]\/)\/+/g,
1433+
'$1'
1434+
),
1435+
method: 'PATCH',
1436+
apiVersion: '',
1437+
},
1438+
options
1439+
),
1440+
params,
1441+
requiredParams: ['name'],
1442+
pathParams: ['name'],
1443+
context: this.context,
1444+
};
1445+
if (callback) {
1446+
createAPIRequest<Schema$ProductInput>(
1447+
parameters,
1448+
callback as BodyResponseCallback<unknown>
1449+
);
1450+
} else {
1451+
return createAPIRequest<Schema$ProductInput>(parameters);
1452+
}
1453+
}
13661454
}
13671455

13681456
export interface Params$Resource$Accounts$Productinputs$Delete
@@ -1392,6 +1480,26 @@ export namespace merchantapi_products_v1beta {
13921480
*/
13931481
requestBody?: Schema$ProductInput;
13941482
}
1483+
export interface Params$Resource$Accounts$Productinputs$Patch
1484+
extends StandardParameters {
1485+
/**
1486+
* 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\}`.
1487+
*/
1488+
dataSource?: string;
1489+
/**
1490+
* Identifier. The name of the product input. Format: `"{productinput.name=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"
1491+
*/
1492+
name?: string;
1493+
/**
1494+
* 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.
1495+
*/
1496+
updateMask?: string;
1497+
1498+
/**
1499+
* Request body metadata
1500+
*/
1501+
requestBody?: Schema$ProductInput;
1502+
}
13951503

13961504
export class Resource$Accounts$Products {
13971505
context: APIRequestContext;

0 commit comments

Comments
 (0)