/
v2.ts
6734 lines (6289 loc) · 240 KB
/
v2.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 {GaxiosPromise} from 'gaxios';
import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library';
import {APIRequestContext, BodyResponseCallback, createAPIRequest, GlobalOptions, GoogleConfigurable, MethodOptions} from 'googleapis-common';
// tslint:disable: no-any
// tslint:disable: class-name
// tslint:disable: variable-name
// tslint:disable: jsdoc-format
// tslint:disable: no-namespace
export namespace androidpublisher_v2 {
export interface Options extends GlobalOptions {
version: 'v2';
}
let context: APIRequestContext;
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;
}
/**
* Google Play Developer API
*
* Accesses Android application developers' Google Play accounts.
*
* @example
* const {google} = require('googleapis');
* const androidpublisher = google.androidpublisher('v2');
*
* @namespace androidpublisher
* @type {Function}
* @version v2
* @variation v2
* @param {object=} options Options for Androidpublisher
*/
export class Androidpublisher {
edits: Resource$Edits;
inappproducts: Resource$Inappproducts;
orders: Resource$Orders;
purchases: Resource$Purchases;
reviews: Resource$Reviews;
constructor(options: GlobalOptions, google?: GoogleConfigurable) {
context = {_options: options || {}, google};
this.edits = new Resource$Edits();
this.inappproducts = new Resource$Inappproducts();
this.orders = new Resource$Orders();
this.purchases = new Resource$Purchases();
this.reviews = new Resource$Reviews();
}
}
export interface Schema$Apk {
/**
* Information about the binary payload of this APK.
*/
binary?: Schema$ApkBinary;
/**
* The version code of the APK, as specified in the APK's manifest file.
*/
versionCode?: number;
}
/**
* Represents the binary payload of an APK.
*/
export interface Schema$ApkBinary {
/**
* A sha1 hash of the APK payload, encoded as a hex string and matching the
* output of the sha1sum command.
*/
sha1?: string;
/**
* A sha256 hash of the APK payload, encoded as a hex string and matching
* the output of the sha256sum command.
*/
sha256?: string;
}
export interface Schema$ApkListing {
/**
* The language code, in BCP 47 format (eg "en-US").
*/
language?: string;
/**
* Describe what's new in your APK.
*/
recentChanges?: string;
}
export interface Schema$ApkListingsListResponse {
/**
* Identifies what kind of resource this is. Value: the fixed string
* "androidpublisher#apkListingsListResponse".
*/
kind?: string;
listings?: Schema$ApkListing[];
}
export interface Schema$ApksAddExternallyHostedRequest {
/**
* The definition of the externally-hosted APK and where it is located.
*/
externallyHostedApk?: Schema$ExternallyHostedApk;
}
export interface Schema$ApksAddExternallyHostedResponse {
/**
* The definition of the externally-hosted APK and where it is located.
*/
externallyHostedApk?: Schema$ExternallyHostedApk;
}
export interface Schema$ApksListResponse {
apks?: Schema$Apk[];
/**
* Identifies what kind of resource this is. Value: the fixed string
* "androidpublisher#apksListResponse".
*/
kind?: string;
}
export interface Schema$AppDetails {
/**
* The user-visible support email for this app.
*/
contactEmail?: string;
/**
* The user-visible support telephone number for this app.
*/
contactPhone?: string;
/**
* The user-visible website for this app.
*/
contactWebsite?: string;
/**
* Default language code, in BCP 47 format (eg "en-US").
*/
defaultLanguage?: string;
}
/**
* Represents an edit of an app. An edit allows clients to make multiple
* changes before committing them in one operation.
*/
export interface Schema$AppEdit {
/**
* The time at which the edit will expire and will be no longer valid for
* use in any subsequent API calls (encoded as seconds since the Epoch).
*/
expiryTimeSeconds?: string;
/**
* The ID of the edit that can be used in subsequent API calls.
*/
id?: string;
}
export interface Schema$Bundle {
/**
* A sha1 hash of the upload payload, encoded as a hex string and matching
* the output of the sha1sum command.
*/
sha1?: string;
/**
* A sha256 hash of the upload payload, encoded as a hex string and matching
* the output of the sha256sum command.
*/
sha256?: string;
/**
* The version code of the Android App Bundle. As specified in the Android
* App Bundle's base module APK manifest file.
*/
versionCode?: number;
}
export interface Schema$BundlesListResponse {
bundles?: Schema$Bundle[];
/**
* Identifies what kind of resource this is. Value: the fixed string
* "androidpublisher#bundlesListResponse".
*/
kind?: string;
}
export interface Schema$Comment {
/**
* A comment from a developer.
*/
developerComment?: Schema$DeveloperComment;
/**
* A comment from a user.
*/
userComment?: Schema$UserComment;
}
/**
* Represents a deobfuscation file.
*/
export interface Schema$DeobfuscationFile {
/**
* The type of the deobfuscation file.
*/
symbolType?: string;
}
export interface Schema$DeobfuscationFilesUploadResponse {
deobfuscationFile?: Schema$DeobfuscationFile;
}
export interface Schema$DeveloperComment {
/**
* The last time at which this comment was updated.
*/
lastModified?: Schema$Timestamp;
/**
* The content of the comment, i.e. reply body.
*/
text?: string;
}
export interface Schema$DeviceMetadata {
/**
* Device CPU make e.g. "Qualcomm"
*/
cpuMake?: string;
/**
* Device CPU model e.g. "MSM8974"
*/
cpuModel?: string;
/**
* Device class (e.g. tablet)
*/
deviceClass?: string;
/**
* OpenGL version
*/
glEsVersion?: number;
/**
* Device manufacturer (e.g. Motorola)
*/
manufacturer?: string;
/**
* Comma separated list of native platforms (e.g. "arm",
* "arm7")
*/
nativePlatform?: string;
/**
* Device model name (e.g. Droid)
*/
productName?: string;
/**
* Device RAM in Megabytes e.g. "2048"
*/
ramMb?: number;
/**
* Screen density in DPI
*/
screenDensityDpi?: number;
/**
* Screen height in pixels
*/
screenHeightPx?: number;
/**
* Screen width in pixels
*/
screenWidthPx?: number;
}
export interface Schema$ExpansionFile {
/**
* If set this field indicates that this APK has an Expansion File uploaded
* to it: this APK does not reference another APK's Expansion File. The
* field's value is the size of the uploaded Expansion File in bytes.
*/
fileSize?: string;
/**
* If set this APK's Expansion File references another APK's
* Expansion File. The file_size field will not be set.
*/
referencesVersion?: number;
}
export interface Schema$ExpansionFilesUploadResponse {
expansionFile?: Schema$ExpansionFile;
}
/**
* Defines an APK available for this application that is hosted externally and
* not uploaded to Google Play. This function is only available to enterprises
* who are using Google Play for Work, and whos application is restricted to
* the enterprise private channel
*/
export interface Schema$ExternallyHostedApk {
/**
* The application label.
*/
applicationLabel?: string;
/**
* A certificate (or array of certificates if a certificate-chain is used)
* used to signed this APK, represented as a base64 encoded byte array.
*/
certificateBase64s?: string[];
/**
* The URL at which the APK is hosted. This must be an https URL.
*/
externallyHostedUrl?: string;
/**
* The SHA1 checksum of this APK, represented as a base64 encoded byte
* array.
*/
fileSha1Base64?: string;
/**
* The SHA256 checksum of this APK, represented as a base64 encoded byte
* array.
*/
fileSha256Base64?: string;
/**
* The file size in bytes of this APK.
*/
fileSize?: string;
/**
* The icon image from the APK, as a base64 encoded byte array.
*/
iconBase64?: string;
/**
* The maximum SDK supported by this APK (optional).
*/
maximumSdk?: number;
/**
* The minimum SDK targeted by this APK.
*/
minimumSdk?: number;
/**
* The native code environments supported by this APK (optional).
*/
nativeCodes?: string[];
/**
* The package name.
*/
packageName?: string;
/**
* The features required by this APK (optional).
*/
usesFeatures?: string[];
/**
* The permissions requested by this APK.
*/
usesPermissions?: Schema$ExternallyHostedApkUsesPermission[];
/**
* The version code of this APK.
*/
versionCode?: number;
/**
* The version name of this APK.
*/
versionName?: string;
}
/**
* A permission used by this APK.
*/
export interface Schema$ExternallyHostedApkUsesPermission {
/**
* Optionally, the maximum SDK version for which the permission is required.
*/
maxSdkVersion?: number;
/**
* The name of the permission requested.
*/
name?: string;
}
export interface Schema$Image {
/**
* A unique id representing this image.
*/
id?: string;
/**
* A sha1 hash of the image that was uploaded.
*/
sha1?: string;
/**
* A URL that will serve a preview of the image.
*/
url?: string;
}
export interface Schema$ImagesDeleteAllResponse {
deleted?: Schema$Image[];
}
export interface Schema$ImagesListResponse {
images?: Schema$Image[];
}
export interface Schema$ImagesUploadResponse {
image?: Schema$Image;
}
export interface Schema$InAppProduct {
/**
* The default language of the localized data, as defined by BCP 47. e.g.
* "en-US", "en-GB".
*/
defaultLanguage?: string;
/**
* Default price cannot be zero. In-app products can never be free. Default
* price is always in the developer's Checkout merchant currency.
*/
defaultPrice?: Schema$Price;
/**
* Grace period of the subscription, specified in ISO 8601 format. It will
* allow developers to give their subscribers a grace period when the
* payment for the new recurrence period is declined. Acceptable values =
* "P3D" (three days) and "P7D" (seven days)
*/
gracePeriod?: string;
/**
* List of localized title and description data.
*/
listings?: {[key: string]: Schema$InAppProductListing;};
/**
* The package name of the parent app.
*/
packageName?: string;
/**
* Prices per buyer region. None of these prices should be zero. In-app
* products can never be free.
*/
prices?: {[key: string]: Schema$Price;};
/**
* Purchase type enum value. Unmodifiable after creation.
*/
purchaseType?: string;
/**
* Definition of a season for a seasonal subscription. Can be defined only
* for yearly subscriptions.
*/
season?: Schema$Season;
/**
* The stock-keeping-unit (SKU) of the product, unique within an app.
*/
sku?: string;
status?: string;
/**
* Subscription period, specified in ISO 8601 format. Acceptable values are
* "P1W" (one week), "P1M" (one month), "P3M"
* (three months), "P6M" (six months), and "P1Y" (one
* year).
*/
subscriptionPeriod?: string;
/**
* Trial period, specified in ISO 8601 format. Acceptable values are
* anything between "P7D" (seven days) and "P999D" (999
* days). Seasonal subscriptions cannot have a trial period.
*/
trialPeriod?: string;
}
export interface Schema$InAppProductListing {
description?: string;
title?: string;
}
export interface Schema$InappproductsListResponse {
inappproduct?: Schema$InAppProduct[];
/**
* Identifies what kind of resource this is. Value: the fixed string
* "androidpublisher#inappproductsListResponse".
*/
kind?: string;
pageInfo?: Schema$PageInfo;
tokenPagination?: Schema$TokenPagination;
}
export interface Schema$Listing {
/**
* Full description of the app; this may be up to 4000 characters in length.
*/
fullDescription?: string;
/**
* Language localization code (for example, "de-AT" for Austrian
* German).
*/
language?: string;
/**
* Short description of the app (previously known as promo text); this may
* be up to 80 characters in length.
*/
shortDescription?: string;
/**
* App's localized title.
*/
title?: string;
/**
* URL of a promotional YouTube video for the app.
*/
video?: string;
}
export interface Schema$ListingsListResponse {
/**
* Identifies what kind of resource this is. Value: the fixed string
* "androidpublisher#listingsListResponse".
*/
kind?: string;
listings?: Schema$Listing[];
}
export interface Schema$MonthDay {
/**
* Day of a month, value in [1, 31] range. Valid range depends on the
* specified month.
*/
day?: number;
/**
* Month of a year. e.g. 1 = JAN, 2 = FEB etc.
*/
month?: number;
}
export interface Schema$PageInfo {
resultPerPage?: number;
startIndex?: number;
totalResults?: number;
}
export interface Schema$Price {
/**
* 3 letter Currency code, as defined by ISO 4217.
*/
currency?: string;
/**
* The price in millionths of the currency base unit represented as a
* string.
*/
priceMicros?: string;
}
/**
* A ProductPurchase resource indicates the status of a user's inapp
* product purchase.
*/
export interface Schema$ProductPurchase {
/**
* The consumption state of the inapp product. Possible values are: - Yet
* to be consumed - Consumed
*/
consumptionState?: number;
/**
* A developer-specified string that contains supplemental information about
* an order.
*/
developerPayload?: string;
/**
* This kind represents an inappPurchase object in the androidpublisher
* service.
*/
kind?: string;
/**
* The order id associated with the purchase of the inapp product.
*/
orderId?: string;
/**
* The purchase state of the order. Possible values are: - Purchased -
* Canceled
*/
purchaseState?: number;
/**
* The time the product was purchased, in milliseconds since the epoch (Jan
* 1, 1970).
*/
purchaseTimeMillis?: string;
/**
* The type of purchase of the inapp product. This field is only set if this
* purchase was not made using the standard in-app billing flow. Possible
* values are: - Test (i.e. purchased from a license testing account) -
* Promo (i.e. purchased using a promo code) - Rewarded (i.e. from watching
* a video ad instead of paying)
*/
purchaseType?: number;
}
export interface Schema$Prorate {
/**
* Default price cannot be zero and must be less than the full subscription
* price. Default price is always in the developer's Checkout merchant
* currency. Targeted countries have their prices set automatically based on
* the default_price.
*/
defaultPrice?: Schema$Price;
/**
* Defines the first day on which the price takes effect.
*/
start?: Schema$MonthDay;
}
export interface Schema$Review {
/**
* The name of the user who wrote the review.
*/
authorName?: string;
/**
* A repeated field containing comments for the review.
*/
comments?: Schema$Comment[];
/**
* Unique identifier for this review.
*/
reviewId?: string;
}
export interface Schema$ReviewReplyResult {
/**
* The time at which the reply took effect.
*/
lastEdited?: Schema$Timestamp;
/**
* The reply text that was applied.
*/
replyText?: string;
}
export interface Schema$ReviewsListResponse {
pageInfo?: Schema$PageInfo;
reviews?: Schema$Review[];
tokenPagination?: Schema$TokenPagination;
}
export interface Schema$ReviewsReplyRequest {
/**
* The text to set as the reply. Replies of more than approximately 350
* characters will be rejected. HTML tags will be stripped.
*/
replyText?: string;
}
export interface Schema$ReviewsReplyResponse {
result?: Schema$ReviewReplyResult;
}
export interface Schema$Season {
/**
* Inclusive end date of the recurrence period.
*/
end?: Schema$MonthDay;
/**
* Optionally present list of prorations for the season. Each proration is a
* one-off discounted entry into a subscription. Each proration contains the
* first date on which the discount is available and the new pricing
* information.
*/
prorations?: Schema$Prorate[];
/**
* Inclusive start date of the recurrence period.
*/
start?: Schema$MonthDay;
}
/**
* Information provided by the user when they complete the subscription
* cancellation flow (cancellation reason survey).
*/
export interface Schema$SubscriptionCancelSurveyResult {
/**
* The cancellation reason the user chose in the survey. Possible values
* are: - Other - I don't use this service enough - Technical issues
* - Cost-related reasons - I found a better app
*/
cancelSurveyReason?: number;
/**
* The customized input cancel reason from the user. Only present when
* cancelReason is 0.
*/
userInputCancelReason?: string;
}
/**
* A SubscriptionDeferralInfo contains the data needed to defer a subscription
* purchase to a future expiry time.
*/
export interface Schema$SubscriptionDeferralInfo {
/**
* The desired next expiry time to assign to the subscription, in
* milliseconds since the Epoch. The given time must be later/greater than
* the current expiry time for the subscription.
*/
desiredExpiryTimeMillis?: string;
/**
* The expected expiry time for the subscription. If the current expiry time
* for the subscription is not the value specified here, the deferral will
* not occur.
*/
expectedExpiryTimeMillis?: string;
}
/**
* Contains the price change information for a subscription that can be used
* to control the user journey for the price change in the app. This can be in
* the form of seeking confirmation from the user or tailoring the experience
* for a successful conversion.
*/
export interface Schema$SubscriptionPriceChange {
/**
* The new price the subscription will renew with if the price change is
* accepted by the user.
*/
newPrice?: Schema$Price;
/**
* The current state of the price change. Possible values are: -
* Outstanding: State for a pending price change waiting for the user to
* agree. In this state, you can optionally seek confirmation from the user
* using the In-App API. - Accepted: State for an accepted price change
* that the subscription will renew with unless it's canceled. The price
* change takes effect on a future date when the subscription renews. Note
* that the change might not occur when the subscription is renewed next.
*/
state?: number;
}
/**
* A SubscriptionPurchase resource indicates the status of a user's
* subscription purchase.
*/
export interface Schema$SubscriptionPurchase {
/**
* Whether the subscription will automatically be renewed when it reaches
* its current expiry time.
*/
autoRenewing?: boolean;
/**
* The reason why a subscription was canceled or is not auto-renewing.
* Possible values are: - User canceled the subscription - Subscription
* was canceled by the system, for example because of a billing problem -
* Subscription was replaced with a new subscription - Subscription was
* canceled by the developer
*/
cancelReason?: number;
/**
* Information provided by the user when they complete the subscription
* cancellation flow (cancellation reason survey).
*/
cancelSurveyResult?: Schema$SubscriptionCancelSurveyResult;
/**
* ISO 3166-1 alpha-2 billing country/region code of the user at the time
* the subscription was granted.
*/
countryCode?: string;
/**
* A developer-specified string that contains supplemental information about
* an order.
*/
developerPayload?: string;
/**
* The email address of the user when the subscription was purchased. Only
* present for purchases made with 'Subscribe with Google'.
*/
emailAddress?: string;
/**
* Time at which the subscription will expire, in milliseconds since the
* Epoch.
*/
expiryTimeMillis?: string;
/**
* The family name of the user when the subscription was purchased. Only
* present for purchases made with 'Subscribe with Google'.
*/
familyName?: string;
/**
* The given name of the user when the subscription was purchased. Only
* present for purchases made with 'Subscribe with Google'.
*/
givenName?: string;
/**
* This kind represents a subscriptionPurchase object in the
* androidpublisher service.
*/
kind?: string;
/**
* The purchase token of the originating purchase if this subscription is
* one of the following: - Re-signup of a canceled but non-lapsed
* subscription - Upgrade/downgrade from a previous subscription For
* example, suppose a user originally signs up and you receive purchase
* token X, then the user cancels and goes through the resignup flow (before
* their subscription lapses) and you receive purchase token Y, and finally
* the user upgrades their subscription and you receive purchase token Z. If
* you call this API with purchase token Z, this field will be set to Y. If
* you call this API with purchase token Y, this field will be set to X. If
* you call this API with purchase token X, this field will not be set.
*/
linkedPurchaseToken?: string;
/**
* The order id of the latest recurring order associated with the purchase
* of the subscription.
*/
orderId?: string;
/**
* The payment state of the subscription. Possible values are: - Payment
* pending - Payment received - Free trial - Pending deferred
* upgrade/downgrade
*/
paymentState?: number;
/**
* Price of the subscription, not including tax. Price is expressed in
* micro-units, where 1,000,000 micro-units represents one unit of the
* currency. For example, if the subscription price is €1.99,
* price_amount_micros is 1990000.
*/
priceAmountMicros?: string;
/**
* The latest price change information available. This is present only when
* there is an upcoming price change for the subscription yet to be applied.
* Once the subscription renews with the new price or the subscription is
* canceled, no price change information will be returned.
*/
priceChange?: Schema$SubscriptionPriceChange;
/**
* ISO 4217 currency code for the subscription price. For example, if the
* price is specified in British pounds sterling, price_currency_code is
* "GBP".
*/
priceCurrencyCode?: string;
/**
* The profile id of the user when the subscription was purchased. Only
* present for purchases made with 'Subscribe with Google'.
*/
profileId?: string;
/**
* The profile name of the user when the subscription was purchased. Only
* present for purchases made with 'Subscribe with Google'.
*/
profileName?: string;
/**
* The type of purchase of the subscription. This field is only set if this
* purchase was not made using the standard in-app billing flow. Possible
* values are: - Test (i.e. purchased from a license testing account)
*/
purchaseType?: number;
/**
* Time at which the subscription was granted, in milliseconds since the
* Epoch.
*/
startTimeMillis?: string;
/**
* The time at which the subscription was canceled by the user, in
* milliseconds since the epoch. Only present if cancelReason is 0.
*/
userCancellationTimeMillis?: string;
}
export interface Schema$SubscriptionPurchasesDeferRequest {
/**
* The information about the new desired expiry time for the subscription.
*/
deferralInfo?: Schema$SubscriptionDeferralInfo;
}
export interface Schema$SubscriptionPurchasesDeferResponse {
/**
* The new expiry time for the subscription in milliseconds since the Epoch.
*/
newExpiryTimeMillis?: string;
}
export interface Schema$Testers {
googleGroups?: string[];
googlePlusCommunities?: string[];
}
export interface Schema$Timestamp {
nanos?: number;
seconds?: string;
}
export interface Schema$TokenPagination {
nextPageToken?: string;
previousPageToken?: string;
}
export interface Schema$Track {
/**
* Identifier for this track.
*/
track?: string;
userFraction?: number;
/**
* Version codes to make active on this track. Note that this list should
* contain all versions you wish to be active, including those you wish to
* retain from previous releases.
*/
versionCodes?: number[];
}
export interface Schema$TracksListResponse {
/**
* Identifies what kind of resource this is. Value: the fixed string
* "androidpublisher#tracksListResponse".
*/
kind?: string;
tracks?: Schema$Track[];
}
export interface Schema$UserComment {
/**
* Integer Android SDK version of the user's device at the time the
* review was written, e.g. 23 is Marshmallow. May be absent.
*/
androidOsVersion?: number;
/**
* Integer version code of the app as installed at the time the review was
* written. May be absent.
*/
appVersionCode?: number;
/**
* String version name of the app as installed at the time the review was
* written. May be absent.
*/
appVersionName?: string;
/**
* Codename for the reviewer's device, e.g. klte, flounder. May be
* absent.
*/
device?: string;
/**
* Some information about the characteristics of the user's device
*/
deviceMetadata?: Schema$DeviceMetadata;
/**
* The last time at which this comment was updated.
*/
lastModified?: Schema$Timestamp;
/**
* Untranslated text of the review, in the case where the review has been
* translated. If the review has not been translated this is left blank.
*/
originalText?: string;
/**
* Language code for the reviewer. This is taken from the device settings so
* is not guaranteed to match the language the review is written in. May be
* absent.
*/
reviewerLanguage?: string;
/**
* The star rating associated with the review, from 1 to 5.
*/
starRating?: number;
/**
* The content of the comment, i.e. review body. In some cases users have
* been able to write a review with separate title and body; in those cases
* the title and body are concatenated and separated by a tab character.
*/
text?: string;
/**
* Number of users who have given this review a thumbs down
*/
thumbsDownCount?: number;
/**
* Number of users who have given this review a thumbs up
*/
thumbsUpCount?: number;
}
/**
* A VoidedPurchase resource indicates a purchase that was either
* canceled/refunded/charged-back.
*/
export interface Schema$VoidedPurchase {
/**
* This kind represents a voided purchase object in the androidpublisher
* service.
*/
kind?: string;
/**
* The time at which the purchase was made, in milliseconds since the epoch
* (Jan 1, 1970).
*/
purchaseTimeMillis?: string;
/**
* The token that was generated when a purchase was made. This uniquely
* identifies a purchase.
*/
purchaseToken?: string;
/**
* The time at which the purchase was canceled/refunded/charged-back, in
* milliseconds since the epoch (Jan 1, 1970).
*/
voidedTimeMillis?: string;
}
export interface Schema$VoidedPurchasesListResponse {
pageInfo?: Schema$PageInfo;
tokenPagination?: Schema$TokenPagination;
voidedPurchases?: Schema$VoidedPurchase[];
}
export class Resource$Edits {
apklistings: Resource$Edits$Apklistings;
apks: Resource$Edits$Apks;
bundles: Resource$Edits$Bundles;
deobfuscationfiles: Resource$Edits$Deobfuscationfiles;
details: Resource$Edits$Details;
expansionfiles: Resource$Edits$Expansionfiles;
images: Resource$Edits$Images;
listings: Resource$Edits$Listings;