@wix/auto_sdk_subscription_subscriptions 1.0.0 → 1.0.1
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/build/cjs/src/billing-v1-subscription-subscriptions.context.d.ts +5 -5
- package/build/cjs/src/billing-v1-subscription-subscriptions.context.js +13 -11
- package/build/cjs/src/billing-v1-subscription-subscriptions.context.js.map +1 -1
- package/build/cjs/src/billing-v1-subscription-subscriptions.http.d.ts +19 -3
- package/build/cjs/src/billing-v1-subscription-subscriptions.http.js +1914 -1851
- package/build/cjs/src/billing-v1-subscription-subscriptions.http.js.map +1 -1
- package/build/cjs/src/billing-v1-subscription-subscriptions.meta.d.ts +8 -5
- package/build/cjs/src/billing-v1-subscription-subscriptions.meta.js +44 -25
- package/build/cjs/src/billing-v1-subscription-subscriptions.meta.js.map +1 -1
- package/build/cjs/src/billing-v1-subscription-subscriptions.public.d.ts +12 -12
- package/build/cjs/src/billing-v1-subscription-subscriptions.public.js +18 -11
- package/build/cjs/src/billing-v1-subscription-subscriptions.public.js.map +1 -1
- package/build/cjs/src/billing-v1-subscription-subscriptions.types.d.ts +2034 -1465
- package/build/cjs/src/billing-v1-subscription-subscriptions.types.js +59 -59
- package/build/cjs/src/billing-v1-subscription-subscriptions.types.js.map +1 -1
- package/build/cjs/src/billing-v1-subscription-subscriptions.universal.d.ts +2114 -1465
- package/build/cjs/src/billing-v1-subscription-subscriptions.universal.js +401 -339
- package/build/cjs/src/billing-v1-subscription-subscriptions.universal.js.map +1 -1
- package/build/es/src/billing-v1-subscription-subscriptions.context.d.ts +5 -5
- package/build/es/src/billing-v1-subscription-subscriptions.context.js +6 -4
- package/build/es/src/billing-v1-subscription-subscriptions.context.js.map +1 -1
- package/build/es/src/billing-v1-subscription-subscriptions.http.d.ts +19 -3
- package/build/es/src/billing-v1-subscription-subscriptions.http.js +1854 -1792
- package/build/es/src/billing-v1-subscription-subscriptions.http.js.map +1 -1
- package/build/es/src/billing-v1-subscription-subscriptions.meta.d.ts +8 -5
- package/build/es/src/billing-v1-subscription-subscriptions.meta.js +40 -22
- package/build/es/src/billing-v1-subscription-subscriptions.meta.js.map +1 -1
- package/build/es/src/billing-v1-subscription-subscriptions.public.d.ts +12 -12
- package/build/es/src/billing-v1-subscription-subscriptions.public.js +14 -8
- package/build/es/src/billing-v1-subscription-subscriptions.public.js.map +1 -1
- package/build/es/src/billing-v1-subscription-subscriptions.types.d.ts +2034 -1465
- package/build/es/src/billing-v1-subscription-subscriptions.types.js +58 -58
- package/build/es/src/billing-v1-subscription-subscriptions.types.js.map +1 -1
- package/build/es/src/billing-v1-subscription-subscriptions.universal.d.ts +2114 -1465
- package/build/es/src/billing-v1-subscription-subscriptions.universal.js +394 -333
- package/build/es/src/billing-v1-subscription-subscriptions.universal.js.map +1 -1
- package/build/internal/cjs/src/billing-v1-subscription-subscriptions.context.d.ts +7 -5
- package/build/internal/cjs/src/billing-v1-subscription-subscriptions.context.js +13 -11
- package/build/internal/cjs/src/billing-v1-subscription-subscriptions.context.js.map +1 -1
- package/build/internal/cjs/src/billing-v1-subscription-subscriptions.http.d.ts +19 -3
- package/build/internal/cjs/src/billing-v1-subscription-subscriptions.http.js +1914 -1851
- package/build/internal/cjs/src/billing-v1-subscription-subscriptions.http.js.map +1 -1
- package/build/internal/cjs/src/billing-v1-subscription-subscriptions.meta.d.ts +8 -5
- package/build/internal/cjs/src/billing-v1-subscription-subscriptions.meta.js +44 -25
- package/build/internal/cjs/src/billing-v1-subscription-subscriptions.meta.js.map +1 -1
- package/build/internal/cjs/src/billing-v1-subscription-subscriptions.public.d.ts +35 -13
- package/build/internal/cjs/src/billing-v1-subscription-subscriptions.public.js +18 -11
- package/build/internal/cjs/src/billing-v1-subscription-subscriptions.public.js.map +1 -1
- package/build/internal/cjs/src/billing-v1-subscription-subscriptions.types.d.ts +2034 -1465
- package/build/internal/cjs/src/billing-v1-subscription-subscriptions.types.js +59 -59
- package/build/internal/cjs/src/billing-v1-subscription-subscriptions.types.js.map +1 -1
- package/build/internal/cjs/src/billing-v1-subscription-subscriptions.universal.d.ts +2253 -1578
- package/build/internal/cjs/src/billing-v1-subscription-subscriptions.universal.js +401 -339
- package/build/internal/cjs/src/billing-v1-subscription-subscriptions.universal.js.map +1 -1
- package/build/internal/es/src/billing-v1-subscription-subscriptions.context.d.ts +7 -5
- package/build/internal/es/src/billing-v1-subscription-subscriptions.context.js +6 -4
- package/build/internal/es/src/billing-v1-subscription-subscriptions.context.js.map +1 -1
- package/build/internal/es/src/billing-v1-subscription-subscriptions.http.d.ts +19 -3
- package/build/internal/es/src/billing-v1-subscription-subscriptions.http.js +1854 -1792
- package/build/internal/es/src/billing-v1-subscription-subscriptions.http.js.map +1 -1
- package/build/internal/es/src/billing-v1-subscription-subscriptions.meta.d.ts +8 -5
- package/build/internal/es/src/billing-v1-subscription-subscriptions.meta.js +40 -22
- package/build/internal/es/src/billing-v1-subscription-subscriptions.meta.js.map +1 -1
- package/build/internal/es/src/billing-v1-subscription-subscriptions.public.d.ts +35 -13
- package/build/internal/es/src/billing-v1-subscription-subscriptions.public.js +14 -8
- package/build/internal/es/src/billing-v1-subscription-subscriptions.public.js.map +1 -1
- package/build/internal/es/src/billing-v1-subscription-subscriptions.types.d.ts +2034 -1465
- package/build/internal/es/src/billing-v1-subscription-subscriptions.types.js +58 -58
- package/build/internal/es/src/billing-v1-subscription-subscriptions.types.js.map +1 -1
- package/build/internal/es/src/billing-v1-subscription-subscriptions.universal.d.ts +2253 -1578
- package/build/internal/es/src/billing-v1-subscription-subscriptions.universal.js +394 -333
- package/build/internal/es/src/billing-v1-subscription-subscriptions.universal.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export interface Subscription {
|
|
2
2
|
/**
|
|
3
3
|
* Subscription's unique id. Automatically generated and read-only.
|
|
4
|
+
* @format GUID
|
|
4
5
|
* @readonly
|
|
5
6
|
*/
|
|
6
7
|
_id?: string | null;
|
|
@@ -19,9 +20,15 @@ export interface Subscription {
|
|
|
19
20
|
* @readonly
|
|
20
21
|
*/
|
|
21
22
|
revision?: string | null;
|
|
22
|
-
/**
|
|
23
|
+
/**
|
|
24
|
+
* Subscription name: minLength is 1, maxLength is 150
|
|
25
|
+
* @maxLength 150
|
|
26
|
+
*/
|
|
23
27
|
name?: string;
|
|
24
|
-
/**
|
|
28
|
+
/**
|
|
29
|
+
* Subscription description. Optional.
|
|
30
|
+
* @maxLength 500
|
|
31
|
+
*/
|
|
25
32
|
description?: string | null;
|
|
26
33
|
/**
|
|
27
34
|
* 3. No Start Date:
|
|
@@ -74,6 +81,7 @@ export interface Subscription {
|
|
|
74
81
|
* Key / Value store to keep up to 10 additional values related to the subscription.
|
|
75
82
|
* Key max length = 50, Value max length = 200. Value can not be empty.
|
|
76
83
|
* Should not include any sensitive or PII information.
|
|
84
|
+
* @maxSize 10
|
|
77
85
|
*/
|
|
78
86
|
metadata?: Record<string, string>;
|
|
79
87
|
/**
|
|
@@ -86,36 +94,53 @@ export interface Subscription {
|
|
|
86
94
|
* @readonly
|
|
87
95
|
*/
|
|
88
96
|
changesCounter?: string | null;
|
|
89
|
-
/**
|
|
97
|
+
/**
|
|
98
|
+
* Billing order id. Optional.
|
|
99
|
+
* @format GUID
|
|
100
|
+
*/
|
|
90
101
|
orderId?: string | null;
|
|
91
102
|
/** Platform origin subscription is coming from. */
|
|
92
103
|
platformOrigin?: PlatformOrigin;
|
|
93
|
-
/**
|
|
104
|
+
/**
|
|
105
|
+
* The Business Location ID represents a business location in an external service, which includes the business address.
|
|
106
|
+
* @format GUID
|
|
107
|
+
*/
|
|
94
108
|
businessLocationId?: string | null;
|
|
95
|
-
/**
|
|
109
|
+
/**
|
|
110
|
+
* items, minSize is 1, maxSize is 100
|
|
111
|
+
* @maxSize 100
|
|
112
|
+
*/
|
|
96
113
|
items?: Item[];
|
|
97
114
|
}
|
|
98
115
|
export interface BusinessOrigin {
|
|
116
|
+
/** @format GUID */
|
|
99
117
|
appId?: string | null;
|
|
118
|
+
/** @format GUID */
|
|
100
119
|
entityId?: string | null;
|
|
101
120
|
}
|
|
102
121
|
export interface Customer extends CustomerIdOneOf {
|
|
103
122
|
/**
|
|
104
123
|
* Visitor ID of the customer. Available when the customer is an anonymous
|
|
105
124
|
* site visitor.
|
|
125
|
+
* @format GUID
|
|
106
126
|
*/
|
|
107
127
|
visitorId?: string;
|
|
108
128
|
/**
|
|
109
129
|
* Contact ID of the customer. Available when the customer is a
|
|
110
130
|
* [contact](https://dev.wix.com/docs/rest/api-reference/people-communications/contacts/contacts/contact-v-4#contact-object).
|
|
131
|
+
* @format GUID
|
|
111
132
|
*/
|
|
112
133
|
contactId?: string;
|
|
113
134
|
/**
|
|
114
135
|
* Member ID of the customer. Available when the customer is a
|
|
115
136
|
* [member](https://dev.wix.com/docs/rest/api-reference/people-communications/members/members#member-object).
|
|
137
|
+
* @format GUID
|
|
116
138
|
*/
|
|
117
139
|
memberId?: string;
|
|
118
|
-
/**
|
|
140
|
+
/**
|
|
141
|
+
* Wix account ID
|
|
142
|
+
* @format GUID
|
|
143
|
+
*/
|
|
119
144
|
accountId?: string;
|
|
120
145
|
}
|
|
121
146
|
/** @oneof */
|
|
@@ -123,19 +148,25 @@ export interface CustomerIdOneOf {
|
|
|
123
148
|
/**
|
|
124
149
|
* Visitor ID of the customer. Available when the customer is an anonymous
|
|
125
150
|
* site visitor.
|
|
151
|
+
* @format GUID
|
|
126
152
|
*/
|
|
127
153
|
visitorId?: string;
|
|
128
154
|
/**
|
|
129
155
|
* Contact ID of the customer. Available when the customer is a
|
|
130
156
|
* [contact](https://dev.wix.com/docs/rest/api-reference/people-communications/contacts/contacts/contact-v-4#contact-object).
|
|
157
|
+
* @format GUID
|
|
131
158
|
*/
|
|
132
159
|
contactId?: string;
|
|
133
160
|
/**
|
|
134
161
|
* Member ID of the customer. Available when the customer is a
|
|
135
162
|
* [member](https://dev.wix.com/docs/rest/api-reference/people-communications/members/members#member-object).
|
|
163
|
+
* @format GUID
|
|
136
164
|
*/
|
|
137
165
|
memberId?: string;
|
|
138
|
-
/**
|
|
166
|
+
/**
|
|
167
|
+
* Wix account ID
|
|
168
|
+
* @format GUID
|
|
169
|
+
*/
|
|
139
170
|
accountId?: string;
|
|
140
171
|
}
|
|
141
172
|
export declare enum SubscriptionStatusEnumSubscriptionStatus {
|
|
@@ -154,7 +185,10 @@ export declare enum SubscriptionStatusEnumSubscriptionStatus {
|
|
|
154
185
|
CANCELED = "CANCELED"
|
|
155
186
|
}
|
|
156
187
|
export interface BillingSettings {
|
|
157
|
-
/**
|
|
188
|
+
/**
|
|
189
|
+
* Currency of all subscription items prices. Three letter ISO currency code. https://en.wikipedia.org/wiki/ISO_4217
|
|
190
|
+
* @format CURRENCY
|
|
191
|
+
*/
|
|
158
192
|
currency?: string;
|
|
159
193
|
/** customer payment source to make recurring payments with */
|
|
160
194
|
paymentMethod?: PaymentMethod;
|
|
@@ -165,7 +199,10 @@ export interface BillingSettings {
|
|
|
165
199
|
* Shortest supported cycle duration is 7 days.
|
|
166
200
|
*/
|
|
167
201
|
cycleDuration?: Duration;
|
|
168
|
-
/**
|
|
202
|
+
/**
|
|
203
|
+
* Number of billing cycles. If not set subscription auto-renewed until cycle-auto-renew will be disabled.
|
|
204
|
+
* @min 1
|
|
205
|
+
*/
|
|
169
206
|
totalCycles?: number | null;
|
|
170
207
|
/** If set to false, subscription will be canceled at the next billing cycle. */
|
|
171
208
|
cycleAutoRenew?: boolean;
|
|
@@ -175,6 +212,7 @@ export interface BillingSettings {
|
|
|
175
212
|
freeTrialDuration?: Duration;
|
|
176
213
|
/**
|
|
177
214
|
* Shipping costs collected each cycle
|
|
215
|
+
* @format DECIMAL_VALUE
|
|
178
216
|
* @deprecated
|
|
179
217
|
* @replacedBy shipping_charges
|
|
180
218
|
* @targetRemovalDate 2024-10-31
|
|
@@ -189,11 +227,15 @@ export interface BillingSettings {
|
|
|
189
227
|
* subscription.
|
|
190
228
|
*
|
|
191
229
|
* Max: 5 additional fees
|
|
230
|
+
* @maxSize 5
|
|
192
231
|
*/
|
|
193
232
|
additionalFees?: AdditionalFee[];
|
|
194
233
|
/** Shipping fee charges */
|
|
195
234
|
shippingCharges?: ShippingCharges;
|
|
196
|
-
/**
|
|
235
|
+
/**
|
|
236
|
+
* General discount that applied to all items in the subscription
|
|
237
|
+
* @maxSize 5
|
|
238
|
+
*/
|
|
197
239
|
discounts?: Discount[];
|
|
198
240
|
/**
|
|
199
241
|
* Details about the external collection service.
|
|
@@ -202,7 +244,10 @@ export interface BillingSettings {
|
|
|
202
244
|
externalCollectionDetails?: ExternalCollectionDetails;
|
|
203
245
|
}
|
|
204
246
|
export interface PaymentMethod {
|
|
205
|
-
/**
|
|
247
|
+
/**
|
|
248
|
+
* reference to payment source id stored in payments system
|
|
249
|
+
* @format GUID
|
|
250
|
+
*/
|
|
206
251
|
_id?: string;
|
|
207
252
|
}
|
|
208
253
|
export declare enum CollectionMethodEnumCollectionMethod {
|
|
@@ -221,7 +266,10 @@ export declare enum CollectionMethodEnumCollectionMethod {
|
|
|
221
266
|
export interface Duration {
|
|
222
267
|
/** Duration unit: DAY, WEEK, MONTH, YEAR */
|
|
223
268
|
unit?: DurationUnit;
|
|
224
|
-
/**
|
|
269
|
+
/**
|
|
270
|
+
* Amount of units. For example, 1 MONTH, 1 YEAR, 2 WEEKS, etc. Optional. Default is 1.
|
|
271
|
+
* @min 1
|
|
272
|
+
*/
|
|
225
273
|
count?: number | null;
|
|
226
274
|
}
|
|
227
275
|
export declare enum DurationUnit {
|
|
@@ -235,6 +283,8 @@ export interface CustomBillingSchedule {
|
|
|
235
283
|
/**
|
|
236
284
|
* Amount of cycles to be paid on Subscription creation, currently only cycles_to_pay_on_creation equals to 1 is supported
|
|
237
285
|
* When used with Subscription.start_date, Subscription cycles will be paid on creation but Subscription will be activated in the future
|
|
286
|
+
* @min 1
|
|
287
|
+
* @max 1
|
|
238
288
|
*/
|
|
239
289
|
cyclesToPayOnCreation?: number | null;
|
|
240
290
|
}
|
|
@@ -249,11 +299,17 @@ export interface FullAddressContactDetails {
|
|
|
249
299
|
firstName?: string | null;
|
|
250
300
|
/** Last name of the contact. */
|
|
251
301
|
lastName?: string | null;
|
|
252
|
-
/**
|
|
302
|
+
/**
|
|
303
|
+
* Phone number of the contact.
|
|
304
|
+
* @format PHONE
|
|
305
|
+
*/
|
|
253
306
|
phone?: string | null;
|
|
254
307
|
/** Company associated with the contact. */
|
|
255
308
|
company?: string | null;
|
|
256
|
-
/**
|
|
309
|
+
/**
|
|
310
|
+
* Email address of the contact.
|
|
311
|
+
* @format EMAIL
|
|
312
|
+
*/
|
|
257
313
|
email?: string | null;
|
|
258
314
|
}
|
|
259
315
|
export interface Address extends AddressStreetOneOf {
|
|
@@ -265,6 +321,7 @@ export interface Address extends AddressStreetOneOf {
|
|
|
265
321
|
* 2-letter country code in
|
|
266
322
|
* [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)
|
|
267
323
|
* format.
|
|
324
|
+
* @format COUNTRY
|
|
268
325
|
*/
|
|
269
326
|
country?: string | null;
|
|
270
327
|
/**
|
|
@@ -299,12 +356,14 @@ export interface AdditionalFee {
|
|
|
299
356
|
* Name of the conditional fee.
|
|
300
357
|
*
|
|
301
358
|
* Max: 500 characters
|
|
359
|
+
* @maxLength 500
|
|
302
360
|
*/
|
|
303
361
|
name?: string;
|
|
304
362
|
/**
|
|
305
363
|
* Amount of the conditional fee.
|
|
306
364
|
*
|
|
307
365
|
* Min: `0.01`
|
|
366
|
+
* @decimalValue options - {gt:0.00}
|
|
308
367
|
*/
|
|
309
368
|
amount?: string;
|
|
310
369
|
/**
|
|
@@ -352,6 +411,7 @@ export interface Tax extends TaxValueOneOf {
|
|
|
352
411
|
* amount and not a precentage.
|
|
353
412
|
*
|
|
354
413
|
* Min: `0.01`
|
|
414
|
+
* @decimalValue options - {gt:0.00}
|
|
355
415
|
*/
|
|
356
416
|
amount?: string;
|
|
357
417
|
/**
|
|
@@ -361,6 +421,7 @@ export interface Tax extends TaxValueOneOf {
|
|
|
361
421
|
*
|
|
362
422
|
* Min: `0.01`
|
|
363
423
|
* Max: `100`
|
|
424
|
+
* @decimalValue options - {gt:0.00,lte:100}
|
|
364
425
|
*/
|
|
365
426
|
percentage?: string;
|
|
366
427
|
/** Dynamic tax calculation */
|
|
@@ -373,6 +434,7 @@ export interface TaxValueOneOf {
|
|
|
373
434
|
* amount and not a precentage.
|
|
374
435
|
*
|
|
375
436
|
* Min: `0.01`
|
|
437
|
+
* @decimalValue options - {gt:0.00}
|
|
376
438
|
*/
|
|
377
439
|
amount?: string;
|
|
378
440
|
/**
|
|
@@ -382,13 +444,17 @@ export interface TaxValueOneOf {
|
|
|
382
444
|
*
|
|
383
445
|
* Min: `0.01`
|
|
384
446
|
* Max: `100`
|
|
447
|
+
* @decimalValue options - {gt:0.00,lte:100}
|
|
385
448
|
*/
|
|
386
449
|
percentage?: string;
|
|
387
450
|
/** Dynamic tax calculation */
|
|
388
451
|
dynamic?: DynamicTax;
|
|
389
452
|
}
|
|
390
453
|
export interface DynamicTax {
|
|
391
|
-
/**
|
|
454
|
+
/**
|
|
455
|
+
* Tax group ID used to calculate tax, default will be used if not available
|
|
456
|
+
* @format GUID
|
|
457
|
+
*/
|
|
392
458
|
taxGroupId?: string | null;
|
|
393
459
|
/** Taxable address used to calculate tax */
|
|
394
460
|
taxableAddressType?: TaxableAddressType;
|
|
@@ -403,13 +469,21 @@ export declare enum TaxableAddressType {
|
|
|
403
469
|
SHIPPING = "SHIPPING"
|
|
404
470
|
}
|
|
405
471
|
export interface Cycles {
|
|
406
|
-
/**
|
|
472
|
+
/**
|
|
473
|
+
* The cycle will start. Minimum cycle number is 1
|
|
474
|
+
* @min 1
|
|
475
|
+
*/
|
|
407
476
|
cycleFrom?: number;
|
|
408
|
-
/**
|
|
477
|
+
/**
|
|
478
|
+
* Number of cycles to be applied on. In order to apply a on all cycles until the end of the subscription, this field should be empty.
|
|
479
|
+
* @min 1
|
|
480
|
+
*/
|
|
409
481
|
numberOfCycles?: number | null;
|
|
410
482
|
}
|
|
411
483
|
export interface Origin {
|
|
484
|
+
/** @format GUID */
|
|
412
485
|
appId?: string;
|
|
486
|
+
/** @format GUID */
|
|
413
487
|
entityId?: string;
|
|
414
488
|
}
|
|
415
489
|
export interface ShippingCharges {
|
|
@@ -417,10 +491,12 @@ export interface ShippingCharges {
|
|
|
417
491
|
* Amount of the shipping fee in `0.00` format.
|
|
418
492
|
*
|
|
419
493
|
* Min: `0.01`
|
|
494
|
+
* @decimalValue options - {gte:0.00,maxScale:2}
|
|
420
495
|
*/
|
|
421
496
|
amount?: string;
|
|
422
497
|
/** Tax of the shipping fee */
|
|
423
498
|
tax?: Tax;
|
|
499
|
+
/** @maxSize 5 */
|
|
424
500
|
discounts?: Discount[];
|
|
425
501
|
}
|
|
426
502
|
export interface Discount extends DiscountValueOneOf {
|
|
@@ -429,6 +505,7 @@ export interface Discount extends DiscountValueOneOf {
|
|
|
429
505
|
* Available when the discount is an amount.
|
|
430
506
|
*
|
|
431
507
|
* Min: `0.01`
|
|
508
|
+
* @decimalValue options - {gt:0.00}
|
|
432
509
|
*/
|
|
433
510
|
amount?: string;
|
|
434
511
|
/**
|
|
@@ -437,6 +514,7 @@ export interface Discount extends DiscountValueOneOf {
|
|
|
437
514
|
*
|
|
438
515
|
* Min: `0.01`
|
|
439
516
|
* Max: `100`
|
|
517
|
+
* @decimalValue options - {gt:0.00,lte:100}
|
|
440
518
|
*/
|
|
441
519
|
percentage?: string;
|
|
442
520
|
cycles?: DiscountCycles;
|
|
@@ -450,6 +528,7 @@ export interface DiscountValueOneOf {
|
|
|
450
528
|
* Available when the discount is an amount.
|
|
451
529
|
*
|
|
452
530
|
* Min: `0.01`
|
|
531
|
+
* @decimalValue options - {gt:0.00}
|
|
453
532
|
*/
|
|
454
533
|
amount?: string;
|
|
455
534
|
/**
|
|
@@ -458,17 +537,26 @@ export interface DiscountValueOneOf {
|
|
|
458
537
|
*
|
|
459
538
|
* Min: `0.01`
|
|
460
539
|
* Max: `100`
|
|
540
|
+
* @decimalValue options - {gt:0.00,lte:100}
|
|
461
541
|
*/
|
|
462
542
|
percentage?: string;
|
|
463
543
|
}
|
|
464
544
|
export interface DiscountCycles {
|
|
465
|
-
/**
|
|
545
|
+
/**
|
|
546
|
+
* The cycle from which the discount will start. Minimum cycle number is 1
|
|
547
|
+
* @min 1
|
|
548
|
+
*/
|
|
466
549
|
cycleFrom?: number;
|
|
467
|
-
/**
|
|
550
|
+
/**
|
|
551
|
+
* Number of cycles to be applied on them discount. In order to apply a discount on all cycles until the end of the subscription, this field should be empty.
|
|
552
|
+
* @min 1
|
|
553
|
+
*/
|
|
468
554
|
numberOfCycles?: number | null;
|
|
469
555
|
}
|
|
470
556
|
export interface DiscountOrigin {
|
|
557
|
+
/** @format GUID */
|
|
471
558
|
appId?: string;
|
|
559
|
+
/** @format GUID */
|
|
472
560
|
entityId?: string;
|
|
473
561
|
}
|
|
474
562
|
export interface ExternalCollectionDetails {
|
|
@@ -500,6 +588,7 @@ export interface BillingStatus {
|
|
|
500
588
|
}
|
|
501
589
|
/** TODO: fill docs */
|
|
502
590
|
export interface PaymentData {
|
|
591
|
+
/** @format GUID */
|
|
503
592
|
invoiceId?: string;
|
|
504
593
|
paymentStatus?: PaymentStatus;
|
|
505
594
|
totals?: Totals;
|
|
@@ -519,47 +608,56 @@ export interface Totals {
|
|
|
519
608
|
/**
|
|
520
609
|
* Total price of the subscription that the customer must pay per billing
|
|
521
610
|
* cycle. Calculated as: `subtotal + tax + shippingFee + applicationFee + extraCharge - discount - credit`
|
|
611
|
+
* @format DECIMAL_VALUE
|
|
522
612
|
* @readonly
|
|
523
613
|
*/
|
|
524
614
|
totalPrice?: string;
|
|
525
615
|
/**
|
|
526
616
|
* Subtotal of all line items that belong to the subscription.
|
|
527
617
|
* Calculated as: `sum_{i=1}^{n} (itemPrice[i] * quantity[i])`
|
|
618
|
+
* @format DECIMAL_VALUE
|
|
528
619
|
* @readonly
|
|
529
620
|
*/
|
|
530
621
|
subtotal?: string;
|
|
531
622
|
/**
|
|
532
623
|
* Total tax.
|
|
624
|
+
* @format DECIMAL_VALUE
|
|
533
625
|
* @readonly
|
|
534
626
|
*/
|
|
535
627
|
tax?: string | null;
|
|
536
628
|
/**
|
|
537
629
|
* Total discount.
|
|
630
|
+
* @format DECIMAL_VALUE
|
|
538
631
|
* @readonly
|
|
539
632
|
*/
|
|
540
633
|
discount?: string | null;
|
|
541
634
|
/**
|
|
542
635
|
* Total application fee.
|
|
636
|
+
* @format DECIMAL_VALUE
|
|
543
637
|
* @readonly
|
|
544
638
|
*/
|
|
545
639
|
applicationFee?: string | null;
|
|
546
640
|
/**
|
|
547
641
|
* Total shipping fee.
|
|
642
|
+
* @format DECIMAL_VALUE
|
|
548
643
|
* @readonly
|
|
549
644
|
*/
|
|
550
645
|
shippingFee?: string | null;
|
|
551
646
|
/**
|
|
552
647
|
* Total extra charges without tax.
|
|
648
|
+
* @format DECIMAL_VALUE
|
|
553
649
|
* @readonly
|
|
554
650
|
*/
|
|
555
651
|
extraCharge?: string | null;
|
|
556
652
|
/**
|
|
557
653
|
* Total credits without tax.
|
|
654
|
+
* @format DECIMAL_VALUE
|
|
558
655
|
* @readonly
|
|
559
656
|
*/
|
|
560
657
|
credit?: string | null;
|
|
561
658
|
/**
|
|
562
659
|
* The tax amount for the proration, which is also included in the total tax.
|
|
660
|
+
* @format DECIMAL_VALUE
|
|
563
661
|
* @readonly
|
|
564
662
|
*/
|
|
565
663
|
prorationTax?: string | null;
|
|
@@ -624,6 +722,7 @@ export interface CustomProration extends CustomProrationAmountOneOf {
|
|
|
624
722
|
* Increases the total that the customer must pay with the next invoice.
|
|
625
723
|
*
|
|
626
724
|
* Min: `0.01`
|
|
725
|
+
* @decimalValue options - {gt:0.00}
|
|
627
726
|
*/
|
|
628
727
|
charge?: string;
|
|
629
728
|
/**
|
|
@@ -631,6 +730,7 @@ export interface CustomProration extends CustomProrationAmountOneOf {
|
|
|
631
730
|
* Lowers the total that the customer must pay with the next invoice.
|
|
632
731
|
*
|
|
633
732
|
* Min: `0.01`
|
|
733
|
+
* @decimalValue options - {gt:0.00}
|
|
634
734
|
*/
|
|
635
735
|
credit?: string;
|
|
636
736
|
}
|
|
@@ -641,6 +741,7 @@ export interface CustomProrationAmountOneOf {
|
|
|
641
741
|
* Increases the total that the customer must pay with the next invoice.
|
|
642
742
|
*
|
|
643
743
|
* Min: `0.01`
|
|
744
|
+
* @decimalValue options - {gt:0.00}
|
|
644
745
|
*/
|
|
645
746
|
charge?: string;
|
|
646
747
|
/**
|
|
@@ -648,6 +749,7 @@ export interface CustomProrationAmountOneOf {
|
|
|
648
749
|
* Lowers the total that the customer must pay with the next invoice.
|
|
649
750
|
*
|
|
650
751
|
* Min: `0.01`
|
|
752
|
+
* @decimalValue options - {gt:0.00}
|
|
651
753
|
*/
|
|
652
754
|
credit?: string;
|
|
653
755
|
}
|
|
@@ -730,16 +832,26 @@ export declare enum HistoryActionInitiator {
|
|
|
730
832
|
PAYMENT_FAILURE = "PAYMENT_FAILURE"
|
|
731
833
|
}
|
|
732
834
|
export interface SubscriptionUpdateData {
|
|
835
|
+
/** @maxSize 100 */
|
|
733
836
|
itemsToUpdate?: ItemChange[];
|
|
837
|
+
/** @maxSize 99 */
|
|
734
838
|
itemsToAdd?: Item[];
|
|
839
|
+
/**
|
|
840
|
+
* @format GUID
|
|
841
|
+
* @maxSize 99
|
|
842
|
+
*/
|
|
735
843
|
itemsToDelete?: string[] | null;
|
|
736
844
|
/** @readonly */
|
|
737
845
|
numberOfRequests?: number;
|
|
738
846
|
}
|
|
739
847
|
export interface ItemChange {
|
|
740
|
-
/**
|
|
848
|
+
/**
|
|
849
|
+
* Item ID
|
|
850
|
+
* @format GUID
|
|
851
|
+
*/
|
|
741
852
|
_id?: string;
|
|
742
853
|
pricingModel?: PricingModel;
|
|
854
|
+
/** @min 1 */
|
|
743
855
|
quantity?: number | null;
|
|
744
856
|
tax?: Tax;
|
|
745
857
|
}
|
|
@@ -758,6 +870,7 @@ export interface FixedPrice {
|
|
|
758
870
|
* Price doesn't include tax, discounts, or application fee.
|
|
759
871
|
*
|
|
760
872
|
* Min: `0.01`
|
|
873
|
+
* @decimalValue options - {gte:0.00}
|
|
761
874
|
*/
|
|
762
875
|
itemPrice?: string;
|
|
763
876
|
}
|
|
@@ -765,40 +878,60 @@ export interface Item {
|
|
|
765
878
|
/**
|
|
766
879
|
* Unique identifier of subscription item. Automatically generated and read-only.
|
|
767
880
|
* @readonly
|
|
881
|
+
* @format GUID
|
|
768
882
|
*/
|
|
769
883
|
_id?: string | null;
|
|
770
|
-
/**
|
|
884
|
+
/**
|
|
885
|
+
* Name of the item. Typically product name.
|
|
886
|
+
* @minLength 1
|
|
887
|
+
* @maxLength 200
|
|
888
|
+
*/
|
|
771
889
|
name?: string;
|
|
772
|
-
/**
|
|
890
|
+
/**
|
|
891
|
+
* Description of the item.
|
|
892
|
+
* @maxLength 500
|
|
893
|
+
*/
|
|
773
894
|
description?: string | null;
|
|
774
895
|
/** References to external product catalog data known to client. */
|
|
775
896
|
catalogReference?: CatalogReference;
|
|
776
897
|
/** Category of item. Whether it is digital or physical one. */
|
|
777
898
|
category?: ItemCategory;
|
|
778
|
-
/**
|
|
899
|
+
/**
|
|
900
|
+
* Amount of products
|
|
901
|
+
* @min 1
|
|
902
|
+
*/
|
|
779
903
|
quantity?: number;
|
|
780
904
|
/** Pricing model of the item. Whether fixed price or dynamic price models. */
|
|
781
905
|
pricingModel?: PricingModel;
|
|
782
906
|
/** Tax, positive value, optional */
|
|
783
907
|
tax?: Tax;
|
|
784
|
-
/**
|
|
908
|
+
/**
|
|
909
|
+
* Discounts applied on item price
|
|
910
|
+
* @maxSize 5
|
|
911
|
+
*/
|
|
785
912
|
discounts?: Discount[];
|
|
786
913
|
/** Application specific fee, positive value, optional (if application_fee == 0, don't include it to request). Only positive values. */
|
|
787
914
|
applicationFee?: ApplicationFee;
|
|
788
915
|
/**
|
|
789
916
|
* External reference identifier for mapping item in consumer's system.
|
|
790
917
|
* This allows the consumer to correlate the item in their system with the item in this API.
|
|
918
|
+
* @format GUID
|
|
791
919
|
*/
|
|
792
920
|
externalId?: string | null;
|
|
793
921
|
/**
|
|
794
922
|
* Key / Value store to keep up to 10 additional values related to the subscription item.
|
|
795
923
|
* Key max length = 50, Value max length = 200. Value can not be empty.
|
|
796
924
|
* Should not include any sensitive or PII information.
|
|
925
|
+
* @maxSize 10
|
|
797
926
|
*/
|
|
798
927
|
metadata?: Record<string, string>;
|
|
799
928
|
}
|
|
800
929
|
export interface CatalogReference {
|
|
801
|
-
/**
|
|
930
|
+
/**
|
|
931
|
+
* Product ID from the external catalog.
|
|
932
|
+
* @minLength 1
|
|
933
|
+
* @maxLength 50
|
|
934
|
+
*/
|
|
802
935
|
catalogItemId?: string;
|
|
803
936
|
/**
|
|
804
937
|
* ID of the app that the product catalog belongs to.
|
|
@@ -807,6 +940,8 @@ export interface CatalogReference {
|
|
|
807
940
|
*
|
|
808
941
|
* Min: 1 character
|
|
809
942
|
* Max: 50 characters
|
|
943
|
+
* @minLength 1
|
|
944
|
+
* @maxLength 50
|
|
810
945
|
*/
|
|
811
946
|
appId?: string | null;
|
|
812
947
|
}
|
|
@@ -816,18 +951,25 @@ export declare enum ItemCategory {
|
|
|
816
951
|
DIGITAL = "DIGITAL"
|
|
817
952
|
}
|
|
818
953
|
export interface ApplicationFee extends ApplicationFeeValueOneOf {
|
|
819
|
-
/**
|
|
954
|
+
/**
|
|
955
|
+
* Amount of the application fee in `0.00` format.
|
|
956
|
+
* @format DECIMAL_VALUE
|
|
957
|
+
*/
|
|
820
958
|
amount?: string;
|
|
821
959
|
/**
|
|
822
960
|
* Discounts for the application fee.
|
|
823
961
|
*
|
|
824
962
|
* Max: 5 discounts
|
|
963
|
+
* @maxSize 5
|
|
825
964
|
*/
|
|
826
965
|
discounts?: Discount[];
|
|
827
966
|
}
|
|
828
967
|
/** @oneof */
|
|
829
968
|
export interface ApplicationFeeValueOneOf {
|
|
830
|
-
/**
|
|
969
|
+
/**
|
|
970
|
+
* Amount of the application fee in `0.00` format.
|
|
971
|
+
* @format DECIMAL_VALUE
|
|
972
|
+
*/
|
|
831
973
|
amount?: string;
|
|
832
974
|
}
|
|
833
975
|
export interface SpecificDateSubscriptionUpdateData {
|
|
@@ -835,164 +977,58 @@ export interface SpecificDateSubscriptionUpdateData {
|
|
|
835
977
|
executionDate?: Date | null;
|
|
836
978
|
}
|
|
837
979
|
export interface PlatformOrigin {
|
|
980
|
+
/** @format GUID */
|
|
838
981
|
appId?: string | null;
|
|
982
|
+
/** @format GUID */
|
|
839
983
|
entityId?: string | null;
|
|
840
984
|
}
|
|
985
|
+
/** TODO: to delete after ECOM adjustments */
|
|
841
986
|
export interface InvoiceMarkedAsPaid {
|
|
842
987
|
/** The subscription for which one of the invoices has been marked as paid */
|
|
843
988
|
subscription?: Subscription;
|
|
844
989
|
/** The cycle that has been marked as paid */
|
|
845
990
|
paidCycle?: number;
|
|
846
|
-
/**
|
|
991
|
+
/**
|
|
992
|
+
* The invoice ID that has been marked as paid
|
|
993
|
+
* @format GUID
|
|
994
|
+
*/
|
|
847
995
|
invoiceId?: string;
|
|
848
|
-
/**
|
|
996
|
+
/**
|
|
997
|
+
* The transaction ID of the payment order that has been marked as paid
|
|
998
|
+
* @format GUID
|
|
999
|
+
*/
|
|
849
1000
|
paymentTransactionId?: string | null;
|
|
850
1001
|
}
|
|
851
|
-
export interface
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
cursor?: CursorPaging;
|
|
857
|
-
}
|
|
858
|
-
export declare enum HistoryViewMode {
|
|
859
|
-
UNKNOWN = "UNKNOWN",
|
|
860
|
-
/** Comprehensive view including all history events. */
|
|
861
|
-
BACKOFFICE = "BACKOFFICE",
|
|
862
|
-
/** User-centric view of the history. */
|
|
863
|
-
USER = "USER"
|
|
864
|
-
}
|
|
865
|
-
export interface CursorPaging {
|
|
866
|
-
/** Maximum number of items to return in the results. */
|
|
867
|
-
limit?: number | null;
|
|
1002
|
+
export interface SubscriptionBillingCyclePaid {
|
|
1003
|
+
/** The subscription for which one of the invoices has been marked as paid */
|
|
1004
|
+
subscription?: Subscription;
|
|
1005
|
+
/** The cycle that has been marked as paid */
|
|
1006
|
+
paidCycle?: number;
|
|
868
1007
|
/**
|
|
869
|
-
*
|
|
870
|
-
*
|
|
871
|
-
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
872
|
-
* Not relevant for the first request.
|
|
1008
|
+
* The invoice ID that has been marked as paid
|
|
1009
|
+
* @format GUID
|
|
873
1010
|
*/
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
pagingMetadata?: PagingMetadataV2;
|
|
881
|
-
}
|
|
882
|
-
export interface SubscriptionHistoryEntry {
|
|
883
|
-
entryId?: string;
|
|
884
|
-
/** TODO: add max length? it is not defined in domainevents, so should we? */
|
|
885
|
-
slug?: string;
|
|
886
|
-
entryTime?: Date | null;
|
|
887
|
-
event?: SubscriptionEvent;
|
|
888
|
-
}
|
|
889
|
-
export interface SubscriptionEvent extends SubscriptionEventPayloadOneOf {
|
|
890
|
-
created?: SubscriptionCreated;
|
|
891
|
-
updated?: SubscriptionUpdated;
|
|
892
|
-
deleted?: SubscriptionDeleted;
|
|
893
|
-
activated?: SubscriptionActivated;
|
|
894
|
-
ended?: SubscriptionEnded;
|
|
895
|
-
canceled?: SubscriptionCanceled;
|
|
896
|
-
paused?: SubscriptionPaused;
|
|
897
|
-
resumed?: SubscriptionResumed;
|
|
898
|
-
pauseRequested?: PauseSubscriptionRequested;
|
|
899
|
-
resumeRequested?: ResumeSubscriptionRequested;
|
|
900
|
-
scheduledPauseCanceled?: ScheduledPauseCanceled;
|
|
901
|
-
scheduledResumeCanceled?: ScheduledResumeCanceled;
|
|
902
|
-
billingCycleStarted?: SubscriptionBillingCycleStarted;
|
|
903
|
-
autoRenewalTurnedOn?: SubscriptionAutoRenewalTurnedOn;
|
|
904
|
-
autoRenewalTurnedOff?: SubscriptionAutoRenewalTurnedOff;
|
|
905
|
-
cycleReadyToPay?: SubscriptionCycleReadyToPay;
|
|
906
|
-
extended?: SubscriptionExtended;
|
|
907
|
-
initialPurchaseCompleted?: SubscriptionInitialPurchaseCompleted;
|
|
908
|
-
latestInvoiceMarkedAsPaid?: LatestInvoiceMarkedAsPaid;
|
|
909
|
-
revived?: SubscriptionRevived;
|
|
910
|
-
billingDateUpdated?: SubscriptionBillingDateUpdated;
|
|
911
|
-
futureUpdatesRequested?: FutureUpdatesRequested;
|
|
912
|
-
updatesApplied?: UpdatesApplied;
|
|
913
|
-
resetPendingUpdates?: ResetPendingUpdates;
|
|
914
|
-
gracePeriodStarted?: GracePeriodStarted;
|
|
915
|
-
gracePeriodEnded?: GracePeriodEnded;
|
|
916
|
-
paymentMethodUpdated?: PaymentMethodUpdated;
|
|
917
|
-
collectionMethodUpdated?: SubscriptionCollectionMethodUpdated;
|
|
918
|
-
freeTrailStarted?: FreeTrailStarted;
|
|
919
|
-
freeTrailEnded?: FreeTrailEnded;
|
|
920
|
-
invoiceMarkedAsPaid?: InvoiceMarkedAsPaid;
|
|
921
|
-
initiatePaymentMethodSetup?: InitiatedPaymentMethodSetup;
|
|
922
|
-
subscriptionBoAction?: SubscriptionBackOfficeAction;
|
|
923
|
-
unknown?: UnknownSubscriptionEvent;
|
|
1011
|
+
invoiceId?: string;
|
|
1012
|
+
/**
|
|
1013
|
+
* The transaction ID of the payment order that has been marked as paid
|
|
1014
|
+
* @format GUID
|
|
1015
|
+
*/
|
|
1016
|
+
paymentTransactionId?: string | null;
|
|
924
1017
|
}
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
updated?: SubscriptionUpdated;
|
|
929
|
-
deleted?: SubscriptionDeleted;
|
|
930
|
-
activated?: SubscriptionActivated;
|
|
931
|
-
ended?: SubscriptionEnded;
|
|
932
|
-
canceled?: SubscriptionCanceled;
|
|
933
|
-
paused?: SubscriptionPaused;
|
|
934
|
-
resumed?: SubscriptionResumed;
|
|
935
|
-
pauseRequested?: PauseSubscriptionRequested;
|
|
936
|
-
resumeRequested?: ResumeSubscriptionRequested;
|
|
937
|
-
scheduledPauseCanceled?: ScheduledPauseCanceled;
|
|
938
|
-
scheduledResumeCanceled?: ScheduledResumeCanceled;
|
|
939
|
-
billingCycleStarted?: SubscriptionBillingCycleStarted;
|
|
940
|
-
autoRenewalTurnedOn?: SubscriptionAutoRenewalTurnedOn;
|
|
941
|
-
autoRenewalTurnedOff?: SubscriptionAutoRenewalTurnedOff;
|
|
942
|
-
cycleReadyToPay?: SubscriptionCycleReadyToPay;
|
|
943
|
-
extended?: SubscriptionExtended;
|
|
944
|
-
initialPurchaseCompleted?: SubscriptionInitialPurchaseCompleted;
|
|
945
|
-
latestInvoiceMarkedAsPaid?: LatestInvoiceMarkedAsPaid;
|
|
946
|
-
revived?: SubscriptionRevived;
|
|
947
|
-
billingDateUpdated?: SubscriptionBillingDateUpdated;
|
|
948
|
-
futureUpdatesRequested?: FutureUpdatesRequested;
|
|
949
|
-
updatesApplied?: UpdatesApplied;
|
|
950
|
-
resetPendingUpdates?: ResetPendingUpdates;
|
|
951
|
-
gracePeriodStarted?: GracePeriodStarted;
|
|
952
|
-
gracePeriodEnded?: GracePeriodEnded;
|
|
953
|
-
paymentMethodUpdated?: PaymentMethodUpdated;
|
|
954
|
-
collectionMethodUpdated?: SubscriptionCollectionMethodUpdated;
|
|
955
|
-
freeTrailStarted?: FreeTrailStarted;
|
|
956
|
-
freeTrailEnded?: FreeTrailEnded;
|
|
957
|
-
invoiceMarkedAsPaid?: InvoiceMarkedAsPaid;
|
|
958
|
-
initiatePaymentMethodSetup?: InitiatedPaymentMethodSetup;
|
|
959
|
-
subscriptionBoAction?: SubscriptionBackOfficeAction;
|
|
960
|
-
unknown?: UnknownSubscriptionEvent;
|
|
1018
|
+
export interface GetSubscriptionRequest {
|
|
1019
|
+
/** @format GUID */
|
|
1020
|
+
_id: string;
|
|
961
1021
|
}
|
|
962
|
-
export interface
|
|
1022
|
+
export interface GetSubscriptionResponse {
|
|
963
1023
|
subscription?: Subscription;
|
|
964
1024
|
}
|
|
965
|
-
export interface
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
export interface SubscriptionDiff {
|
|
971
|
-
added?: string | null;
|
|
972
|
-
changed?: string | null;
|
|
973
|
-
deleted?: string | null;
|
|
974
|
-
}
|
|
975
|
-
export interface SubscriptionDeleted {
|
|
976
|
-
subscriptionId?: string;
|
|
977
|
-
}
|
|
978
|
-
/**
|
|
979
|
-
* Sent each time a subscription status has been set to Active
|
|
980
|
-
* Active shows that a subscription is live and operational.
|
|
981
|
-
* For example:
|
|
982
|
-
* * For subscription with free trial, free trial start date is also the activation date.
|
|
983
|
-
* * For a subscription with future start date, the start date is also the activation date.
|
|
984
|
-
* * When a subscription is resumed from a pause status, the resume date is also the activation date.
|
|
985
|
-
*/
|
|
986
|
-
export interface SubscriptionActivated {
|
|
987
|
-
subscription?: Subscription;
|
|
1025
|
+
export interface CustomerCancelSubscriptionRequest {
|
|
1026
|
+
/** @format GUID */
|
|
1027
|
+
_id: string;
|
|
1028
|
+
/** Optional action reason message */
|
|
1029
|
+
reason?: string | null;
|
|
988
1030
|
}
|
|
989
|
-
|
|
990
|
-
* Sent each time a subscription status has been set to Ended
|
|
991
|
-
* Ended shows that a subscription reached its end date and ended its life cycle as a result of the agreement.
|
|
992
|
-
* This is different from a Canceled subscription which ends the subscription before a designated end date.
|
|
993
|
-
* Therefore, Ended and Canceled are mutually exclusive.
|
|
994
|
-
*/
|
|
995
|
-
export interface SubscriptionEnded {
|
|
1031
|
+
export interface CustomerCancelSubscriptionResponse {
|
|
996
1032
|
subscription?: Subscription;
|
|
997
1033
|
}
|
|
998
1034
|
/**
|
|
@@ -1010,53 +1046,45 @@ export interface ActionDetails {
|
|
|
1010
1046
|
initiator?: HistoryActionInitiator;
|
|
1011
1047
|
reason?: string | null;
|
|
1012
1048
|
}
|
|
1013
|
-
export interface
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1049
|
+
export interface CustomerTurnOnAutoRenewalRequest {
|
|
1050
|
+
/** @format GUID */
|
|
1051
|
+
_id: string;
|
|
1052
|
+
/** Optional action reason message */
|
|
1053
|
+
reason?: string | null;
|
|
1017
1054
|
}
|
|
1018
|
-
export interface
|
|
1055
|
+
export interface CustomerTurnOnAutoRenewalResponse {
|
|
1019
1056
|
subscription?: Subscription;
|
|
1020
|
-
actionDetails?: ActionDetails;
|
|
1021
1057
|
}
|
|
1022
|
-
export interface
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1058
|
+
export interface CustomerTurnOffAutoRenewalRequest {
|
|
1059
|
+
/** @format GUID */
|
|
1060
|
+
_id: string;
|
|
1061
|
+
/** Optional action reason message */
|
|
1062
|
+
reason?: string | null;
|
|
1027
1063
|
}
|
|
1028
|
-
export interface
|
|
1064
|
+
export interface CustomerTurnOffAutoRenewalResponse {
|
|
1029
1065
|
subscription?: Subscription;
|
|
1030
|
-
resumeAt?: ResumeAt;
|
|
1031
|
-
actionDetails?: ActionDetails;
|
|
1032
1066
|
}
|
|
1033
|
-
export interface
|
|
1067
|
+
export interface CustomerExtendSubscriptionRequest {
|
|
1068
|
+
/**
|
|
1069
|
+
* The ID of the subscription to be extended
|
|
1070
|
+
* @format GUID
|
|
1071
|
+
*/
|
|
1072
|
+
_id: string;
|
|
1073
|
+
/** Optional action reason message */
|
|
1074
|
+
reason?: string | null;
|
|
1075
|
+
/**
|
|
1076
|
+
* For termed - Subscription end date will be updated with the extension period and number of cycles will be added
|
|
1077
|
+
* @min 1
|
|
1078
|
+
*/
|
|
1079
|
+
billingCyclesToAdd: number | null;
|
|
1080
|
+
}
|
|
1081
|
+
export interface CustomerExtendSubscriptionResponse {
|
|
1082
|
+
/** The now extended subscription */
|
|
1034
1083
|
subscription?: Subscription;
|
|
1035
|
-
actionDetails?: ActionDetails;
|
|
1036
1084
|
}
|
|
1037
|
-
export interface
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
}
|
|
1041
|
-
export interface SubscriptionBillingCycleStarted {
|
|
1042
|
-
subscription?: Subscription;
|
|
1043
|
-
/** Wix Pay transaction id, optional. Exists if event was triggered by a payment. */
|
|
1044
|
-
paymentTransactionId?: string | null;
|
|
1045
|
-
}
|
|
1046
|
-
export interface SubscriptionAutoRenewalTurnedOn {
|
|
1047
|
-
subscription?: Subscription;
|
|
1048
|
-
actionDetails?: ActionDetails;
|
|
1049
|
-
}
|
|
1050
|
-
export interface SubscriptionAutoRenewalTurnedOff {
|
|
1051
|
-
subscription?: Subscription;
|
|
1052
|
-
actionDetails?: ActionDetails;
|
|
1053
|
-
}
|
|
1054
|
-
export interface SubscriptionCycleReadyToPay {
|
|
1055
|
-
subscription?: Subscription;
|
|
1056
|
-
}
|
|
1057
|
-
export interface SubscriptionExtended extends SubscriptionExtendedExtendPolicyOneOf {
|
|
1058
|
-
extensionPeriod?: Duration;
|
|
1059
|
-
extensionBillingCycles?: number;
|
|
1085
|
+
export interface SubscriptionExtended extends SubscriptionExtendedExtendPolicyOneOf {
|
|
1086
|
+
extensionPeriod?: Duration;
|
|
1087
|
+
extensionBillingCycles?: number;
|
|
1060
1088
|
subscription?: Subscription;
|
|
1061
1089
|
actionDetails?: ActionDetails;
|
|
1062
1090
|
}
|
|
@@ -1065,98 +1093,75 @@ export interface SubscriptionExtendedExtendPolicyOneOf {
|
|
|
1065
1093
|
extensionPeriod?: Duration;
|
|
1066
1094
|
extensionBillingCycles?: number;
|
|
1067
1095
|
}
|
|
1068
|
-
export interface
|
|
1069
|
-
|
|
1070
|
-
actionDetails?: ActionDetails;
|
|
1071
|
-
paymentTransactionId?: string | null;
|
|
1072
|
-
}
|
|
1073
|
-
export interface LatestInvoiceMarkedAsPaid {
|
|
1074
|
-
subscription?: Subscription;
|
|
1075
|
-
}
|
|
1076
|
-
export interface SubscriptionRevived {
|
|
1077
|
-
subscription?: Subscription;
|
|
1078
|
-
}
|
|
1079
|
-
export interface SubscriptionBillingDateUpdated {
|
|
1080
|
-
subscription?: Subscription;
|
|
1081
|
-
billingDate?: Date | null;
|
|
1082
|
-
proration?: Proration;
|
|
1083
|
-
}
|
|
1084
|
-
export interface FutureUpdatesRequested {
|
|
1085
|
-
subscription?: Subscription;
|
|
1086
|
-
requestedUpdateData?: SubscriptionUpdateData;
|
|
1087
|
-
}
|
|
1088
|
-
export interface UpdatesApplied {
|
|
1089
|
-
subscription?: Subscription;
|
|
1090
|
-
updateAction?: UpdateAction;
|
|
1091
|
-
appliedUpdateData?: SubscriptionUpdateData;
|
|
1092
|
-
}
|
|
1093
|
-
export declare enum UpdateAction {
|
|
1094
|
-
NONE = "NONE",
|
|
1095
|
-
/** Update subscription immediately, please note proration for updates changing price are not yet supported */
|
|
1096
|
-
IMMEDIATELY = "IMMEDIATELY",
|
|
1097
|
-
/** Request updates that will take affect only at the start of the next billing cycle. */
|
|
1098
|
-
NEXT_BILLING_CYCLE = "NEXT_BILLING_CYCLE",
|
|
1099
|
-
/** Reset all pending updates */
|
|
1100
|
-
RESET_PENDING_UPDATES = "RESET_PENDING_UPDATES",
|
|
1101
|
-
/** Request updates that will take affect only at a specific date. */
|
|
1102
|
-
SPECIFIC_DATE = "SPECIFIC_DATE"
|
|
1103
|
-
}
|
|
1104
|
-
export interface ResetPendingUpdates {
|
|
1105
|
-
subscription?: Subscription;
|
|
1106
|
-
}
|
|
1107
|
-
export interface GracePeriodStarted {
|
|
1108
|
-
subscription?: Subscription;
|
|
1109
|
-
}
|
|
1110
|
-
export interface GracePeriodEnded {
|
|
1111
|
-
subscription?: Subscription;
|
|
1112
|
-
/** Indication for the payment settlement method. */
|
|
1113
|
-
paymentSettlementMethod?: PaymentSettlementMethod;
|
|
1114
|
-
}
|
|
1115
|
-
export declare enum PaymentSettlementMethod {
|
|
1116
|
-
UNKNOWN = "UNKNOWN",
|
|
1117
|
-
/** System-defined payment settlement. */
|
|
1118
|
-
SYSTEM = "SYSTEM",
|
|
1119
|
-
/** Manually mark the payment as paid. */
|
|
1120
|
-
MARK_AS_PAID = "MARK_AS_PAID",
|
|
1121
|
-
/** Require the customer to pay immediately, by insert a new payment method. */
|
|
1122
|
-
CUSTOMER_PAY_NOW = "CUSTOMER_PAY_NOW"
|
|
1123
|
-
}
|
|
1124
|
-
export interface PaymentMethodUpdated {
|
|
1125
|
-
subscription?: Subscription;
|
|
1126
|
-
initiator?: HistoryActionInitiator;
|
|
1127
|
-
paymentMode?: PaymentMode;
|
|
1096
|
+
export interface QuerySubscriptionsRequest {
|
|
1097
|
+
query?: QueryV2;
|
|
1128
1098
|
}
|
|
1129
|
-
export
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1099
|
+
export interface QueryV2 extends QueryV2PagingMethodOneOf {
|
|
1100
|
+
/** Paging options to limit and skip the number of items. */
|
|
1101
|
+
paging?: Paging;
|
|
1102
|
+
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
|
|
1103
|
+
cursorPaging?: CursorPaging;
|
|
1104
|
+
/**
|
|
1105
|
+
* Filter object.
|
|
1106
|
+
*
|
|
1107
|
+
* Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
|
|
1108
|
+
*/
|
|
1109
|
+
filter?: Record<string, any> | null;
|
|
1110
|
+
/**
|
|
1111
|
+
* Sort object.
|
|
1112
|
+
*
|
|
1113
|
+
* Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
|
|
1114
|
+
*/
|
|
1115
|
+
sort?: Sorting[];
|
|
1116
|
+
/** Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned. */
|
|
1117
|
+
fields?: string[];
|
|
1118
|
+
/** Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned. */
|
|
1119
|
+
fieldsets?: string[];
|
|
1135
1120
|
}
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1121
|
+
/** @oneof */
|
|
1122
|
+
export interface QueryV2PagingMethodOneOf {
|
|
1123
|
+
/** Paging options to limit and skip the number of items. */
|
|
1124
|
+
paging?: Paging;
|
|
1125
|
+
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
|
|
1126
|
+
cursorPaging?: CursorPaging;
|
|
1140
1127
|
}
|
|
1141
|
-
export interface
|
|
1142
|
-
|
|
1128
|
+
export interface Sorting {
|
|
1129
|
+
/**
|
|
1130
|
+
* Name of the field to sort by.
|
|
1131
|
+
* @maxLength 512
|
|
1132
|
+
*/
|
|
1133
|
+
fieldName?: string;
|
|
1134
|
+
/** Sort order. */
|
|
1135
|
+
order?: SortOrder;
|
|
1143
1136
|
}
|
|
1144
|
-
export
|
|
1145
|
-
|
|
1137
|
+
export declare enum SortOrder {
|
|
1138
|
+
ASC = "ASC",
|
|
1139
|
+
DESC = "DESC"
|
|
1146
1140
|
}
|
|
1147
|
-
export interface
|
|
1148
|
-
|
|
1141
|
+
export interface Paging {
|
|
1142
|
+
/** Number of items to load. */
|
|
1143
|
+
limit?: number | null;
|
|
1144
|
+
/** Number of items to skip in the current sort order. */
|
|
1145
|
+
offset?: number | null;
|
|
1149
1146
|
}
|
|
1150
|
-
export interface
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1147
|
+
export interface CursorPaging {
|
|
1148
|
+
/**
|
|
1149
|
+
* Maximum number of items to return in the results.
|
|
1150
|
+
* @max 100
|
|
1151
|
+
*/
|
|
1152
|
+
limit?: number | null;
|
|
1153
|
+
/**
|
|
1154
|
+
* Pointer to the next or previous page in the list of results.
|
|
1155
|
+
*
|
|
1156
|
+
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
1157
|
+
* Not relevant for the first request.
|
|
1158
|
+
* @maxLength 16000
|
|
1159
|
+
*/
|
|
1160
|
+
cursor?: string | null;
|
|
1156
1161
|
}
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1162
|
+
export interface QuerySubscriptionsResponse {
|
|
1163
|
+
subscriptions?: Subscription[];
|
|
1164
|
+
metadata?: PagingMetadataV2;
|
|
1160
1165
|
}
|
|
1161
1166
|
export interface PagingMetadataV2 {
|
|
1162
1167
|
/** Number of items returned in the response. */
|
|
@@ -1171,265 +1176,70 @@ export interface PagingMetadataV2 {
|
|
|
1171
1176
|
cursors?: Cursors;
|
|
1172
1177
|
}
|
|
1173
1178
|
export interface Cursors {
|
|
1174
|
-
/** Cursor string pointing to the next page in the list of results. */
|
|
1175
|
-
next?: string | null;
|
|
1176
|
-
/** Cursor pointing to the previous page in the list of results. */
|
|
1177
|
-
prev?: string | null;
|
|
1178
|
-
}
|
|
1179
|
-
export interface DomainEvent extends DomainEventBodyOneOf {
|
|
1180
|
-
createdEvent?: EntityCreatedEvent;
|
|
1181
|
-
updatedEvent?: EntityUpdatedEvent;
|
|
1182
|
-
deletedEvent?: EntityDeletedEvent;
|
|
1183
|
-
actionEvent?: ActionEvent;
|
|
1184
1179
|
/**
|
|
1185
|
-
*
|
|
1186
|
-
*
|
|
1180
|
+
* Cursor string pointing to the next page in the list of results.
|
|
1181
|
+
* @maxLength 16000
|
|
1187
1182
|
*/
|
|
1188
|
-
|
|
1183
|
+
next?: string | null;
|
|
1189
1184
|
/**
|
|
1190
|
-
*
|
|
1191
|
-
*
|
|
1185
|
+
* Cursor pointing to the previous page in the list of results.
|
|
1186
|
+
* @maxLength 16000
|
|
1192
1187
|
*/
|
|
1193
|
-
|
|
1188
|
+
prev?: string | null;
|
|
1189
|
+
}
|
|
1190
|
+
export interface CountSubscriptionsRequest {
|
|
1191
|
+
/** Filters to specify which subscriptions are counted. */
|
|
1192
|
+
filter?: CountSubscriptionFilter;
|
|
1193
|
+
}
|
|
1194
|
+
export interface CountSubscriptionFilter extends CountSubscriptionFilterStatusOneOf {
|
|
1195
|
+
/** List of statuses to filter the counted subscriptions by. */
|
|
1196
|
+
statuses?: SubscriptionStatus;
|
|
1194
1197
|
/**
|
|
1195
|
-
*
|
|
1196
|
-
*
|
|
1197
|
-
*
|
|
1198
|
+
* Predefined status combination to filter the counted subscriptions by.
|
|
1199
|
+
* + `ALL`: Includes these subscription statuses: `"DRAFT"`, `"PENDING"`, `"ACTIVE"`, `"PAUSED"`, `"ENDED"`, and `"CANCELED"`.
|
|
1200
|
+
* + `LIVE`: Includes these subscription statuses: `"PENDING"`, `"ACTIVE"`, and `"PAUSED"`.
|
|
1198
1201
|
*/
|
|
1199
|
-
|
|
1200
|
-
/** ID of the entity associated with the event. */
|
|
1201
|
-
entityId?: string;
|
|
1202
|
-
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
1203
|
-
eventTime?: Date | null;
|
|
1202
|
+
statusGroup?: SubscriptionStatusGroup;
|
|
1204
1203
|
/**
|
|
1205
|
-
*
|
|
1206
|
-
* (
|
|
1204
|
+
* Customer ID to filter the counted subscriptions by. You can pass a
|
|
1205
|
+
* [member ID](https://bo.wix.com/wix-docs/rest/members/members/member-object),
|
|
1206
|
+
* [contact ID](https://bo.wix.com/wix-docs/rest/crm/contacts/contacts-v4/contact-object),
|
|
1207
|
+
* or the ID of an anonymous site visitor as `customerId`. When providing a
|
|
1208
|
+
* `customerId` you must also specify a `paymentMethodId`.
|
|
1209
|
+
* @format GUID
|
|
1207
1210
|
*/
|
|
1208
|
-
|
|
1209
|
-
/** If present, indicates the action that triggered the event. */
|
|
1210
|
-
originatedFrom?: string | null;
|
|
1211
|
+
customerId?: string | null;
|
|
1211
1212
|
/**
|
|
1212
|
-
*
|
|
1213
|
-
*
|
|
1214
|
-
*
|
|
1215
|
-
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
1216
|
-
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
1217
|
-
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
1213
|
+
* ID of the payment method to filter the counted subscriptions by.
|
|
1214
|
+
* You must provide a `paymentMethodId` when passing a `customerId`.
|
|
1215
|
+
* @format GUID
|
|
1218
1216
|
*/
|
|
1219
|
-
|
|
1217
|
+
paymentMethodId?: string | null;
|
|
1220
1218
|
}
|
|
1221
1219
|
/** @oneof */
|
|
1222
|
-
export interface
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
export interface RestoreInfo {
|
|
1232
|
-
deletedDate?: Date | null;
|
|
1220
|
+
export interface CountSubscriptionFilterStatusOneOf {
|
|
1221
|
+
/** List of statuses to filter the counted subscriptions by. */
|
|
1222
|
+
statuses?: SubscriptionStatus;
|
|
1223
|
+
/**
|
|
1224
|
+
* Predefined status combination to filter the counted subscriptions by.
|
|
1225
|
+
* + `ALL`: Includes these subscription statuses: `"DRAFT"`, `"PENDING"`, `"ACTIVE"`, `"PAUSED"`, `"ENDED"`, and `"CANCELED"`.
|
|
1226
|
+
* + `LIVE`: Includes these subscription statuses: `"PENDING"`, `"ACTIVE"`, and `"PAUSED"`.
|
|
1227
|
+
*/
|
|
1228
|
+
statusGroup?: SubscriptionStatusGroup;
|
|
1233
1229
|
}
|
|
1234
|
-
export interface
|
|
1230
|
+
export interface SubscriptionStatus {
|
|
1235
1231
|
/**
|
|
1236
|
-
*
|
|
1237
|
-
*
|
|
1238
|
-
*
|
|
1232
|
+
* Statuses to filter the counted subscriptions by.
|
|
1233
|
+
*
|
|
1234
|
+
* Max: 6 statuses
|
|
1235
|
+
* @maxSize 6
|
|
1239
1236
|
*/
|
|
1240
|
-
|
|
1237
|
+
statuses?: SubscriptionStatusEnumSubscriptionStatus[];
|
|
1241
1238
|
}
|
|
1242
|
-
export
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
export interface ActionEvent {
|
|
1247
|
-
body?: string;
|
|
1248
|
-
}
|
|
1249
|
-
export interface MessageEnvelope {
|
|
1250
|
-
/** App instance ID. */
|
|
1251
|
-
instanceId?: string | null;
|
|
1252
|
-
/** Event type. */
|
|
1253
|
-
eventType?: string;
|
|
1254
|
-
/** The identification type and identity data. */
|
|
1255
|
-
identity?: IdentificationData;
|
|
1256
|
-
/** Stringify payload. */
|
|
1257
|
-
data?: string;
|
|
1258
|
-
}
|
|
1259
|
-
export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
1260
|
-
/** ID of a site visitor that has not logged in to the site. */
|
|
1261
|
-
anonymousVisitorId?: string;
|
|
1262
|
-
/** ID of a site visitor that has logged in to the site. */
|
|
1263
|
-
memberId?: string;
|
|
1264
|
-
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
1265
|
-
wixUserId?: string;
|
|
1266
|
-
/** ID of an app. */
|
|
1267
|
-
appId?: string;
|
|
1268
|
-
/** @readonly */
|
|
1269
|
-
identityType?: WebhookIdentityType;
|
|
1270
|
-
}
|
|
1271
|
-
/** @oneof */
|
|
1272
|
-
export interface IdentificationDataIdOneOf {
|
|
1273
|
-
/** ID of a site visitor that has not logged in to the site. */
|
|
1274
|
-
anonymousVisitorId?: string;
|
|
1275
|
-
/** ID of a site visitor that has logged in to the site. */
|
|
1276
|
-
memberId?: string;
|
|
1277
|
-
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
1278
|
-
wixUserId?: string;
|
|
1279
|
-
/** ID of an app. */
|
|
1280
|
-
appId?: string;
|
|
1281
|
-
}
|
|
1282
|
-
export declare enum WebhookIdentityType {
|
|
1283
|
-
UNKNOWN = "UNKNOWN",
|
|
1284
|
-
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
1285
|
-
MEMBER = "MEMBER",
|
|
1286
|
-
WIX_USER = "WIX_USER",
|
|
1287
|
-
APP = "APP"
|
|
1288
|
-
}
|
|
1289
|
-
export interface GetSubscriptionRequest {
|
|
1290
|
-
_id: string;
|
|
1291
|
-
}
|
|
1292
|
-
export interface GetSubscriptionResponse {
|
|
1293
|
-
subscription?: Subscription;
|
|
1294
|
-
}
|
|
1295
|
-
export interface CustomerCancelSubscriptionRequest {
|
|
1296
|
-
_id: string;
|
|
1297
|
-
/** Optional action reason message */
|
|
1298
|
-
reason?: string | null;
|
|
1299
|
-
}
|
|
1300
|
-
export interface CustomerCancelSubscriptionResponse {
|
|
1301
|
-
subscription?: Subscription;
|
|
1302
|
-
}
|
|
1303
|
-
export interface CustomerTurnOnAutoRenewalRequest {
|
|
1304
|
-
_id: string;
|
|
1305
|
-
/** Optional action reason message */
|
|
1306
|
-
reason?: string | null;
|
|
1307
|
-
}
|
|
1308
|
-
export interface CustomerTurnOnAutoRenewalResponse {
|
|
1309
|
-
subscription?: Subscription;
|
|
1310
|
-
}
|
|
1311
|
-
export interface CustomerTurnOffAutoRenewalRequest {
|
|
1312
|
-
_id: string;
|
|
1313
|
-
/** Optional action reason message */
|
|
1314
|
-
reason?: string | null;
|
|
1315
|
-
}
|
|
1316
|
-
export interface CustomerTurnOffAutoRenewalResponse {
|
|
1317
|
-
subscription?: Subscription;
|
|
1318
|
-
}
|
|
1319
|
-
export interface CustomerExtendSubscriptionRequest {
|
|
1320
|
-
/** The ID of the subscription to be extended */
|
|
1321
|
-
_id: string;
|
|
1322
|
-
/** Optional action reason message */
|
|
1323
|
-
reason?: string | null;
|
|
1324
|
-
/** For termed - Subscription end date will be updated with the extension period and number of cycles will be added */
|
|
1325
|
-
billingCyclesToAdd: number | null;
|
|
1326
|
-
}
|
|
1327
|
-
export interface CustomerExtendSubscriptionResponse {
|
|
1328
|
-
/** The now extended subscription */
|
|
1329
|
-
subscription?: Subscription;
|
|
1330
|
-
}
|
|
1331
|
-
export interface QuerySubscriptionsRequest {
|
|
1332
|
-
query?: QueryV2;
|
|
1333
|
-
}
|
|
1334
|
-
export interface QueryV2 extends QueryV2PagingMethodOneOf {
|
|
1335
|
-
/** Paging options to limit and skip the number of items. */
|
|
1336
|
-
paging?: Paging;
|
|
1337
|
-
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
|
|
1338
|
-
cursorPaging?: CursorPaging;
|
|
1339
|
-
/**
|
|
1340
|
-
* Filter object.
|
|
1341
|
-
*
|
|
1342
|
-
* Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
|
|
1343
|
-
*/
|
|
1344
|
-
filter?: Record<string, any> | null;
|
|
1345
|
-
/**
|
|
1346
|
-
* Sort object.
|
|
1347
|
-
*
|
|
1348
|
-
* Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
|
|
1349
|
-
*/
|
|
1350
|
-
sort?: Sorting[];
|
|
1351
|
-
/** Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned. */
|
|
1352
|
-
fields?: string[];
|
|
1353
|
-
/** Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned. */
|
|
1354
|
-
fieldsets?: string[];
|
|
1355
|
-
}
|
|
1356
|
-
/** @oneof */
|
|
1357
|
-
export interface QueryV2PagingMethodOneOf {
|
|
1358
|
-
/** Paging options to limit and skip the number of items. */
|
|
1359
|
-
paging?: Paging;
|
|
1360
|
-
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
|
|
1361
|
-
cursorPaging?: CursorPaging;
|
|
1362
|
-
}
|
|
1363
|
-
export interface Sorting {
|
|
1364
|
-
/** Name of the field to sort by. */
|
|
1365
|
-
fieldName?: string;
|
|
1366
|
-
/** Sort order. */
|
|
1367
|
-
order?: SortOrder;
|
|
1368
|
-
}
|
|
1369
|
-
export declare enum SortOrder {
|
|
1370
|
-
ASC = "ASC",
|
|
1371
|
-
DESC = "DESC"
|
|
1372
|
-
}
|
|
1373
|
-
export interface Paging {
|
|
1374
|
-
/** Number of items to load. */
|
|
1375
|
-
limit?: number | null;
|
|
1376
|
-
/** Number of items to skip in the current sort order. */
|
|
1377
|
-
offset?: number | null;
|
|
1378
|
-
}
|
|
1379
|
-
export interface QuerySubscriptionsResponse {
|
|
1380
|
-
subscriptions?: Subscription[];
|
|
1381
|
-
metadata?: PagingMetadataV2;
|
|
1382
|
-
}
|
|
1383
|
-
export interface CountSubscriptionsRequest {
|
|
1384
|
-
/** Filters to specify which subscriptions are counted. */
|
|
1385
|
-
filter?: CountSubscriptionFilter;
|
|
1386
|
-
}
|
|
1387
|
-
export interface CountSubscriptionFilter extends CountSubscriptionFilterStatusOneOf {
|
|
1388
|
-
/** List of statuses to filter the counted subscriptions by. */
|
|
1389
|
-
statuses?: SubscriptionStatus;
|
|
1390
|
-
/**
|
|
1391
|
-
* Predefined status combination to filter the counted subscriptions by.
|
|
1392
|
-
* + `ALL`: Includes these subscription statuses: `"DRAFT"`, `"PENDING"`, `"ACTIVE"`, `"PAUSED"`, `"ENDED"`, and `"CANCELED"`.
|
|
1393
|
-
* + `LIVE`: Includes these subscription statuses: `"PENDING"`, `"ACTIVE"`, and `"PAUSED"`.
|
|
1394
|
-
*/
|
|
1395
|
-
statusGroup?: SubscriptionStatusGroup;
|
|
1396
|
-
/**
|
|
1397
|
-
* Customer ID to filter the counted subscriptions by. You can pass a
|
|
1398
|
-
* [member ID](https://bo.wix.com/wix-docs/rest/members/members/member-object),
|
|
1399
|
-
* [contact ID](https://bo.wix.com/wix-docs/rest/crm/contacts/contacts-v4/contact-object),
|
|
1400
|
-
* or the ID of an anonymous site visitor as `customerId`. When providing a
|
|
1401
|
-
* `customerId` you must also specify a `paymentMethodId`.
|
|
1402
|
-
*/
|
|
1403
|
-
customerId?: string | null;
|
|
1404
|
-
/**
|
|
1405
|
-
* ID of the payment method to filter the counted subscriptions by.
|
|
1406
|
-
* You must provide a `paymentMethodId` when passing a `customerId`.
|
|
1407
|
-
*/
|
|
1408
|
-
paymentMethodId?: string | null;
|
|
1409
|
-
}
|
|
1410
|
-
/** @oneof */
|
|
1411
|
-
export interface CountSubscriptionFilterStatusOneOf {
|
|
1412
|
-
/** List of statuses to filter the counted subscriptions by. */
|
|
1413
|
-
statuses?: SubscriptionStatus;
|
|
1414
|
-
/**
|
|
1415
|
-
* Predefined status combination to filter the counted subscriptions by.
|
|
1416
|
-
* + `ALL`: Includes these subscription statuses: `"DRAFT"`, `"PENDING"`, `"ACTIVE"`, `"PAUSED"`, `"ENDED"`, and `"CANCELED"`.
|
|
1417
|
-
* + `LIVE`: Includes these subscription statuses: `"PENDING"`, `"ACTIVE"`, and `"PAUSED"`.
|
|
1418
|
-
*/
|
|
1419
|
-
statusGroup?: SubscriptionStatusGroup;
|
|
1420
|
-
}
|
|
1421
|
-
export interface SubscriptionStatus {
|
|
1422
|
-
/**
|
|
1423
|
-
* Statuses to filter the counted subscriptions by.
|
|
1424
|
-
*
|
|
1425
|
-
* Max: 6 statuses
|
|
1426
|
-
*/
|
|
1427
|
-
statuses?: SubscriptionStatusEnumSubscriptionStatus[];
|
|
1428
|
-
}
|
|
1429
|
-
export declare enum SubscriptionStatusGroup {
|
|
1430
|
-
ALL = "ALL",
|
|
1431
|
-
/** Union of ACTIVE, PAUSED and PENDING */
|
|
1432
|
-
LIVE = "LIVE"
|
|
1239
|
+
export declare enum SubscriptionStatusGroup {
|
|
1240
|
+
ALL = "ALL",
|
|
1241
|
+
/** Union of ACTIVE, PAUSED and PENDING */
|
|
1242
|
+
LIVE = "LIVE"
|
|
1433
1243
|
}
|
|
1434
1244
|
export interface CountSubscriptionsResponse {
|
|
1435
1245
|
/**
|
|
@@ -1447,14 +1257,19 @@ export interface CountByStatus {
|
|
|
1447
1257
|
count?: number;
|
|
1448
1258
|
}
|
|
1449
1259
|
export interface UpdateSubscriptionPaymentMethodRequest {
|
|
1450
|
-
/**
|
|
1260
|
+
/**
|
|
1261
|
+
* Subscription ID
|
|
1262
|
+
* @format GUID
|
|
1263
|
+
*/
|
|
1451
1264
|
_id: string;
|
|
1265
|
+
/** @format GUID */
|
|
1452
1266
|
paymentMethodId: string;
|
|
1453
1267
|
}
|
|
1454
1268
|
export interface UpdateSubscriptionPaymentMethodResponse {
|
|
1455
1269
|
subscription?: Subscription;
|
|
1456
1270
|
}
|
|
1457
1271
|
export interface CustomerAllowedActionsRequest {
|
|
1272
|
+
/** @format GUID */
|
|
1458
1273
|
_id: string;
|
|
1459
1274
|
}
|
|
1460
1275
|
export interface CustomerAllowedActionsResponse {
|
|
@@ -1488,7 +1303,10 @@ export declare enum ExtendPolicyType {
|
|
|
1488
1303
|
BILLING_CYCLE = "BILLING_CYCLE"
|
|
1489
1304
|
}
|
|
1490
1305
|
export interface CustomerListUpcomingChargesRequest {
|
|
1491
|
-
/**
|
|
1306
|
+
/**
|
|
1307
|
+
* Subscription id upcoming charge to be previewed for
|
|
1308
|
+
* @format GUID
|
|
1309
|
+
*/
|
|
1492
1310
|
_id: string;
|
|
1493
1311
|
}
|
|
1494
1312
|
export interface CustomerListUpcomingChargesResponse {
|
|
@@ -1515,11 +1333,15 @@ export interface InvoiceItem extends InvoiceItemPaymentTypeOneOf {
|
|
|
1515
1333
|
* time, not on a recurring basis.
|
|
1516
1334
|
*/
|
|
1517
1335
|
oneTime?: OneTime;
|
|
1518
|
-
/**
|
|
1336
|
+
/**
|
|
1337
|
+
* ID of the invoice line item.
|
|
1338
|
+
* @format GUID
|
|
1339
|
+
*/
|
|
1519
1340
|
_id?: string;
|
|
1520
1341
|
/**
|
|
1521
1342
|
* ID of the [subscription](https://bo.wix.com/wix-docs/rest/premium/premium-subscriptions-manager/subscription-object)
|
|
1522
1343
|
* that belongs to the invoice line item.
|
|
1344
|
+
* @format GUID
|
|
1523
1345
|
*/
|
|
1524
1346
|
subscriptionId?: string | null;
|
|
1525
1347
|
/**
|
|
@@ -1527,12 +1349,15 @@ export interface InvoiceItem extends InvoiceItemPaymentTypeOneOf {
|
|
|
1527
1349
|
* Typically the product name.
|
|
1528
1350
|
*
|
|
1529
1351
|
* Max: 200 characters
|
|
1352
|
+
* @minLength 1
|
|
1353
|
+
* @maxLength 200
|
|
1530
1354
|
*/
|
|
1531
1355
|
name?: string;
|
|
1532
1356
|
/**
|
|
1533
1357
|
* Description of the invoice line item.
|
|
1534
1358
|
*
|
|
1535
1359
|
* Max: 500 characters
|
|
1360
|
+
* @maxLength 500
|
|
1536
1361
|
*/
|
|
1537
1362
|
description?: string | null;
|
|
1538
1363
|
/** Information about the product from the external product catalog. */
|
|
@@ -1580,6 +1405,7 @@ export interface PriceDetails {
|
|
|
1580
1405
|
/**
|
|
1581
1406
|
* Price of the invoice line item in `0.00` format.
|
|
1582
1407
|
* A minus sign (-) indicates that the amount is negative.
|
|
1408
|
+
* @format DECIMAL_VALUE
|
|
1583
1409
|
*/
|
|
1584
1410
|
price?: string;
|
|
1585
1411
|
/** Information about the invoice line item's tax. */
|
|
@@ -1598,6 +1424,7 @@ export interface InvoiceDiscount extends InvoiceDiscountValueOneOf {
|
|
|
1598
1424
|
* Available when the discount is an amount.
|
|
1599
1425
|
*
|
|
1600
1426
|
* Min: `0.01`
|
|
1427
|
+
* @decimalValue options - {gt:0.00}
|
|
1601
1428
|
*/
|
|
1602
1429
|
amount?: string;
|
|
1603
1430
|
/**
|
|
@@ -1606,6 +1433,7 @@ export interface InvoiceDiscount extends InvoiceDiscountValueOneOf {
|
|
|
1606
1433
|
*
|
|
1607
1434
|
* Min: `0.01`
|
|
1608
1435
|
* Max: `100`
|
|
1436
|
+
* @decimalValue options - {gt:0.00,lte:100}
|
|
1609
1437
|
*/
|
|
1610
1438
|
percentage?: string;
|
|
1611
1439
|
/** Indicates the source of the discount. . Contains app_id and entity_id */
|
|
@@ -1618,6 +1446,7 @@ export interface InvoiceDiscountValueOneOf {
|
|
|
1618
1446
|
* Available when the discount is an amount.
|
|
1619
1447
|
*
|
|
1620
1448
|
* Min: `0.01`
|
|
1449
|
+
* @decimalValue options - {gt:0.00}
|
|
1621
1450
|
*/
|
|
1622
1451
|
amount?: string;
|
|
1623
1452
|
/**
|
|
@@ -1626,6 +1455,7 @@ export interface InvoiceDiscountValueOneOf {
|
|
|
1626
1455
|
*
|
|
1627
1456
|
* Min: `0.01`
|
|
1628
1457
|
* Max: `100`
|
|
1458
|
+
* @decimalValue options - {gt:0.00,lte:100}
|
|
1629
1459
|
*/
|
|
1630
1460
|
percentage?: string;
|
|
1631
1461
|
}
|
|
@@ -1634,6 +1464,7 @@ export interface InvoiceApplicationFee extends InvoiceApplicationFeeValueOneOf {
|
|
|
1634
1464
|
* Application fee amount. Set by the origin app, and not by BASS. Wix
|
|
1635
1465
|
* receives the full `applicationFee`, while the merchant doesn't receive
|
|
1636
1466
|
* any portion of it.
|
|
1467
|
+
* @format DECIMAL_VALUE
|
|
1637
1468
|
*/
|
|
1638
1469
|
amount?: string;
|
|
1639
1470
|
/** Information about the discount for the invoice line item's application fee. */
|
|
@@ -1645,34 +1476,63 @@ export interface InvoiceApplicationFeeValueOneOf {
|
|
|
1645
1476
|
* Application fee amount. Set by the origin app, and not by BASS. Wix
|
|
1646
1477
|
* receives the full `applicationFee`, while the merchant doesn't receive
|
|
1647
1478
|
* any portion of it.
|
|
1479
|
+
* @format DECIMAL_VALUE
|
|
1648
1480
|
*/
|
|
1649
1481
|
amount?: string;
|
|
1650
1482
|
}
|
|
1651
1483
|
export interface ItemTaxData {
|
|
1652
1484
|
/** Aggregated tax from tax_breakdowns */
|
|
1653
1485
|
lineItemTaxSummary?: LineItemTaxSummary;
|
|
1654
|
-
/**
|
|
1486
|
+
/**
|
|
1487
|
+
* A detailed description of all the tax authorities applied on this item.
|
|
1488
|
+
* @minSize 1
|
|
1489
|
+
* @maxSize 100
|
|
1490
|
+
*/
|
|
1655
1491
|
taxBreakdowns?: TaxBreakdown[];
|
|
1656
1492
|
}
|
|
1657
1493
|
export interface LineItemTaxSummary {
|
|
1658
|
-
/**
|
|
1494
|
+
/**
|
|
1495
|
+
* Calculated from external tax summary
|
|
1496
|
+
* @format DECIMAL_VALUE
|
|
1497
|
+
*/
|
|
1659
1498
|
aggregatedTaxAmount?: string;
|
|
1660
|
-
/**
|
|
1499
|
+
/**
|
|
1500
|
+
* Aggregated from tax_breakdowns
|
|
1501
|
+
* @decimalValue options - {gte:0,maxScale:6}
|
|
1502
|
+
*/
|
|
1661
1503
|
aggregatedTaxRate?: string;
|
|
1662
|
-
/**
|
|
1504
|
+
/**
|
|
1505
|
+
* Total taxable amount for this line item.
|
|
1506
|
+
* @format DECIMAL_VALUE
|
|
1507
|
+
* @decimalValue options - {maxScale:4}
|
|
1508
|
+
*/
|
|
1663
1509
|
taxableAmount?: string;
|
|
1664
|
-
/**
|
|
1510
|
+
/**
|
|
1511
|
+
* Aggregated from tax_breakdowns after applying exemptions
|
|
1512
|
+
* @format DECIMAL_VALUE
|
|
1513
|
+
* @decimalValue options - {maxScale:4}
|
|
1514
|
+
*/
|
|
1665
1515
|
finalTaxAmount?: string | null;
|
|
1666
1516
|
}
|
|
1667
1517
|
export interface TaxBreakdown {
|
|
1668
1518
|
taxType?: string;
|
|
1519
|
+
/** @decimalValue options - {maxScale:4} */
|
|
1669
1520
|
taxRate?: string;
|
|
1521
|
+
/** @format DECIMAL_VALUE */
|
|
1670
1522
|
taxAmount?: string | null;
|
|
1523
|
+
/** @format DECIMAL_VALUE */
|
|
1671
1524
|
taxableAmount?: string | null;
|
|
1525
|
+
/** @format DECIMAL_VALUE */
|
|
1672
1526
|
nonTaxableAmount?: string | null;
|
|
1673
|
-
/**
|
|
1527
|
+
/**
|
|
1528
|
+
* Name of the tax that was calculated. For example, "NY State Sales Tax", "Quebec GST", etc.
|
|
1529
|
+
* @maxLength 200
|
|
1530
|
+
*/
|
|
1674
1531
|
taxName?: string | null;
|
|
1675
|
-
/**
|
|
1532
|
+
/**
|
|
1533
|
+
* Jurisdiction that taxes were calculated for.
|
|
1534
|
+
* @maxLength 200
|
|
1535
|
+
*/
|
|
1676
1536
|
jurisdiction?: string | null;
|
|
1677
1537
|
/** Type of jurisdiction that taxes were calculated for. */
|
|
1678
1538
|
jurisdictionType?: string;
|
|
@@ -1682,6 +1542,13 @@ export interface InitiatePaymentMethodSetupRequest {
|
|
|
1682
1542
|
paymentMode?: PaymentMode;
|
|
1683
1543
|
paymentSettings?: PaymentSettings;
|
|
1684
1544
|
}
|
|
1545
|
+
export declare enum PaymentMode {
|
|
1546
|
+
NONE = "NONE",
|
|
1547
|
+
/** The latest invoice of the subscription will be charged. */
|
|
1548
|
+
CHARGE = "CHARGE",
|
|
1549
|
+
/** An authorization invoice with zero amount will be created. */
|
|
1550
|
+
AUTHORIZATION = "AUTHORIZATION"
|
|
1551
|
+
}
|
|
1685
1552
|
export interface PaymentSettings {
|
|
1686
1553
|
/** Allowed payment providers for Subscriptions, for example to limit subscriptions to be created only with "Wix Payments" provider. */
|
|
1687
1554
|
allowedProviderIds?: string[];
|
|
@@ -1689,6 +1556,7 @@ export interface PaymentSettings {
|
|
|
1689
1556
|
orderMethod?: OrderMethod;
|
|
1690
1557
|
/** Wix Pay callback url(s) to return buyer to a third party system */
|
|
1691
1558
|
redirectUrls?: RedirectUrls;
|
|
1559
|
+
/** @format GUID */
|
|
1692
1560
|
paymentMethodId?: string | null;
|
|
1693
1561
|
/**
|
|
1694
1562
|
* Specifies an alternative origin for processing the payment.
|
|
@@ -1716,457 +1584,1166 @@ export interface RedirectUrls {
|
|
|
1716
1584
|
pendingUrl?: string;
|
|
1717
1585
|
}
|
|
1718
1586
|
export interface PaymentOrigin {
|
|
1719
|
-
/**
|
|
1587
|
+
/**
|
|
1588
|
+
* ID of the app for which the Payment will create the order on. For example, Paypal.
|
|
1589
|
+
* @format GUID
|
|
1590
|
+
*/
|
|
1720
1591
|
appId?: string;
|
|
1721
|
-
/**
|
|
1592
|
+
/**
|
|
1593
|
+
* Id of the entity that order will be created on
|
|
1594
|
+
* @format GUID
|
|
1595
|
+
*/
|
|
1722
1596
|
instanceId?: string;
|
|
1723
1597
|
}
|
|
1724
1598
|
export interface InitiatePaymentMethodSetupResponse {
|
|
1599
|
+
/** @format GUID */
|
|
1725
1600
|
paymentOrderId?: string;
|
|
1726
1601
|
}
|
|
1727
|
-
export interface
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
}
|
|
1733
|
-
export interface InvoiceAction extends InvoiceActionActionTypeOneOf {
|
|
1734
|
-
payRecurring?: PayRecurringInvoice;
|
|
1735
|
-
}
|
|
1736
|
-
/** @oneof */
|
|
1737
|
-
export interface InvoiceActionActionTypeOneOf {
|
|
1738
|
-
payRecurring?: PayRecurringInvoice;
|
|
1739
|
-
}
|
|
1740
|
-
export interface PayRecurringInvoice {
|
|
1741
|
-
invoiceId?: string;
|
|
1742
|
-
}
|
|
1743
|
-
export interface CreateSubscriptionRequest {
|
|
1744
|
-
subscription?: Subscription;
|
|
1745
|
-
/** Optional settings for the payments. Should be empty for free subscriptions. */
|
|
1746
|
-
paymentSettings?: PaymentSettings;
|
|
1747
|
-
/** Optional unique identifier for this request in order to prevent subscription duplications */
|
|
1748
|
-
idempotencyKey?: string | null;
|
|
1749
|
-
/** Optional origin override for setting identity of subscription creator instead of extracting from context */
|
|
1750
|
-
originOverride?: OriginOverride;
|
|
1751
|
-
}
|
|
1752
|
-
export interface OriginOverride {
|
|
1753
|
-
appId?: string;
|
|
1754
|
-
instanceId?: string;
|
|
1755
|
-
}
|
|
1756
|
-
export interface CreateSubscriptionResponse {
|
|
1757
|
-
subscription?: Subscription;
|
|
1758
|
-
/** Payments order that should be paid (or authorize card) in order to activate subscription. Empty for free subscriptions. */
|
|
1759
|
-
paymentOrderId?: string | null;
|
|
1760
|
-
}
|
|
1761
|
-
export interface UpdateSubscriptionRequest {
|
|
1762
|
-
/** Revision is validated if Subscription.revision is set */
|
|
1763
|
-
subscription?: Subscription;
|
|
1602
|
+
export interface DomainEvent extends DomainEventBodyOneOf {
|
|
1603
|
+
createdEvent?: EntityCreatedEvent;
|
|
1604
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
1605
|
+
deletedEvent?: EntityDeletedEvent;
|
|
1606
|
+
actionEvent?: ActionEvent;
|
|
1764
1607
|
/**
|
|
1765
|
-
*
|
|
1766
|
-
*
|
|
1608
|
+
* Unique event ID.
|
|
1609
|
+
* Allows clients to ignore duplicate webhooks.
|
|
1767
1610
|
*/
|
|
1768
|
-
fieldMask?: string[];
|
|
1769
|
-
}
|
|
1770
|
-
export interface UpdateSubscriptionResponse {
|
|
1771
|
-
subscription?: Subscription;
|
|
1772
|
-
}
|
|
1773
|
-
export interface UpdateSubscriptionStartDateRequest {
|
|
1774
|
-
/** Subscription ID */
|
|
1775
1611
|
_id?: string;
|
|
1776
1612
|
/**
|
|
1777
|
-
*
|
|
1778
|
-
*
|
|
1779
|
-
* cycles_to_pay_on_creation will be set to 1 if no free trial is set
|
|
1613
|
+
* Assumes actions are also always typed to an entity_type
|
|
1614
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
1780
1615
|
*/
|
|
1781
|
-
|
|
1782
|
-
}
|
|
1783
|
-
export interface UpdateSubscriptionStartDateResponse {
|
|
1784
|
-
subscription?: Subscription;
|
|
1785
|
-
}
|
|
1786
|
-
export interface UpdateSubscriptionPoliciesRequest {
|
|
1787
|
-
/** Subscription ID */
|
|
1788
|
-
_id?: string;
|
|
1789
|
-
cancellableByCustomer?: boolean | null;
|
|
1790
|
-
}
|
|
1791
|
-
export interface UpdateSubscriptionPoliciesResponse {
|
|
1792
|
-
/** Updated policies of the subscription */
|
|
1793
|
-
policies?: SubscriptionPolicies;
|
|
1794
|
-
}
|
|
1795
|
-
export interface UpdateSubscriptionBillingDateRequest {
|
|
1796
|
-
/** ID of the subscription to update the billing date for. */
|
|
1797
|
-
_id: string;
|
|
1798
|
-
/** New billing date in `YYYY-MM-DDThh:mm:ss:sssZ` format. */
|
|
1799
|
-
billingDate: Date | null;
|
|
1616
|
+
entityFqdn?: string;
|
|
1800
1617
|
/**
|
|
1801
|
-
*
|
|
1802
|
-
*
|
|
1803
|
-
*
|
|
1804
|
-
* amount based on the number of days added to or removed from the current billing
|
|
1805
|
-
* cycle. Alternatively, you can use your own custom method to calculate the
|
|
1806
|
-
* proration amount. The custom proration amount can't exceed the total of the
|
|
1807
|
-
* current billing cycle.
|
|
1618
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
1619
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
1620
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
1808
1621
|
*/
|
|
1809
|
-
|
|
1622
|
+
slug?: string;
|
|
1623
|
+
/** ID of the entity associated with the event. */
|
|
1624
|
+
entityId?: string;
|
|
1625
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
1626
|
+
eventTime?: Date | null;
|
|
1627
|
+
/**
|
|
1628
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
1629
|
+
* (for example, GDPR).
|
|
1630
|
+
*/
|
|
1631
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
1632
|
+
/** If present, indicates the action that triggered the event. */
|
|
1633
|
+
originatedFrom?: string | null;
|
|
1634
|
+
/**
|
|
1635
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
1636
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
1637
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
1638
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
1639
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
1640
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
1641
|
+
*/
|
|
1642
|
+
entityEventSequence?: string | null;
|
|
1810
1643
|
}
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1644
|
+
/** @oneof */
|
|
1645
|
+
export interface DomainEventBodyOneOf {
|
|
1646
|
+
createdEvent?: EntityCreatedEvent;
|
|
1647
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
1648
|
+
deletedEvent?: EntityDeletedEvent;
|
|
1649
|
+
actionEvent?: ActionEvent;
|
|
1814
1650
|
}
|
|
1815
|
-
export interface
|
|
1816
|
-
|
|
1817
|
-
_id?: string;
|
|
1818
|
-
/** Origin entity ID of the subscription to update. */
|
|
1819
|
-
entityId?: string;
|
|
1651
|
+
export interface EntityCreatedEvent {
|
|
1652
|
+
entity?: string;
|
|
1820
1653
|
}
|
|
1821
|
-
export interface
|
|
1822
|
-
|
|
1823
|
-
subscription?: Subscription;
|
|
1654
|
+
export interface RestoreInfo {
|
|
1655
|
+
deletedDate?: Date | null;
|
|
1824
1656
|
}
|
|
1825
|
-
export interface
|
|
1826
|
-
/**
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1657
|
+
export interface EntityUpdatedEvent {
|
|
1658
|
+
/**
|
|
1659
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
1660
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
1661
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
1662
|
+
*/
|
|
1663
|
+
currentEntity?: string;
|
|
1830
1664
|
}
|
|
1831
|
-
export interface
|
|
1832
|
-
|
|
1665
|
+
export interface EntityDeletedEvent {
|
|
1666
|
+
/** Entity that was deleted */
|
|
1667
|
+
deletedEntity?: string | null;
|
|
1833
1668
|
}
|
|
1834
|
-
export interface
|
|
1835
|
-
|
|
1836
|
-
_id?: string;
|
|
1837
|
-
/** Update action. For RESET_PENDING_UPDATES, nothing but the subscription ID should be defined in the request. */
|
|
1838
|
-
updateAction?: UpdateAction;
|
|
1839
|
-
/** Updates execution date. Relevant only for UpdateAction.SPECIFIC_DATE. Only specific date is supported. */
|
|
1840
|
-
scheduleAdditionalInfo?: ScheduleAdditionalInfo;
|
|
1841
|
-
/** Existing items to update */
|
|
1842
|
-
itemsToUpdate?: ItemChange[];
|
|
1843
|
-
/** Items to add */
|
|
1844
|
-
itemsToAdd?: Item[];
|
|
1845
|
-
/** Existing items to delete */
|
|
1846
|
-
itemsToDelete?: string[] | null;
|
|
1669
|
+
export interface ActionEvent {
|
|
1670
|
+
body?: string;
|
|
1847
1671
|
}
|
|
1848
|
-
export interface
|
|
1672
|
+
export interface MessageEnvelope {
|
|
1849
1673
|
/**
|
|
1850
|
-
*
|
|
1851
|
-
* format
|
|
1852
|
-
* For example, in _Bulk Update Subscription Items_ it's only available in
|
|
1853
|
-
* combination with `{"updateAction": "SPECIFIC_DATE"}`, in _Resume Subscription_
|
|
1854
|
-
* only in combination with `{"resumeAt": "SPECIFIC_DATE"}`, and in
|
|
1855
|
-
* _Pause Subscription_ only in combination with `{"pauseAt": "SPECIFIC_DATE"}`.
|
|
1674
|
+
* App instance ID.
|
|
1675
|
+
* @format GUID
|
|
1856
1676
|
*/
|
|
1857
|
-
|
|
1677
|
+
instanceId?: string | null;
|
|
1858
1678
|
/**
|
|
1859
|
-
*
|
|
1860
|
-
*
|
|
1861
|
-
* For example, in _Pause Subscription_ it's only available in
|
|
1862
|
-
* combination with `{"pauseAt": "NUMBER_OF_CYCLES_FROM_TODAY"}`.
|
|
1863
|
-
* __Note__: Currently not supported in _Bulk Update Subscription Items by Filter_.
|
|
1679
|
+
* Event type.
|
|
1680
|
+
* @maxLength 150
|
|
1864
1681
|
*/
|
|
1865
|
-
|
|
1682
|
+
eventType?: string;
|
|
1683
|
+
/** The identification type and identity data. */
|
|
1684
|
+
identity?: IdentificationData;
|
|
1685
|
+
/** Stringify payload. */
|
|
1686
|
+
data?: string;
|
|
1866
1687
|
}
|
|
1867
|
-
|
|
1868
|
-
export interface ScheduleAdditionalInfoParamOneOf {
|
|
1688
|
+
export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
1869
1689
|
/**
|
|
1870
|
-
*
|
|
1871
|
-
* format
|
|
1872
|
-
* For example, in _Bulk Update Subscription Items_ it's only available in
|
|
1873
|
-
* combination with `{"updateAction": "SPECIFIC_DATE"}`, in _Resume Subscription_
|
|
1874
|
-
* only in combination with `{"resumeAt": "SPECIFIC_DATE"}`, and in
|
|
1875
|
-
* _Pause Subscription_ only in combination with `{"pauseAt": "SPECIFIC_DATE"}`.
|
|
1690
|
+
* ID of a site visitor that has not logged in to the site.
|
|
1691
|
+
* @format GUID
|
|
1876
1692
|
*/
|
|
1877
|
-
|
|
1693
|
+
anonymousVisitorId?: string;
|
|
1878
1694
|
/**
|
|
1879
|
-
*
|
|
1880
|
-
*
|
|
1881
|
-
* For example, in _Pause Subscription_ it's only available in
|
|
1882
|
-
* combination with `{"pauseAt": "NUMBER_OF_CYCLES_FROM_TODAY"}`.
|
|
1883
|
-
* __Note__: Currently not supported in _Bulk Update Subscription Items by Filter_.
|
|
1695
|
+
* ID of a site visitor that has logged in to the site.
|
|
1696
|
+
* @format GUID
|
|
1884
1697
|
*/
|
|
1885
|
-
|
|
1886
|
-
}
|
|
1887
|
-
export interface UpdateSubscriptionItemsResponse {
|
|
1888
|
-
subscription?: Subscription;
|
|
1889
|
-
}
|
|
1890
|
-
export interface BulkUpdateSubscriptionItemsByFilterRequest {
|
|
1698
|
+
memberId?: string;
|
|
1891
1699
|
/**
|
|
1892
|
-
*
|
|
1893
|
-
*
|
|
1894
|
-
* [Search and Query: Bulk Update Subscription Items By Filter](https://bo.wix.com/wix-docs/rest/drafts/subscriptions-by-billing-by-wix/search-and-query#drafts_subscriptions-by-billing-by-wix_search-and-query_bulk-update-subscription-items-by-filter).
|
|
1895
|
-
* Sending an empty subscription filter results in a validation error.
|
|
1896
|
-
* In case you pass `{"updateAction": "RESET_PENDING_UPDATES"}`, use only the
|
|
1897
|
-
* `subscriptionId` field inside this filter. Passing any other filter results
|
|
1898
|
-
* in a failed validation error.
|
|
1700
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
1701
|
+
* @format GUID
|
|
1899
1702
|
*/
|
|
1900
|
-
|
|
1703
|
+
wixUserId?: string;
|
|
1901
1704
|
/**
|
|
1902
|
-
*
|
|
1903
|
-
*
|
|
1904
|
-
* with matching `items.catalogReference.catalogItemId` are updated.
|
|
1905
|
-
*
|
|
1906
|
-
* Max: `100` reference catalog item IDs
|
|
1705
|
+
* ID of an app.
|
|
1706
|
+
* @format GUID
|
|
1907
1707
|
*/
|
|
1908
|
-
|
|
1708
|
+
appId?: string;
|
|
1709
|
+
/** @readonly */
|
|
1710
|
+
identityType?: WebhookIdentityType;
|
|
1711
|
+
}
|
|
1712
|
+
/** @oneof */
|
|
1713
|
+
export interface IdentificationDataIdOneOf {
|
|
1909
1714
|
/**
|
|
1910
|
-
*
|
|
1911
|
-
*
|
|
1912
|
-
* + `"IMMEDIATELY"`: The updates become effective immediately.
|
|
1913
|
-
* + `"NEXT_BILLING_CYCLE"`: The updates are scheduled for the beginning of the next billing cycle.
|
|
1914
|
-
* + `"SPECIFIC_DATE"`: The updates are scheduled for the date specified in `scheduleAdditionalInfo.specificDate`.
|
|
1915
|
-
* + `"RESET_PENDING_UPDATES"`: All currently scheduled updates for the specified supcriptions are canceled. Use only the `subscriptionId` field inside `subscriptionFilter`, all other filters result in failed validation errors.
|
|
1715
|
+
* ID of a site visitor that has not logged in to the site.
|
|
1716
|
+
* @format GUID
|
|
1916
1717
|
*/
|
|
1917
|
-
|
|
1718
|
+
anonymousVisitorId?: string;
|
|
1918
1719
|
/**
|
|
1919
|
-
*
|
|
1920
|
-
*
|
|
1720
|
+
* ID of a site visitor that has logged in to the site.
|
|
1721
|
+
* @format GUID
|
|
1921
1722
|
*/
|
|
1922
|
-
|
|
1723
|
+
memberId?: string;
|
|
1923
1724
|
/**
|
|
1924
|
-
*
|
|
1925
|
-
*
|
|
1926
|
-
* that all item properties are updated to the same values. In case you want set
|
|
1927
|
-
* different values for individual items, you must call
|
|
1928
|
-
* _Bulk Update Subscription Items By Filter_ multiple times, once per unique update.
|
|
1725
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
1726
|
+
* @format GUID
|
|
1929
1727
|
*/
|
|
1930
|
-
|
|
1931
|
-
/** __Not implemented yet__. Items to add to the subscriptions matching the filtering. */
|
|
1932
|
-
itemsToAdd?: Item[];
|
|
1933
|
-
}
|
|
1934
|
-
export interface BulkItemChange {
|
|
1935
|
-
/** Information about the new item price. */
|
|
1936
|
-
pricingModel?: PricingModel;
|
|
1728
|
+
wixUserId?: string;
|
|
1937
1729
|
/**
|
|
1938
|
-
*
|
|
1939
|
-
*
|
|
1940
|
-
* Min: `1`
|
|
1730
|
+
* ID of an app.
|
|
1731
|
+
* @format GUID
|
|
1941
1732
|
*/
|
|
1942
|
-
|
|
1943
|
-
/** Information about the new item tax. */
|
|
1944
|
-
tax?: Tax;
|
|
1733
|
+
appId?: string;
|
|
1945
1734
|
}
|
|
1946
|
-
export
|
|
1735
|
+
export declare enum WebhookIdentityType {
|
|
1736
|
+
UNKNOWN = "UNKNOWN",
|
|
1737
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
1738
|
+
MEMBER = "MEMBER",
|
|
1739
|
+
WIX_USER = "WIX_USER",
|
|
1740
|
+
APP = "APP"
|
|
1741
|
+
}
|
|
1742
|
+
export interface CreateSubscriptionInStateRequest extends CreateSubscriptionInStateRequestModeOneOf {
|
|
1743
|
+
activeSubscription?: CreateSubscriptionRequest;
|
|
1744
|
+
}
|
|
1745
|
+
/** @oneof */
|
|
1746
|
+
export interface CreateSubscriptionInStateRequestModeOneOf {
|
|
1747
|
+
activeSubscription?: CreateSubscriptionRequest;
|
|
1748
|
+
}
|
|
1749
|
+
export interface CreateSubscriptionRequest {
|
|
1750
|
+
subscription?: Subscription;
|
|
1751
|
+
/** Optional settings for the payments. Should be empty for free subscriptions. */
|
|
1752
|
+
paymentSettings?: PaymentSettings;
|
|
1947
1753
|
/**
|
|
1948
|
-
*
|
|
1949
|
-
*
|
|
1950
|
-
* to retrieve information about the job status.
|
|
1754
|
+
* Optional unique identifier for this request in order to prevent subscription duplications
|
|
1755
|
+
* @format GUID
|
|
1951
1756
|
*/
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
_id?: string;
|
|
1956
|
-
revision?: string;
|
|
1757
|
+
idempotencyKey?: string | null;
|
|
1758
|
+
/** Optional origin override for setting identity of subscription creator instead of extracting from context */
|
|
1759
|
+
originOverride?: OriginOverride;
|
|
1957
1760
|
}
|
|
1958
|
-
export interface
|
|
1761
|
+
export interface OriginOverride {
|
|
1762
|
+
/** @format GUID */
|
|
1763
|
+
appId?: string;
|
|
1764
|
+
/** @format GUID */
|
|
1765
|
+
instanceId?: string;
|
|
1959
1766
|
}
|
|
1960
|
-
export interface
|
|
1961
|
-
|
|
1962
|
-
|
|
1767
|
+
export interface CreateSubscriptionInStateResponse {
|
|
1768
|
+
/** @format GUID */
|
|
1769
|
+
subscriptionId?: string;
|
|
1963
1770
|
}
|
|
1964
|
-
export interface
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1771
|
+
export interface PayCycleRequest {
|
|
1772
|
+
/** @format GUID */
|
|
1773
|
+
subscriptionId: string;
|
|
1774
|
+
paymentTestMode?: PaymentTestMode;
|
|
1775
|
+
/** @format GUID */
|
|
1776
|
+
tenantId: string;
|
|
1968
1777
|
}
|
|
1969
|
-
export declare enum
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1778
|
+
export declare enum PaymentTestMode {
|
|
1779
|
+
REGULAR = "REGULAR",
|
|
1780
|
+
FAIL_TECHNICAL = "FAIL_TECHNICAL",
|
|
1781
|
+
FAIL_DECLINE = "FAIL_DECLINE",
|
|
1782
|
+
FAIL_RETRYABLE_DECLINE = "FAIL_RETRYABLE_DECLINE"
|
|
1974
1783
|
}
|
|
1975
|
-
export interface
|
|
1784
|
+
export interface PayCycleResponse {
|
|
1785
|
+
/** @format GUID */
|
|
1786
|
+
invoiceId?: string;
|
|
1787
|
+
/** @format GUID */
|
|
1788
|
+
paymentOrderId?: string | null;
|
|
1976
1789
|
subscription?: Subscription;
|
|
1977
1790
|
}
|
|
1978
|
-
export interface
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
pauseAt?: PauseAt;
|
|
1982
|
-
/** contains additional scheduling information for certain pause_at options (for example: SPECIFIC_DATE & NUMBER_OF_CYCLES_FROM_TODAY) */
|
|
1983
|
-
pauseAtSchedule?: ScheduleAdditionalInfo;
|
|
1984
|
-
/** contains additional scheduling information for certain auto_resume_at either specific date */
|
|
1985
|
-
autoResumeAtSchedule?: ScheduleAdditionalInfo;
|
|
1986
|
-
actionContext: ActionContext;
|
|
1791
|
+
export interface GetFullSubscriptionDataRequest {
|
|
1792
|
+
/** @format GUID */
|
|
1793
|
+
_id?: string;
|
|
1987
1794
|
}
|
|
1988
|
-
export interface
|
|
1795
|
+
export interface GetFullSubscriptionDataResponse {
|
|
1989
1796
|
subscription?: Subscription;
|
|
1797
|
+
internalSubscriptionData?: InternalSubscriptionData;
|
|
1990
1798
|
}
|
|
1991
|
-
export interface
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
1799
|
+
export interface InternalSubscriptionData {
|
|
1800
|
+
/** @format GUID */
|
|
1801
|
+
originInstanceId?: string;
|
|
1802
|
+
source?: string | null;
|
|
1803
|
+
billingType?: string;
|
|
1804
|
+
isOneTime?: boolean;
|
|
1805
|
+
migrationDetails?: MigrationDetails;
|
|
1806
|
+
pausePaidDuration?: string | null;
|
|
1807
|
+
authorizationPaymentData?: PaymentData;
|
|
1808
|
+
currentCyclePausePeriods?: PausePeriod[];
|
|
2000
1809
|
}
|
|
2001
|
-
export interface
|
|
2002
|
-
/**
|
|
2003
|
-
|
|
2004
|
-
/**
|
|
2005
|
-
|
|
2006
|
-
/** A filter object */
|
|
2007
|
-
filter?: any;
|
|
2008
|
-
/** A Sorting option by field name and order. */
|
|
2009
|
-
sorting?: SortingClauses;
|
|
1810
|
+
export interface MigrationDetails {
|
|
1811
|
+
/** system (application) where the Subscription has been created */
|
|
1812
|
+
originSystem?: string;
|
|
1813
|
+
/** date when the Subscription started to be managed in BASS */
|
|
1814
|
+
shiftManagementDate?: Date | null;
|
|
2010
1815
|
}
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
paging?: Paging;
|
|
2015
|
-
/** A Cursor option for efficient paging. Pass this field from the previous search response to continue to the next page. */
|
|
2016
|
-
cursor?: CursorPaging;
|
|
1816
|
+
export interface PausePeriod {
|
|
1817
|
+
startDate?: Date | null;
|
|
1818
|
+
endDate?: Date | null;
|
|
2017
1819
|
}
|
|
2018
|
-
export interface
|
|
2019
|
-
|
|
1820
|
+
export interface GetSubscriptionAndInternalDataRequest {
|
|
1821
|
+
/** @format GUID */
|
|
1822
|
+
subscriptionId?: string;
|
|
1823
|
+
/** @format GUID */
|
|
1824
|
+
tenantId?: string;
|
|
2020
1825
|
}
|
|
2021
|
-
export interface
|
|
2022
|
-
|
|
2023
|
-
|
|
1826
|
+
export interface GetSubscriptionAndInternalDataResponse {
|
|
1827
|
+
subscription?: Subscription;
|
|
1828
|
+
internalSubscriptionData?: InternalSubscriptionData;
|
|
2024
1829
|
}
|
|
2025
|
-
export interface
|
|
2026
|
-
|
|
2027
|
-
|
|
1830
|
+
export interface SearchSubscriptionRequest {
|
|
1831
|
+
/** @format GUID */
|
|
1832
|
+
_id?: string;
|
|
1833
|
+
/** @format GUID */
|
|
1834
|
+
tenantId?: string;
|
|
2028
1835
|
}
|
|
2029
|
-
export interface
|
|
1836
|
+
export interface SearchSubscriptionResponse {
|
|
2030
1837
|
subscription?: Subscription;
|
|
2031
1838
|
}
|
|
2032
|
-
export interface
|
|
2033
|
-
|
|
2034
|
-
|
|
1839
|
+
export interface UpdatePausePaidDurationRequest {
|
|
1840
|
+
/** @format GUID */
|
|
1841
|
+
subscriptionId?: string;
|
|
1842
|
+
/**
|
|
1843
|
+
* @min 1
|
|
1844
|
+
* @max 10000000
|
|
1845
|
+
*/
|
|
1846
|
+
pausePaidDurationSeconds?: string;
|
|
1847
|
+
/** @format GUID */
|
|
1848
|
+
tenantId?: string;
|
|
2035
1849
|
}
|
|
2036
|
-
export interface
|
|
1850
|
+
export interface UpdatePausePaidDurationResponse {
|
|
1851
|
+
}
|
|
1852
|
+
export interface UpdateStatusRequest {
|
|
1853
|
+
/** @format GUID */
|
|
1854
|
+
subscriptionId?: string;
|
|
1855
|
+
/** @format GUID */
|
|
1856
|
+
tenantId?: string;
|
|
1857
|
+
status?: SubscriptionStatusEnumSubscriptionStatus;
|
|
1858
|
+
}
|
|
1859
|
+
export interface UpdateStatusResponse {
|
|
2037
1860
|
subscription?: Subscription;
|
|
2038
1861
|
}
|
|
2039
|
-
export interface
|
|
2040
|
-
/**
|
|
2041
|
-
subscriptionId
|
|
1862
|
+
export interface UpdatePaymentStatusRequest {
|
|
1863
|
+
/** @format GUID */
|
|
1864
|
+
subscriptionId?: string;
|
|
1865
|
+
/** @format GUID */
|
|
1866
|
+
tenantId?: string;
|
|
1867
|
+
paymentStatus?: PaymentStatus;
|
|
2042
1868
|
}
|
|
2043
|
-
export interface
|
|
1869
|
+
export interface UpdatePaymentStatusResponse {
|
|
2044
1870
|
subscription?: Subscription;
|
|
2045
1871
|
}
|
|
2046
|
-
export interface
|
|
2047
|
-
/**
|
|
2048
|
-
|
|
2049
|
-
/**
|
|
2050
|
-
|
|
1872
|
+
export interface ReviveSubscriptionRequest {
|
|
1873
|
+
/** @format GUID */
|
|
1874
|
+
tenantId?: string;
|
|
1875
|
+
/** @format GUID */
|
|
1876
|
+
subscriptionId?: string;
|
|
1877
|
+
revivePolicy?: RevivePolicy;
|
|
1878
|
+
isTestRun?: boolean;
|
|
2051
1879
|
}
|
|
2052
|
-
export
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
/**
|
|
2056
|
-
* The subscription cycle for which the invoice is to be marked as paid.
|
|
2057
|
-
* If left empty, the most recent cycle will be selected.
|
|
2058
|
-
*/
|
|
2059
|
-
paidCycle?: number | null;
|
|
1880
|
+
export declare enum RevivePolicy {
|
|
1881
|
+
SIMPLE = "SIMPLE",
|
|
1882
|
+
RESUME = "RESUME"
|
|
2060
1883
|
}
|
|
2061
|
-
export interface
|
|
1884
|
+
export interface ReviveSubscriptionResponse {
|
|
2062
1885
|
subscription?: Subscription;
|
|
2063
1886
|
}
|
|
2064
|
-
export interface
|
|
1887
|
+
export interface ConvertSapiRequest {
|
|
1888
|
+
/** @format GUID */
|
|
1889
|
+
subscriptionId?: string;
|
|
2065
1890
|
}
|
|
2066
|
-
export interface
|
|
2067
|
-
|
|
2068
|
-
total?: number;
|
|
1891
|
+
export interface ConvertSapiResponse {
|
|
1892
|
+
subscription?: Subscription;
|
|
2069
1893
|
}
|
|
2070
|
-
export interface
|
|
2071
|
-
|
|
2072
|
-
|
|
1894
|
+
export interface GetSubscriptionInvoicesRequest {
|
|
1895
|
+
/** @format GUID */
|
|
1896
|
+
_id?: string;
|
|
2073
1897
|
}
|
|
2074
|
-
export interface
|
|
2075
|
-
|
|
2076
|
-
extensionPeriod?: Duration;
|
|
2077
|
-
/** user will be charged for billing cycles added */
|
|
2078
|
-
extensionBillingCycles?: number;
|
|
2079
|
-
/** The ID of the subscription to be extended */
|
|
2080
|
-
_id: string;
|
|
2081
|
-
actionContext: ActionContext;
|
|
1898
|
+
export interface GetSubscriptionInvoicesResponse {
|
|
1899
|
+
invoices?: SubscriptionInvoice[];
|
|
2082
1900
|
}
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
extensionBillingCycles?: number;
|
|
1901
|
+
export interface SubscriptionInvoice {
|
|
1902
|
+
/** @format GUID */
|
|
1903
|
+
_id?: string;
|
|
1904
|
+
subscriptionCycle?: number;
|
|
1905
|
+
_createdDate?: Date | null;
|
|
2089
1906
|
}
|
|
2090
|
-
export interface
|
|
2091
|
-
/**
|
|
1907
|
+
export interface FinishFreeTrialNowRequest {
|
|
1908
|
+
/** @format GUID */
|
|
1909
|
+
subscriptionId?: string;
|
|
1910
|
+
/** @format GUID */
|
|
1911
|
+
tenantId?: string;
|
|
1912
|
+
}
|
|
1913
|
+
export interface FinishFreeTrialNowResponse {
|
|
2092
1914
|
subscription?: Subscription;
|
|
2093
1915
|
}
|
|
2094
|
-
export interface
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
1916
|
+
export interface SendTimeCapsuleTaskCanceledBIRequest {
|
|
1917
|
+
/** @format GUID */
|
|
1918
|
+
tenantId?: string;
|
|
1919
|
+
/** @format GUID */
|
|
1920
|
+
subscriptionId?: string;
|
|
1921
|
+
/** @minLength 1 */
|
|
1922
|
+
taskType?: string;
|
|
2098
1923
|
}
|
|
2099
|
-
export
|
|
2100
|
-
UNKNOWN_REQUESTED_FIELD = "UNKNOWN_REQUESTED_FIELD",
|
|
2101
|
-
/** Include unsupported action list, including the reasons for the lack of support */
|
|
2102
|
-
UNSUPPORTED_ACTION = "UNSUPPORTED_ACTION"
|
|
1924
|
+
export interface Empty {
|
|
2103
1925
|
}
|
|
2104
|
-
export interface
|
|
2105
|
-
/**
|
|
2106
|
-
|
|
2107
|
-
/**
|
|
2108
|
-
|
|
1926
|
+
export interface ScheduleTimeCapsuleTaskRequest {
|
|
1927
|
+
/** @format GUID */
|
|
1928
|
+
subscriptionId?: string;
|
|
1929
|
+
/** @minLength 1 */
|
|
1930
|
+
taskType?: string;
|
|
1931
|
+
executionTime?: Date | null;
|
|
1932
|
+
/** @format GUID */
|
|
1933
|
+
tenantId?: string;
|
|
2109
1934
|
}
|
|
2110
|
-
export interface
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
1935
|
+
export interface CancelTimeCapsuleTaskRequest {
|
|
1936
|
+
/** @format GUID */
|
|
1937
|
+
tenantId?: string;
|
|
1938
|
+
/** @format GUID */
|
|
1939
|
+
subscriptionId?: string;
|
|
1940
|
+
/** @minLength 1 */
|
|
1941
|
+
taskType?: string;
|
|
2114
1942
|
}
|
|
2115
|
-
export interface
|
|
2116
|
-
|
|
2117
|
-
|
|
1943
|
+
export interface UpdateFullSubscriptionRequest {
|
|
1944
|
+
/** @format GUID */
|
|
1945
|
+
tenantId?: string;
|
|
1946
|
+
subscription?: Subscription;
|
|
2118
1947
|
}
|
|
2119
|
-
export interface
|
|
2120
|
-
|
|
2121
|
-
subscriptionId: string;
|
|
2122
|
-
/** Period of time to provide charged for. If not provided,then only next charge will be returned. */
|
|
2123
|
-
customDuration?: Duration;
|
|
2124
|
-
/**
|
|
2125
|
-
* Date of the next billing cycle so that the upcoming charges will be calculated accordingly.
|
|
2126
|
-
* If not provided, the upcoming charges will be calculated according to the existing next billing date.
|
|
2127
|
-
*/
|
|
2128
|
-
nextBillingDate?: Date | null;
|
|
1948
|
+
export interface UpdateFullSubscriptionResponse {
|
|
1949
|
+
subscription?: Subscription;
|
|
2129
1950
|
}
|
|
2130
|
-
export interface
|
|
2131
|
-
|
|
1951
|
+
export interface UpdateSubscriptionInvoiceCycleRequest {
|
|
1952
|
+
/** @format GUID */
|
|
1953
|
+
subscriptionId?: string;
|
|
1954
|
+
/** @format GUID */
|
|
1955
|
+
tenantId?: string;
|
|
1956
|
+
/** @format GUID */
|
|
1957
|
+
invoiceId?: string;
|
|
1958
|
+
subscriptionCycle?: number;
|
|
2132
1959
|
}
|
|
2133
|
-
export interface
|
|
2134
|
-
|
|
2135
|
-
subscriptionInfo?: SubscriptionInfo;
|
|
1960
|
+
export interface UpdateSubscriptionInvoiceCycleResponse {
|
|
1961
|
+
subscriptionInvoice?: SubscriptionInvoice;
|
|
2136
1962
|
}
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
1963
|
+
export interface AddPausePeriodRequest {
|
|
1964
|
+
/** @format GUID */
|
|
1965
|
+
tenantId?: string;
|
|
1966
|
+
/** @format GUID */
|
|
1967
|
+
subscriptionId?: string;
|
|
1968
|
+
pauseStartDate?: Date | null;
|
|
1969
|
+
pauseEndDate?: Date | null;
|
|
2141
1970
|
}
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
billingSettings?: BillingSettings;
|
|
2145
|
-
items?: Item[];
|
|
2146
|
-
startDate?: Date | null;
|
|
1971
|
+
export interface AddPausePeriodResponse {
|
|
1972
|
+
subscription?: Subscription;
|
|
2147
1973
|
}
|
|
2148
|
-
export interface
|
|
2149
|
-
/**
|
|
2150
|
-
|
|
1974
|
+
export interface RunTimeCapsuleTaskNowRequest {
|
|
1975
|
+
/** @format GUID */
|
|
1976
|
+
tenantId?: string;
|
|
1977
|
+
/** @format GUID */
|
|
1978
|
+
subscriptionId?: string;
|
|
1979
|
+
/** @minLength 1 */
|
|
1980
|
+
taskType?: string;
|
|
2151
1981
|
}
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
totals?: Totals;
|
|
2160
|
-
/** The billing date from which the charge starts */
|
|
2161
|
-
cycleBillingDate?: Date | null;
|
|
1982
|
+
export interface CreateRecurringInvoiceBORequest {
|
|
1983
|
+
/** @format GUID */
|
|
1984
|
+
subscriptionId?: string;
|
|
1985
|
+
/** @format GUID */
|
|
1986
|
+
tenantId?: string;
|
|
1987
|
+
/** @min 2 */
|
|
1988
|
+
cycleNumber?: number;
|
|
2162
1989
|
}
|
|
2163
|
-
export interface
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
1990
|
+
export interface CreateRecurringInvoiceBOResponse {
|
|
1991
|
+
invoiceId?: string;
|
|
1992
|
+
}
|
|
1993
|
+
export interface SetShiftingDataRequest {
|
|
1994
|
+
/** @format GUID */
|
|
1995
|
+
subscriptionId?: string;
|
|
1996
|
+
/** @format GUID */
|
|
1997
|
+
tenantId?: string;
|
|
1998
|
+
isBassManaged?: boolean;
|
|
1999
|
+
shiftManagementDate?: Date | null;
|
|
2000
|
+
}
|
|
2001
|
+
export interface SetShiftingDataResponse {
|
|
2002
|
+
subscription?: Subscription;
|
|
2003
|
+
}
|
|
2004
|
+
export interface FixSubscriptionInvoicesRequest extends FixSubscriptionInvoicesRequestModeOneOf {
|
|
2005
|
+
attachInvoice?: AttachInvoice;
|
|
2006
|
+
detachInvoice?: DetachInvoice;
|
|
2007
|
+
/** @format GUID */
|
|
2008
|
+
tenantId?: string;
|
|
2009
|
+
/** @format GUID */
|
|
2010
|
+
subscriptionId?: string;
|
|
2011
|
+
}
|
|
2012
|
+
/** @oneof */
|
|
2013
|
+
export interface FixSubscriptionInvoicesRequestModeOneOf {
|
|
2014
|
+
attachInvoice?: AttachInvoice;
|
|
2015
|
+
detachInvoice?: DetachInvoice;
|
|
2016
|
+
}
|
|
2017
|
+
export interface AttachInvoice {
|
|
2018
|
+
/** @format GUID */
|
|
2019
|
+
invoiceId?: string;
|
|
2020
|
+
}
|
|
2021
|
+
export interface DetachInvoice {
|
|
2022
|
+
/** @format GUID */
|
|
2023
|
+
invoiceId?: string;
|
|
2024
|
+
}
|
|
2025
|
+
export interface FixSubscriptionInvoicesResponse {
|
|
2026
|
+
invoices?: SubscriptionInvoice[];
|
|
2027
|
+
}
|
|
2028
|
+
export interface RestoreDraftSubscriptionRequest {
|
|
2029
|
+
/** @format GUID */
|
|
2030
|
+
tenantId?: string;
|
|
2031
|
+
/** @format GUID */
|
|
2032
|
+
subscriptionId?: string;
|
|
2033
|
+
}
|
|
2034
|
+
export interface RestoreDraftSubscriptionResponse {
|
|
2035
|
+
subscription?: Subscription;
|
|
2036
|
+
}
|
|
2037
|
+
export interface DeleteDraftSubscriptionRequest {
|
|
2038
|
+
/** @format GUID */
|
|
2039
|
+
tenantId?: string;
|
|
2040
|
+
/** @format GUID */
|
|
2041
|
+
subscriptionId?: string;
|
|
2042
|
+
}
|
|
2043
|
+
export interface DeleteDraftSubscriptionResponse {
|
|
2044
|
+
subscription?: Subscription;
|
|
2045
|
+
}
|
|
2046
|
+
export interface DeleteSubscriptionBORequest {
|
|
2047
|
+
/** @format GUID */
|
|
2048
|
+
tenantId?: string;
|
|
2049
|
+
/** @format GUID */
|
|
2050
|
+
subscriptionId?: string;
|
|
2051
|
+
}
|
|
2052
|
+
export interface DeleteSubscriptionBOResponse {
|
|
2053
|
+
subscription?: Subscription;
|
|
2054
|
+
}
|
|
2055
|
+
export interface CancelSubscriptionBORequest {
|
|
2056
|
+
/** @format GUID */
|
|
2057
|
+
tenantId?: string;
|
|
2058
|
+
/** @format GUID */
|
|
2059
|
+
subscriptionId?: string;
|
|
2060
|
+
initiator?: ActionInitiator;
|
|
2061
|
+
reason?: string | null;
|
|
2062
|
+
}
|
|
2063
|
+
export declare enum ActionInitiator {
|
|
2064
|
+
UNDEFINED = "UNDEFINED",
|
|
2065
|
+
BUSINESS = "BUSINESS",
|
|
2066
|
+
CUSTOMER = "CUSTOMER",
|
|
2067
|
+
SYSTEM = "SYSTEM"
|
|
2068
|
+
}
|
|
2069
|
+
export interface CancelSubscriptionBOResponse {
|
|
2070
|
+
subscription?: Subscription;
|
|
2071
|
+
}
|
|
2072
|
+
export interface UpdatePaymentMethodBORequest {
|
|
2073
|
+
/** @format GUID */
|
|
2074
|
+
tenantId?: string;
|
|
2075
|
+
/** @format GUID */
|
|
2076
|
+
subscriptionId?: string;
|
|
2077
|
+
/** @format GUID */
|
|
2078
|
+
paymentMethodId?: string;
|
|
2079
|
+
}
|
|
2080
|
+
export interface UpdatePaymentMethodBOResponse {
|
|
2081
|
+
subscription?: Subscription;
|
|
2082
|
+
}
|
|
2083
|
+
export interface SendSubscriptionActionEventBORequest extends SendSubscriptionActionEventBORequestEventOneOf {
|
|
2084
|
+
billingCycleStarted?: SubscriptionBillingCycleStarted;
|
|
2085
|
+
/** @format GUID */
|
|
2086
|
+
tenantId?: string;
|
|
2087
|
+
/** @format GUID */
|
|
2088
|
+
subscriptionId?: string;
|
|
2089
|
+
}
|
|
2090
|
+
/** @oneof */
|
|
2091
|
+
export interface SendSubscriptionActionEventBORequestEventOneOf {
|
|
2092
|
+
billingCycleStarted?: SubscriptionBillingCycleStarted;
|
|
2093
|
+
}
|
|
2094
|
+
export interface SubscriptionBillingCycleStarted {
|
|
2095
|
+
subscription?: Subscription;
|
|
2096
|
+
/**
|
|
2097
|
+
* Wix Pay transaction id, optional. Exists if event was triggered by a payment.
|
|
2098
|
+
* @format GUID
|
|
2099
|
+
*/
|
|
2100
|
+
paymentTransactionId?: string | null;
|
|
2101
|
+
}
|
|
2102
|
+
export interface SendSubscriptionActionEventResponse {
|
|
2103
|
+
}
|
|
2104
|
+
export interface HandleSubscriptionAfterInvoiceMarkedAsPaidRequest {
|
|
2105
|
+
/** @format GUID */
|
|
2106
|
+
tenantId?: string;
|
|
2107
|
+
/** @format GUID */
|
|
2108
|
+
subscriptionId?: string;
|
|
2109
|
+
transactionId?: string;
|
|
2110
|
+
}
|
|
2111
|
+
export interface PauseSubscriptionBORequest {
|
|
2112
|
+
/** @format GUID */
|
|
2113
|
+
tenantId?: string;
|
|
2114
|
+
/** @format GUID */
|
|
2115
|
+
subscriptionId?: string;
|
|
2116
|
+
pausePolicy?: PausePolicy;
|
|
2117
|
+
pauseAt?: PauseAt;
|
|
2118
|
+
initiator?: ActionInitiator;
|
|
2119
|
+
/** @maxLength 500 */
|
|
2120
|
+
reason?: string | null;
|
|
2121
|
+
}
|
|
2122
|
+
export interface PauseSubscriptionBOResponse {
|
|
2123
|
+
subscription?: Subscription;
|
|
2124
|
+
}
|
|
2125
|
+
export interface SetIsMigratedEvent {
|
|
2126
|
+
/** @format GUID */
|
|
2127
|
+
subscriptionId?: string;
|
|
2128
|
+
}
|
|
2129
|
+
export interface SubscriptionDelayedSyncEvent {
|
|
2130
|
+
/** @format GUID */
|
|
2131
|
+
subscriptionId?: string;
|
|
2132
|
+
}
|
|
2133
|
+
export interface InvoiceAction extends InvoiceActionActionTypeOneOf {
|
|
2134
|
+
payRecurring?: PayRecurringInvoice;
|
|
2135
|
+
}
|
|
2136
|
+
/** @oneof */
|
|
2137
|
+
export interface InvoiceActionActionTypeOneOf {
|
|
2138
|
+
payRecurring?: PayRecurringInvoice;
|
|
2139
|
+
}
|
|
2140
|
+
export interface PayRecurringInvoice {
|
|
2141
|
+
/** @format GUID */
|
|
2142
|
+
invoiceId?: string;
|
|
2143
|
+
}
|
|
2144
|
+
/**
|
|
2145
|
+
* Sent each time a subscription status has been set to Active
|
|
2146
|
+
* Active shows that a subscription is live and operational.
|
|
2147
|
+
* For example:
|
|
2148
|
+
* * For subscription with free trial, free trial start date is also the activation date.
|
|
2149
|
+
* * For a subscription with future start date, the start date is also the activation date.
|
|
2150
|
+
* * When a subscription is resumed from a pause status, the resume date is also the activation date.
|
|
2151
|
+
*/
|
|
2152
|
+
export interface SubscriptionActivated {
|
|
2153
|
+
subscription?: Subscription;
|
|
2154
|
+
}
|
|
2155
|
+
/**
|
|
2156
|
+
* Sent each time a subscription status has been set to Ended
|
|
2157
|
+
* Ended shows that a subscription reached its end date and ended its life cycle as a result of the agreement.
|
|
2158
|
+
* This is different from a Canceled subscription which ends the subscription before a designated end date.
|
|
2159
|
+
* Therefore, Ended and Canceled are mutually exclusive.
|
|
2160
|
+
*/
|
|
2161
|
+
export interface SubscriptionEnded {
|
|
2162
|
+
subscription?: Subscription;
|
|
2163
|
+
}
|
|
2164
|
+
export interface SubscriptionInitialPurchaseCompleted {
|
|
2165
|
+
subscription?: Subscription;
|
|
2166
|
+
actionDetails?: ActionDetails;
|
|
2167
|
+
/** @format GUID */
|
|
2168
|
+
paymentTransactionId?: string | null;
|
|
2169
|
+
}
|
|
2170
|
+
export interface SubscriptionCycleReadyToPay {
|
|
2171
|
+
subscription?: Subscription;
|
|
2172
|
+
}
|
|
2173
|
+
export interface SubscriptionRevived {
|
|
2174
|
+
subscription?: Subscription;
|
|
2175
|
+
}
|
|
2176
|
+
export interface CreateSubscriptionResponse {
|
|
2177
|
+
subscription?: Subscription;
|
|
2178
|
+
/**
|
|
2179
|
+
* Payments order that should be paid (or authorize card) in order to activate subscription. Empty for free subscriptions.
|
|
2180
|
+
* @format GUID
|
|
2181
|
+
*/
|
|
2182
|
+
paymentOrderId?: string | null;
|
|
2183
|
+
}
|
|
2184
|
+
export interface UpdateSubscriptionRequest {
|
|
2185
|
+
/** Revision is validated if Subscription.revision is set */
|
|
2186
|
+
subscription?: Subscription;
|
|
2187
|
+
/**
|
|
2188
|
+
* Supported field: start_date
|
|
2189
|
+
* Can be updated only if Subscription is in Draft state
|
|
2190
|
+
*/
|
|
2191
|
+
fieldMask?: string[];
|
|
2192
|
+
}
|
|
2193
|
+
export interface UpdateSubscriptionResponse {
|
|
2194
|
+
subscription?: Subscription;
|
|
2195
|
+
}
|
|
2196
|
+
export interface UpdateSubscriptionStartDateRequest {
|
|
2197
|
+
/**
|
|
2198
|
+
* Subscription ID
|
|
2199
|
+
* @format GUID
|
|
2200
|
+
*/
|
|
2201
|
+
_id?: string;
|
|
2202
|
+
/**
|
|
2203
|
+
* Can be updated only if Subscription is in Draft state
|
|
2204
|
+
* By setting start_date in the future, end_date will be recalculated for termed Subscriptions
|
|
2205
|
+
* cycles_to_pay_on_creation will be set to 1 if no free trial is set
|
|
2206
|
+
*/
|
|
2207
|
+
startDate?: Date | null;
|
|
2208
|
+
}
|
|
2209
|
+
export interface UpdateSubscriptionStartDateResponse {
|
|
2210
|
+
subscription?: Subscription;
|
|
2211
|
+
}
|
|
2212
|
+
export interface UpdateSubscriptionPoliciesRequest {
|
|
2213
|
+
/**
|
|
2214
|
+
* Subscription ID
|
|
2215
|
+
* @format GUID
|
|
2216
|
+
*/
|
|
2217
|
+
_id?: string;
|
|
2218
|
+
cancellableByCustomer?: boolean | null;
|
|
2219
|
+
}
|
|
2220
|
+
export interface UpdateSubscriptionPoliciesResponse {
|
|
2221
|
+
/** Updated policies of the subscription */
|
|
2222
|
+
policies?: SubscriptionPolicies;
|
|
2223
|
+
}
|
|
2224
|
+
export interface UpdateSubscriptionBillingDateRequest {
|
|
2225
|
+
/**
|
|
2226
|
+
* ID of the subscription to update the billing date for.
|
|
2227
|
+
* @format GUID
|
|
2228
|
+
*/
|
|
2229
|
+
_id: string;
|
|
2230
|
+
/** New billing date in `YYYY-MM-DDThh:mm:ss:sssZ` format. */
|
|
2231
|
+
billingDate: Date | null;
|
|
2232
|
+
/**
|
|
2233
|
+
* Information about how BASS adjusts the total of the next invoice. Extending
|
|
2234
|
+
* the current billing cycle results in a higher payment, while shortening it
|
|
2235
|
+
* leads to a lower payment. BASS offers automatic calculation of the proration
|
|
2236
|
+
* amount based on the number of days added to or removed from the current billing
|
|
2237
|
+
* cycle. Alternatively, you can use your own custom method to calculate the
|
|
2238
|
+
* proration amount. The custom proration amount can't exceed the total of the
|
|
2239
|
+
* current billing cycle.
|
|
2240
|
+
*/
|
|
2241
|
+
proration?: Proration;
|
|
2242
|
+
}
|
|
2243
|
+
export interface UpdateSubscriptionBillingDateResponse {
|
|
2244
|
+
/** Updated subscription. */
|
|
2245
|
+
subscription?: Subscription;
|
|
2246
|
+
}
|
|
2247
|
+
export interface SubscriptionBillingDateUpdated {
|
|
2248
|
+
subscription?: Subscription;
|
|
2249
|
+
billingDate?: Date | null;
|
|
2250
|
+
proration?: Proration;
|
|
2251
|
+
}
|
|
2252
|
+
export interface UpdateSubscriptionOriginRequest {
|
|
2253
|
+
/**
|
|
2254
|
+
* ID of the subscription to update origin.
|
|
2255
|
+
* @format GUID
|
|
2256
|
+
*/
|
|
2257
|
+
_id?: string;
|
|
2258
|
+
/**
|
|
2259
|
+
* Origin entity ID of the subscription to update.
|
|
2260
|
+
* @format GUID
|
|
2261
|
+
*/
|
|
2262
|
+
entityId?: string;
|
|
2263
|
+
}
|
|
2264
|
+
export interface UpdateSubscriptionOriginResponse {
|
|
2265
|
+
/** Updated subscription. */
|
|
2266
|
+
subscription?: Subscription;
|
|
2267
|
+
}
|
|
2268
|
+
export interface ReviseSubscriptionRequest {
|
|
2269
|
+
/**
|
|
2270
|
+
* Subscription ID
|
|
2271
|
+
* @format GUID
|
|
2272
|
+
*/
|
|
2273
|
+
_id?: string;
|
|
2274
|
+
/**
|
|
2275
|
+
* 0 for no revision, maxSize is 100
|
|
2276
|
+
* @maxSize 100
|
|
2277
|
+
*/
|
|
2278
|
+
items?: Item[];
|
|
2279
|
+
}
|
|
2280
|
+
export interface ReviseSubscriptionResponse {
|
|
2281
|
+
subscription?: Subscription;
|
|
2282
|
+
}
|
|
2283
|
+
export interface UpdateSubscriptionItemsRequest {
|
|
2284
|
+
/**
|
|
2285
|
+
* Subscription ID
|
|
2286
|
+
* @format GUID
|
|
2287
|
+
*/
|
|
2288
|
+
_id?: string;
|
|
2289
|
+
/** Update action. For RESET_PENDING_UPDATES, nothing but the subscription ID should be defined in the request. */
|
|
2290
|
+
updateAction?: UpdateAction;
|
|
2291
|
+
/** Updates execution date. Relevant only for UpdateAction.SPECIFIC_DATE. Only specific date is supported. */
|
|
2292
|
+
scheduleAdditionalInfo?: ScheduleAdditionalInfo;
|
|
2293
|
+
/**
|
|
2294
|
+
* Existing items to update
|
|
2295
|
+
* @maxSize 100
|
|
2296
|
+
*/
|
|
2297
|
+
itemsToUpdate?: ItemChange[];
|
|
2298
|
+
/**
|
|
2299
|
+
* Items to add
|
|
2300
|
+
* @maxSize 99
|
|
2301
|
+
*/
|
|
2302
|
+
itemsToAdd?: Item[];
|
|
2303
|
+
/**
|
|
2304
|
+
* Existing items to delete
|
|
2305
|
+
* @format GUID
|
|
2306
|
+
* @maxSize 99
|
|
2307
|
+
*/
|
|
2308
|
+
itemsToDelete?: string[] | null;
|
|
2309
|
+
}
|
|
2310
|
+
export declare enum UpdateAction {
|
|
2311
|
+
NONE = "NONE",
|
|
2312
|
+
/** Update subscription immediately, please note proration for updates changing price are not yet supported */
|
|
2313
|
+
IMMEDIATELY = "IMMEDIATELY",
|
|
2314
|
+
/** Request updates that will take affect only at the start of the next billing cycle. */
|
|
2315
|
+
NEXT_BILLING_CYCLE = "NEXT_BILLING_CYCLE",
|
|
2316
|
+
/** Reset all pending updates */
|
|
2317
|
+
RESET_PENDING_UPDATES = "RESET_PENDING_UPDATES",
|
|
2318
|
+
/** Request updates that will take affect only at a specific date. */
|
|
2319
|
+
SPECIFIC_DATE = "SPECIFIC_DATE"
|
|
2320
|
+
}
|
|
2321
|
+
export interface ScheduleAdditionalInfo extends ScheduleAdditionalInfoParamOneOf {
|
|
2322
|
+
/**
|
|
2323
|
+
* Future date when the update becomes effective in `YYYY-MM-DDThh:mm:ss.sssZ`
|
|
2324
|
+
* format. The use of this field may be restricted in various BASS endpoints.
|
|
2325
|
+
* For example, in _Bulk Update Subscription Items_ it's only available in
|
|
2326
|
+
* combination with `{"updateAction": "SPECIFIC_DATE"}`, in _Resume Subscription_
|
|
2327
|
+
* only in combination with `{"resumeAt": "SPECIFIC_DATE"}`, and in
|
|
2328
|
+
* _Pause Subscription_ only in combination with `{"pauseAt": "SPECIFIC_DATE"}`.
|
|
2329
|
+
*/
|
|
2330
|
+
specificDate?: Date | null;
|
|
2331
|
+
/**
|
|
2332
|
+
* When the update becomes effective, as number of billing cycles from now.
|
|
2333
|
+
* The use of this field may be restricted in various BASS endpoints.
|
|
2334
|
+
* For example, in _Pause Subscription_ it's only available in
|
|
2335
|
+
* combination with `{"pauseAt": "NUMBER_OF_CYCLES_FROM_TODAY"}`.
|
|
2336
|
+
* __Note__: Currently not supported in _Bulk Update Subscription Items by Filter_.
|
|
2337
|
+
* @min 1
|
|
2338
|
+
*/
|
|
2339
|
+
numberOfCycles?: number;
|
|
2340
|
+
}
|
|
2341
|
+
/** @oneof */
|
|
2342
|
+
export interface ScheduleAdditionalInfoParamOneOf {
|
|
2343
|
+
/**
|
|
2344
|
+
* Future date when the update becomes effective in `YYYY-MM-DDThh:mm:ss.sssZ`
|
|
2345
|
+
* format. The use of this field may be restricted in various BASS endpoints.
|
|
2346
|
+
* For example, in _Bulk Update Subscription Items_ it's only available in
|
|
2347
|
+
* combination with `{"updateAction": "SPECIFIC_DATE"}`, in _Resume Subscription_
|
|
2348
|
+
* only in combination with `{"resumeAt": "SPECIFIC_DATE"}`, and in
|
|
2349
|
+
* _Pause Subscription_ only in combination with `{"pauseAt": "SPECIFIC_DATE"}`.
|
|
2350
|
+
*/
|
|
2351
|
+
specificDate?: Date | null;
|
|
2352
|
+
/**
|
|
2353
|
+
* When the update becomes effective, as number of billing cycles from now.
|
|
2354
|
+
* The use of this field may be restricted in various BASS endpoints.
|
|
2355
|
+
* For example, in _Pause Subscription_ it's only available in
|
|
2356
|
+
* combination with `{"pauseAt": "NUMBER_OF_CYCLES_FROM_TODAY"}`.
|
|
2357
|
+
* __Note__: Currently not supported in _Bulk Update Subscription Items by Filter_.
|
|
2358
|
+
* @min 1
|
|
2359
|
+
*/
|
|
2360
|
+
numberOfCycles?: number;
|
|
2361
|
+
}
|
|
2362
|
+
export interface UpdateSubscriptionItemsResponse {
|
|
2363
|
+
subscription?: Subscription;
|
|
2364
|
+
}
|
|
2365
|
+
export interface BulkUpdateSubscriptionItemsByFilterRequest {
|
|
2366
|
+
/**
|
|
2367
|
+
* Filter to identify the subscriptions for which items are updated. For
|
|
2368
|
+
* supported fields see
|
|
2369
|
+
* [Search and Query: Bulk Update Subscription Items By Filter](https://bo.wix.com/wix-docs/rest/drafts/subscriptions-by-billing-by-wix/search-and-query#drafts_subscriptions-by-billing-by-wix_search-and-query_bulk-update-subscription-items-by-filter).
|
|
2370
|
+
* Sending an empty subscription filter results in a validation error.
|
|
2371
|
+
* In case you pass `{"updateAction": "RESET_PENDING_UPDATES"}`, use only the
|
|
2372
|
+
* `subscriptionId` field inside this filter. Passing any other filter results
|
|
2373
|
+
* in a failed validation error.
|
|
2374
|
+
*/
|
|
2375
|
+
subscriptionFilter?: Record<string, any> | null;
|
|
2376
|
+
/**
|
|
2377
|
+
* Filter to specify which subscription items are updated. Make sure to use
|
|
2378
|
+
* the catalog item ID and not the item's unique ID. All subscription items
|
|
2379
|
+
* with matching `items.catalogReference.catalogItemId` are updated.
|
|
2380
|
+
*
|
|
2381
|
+
* Max: `100` reference catalog item IDs
|
|
2382
|
+
* @format GUID
|
|
2383
|
+
* @maxSize 100
|
|
2384
|
+
*/
|
|
2385
|
+
catalogReferenceIds?: string[] | null;
|
|
2386
|
+
/**
|
|
2387
|
+
* Information about the update timing and update type.
|
|
2388
|
+
*
|
|
2389
|
+
* + `"IMMEDIATELY"`: The updates become effective immediately.
|
|
2390
|
+
* + `"NEXT_BILLING_CYCLE"`: The updates are scheduled for the beginning of the next billing cycle.
|
|
2391
|
+
* + `"SPECIFIC_DATE"`: The updates are scheduled for the date specified in `scheduleAdditionalInfo.specificDate`.
|
|
2392
|
+
* + `"RESET_PENDING_UPDATES"`: All currently scheduled updates for the specified supcriptions are canceled. Use only the `subscriptionId` field inside `subscriptionFilter`, all other filters result in failed validation errors.
|
|
2393
|
+
*/
|
|
2394
|
+
updateAction?: UpdateAction;
|
|
2395
|
+
/**
|
|
2396
|
+
* Additional information for updates. Currently, only supported for
|
|
2397
|
+
* `{"updateAction": "SPECIFIC_DATE"}`.
|
|
2398
|
+
*/
|
|
2399
|
+
scheduleAdditionalInfo?: ScheduleAdditionalInfo;
|
|
2400
|
+
/**
|
|
2401
|
+
* Update details for the susbcription items that match the filtering.
|
|
2402
|
+
* Currently, you can update only the item price, quantity, and tax. Note
|
|
2403
|
+
* that all item properties are updated to the same values. In case you want set
|
|
2404
|
+
* different values for individual items, you must call
|
|
2405
|
+
* _Bulk Update Subscription Items By Filter_ multiple times, once per unique update.
|
|
2406
|
+
*/
|
|
2407
|
+
bulkItemUpdateData?: BulkItemChange;
|
|
2408
|
+
/**
|
|
2409
|
+
* __Not implemented yet__. Items to add to the subscriptions matching the filtering.
|
|
2410
|
+
* @maxSize 99
|
|
2411
|
+
*/
|
|
2412
|
+
itemsToAdd?: Item[];
|
|
2413
|
+
}
|
|
2414
|
+
export interface BulkItemChange {
|
|
2415
|
+
/** Information about the new item price. */
|
|
2416
|
+
pricingModel?: PricingModel;
|
|
2417
|
+
/**
|
|
2418
|
+
* New item quantity.
|
|
2419
|
+
*
|
|
2420
|
+
* Min: `1`
|
|
2421
|
+
* @min 1
|
|
2422
|
+
*/
|
|
2423
|
+
quantity?: number | null;
|
|
2424
|
+
/** Information about the new item tax. */
|
|
2425
|
+
tax?: Tax;
|
|
2426
|
+
}
|
|
2427
|
+
export interface BulkUpdateSubscriptionItemsByFilterResponse {
|
|
2428
|
+
/**
|
|
2429
|
+
* ID of your bulk job. You can use
|
|
2430
|
+
* [this Async Infra call](https://pbo.wix.com/fire-console/?artifact=com.wixpress.asyncinfra.async-job-service&service=wix.infra.asyncjobs.v1.AsyncJobService&method=ListAsyncJobItems&body=eyJqb2JfaWQiOiIifQ%3D%3D)
|
|
2431
|
+
* to retrieve information about the job status.
|
|
2432
|
+
*/
|
|
2433
|
+
jobId?: string;
|
|
2434
|
+
}
|
|
2435
|
+
export interface DeleteSubscriptionRequest {
|
|
2436
|
+
/** @format GUID */
|
|
2437
|
+
_id?: string;
|
|
2438
|
+
revision?: string;
|
|
2439
|
+
}
|
|
2440
|
+
export interface DeleteSubscriptionResponse {
|
|
2441
|
+
}
|
|
2442
|
+
export interface CancelSubscriptionRequest {
|
|
2443
|
+
/** @format GUID */
|
|
2444
|
+
_id: string;
|
|
2445
|
+
actionContext: ActionContext;
|
|
2446
|
+
}
|
|
2447
|
+
export interface ActionContext {
|
|
2448
|
+
initiator?: ActionInitiator;
|
|
2449
|
+
/** Optional action reason message */
|
|
2450
|
+
reason?: string | null;
|
|
2451
|
+
}
|
|
2452
|
+
export interface CancelSubscriptionResponse {
|
|
2453
|
+
subscription?: Subscription;
|
|
2454
|
+
}
|
|
2455
|
+
export interface PauseSubscriptionRequest {
|
|
2456
|
+
/** @format GUID */
|
|
2457
|
+
_id: string;
|
|
2458
|
+
pausePolicy?: PausePolicy;
|
|
2459
|
+
pauseAt?: PauseAt;
|
|
2460
|
+
/** contains additional scheduling information for certain pause_at options (for example: SPECIFIC_DATE & NUMBER_OF_CYCLES_FROM_TODAY) */
|
|
2461
|
+
pauseAtSchedule?: ScheduleAdditionalInfo;
|
|
2462
|
+
/** contains additional scheduling information for certain auto_resume_at either specific date */
|
|
2463
|
+
autoResumeAtSchedule?: ScheduleAdditionalInfo;
|
|
2464
|
+
actionContext: ActionContext;
|
|
2465
|
+
}
|
|
2466
|
+
export interface PauseSubscriptionResponse {
|
|
2467
|
+
subscription?: Subscription;
|
|
2468
|
+
}
|
|
2469
|
+
export interface SubscriptionPaused {
|
|
2470
|
+
subscription?: Subscription;
|
|
2471
|
+
pausePolicy?: PausePolicy;
|
|
2472
|
+
actionDetails?: ActionDetails;
|
|
2473
|
+
}
|
|
2474
|
+
export interface PauseSubscriptionRequested {
|
|
2475
|
+
subscription?: Subscription;
|
|
2476
|
+
pauseAt?: PauseAt;
|
|
2477
|
+
pausePolicy?: PausePolicy;
|
|
2478
|
+
actionDetails?: ActionDetails;
|
|
2479
|
+
}
|
|
2480
|
+
export interface ScheduledPauseCanceled {
|
|
2481
|
+
subscription?: Subscription;
|
|
2482
|
+
actionDetails?: ActionDetails;
|
|
2483
|
+
}
|
|
2484
|
+
export interface ResumeSubscriptionRequest {
|
|
2485
|
+
/** @format GUID */
|
|
2486
|
+
_id: string;
|
|
2487
|
+
resumeAt?: ResumeAt;
|
|
2488
|
+
/** contains additional scheduling information for certain resume_at options (for example: SPECIFIC_DATE) */
|
|
2489
|
+
resumeAtSchedule?: ScheduleAdditionalInfo;
|
|
2490
|
+
actionContext: ActionContext;
|
|
2491
|
+
}
|
|
2492
|
+
export interface ResumeSubscriptionResponse {
|
|
2493
|
+
subscription?: Subscription;
|
|
2494
|
+
}
|
|
2495
|
+
export interface SubscriptionResumed {
|
|
2496
|
+
subscription?: Subscription;
|
|
2497
|
+
actionDetails?: ActionDetails;
|
|
2498
|
+
}
|
|
2499
|
+
export interface ResumeSubscriptionRequested {
|
|
2500
|
+
subscription?: Subscription;
|
|
2501
|
+
resumeAt?: ResumeAt;
|
|
2502
|
+
actionDetails?: ActionDetails;
|
|
2503
|
+
}
|
|
2504
|
+
export interface ScheduledResumeCanceled {
|
|
2505
|
+
subscription?: Subscription;
|
|
2506
|
+
actionDetails?: ActionDetails;
|
|
2507
|
+
}
|
|
2508
|
+
export interface SearchSubscriptionsRequest extends SearchSubscriptionsRequestPagingMethodOneOf {
|
|
2509
|
+
/** Limit number of results and enable to skip rows. The default limit is 25. */
|
|
2510
|
+
paging?: Paging;
|
|
2511
|
+
/** A Cursor option for efficient paging. Pass this field from the previous search response to continue to the next page. */
|
|
2512
|
+
cursor?: CursorPaging;
|
|
2513
|
+
/** A filter object */
|
|
2514
|
+
filter?: any;
|
|
2515
|
+
/** A Sorting option by field name and order. */
|
|
2516
|
+
sorting?: SortingClauses;
|
|
2517
|
+
}
|
|
2518
|
+
/** @oneof */
|
|
2519
|
+
export interface SearchSubscriptionsRequestPagingMethodOneOf {
|
|
2520
|
+
/** Limit number of results and enable to skip rows. The default limit is 25. */
|
|
2521
|
+
paging?: Paging;
|
|
2522
|
+
/** A Cursor option for efficient paging. Pass this field from the previous search response to continue to the next page. */
|
|
2523
|
+
cursor?: CursorPaging;
|
|
2524
|
+
}
|
|
2525
|
+
export interface SortingClauses {
|
|
2526
|
+
sorting?: Sorting[];
|
|
2527
|
+
}
|
|
2528
|
+
export interface SearchSubscriptionsResponse {
|
|
2529
|
+
subscriptions?: Subscription[];
|
|
2530
|
+
cursor?: CursorPaging;
|
|
2531
|
+
}
|
|
2532
|
+
export interface TurnOnSubscriptionAutoRenewalRequest {
|
|
2533
|
+
/** @format GUID */
|
|
2534
|
+
_id: string;
|
|
2535
|
+
actionContext: ActionContext;
|
|
2536
|
+
}
|
|
2537
|
+
export interface TurnOnSubscriptionAutoRenewalResponse {
|
|
2538
|
+
subscription?: Subscription;
|
|
2539
|
+
}
|
|
2540
|
+
export interface SubscriptionAutoRenewalTurnedOn {
|
|
2541
|
+
subscription?: Subscription;
|
|
2542
|
+
actionDetails?: ActionDetails;
|
|
2543
|
+
}
|
|
2544
|
+
export interface TurnOffSubscriptionAutoRenewalRequest {
|
|
2545
|
+
/** @format GUID */
|
|
2546
|
+
_id: string;
|
|
2547
|
+
actionContext: ActionContext;
|
|
2548
|
+
}
|
|
2549
|
+
export interface TurnOffSubscriptionAutoRenewalResponse {
|
|
2550
|
+
subscription?: Subscription;
|
|
2551
|
+
}
|
|
2552
|
+
export interface SubscriptionAutoRenewalTurnedOff {
|
|
2553
|
+
subscription?: Subscription;
|
|
2554
|
+
actionDetails?: ActionDetails;
|
|
2555
|
+
}
|
|
2556
|
+
export interface MarkLatestInvoiceAsPaidRequest {
|
|
2557
|
+
/**
|
|
2558
|
+
* The ID of the offline subscription to mark as paid its latest invoice
|
|
2559
|
+
* @format GUID
|
|
2560
|
+
*/
|
|
2561
|
+
subscriptionId: string;
|
|
2562
|
+
}
|
|
2563
|
+
export interface MarkLatestInvoiceAsPaidResponse {
|
|
2564
|
+
subscription?: Subscription;
|
|
2565
|
+
}
|
|
2566
|
+
export interface LatestInvoiceMarkedAsPaid {
|
|
2567
|
+
subscription?: Subscription;
|
|
2568
|
+
}
|
|
2569
|
+
export interface MultipleSubscriptionsOnOrdersInvoice {
|
|
2570
|
+
/**
|
|
2571
|
+
* the invoice id of the affected subscription
|
|
2572
|
+
* @format GUID
|
|
2573
|
+
*/
|
|
2574
|
+
invoiceId?: string;
|
|
2575
|
+
/**
|
|
2576
|
+
* the order id of the affected subscription
|
|
2577
|
+
* @format GUID
|
|
2578
|
+
*/
|
|
2579
|
+
orderId?: string;
|
|
2580
|
+
}
|
|
2581
|
+
/** TODO: to delete after ECOM adjustments */
|
|
2582
|
+
export interface MarkInvoiceAsPaidRequest {
|
|
2583
|
+
/**
|
|
2584
|
+
* The ID of the subscription to mark as paid its invoice.
|
|
2585
|
+
* @format GUID
|
|
2586
|
+
*/
|
|
2587
|
+
subscriptionId: string;
|
|
2588
|
+
/**
|
|
2589
|
+
* The subscription cycle for which the invoice is to be marked as paid.
|
|
2590
|
+
* If left empty, the most recent cycle will be selected.
|
|
2591
|
+
* @min 1
|
|
2592
|
+
*/
|
|
2593
|
+
paidCycle?: number | null;
|
|
2594
|
+
}
|
|
2595
|
+
/** TODO: to delete after ECOM adjustments */
|
|
2596
|
+
export interface MarkInvoiceAsPaidResponse {
|
|
2597
|
+
subscription?: Subscription;
|
|
2598
|
+
}
|
|
2599
|
+
export interface MarkBillingCycleAsPaidRequest {
|
|
2600
|
+
/**
|
|
2601
|
+
* The ID of the subscription to mark as paid its invoice.
|
|
2602
|
+
* @format GUID
|
|
2603
|
+
*/
|
|
2604
|
+
subscriptionId: string;
|
|
2605
|
+
/**
|
|
2606
|
+
* The subscription cycle for which the invoice is to be marked as paid.
|
|
2607
|
+
* If left empty, the most recent cycle will be selected.
|
|
2608
|
+
* @min 1
|
|
2609
|
+
*/
|
|
2610
|
+
paidCycle?: number | null;
|
|
2611
|
+
}
|
|
2612
|
+
export interface MarkBillingCycleAsPaidResponse {
|
|
2613
|
+
subscription?: Subscription;
|
|
2614
|
+
}
|
|
2615
|
+
export interface GetSubscriptionsStatsRequest {
|
|
2616
|
+
}
|
|
2617
|
+
export interface GetSubscriptionsStatsResponse {
|
|
2618
|
+
amountByStatuses?: AmountByStatus[];
|
|
2619
|
+
total?: number;
|
|
2620
|
+
}
|
|
2621
|
+
export interface AmountByStatus {
|
|
2622
|
+
status?: SubscriptionStatusEnumSubscriptionStatus;
|
|
2623
|
+
amount?: number;
|
|
2624
|
+
}
|
|
2625
|
+
export interface ExtendSubscriptionRequest extends ExtendSubscriptionRequestExtendPolicyOneOf {
|
|
2626
|
+
/** User won't be charged for additional period added on top of subscription end date. */
|
|
2627
|
+
extensionPeriod?: Duration;
|
|
2628
|
+
/**
|
|
2629
|
+
* user will be charged for billing cycles added
|
|
2630
|
+
* @min 1
|
|
2631
|
+
*/
|
|
2632
|
+
extensionBillingCycles?: number;
|
|
2633
|
+
/**
|
|
2634
|
+
* The ID of the subscription to be extended
|
|
2635
|
+
* @format GUID
|
|
2636
|
+
*/
|
|
2637
|
+
_id: string;
|
|
2638
|
+
actionContext: ActionContext;
|
|
2639
|
+
}
|
|
2640
|
+
/** @oneof */
|
|
2641
|
+
export interface ExtendSubscriptionRequestExtendPolicyOneOf {
|
|
2642
|
+
/** User won't be charged for additional period added on top of subscription end date. */
|
|
2643
|
+
extensionPeriod?: Duration;
|
|
2644
|
+
/**
|
|
2645
|
+
* user will be charged for billing cycles added
|
|
2646
|
+
* @min 1
|
|
2647
|
+
*/
|
|
2648
|
+
extensionBillingCycles?: number;
|
|
2649
|
+
}
|
|
2650
|
+
export interface ExtendSubscriptionResponse {
|
|
2651
|
+
/** The now extended subscription */
|
|
2652
|
+
subscription?: Subscription;
|
|
2653
|
+
}
|
|
2654
|
+
export interface AllowedActionsRequest {
|
|
2655
|
+
/** @format GUID */
|
|
2656
|
+
_id: string;
|
|
2657
|
+
/**
|
|
2658
|
+
* List of additional fields to be included in the response.
|
|
2659
|
+
* @maxSize 1
|
|
2660
|
+
*/
|
|
2661
|
+
fields?: RequestedFields[];
|
|
2662
|
+
}
|
|
2663
|
+
export declare enum RequestedFields {
|
|
2664
|
+
UNKNOWN_REQUESTED_FIELD = "UNKNOWN_REQUESTED_FIELD",
|
|
2665
|
+
/** Include unsupported action list, including the reasons for the lack of support */
|
|
2666
|
+
UNSUPPORTED_ACTION = "UNSUPPORTED_ACTION"
|
|
2667
|
+
}
|
|
2668
|
+
export interface AllowedActionsResponse {
|
|
2669
|
+
/** List of actions that are allowed. */
|
|
2670
|
+
actions?: Action[];
|
|
2671
|
+
/**
|
|
2672
|
+
* List of actions that are not supported, included only if requested. Provides reasons for each unsupported action.
|
|
2673
|
+
* @maxSize 20
|
|
2674
|
+
*/
|
|
2675
|
+
unsupportedActions?: UnsupportedAction[];
|
|
2676
|
+
}
|
|
2677
|
+
export interface UnsupportedAction {
|
|
2678
|
+
actionType?: ActionType;
|
|
2679
|
+
/**
|
|
2680
|
+
* Provides detailed reasons for the unsupported action. Each `UnsupportedReason` includes a code and a message explaining why the action is not allowed.
|
|
2681
|
+
* @maxSize 20
|
|
2682
|
+
*/
|
|
2683
|
+
reasons?: UnsupportedReason[];
|
|
2684
|
+
}
|
|
2685
|
+
export interface UnsupportedReason {
|
|
2686
|
+
code?: string;
|
|
2687
|
+
description?: string | null;
|
|
2688
|
+
}
|
|
2689
|
+
export interface ListUpcomingChargesRequest {
|
|
2690
|
+
/**
|
|
2691
|
+
* Subscription id charges to be previewed for
|
|
2692
|
+
* @format GUID
|
|
2693
|
+
*/
|
|
2694
|
+
subscriptionId: string;
|
|
2695
|
+
/** Period of time to provide charged for. If not provided,then only next charge will be returned. */
|
|
2696
|
+
customDuration?: Duration;
|
|
2697
|
+
/**
|
|
2698
|
+
* Date of the next billing cycle so that the upcoming charges will be calculated accordingly.
|
|
2699
|
+
* If not provided, the upcoming charges will be calculated according to the existing next billing date.
|
|
2700
|
+
*/
|
|
2701
|
+
nextBillingDate?: Date | null;
|
|
2702
|
+
}
|
|
2703
|
+
export interface ListUpcomingChargesResponse {
|
|
2704
|
+
upcomingCharges?: SubscriptionCharge[];
|
|
2705
|
+
}
|
|
2706
|
+
export interface PreviewSubscriptionChargesRequest extends PreviewSubscriptionChargesRequestSubscriptionOneOf {
|
|
2707
|
+
/** Information about a non-existing subscription. */
|
|
2708
|
+
subscriptionInfo?: SubscriptionInfo;
|
|
2709
|
+
}
|
|
2710
|
+
/** @oneof */
|
|
2711
|
+
export interface PreviewSubscriptionChargesRequestSubscriptionOneOf {
|
|
2712
|
+
/** Information about a non-existing subscription. */
|
|
2713
|
+
subscriptionInfo?: SubscriptionInfo;
|
|
2714
|
+
}
|
|
2715
|
+
/** Subscription information to use for calculating the preview of charges for a subscription. */
|
|
2716
|
+
export interface SubscriptionInfo {
|
|
2717
|
+
billingSettings?: BillingSettings;
|
|
2718
|
+
items?: Item[];
|
|
2719
|
+
startDate?: Date | null;
|
|
2720
|
+
}
|
|
2721
|
+
export interface PreviewSubscriptionChargesResponse {
|
|
2722
|
+
/** Charges for subscription. */
|
|
2723
|
+
charges?: Charge[];
|
|
2724
|
+
}
|
|
2725
|
+
/** Represents a charge applicable to a subscription. */
|
|
2726
|
+
export interface Charge {
|
|
2727
|
+
/** The cycle number from which the charge starts. */
|
|
2728
|
+
cycleFrom?: number;
|
|
2729
|
+
/** The number of cycles for which the charge is applicable. */
|
|
2730
|
+
cycleCount?: number | null;
|
|
2731
|
+
/** The breakdown of the charge */
|
|
2732
|
+
totals?: Totals;
|
|
2733
|
+
/** The billing date from which the charge starts */
|
|
2734
|
+
cycleBillingDate?: Date | null;
|
|
2735
|
+
}
|
|
2736
|
+
export interface PreviewSubscriptionsChargesRequest {
|
|
2737
|
+
/**
|
|
2738
|
+
* Information required to calculate the preview charges for the subscriptions, including an identifier.
|
|
2739
|
+
* @minSize 1
|
|
2740
|
+
* @maxSize 10
|
|
2741
|
+
*/
|
|
2742
|
+
subscriptionsBillingDetails?: SubscriptionBillingDetails[];
|
|
2743
|
+
/**
|
|
2744
|
+
* Specifies the number of upcoming billing charges to preview for all subscriptions in the order.
|
|
2745
|
+
* For instance, if a subscription costs $10 for the first 3 cycles, $12 for cycles 4 through 7,
|
|
2746
|
+
* $15 for cycles 8 through 10, and $20 for cycle 11 onwards:
|
|
2170
2747
|
* - Sending "1" will calculate and return charges for cycles 4 through 7 since it's the first charge in the future.
|
|
2171
2748
|
* - Sending "2" will provide a response with charges for cycles 4 through 7 and cycles 8 through 10.
|
|
2172
2749
|
* - Sending "3" or more will include totals for cycles 4 through 7, cycles 8 through 10, and from cycle 11 onwards.
|
|
@@ -2174,15 +2751,24 @@ export interface PreviewSubscriptionsChargesRequest {
|
|
|
2174
2751
|
* in this case, charges for cycle 1 through 3.
|
|
2175
2752
|
* If there is a single charge for a subscription, meaning that subscription price remains consistent across all cycles,
|
|
2176
2753
|
* then even if future_charges_count is set, it will be ignored and the only charge this subscription has will be returned.
|
|
2754
|
+
* @min 1
|
|
2755
|
+
* @max 10
|
|
2177
2756
|
*/
|
|
2178
2757
|
numberOfNextRecurringCharges?: number | null;
|
|
2179
2758
|
}
|
|
2180
2759
|
export interface SubscriptionBillingDetails {
|
|
2181
|
-
/**
|
|
2760
|
+
/**
|
|
2761
|
+
* External identifier of the subscription
|
|
2762
|
+
* @format GUID
|
|
2763
|
+
*/
|
|
2182
2764
|
externalId?: string | null;
|
|
2183
2765
|
/** Billing details parameters including schedule, currency, etc. */
|
|
2184
2766
|
billingSettings?: BillingSettings;
|
|
2185
|
-
/**
|
|
2767
|
+
/**
|
|
2768
|
+
* Items, minSize is 1, maxSize is 100
|
|
2769
|
+
* @minSize 1
|
|
2770
|
+
* @maxSize 100
|
|
2771
|
+
*/
|
|
2186
2772
|
items?: Item[];
|
|
2187
2773
|
/** Subscription start date, now if not set */
|
|
2188
2774
|
startDate?: Date | null;
|
|
@@ -2194,7 +2780,10 @@ export interface PreviewSubscriptionsChargesResponse {
|
|
|
2194
2780
|
subscriptionsCharges?: SubscriptionCharges[];
|
|
2195
2781
|
}
|
|
2196
2782
|
export interface SubscriptionCharges {
|
|
2197
|
-
/**
|
|
2783
|
+
/**
|
|
2784
|
+
* External identifier of the subscription
|
|
2785
|
+
* @format GUID
|
|
2786
|
+
*/
|
|
2198
2787
|
externalId?: string | null;
|
|
2199
2788
|
/** Charges for subscription. */
|
|
2200
2789
|
charges?: Charge[];
|
|
@@ -2202,7 +2791,10 @@ export interface SubscriptionCharges {
|
|
|
2202
2791
|
export interface CreateSubscriptionForOrderRequest {
|
|
2203
2792
|
/** Subscription needs to be created */
|
|
2204
2793
|
subscription?: Subscription;
|
|
2205
|
-
/**
|
|
2794
|
+
/**
|
|
2795
|
+
* Optional unique identifier for this request in order to prevent subscription duplications
|
|
2796
|
+
* @format GUID
|
|
2797
|
+
*/
|
|
2206
2798
|
idempotencyKey?: string | null;
|
|
2207
2799
|
}
|
|
2208
2800
|
export interface CreateSubscriptionForOrderResponse {
|
|
@@ -2215,6 +2807,7 @@ export interface CreateSubscriptionForOrderResponse {
|
|
|
2215
2807
|
export interface Invoice {
|
|
2216
2808
|
/**
|
|
2217
2809
|
* Invoice ID.
|
|
2810
|
+
* @format GUID
|
|
2218
2811
|
* @readonly
|
|
2219
2812
|
*/
|
|
2220
2813
|
_id?: string | null;
|
|
@@ -2254,6 +2847,7 @@ export interface Invoice {
|
|
|
2254
2847
|
/**
|
|
2255
2848
|
* 3-letter currency code of the invoice in
|
|
2256
2849
|
* [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
|
|
2850
|
+
* @format CURRENCY
|
|
2257
2851
|
*/
|
|
2258
2852
|
currency?: string;
|
|
2259
2853
|
/** Information about the customer. */
|
|
@@ -2272,11 +2866,13 @@ export interface Invoice {
|
|
|
2272
2866
|
* [payment method](https://bo.wix.com/wix-docs/rest/wix-cashier/settings/payment-method-type/payment-method-type-object).
|
|
2273
2867
|
* Not available for the first payment of a subscription and all offline
|
|
2274
2868
|
* payments.
|
|
2869
|
+
* @format GUID
|
|
2275
2870
|
*/
|
|
2276
2871
|
paymentMethodId?: string | null;
|
|
2277
2872
|
/**
|
|
2278
2873
|
* Cashier [Order ID](https://dev.wix.com/docs/rest/payments/wix-cashier/pay/order#order-object)
|
|
2279
2874
|
* for the corresponding payment.
|
|
2875
|
+
* @format GUID
|
|
2280
2876
|
* @readonly
|
|
2281
2877
|
*/
|
|
2282
2878
|
paymentOrderId?: string | null;
|
|
@@ -2286,7 +2882,10 @@ export interface Invoice {
|
|
|
2286
2882
|
billingAddress?: FullAddressDetails;
|
|
2287
2883
|
/** Shipping address. Available only for `"PHYSICAL"` line items. */
|
|
2288
2884
|
shippingAddress?: FullAddressDetails;
|
|
2289
|
-
/**
|
|
2885
|
+
/**
|
|
2886
|
+
* Shipping fee in `0.00` format.
|
|
2887
|
+
* @format DECIMAL_VALUE
|
|
2888
|
+
*/
|
|
2290
2889
|
shippingFee?: string | null;
|
|
2291
2890
|
/**
|
|
2292
2891
|
* Information about the invoice's totals.
|
|
@@ -2310,6 +2909,7 @@ export interface Invoice {
|
|
|
2310
2909
|
adjustments?: PriceAdjustment[];
|
|
2311
2910
|
/**
|
|
2312
2911
|
* Invoice Number.
|
|
2912
|
+
* @maxLength 10
|
|
2313
2913
|
* @readonly
|
|
2314
2914
|
*/
|
|
2315
2915
|
invoiceNumber?: string | null;
|
|
@@ -2323,23 +2923,29 @@ export interface Invoice {
|
|
|
2323
2923
|
taxData?: TaxData;
|
|
2324
2924
|
/** Business address. */
|
|
2325
2925
|
businessAddress?: Address;
|
|
2326
|
-
/**
|
|
2926
|
+
/**
|
|
2927
|
+
* ID of the billing order that created this invoice.
|
|
2928
|
+
* @format GUID
|
|
2929
|
+
*/
|
|
2327
2930
|
orderId?: string | null;
|
|
2328
2931
|
}
|
|
2329
2932
|
export interface BusinessOriginData {
|
|
2330
2933
|
/**
|
|
2331
2934
|
* ID of the app for which BASS has created the invoice. For example,
|
|
2332
2935
|
* `"1380b703-ce81-ff05-f115-39571d94dfcd"` for the Wix eCommerce app.
|
|
2936
|
+
* @format GUID
|
|
2333
2937
|
*/
|
|
2334
2938
|
appId?: string;
|
|
2335
2939
|
/**
|
|
2336
2940
|
* [Instance ID](https://dev.wix.com/api/rest/app-management/apps/app-instance/get-app-instance)
|
|
2337
2941
|
* of the app for which BASS has created the invoice.
|
|
2942
|
+
* @format GUID
|
|
2338
2943
|
*/
|
|
2339
2944
|
instanceId?: string;
|
|
2340
2945
|
/**
|
|
2341
2946
|
* ID of the entity that triggered the invoice creation. For example, the ID of a
|
|
2342
2947
|
* [pricing plan](https://dev.wix.com/docs/rest/payments/pricing-plans/pricing-plans/plan#plan-object).
|
|
2948
|
+
* @format GUID
|
|
2343
2949
|
*/
|
|
2344
2950
|
entityId?: string;
|
|
2345
2951
|
}
|
|
@@ -2365,6 +2971,7 @@ export declare enum CreationMode {
|
|
|
2365
2971
|
export interface LatestPaymentAttempt {
|
|
2366
2972
|
/**
|
|
2367
2973
|
* ID of the latest payment attempt.
|
|
2974
|
+
* @format GUID
|
|
2368
2975
|
* @readonly
|
|
2369
2976
|
*/
|
|
2370
2977
|
paymentAttemptId?: string;
|
|
@@ -2422,6 +3029,7 @@ export interface PriceAdjustmentValue extends PriceAdjustmentValueAdjustmentValu
|
|
|
2422
3029
|
* Absolute amount that adjusts the price.
|
|
2423
3030
|
*
|
|
2424
3031
|
* Min: `0.01`
|
|
3032
|
+
* @decimalValue options - {gt:0.00}
|
|
2425
3033
|
*/
|
|
2426
3034
|
amount?: string;
|
|
2427
3035
|
/**
|
|
@@ -2433,6 +3041,7 @@ export interface PriceAdjustmentValue extends PriceAdjustmentValueAdjustmentValu
|
|
|
2433
3041
|
*
|
|
2434
3042
|
* Min: `0.01`
|
|
2435
3043
|
* Max: `1.00`
|
|
3044
|
+
* @decimalValue options - {gt:0.00,lte:1}
|
|
2436
3045
|
*/
|
|
2437
3046
|
multiplier?: string;
|
|
2438
3047
|
}
|
|
@@ -2442,6 +3051,7 @@ export interface PriceAdjustmentValueAdjustmentValueTypeOneOf {
|
|
|
2442
3051
|
* Absolute amount that adjusts the price.
|
|
2443
3052
|
*
|
|
2444
3053
|
* Min: `0.01`
|
|
3054
|
+
* @decimalValue options - {gt:0.00}
|
|
2445
3055
|
*/
|
|
2446
3056
|
amount?: string;
|
|
2447
3057
|
/**
|
|
@@ -2453,6 +3063,7 @@ export interface PriceAdjustmentValueAdjustmentValueTypeOneOf {
|
|
|
2453
3063
|
*
|
|
2454
3064
|
* Min: `0.01`
|
|
2455
3065
|
* Max: `1.00`
|
|
3066
|
+
* @decimalValue options - {gt:0.00,lte:1}
|
|
2456
3067
|
*/
|
|
2457
3068
|
multiplier?: string;
|
|
2458
3069
|
}
|
|
@@ -2461,6 +3072,7 @@ export interface InvoiceShippingCharges {
|
|
|
2461
3072
|
* Amount of the shipping fee in `0.00` format.
|
|
2462
3073
|
*
|
|
2463
3074
|
* Min: `0.01`
|
|
3075
|
+
* @decimalValue options - {gte:0.00,maxScale:2}
|
|
2464
3076
|
*/
|
|
2465
3077
|
amount?: string;
|
|
2466
3078
|
/** Tax of the shipping fee */
|
|
@@ -2475,23 +3087,45 @@ export interface TaxData {
|
|
|
2475
3087
|
taxSummary?: TaxSummary;
|
|
2476
3088
|
}
|
|
2477
3089
|
export interface TaxSummary {
|
|
2478
|
-
/**
|
|
3090
|
+
/**
|
|
3091
|
+
* Aggregated from tax_breakdowns with exemptions excluded from amount
|
|
3092
|
+
* @format DECIMAL_VALUE
|
|
3093
|
+
*/
|
|
2479
3094
|
aggregatedTaxAmount?: string;
|
|
2480
|
-
/**
|
|
3095
|
+
/**
|
|
3096
|
+
* Array of each tax applied, grouped by `"jurisdiction"`, `"jurisdiction_type"`, `"tax_type"`, `"tax_name"` and `"tax_rate"`.
|
|
3097
|
+
* @maxSize 50
|
|
3098
|
+
*/
|
|
2481
3099
|
aggregatedTaxBreakdowns?: AggregatedTaxBreakdown[];
|
|
2482
3100
|
}
|
|
2483
3101
|
export interface AggregatedTaxBreakdown {
|
|
2484
|
-
/**
|
|
3102
|
+
/**
|
|
3103
|
+
* Name of the tax that was calculated.
|
|
3104
|
+
* @maxLength 200
|
|
3105
|
+
*/
|
|
2485
3106
|
taxName?: string;
|
|
2486
|
-
/**
|
|
3107
|
+
/**
|
|
3108
|
+
* Type of tax that was calculated.
|
|
3109
|
+
* @maxLength 200
|
|
3110
|
+
*/
|
|
2487
3111
|
taxType?: string;
|
|
2488
|
-
/**
|
|
3112
|
+
/**
|
|
3113
|
+
* Jurisdiction that taxes were calculated for.
|
|
3114
|
+
* @maxLength 200
|
|
3115
|
+
*/
|
|
2489
3116
|
jurisdiction?: string;
|
|
2490
3117
|
/** Type of jurisdiction that taxes were calculated for. */
|
|
2491
3118
|
jurisdictionType?: string;
|
|
2492
|
-
/**
|
|
3119
|
+
/**
|
|
3120
|
+
* Tax rate used for this jurisdiction, as a decimal. For example, 10% tax is `"0.1000"` and 200% tax is `"2.0000"`.
|
|
3121
|
+
* @decimalValue options - {gte:0,maxScale:6}
|
|
3122
|
+
*/
|
|
2493
3123
|
rate?: string;
|
|
2494
|
-
/**
|
|
3124
|
+
/**
|
|
3125
|
+
* Total amount of this tax for this jurisdiction.
|
|
3126
|
+
* @format DECIMAL_VALUE
|
|
3127
|
+
* @decimalValue options - {maxScale:4}
|
|
3128
|
+
*/
|
|
2495
3129
|
aggregatedTaxAmount?: string;
|
|
2496
3130
|
}
|
|
2497
3131
|
export interface Task {
|
|
@@ -2523,8 +3157,6 @@ export interface Reschedule {
|
|
|
2523
3157
|
executeAt?: Date | null;
|
|
2524
3158
|
payload?: string | null;
|
|
2525
3159
|
}
|
|
2526
|
-
export interface Empty {
|
|
2527
|
-
}
|
|
2528
3160
|
export interface V1SubscriptionEvent extends V1SubscriptionEventEventOneOf {
|
|
2529
3161
|
/** A subscriptions was created */
|
|
2530
3162
|
created?: V1SubscriptionCreated;
|
|
@@ -2592,22 +3224,41 @@ export interface V1SubscriptionCreated {
|
|
|
2592
3224
|
export interface V1Subscription {
|
|
2593
3225
|
/**
|
|
2594
3226
|
* ID of the subscription
|
|
3227
|
+
* @format GUID
|
|
2595
3228
|
* @readonly
|
|
2596
3229
|
*/
|
|
2597
3230
|
_id?: string;
|
|
2598
|
-
/**
|
|
3231
|
+
/**
|
|
3232
|
+
* ID of the app which created the subscription
|
|
3233
|
+
* @format GUID
|
|
3234
|
+
*/
|
|
2599
3235
|
wixAppId?: string;
|
|
2600
|
-
/**
|
|
3236
|
+
/**
|
|
3237
|
+
* Instance ID of the Subscriptions app
|
|
3238
|
+
* @format GUID
|
|
3239
|
+
*/
|
|
2601
3240
|
tenantId?: string;
|
|
2602
|
-
/**
|
|
3241
|
+
/**
|
|
3242
|
+
* ID of entity in app (e.g. a cart in stores/order in paid plans)
|
|
3243
|
+
* @format GUID
|
|
3244
|
+
*/
|
|
2603
3245
|
originEntityId?: string;
|
|
2604
3246
|
/** Site member or a contact who bought the subscription */
|
|
2605
3247
|
subscriber?: Subscriber;
|
|
2606
|
-
/**
|
|
3248
|
+
/**
|
|
3249
|
+
* Wix Pay order ID, is empty for free subscriptions
|
|
3250
|
+
* @format GUID
|
|
3251
|
+
*/
|
|
2607
3252
|
wixPayOrderId?: string | null;
|
|
2608
|
-
/**
|
|
3253
|
+
/**
|
|
3254
|
+
* Subscription name (e.g. a product or subscription package name)
|
|
3255
|
+
* @maxLength 150
|
|
3256
|
+
*/
|
|
2609
3257
|
name?: string;
|
|
2610
|
-
/**
|
|
3258
|
+
/**
|
|
3259
|
+
* Optional additional subscription description
|
|
3260
|
+
* @maxLength 500
|
|
3261
|
+
*/
|
|
2611
3262
|
description?: string;
|
|
2612
3263
|
/** Amount to be paid for a single scheduled payment */
|
|
2613
3264
|
price?: Money;
|
|
@@ -2641,10 +3292,14 @@ export interface V1Subscription {
|
|
|
2641
3292
|
validUntilDateWithSuspensions?: Date | null;
|
|
2642
3293
|
/** Duration of single payment subscription (instead of billing_profile) */
|
|
2643
3294
|
singlePaymentDuration?: V1Duration;
|
|
3295
|
+
/** @format GUID */
|
|
2644
3296
|
originInstanceId?: string | null;
|
|
2645
3297
|
}
|
|
2646
3298
|
export interface Subscriber {
|
|
2647
|
-
/**
|
|
3299
|
+
/**
|
|
3300
|
+
* Member or contact ID
|
|
3301
|
+
* @format GUID
|
|
3302
|
+
*/
|
|
2648
3303
|
_id?: string;
|
|
2649
3304
|
/** Member or contact */
|
|
2650
3305
|
identityType?: IdentityType;
|
|
@@ -2659,9 +3314,16 @@ export declare enum IdentityType {
|
|
|
2659
3314
|
}
|
|
2660
3315
|
/** Price of a payment. Includes amount and currency. */
|
|
2661
3316
|
export interface Money {
|
|
2662
|
-
/**
|
|
3317
|
+
/**
|
|
3318
|
+
* Monetary amount i.e. 3.99.
|
|
3319
|
+
* @format DECIMAL_VALUE
|
|
3320
|
+
*/
|
|
2663
3321
|
amount?: string;
|
|
2664
|
-
/**
|
|
3322
|
+
/**
|
|
3323
|
+
* Currency in ISO 4217 format i.e. USD.
|
|
3324
|
+
* @minLength 3
|
|
3325
|
+
* @maxLength 3
|
|
3326
|
+
*/
|
|
2665
3327
|
currency?: string;
|
|
2666
3328
|
}
|
|
2667
3329
|
export declare enum SubscriptionType {
|
|
@@ -2718,383 +3380,287 @@ export interface V2Subscription {
|
|
|
2718
3380
|
frequency?: SubscriptionFrequency;
|
|
2719
3381
|
/** interval of recurring payment (required) */
|
|
2720
3382
|
interval?: number;
|
|
2721
|
-
/** trial period for recurring payment (optional) */
|
|
2722
|
-
trial?: SubscriptionTrialPeriod;
|
|
2723
|
-
/**
|
|
2724
|
-
* how many billing cycles should be done before subscription finishes
|
|
2725
|
-
* (optional, 0 by default means endless subscription)
|
|
2726
|
-
*/
|
|
2727
|
-
billingCycles?: number;
|
|
2728
|
-
/**
|
|
2729
|
-
* date in the future or in the past when the first billing cycle begins
|
|
2730
|
-
* (the first off-session payment is performed when it ends)
|
|
2731
|
-
*/
|
|
2732
|
-
firstCycleStartDate?: Date | null;
|
|
2733
|
-
}
|
|
2734
|
-
/** Frequency unit of recurring payment */
|
|
2735
|
-
export declare enum SubscriptionFrequency {
|
|
2736
|
-
UNDEFINED = "UNDEFINED",
|
|
2737
|
-
DAY = "DAY",
|
|
2738
|
-
WEEK = "WEEK",
|
|
2739
|
-
MONTH = "MONTH",
|
|
2740
|
-
YEAR = "YEAR"
|
|
2741
|
-
}
|
|
2742
|
-
/** Trial period of subscription */
|
|
2743
|
-
export interface SubscriptionTrialPeriod {
|
|
2744
|
-
/** trial period in units (required) */
|
|
2745
|
-
period?: number;
|
|
2746
|
-
/** units in which trial period is described (optional, default DAY) */
|
|
2747
|
-
unit?: SubscriptionFrequency;
|
|
2748
|
-
}
|
|
2749
|
-
export declare enum CancellationInitiator {
|
|
2750
|
-
/** Cancellation initiator undefined */
|
|
2751
|
-
UNDEFINED = "UNDEFINED",
|
|
2752
|
-
/** Subscription was canceled by site owner (default if canceled by user or service identity) */
|
|
2753
|
-
OWNER = "OWNER",
|
|
2754
|
-
/** Subscription was canceled by member (default if canceled by member identity) */
|
|
2755
|
-
MEMBER = "MEMBER",
|
|
2756
|
-
/** Subscription was canceled because of payment failure */
|
|
2757
|
-
PAYMENT_FAILURE = "PAYMENT_FAILURE",
|
|
2758
|
-
/** Subscription was canceled because of payment setup failure */
|
|
2759
|
-
SETUP_FAILURE = "SETUP_FAILURE"
|
|
2760
|
-
}
|
|
2761
|
-
export interface SubscriptionPolicy {
|
|
2762
|
-
/** Subscription expiration date can be updated */
|
|
2763
|
-
expiryDateChangeable?: boolean;
|
|
2764
|
-
/** Subscription can be cancelled by the member who bought it (when memberId == subscriberId) */
|
|
2765
|
-
cancellableByMember?: boolean;
|
|
2766
|
-
/** Subscription expiration date on cancellation can be set to next payment date */
|
|
2767
|
-
cancellableAtNextPaymentCycle?: boolean;
|
|
2768
|
-
}
|
|
2769
|
-
export interface Suspension {
|
|
2770
|
-
status?: Status;
|
|
2771
|
-
/** Beginning of the suspended period */
|
|
2772
|
-
startsAt?: Date | null;
|
|
2773
|
-
/** End of the suspended period */
|
|
2774
|
-
endsAt?: Date | null;
|
|
2775
|
-
}
|
|
2776
|
-
export declare enum Status {
|
|
2777
|
-
UNDEFINED = "UNDEFINED",
|
|
2778
|
-
ACTIVE = "ACTIVE",
|
|
2779
|
-
ENDED = "ENDED"
|
|
2780
|
-
}
|
|
2781
|
-
/** A duration expressed in amount of time units. */
|
|
2782
|
-
export interface V1Duration {
|
|
2783
|
-
/** Amount of the unit */
|
|
2784
|
-
amount?: number;
|
|
2785
|
-
/** Day, Week, Month, Year. */
|
|
2786
|
-
unit?: SubscriptionFrequency;
|
|
2787
|
-
}
|
|
2788
|
-
export interface V1SubscriptionActivated {
|
|
2789
|
-
subscription?: V1Subscription;
|
|
2790
|
-
}
|
|
2791
|
-
export interface V1SubscriptionCanceled {
|
|
2792
|
-
subscription?: V1Subscription;
|
|
2793
|
-
}
|
|
2794
|
-
export interface V1SubscriptionUpdated {
|
|
2795
|
-
subscription?: V1Subscription;
|
|
2796
|
-
}
|
|
2797
|
-
export interface SubscriptionCycleTriggered {
|
|
2798
|
-
subscription?: V1Subscription;
|
|
2799
|
-
billingCycle?: number;
|
|
2800
|
-
/** Wix Pay transaction id, optional. Exists if event was triggered by a payment. */
|
|
2801
|
-
transactionId?: string | null;
|
|
2802
|
-
}
|
|
2803
|
-
export interface SubscriptionMarkedAsPaid {
|
|
2804
|
-
subscription?: V1Subscription;
|
|
2805
|
-
/** A number indicating which payment (cycle) was marked as paid. For recurring subscriptions only. */
|
|
2806
|
-
billingCycle?: number | null;
|
|
2807
|
-
}
|
|
2808
|
-
export interface SubscriptionCancellationRequested {
|
|
2809
|
-
subscription?: V1Subscription;
|
|
2810
|
-
}
|
|
2811
|
-
export interface SubscriptionSuspended {
|
|
2812
|
-
subscription?: V1Subscription;
|
|
2813
|
-
}
|
|
2814
|
-
export interface V1SubscriptionResumed {
|
|
2815
|
-
subscription?: V1Subscription;
|
|
2816
|
-
}
|
|
2817
|
-
export interface SubscriptionExpired {
|
|
2818
|
-
subscription?: V1Subscription;
|
|
2819
|
-
}
|
|
2820
|
-
export interface V1SubscriptionInitialPurchaseCompleted {
|
|
2821
|
-
subscription?: V1Subscription;
|
|
2822
|
-
}
|
|
2823
|
-
export interface CreateSubscriptionInStateRequest extends CreateSubscriptionInStateRequestModeOneOf {
|
|
2824
|
-
activeSubscription?: CreateSubscriptionRequest;
|
|
2825
|
-
}
|
|
2826
|
-
/** @oneof */
|
|
2827
|
-
export interface CreateSubscriptionInStateRequestModeOneOf {
|
|
2828
|
-
activeSubscription?: CreateSubscriptionRequest;
|
|
2829
|
-
}
|
|
2830
|
-
export interface CreateSubscriptionInStateResponse {
|
|
2831
|
-
subscriptionId?: string;
|
|
2832
|
-
}
|
|
2833
|
-
export interface PayCycleRequest {
|
|
2834
|
-
subscriptionId: string;
|
|
2835
|
-
paymentTestMode?: PaymentTestMode;
|
|
2836
|
-
tenantId: string;
|
|
2837
|
-
}
|
|
2838
|
-
export declare enum PaymentTestMode {
|
|
2839
|
-
REGULAR = "REGULAR",
|
|
2840
|
-
FAIL_TECHNICAL = "FAIL_TECHNICAL",
|
|
2841
|
-
FAIL_DECLINE = "FAIL_DECLINE",
|
|
2842
|
-
FAIL_RETRYABLE_DECLINE = "FAIL_RETRYABLE_DECLINE"
|
|
2843
|
-
}
|
|
2844
|
-
export interface PayCycleResponse {
|
|
2845
|
-
invoiceId?: string;
|
|
2846
|
-
paymentOrderId?: string | null;
|
|
2847
|
-
subscription?: Subscription;
|
|
2848
|
-
}
|
|
2849
|
-
export interface GetFullSubscriptionDataRequest {
|
|
2850
|
-
_id?: string;
|
|
2851
|
-
}
|
|
2852
|
-
export interface GetFullSubscriptionDataResponse {
|
|
2853
|
-
subscription?: Subscription;
|
|
2854
|
-
internalSubscriptionData?: InternalSubscriptionData;
|
|
2855
|
-
}
|
|
2856
|
-
export interface InternalSubscriptionData {
|
|
2857
|
-
originInstanceId?: string;
|
|
2858
|
-
source?: string | null;
|
|
2859
|
-
billingType?: string;
|
|
2860
|
-
isOneTime?: boolean;
|
|
2861
|
-
migrationDetails?: MigrationDetails;
|
|
2862
|
-
pausePaidDuration?: string | null;
|
|
2863
|
-
authorizationPaymentData?: PaymentData;
|
|
2864
|
-
currentCyclePausePeriods?: PausePeriod[];
|
|
2865
|
-
}
|
|
2866
|
-
export interface MigrationDetails {
|
|
2867
|
-
/** system (application) where the Subscription has been created */
|
|
2868
|
-
originSystem?: string;
|
|
2869
|
-
/** date when the Subscription started to be managed in BASS */
|
|
2870
|
-
shiftManagementDate?: Date | null;
|
|
2871
|
-
}
|
|
2872
|
-
export interface PausePeriod {
|
|
2873
|
-
startDate?: Date | null;
|
|
2874
|
-
endDate?: Date | null;
|
|
2875
|
-
}
|
|
2876
|
-
export interface GetSubscriptionAndInternalDataRequest {
|
|
2877
|
-
subscriptionId?: string;
|
|
2878
|
-
tenantId?: string;
|
|
2879
|
-
}
|
|
2880
|
-
export interface GetSubscriptionAndInternalDataResponse {
|
|
2881
|
-
subscription?: Subscription;
|
|
2882
|
-
internalSubscriptionData?: InternalSubscriptionData;
|
|
2883
|
-
}
|
|
2884
|
-
export interface SearchSubscriptionRequest {
|
|
2885
|
-
_id?: string;
|
|
2886
|
-
tenantId?: string;
|
|
2887
|
-
}
|
|
2888
|
-
export interface SearchSubscriptionResponse {
|
|
2889
|
-
subscription?: Subscription;
|
|
2890
|
-
}
|
|
2891
|
-
export interface UpdatePausePaidDurationRequest {
|
|
2892
|
-
subscriptionId?: string;
|
|
2893
|
-
pausePaidDurationSeconds?: string;
|
|
2894
|
-
tenantId?: string;
|
|
2895
|
-
}
|
|
2896
|
-
export interface UpdatePausePaidDurationResponse {
|
|
2897
|
-
}
|
|
2898
|
-
export interface UpdateStatusRequest {
|
|
2899
|
-
subscriptionId?: string;
|
|
2900
|
-
tenantId?: string;
|
|
2901
|
-
status?: SubscriptionStatusEnumSubscriptionStatus;
|
|
2902
|
-
}
|
|
2903
|
-
export interface UpdateStatusResponse {
|
|
2904
|
-
subscription?: Subscription;
|
|
2905
|
-
}
|
|
2906
|
-
export interface UpdatePaymentStatusRequest {
|
|
2907
|
-
subscriptionId?: string;
|
|
2908
|
-
tenantId?: string;
|
|
2909
|
-
paymentStatus?: PaymentStatus;
|
|
2910
|
-
}
|
|
2911
|
-
export interface UpdatePaymentStatusResponse {
|
|
2912
|
-
subscription?: Subscription;
|
|
2913
|
-
}
|
|
2914
|
-
export interface ReviveSubscriptionRequest {
|
|
2915
|
-
tenantId?: string;
|
|
2916
|
-
subscriptionId?: string;
|
|
2917
|
-
revivePolicy?: RevivePolicy;
|
|
2918
|
-
isTestRun?: boolean;
|
|
2919
|
-
}
|
|
2920
|
-
export declare enum RevivePolicy {
|
|
2921
|
-
SIMPLE = "SIMPLE",
|
|
2922
|
-
RESUME = "RESUME"
|
|
2923
|
-
}
|
|
2924
|
-
export interface ReviveSubscriptionResponse {
|
|
2925
|
-
subscription?: Subscription;
|
|
3383
|
+
/** trial period for recurring payment (optional) */
|
|
3384
|
+
trial?: SubscriptionTrialPeriod;
|
|
3385
|
+
/**
|
|
3386
|
+
* how many billing cycles should be done before subscription finishes
|
|
3387
|
+
* (optional, 0 by default means endless subscription)
|
|
3388
|
+
*/
|
|
3389
|
+
billingCycles?: number;
|
|
3390
|
+
/**
|
|
3391
|
+
* date in the future or in the past when the first billing cycle begins
|
|
3392
|
+
* (the first off-session payment is performed when it ends)
|
|
3393
|
+
*/
|
|
3394
|
+
firstCycleStartDate?: Date | null;
|
|
2926
3395
|
}
|
|
2927
|
-
|
|
2928
|
-
|
|
3396
|
+
/** Frequency unit of recurring payment */
|
|
3397
|
+
export declare enum SubscriptionFrequency {
|
|
3398
|
+
UNDEFINED = "UNDEFINED",
|
|
3399
|
+
DAY = "DAY",
|
|
3400
|
+
WEEK = "WEEK",
|
|
3401
|
+
MONTH = "MONTH",
|
|
3402
|
+
YEAR = "YEAR"
|
|
2929
3403
|
}
|
|
2930
|
-
|
|
2931
|
-
|
|
3404
|
+
/** Trial period of subscription */
|
|
3405
|
+
export interface SubscriptionTrialPeriod {
|
|
3406
|
+
/** trial period in units (required) */
|
|
3407
|
+
period?: number;
|
|
3408
|
+
/** units in which trial period is described (optional, default DAY) */
|
|
3409
|
+
unit?: SubscriptionFrequency;
|
|
2932
3410
|
}
|
|
2933
|
-
export
|
|
2934
|
-
|
|
3411
|
+
export declare enum CancellationInitiator {
|
|
3412
|
+
/** Cancellation initiator undefined */
|
|
3413
|
+
UNDEFINED = "UNDEFINED",
|
|
3414
|
+
/** Subscription was canceled by site owner (default if canceled by user or service identity) */
|
|
3415
|
+
OWNER = "OWNER",
|
|
3416
|
+
/** Subscription was canceled by member (default if canceled by member identity) */
|
|
3417
|
+
MEMBER = "MEMBER",
|
|
3418
|
+
/** Subscription was canceled because of payment failure */
|
|
3419
|
+
PAYMENT_FAILURE = "PAYMENT_FAILURE",
|
|
3420
|
+
/** Subscription was canceled because of payment setup failure */
|
|
3421
|
+
SETUP_FAILURE = "SETUP_FAILURE"
|
|
2935
3422
|
}
|
|
2936
|
-
export interface
|
|
2937
|
-
|
|
3423
|
+
export interface SubscriptionPolicy {
|
|
3424
|
+
/** Subscription expiration date can be updated */
|
|
3425
|
+
expiryDateChangeable?: boolean;
|
|
3426
|
+
/** Subscription can be cancelled by the member who bought it (when memberId == subscriberId) */
|
|
3427
|
+
cancellableByMember?: boolean;
|
|
3428
|
+
/** Subscription expiration date on cancellation can be set to next payment date */
|
|
3429
|
+
cancellableAtNextPaymentCycle?: boolean;
|
|
2938
3430
|
}
|
|
2939
|
-
export interface
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
3431
|
+
export interface Suspension {
|
|
3432
|
+
status?: Status;
|
|
3433
|
+
/** Beginning of the suspended period */
|
|
3434
|
+
startsAt?: Date | null;
|
|
3435
|
+
/** End of the suspended period */
|
|
3436
|
+
endsAt?: Date | null;
|
|
2943
3437
|
}
|
|
2944
|
-
export
|
|
2945
|
-
|
|
2946
|
-
|
|
3438
|
+
export declare enum Status {
|
|
3439
|
+
UNDEFINED = "UNDEFINED",
|
|
3440
|
+
ACTIVE = "ACTIVE",
|
|
3441
|
+
ENDED = "ENDED"
|
|
2947
3442
|
}
|
|
2948
|
-
|
|
2949
|
-
|
|
3443
|
+
/** A duration expressed in amount of time units. */
|
|
3444
|
+
export interface V1Duration {
|
|
3445
|
+
/** Amount of the unit */
|
|
3446
|
+
amount?: number;
|
|
3447
|
+
/** Day, Week, Month, Year. */
|
|
3448
|
+
unit?: SubscriptionFrequency;
|
|
2950
3449
|
}
|
|
2951
|
-
export interface
|
|
2952
|
-
|
|
2953
|
-
subscriptionId?: string;
|
|
2954
|
-
taskType?: string;
|
|
3450
|
+
export interface V1SubscriptionActivated {
|
|
3451
|
+
subscription?: V1Subscription;
|
|
2955
3452
|
}
|
|
2956
|
-
export interface
|
|
2957
|
-
|
|
2958
|
-
taskType?: string;
|
|
2959
|
-
executionTime?: Date | null;
|
|
2960
|
-
tenantId?: string;
|
|
3453
|
+
export interface V1SubscriptionCanceled {
|
|
3454
|
+
subscription?: V1Subscription;
|
|
2961
3455
|
}
|
|
2962
|
-
export interface
|
|
2963
|
-
|
|
2964
|
-
subscriptionId?: string;
|
|
2965
|
-
taskType?: string;
|
|
3456
|
+
export interface V1SubscriptionUpdated {
|
|
3457
|
+
subscription?: V1Subscription;
|
|
2966
3458
|
}
|
|
2967
|
-
export interface
|
|
2968
|
-
|
|
2969
|
-
|
|
3459
|
+
export interface SubscriptionCycleTriggered {
|
|
3460
|
+
subscription?: V1Subscription;
|
|
3461
|
+
billingCycle?: number;
|
|
3462
|
+
/**
|
|
3463
|
+
* Wix Pay transaction id, optional. Exists if event was triggered by a payment.
|
|
3464
|
+
* @format GUID
|
|
3465
|
+
*/
|
|
3466
|
+
transactionId?: string | null;
|
|
2970
3467
|
}
|
|
2971
|
-
export interface
|
|
2972
|
-
subscription?:
|
|
3468
|
+
export interface SubscriptionMarkedAsPaid {
|
|
3469
|
+
subscription?: V1Subscription;
|
|
3470
|
+
/** A number indicating which payment (cycle) was marked as paid. For recurring subscriptions only. */
|
|
3471
|
+
billingCycle?: number | null;
|
|
2973
3472
|
}
|
|
2974
|
-
export interface
|
|
2975
|
-
|
|
2976
|
-
tenantId?: string;
|
|
2977
|
-
invoiceId?: string;
|
|
2978
|
-
subscriptionCycle?: number;
|
|
3473
|
+
export interface SubscriptionCancellationRequested {
|
|
3474
|
+
subscription?: V1Subscription;
|
|
2979
3475
|
}
|
|
2980
|
-
export interface
|
|
2981
|
-
|
|
3476
|
+
export interface SubscriptionSuspended {
|
|
3477
|
+
subscription?: V1Subscription;
|
|
2982
3478
|
}
|
|
2983
|
-
export interface
|
|
2984
|
-
|
|
2985
|
-
subscriptionId?: string;
|
|
2986
|
-
pauseStartDate?: Date | null;
|
|
2987
|
-
pauseEndDate?: Date | null;
|
|
3479
|
+
export interface V1SubscriptionResumed {
|
|
3480
|
+
subscription?: V1Subscription;
|
|
2988
3481
|
}
|
|
2989
|
-
export interface
|
|
2990
|
-
subscription?:
|
|
3482
|
+
export interface SubscriptionExpired {
|
|
3483
|
+
subscription?: V1Subscription;
|
|
2991
3484
|
}
|
|
2992
|
-
export interface
|
|
2993
|
-
|
|
2994
|
-
subscriptionId?: string;
|
|
2995
|
-
taskType?: string;
|
|
3485
|
+
export interface V1SubscriptionInitialPurchaseCompleted {
|
|
3486
|
+
subscription?: V1Subscription;
|
|
2996
3487
|
}
|
|
2997
|
-
export interface
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3488
|
+
export interface ListSubscriptionHistoryRequest {
|
|
3489
|
+
/** @format GUID */
|
|
3490
|
+
subscriptionId: string;
|
|
3491
|
+
/** Determines the type of view for the history: either a comprehensive backoffice view or a user-centric view. */
|
|
3492
|
+
mode?: HistoryViewMode;
|
|
3493
|
+
/** Cursor for efficient paging. If paging through results, pass this field from the previous search response to continue to the next page. */
|
|
3494
|
+
cursor?: CursorPaging;
|
|
3001
3495
|
}
|
|
3002
|
-
export
|
|
3003
|
-
|
|
3496
|
+
export declare enum HistoryViewMode {
|
|
3497
|
+
UNKNOWN = "UNKNOWN",
|
|
3498
|
+
/** Comprehensive view including all history events. */
|
|
3499
|
+
BACKOFFICE = "BACKOFFICE",
|
|
3500
|
+
/** User-centric view of the history. */
|
|
3501
|
+
USER = "USER"
|
|
3004
3502
|
}
|
|
3005
|
-
export interface
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3503
|
+
export interface ListSubscriptionHistoryResponse {
|
|
3504
|
+
/** List of history entries for the subscription. */
|
|
3505
|
+
historyEntries?: SubscriptionHistoryEntry[];
|
|
3506
|
+
/** Paging metadata. A `next` cursor is returned if there are more results. */
|
|
3507
|
+
pagingMetadata?: PagingMetadataV2;
|
|
3010
3508
|
}
|
|
3011
|
-
export interface
|
|
3012
|
-
|
|
3509
|
+
export interface SubscriptionHistoryEntry {
|
|
3510
|
+
/** @format GUID */
|
|
3511
|
+
entryId?: string;
|
|
3512
|
+
/** TODO: add max length? it is not defined in domainevents, so should we? */
|
|
3513
|
+
slug?: string;
|
|
3514
|
+
entryTime?: Date | null;
|
|
3515
|
+
event?: SubscriptionEvent;
|
|
3013
3516
|
}
|
|
3014
|
-
export interface
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3517
|
+
export interface SubscriptionEvent extends SubscriptionEventPayloadOneOf {
|
|
3518
|
+
created?: SubscriptionCreated;
|
|
3519
|
+
updated?: SubscriptionUpdated;
|
|
3520
|
+
deleted?: SubscriptionDeleted;
|
|
3521
|
+
activated?: SubscriptionActivated;
|
|
3522
|
+
ended?: SubscriptionEnded;
|
|
3523
|
+
canceled?: SubscriptionCanceled;
|
|
3524
|
+
paused?: SubscriptionPaused;
|
|
3525
|
+
resumed?: SubscriptionResumed;
|
|
3526
|
+
pauseRequested?: PauseSubscriptionRequested;
|
|
3527
|
+
resumeRequested?: ResumeSubscriptionRequested;
|
|
3528
|
+
scheduledPauseCanceled?: ScheduledPauseCanceled;
|
|
3529
|
+
scheduledResumeCanceled?: ScheduledResumeCanceled;
|
|
3530
|
+
billingCycleStarted?: SubscriptionBillingCycleStarted;
|
|
3531
|
+
autoRenewalTurnedOn?: SubscriptionAutoRenewalTurnedOn;
|
|
3532
|
+
autoRenewalTurnedOff?: SubscriptionAutoRenewalTurnedOff;
|
|
3533
|
+
cycleReadyToPay?: SubscriptionCycleReadyToPay;
|
|
3534
|
+
extended?: SubscriptionExtended;
|
|
3535
|
+
initialPurchaseCompleted?: SubscriptionInitialPurchaseCompleted;
|
|
3536
|
+
latestInvoiceMarkedAsPaid?: LatestInvoiceMarkedAsPaid;
|
|
3537
|
+
revived?: SubscriptionRevived;
|
|
3538
|
+
billingDateUpdated?: SubscriptionBillingDateUpdated;
|
|
3539
|
+
futureUpdatesRequested?: FutureUpdatesRequested;
|
|
3540
|
+
updatesApplied?: UpdatesApplied;
|
|
3541
|
+
resetPendingUpdates?: ResetPendingUpdates;
|
|
3542
|
+
gracePeriodStarted?: GracePeriodStarted;
|
|
3543
|
+
gracePeriodEnded?: GracePeriodEnded;
|
|
3544
|
+
paymentMethodUpdated?: PaymentMethodUpdated;
|
|
3545
|
+
collectionMethodUpdated?: SubscriptionCollectionMethodUpdated;
|
|
3546
|
+
freeTrailStarted?: FreeTrailStarted;
|
|
3547
|
+
freeTrailEnded?: FreeTrailEnded;
|
|
3548
|
+
billingCyclePaid?: SubscriptionBillingCyclePaid;
|
|
3549
|
+
initiatePaymentMethodSetup?: InitiatedPaymentMethodSetup;
|
|
3550
|
+
subscriptionBoAction?: SubscriptionBackOfficeAction;
|
|
3551
|
+
unknown?: UnknownSubscriptionEvent;
|
|
3019
3552
|
}
|
|
3020
3553
|
/** @oneof */
|
|
3021
|
-
export interface
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3554
|
+
export interface SubscriptionEventPayloadOneOf {
|
|
3555
|
+
created?: SubscriptionCreated;
|
|
3556
|
+
updated?: SubscriptionUpdated;
|
|
3557
|
+
deleted?: SubscriptionDeleted;
|
|
3558
|
+
activated?: SubscriptionActivated;
|
|
3559
|
+
ended?: SubscriptionEnded;
|
|
3560
|
+
canceled?: SubscriptionCanceled;
|
|
3561
|
+
paused?: SubscriptionPaused;
|
|
3562
|
+
resumed?: SubscriptionResumed;
|
|
3563
|
+
pauseRequested?: PauseSubscriptionRequested;
|
|
3564
|
+
resumeRequested?: ResumeSubscriptionRequested;
|
|
3565
|
+
scheduledPauseCanceled?: ScheduledPauseCanceled;
|
|
3566
|
+
scheduledResumeCanceled?: ScheduledResumeCanceled;
|
|
3567
|
+
billingCycleStarted?: SubscriptionBillingCycleStarted;
|
|
3568
|
+
autoRenewalTurnedOn?: SubscriptionAutoRenewalTurnedOn;
|
|
3569
|
+
autoRenewalTurnedOff?: SubscriptionAutoRenewalTurnedOff;
|
|
3570
|
+
cycleReadyToPay?: SubscriptionCycleReadyToPay;
|
|
3571
|
+
extended?: SubscriptionExtended;
|
|
3572
|
+
initialPurchaseCompleted?: SubscriptionInitialPurchaseCompleted;
|
|
3573
|
+
latestInvoiceMarkedAsPaid?: LatestInvoiceMarkedAsPaid;
|
|
3574
|
+
revived?: SubscriptionRevived;
|
|
3575
|
+
billingDateUpdated?: SubscriptionBillingDateUpdated;
|
|
3576
|
+
futureUpdatesRequested?: FutureUpdatesRequested;
|
|
3577
|
+
updatesApplied?: UpdatesApplied;
|
|
3578
|
+
resetPendingUpdates?: ResetPendingUpdates;
|
|
3579
|
+
gracePeriodStarted?: GracePeriodStarted;
|
|
3580
|
+
gracePeriodEnded?: GracePeriodEnded;
|
|
3581
|
+
paymentMethodUpdated?: PaymentMethodUpdated;
|
|
3582
|
+
collectionMethodUpdated?: SubscriptionCollectionMethodUpdated;
|
|
3583
|
+
freeTrailStarted?: FreeTrailStarted;
|
|
3584
|
+
freeTrailEnded?: FreeTrailEnded;
|
|
3585
|
+
billingCyclePaid?: SubscriptionBillingCyclePaid;
|
|
3586
|
+
initiatePaymentMethodSetup?: InitiatedPaymentMethodSetup;
|
|
3587
|
+
subscriptionBoAction?: SubscriptionBackOfficeAction;
|
|
3588
|
+
unknown?: UnknownSubscriptionEvent;
|
|
3030
3589
|
}
|
|
3031
|
-
export interface
|
|
3032
|
-
|
|
3590
|
+
export interface SubscriptionCreated {
|
|
3591
|
+
subscription?: Subscription;
|
|
3033
3592
|
}
|
|
3034
|
-
export interface
|
|
3035
|
-
|
|
3036
|
-
|
|
3593
|
+
export interface SubscriptionUpdated {
|
|
3594
|
+
current?: Subscription;
|
|
3595
|
+
previous?: Subscription;
|
|
3596
|
+
diff?: SubscriptionDiff;
|
|
3037
3597
|
}
|
|
3038
|
-
export interface
|
|
3039
|
-
|
|
3598
|
+
export interface SubscriptionDiff {
|
|
3599
|
+
added?: string | null;
|
|
3600
|
+
changed?: string | null;
|
|
3601
|
+
deleted?: string | null;
|
|
3040
3602
|
}
|
|
3041
|
-
export interface
|
|
3042
|
-
tenantId?: string;
|
|
3603
|
+
export interface SubscriptionDeleted {
|
|
3043
3604
|
subscriptionId?: string;
|
|
3044
3605
|
}
|
|
3045
|
-
export interface
|
|
3606
|
+
export interface FutureUpdatesRequested {
|
|
3046
3607
|
subscription?: Subscription;
|
|
3608
|
+
requestedUpdateData?: SubscriptionUpdateData;
|
|
3047
3609
|
}
|
|
3048
|
-
export interface
|
|
3049
|
-
|
|
3050
|
-
|
|
3610
|
+
export interface UpdatesApplied {
|
|
3611
|
+
subscription?: Subscription;
|
|
3612
|
+
updateAction?: UpdateAction;
|
|
3613
|
+
appliedUpdateData?: SubscriptionUpdateData;
|
|
3051
3614
|
}
|
|
3052
|
-
export interface
|
|
3615
|
+
export interface ResetPendingUpdates {
|
|
3053
3616
|
subscription?: Subscription;
|
|
3054
3617
|
}
|
|
3055
|
-
export interface
|
|
3056
|
-
|
|
3057
|
-
subscriptionId?: string;
|
|
3058
|
-
initiator?: ActionInitiator;
|
|
3059
|
-
reason?: string | null;
|
|
3618
|
+
export interface GracePeriodStarted {
|
|
3619
|
+
subscription?: Subscription;
|
|
3060
3620
|
}
|
|
3061
|
-
export interface
|
|
3621
|
+
export interface GracePeriodEnded {
|
|
3062
3622
|
subscription?: Subscription;
|
|
3623
|
+
/** Indication for the payment settlement method. */
|
|
3624
|
+
paymentSettlementMethod?: PaymentSettlementMethod;
|
|
3063
3625
|
}
|
|
3064
|
-
export
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3626
|
+
export declare enum PaymentSettlementMethod {
|
|
3627
|
+
UNKNOWN = "UNKNOWN",
|
|
3628
|
+
/** System-defined payment settlement. */
|
|
3629
|
+
SYSTEM = "SYSTEM",
|
|
3630
|
+
/** Manually mark the payment as paid. */
|
|
3631
|
+
MARK_AS_PAID = "MARK_AS_PAID",
|
|
3632
|
+
/** Require the customer to pay immediately, by insert a new payment method. */
|
|
3633
|
+
CUSTOMER_PAY_NOW = "CUSTOMER_PAY_NOW"
|
|
3068
3634
|
}
|
|
3069
|
-
export interface
|
|
3635
|
+
export interface PaymentMethodUpdated {
|
|
3070
3636
|
subscription?: Subscription;
|
|
3637
|
+
initiator?: HistoryActionInitiator;
|
|
3638
|
+
paymentMode?: PaymentMode;
|
|
3071
3639
|
}
|
|
3072
|
-
export interface
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
}
|
|
3077
|
-
/** @oneof */
|
|
3078
|
-
export interface SendSubscriptionActionEventBORequestEventOneOf {
|
|
3079
|
-
billingCycleStarted?: SubscriptionBillingCycleStarted;
|
|
3640
|
+
export interface SubscriptionCollectionMethodUpdated {
|
|
3641
|
+
subscription?: Subscription;
|
|
3642
|
+
newCollectionMethod?: CollectionMethodEnumCollectionMethod;
|
|
3643
|
+
previousCollectionMethod?: CollectionMethodEnumCollectionMethod;
|
|
3080
3644
|
}
|
|
3081
|
-
export interface
|
|
3645
|
+
export interface FreeTrailStarted {
|
|
3646
|
+
subscription?: Subscription;
|
|
3082
3647
|
}
|
|
3083
|
-
export interface
|
|
3084
|
-
|
|
3085
|
-
subscriptionId?: string;
|
|
3086
|
-
transactionId?: string;
|
|
3648
|
+
export interface FreeTrailEnded {
|
|
3649
|
+
subscription?: Subscription;
|
|
3087
3650
|
}
|
|
3088
|
-
export interface
|
|
3089
|
-
|
|
3090
|
-
subscriptionId?: string;
|
|
3091
|
-
pausePolicy?: PausePolicy;
|
|
3092
|
-
pauseAt?: PauseAt;
|
|
3093
|
-
initiator?: ActionInitiator;
|
|
3094
|
-
reason?: string | null;
|
|
3651
|
+
export interface InitiatedPaymentMethodSetup {
|
|
3652
|
+
subscription?: Subscription;
|
|
3095
3653
|
}
|
|
3096
|
-
export interface
|
|
3654
|
+
export interface SubscriptionBackOfficeAction {
|
|
3097
3655
|
subscription?: Subscription;
|
|
3656
|
+
/** The backoffice method name */
|
|
3657
|
+
name?: string;
|
|
3658
|
+
/** json as string format, to store the flatted request object */
|
|
3659
|
+
params?: string;
|
|
3660
|
+
}
|
|
3661
|
+
/** Defines unknown events restored from the logs */
|
|
3662
|
+
export interface UnknownSubscriptionEvent {
|
|
3663
|
+
subscriptionAsString?: string | null;
|
|
3098
3664
|
}
|
|
3099
3665
|
interface CustomerNonNullableFields {
|
|
3100
3666
|
visitorId: string;
|
|
@@ -3274,6 +3840,172 @@ interface SubscriptionNonNullableFields {
|
|
|
3274
3840
|
specificDatePendingUpdateData?: SpecificDateSubscriptionUpdateDataNonNullableFields;
|
|
3275
3841
|
items: ItemNonNullableFields[];
|
|
3276
3842
|
}
|
|
3843
|
+
export interface GetSubscriptionResponseNonNullableFields {
|
|
3844
|
+
subscription?: SubscriptionNonNullableFields;
|
|
3845
|
+
}
|
|
3846
|
+
export interface CustomerCancelSubscriptionResponseNonNullableFields {
|
|
3847
|
+
subscription?: SubscriptionNonNullableFields;
|
|
3848
|
+
}
|
|
3849
|
+
export interface CustomerTurnOnAutoRenewalResponseNonNullableFields {
|
|
3850
|
+
subscription?: SubscriptionNonNullableFields;
|
|
3851
|
+
}
|
|
3852
|
+
export interface CustomerTurnOffAutoRenewalResponseNonNullableFields {
|
|
3853
|
+
subscription?: SubscriptionNonNullableFields;
|
|
3854
|
+
}
|
|
3855
|
+
export interface CustomerExtendSubscriptionResponseNonNullableFields {
|
|
3856
|
+
subscription?: SubscriptionNonNullableFields;
|
|
3857
|
+
}
|
|
3858
|
+
export interface QuerySubscriptionsResponseNonNullableFields {
|
|
3859
|
+
subscriptions: SubscriptionNonNullableFields[];
|
|
3860
|
+
}
|
|
3861
|
+
export interface UpdateSubscriptionPaymentMethodResponseNonNullableFields {
|
|
3862
|
+
subscription?: SubscriptionNonNullableFields;
|
|
3863
|
+
}
|
|
3864
|
+
interface ActionNonNullableFields {
|
|
3865
|
+
actionType: ActionType;
|
|
3866
|
+
pausePolicies: PausePolicy[];
|
|
3867
|
+
pauseAt: PauseAt[];
|
|
3868
|
+
resumeAt: ResumeAt[];
|
|
3869
|
+
extendPolicies: ExtendPolicyType[];
|
|
3870
|
+
}
|
|
3871
|
+
export interface CustomerAllowedActionsResponseNonNullableFields {
|
|
3872
|
+
actions: ActionNonNullableFields[];
|
|
3873
|
+
}
|
|
3874
|
+
interface RecurringNonNullableFields {
|
|
3875
|
+
cycleNumber: number;
|
|
3876
|
+
}
|
|
3877
|
+
interface InvoiceDiscountNonNullableFields {
|
|
3878
|
+
amount: string;
|
|
3879
|
+
percentage: string;
|
|
3880
|
+
origin?: DiscountOriginNonNullableFields;
|
|
3881
|
+
}
|
|
3882
|
+
interface InvoiceApplicationFeeNonNullableFields {
|
|
3883
|
+
amount: string;
|
|
3884
|
+
discount?: InvoiceDiscountNonNullableFields;
|
|
3885
|
+
}
|
|
3886
|
+
interface PriceDetailsNonNullableFields {
|
|
3887
|
+
price: string;
|
|
3888
|
+
tax?: TaxNonNullableFields;
|
|
3889
|
+
discount?: InvoiceDiscountNonNullableFields;
|
|
3890
|
+
applicationFeeDetails?: InvoiceApplicationFeeNonNullableFields;
|
|
3891
|
+
}
|
|
3892
|
+
interface LineItemTaxSummaryNonNullableFields {
|
|
3893
|
+
aggregatedTaxAmount: string;
|
|
3894
|
+
aggregatedTaxRate: string;
|
|
3895
|
+
taxableAmount: string;
|
|
3896
|
+
}
|
|
3897
|
+
interface TaxBreakdownNonNullableFields {
|
|
3898
|
+
taxType: string;
|
|
3899
|
+
taxRate: string;
|
|
3900
|
+
jurisdictionType: string;
|
|
3901
|
+
}
|
|
3902
|
+
interface ItemTaxDataNonNullableFields {
|
|
3903
|
+
lineItemTaxSummary?: LineItemTaxSummaryNonNullableFields;
|
|
3904
|
+
taxBreakdowns: TaxBreakdownNonNullableFields[];
|
|
3905
|
+
}
|
|
3906
|
+
interface InvoiceItemNonNullableFields {
|
|
3907
|
+
recurring?: RecurringNonNullableFields;
|
|
3908
|
+
_id: string;
|
|
3909
|
+
name: string;
|
|
3910
|
+
catalogReference?: CatalogReferenceNonNullableFields;
|
|
3911
|
+
category: ItemCategory;
|
|
3912
|
+
quantity: number;
|
|
3913
|
+
priceDetails?: PriceDetailsNonNullableFields;
|
|
3914
|
+
totals?: TotalsNonNullableFields;
|
|
3915
|
+
taxData?: ItemTaxDataNonNullableFields;
|
|
3916
|
+
}
|
|
3917
|
+
interface SubscriptionChargeNonNullableFields {
|
|
3918
|
+
cycle: number;
|
|
3919
|
+
totals?: TotalsNonNullableFields;
|
|
3920
|
+
invoiceItems: InvoiceItemNonNullableFields[];
|
|
3921
|
+
discount?: InvoiceDiscountNonNullableFields;
|
|
3922
|
+
}
|
|
3923
|
+
export interface CustomerListUpcomingChargesResponseNonNullableFields {
|
|
3924
|
+
upcomingCharge?: SubscriptionChargeNonNullableFields;
|
|
3925
|
+
}
|
|
3926
|
+
export interface InitiatePaymentMethodSetupResponseNonNullableFields {
|
|
3927
|
+
paymentOrderId: string;
|
|
3928
|
+
}
|
|
3929
|
+
export interface PayCycleResponseNonNullableFields {
|
|
3930
|
+
invoiceId: string;
|
|
3931
|
+
subscription?: SubscriptionNonNullableFields;
|
|
3932
|
+
}
|
|
3933
|
+
export interface UpdateSubscriptionBillingDateResponseNonNullableFields {
|
|
3934
|
+
subscription?: SubscriptionNonNullableFields;
|
|
3935
|
+
}
|
|
3936
|
+
export interface CancelSubscriptionResponseNonNullableFields {
|
|
3937
|
+
subscription?: SubscriptionNonNullableFields;
|
|
3938
|
+
}
|
|
3939
|
+
export interface PauseSubscriptionResponseNonNullableFields {
|
|
3940
|
+
subscription?: SubscriptionNonNullableFields;
|
|
3941
|
+
}
|
|
3942
|
+
export interface ResumeSubscriptionResponseNonNullableFields {
|
|
3943
|
+
subscription?: SubscriptionNonNullableFields;
|
|
3944
|
+
}
|
|
3945
|
+
export interface SearchSubscriptionsResponseNonNullableFields {
|
|
3946
|
+
subscriptions: SubscriptionNonNullableFields[];
|
|
3947
|
+
}
|
|
3948
|
+
interface CountByStatusNonNullableFields {
|
|
3949
|
+
status: SubscriptionStatusEnumSubscriptionStatus;
|
|
3950
|
+
count: number;
|
|
3951
|
+
}
|
|
3952
|
+
export interface CountSubscriptionsResponseNonNullableFields {
|
|
3953
|
+
countByStatus: CountByStatusNonNullableFields[];
|
|
3954
|
+
total: number;
|
|
3955
|
+
}
|
|
3956
|
+
export interface TurnOnSubscriptionAutoRenewalResponseNonNullableFields {
|
|
3957
|
+
subscription?: SubscriptionNonNullableFields;
|
|
3958
|
+
}
|
|
3959
|
+
export interface TurnOffSubscriptionAutoRenewalResponseNonNullableFields {
|
|
3960
|
+
subscription?: SubscriptionNonNullableFields;
|
|
3961
|
+
}
|
|
3962
|
+
export interface MarkLatestInvoiceAsPaidResponseNonNullableFields {
|
|
3963
|
+
subscription?: SubscriptionNonNullableFields;
|
|
3964
|
+
}
|
|
3965
|
+
export interface MarkInvoiceAsPaidResponseNonNullableFields {
|
|
3966
|
+
subscription?: SubscriptionNonNullableFields;
|
|
3967
|
+
}
|
|
3968
|
+
export interface MarkBillingCycleAsPaidResponseNonNullableFields {
|
|
3969
|
+
subscription?: SubscriptionNonNullableFields;
|
|
3970
|
+
}
|
|
3971
|
+
interface AmountByStatusNonNullableFields {
|
|
3972
|
+
status: SubscriptionStatusEnumSubscriptionStatus;
|
|
3973
|
+
amount: number;
|
|
3974
|
+
}
|
|
3975
|
+
export interface GetSubscriptionsStatsResponseNonNullableFields {
|
|
3976
|
+
amountByStatuses: AmountByStatusNonNullableFields[];
|
|
3977
|
+
total: number;
|
|
3978
|
+
}
|
|
3979
|
+
export interface ExtendSubscriptionResponseNonNullableFields {
|
|
3980
|
+
subscription?: SubscriptionNonNullableFields;
|
|
3981
|
+
}
|
|
3982
|
+
interface UnsupportedReasonNonNullableFields {
|
|
3983
|
+
code: string;
|
|
3984
|
+
}
|
|
3985
|
+
interface UnsupportedActionNonNullableFields {
|
|
3986
|
+
actionType: ActionType;
|
|
3987
|
+
reasons: UnsupportedReasonNonNullableFields[];
|
|
3988
|
+
}
|
|
3989
|
+
export interface AllowedActionsResponseNonNullableFields {
|
|
3990
|
+
actions: ActionNonNullableFields[];
|
|
3991
|
+
unsupportedActions: UnsupportedActionNonNullableFields[];
|
|
3992
|
+
}
|
|
3993
|
+
export interface ListUpcomingChargesResponseNonNullableFields {
|
|
3994
|
+
upcomingCharges: SubscriptionChargeNonNullableFields[];
|
|
3995
|
+
}
|
|
3996
|
+
interface ChargeNonNullableFields {
|
|
3997
|
+
cycleFrom: number;
|
|
3998
|
+
totals?: TotalsNonNullableFields;
|
|
3999
|
+
}
|
|
4000
|
+
export interface PreviewSubscriptionChargesResponseNonNullableFields {
|
|
4001
|
+
charges: ChargeNonNullableFields[];
|
|
4002
|
+
}
|
|
4003
|
+
interface SubscriptionChargesNonNullableFields {
|
|
4004
|
+
charges: ChargeNonNullableFields[];
|
|
4005
|
+
}
|
|
4006
|
+
export interface PreviewSubscriptionsChargesResponseNonNullableFields {
|
|
4007
|
+
subscriptionsCharges: SubscriptionChargesNonNullableFields[];
|
|
4008
|
+
}
|
|
3277
4009
|
interface SubscriptionCreatedNonNullableFields {
|
|
3278
4010
|
subscription?: SubscriptionNonNullableFields;
|
|
3279
4011
|
}
|
|
@@ -3394,7 +4126,7 @@ interface FreeTrailStartedNonNullableFields {
|
|
|
3394
4126
|
interface FreeTrailEndedNonNullableFields {
|
|
3395
4127
|
subscription?: SubscriptionNonNullableFields;
|
|
3396
4128
|
}
|
|
3397
|
-
interface
|
|
4129
|
+
interface SubscriptionBillingCyclePaidNonNullableFields {
|
|
3398
4130
|
subscription?: SubscriptionNonNullableFields;
|
|
3399
4131
|
paidCycle: number;
|
|
3400
4132
|
invoiceId: string;
|
|
@@ -3438,7 +4170,7 @@ interface SubscriptionEventNonNullableFields {
|
|
|
3438
4170
|
collectionMethodUpdated?: SubscriptionCollectionMethodUpdatedNonNullableFields;
|
|
3439
4171
|
freeTrailStarted?: FreeTrailStartedNonNullableFields;
|
|
3440
4172
|
freeTrailEnded?: FreeTrailEndedNonNullableFields;
|
|
3441
|
-
|
|
4173
|
+
billingCyclePaid?: SubscriptionBillingCyclePaidNonNullableFields;
|
|
3442
4174
|
initiatePaymentMethodSetup?: InitiatedPaymentMethodSetupNonNullableFields;
|
|
3443
4175
|
subscriptionBoAction?: SubscriptionBackOfficeActionNonNullableFields;
|
|
3444
4176
|
}
|
|
@@ -3450,173 +4182,16 @@ interface SubscriptionHistoryEntryNonNullableFields {
|
|
|
3450
4182
|
export interface ListSubscriptionHistoryResponseNonNullableFields {
|
|
3451
4183
|
historyEntries: SubscriptionHistoryEntryNonNullableFields[];
|
|
3452
4184
|
}
|
|
3453
|
-
export interface GetSubscriptionResponseNonNullableFields {
|
|
3454
|
-
subscription?: SubscriptionNonNullableFields;
|
|
3455
|
-
}
|
|
3456
|
-
export interface CustomerCancelSubscriptionResponseNonNullableFields {
|
|
3457
|
-
subscription?: SubscriptionNonNullableFields;
|
|
3458
|
-
}
|
|
3459
|
-
export interface CustomerTurnOnAutoRenewalResponseNonNullableFields {
|
|
3460
|
-
subscription?: SubscriptionNonNullableFields;
|
|
3461
|
-
}
|
|
3462
|
-
export interface CustomerTurnOffAutoRenewalResponseNonNullableFields {
|
|
3463
|
-
subscription?: SubscriptionNonNullableFields;
|
|
3464
|
-
}
|
|
3465
|
-
export interface CustomerExtendSubscriptionResponseNonNullableFields {
|
|
3466
|
-
subscription?: SubscriptionNonNullableFields;
|
|
3467
|
-
}
|
|
3468
|
-
export interface QuerySubscriptionsResponseNonNullableFields {
|
|
3469
|
-
subscriptions: SubscriptionNonNullableFields[];
|
|
3470
|
-
}
|
|
3471
|
-
export interface UpdateSubscriptionPaymentMethodResponseNonNullableFields {
|
|
3472
|
-
subscription?: SubscriptionNonNullableFields;
|
|
3473
|
-
}
|
|
3474
|
-
interface ActionNonNullableFields {
|
|
3475
|
-
actionType: ActionType;
|
|
3476
|
-
pausePolicies: PausePolicy[];
|
|
3477
|
-
pauseAt: PauseAt[];
|
|
3478
|
-
resumeAt: ResumeAt[];
|
|
3479
|
-
extendPolicies: ExtendPolicyType[];
|
|
3480
|
-
}
|
|
3481
|
-
export interface CustomerAllowedActionsResponseNonNullableFields {
|
|
3482
|
-
actions: ActionNonNullableFields[];
|
|
3483
|
-
}
|
|
3484
|
-
interface RecurringNonNullableFields {
|
|
3485
|
-
cycleNumber: number;
|
|
3486
|
-
}
|
|
3487
|
-
interface InvoiceDiscountNonNullableFields {
|
|
3488
|
-
amount: string;
|
|
3489
|
-
percentage: string;
|
|
3490
|
-
origin?: DiscountOriginNonNullableFields;
|
|
3491
|
-
}
|
|
3492
|
-
interface InvoiceApplicationFeeNonNullableFields {
|
|
3493
|
-
amount: string;
|
|
3494
|
-
discount?: InvoiceDiscountNonNullableFields;
|
|
3495
|
-
}
|
|
3496
|
-
interface PriceDetailsNonNullableFields {
|
|
3497
|
-
price: string;
|
|
3498
|
-
tax?: TaxNonNullableFields;
|
|
3499
|
-
discount?: InvoiceDiscountNonNullableFields;
|
|
3500
|
-
applicationFeeDetails?: InvoiceApplicationFeeNonNullableFields;
|
|
3501
|
-
}
|
|
3502
|
-
interface LineItemTaxSummaryNonNullableFields {
|
|
3503
|
-
aggregatedTaxAmount: string;
|
|
3504
|
-
aggregatedTaxRate: string;
|
|
3505
|
-
taxableAmount: string;
|
|
3506
|
-
}
|
|
3507
|
-
interface TaxBreakdownNonNullableFields {
|
|
3508
|
-
taxType: string;
|
|
3509
|
-
taxRate: string;
|
|
3510
|
-
jurisdictionType: string;
|
|
3511
|
-
}
|
|
3512
|
-
interface ItemTaxDataNonNullableFields {
|
|
3513
|
-
lineItemTaxSummary?: LineItemTaxSummaryNonNullableFields;
|
|
3514
|
-
taxBreakdowns: TaxBreakdownNonNullableFields[];
|
|
3515
|
-
}
|
|
3516
|
-
interface InvoiceItemNonNullableFields {
|
|
3517
|
-
recurring?: RecurringNonNullableFields;
|
|
3518
|
-
_id: string;
|
|
3519
|
-
name: string;
|
|
3520
|
-
catalogReference?: CatalogReferenceNonNullableFields;
|
|
3521
|
-
category: ItemCategory;
|
|
3522
|
-
quantity: number;
|
|
3523
|
-
priceDetails?: PriceDetailsNonNullableFields;
|
|
3524
|
-
totals?: TotalsNonNullableFields;
|
|
3525
|
-
taxData?: ItemTaxDataNonNullableFields;
|
|
3526
|
-
}
|
|
3527
|
-
interface SubscriptionChargeNonNullableFields {
|
|
3528
|
-
cycle: number;
|
|
3529
|
-
totals?: TotalsNonNullableFields;
|
|
3530
|
-
invoiceItems: InvoiceItemNonNullableFields[];
|
|
3531
|
-
discount?: InvoiceDiscountNonNullableFields;
|
|
3532
|
-
}
|
|
3533
|
-
export interface CustomerListUpcomingChargesResponseNonNullableFields {
|
|
3534
|
-
upcomingCharge?: SubscriptionChargeNonNullableFields;
|
|
3535
|
-
}
|
|
3536
|
-
export interface InitiatePaymentMethodSetupResponseNonNullableFields {
|
|
3537
|
-
paymentOrderId: string;
|
|
3538
|
-
}
|
|
3539
|
-
export interface UpdateSubscriptionBillingDateResponseNonNullableFields {
|
|
3540
|
-
subscription?: SubscriptionNonNullableFields;
|
|
3541
|
-
}
|
|
3542
|
-
export interface CancelSubscriptionResponseNonNullableFields {
|
|
3543
|
-
subscription?: SubscriptionNonNullableFields;
|
|
3544
|
-
}
|
|
3545
|
-
export interface PauseSubscriptionResponseNonNullableFields {
|
|
3546
|
-
subscription?: SubscriptionNonNullableFields;
|
|
3547
|
-
}
|
|
3548
|
-
export interface ResumeSubscriptionResponseNonNullableFields {
|
|
3549
|
-
subscription?: SubscriptionNonNullableFields;
|
|
3550
|
-
}
|
|
3551
|
-
export interface SearchSubscriptionsResponseNonNullableFields {
|
|
3552
|
-
subscriptions: SubscriptionNonNullableFields[];
|
|
3553
|
-
}
|
|
3554
|
-
interface CountByStatusNonNullableFields {
|
|
3555
|
-
status: SubscriptionStatusEnumSubscriptionStatus;
|
|
3556
|
-
count: number;
|
|
3557
|
-
}
|
|
3558
|
-
export interface CountSubscriptionsResponseNonNullableFields {
|
|
3559
|
-
countByStatus: CountByStatusNonNullableFields[];
|
|
3560
|
-
total: number;
|
|
3561
|
-
}
|
|
3562
|
-
export interface TurnOnSubscriptionAutoRenewalResponseNonNullableFields {
|
|
3563
|
-
subscription?: SubscriptionNonNullableFields;
|
|
3564
|
-
}
|
|
3565
|
-
export interface TurnOffSubscriptionAutoRenewalResponseNonNullableFields {
|
|
3566
|
-
subscription?: SubscriptionNonNullableFields;
|
|
3567
|
-
}
|
|
3568
|
-
export interface MarkLatestInvoiceAsPaidResponseNonNullableFields {
|
|
3569
|
-
subscription?: SubscriptionNonNullableFields;
|
|
3570
|
-
}
|
|
3571
|
-
export interface MarkInvoiceAsPaidResponseNonNullableFields {
|
|
3572
|
-
subscription?: SubscriptionNonNullableFields;
|
|
3573
|
-
}
|
|
3574
|
-
interface AmountByStatusNonNullableFields {
|
|
3575
|
-
status: SubscriptionStatusEnumSubscriptionStatus;
|
|
3576
|
-
amount: number;
|
|
3577
|
-
}
|
|
3578
|
-
export interface GetSubscriptionsStatsResponseNonNullableFields {
|
|
3579
|
-
amountByStatuses: AmountByStatusNonNullableFields[];
|
|
3580
|
-
total: number;
|
|
3581
|
-
}
|
|
3582
|
-
export interface ExtendSubscriptionResponseNonNullableFields {
|
|
3583
|
-
subscription?: SubscriptionNonNullableFields;
|
|
3584
|
-
}
|
|
3585
|
-
interface UnsupportedReasonNonNullableFields {
|
|
3586
|
-
code: string;
|
|
3587
|
-
}
|
|
3588
|
-
interface UnsupportedActionNonNullableFields {
|
|
3589
|
-
actionType: ActionType;
|
|
3590
|
-
reasons: UnsupportedReasonNonNullableFields[];
|
|
3591
|
-
}
|
|
3592
|
-
export interface AllowedActionsResponseNonNullableFields {
|
|
3593
|
-
actions: ActionNonNullableFields[];
|
|
3594
|
-
unsupportedActions: UnsupportedActionNonNullableFields[];
|
|
3595
|
-
}
|
|
3596
|
-
export interface ListUpcomingChargesResponseNonNullableFields {
|
|
3597
|
-
upcomingCharges: SubscriptionChargeNonNullableFields[];
|
|
3598
|
-
}
|
|
3599
|
-
interface ChargeNonNullableFields {
|
|
3600
|
-
cycleFrom: number;
|
|
3601
|
-
totals?: TotalsNonNullableFields;
|
|
3602
|
-
}
|
|
3603
|
-
export interface PreviewSubscriptionChargesResponseNonNullableFields {
|
|
3604
|
-
charges: ChargeNonNullableFields[];
|
|
3605
|
-
}
|
|
3606
|
-
interface SubscriptionChargesNonNullableFields {
|
|
3607
|
-
charges: ChargeNonNullableFields[];
|
|
3608
|
-
}
|
|
3609
|
-
export interface PreviewSubscriptionsChargesResponseNonNullableFields {
|
|
3610
|
-
subscriptionsCharges: SubscriptionChargesNonNullableFields[];
|
|
3611
|
-
}
|
|
3612
|
-
export interface PayCycleResponseNonNullableFields {
|
|
3613
|
-
invoiceId: string;
|
|
3614
|
-
subscription?: SubscriptionNonNullableFields;
|
|
3615
|
-
}
|
|
3616
4185
|
export interface BaseEventMetadata {
|
|
3617
|
-
/**
|
|
4186
|
+
/**
|
|
4187
|
+
* App instance ID.
|
|
4188
|
+
* @format GUID
|
|
4189
|
+
*/
|
|
3618
4190
|
instanceId?: string | null;
|
|
3619
|
-
/**
|
|
4191
|
+
/**
|
|
4192
|
+
* Event type.
|
|
4193
|
+
* @maxLength 150
|
|
4194
|
+
*/
|
|
3620
4195
|
eventType?: string;
|
|
3621
4196
|
/** The identification type and identity data. */
|
|
3622
4197
|
identity?: IdentificationData;
|
|
@@ -3670,6 +4245,8 @@ export interface SubscriptionCanceledEnvelope {
|
|
|
3670
4245
|
* @permissionId subscriptions.view
|
|
3671
4246
|
* @webhook
|
|
3672
4247
|
* @eventType wix.billing.v1.subscription_canceled
|
|
4248
|
+
* @serviceIdentifier com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService
|
|
4249
|
+
* @slug canceled
|
|
3673
4250
|
* @documentationMaturity preview
|
|
3674
4251
|
*/
|
|
3675
4252
|
export declare function onSubscriptionCanceled(handler: (event: SubscriptionCanceledEnvelope) => void | Promise<void>): void;
|
|
@@ -3684,6 +4261,8 @@ export interface SubscriptionExtendedEnvelope {
|
|
|
3684
4261
|
* @permissionId subscriptions.view
|
|
3685
4262
|
* @webhook
|
|
3686
4263
|
* @eventType wix.billing.v1.subscription_extended
|
|
4264
|
+
* @serviceIdentifier com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService
|
|
4265
|
+
* @slug extended
|
|
3687
4266
|
* @documentationMaturity preview
|
|
3688
4267
|
*/
|
|
3689
4268
|
export declare function onSubscriptionExtended(handler: (event: SubscriptionExtendedEnvelope) => void | Promise<void>): void;
|
|
@@ -3698,6 +4277,8 @@ export interface SubscriptionUpdatedEnvelope {
|
|
|
3698
4277
|
* @permissionId subscriptions.view
|
|
3699
4278
|
* @webhook
|
|
3700
4279
|
* @eventType wix.billing.v1.subscription_updated
|
|
4280
|
+
* @serviceIdentifier com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService
|
|
4281
|
+
* @slug updated
|
|
3701
4282
|
* @documentationMaturity preview
|
|
3702
4283
|
*/
|
|
3703
4284
|
export declare function onSubscriptionUpdated(handler: (event: SubscriptionUpdatedEnvelope) => void | Promise<void>): void;
|
|
@@ -3712,6 +4293,8 @@ export interface SubscriptionAutoRenewalTurnedOffEnvelope {
|
|
|
3712
4293
|
* @permissionId subscriptions.view
|
|
3713
4294
|
* @webhook
|
|
3714
4295
|
* @eventType wix.billing.v1.subscription_auto_renewal_turned_off
|
|
4296
|
+
* @serviceIdentifier com.wixpress.billing.subscriptions.api.v1.SubscriptionsService
|
|
4297
|
+
* @slug auto_renewal_turned_off
|
|
3715
4298
|
* @documentationMaturity preview
|
|
3716
4299
|
*/
|
|
3717
4300
|
export declare function onSubscriptionAutoRenewalTurnedOff(handler: (event: SubscriptionAutoRenewalTurnedOffEnvelope) => void | Promise<void>): void;
|
|
@@ -3726,6 +4309,8 @@ export interface SubscriptionAutoRenewalTurnedOnEnvelope {
|
|
|
3726
4309
|
* @permissionId subscriptions.view
|
|
3727
4310
|
* @webhook
|
|
3728
4311
|
* @eventType wix.billing.v1.subscription_auto_renewal_turned_on
|
|
4312
|
+
* @serviceIdentifier com.wixpress.billing.subscriptions.api.v1.SubscriptionsService
|
|
4313
|
+
* @slug auto_renewal_turned_on
|
|
3729
4314
|
* @documentationMaturity preview
|
|
3730
4315
|
*/
|
|
3731
4316
|
export declare function onSubscriptionAutoRenewalTurnedOn(handler: (event: SubscriptionAutoRenewalTurnedOnEnvelope) => void | Promise<void>): void;
|
|
@@ -3740,6 +4325,8 @@ export interface SubscriptionBillingDateUpdatedEnvelope {
|
|
|
3740
4325
|
* @permissionId subscriptions.view
|
|
3741
4326
|
* @webhook
|
|
3742
4327
|
* @eventType wix.billing.v1.subscription_billing_date_updated
|
|
4328
|
+
* @serviceIdentifier com.wixpress.billing.subscriptions.api.v1.SubscriptionsService
|
|
4329
|
+
* @slug billing_date_updated
|
|
3743
4330
|
* @documentationMaturity preview
|
|
3744
4331
|
*/
|
|
3745
4332
|
export declare function onSubscriptionBillingDateUpdated(handler: (event: SubscriptionBillingDateUpdatedEnvelope) => void | Promise<void>): void;
|
|
@@ -3752,6 +4339,8 @@ export interface SubscriptionLatestInvoiceMarkedAsPaidEnvelope {
|
|
|
3752
4339
|
* @permissionId subscriptions.view
|
|
3753
4340
|
* @webhook
|
|
3754
4341
|
* @eventType wix.billing.v1.subscription_latest_invoice_marked_as_paid
|
|
4342
|
+
* @serviceIdentifier com.wixpress.billing.subscriptions.api.v1.SubscriptionsService
|
|
4343
|
+
* @slug latest_invoice_marked_as_paid
|
|
3755
4344
|
* @documentationMaturity preview
|
|
3756
4345
|
*/
|
|
3757
4346
|
export declare function onSubscriptionLatestInvoiceMarkedAsPaid(handler: (event: SubscriptionLatestInvoiceMarkedAsPaidEnvelope) => void | Promise<void>): void;
|
|
@@ -3766,6 +4355,8 @@ export interface SubscriptionPauseScheduleCanceledEnvelope {
|
|
|
3766
4355
|
* @permissionId subscriptions.view
|
|
3767
4356
|
* @webhook
|
|
3768
4357
|
* @eventType wix.billing.v1.subscription_pause_schedule_canceled
|
|
4358
|
+
* @serviceIdentifier com.wixpress.billing.subscriptions.api.v1.SubscriptionsService
|
|
4359
|
+
* @slug pause_schedule_canceled
|
|
3769
4360
|
* @documentationMaturity preview
|
|
3770
4361
|
*/
|
|
3771
4362
|
export declare function onSubscriptionPauseScheduleCanceled(handler: (event: SubscriptionPauseScheduleCanceledEnvelope) => void | Promise<void>): void;
|
|
@@ -3780,6 +4371,8 @@ export interface SubscriptionPauseScheduledEnvelope {
|
|
|
3780
4371
|
* @permissionId subscriptions.view
|
|
3781
4372
|
* @webhook
|
|
3782
4373
|
* @eventType wix.billing.v1.subscription_pause_scheduled
|
|
4374
|
+
* @serviceIdentifier com.wixpress.billing.subscriptions.api.v1.SubscriptionsService
|
|
4375
|
+
* @slug pause_scheduled
|
|
3783
4376
|
* @documentationMaturity preview
|
|
3784
4377
|
*/
|
|
3785
4378
|
export declare function onSubscriptionPauseScheduled(handler: (event: SubscriptionPauseScheduledEnvelope) => void | Promise<void>): void;
|
|
@@ -3794,6 +4387,8 @@ export interface SubscriptionPausedEnvelope {
|
|
|
3794
4387
|
* @permissionId subscriptions.view
|
|
3795
4388
|
* @webhook
|
|
3796
4389
|
* @eventType wix.billing.v1.subscription_paused
|
|
4390
|
+
* @serviceIdentifier com.wixpress.billing.subscriptions.api.v1.SubscriptionsService
|
|
4391
|
+
* @slug paused
|
|
3797
4392
|
* @documentationMaturity preview
|
|
3798
4393
|
*/
|
|
3799
4394
|
export declare function onSubscriptionPaused(handler: (event: SubscriptionPausedEnvelope) => void | Promise<void>): void;
|
|
@@ -3808,6 +4403,8 @@ export interface SubscriptionResumeScheduleCanceledEnvelope {
|
|
|
3808
4403
|
* @permissionId subscriptions.view
|
|
3809
4404
|
* @webhook
|
|
3810
4405
|
* @eventType wix.billing.v1.subscription_resume_schedule_canceled
|
|
4406
|
+
* @serviceIdentifier com.wixpress.billing.subscriptions.api.v1.SubscriptionsService
|
|
4407
|
+
* @slug resume_schedule_canceled
|
|
3811
4408
|
* @documentationMaturity preview
|
|
3812
4409
|
*/
|
|
3813
4410
|
export declare function onSubscriptionResumeScheduleCanceled(handler: (event: SubscriptionResumeScheduleCanceledEnvelope) => void | Promise<void>): void;
|
|
@@ -3822,6 +4419,8 @@ export interface SubscriptionResumeScheduledEnvelope {
|
|
|
3822
4419
|
* @permissionId subscriptions.view
|
|
3823
4420
|
* @webhook
|
|
3824
4421
|
* @eventType wix.billing.v1.subscription_resume_scheduled
|
|
4422
|
+
* @serviceIdentifier com.wixpress.billing.subscriptions.api.v1.SubscriptionsService
|
|
4423
|
+
* @slug resume_scheduled
|
|
3825
4424
|
* @documentationMaturity preview
|
|
3826
4425
|
*/
|
|
3827
4426
|
export declare function onSubscriptionResumeScheduled(handler: (event: SubscriptionResumeScheduledEnvelope) => void | Promise<void>): void;
|
|
@@ -3836,25 +4435,11 @@ export interface SubscriptionResumedEnvelope {
|
|
|
3836
4435
|
* @permissionId subscriptions.view
|
|
3837
4436
|
* @webhook
|
|
3838
4437
|
* @eventType wix.billing.v1.subscription_resumed
|
|
4438
|
+
* @serviceIdentifier com.wixpress.billing.subscriptions.api.v1.SubscriptionsService
|
|
4439
|
+
* @slug resumed
|
|
3839
4440
|
* @documentationMaturity preview
|
|
3840
4441
|
*/
|
|
3841
4442
|
export declare function onSubscriptionResumed(handler: (event: SubscriptionResumedEnvelope) => void | Promise<void>): void;
|
|
3842
|
-
/** @public
|
|
3843
|
-
* @documentationMaturity preview
|
|
3844
|
-
* @requiredField subscriptionId
|
|
3845
|
-
* @permissionId subscriptions.view
|
|
3846
|
-
* @permissionScope Manage Events
|
|
3847
|
-
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
3848
|
-
* @applicableIdentity APP
|
|
3849
|
-
* @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionHistoryService.ListSubscriptionHistory
|
|
3850
|
-
*/
|
|
3851
|
-
export declare function listSubscriptionHistory(subscriptionId: string, options?: ListSubscriptionHistoryOptions): Promise<ListSubscriptionHistoryResponse & ListSubscriptionHistoryResponseNonNullableFields>;
|
|
3852
|
-
export interface ListSubscriptionHistoryOptions {
|
|
3853
|
-
/** Determines the type of view for the history: either a comprehensive backoffice view or a user-centric view. */
|
|
3854
|
-
mode?: HistoryViewMode;
|
|
3855
|
-
/** Cursor for efficient paging. If paging through results, pass this field from the previous search response to continue to the next page. */
|
|
3856
|
-
cursor?: CursorPaging;
|
|
3857
|
-
}
|
|
3858
4443
|
/**
|
|
3859
4444
|
* Identity must be a site member and customer subscription belongs to
|
|
3860
4445
|
* @public
|
|
@@ -3910,7 +4495,10 @@ export declare function customerExtendSubscription(_id: string, options?: Custom
|
|
|
3910
4495
|
export interface CustomerExtendSubscriptionOptions {
|
|
3911
4496
|
/** Optional action reason message */
|
|
3912
4497
|
reason?: string | null;
|
|
3913
|
-
/**
|
|
4498
|
+
/**
|
|
4499
|
+
* For termed - Subscription end date will be updated with the extension period and number of cycles will be added
|
|
4500
|
+
* @min 1
|
|
4501
|
+
*/
|
|
3914
4502
|
billingCyclesToAdd: number | null;
|
|
3915
4503
|
}
|
|
3916
4504
|
/**
|
|
@@ -3961,6 +4549,20 @@ export interface CustomerInitiatePaymentMethodSetupOptions {
|
|
|
3961
4549
|
paymentMode?: PaymentMode;
|
|
3962
4550
|
paymentSettings?: PaymentSettings;
|
|
3963
4551
|
}
|
|
4552
|
+
/**
|
|
4553
|
+
* This used only for automation and permitted tenants (QA & testing)
|
|
4554
|
+
* @public
|
|
4555
|
+
* @documentationMaturity preview
|
|
4556
|
+
* @requiredField options.tenantId
|
|
4557
|
+
* @requiredField subscriptionId
|
|
4558
|
+
* @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsBackOfficeService.PayCycle
|
|
4559
|
+
*/
|
|
4560
|
+
export declare function payCycle(subscriptionId: string, options?: PayCycleOptions): Promise<PayCycleResponse & PayCycleResponseNonNullableFields>;
|
|
4561
|
+
export interface PayCycleOptions {
|
|
4562
|
+
paymentTestMode?: PaymentTestMode;
|
|
4563
|
+
/** @format GUID */
|
|
4564
|
+
tenantId: string;
|
|
4565
|
+
}
|
|
3964
4566
|
/**
|
|
3965
4567
|
* Returns a single subscription by its id
|
|
3966
4568
|
* @public
|
|
@@ -4102,7 +4704,7 @@ export declare function querySubscriptions(query: QueryV2): Promise<QuerySubscri
|
|
|
4102
4704
|
* @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.SearchSubscriptions
|
|
4103
4705
|
*/
|
|
4104
4706
|
export declare function searchSubscriptions(options?: SearchSubscriptionsOptions): Promise<SearchSubscriptionsResponse & SearchSubscriptionsResponseNonNullableFields>;
|
|
4105
|
-
export interface SearchSubscriptionsOptions extends
|
|
4707
|
+
export interface SearchSubscriptionsOptions extends SearchSubscriptionsOptionsPagingMethodOneOf {
|
|
4106
4708
|
/** A filter object */
|
|
4107
4709
|
filter?: any;
|
|
4108
4710
|
/** Limit number of results and enable to skip rows. The default limit is 25. */
|
|
@@ -4112,6 +4714,13 @@ export interface SearchSubscriptionsOptions extends SearchSubscriptionsRequestPa
|
|
|
4112
4714
|
/** A Sorting option by field name and order. */
|
|
4113
4715
|
sorting?: SortingClauses;
|
|
4114
4716
|
}
|
|
4717
|
+
/** @oneof */
|
|
4718
|
+
interface SearchSubscriptionsOptionsPagingMethodOneOf {
|
|
4719
|
+
/** Limit number of results and enable to skip rows. The default limit is 25. */
|
|
4720
|
+
paging?: Paging;
|
|
4721
|
+
/** A Cursor option for efficient paging. Pass this field from the previous search response to continue to the next page. */
|
|
4722
|
+
cursor?: CursorPaging;
|
|
4723
|
+
}
|
|
4115
4724
|
/**
|
|
4116
4725
|
* Counts subscriptions given the provided filters. Returns the total number
|
|
4117
4726
|
* of subscriptions matching the filters and a count per status.
|
|
@@ -4194,6 +4803,15 @@ export interface MarkInvoiceAsPaidOptions {
|
|
|
4194
4803
|
/**
|
|
4195
4804
|
* The subscription cycle for which the invoice is to be marked as paid.
|
|
4196
4805
|
* If left empty, the most recent cycle will be selected.
|
|
4806
|
+
* @min 1
|
|
4807
|
+
*/
|
|
4808
|
+
paidCycle?: number | null;
|
|
4809
|
+
}
|
|
4810
|
+
export interface MarkBillingCycleAsPaidOptions {
|
|
4811
|
+
/**
|
|
4812
|
+
* The subscription cycle for which the invoice is to be marked as paid.
|
|
4813
|
+
* If left empty, the most recent cycle will be selected.
|
|
4814
|
+
* @min 1
|
|
4197
4815
|
*/
|
|
4198
4816
|
paidCycle?: number | null;
|
|
4199
4817
|
}
|
|
@@ -4215,6 +4833,7 @@ export declare function getSubscriptionsStats(): Promise<GetSubscriptionsStatsRe
|
|
|
4215
4833
|
* @documentationMaturity preview
|
|
4216
4834
|
* @requiredField _id
|
|
4217
4835
|
* @requiredField actionContext
|
|
4836
|
+
* @requiredField extendPolicy
|
|
4218
4837
|
* @permissionId subscriptions.manage
|
|
4219
4838
|
* @permissionScope Manage Orders
|
|
4220
4839
|
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
@@ -4222,10 +4841,23 @@ export declare function getSubscriptionsStats(): Promise<GetSubscriptionsStatsRe
|
|
|
4222
4841
|
* @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.ExtendSubscription
|
|
4223
4842
|
*/
|
|
4224
4843
|
export declare function extendSubscription(_id: string, actionContext: ActionContext, options?: ExtendSubscriptionOptions): Promise<ExtendSubscriptionResponse & ExtendSubscriptionResponseNonNullableFields>;
|
|
4225
|
-
export interface ExtendSubscriptionOptions extends
|
|
4844
|
+
export interface ExtendSubscriptionOptions extends ExtendSubscriptionOptionsExtendPolicyOneOf {
|
|
4845
|
+
/** User won't be charged for additional period added on top of subscription end date. */
|
|
4846
|
+
extensionPeriod?: Duration;
|
|
4847
|
+
/**
|
|
4848
|
+
* user will be charged for billing cycles added
|
|
4849
|
+
* @min 1
|
|
4850
|
+
*/
|
|
4851
|
+
extensionBillingCycles?: number;
|
|
4852
|
+
}
|
|
4853
|
+
/** @oneof */
|
|
4854
|
+
interface ExtendSubscriptionOptionsExtendPolicyOneOf {
|
|
4226
4855
|
/** User won't be charged for additional period added on top of subscription end date. */
|
|
4227
4856
|
extensionPeriod?: Duration;
|
|
4228
|
-
/**
|
|
4857
|
+
/**
|
|
4858
|
+
* user will be charged for billing cycles added
|
|
4859
|
+
* @min 1
|
|
4860
|
+
*/
|
|
4229
4861
|
extensionBillingCycles?: number;
|
|
4230
4862
|
}
|
|
4231
4863
|
/** @public
|
|
@@ -4239,7 +4871,10 @@ export interface ExtendSubscriptionOptions extends ExtendSubscriptionRequestExte
|
|
|
4239
4871
|
*/
|
|
4240
4872
|
export declare function allowedActions(_id: string, options?: AllowedActionsOptions): Promise<AllowedActionsResponse & AllowedActionsResponseNonNullableFields>;
|
|
4241
4873
|
export interface AllowedActionsOptions {
|
|
4242
|
-
/**
|
|
4874
|
+
/**
|
|
4875
|
+
* List of additional fields to be included in the response.
|
|
4876
|
+
* @maxSize 1
|
|
4877
|
+
*/
|
|
4243
4878
|
fields?: RequestedFields[];
|
|
4244
4879
|
}
|
|
4245
4880
|
/**
|
|
@@ -4269,11 +4904,10 @@ export interface ListUpcomingChargesOptions {
|
|
|
4269
4904
|
* Returns all the charges applicable to a subscription based on the provided subscription information.
|
|
4270
4905
|
* @public
|
|
4271
4906
|
* @documentationMaturity preview
|
|
4272
|
-
* @requiredField
|
|
4273
|
-
* @requiredField
|
|
4274
|
-
* @requiredField
|
|
4275
|
-
* @requiredField
|
|
4276
|
-
* @requiredField options.subscriptionInfo.items.pricingModel
|
|
4907
|
+
* @requiredField subscription.subscriptionInfo
|
|
4908
|
+
* @requiredField subscription.subscriptionInfo.billingSettings
|
|
4909
|
+
* @requiredField subscription.subscriptionInfo.items
|
|
4910
|
+
* @requiredField subscription.subscriptionInfo.items.pricingModel
|
|
4277
4911
|
* @permissionId subscriptions.view
|
|
4278
4912
|
* @permissionScope Manage Events
|
|
4279
4913
|
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
@@ -4284,7 +4918,12 @@ export interface ListUpcomingChargesOptions {
|
|
|
4284
4918
|
* @targetRemovalDate 2025-06-30
|
|
4285
4919
|
*/
|
|
4286
4920
|
export declare function previewSubscriptionCharges(options: PreviewSubscriptionChargesOptions): Promise<PreviewSubscriptionChargesResponse & PreviewSubscriptionChargesResponseNonNullableFields>;
|
|
4287
|
-
export interface PreviewSubscriptionChargesOptions extends
|
|
4921
|
+
export interface PreviewSubscriptionChargesOptions extends PreviewSubscriptionChargesOptionsSubscriptionOneOf {
|
|
4922
|
+
/** Information about a non-existing subscription. */
|
|
4923
|
+
subscriptionInfo?: SubscriptionInfo;
|
|
4924
|
+
}
|
|
4925
|
+
/** @oneof */
|
|
4926
|
+
interface PreviewSubscriptionChargesOptionsSubscriptionOneOf {
|
|
4288
4927
|
/** Information about a non-existing subscription. */
|
|
4289
4928
|
subscriptionInfo?: SubscriptionInfo;
|
|
4290
4929
|
}
|
|
@@ -4294,11 +4933,12 @@ export interface PreviewSubscriptionChargesOptions extends PreviewSubscriptionCh
|
|
|
4294
4933
|
* @public
|
|
4295
4934
|
* @documentationMaturity preview
|
|
4296
4935
|
* @requiredField options.subscriptionsBillingDetails.billingSettings
|
|
4297
|
-
* @requiredField options.subscriptionsBillingDetails.billingSettings.shippingCharges.tax
|
|
4936
|
+
* @requiredField options.subscriptionsBillingDetails.billingSettings.shippingCharges.tax.value
|
|
4298
4937
|
* @requiredField options.subscriptionsBillingDetails.externalId
|
|
4299
4938
|
* @requiredField options.subscriptionsBillingDetails.items
|
|
4300
4939
|
* @requiredField options.subscriptionsBillingDetails.items.pricingModel
|
|
4301
|
-
* @requiredField options.subscriptionsBillingDetails.items.
|
|
4940
|
+
* @requiredField options.subscriptionsBillingDetails.items.pricingModel.model
|
|
4941
|
+
* @requiredField options.subscriptionsBillingDetails.items.tax.value
|
|
4302
4942
|
* @permissionId subscriptions.view
|
|
4303
4943
|
* @permissionScope Manage Events
|
|
4304
4944
|
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
@@ -4307,7 +4947,11 @@ export interface PreviewSubscriptionChargesOptions extends PreviewSubscriptionCh
|
|
|
4307
4947
|
*/
|
|
4308
4948
|
export declare function previewSubscriptionsCharges(options?: PreviewSubscriptionsChargesOptions): Promise<PreviewSubscriptionsChargesResponse & PreviewSubscriptionsChargesResponseNonNullableFields>;
|
|
4309
4949
|
export interface PreviewSubscriptionsChargesOptions {
|
|
4310
|
-
/**
|
|
4950
|
+
/**
|
|
4951
|
+
* Information required to calculate the preview charges for the subscriptions, including an identifier.
|
|
4952
|
+
* @minSize 1
|
|
4953
|
+
* @maxSize 10
|
|
4954
|
+
*/
|
|
4311
4955
|
subscriptionsBillingDetails?: SubscriptionBillingDetails[];
|
|
4312
4956
|
/**
|
|
4313
4957
|
* Specifies the number of upcoming billing charges to preview for all subscriptions in the order.
|
|
@@ -4320,6 +4964,8 @@ export interface PreviewSubscriptionsChargesOptions {
|
|
|
4320
4964
|
* in this case, charges for cycle 1 through 3.
|
|
4321
4965
|
* If there is a single charge for a subscription, meaning that subscription price remains consistent across all cycles,
|
|
4322
4966
|
* then even if future_charges_count is set, it will be ignored and the only charge this subscription has will be returned.
|
|
4967
|
+
* @min 1
|
|
4968
|
+
* @max 10
|
|
4323
4969
|
*/
|
|
4324
4970
|
numberOfNextRecurringCharges?: number | null;
|
|
4325
4971
|
}
|
|
@@ -4339,17 +4985,20 @@ export interface InitiatePaymentMethodSetupOptions {
|
|
|
4339
4985
|
paymentMode?: PaymentMode;
|
|
4340
4986
|
paymentSettings?: PaymentSettings;
|
|
4341
4987
|
}
|
|
4342
|
-
/**
|
|
4343
|
-
* This used only for automation and permitted tenants (QA & testing)
|
|
4344
|
-
* @public
|
|
4988
|
+
/** @public
|
|
4345
4989
|
* @documentationMaturity preview
|
|
4346
|
-
* @requiredField options.tenantId
|
|
4347
4990
|
* @requiredField subscriptionId
|
|
4348
|
-
* @
|
|
4991
|
+
* @permissionId subscriptions.view
|
|
4992
|
+
* @permissionScope Manage Events
|
|
4993
|
+
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
4994
|
+
* @applicableIdentity APP
|
|
4995
|
+
* @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionHistoryService.ListSubscriptionHistory
|
|
4349
4996
|
*/
|
|
4350
|
-
export declare function
|
|
4351
|
-
export interface
|
|
4352
|
-
|
|
4353
|
-
|
|
4997
|
+
export declare function listSubscriptionHistory(subscriptionId: string, options?: ListSubscriptionHistoryOptions): Promise<ListSubscriptionHistoryResponse & ListSubscriptionHistoryResponseNonNullableFields>;
|
|
4998
|
+
export interface ListSubscriptionHistoryOptions {
|
|
4999
|
+
/** Determines the type of view for the history: either a comprehensive backoffice view or a user-centric view. */
|
|
5000
|
+
mode?: HistoryViewMode;
|
|
5001
|
+
/** Cursor for efficient paging. If paging through results, pass this field from the previous search response to continue to the next page. */
|
|
5002
|
+
cursor?: CursorPaging;
|
|
4354
5003
|
}
|
|
4355
5004
|
export {};
|