@googleapis/merchantapi 6.0.1 → 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 +32 -0
- package/README.md +9 -0
- package/accounts_v1beta.ts +6214 -358
- package/build/accounts_v1beta.d.ts +4685 -141
- package/build/accounts_v1beta.js +560 -12
- package/build/accounts_v1beta.js.map +1 -1
- package/build/conversions_v1beta.d.ts +336 -1
- package/build/conversions_v1beta.js.map +1 -1
- package/build/datasources_v1beta.d.ts +411 -2
- package/build/datasources_v1beta.js.map +1 -1
- package/build/inventories_v1beta.d.ts +336 -2
- package/build/inventories_v1beta.js.map +1 -1
- package/build/issueresolution_v1beta.d.ts +367 -1
- package/build/issueresolution_v1beta.js +48 -0
- package/build/issueresolution_v1beta.js.map +1 -1
- package/build/lfp_v1beta.d.ts +436 -3
- package/build/lfp_v1beta.js.map +1 -1
- package/build/notifications_v1beta.d.ts +272 -1
- package/build/notifications_v1beta.js.map +1 -1
- package/build/ordertracking_v1beta.d.ts +75 -1
- package/build/ordertracking_v1beta.js.map +1 -1
- package/build/products_v1beta.d.ts +347 -44
- package/build/products_v1beta.js.map +1 -1
- package/build/promotions_v1beta.d.ts +171 -4
- package/build/promotions_v1beta.js.map +1 -1
- package/build/quota_v1beta.d.ts +52 -1
- package/build/quota_v1beta.js.map +1 -1
- package/build/reports_v1beta.d.ts +58 -1
- package/build/reports_v1beta.js.map +1 -1
- package/build/reviews_v1beta.d.ts +426 -2
- package/build/reviews_v1beta.js.map +1 -1
- package/conversions_v1beta.ts +336 -1
- package/datasources_v1beta.ts +411 -2
- package/inventories_v1beta.ts +336 -2
- package/issueresolution_v1beta.ts +465 -1
- package/lfp_v1beta.ts +436 -3
- package/notifications_v1beta.ts +272 -1
- package/ordertracking_v1beta.ts +75 -1
- package/package.json +1 -1
- package/products_v1beta.ts +347 -44
- package/promotions_v1beta.ts +171 -4
- package/quota_v1beta.ts +52 -1
- package/reports_v1beta.ts +58 -1
- package/reviews_v1beta.ts +426 -2
|
@@ -156,7 +156,7 @@ export declare namespace merchantapi_notifications_v1beta {
|
|
|
156
156
|
*/
|
|
157
157
|
eventTime?: string | null;
|
|
158
158
|
/**
|
|
159
|
-
* Optional. The product expiration time. This field will not
|
|
159
|
+
* Optional. The product expiration time. This field will not be set if the notification is sent for a product deletion event.
|
|
160
160
|
*/
|
|
161
161
|
expirationTime?: string | null;
|
|
162
162
|
/**
|
|
@@ -186,6 +186,68 @@ export declare namespace merchantapi_notifications_v1beta {
|
|
|
186
186
|
constructor(context: APIRequestContext);
|
|
187
187
|
/**
|
|
188
188
|
* Creates a notification subscription for a business. For standalone or subaccounts accounts, the business can create a subscription for self. For MCAs, the business can create a subscription for all managed accounts or for a specific subaccount. We will allow the following types of notification subscriptions to exist together (per business as a subscriber per event type): 1. Subscription for all managed accounts + subscription for self. 2. Multiple "partial" subscriptions for managed accounts + subscription for self. we will not allow (per business as a subscriber per event type): 1. Multiple self subscriptions. 2. Multiple "all managed accounts" subscriptions. 3. "All managed accounts" subscription and partial subscriptions at the same time. 4. Multiple partial subscriptions for the same target account.
|
|
189
|
+
* @example
|
|
190
|
+
* ```js
|
|
191
|
+
* // Before running the sample:
|
|
192
|
+
* // - Enable the API at:
|
|
193
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
194
|
+
* // - Login into gcloud by running:
|
|
195
|
+
* // ```sh
|
|
196
|
+
* // $ gcloud auth application-default login
|
|
197
|
+
* // ```
|
|
198
|
+
* // - Install the npm module by running:
|
|
199
|
+
* // ```sh
|
|
200
|
+
* // $ npm install googleapis
|
|
201
|
+
* // ```
|
|
202
|
+
*
|
|
203
|
+
* const {google} = require('googleapis');
|
|
204
|
+
* const merchantapi = google.merchantapi('notifications_v1beta');
|
|
205
|
+
*
|
|
206
|
+
* async function main() {
|
|
207
|
+
* const auth = new google.auth.GoogleAuth({
|
|
208
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
209
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
210
|
+
* });
|
|
211
|
+
*
|
|
212
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
213
|
+
* const authClient = await auth.getClient();
|
|
214
|
+
* google.options({auth: authClient});
|
|
215
|
+
*
|
|
216
|
+
* // Do the magic
|
|
217
|
+
* const res = await merchantapi.accounts.notificationsubscriptions.create({
|
|
218
|
+
* // Required. The merchant account that owns the new notification subscription. Format: `accounts/{account\}`
|
|
219
|
+
* parent: 'accounts/my-account',
|
|
220
|
+
*
|
|
221
|
+
* // Request body metadata
|
|
222
|
+
* requestBody: {
|
|
223
|
+
* // request body parameters
|
|
224
|
+
* // {
|
|
225
|
+
* // "allManagedAccounts": false,
|
|
226
|
+
* // "callBackUri": "my_callBackUri",
|
|
227
|
+
* // "name": "my_name",
|
|
228
|
+
* // "registeredEvent": "my_registeredEvent",
|
|
229
|
+
* // "targetAccount": "my_targetAccount"
|
|
230
|
+
* // }
|
|
231
|
+
* },
|
|
232
|
+
* });
|
|
233
|
+
* console.log(res.data);
|
|
234
|
+
*
|
|
235
|
+
* // Example response
|
|
236
|
+
* // {
|
|
237
|
+
* // "allManagedAccounts": false,
|
|
238
|
+
* // "callBackUri": "my_callBackUri",
|
|
239
|
+
* // "name": "my_name",
|
|
240
|
+
* // "registeredEvent": "my_registeredEvent",
|
|
241
|
+
* // "targetAccount": "my_targetAccount"
|
|
242
|
+
* // }
|
|
243
|
+
* }
|
|
244
|
+
*
|
|
245
|
+
* main().catch(e => {
|
|
246
|
+
* console.error(e);
|
|
247
|
+
* throw e;
|
|
248
|
+
* });
|
|
249
|
+
*
|
|
250
|
+
* ```
|
|
189
251
|
*
|
|
190
252
|
* @param params - Parameters for request
|
|
191
253
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -200,6 +262,50 @@ export declare namespace merchantapi_notifications_v1beta {
|
|
|
200
262
|
create(callback: BodyResponseCallback<Schema$NotificationSubscription>): void;
|
|
201
263
|
/**
|
|
202
264
|
* Deletes a notification subscription for a merchant.
|
|
265
|
+
* @example
|
|
266
|
+
* ```js
|
|
267
|
+
* // Before running the sample:
|
|
268
|
+
* // - Enable the API at:
|
|
269
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
270
|
+
* // - Login into gcloud by running:
|
|
271
|
+
* // ```sh
|
|
272
|
+
* // $ gcloud auth application-default login
|
|
273
|
+
* // ```
|
|
274
|
+
* // - Install the npm module by running:
|
|
275
|
+
* // ```sh
|
|
276
|
+
* // $ npm install googleapis
|
|
277
|
+
* // ```
|
|
278
|
+
*
|
|
279
|
+
* const {google} = require('googleapis');
|
|
280
|
+
* const merchantapi = google.merchantapi('notifications_v1beta');
|
|
281
|
+
*
|
|
282
|
+
* async function main() {
|
|
283
|
+
* const auth = new google.auth.GoogleAuth({
|
|
284
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
285
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
286
|
+
* });
|
|
287
|
+
*
|
|
288
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
289
|
+
* const authClient = await auth.getClient();
|
|
290
|
+
* google.options({auth: authClient});
|
|
291
|
+
*
|
|
292
|
+
* // Do the magic
|
|
293
|
+
* const res = await merchantapi.accounts.notificationsubscriptions.delete({
|
|
294
|
+
* // Required. The name of the notification subscription to be deleted.
|
|
295
|
+
* name: 'accounts/my-account/notificationsubscriptions/my-notificationsubscription',
|
|
296
|
+
* });
|
|
297
|
+
* console.log(res.data);
|
|
298
|
+
*
|
|
299
|
+
* // Example response
|
|
300
|
+
* // {}
|
|
301
|
+
* }
|
|
302
|
+
*
|
|
303
|
+
* main().catch(e => {
|
|
304
|
+
* console.error(e);
|
|
305
|
+
* throw e;
|
|
306
|
+
* });
|
|
307
|
+
*
|
|
308
|
+
* ```
|
|
203
309
|
*
|
|
204
310
|
* @param params - Parameters for request
|
|
205
311
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -214,6 +320,56 @@ export declare namespace merchantapi_notifications_v1beta {
|
|
|
214
320
|
delete(callback: BodyResponseCallback<Schema$Empty>): void;
|
|
215
321
|
/**
|
|
216
322
|
* Gets notification subscriptions for an account.
|
|
323
|
+
* @example
|
|
324
|
+
* ```js
|
|
325
|
+
* // Before running the sample:
|
|
326
|
+
* // - Enable the API at:
|
|
327
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
328
|
+
* // - Login into gcloud by running:
|
|
329
|
+
* // ```sh
|
|
330
|
+
* // $ gcloud auth application-default login
|
|
331
|
+
* // ```
|
|
332
|
+
* // - Install the npm module by running:
|
|
333
|
+
* // ```sh
|
|
334
|
+
* // $ npm install googleapis
|
|
335
|
+
* // ```
|
|
336
|
+
*
|
|
337
|
+
* const {google} = require('googleapis');
|
|
338
|
+
* const merchantapi = google.merchantapi('notifications_v1beta');
|
|
339
|
+
*
|
|
340
|
+
* async function main() {
|
|
341
|
+
* const auth = new google.auth.GoogleAuth({
|
|
342
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
343
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
344
|
+
* });
|
|
345
|
+
*
|
|
346
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
347
|
+
* const authClient = await auth.getClient();
|
|
348
|
+
* google.options({auth: authClient});
|
|
349
|
+
*
|
|
350
|
+
* // Do the magic
|
|
351
|
+
* const res = await merchantapi.accounts.notificationsubscriptions.get({
|
|
352
|
+
* // Required. The `name` of the notification subscription.
|
|
353
|
+
* name: 'accounts/my-account/notificationsubscriptions/my-notificationsubscription',
|
|
354
|
+
* });
|
|
355
|
+
* console.log(res.data);
|
|
356
|
+
*
|
|
357
|
+
* // Example response
|
|
358
|
+
* // {
|
|
359
|
+
* // "allManagedAccounts": false,
|
|
360
|
+
* // "callBackUri": "my_callBackUri",
|
|
361
|
+
* // "name": "my_name",
|
|
362
|
+
* // "registeredEvent": "my_registeredEvent",
|
|
363
|
+
* // "targetAccount": "my_targetAccount"
|
|
364
|
+
* // }
|
|
365
|
+
* }
|
|
366
|
+
*
|
|
367
|
+
* main().catch(e => {
|
|
368
|
+
* console.error(e);
|
|
369
|
+
* throw e;
|
|
370
|
+
* });
|
|
371
|
+
*
|
|
372
|
+
* ```
|
|
217
373
|
*
|
|
218
374
|
* @param params - Parameters for request
|
|
219
375
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -228,6 +384,57 @@ export declare namespace merchantapi_notifications_v1beta {
|
|
|
228
384
|
get(callback: BodyResponseCallback<Schema$NotificationSubscription>): void;
|
|
229
385
|
/**
|
|
230
386
|
* Gets all the notification subscriptions for a merchant.
|
|
387
|
+
* @example
|
|
388
|
+
* ```js
|
|
389
|
+
* // Before running the sample:
|
|
390
|
+
* // - Enable the API at:
|
|
391
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
392
|
+
* // - Login into gcloud by running:
|
|
393
|
+
* // ```sh
|
|
394
|
+
* // $ gcloud auth application-default login
|
|
395
|
+
* // ```
|
|
396
|
+
* // - Install the npm module by running:
|
|
397
|
+
* // ```sh
|
|
398
|
+
* // $ npm install googleapis
|
|
399
|
+
* // ```
|
|
400
|
+
*
|
|
401
|
+
* const {google} = require('googleapis');
|
|
402
|
+
* const merchantapi = google.merchantapi('notifications_v1beta');
|
|
403
|
+
*
|
|
404
|
+
* async function main() {
|
|
405
|
+
* const auth = new google.auth.GoogleAuth({
|
|
406
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
407
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
408
|
+
* });
|
|
409
|
+
*
|
|
410
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
411
|
+
* const authClient = await auth.getClient();
|
|
412
|
+
* google.options({auth: authClient});
|
|
413
|
+
*
|
|
414
|
+
* // Do the magic
|
|
415
|
+
* const res = await merchantapi.accounts.notificationsubscriptions.list({
|
|
416
|
+
* // The maximum number of notification subscriptions to return in a page. The default value for `page_size` is 100. The maximum value is `200`. Values above `200` will be coerced to `200`.
|
|
417
|
+
* pageSize: 'placeholder-value',
|
|
418
|
+
* // Token (if provided) to retrieve the subsequent page. All other parameters must match the original call that provided the page token.
|
|
419
|
+
* pageToken: 'placeholder-value',
|
|
420
|
+
* // Required. The merchant account who owns the notification subscriptions. Format: `accounts/{account\}`
|
|
421
|
+
* parent: 'accounts/my-account',
|
|
422
|
+
* });
|
|
423
|
+
* console.log(res.data);
|
|
424
|
+
*
|
|
425
|
+
* // Example response
|
|
426
|
+
* // {
|
|
427
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
428
|
+
* // "notificationSubscriptions": []
|
|
429
|
+
* // }
|
|
430
|
+
* }
|
|
431
|
+
*
|
|
432
|
+
* main().catch(e => {
|
|
433
|
+
* console.error(e);
|
|
434
|
+
* throw e;
|
|
435
|
+
* });
|
|
436
|
+
*
|
|
437
|
+
* ```
|
|
231
438
|
*
|
|
232
439
|
* @param params - Parameters for request
|
|
233
440
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -242,6 +449,70 @@ export declare namespace merchantapi_notifications_v1beta {
|
|
|
242
449
|
list(callback: BodyResponseCallback<Schema$ListNotificationSubscriptionsResponse>): void;
|
|
243
450
|
/**
|
|
244
451
|
* Updates an existing notification subscription for a merchant.
|
|
452
|
+
* @example
|
|
453
|
+
* ```js
|
|
454
|
+
* // Before running the sample:
|
|
455
|
+
* // - Enable the API at:
|
|
456
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
457
|
+
* // - Login into gcloud by running:
|
|
458
|
+
* // ```sh
|
|
459
|
+
* // $ gcloud auth application-default login
|
|
460
|
+
* // ```
|
|
461
|
+
* // - Install the npm module by running:
|
|
462
|
+
* // ```sh
|
|
463
|
+
* // $ npm install googleapis
|
|
464
|
+
* // ```
|
|
465
|
+
*
|
|
466
|
+
* const {google} = require('googleapis');
|
|
467
|
+
* const merchantapi = google.merchantapi('notifications_v1beta');
|
|
468
|
+
*
|
|
469
|
+
* async function main() {
|
|
470
|
+
* const auth = new google.auth.GoogleAuth({
|
|
471
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
472
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
473
|
+
* });
|
|
474
|
+
*
|
|
475
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
476
|
+
* const authClient = await auth.getClient();
|
|
477
|
+
* google.options({auth: authClient});
|
|
478
|
+
*
|
|
479
|
+
* // Do the magic
|
|
480
|
+
* const res = await merchantapi.accounts.notificationsubscriptions.patch({
|
|
481
|
+
* // Output only. The `name` of the notification configuration. Generated by the Content API upon creation of a new `NotificationSubscription`. The `account` represents the merchant ID of the merchant that owns the configuration. Format: `accounts/{account\}/notificationsubscriptions/{notification_subscription\}`
|
|
482
|
+
* name: 'accounts/my-account/notificationsubscriptions/my-notificationsubscription',
|
|
483
|
+
* // List of fields being updated.
|
|
484
|
+
* updateMask: 'placeholder-value',
|
|
485
|
+
*
|
|
486
|
+
* // Request body metadata
|
|
487
|
+
* requestBody: {
|
|
488
|
+
* // request body parameters
|
|
489
|
+
* // {
|
|
490
|
+
* // "allManagedAccounts": false,
|
|
491
|
+
* // "callBackUri": "my_callBackUri",
|
|
492
|
+
* // "name": "my_name",
|
|
493
|
+
* // "registeredEvent": "my_registeredEvent",
|
|
494
|
+
* // "targetAccount": "my_targetAccount"
|
|
495
|
+
* // }
|
|
496
|
+
* },
|
|
497
|
+
* });
|
|
498
|
+
* console.log(res.data);
|
|
499
|
+
*
|
|
500
|
+
* // Example response
|
|
501
|
+
* // {
|
|
502
|
+
* // "allManagedAccounts": false,
|
|
503
|
+
* // "callBackUri": "my_callBackUri",
|
|
504
|
+
* // "name": "my_name",
|
|
505
|
+
* // "registeredEvent": "my_registeredEvent",
|
|
506
|
+
* // "targetAccount": "my_targetAccount"
|
|
507
|
+
* // }
|
|
508
|
+
* }
|
|
509
|
+
*
|
|
510
|
+
* main().catch(e => {
|
|
511
|
+
* console.error(e);
|
|
512
|
+
* throw e;
|
|
513
|
+
* });
|
|
514
|
+
*
|
|
515
|
+
* ```
|
|
245
516
|
*
|
|
246
517
|
* @param params - Parameters for request
|
|
247
518
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notifications_v1beta.js","sourceRoot":"","sources":["../notifications_v1beta.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;AAEjC,uDAAuD;AACvD,sDAAsD;AACtD,0DAA0D;AAC1D,oDAAoD;AACpD,4CAA4C;AAE5C,yDAe2B;AAG3B,IAAiB,gCAAgC,
|
|
1
|
+
{"version":3,"file":"notifications_v1beta.js","sourceRoot":"","sources":["../notifications_v1beta.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;AAEjC,uDAAuD;AACvD,sDAAsD;AACtD,0DAA0D;AAC1D,oDAAoD;AACpD,4CAA4C;AAE5C,yDAe2B;AAG3B,IAAiB,gCAAgC,CAw/BhD;AAx/BD,WAAiB,gCAAgC;IAgE/C;;;;;;;;;;OAUG;IACH,MAAa,WAAW;QAItB,YAAY,OAAsB,EAAE,MAA2B;YAC7D,IAAI,CAAC,OAAO,GAAG;gBACb,QAAQ,EAAE,OAAO,IAAI,EAAE;gBACvB,MAAM;aACP,CAAC;YAEF,IAAI,CAAC,QAAQ,GAAG,IAAI,iBAAiB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;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AG,iBAAiB,CAAC;gBAC7B,OAAO,GAAG,EAAE,CAAC;aACd;YAED,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,qCAAqC,CAAC;YACzE,MAAM,UAAU,GAAG;gBACjB,OAAO,EAAE,MAAM,CAAC,MAAM,CACpB;oBACE,GAAG,EAAE,CAAC,OAAO,GAAG,+BAA+B,CAAC,CAAC,OAAO,CACtD,cAAc,EACd,IAAI,CACL;oBACD,MAAM,EAAE,OAAO;oBACf,UAAU,EAAE,EAAE;iBACf,EACD,OAAO,CACR;gBACD,MAAM;gBACN,cAAc,EAAE,CAAC,MAAM,CAAC;gBACxB,UAAU,EAAE,CAAC,MAAM,CAAC;gBACpB,OAAO,EAAE,IAAI,CAAC,OAAO;aACtB,CAAC;YACF,IAAI,QAAQ,EAAE;gBACZ,IAAA,oCAAgB,EACd,UAAU,EACV,QAAyC,CAC1C,CAAC;aACH;iBAAM;gBACL,OAAO,IAAA,oCAAgB,EAAkC,UAAU,CAAC,CAAC;aACtE;QACH,CAAC;KACF;IAjvBY,4EAA2C,8CAivBvD,CAAA;AA2DH,CAAC,EAx/BgB,gCAAgC,GAAhC,wCAAgC,KAAhC,wCAAgC,QAw/BhD"}
|
|
@@ -245,7 +245,7 @@ export declare namespace merchantapi_ordertracking_v1beta {
|
|
|
245
245
|
*/
|
|
246
246
|
eventTime?: string | null;
|
|
247
247
|
/**
|
|
248
|
-
* Optional. The product expiration time. This field will not
|
|
248
|
+
* Optional. The product expiration time. This field will not be set if the notification is sent for a product deletion event.
|
|
249
249
|
*/
|
|
250
250
|
expirationTime?: string | null;
|
|
251
251
|
/**
|
|
@@ -354,6 +354,80 @@ export declare namespace merchantapi_ordertracking_v1beta {
|
|
|
354
354
|
constructor(context: APIRequestContext);
|
|
355
355
|
/**
|
|
356
356
|
* Creates new order tracking signal.
|
|
357
|
+
* @example
|
|
358
|
+
* ```js
|
|
359
|
+
* // Before running the sample:
|
|
360
|
+
* // - Enable the API at:
|
|
361
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
362
|
+
* // - Login into gcloud by running:
|
|
363
|
+
* // ```sh
|
|
364
|
+
* // $ gcloud auth application-default login
|
|
365
|
+
* // ```
|
|
366
|
+
* // - Install the npm module by running:
|
|
367
|
+
* // ```sh
|
|
368
|
+
* // $ npm install googleapis
|
|
369
|
+
* // ```
|
|
370
|
+
*
|
|
371
|
+
* const {google} = require('googleapis');
|
|
372
|
+
* const merchantapi = google.merchantapi('ordertracking_v1beta');
|
|
373
|
+
*
|
|
374
|
+
* async function main() {
|
|
375
|
+
* const auth = new google.auth.GoogleAuth({
|
|
376
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
377
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
378
|
+
* });
|
|
379
|
+
*
|
|
380
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
381
|
+
* const authClient = await auth.getClient();
|
|
382
|
+
* google.options({auth: authClient});
|
|
383
|
+
*
|
|
384
|
+
* // Do the magic
|
|
385
|
+
* const res = await merchantapi.accounts.ordertrackingsignals.create({
|
|
386
|
+
* // Output only. The ID that uniquely identifies this order tracking signal.
|
|
387
|
+
* orderTrackingSignalId: 'placeholder-value',
|
|
388
|
+
* // Required. The account of the business for which the order signal is created. Format: accounts/{account\}
|
|
389
|
+
* parent: 'accounts/my-account',
|
|
390
|
+
*
|
|
391
|
+
* // Request body metadata
|
|
392
|
+
* requestBody: {
|
|
393
|
+
* // request body parameters
|
|
394
|
+
* // {
|
|
395
|
+
* // "customerShippingFee": {},
|
|
396
|
+
* // "deliveryPostalCode": "my_deliveryPostalCode",
|
|
397
|
+
* // "deliveryRegionCode": "my_deliveryRegionCode",
|
|
398
|
+
* // "lineItems": [],
|
|
399
|
+
* // "merchantId": "my_merchantId",
|
|
400
|
+
* // "orderCreatedTime": {},
|
|
401
|
+
* // "orderId": "my_orderId",
|
|
402
|
+
* // "orderTrackingSignalId": "my_orderTrackingSignalId",
|
|
403
|
+
* // "shipmentLineItemMapping": [],
|
|
404
|
+
* // "shippingInfo": []
|
|
405
|
+
* // }
|
|
406
|
+
* },
|
|
407
|
+
* });
|
|
408
|
+
* console.log(res.data);
|
|
409
|
+
*
|
|
410
|
+
* // Example response
|
|
411
|
+
* // {
|
|
412
|
+
* // "customerShippingFee": {},
|
|
413
|
+
* // "deliveryPostalCode": "my_deliveryPostalCode",
|
|
414
|
+
* // "deliveryRegionCode": "my_deliveryRegionCode",
|
|
415
|
+
* // "lineItems": [],
|
|
416
|
+
* // "merchantId": "my_merchantId",
|
|
417
|
+
* // "orderCreatedTime": {},
|
|
418
|
+
* // "orderId": "my_orderId",
|
|
419
|
+
* // "orderTrackingSignalId": "my_orderTrackingSignalId",
|
|
420
|
+
* // "shipmentLineItemMapping": [],
|
|
421
|
+
* // "shippingInfo": []
|
|
422
|
+
* // }
|
|
423
|
+
* }
|
|
424
|
+
*
|
|
425
|
+
* main().catch(e => {
|
|
426
|
+
* console.error(e);
|
|
427
|
+
* throw e;
|
|
428
|
+
* });
|
|
429
|
+
*
|
|
430
|
+
* ```
|
|
357
431
|
*
|
|
358
432
|
* @param params - Parameters for request
|
|
359
433
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ordertracking_v1beta.js","sourceRoot":"","sources":["../ordertracking_v1beta.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;AAEjC,uDAAuD;AACvD,sDAAsD;AACtD,0DAA0D;AAC1D,oDAAoD;AACpD,4CAA4C;AAE5C,yDAe2B;AAG3B,IAAiB,gCAAgC,
|
|
1
|
+
{"version":3,"file":"ordertracking_v1beta.js","sourceRoot":"","sources":["../ordertracking_v1beta.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