/
v2.1.ts
12931 lines (12446 loc) · 434 KB
/
v2.1.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/**
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {
OAuth2Client,
JWT,
Compute,
UserRefreshClient,
} from 'google-auth-library';
import {
GoogleConfigurable,
createAPIRequest,
MethodOptions,
GlobalOptions,
BodyResponseCallback,
APIRequestContext,
} from 'googleapis-common';
import {GaxiosPromise} from 'gaxios';
// tslint:disable: no-any
// tslint:disable: class-name
// tslint:disable: variable-name
// tslint:disable: jsdoc-format
// tslint:disable: no-namespace
export namespace content_v2_1 {
export interface Options extends GlobalOptions {
version: 'v2.1';
}
interface StandardParameters {
/**
* Data format for the response.
*/
alt?: string;
/**
* Selector specifying which fields to include in a partial response.
*/
fields?: string;
/**
* API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
*/
key?: string;
/**
* OAuth 2.0 token for the current user.
*/
oauth_token?: string;
/**
* Returns response with indentations and line breaks.
*/
prettyPrint?: boolean;
/**
* An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
*/
quotaUser?: string;
/**
* Deprecated. Please use quotaUser instead.
*/
userIp?: string;
}
/**
* Content API for Shopping
*
* Manages product items, inventory, and Merchant Center accounts for Google Shopping.
*
* @example
* const {google} = require('googleapis');
* const content = google.content('v2.1');
*
* @namespace content
* @type {Function}
* @version v2.1
* @variation v2.1
* @param {object=} options Options for Content
*/
export class Content {
context: APIRequestContext;
accounts: Resource$Accounts;
accountstatuses: Resource$Accountstatuses;
accounttax: Resource$Accounttax;
datafeeds: Resource$Datafeeds;
datafeedstatuses: Resource$Datafeedstatuses;
liasettings: Resource$Liasettings;
orderinvoices: Resource$Orderinvoices;
orderreports: Resource$Orderreports;
orderreturns: Resource$Orderreturns;
orders: Resource$Orders;
pos: Resource$Pos;
products: Resource$Products;
productstatuses: Resource$Productstatuses;
regionalinventory: Resource$Regionalinventory;
shippingsettings: Resource$Shippingsettings;
constructor(options: GlobalOptions, google?: GoogleConfigurable) {
this.context = {
_options: options || {},
google,
};
this.accounts = new Resource$Accounts(this.context);
this.accountstatuses = new Resource$Accountstatuses(this.context);
this.accounttax = new Resource$Accounttax(this.context);
this.datafeeds = new Resource$Datafeeds(this.context);
this.datafeedstatuses = new Resource$Datafeedstatuses(this.context);
this.liasettings = new Resource$Liasettings(this.context);
this.orderinvoices = new Resource$Orderinvoices(this.context);
this.orderreports = new Resource$Orderreports(this.context);
this.orderreturns = new Resource$Orderreturns(this.context);
this.orders = new Resource$Orders(this.context);
this.pos = new Resource$Pos(this.context);
this.products = new Resource$Products(this.context);
this.productstatuses = new Resource$Productstatuses(this.context);
this.regionalinventory = new Resource$Regionalinventory(this.context);
this.shippingsettings = new Resource$Shippingsettings(this.context);
}
}
/**
* Account data. After the creation of a new account it may take a few minutes before it is fully operational. The methods delete, insert, patch, and update require the admin role.
*/
export interface Schema$Account {
/**
* List of linked Ads accounts that are active or pending approval. To create a new link request, add a new link with status active to the list. It will remain in a pending state until approved or rejected either in the Ads interface or through the AdWords API. To delete an active link, or to cancel a link request, remove it from the list.
*/
adsLinks?: Schema$AccountAdsLink[];
/**
* Indicates whether the merchant sells adult content.
*/
adultContent?: boolean;
/**
* The business information of the account.
*/
businessInformation?: Schema$AccountBusinessInformation;
/**
* The GMB account which is linked or in the process of being linked with the Merchant Center account.
*/
googleMyBusinessLink?: Schema$AccountGoogleMyBusinessLink;
/**
* Merchant Center account ID.
*/
id?: string;
/**
* Identifies what kind of resource this is. Value: the fixed string "content#account".
*/
kind?: string;
/**
* Display name for the account.
*/
name?: string;
/**
* Client-specific, locally-unique, internal ID for the child account.
*/
sellerId?: string;
/**
* Users with access to the account. Every account (except for subaccounts) must have at least one admin user.
*/
users?: Schema$AccountUser[];
/**
* The merchant's website.
*/
websiteUrl?: string;
/**
* List of linked YouTube channels that are active or pending approval. To create a new link request, add a new link with status active to the list. It will remain in a pending state until approved or rejected in the YT Creator Studio interface. To delete an active link, or to cancel a link request, remove it from the list.
*/
youtubeChannelLinks?: Schema$AccountYouTubeChannelLink[];
}
export interface Schema$AccountAddress {
/**
* CLDR country code (e.g. "US").
*/
country?: string;
/**
* City, town or commune. May also include dependent localities or sublocalities (e.g. neighborhoods or suburbs).
*/
locality?: string;
/**
* Postal code or ZIP (e.g. "94043").
*/
postalCode?: string;
/**
* Top-level administrative subdivision of the country. For example, a state like California ("CA") or a province like Quebec ("QC").
*/
region?: string;
/**
* Street-level part of the address.
*/
streetAddress?: string;
}
export interface Schema$AccountAdsLink {
/**
* Customer ID of the Ads account.
*/
adsId?: string;
/**
* Status of the link between this Merchant Center account and the Ads account. Upon retrieval, it represents the actual status of the link and can be either active if it was approved in Google Ads or pending if it's pending approval. Upon insertion, it represents the intended status of the link. Re-uploading a link with status active when it's still pending or with status pending when it's already active will have no effect: the status will remain unchanged. Re-uploading a link with deprecated status inactive is equivalent to not submitting the link at all and will delete the link if it was active or cancel the link request if it was pending.
*/
status?: string;
}
export interface Schema$AccountBusinessInformation {
/**
* The address of the business.
*/
address?: Schema$AccountAddress;
/**
* The customer service information of the business.
*/
customerService?: Schema$AccountCustomerService;
/**
* The phone number of the business.
*/
phoneNumber?: string;
}
export interface Schema$AccountCustomerService {
/**
* Customer service email.
*/
email?: string;
/**
* Customer service phone number.
*/
phoneNumber?: string;
/**
* Customer service URL.
*/
url?: string;
}
export interface Schema$AccountGoogleMyBusinessLink {
/**
* The GMB email address of which a specific account within a GMB account. A sample account within a GMB account could be a business account with set of locations, managed under the GMB account.
*/
gmbEmail?: string;
/**
* Status of the link between this Merchant Center account and the GMB account.
*/
status?: string;
}
export interface Schema$AccountIdentifier {
/**
* The aggregator ID, set for aggregators and subaccounts (in that case, it represents the aggregator of the subaccount).
*/
aggregatorId?: string;
/**
* The merchant account ID, set for individual accounts and subaccounts.
*/
merchantId?: string;
}
export interface Schema$AccountsAuthInfoResponse {
/**
* The account identifiers corresponding to the authenticated user. - For an individual account: only the merchant ID is defined - For an aggregator: only the aggregator ID is defined - For a subaccount of an MCA: both the merchant ID and the aggregator ID are defined.
*/
accountIdentifiers?: Schema$AccountIdentifier[];
/**
* Identifies what kind of resource this is. Value: the fixed string "content#accountsAuthInfoResponse".
*/
kind?: string;
}
export interface Schema$AccountsClaimWebsiteResponse {
/**
* Identifies what kind of resource this is. Value: the fixed string "content#accountsClaimWebsiteResponse".
*/
kind?: string;
}
export interface Schema$AccountsCustomBatchRequest {
/**
* The request entries to be processed in the batch.
*/
entries?: Schema$AccountsCustomBatchRequestEntry[];
}
/**
* A batch entry encoding a single non-batch accounts request.
*/
export interface Schema$AccountsCustomBatchRequestEntry {
/**
* The account to create or update. Only defined if the method is insert or update.
*/
account?: Schema$Account;
/**
* The ID of the targeted account. Only defined if the method is not insert.
*/
accountId?: string;
/**
* An entry ID, unique within the batch request.
*/
batchId?: number;
/**
* Whether the account should be deleted if the account has offers. Only applicable if the method is delete.
*/
force?: boolean;
/**
* Details about the link request.
*/
linkRequest?: Schema$AccountsCustomBatchRequestEntryLinkRequest;
/**
* The ID of the managing account.
*/
merchantId?: string;
/**
* The method of the batch entry.
*/
method?: string;
/**
* Only applicable if the method is claimwebsite. Indicates whether or not to take the claim from another account in case there is a conflict.
*/
overwrite?: boolean;
}
export interface Schema$AccountsCustomBatchRequestEntryLinkRequest {
/**
* Action to perform for this link. The "request" action is only available to select merchants.
*/
action?: string;
/**
* The ID of the linked account.
*/
linkedAccountId?: string;
/**
* Type of the link between the two accounts.
*/
linkType?: string;
}
export interface Schema$AccountsCustomBatchResponse {
/**
* The result of the execution of the batch requests.
*/
entries?: Schema$AccountsCustomBatchResponseEntry[];
/**
* Identifies what kind of resource this is. Value: the fixed string "content#accountsCustomBatchResponse".
*/
kind?: string;
}
/**
* A batch entry encoding a single non-batch accounts response.
*/
export interface Schema$AccountsCustomBatchResponseEntry {
/**
* The retrieved, created, or updated account. Not defined if the method was delete, claimwebsite or link.
*/
account?: Schema$Account;
/**
* The ID of the request entry this entry responds to.
*/
batchId?: number;
/**
* A list of errors defined if and only if the request failed.
*/
errors?: Schema$Errors;
/**
* Identifies what kind of resource this is. Value: the fixed string "content#accountsCustomBatchResponseEntry".
*/
kind?: string;
}
export interface Schema$AccountsLinkRequest {
/**
* Action to perform for this link. The "request" action is only available to select merchants.
*/
action?: string;
/**
* The ID of the linked account.
*/
linkedAccountId?: string;
/**
* Type of the link between the two accounts.
*/
linkType?: string;
}
export interface Schema$AccountsLinkResponse {
/**
* Identifies what kind of resource this is. Value: the fixed string "content#accountsLinkResponse".
*/
kind?: string;
}
export interface Schema$AccountsListResponse {
/**
* Identifies what kind of resource this is. Value: the fixed string "content#accountsListResponse".
*/
kind?: string;
/**
* The token for the retrieval of the next page of accounts.
*/
nextPageToken?: string;
resources?: Schema$Account[];
}
/**
* The status of an account, i.e., information about its products, which is computed offline and not returned immediately at insertion time.
*/
export interface Schema$AccountStatus {
/**
* The ID of the account for which the status is reported.
*/
accountId?: string;
/**
* A list of account level issues.
*/
accountLevelIssues?: Schema$AccountStatusAccountLevelIssue[];
/**
* Identifies what kind of resource this is. Value: the fixed string "content#accountStatus".
*/
kind?: string;
/**
* List of product-related data by channel, destination, and country. Data in this field may be delayed by up to 30 minutes.
*/
products?: Schema$AccountStatusProducts[];
/**
* Whether the account's website is claimed or not.
*/
websiteClaimed?: boolean;
}
export interface Schema$AccountStatusAccountLevelIssue {
/**
* Country for which this issue is reported.
*/
country?: string;
/**
* The destination the issue applies to.
*/
destination?: string;
/**
* Additional details about the issue.
*/
detail?: string;
/**
* The URL of a web page to help resolving this issue.
*/
documentation?: string;
/**
* Issue identifier.
*/
id?: string;
/**
* Severity of the issue.
*/
severity?: string;
/**
* Short description of the issue.
*/
title?: string;
}
export interface Schema$AccountstatusesCustomBatchRequest {
/**
* The request entries to be processed in the batch.
*/
entries?: Schema$AccountstatusesCustomBatchRequestEntry[];
}
/**
* A batch entry encoding a single non-batch accountstatuses request.
*/
export interface Schema$AccountstatusesCustomBatchRequestEntry {
/**
* The ID of the (sub-)account whose status to get.
*/
accountId?: string;
/**
* An entry ID, unique within the batch request.
*/
batchId?: number;
/**
* If set, only issues for the specified destinations are returned, otherwise only issues for the Shopping destination.
*/
destinations?: string[];
/**
* The ID of the managing account.
*/
merchantId?: string;
/**
* The method (get).
*/
method?: string;
}
export interface Schema$AccountstatusesCustomBatchResponse {
/**
* The result of the execution of the batch requests.
*/
entries?: Schema$AccountstatusesCustomBatchResponseEntry[];
/**
* Identifies what kind of resource this is. Value: the fixed string "content#accountstatusesCustomBatchResponse".
*/
kind?: string;
}
/**
* A batch entry encoding a single non-batch accountstatuses response.
*/
export interface Schema$AccountstatusesCustomBatchResponseEntry {
/**
* The requested account status. Defined if and only if the request was successful.
*/
accountStatus?: Schema$AccountStatus;
/**
* The ID of the request entry this entry responds to.
*/
batchId?: number;
/**
* A list of errors defined if and only if the request failed.
*/
errors?: Schema$Errors;
}
export interface Schema$AccountstatusesListResponse {
/**
* Identifies what kind of resource this is. Value: the fixed string "content#accountstatusesListResponse".
*/
kind?: string;
/**
* The token for the retrieval of the next page of account statuses.
*/
nextPageToken?: string;
resources?: Schema$AccountStatus[];
}
export interface Schema$AccountStatusItemLevelIssue {
/**
* The attribute's name, if the issue is caused by a single attribute.
*/
attributeName?: string;
/**
* The error code of the issue.
*/
code?: string;
/**
* A short issue description in English.
*/
description?: string;
/**
* A detailed issue description in English.
*/
detail?: string;
/**
* The URL of a web page to help with resolving this issue.
*/
documentation?: string;
/**
* Number of items with this issue.
*/
numItems?: string;
/**
* Whether the issue can be resolved by the merchant.
*/
resolution?: string;
/**
* How this issue affects serving of the offer.
*/
servability?: string;
}
export interface Schema$AccountStatusProducts {
/**
* The channel the data applies to.
*/
channel?: string;
/**
* The country the data applies to.
*/
country?: string;
/**
* The destination the data applies to.
*/
destination?: string;
/**
* List of item-level issues.
*/
itemLevelIssues?: Schema$AccountStatusItemLevelIssue[];
/**
* Aggregated product statistics.
*/
statistics?: Schema$AccountStatusStatistics;
}
export interface Schema$AccountStatusStatistics {
/**
* Number of active offers.
*/
active?: string;
/**
* Number of disapproved offers.
*/
disapproved?: string;
/**
* Number of expiring offers.
*/
expiring?: string;
/**
* Number of pending offers.
*/
pending?: string;
}
/**
* The tax settings of a merchant account. All methods require the admin role.
*/
export interface Schema$AccountTax {
/**
* The ID of the account to which these account tax settings belong.
*/
accountId?: string;
/**
* Identifies what kind of resource this is. Value: the fixed string "content#accountTax".
*/
kind?: string;
/**
* Tax rules. Updating the tax rules will enable US taxes (not reversible). Defining no rules is equivalent to not charging tax at all.
*/
rules?: Schema$AccountTaxTaxRule[];
}
export interface Schema$AccounttaxCustomBatchRequest {
/**
* The request entries to be processed in the batch.
*/
entries?: Schema$AccounttaxCustomBatchRequestEntry[];
}
/**
* A batch entry encoding a single non-batch accounttax request.
*/
export interface Schema$AccounttaxCustomBatchRequestEntry {
/**
* The ID of the account for which to get/update account tax settings.
*/
accountId?: string;
/**
* The account tax settings to update. Only defined if the method is update.
*/
accountTax?: Schema$AccountTax;
/**
* An entry ID, unique within the batch request.
*/
batchId?: number;
/**
* The ID of the managing account.
*/
merchantId?: string;
method?: string;
}
export interface Schema$AccounttaxCustomBatchResponse {
/**
* The result of the execution of the batch requests.
*/
entries?: Schema$AccounttaxCustomBatchResponseEntry[];
/**
* Identifies what kind of resource this is. Value: the fixed string "content#accounttaxCustomBatchResponse".
*/
kind?: string;
}
/**
* A batch entry encoding a single non-batch accounttax response.
*/
export interface Schema$AccounttaxCustomBatchResponseEntry {
/**
* The retrieved or updated account tax settings.
*/
accountTax?: Schema$AccountTax;
/**
* The ID of the request entry this entry responds to.
*/
batchId?: number;
/**
* A list of errors defined if and only if the request failed.
*/
errors?: Schema$Errors;
/**
* Identifies what kind of resource this is. Value: the fixed string "content#accounttaxCustomBatchResponseEntry".
*/
kind?: string;
}
export interface Schema$AccounttaxListResponse {
/**
* Identifies what kind of resource this is. Value: the fixed string "content#accounttaxListResponse".
*/
kind?: string;
/**
* The token for the retrieval of the next page of account tax settings.
*/
nextPageToken?: string;
resources?: Schema$AccountTax[];
}
/**
* Tax calculation rule to apply in a state or province (USA only).
*/
export interface Schema$AccountTaxTaxRule {
/**
* Country code in which tax is applicable.
*/
country?: string;
/**
* State (or province) is which the tax is applicable, described by its location ID (also called criteria ID).
*/
locationId?: string;
/**
* Explicit tax rate in percent, represented as a floating point number without the percentage character. Must not be negative.
*/
ratePercent?: string;
/**
* If true, shipping charges are also taxed.
*/
shippingTaxed?: boolean;
/**
* Whether the tax rate is taken from a global tax table or specified explicitly.
*/
useGlobalRate?: boolean;
}
export interface Schema$AccountUser {
/**
* Whether user is an admin.
*/
admin?: boolean;
/**
* User's email address.
*/
emailAddress?: string;
/**
* Whether user is an order manager.
*/
orderManager?: boolean;
/**
* Whether user can access payment statements.
*/
paymentsAnalyst?: boolean;
/**
* Whether user can manage payment settings.
*/
paymentsManager?: boolean;
}
export interface Schema$AccountYouTubeChannelLink {
/**
* Channel ID.
*/
channelId?: string;
/**
* Status of the link between this Merchant Center account and the YouTube channel. Upon retrieval, it represents the actual status of the link and can be either active if it was approved in YT Creator Studio or pending if it's pending approval. Upon insertion, it represents the intended status of the link. Re-uploading a link with status active when it's still pending or with status pending when it's already active will have no effect: the status will remain unchanged. Re-uploading a link with deprecated status inactive is equivalent to not submitting the link at all and will delete the link if it was active or cancel the link request if it was pending.
*/
status?: string;
}
export interface Schema$Amount {
/**
* [required] The pre-tax or post-tax price depending on the location of the order.
*/
priceAmount?: Schema$Price;
/**
* [required] Tax value.
*/
taxAmount?: Schema$Price;
}
export interface Schema$BusinessDayConfig {
/**
* Regular business days. May not be empty.
*/
businessDays?: string[];
}
export interface Schema$CarrierRate {
/**
* Carrier service, such as "UPS" or "Fedex". The list of supported carriers can be retrieved via the getSupportedCarriers method. Required.
*/
carrierName?: string;
/**
* Carrier service, such as "ground" or "2 days". The list of supported services for a carrier can be retrieved via the getSupportedCarriers method. Required.
*/
carrierService?: string;
/**
* Additive shipping rate modifier. Can be negative. For example { "value": "1", "currency" : "USD" } adds $1 to the rate, { "value": "-3", "currency" : "USD" } removes $3 from the rate. Optional.
*/
flatAdjustment?: Schema$Price;
/**
* Name of the carrier rate. Must be unique per rate group. Required.
*/
name?: string;
/**
* Shipping origin for this carrier rate. Required.
*/
originPostalCode?: string;
/**
* Multiplicative shipping rate modifier as a number in decimal notation. Can be negative. For example "5.4" increases the rate by 5.4%, "-3" decreases the rate by 3%. Optional.
*/
percentageAdjustment?: string;
}
export interface Schema$CarriersCarrier {
/**
* The CLDR country code of the carrier (e.g., "US"). Always present.
*/
country?: string;
/**
* The name of the carrier (e.g., "UPS"). Always present.
*/
name?: string;
/**
* A list of supported services (e.g., "ground") for that carrier. Contains at least one service.
*/
services?: string[];
}
export interface Schema$CustomAttribute {
/**
* Subattributes within this attribute group. Exactly one of value or groupValues must be provided.
*/
groupValues?: Schema$CustomAttribute[];
/**
* The name of the attribute. Underscores will be replaced by spaces upon insertion.
*/
name?: string;
/**
* The value of the attribute.
*/
value?: string;
}
export interface Schema$CustomerReturnReason {
description?: string;
reasonCode?: string;
}
export interface Schema$CutoffTime {
/**
* Hour of the cutoff time until which an order has to be placed to be processed in the same day. Required.
*/
hour?: number;
/**
* Minute of the cutoff time until which an order has to be placed to be processed in the same day. Required.
*/
minute?: number;
/**
* Timezone identifier for the cutoff time. A list of identifiers can be found in the AdWords API documentation. E.g. "Europe/Zurich". Required.
*/
timezone?: string;
}
/**
* Datafeed configuration data.
*/
export interface Schema$Datafeed {
/**
* The two-letter ISO 639-1 language in which the attributes are defined in the data feed.
*/
attributeLanguage?: string;
/**
* The type of data feed. For product inventory feeds, only feeds for local stores, not online stores, are supported.
*/
contentType?: string;
/**
* Fetch schedule for the feed file.
*/
fetchSchedule?: Schema$DatafeedFetchSchedule;
/**
* The filename of the feed. All feeds must have a unique file name.
*/
fileName?: string;
/**
* Format of the feed file.
*/
format?: Schema$DatafeedFormat;
/**
* The ID of the data feed.
*/
id?: string;
/**
* Identifies what kind of resource this is. Value: the fixed string "content#datafeed".
*/
kind?: string;
/**
* A descriptive name of the data feed.
*/
name?: string;
/**
* The targets this feed should apply to (country, language, destinations).
*/
targets?: Schema$DatafeedTarget[];
}
/**
* The required fields vary based on the frequency of fetching. For a monthly fetch schedule, day_of_month and hour are required. For a weekly fetch schedule, weekday and hour are required. For a daily fetch schedule, only hour is required.
*/
export interface Schema$DatafeedFetchSchedule {
/**
* The day of the month the feed file should be fetched (1-31).
*/
dayOfMonth?: number;
/**
* The URL where the feed file can be fetched. Google Merchant Center will support automatic scheduled uploads using the HTTP, HTTPS, FTP, or SFTP protocols, so the value will need to be a valid link using one of those four protocols.
*/
fetchUrl?: string;
/**
* The hour of the day the feed file should be fetched (0-23).
*/
hour?: number;
/**
* The minute of the hour the feed file should be fetched (0-59). Read-only.
*/
minuteOfHour?: number;
/**
* An optional password for fetch_url.
*/
password?: string;
/**
* Whether the scheduled fetch is paused or not.
*/
paused?: boolean;
/**
* Time zone used for schedule. UTC by default. E.g., "America/Los_Angeles".
*/
timeZone?: string;
/**
* An optional user name for fetch_url.
*/
username?: string;
/**
* The day of the week the feed file should be fetched.
*/
weekday?: string;
}
export interface Schema$DatafeedFormat {
/**
* Delimiter for the separation of values in a delimiter-separated values feed. If not specified, the delimiter will be auto-detected. Ignored for non-DSV data feeds.
*/
columnDelimiter?: string;
/**
* Character encoding scheme of the data feed. If not specified, the encoding will be auto-detected.
*/
fileEncoding?: string;
/**
* Specifies how double quotes are interpreted. If not specified, the mode will be auto-detected. Ignored for non-DSV data feeds.
*/
quotingMode?: string;
}
export interface Schema$DatafeedsCustomBatchRequest {
/**
* The request entries to be processed in the batch.
*/
entries?: Schema$DatafeedsCustomBatchRequestEntry[];
}
/**
* A batch entry encoding a single non-batch datafeeds request.
*/
export interface Schema$DatafeedsCustomBatchRequestEntry {
/**
* An entry ID, unique within the batch request.
*/
batchId?: number;
/**
* The data feed to insert.
*/
datafeed?: Schema$Datafeed;
/**
* The ID of the data feed to get, delete or fetch.
*/
datafeedId?: string;
/**
* The ID of the managing account.
*/
merchantId?: string;
method?: string;
}
export interface Schema$DatafeedsCustomBatchResponse {
/**
* The result of the execution of the batch requests.
*/
entries?: Schema$DatafeedsCustomBatchResponseEntry[];
/**
* Identifies what kind of resource this is. Value: the fixed string "content#datafeedsCustomBatchResponse".
*/
kind?: string;
}
/**
* A batch entry encoding a single non-batch datafeeds response.
*/
export interface Schema$DatafeedsCustomBatchResponseEntry {
/**
* The ID of the request entry this entry responds to.
*/
batchId?: number;
/**
* The requested data feed. Defined if and only if the request was successful.
*/
datafeed?: Schema$Datafeed;
/**
* A list of errors defined if and only if the request failed.
*/
errors?: Schema$Errors;
}
export interface Schema$DatafeedsFetchNowResponse {
/**
* Identifies what kind of resource this is. Value: the fixed string "content#datafeedsFetchNowResponse".
*/
kind?: string;
}
export interface Schema$DatafeedsListResponse {
/**
* Identifies what kind of resource this is. Value: the fixed string "content#datafeedsListResponse".
*/
kind?: string;
/**
* The token for the retrieval of the next page of datafeeds.
*/
nextPageToken?: string;
resources?: Schema$Datafeed[];
}
/**
* The status of a datafeed, i.e., the result of the last retrieval of the datafeed computed asynchronously when the feed processing is finished.
*/
export interface Schema$DatafeedStatus {
/**
* The country for which the status is reported, represented as a CLDR territory code.
*/