@wix/auto_sdk_subscription_subscriptions 1.0.0 → 1.0.2
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 +12 -12
- package/build/cjs/src/billing-v1-subscription-subscriptions.context.js.map +1 -1
- package/build/cjs/src/billing-v1-subscription-subscriptions.http.d.ts +5 -5
- package/build/cjs/src/billing-v1-subscription-subscriptions.http.js +1848 -1848
- package/build/cjs/src/billing-v1-subscription-subscriptions.http.js.map +1 -1
- package/build/cjs/src/billing-v1-subscription-subscriptions.meta.d.ts +7 -7
- package/build/cjs/src/billing-v1-subscription-subscriptions.meta.js +29 -29
- 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 +13 -13
- package/build/cjs/src/billing-v1-subscription-subscriptions.public.js.map +1 -1
- package/build/cjs/src/billing-v1-subscription-subscriptions.types.d.ts +1995 -1464
- 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 +2085 -1482
- package/build/cjs/src/billing-v1-subscription-subscriptions.universal.js +341 -340
- 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 +5 -5
- package/build/es/src/billing-v1-subscription-subscriptions.context.js.map +1 -1
- package/build/es/src/billing-v1-subscription-subscriptions.http.d.ts +5 -5
- package/build/es/src/billing-v1-subscription-subscriptions.http.js +1720 -1720
- package/build/es/src/billing-v1-subscription-subscriptions.http.js.map +1 -1
- package/build/es/src/billing-v1-subscription-subscriptions.meta.d.ts +7 -7
- package/build/es/src/billing-v1-subscription-subscriptions.meta.js +25 -25
- 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 +10 -10
- package/build/es/src/billing-v1-subscription-subscriptions.public.js.map +1 -1
- package/build/es/src/billing-v1-subscription-subscriptions.types.d.ts +1995 -1464
- 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 +2085 -1482
- package/build/es/src/billing-v1-subscription-subscriptions.universal.js +338 -337
- 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 +6 -6
- package/build/internal/cjs/src/billing-v1-subscription-subscriptions.context.js +12 -12
- 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 +5 -5
- package/build/internal/cjs/src/billing-v1-subscription-subscriptions.http.js +1848 -1848
- 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 +7 -7
- package/build/internal/cjs/src/billing-v1-subscription-subscriptions.meta.js +29 -29
- 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 +17 -17
- package/build/internal/cjs/src/billing-v1-subscription-subscriptions.public.js +13 -13
- 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 +1995 -1464
- 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 +2088 -1485
- package/build/internal/cjs/src/billing-v1-subscription-subscriptions.universal.js +341 -340
- 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 +6 -6
- package/build/internal/es/src/billing-v1-subscription-subscriptions.context.js +5 -5
- 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 +5 -5
- package/build/internal/es/src/billing-v1-subscription-subscriptions.http.js +1720 -1720
- 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 +7 -7
- package/build/internal/es/src/billing-v1-subscription-subscriptions.meta.js +25 -25
- 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 +17 -17
- package/build/internal/es/src/billing-v1-subscription-subscriptions.public.js +10 -10
- 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 +1995 -1464
- 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 +2088 -1485
- package/build/internal/es/src/billing-v1-subscription-subscriptions.universal.js +338 -337
- 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,41 @@ 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
|
}
|
|
841
|
-
export interface
|
|
985
|
+
export interface SubscriptionBillingCyclePaid {
|
|
842
986
|
/** The subscription for which one of the invoices has been marked as paid */
|
|
843
987
|
subscription?: Subscription;
|
|
844
988
|
/** The cycle that has been marked as paid */
|
|
845
989
|
paidCycle?: number;
|
|
846
|
-
/**
|
|
990
|
+
/**
|
|
991
|
+
* The invoice ID that has been marked as paid
|
|
992
|
+
* @format GUID
|
|
993
|
+
*/
|
|
847
994
|
invoiceId?: string;
|
|
848
|
-
/** The transaction ID of the payment order that has been marked as paid */
|
|
849
|
-
paymentTransactionId?: string | null;
|
|
850
|
-
}
|
|
851
|
-
export interface ListSubscriptionHistoryRequest {
|
|
852
|
-
subscriptionId: string;
|
|
853
|
-
/** Determines the type of view for the history: either a comprehensive backoffice view or a user-centric view. */
|
|
854
|
-
mode?: HistoryViewMode;
|
|
855
|
-
/** Cursor for efficient paging. If paging through results, pass this field from the previous search response to continue to the next page. */
|
|
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;
|
|
868
995
|
/**
|
|
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.
|
|
996
|
+
* The transaction ID of the payment order that has been marked as paid
|
|
997
|
+
* @format GUID
|
|
873
998
|
*/
|
|
874
|
-
|
|
875
|
-
}
|
|
876
|
-
export interface ListSubscriptionHistoryResponse {
|
|
877
|
-
/** List of history entries for the subscription. */
|
|
878
|
-
historyEntries?: SubscriptionHistoryEntry[];
|
|
879
|
-
/** Paging metadata. A `next` cursor is returned if there are more results. */
|
|
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;
|
|
999
|
+
paymentTransactionId?: string | null;
|
|
924
1000
|
}
|
|
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;
|
|
1001
|
+
export interface GetSubscriptionRequest {
|
|
1002
|
+
/** @format GUID */
|
|
1003
|
+
_id: string;
|
|
961
1004
|
}
|
|
962
|
-
export interface
|
|
1005
|
+
export interface GetSubscriptionResponse {
|
|
963
1006
|
subscription?: Subscription;
|
|
964
1007
|
}
|
|
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;
|
|
1008
|
+
export interface CustomerCancelSubscriptionRequest {
|
|
1009
|
+
/** @format GUID */
|
|
1010
|
+
_id: string;
|
|
1011
|
+
/** Optional action reason message */
|
|
1012
|
+
reason?: string | null;
|
|
988
1013
|
}
|
|
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 {
|
|
1014
|
+
export interface CustomerCancelSubscriptionResponse {
|
|
996
1015
|
subscription?: Subscription;
|
|
997
1016
|
}
|
|
998
1017
|
/**
|
|
@@ -1010,53 +1029,45 @@ export interface ActionDetails {
|
|
|
1010
1029
|
initiator?: HistoryActionInitiator;
|
|
1011
1030
|
reason?: string | null;
|
|
1012
1031
|
}
|
|
1013
|
-
export interface
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
export interface SubscriptionResumed {
|
|
1019
|
-
subscription?: Subscription;
|
|
1020
|
-
actionDetails?: ActionDetails;
|
|
1021
|
-
}
|
|
1022
|
-
export interface PauseSubscriptionRequested {
|
|
1023
|
-
subscription?: Subscription;
|
|
1024
|
-
pauseAt?: PauseAt;
|
|
1025
|
-
pausePolicy?: PausePolicy;
|
|
1026
|
-
actionDetails?: ActionDetails;
|
|
1032
|
+
export interface CustomerTurnOnAutoRenewalRequest {
|
|
1033
|
+
/** @format GUID */
|
|
1034
|
+
_id: string;
|
|
1035
|
+
/** Optional action reason message */
|
|
1036
|
+
reason?: string | null;
|
|
1027
1037
|
}
|
|
1028
|
-
export interface
|
|
1038
|
+
export interface CustomerTurnOnAutoRenewalResponse {
|
|
1029
1039
|
subscription?: Subscription;
|
|
1030
|
-
resumeAt?: ResumeAt;
|
|
1031
|
-
actionDetails?: ActionDetails;
|
|
1032
1040
|
}
|
|
1033
|
-
export interface
|
|
1034
|
-
|
|
1035
|
-
|
|
1041
|
+
export interface CustomerTurnOffAutoRenewalRequest {
|
|
1042
|
+
/** @format GUID */
|
|
1043
|
+
_id: string;
|
|
1044
|
+
/** Optional action reason message */
|
|
1045
|
+
reason?: string | null;
|
|
1036
1046
|
}
|
|
1037
|
-
export interface
|
|
1047
|
+
export interface CustomerTurnOffAutoRenewalResponse {
|
|
1038
1048
|
subscription?: Subscription;
|
|
1039
|
-
actionDetails?: ActionDetails;
|
|
1040
1049
|
}
|
|
1041
|
-
export interface
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1050
|
+
export interface CustomerExtendSubscriptionRequest {
|
|
1051
|
+
/**
|
|
1052
|
+
* The ID of the subscription to be extended
|
|
1053
|
+
* @format GUID
|
|
1054
|
+
*/
|
|
1055
|
+
_id: string;
|
|
1056
|
+
/** Optional action reason message */
|
|
1057
|
+
reason?: string | null;
|
|
1058
|
+
/**
|
|
1059
|
+
* For termed - Subscription end date will be updated with the extension period and number of cycles will be added
|
|
1060
|
+
* @min 1
|
|
1061
|
+
*/
|
|
1062
|
+
billingCyclesToAdd: number | null;
|
|
1045
1063
|
}
|
|
1046
|
-
export interface
|
|
1064
|
+
export interface CustomerExtendSubscriptionResponse {
|
|
1065
|
+
/** The now extended subscription */
|
|
1047
1066
|
subscription?: Subscription;
|
|
1048
|
-
actionDetails?: ActionDetails;
|
|
1049
1067
|
}
|
|
1050
|
-
export interface
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
}
|
|
1054
|
-
export interface SubscriptionCycleReadyToPay {
|
|
1055
|
-
subscription?: Subscription;
|
|
1056
|
-
}
|
|
1057
|
-
export interface SubscriptionExtended extends SubscriptionExtendedExtendPolicyOneOf {
|
|
1058
|
-
extensionPeriod?: Duration;
|
|
1059
|
-
extensionBillingCycles?: number;
|
|
1068
|
+
export interface SubscriptionExtended extends SubscriptionExtendedExtendPolicyOneOf {
|
|
1069
|
+
extensionPeriod?: Duration;
|
|
1070
|
+
extensionBillingCycles?: number;
|
|
1060
1071
|
subscription?: Subscription;
|
|
1061
1072
|
actionDetails?: ActionDetails;
|
|
1062
1073
|
}
|
|
@@ -1065,98 +1076,75 @@ export interface SubscriptionExtendedExtendPolicyOneOf {
|
|
|
1065
1076
|
extensionPeriod?: Duration;
|
|
1066
1077
|
extensionBillingCycles?: number;
|
|
1067
1078
|
}
|
|
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;
|
|
1079
|
+
export interface QuerySubscriptionsRequest {
|
|
1080
|
+
query?: QueryV2;
|
|
1128
1081
|
}
|
|
1129
|
-
export
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1082
|
+
export interface QueryV2 extends QueryV2PagingMethodOneOf {
|
|
1083
|
+
/** Paging options to limit and skip the number of items. */
|
|
1084
|
+
paging?: Paging;
|
|
1085
|
+
/** 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`. */
|
|
1086
|
+
cursorPaging?: CursorPaging;
|
|
1087
|
+
/**
|
|
1088
|
+
* Filter object.
|
|
1089
|
+
*
|
|
1090
|
+
* Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
|
|
1091
|
+
*/
|
|
1092
|
+
filter?: Record<string, any> | null;
|
|
1093
|
+
/**
|
|
1094
|
+
* Sort object.
|
|
1095
|
+
*
|
|
1096
|
+
* Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
|
|
1097
|
+
*/
|
|
1098
|
+
sort?: Sorting[];
|
|
1099
|
+
/** 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. */
|
|
1100
|
+
fields?: string[];
|
|
1101
|
+
/** 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. */
|
|
1102
|
+
fieldsets?: string[];
|
|
1135
1103
|
}
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1104
|
+
/** @oneof */
|
|
1105
|
+
export interface QueryV2PagingMethodOneOf {
|
|
1106
|
+
/** Paging options to limit and skip the number of items. */
|
|
1107
|
+
paging?: Paging;
|
|
1108
|
+
/** 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`. */
|
|
1109
|
+
cursorPaging?: CursorPaging;
|
|
1140
1110
|
}
|
|
1141
|
-
export interface
|
|
1142
|
-
|
|
1111
|
+
export interface Sorting {
|
|
1112
|
+
/**
|
|
1113
|
+
* Name of the field to sort by.
|
|
1114
|
+
* @maxLength 512
|
|
1115
|
+
*/
|
|
1116
|
+
fieldName?: string;
|
|
1117
|
+
/** Sort order. */
|
|
1118
|
+
order?: SortOrder;
|
|
1143
1119
|
}
|
|
1144
|
-
export
|
|
1145
|
-
|
|
1120
|
+
export declare enum SortOrder {
|
|
1121
|
+
ASC = "ASC",
|
|
1122
|
+
DESC = "DESC"
|
|
1146
1123
|
}
|
|
1147
|
-
export interface
|
|
1148
|
-
|
|
1124
|
+
export interface Paging {
|
|
1125
|
+
/** Number of items to load. */
|
|
1126
|
+
limit?: number | null;
|
|
1127
|
+
/** Number of items to skip in the current sort order. */
|
|
1128
|
+
offset?: number | null;
|
|
1149
1129
|
}
|
|
1150
|
-
export interface
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1130
|
+
export interface CursorPaging {
|
|
1131
|
+
/**
|
|
1132
|
+
* Maximum number of items to return in the results.
|
|
1133
|
+
* @max 100
|
|
1134
|
+
*/
|
|
1135
|
+
limit?: number | null;
|
|
1136
|
+
/**
|
|
1137
|
+
* Pointer to the next or previous page in the list of results.
|
|
1138
|
+
*
|
|
1139
|
+
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
1140
|
+
* Not relevant for the first request.
|
|
1141
|
+
* @maxLength 16000
|
|
1142
|
+
*/
|
|
1143
|
+
cursor?: string | null;
|
|
1156
1144
|
}
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1145
|
+
export interface QuerySubscriptionsResponse {
|
|
1146
|
+
subscriptions?: Subscription[];
|
|
1147
|
+
metadata?: PagingMetadataV2;
|
|
1160
1148
|
}
|
|
1161
1149
|
export interface PagingMetadataV2 {
|
|
1162
1150
|
/** Number of items returned in the response. */
|
|
@@ -1171,290 +1159,100 @@ export interface PagingMetadataV2 {
|
|
|
1171
1159
|
cursors?: Cursors;
|
|
1172
1160
|
}
|
|
1173
1161
|
export interface Cursors {
|
|
1174
|
-
/**
|
|
1162
|
+
/**
|
|
1163
|
+
* Cursor string pointing to the next page in the list of results.
|
|
1164
|
+
* @maxLength 16000
|
|
1165
|
+
*/
|
|
1175
1166
|
next?: string | null;
|
|
1176
|
-
/**
|
|
1167
|
+
/**
|
|
1168
|
+
* Cursor pointing to the previous page in the list of results.
|
|
1169
|
+
* @maxLength 16000
|
|
1170
|
+
*/
|
|
1177
1171
|
prev?: string | null;
|
|
1178
1172
|
}
|
|
1179
|
-
export interface
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1173
|
+
export interface CountSubscriptionsRequest {
|
|
1174
|
+
/** Filters to specify which subscriptions are counted. */
|
|
1175
|
+
filter?: CountSubscriptionFilter;
|
|
1176
|
+
}
|
|
1177
|
+
export interface CountSubscriptionFilter extends CountSubscriptionFilterStatusOneOf {
|
|
1178
|
+
/** List of statuses to filter the counted subscriptions by. */
|
|
1179
|
+
statuses?: SubscriptionStatus;
|
|
1184
1180
|
/**
|
|
1185
|
-
*
|
|
1186
|
-
*
|
|
1181
|
+
* Predefined status combination to filter the counted subscriptions by.
|
|
1182
|
+
* + `ALL`: Includes these subscription statuses: `"DRAFT"`, `"PENDING"`, `"ACTIVE"`, `"PAUSED"`, `"ENDED"`, and `"CANCELED"`.
|
|
1183
|
+
* + `LIVE`: Includes these subscription statuses: `"PENDING"`, `"ACTIVE"`, and `"PAUSED"`.
|
|
1187
1184
|
*/
|
|
1188
|
-
|
|
1185
|
+
statusGroup?: SubscriptionStatusGroup;
|
|
1189
1186
|
/**
|
|
1190
|
-
*
|
|
1191
|
-
*
|
|
1187
|
+
* Customer ID to filter the counted subscriptions by. You can pass a
|
|
1188
|
+
* [member ID](https://bo.wix.com/wix-docs/rest/members/members/member-object),
|
|
1189
|
+
* [contact ID](https://bo.wix.com/wix-docs/rest/crm/contacts/contacts-v4/contact-object),
|
|
1190
|
+
* or the ID of an anonymous site visitor as `customerId`. When providing a
|
|
1191
|
+
* `customerId` you must also specify a `paymentMethodId`.
|
|
1192
|
+
* @format GUID
|
|
1192
1193
|
*/
|
|
1193
|
-
|
|
1194
|
+
customerId?: string | null;
|
|
1194
1195
|
/**
|
|
1195
|
-
*
|
|
1196
|
-
*
|
|
1197
|
-
*
|
|
1196
|
+
* ID of the payment method to filter the counted subscriptions by.
|
|
1197
|
+
* You must provide a `paymentMethodId` when passing a `customerId`.
|
|
1198
|
+
* @format GUID
|
|
1198
1199
|
*/
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1200
|
+
paymentMethodId?: string | null;
|
|
1201
|
+
}
|
|
1202
|
+
/** @oneof */
|
|
1203
|
+
export interface CountSubscriptionFilterStatusOneOf {
|
|
1204
|
+
/** List of statuses to filter the counted subscriptions by. */
|
|
1205
|
+
statuses?: SubscriptionStatus;
|
|
1204
1206
|
/**
|
|
1205
|
-
*
|
|
1206
|
-
*
|
|
1207
|
+
* Predefined status combination to filter the counted subscriptions by.
|
|
1208
|
+
* + `ALL`: Includes these subscription statuses: `"DRAFT"`, `"PENDING"`, `"ACTIVE"`, `"PAUSED"`, `"ENDED"`, and `"CANCELED"`.
|
|
1209
|
+
* + `LIVE`: Includes these subscription statuses: `"PENDING"`, `"ACTIVE"`, and `"PAUSED"`.
|
|
1207
1210
|
*/
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
+
statusGroup?: SubscriptionStatusGroup;
|
|
1212
|
+
}
|
|
1213
|
+
export interface SubscriptionStatus {
|
|
1211
1214
|
/**
|
|
1212
|
-
*
|
|
1213
|
-
*
|
|
1214
|
-
*
|
|
1215
|
-
*
|
|
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.
|
|
1215
|
+
* Statuses to filter the counted subscriptions by.
|
|
1216
|
+
*
|
|
1217
|
+
* Max: 6 statuses
|
|
1218
|
+
* @maxSize 6
|
|
1218
1219
|
*/
|
|
1219
|
-
|
|
1220
|
+
statuses?: SubscriptionStatusEnumSubscriptionStatus[];
|
|
1220
1221
|
}
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
deletedEvent?: EntityDeletedEvent;
|
|
1226
|
-
actionEvent?: ActionEvent;
|
|
1222
|
+
export declare enum SubscriptionStatusGroup {
|
|
1223
|
+
ALL = "ALL",
|
|
1224
|
+
/** Union of ACTIVE, PAUSED and PENDING */
|
|
1225
|
+
LIVE = "LIVE"
|
|
1227
1226
|
}
|
|
1228
|
-
export interface
|
|
1229
|
-
|
|
1227
|
+
export interface CountSubscriptionsResponse {
|
|
1228
|
+
/**
|
|
1229
|
+
* List of statuses and the corresponding number of subscriptions that match
|
|
1230
|
+
* the filters.
|
|
1231
|
+
*/
|
|
1232
|
+
countByStatus?: CountByStatus[];
|
|
1233
|
+
/** Total number of subscriptions that match the filters. */
|
|
1234
|
+
total?: number;
|
|
1230
1235
|
}
|
|
1231
|
-
export interface
|
|
1232
|
-
|
|
1236
|
+
export interface CountByStatus {
|
|
1237
|
+
/** Subscription status. */
|
|
1238
|
+
status?: SubscriptionStatusEnumSubscriptionStatus;
|
|
1239
|
+
/** Number of subscriptions with the status that match the filters. */
|
|
1240
|
+
count?: number;
|
|
1233
1241
|
}
|
|
1234
|
-
export interface
|
|
1242
|
+
export interface UpdateSubscriptionPaymentMethodRequest {
|
|
1235
1243
|
/**
|
|
1236
|
-
*
|
|
1237
|
-
*
|
|
1238
|
-
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
1244
|
+
* Subscription ID
|
|
1245
|
+
* @format GUID
|
|
1239
1246
|
*/
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
/** Entity that was deleted */
|
|
1244
|
-
deletedEntity?: string | null;
|
|
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"
|
|
1433
|
-
}
|
|
1434
|
-
export interface CountSubscriptionsResponse {
|
|
1435
|
-
/**
|
|
1436
|
-
* List of statuses and the corresponding number of subscriptions that match
|
|
1437
|
-
* the filters.
|
|
1438
|
-
*/
|
|
1439
|
-
countByStatus?: CountByStatus[];
|
|
1440
|
-
/** Total number of subscriptions that match the filters. */
|
|
1441
|
-
total?: number;
|
|
1442
|
-
}
|
|
1443
|
-
export interface CountByStatus {
|
|
1444
|
-
/** Subscription status. */
|
|
1445
|
-
status?: SubscriptionStatusEnumSubscriptionStatus;
|
|
1446
|
-
/** Number of subscriptions with the status that match the filters. */
|
|
1447
|
-
count?: number;
|
|
1448
|
-
}
|
|
1449
|
-
export interface UpdateSubscriptionPaymentMethodRequest {
|
|
1450
|
-
/** Subscription ID */
|
|
1451
|
-
_id: string;
|
|
1452
|
-
paymentMethodId: string;
|
|
1247
|
+
_id: string;
|
|
1248
|
+
/** @format GUID */
|
|
1249
|
+
paymentMethodId: string;
|
|
1453
1250
|
}
|
|
1454
1251
|
export interface UpdateSubscriptionPaymentMethodResponse {
|
|
1455
1252
|
subscription?: Subscription;
|
|
1456
1253
|
}
|
|
1457
1254
|
export interface CustomerAllowedActionsRequest {
|
|
1255
|
+
/** @format GUID */
|
|
1458
1256
|
_id: string;
|
|
1459
1257
|
}
|
|
1460
1258
|
export interface CustomerAllowedActionsResponse {
|
|
@@ -1488,7 +1286,10 @@ export declare enum ExtendPolicyType {
|
|
|
1488
1286
|
BILLING_CYCLE = "BILLING_CYCLE"
|
|
1489
1287
|
}
|
|
1490
1288
|
export interface CustomerListUpcomingChargesRequest {
|
|
1491
|
-
/**
|
|
1289
|
+
/**
|
|
1290
|
+
* Subscription id upcoming charge to be previewed for
|
|
1291
|
+
* @format GUID
|
|
1292
|
+
*/
|
|
1492
1293
|
_id: string;
|
|
1493
1294
|
}
|
|
1494
1295
|
export interface CustomerListUpcomingChargesResponse {
|
|
@@ -1515,11 +1316,15 @@ export interface InvoiceItem extends InvoiceItemPaymentTypeOneOf {
|
|
|
1515
1316
|
* time, not on a recurring basis.
|
|
1516
1317
|
*/
|
|
1517
1318
|
oneTime?: OneTime;
|
|
1518
|
-
/**
|
|
1319
|
+
/**
|
|
1320
|
+
* ID of the invoice line item.
|
|
1321
|
+
* @format GUID
|
|
1322
|
+
*/
|
|
1519
1323
|
_id?: string;
|
|
1520
1324
|
/**
|
|
1521
1325
|
* ID of the [subscription](https://bo.wix.com/wix-docs/rest/premium/premium-subscriptions-manager/subscription-object)
|
|
1522
1326
|
* that belongs to the invoice line item.
|
|
1327
|
+
* @format GUID
|
|
1523
1328
|
*/
|
|
1524
1329
|
subscriptionId?: string | null;
|
|
1525
1330
|
/**
|
|
@@ -1527,12 +1332,15 @@ export interface InvoiceItem extends InvoiceItemPaymentTypeOneOf {
|
|
|
1527
1332
|
* Typically the product name.
|
|
1528
1333
|
*
|
|
1529
1334
|
* Max: 200 characters
|
|
1335
|
+
* @minLength 1
|
|
1336
|
+
* @maxLength 200
|
|
1530
1337
|
*/
|
|
1531
1338
|
name?: string;
|
|
1532
1339
|
/**
|
|
1533
1340
|
* Description of the invoice line item.
|
|
1534
1341
|
*
|
|
1535
1342
|
* Max: 500 characters
|
|
1343
|
+
* @maxLength 500
|
|
1536
1344
|
*/
|
|
1537
1345
|
description?: string | null;
|
|
1538
1346
|
/** Information about the product from the external product catalog. */
|
|
@@ -1580,6 +1388,7 @@ export interface PriceDetails {
|
|
|
1580
1388
|
/**
|
|
1581
1389
|
* Price of the invoice line item in `0.00` format.
|
|
1582
1390
|
* A minus sign (-) indicates that the amount is negative.
|
|
1391
|
+
* @format DECIMAL_VALUE
|
|
1583
1392
|
*/
|
|
1584
1393
|
price?: string;
|
|
1585
1394
|
/** Information about the invoice line item's tax. */
|
|
@@ -1598,6 +1407,7 @@ export interface InvoiceDiscount extends InvoiceDiscountValueOneOf {
|
|
|
1598
1407
|
* Available when the discount is an amount.
|
|
1599
1408
|
*
|
|
1600
1409
|
* Min: `0.01`
|
|
1410
|
+
* @decimalValue options { gt:0.00 }
|
|
1601
1411
|
*/
|
|
1602
1412
|
amount?: string;
|
|
1603
1413
|
/**
|
|
@@ -1606,6 +1416,7 @@ export interface InvoiceDiscount extends InvoiceDiscountValueOneOf {
|
|
|
1606
1416
|
*
|
|
1607
1417
|
* Min: `0.01`
|
|
1608
1418
|
* Max: `100`
|
|
1419
|
+
* @decimalValue options { gt:0.00, lte:100 }
|
|
1609
1420
|
*/
|
|
1610
1421
|
percentage?: string;
|
|
1611
1422
|
/** Indicates the source of the discount. . Contains app_id and entity_id */
|
|
@@ -1618,6 +1429,7 @@ export interface InvoiceDiscountValueOneOf {
|
|
|
1618
1429
|
* Available when the discount is an amount.
|
|
1619
1430
|
*
|
|
1620
1431
|
* Min: `0.01`
|
|
1432
|
+
* @decimalValue options { gt:0.00 }
|
|
1621
1433
|
*/
|
|
1622
1434
|
amount?: string;
|
|
1623
1435
|
/**
|
|
@@ -1626,6 +1438,7 @@ export interface InvoiceDiscountValueOneOf {
|
|
|
1626
1438
|
*
|
|
1627
1439
|
* Min: `0.01`
|
|
1628
1440
|
* Max: `100`
|
|
1441
|
+
* @decimalValue options { gt:0.00, lte:100 }
|
|
1629
1442
|
*/
|
|
1630
1443
|
percentage?: string;
|
|
1631
1444
|
}
|
|
@@ -1634,6 +1447,7 @@ export interface InvoiceApplicationFee extends InvoiceApplicationFeeValueOneOf {
|
|
|
1634
1447
|
* Application fee amount. Set by the origin app, and not by BASS. Wix
|
|
1635
1448
|
* receives the full `applicationFee`, while the merchant doesn't receive
|
|
1636
1449
|
* any portion of it.
|
|
1450
|
+
* @format DECIMAL_VALUE
|
|
1637
1451
|
*/
|
|
1638
1452
|
amount?: string;
|
|
1639
1453
|
/** Information about the discount for the invoice line item's application fee. */
|
|
@@ -1645,34 +1459,63 @@ export interface InvoiceApplicationFeeValueOneOf {
|
|
|
1645
1459
|
* Application fee amount. Set by the origin app, and not by BASS. Wix
|
|
1646
1460
|
* receives the full `applicationFee`, while the merchant doesn't receive
|
|
1647
1461
|
* any portion of it.
|
|
1462
|
+
* @format DECIMAL_VALUE
|
|
1648
1463
|
*/
|
|
1649
1464
|
amount?: string;
|
|
1650
1465
|
}
|
|
1651
1466
|
export interface ItemTaxData {
|
|
1652
1467
|
/** Aggregated tax from tax_breakdowns */
|
|
1653
1468
|
lineItemTaxSummary?: LineItemTaxSummary;
|
|
1654
|
-
/**
|
|
1469
|
+
/**
|
|
1470
|
+
* A detailed description of all the tax authorities applied on this item.
|
|
1471
|
+
* @minSize 1
|
|
1472
|
+
* @maxSize 100
|
|
1473
|
+
*/
|
|
1655
1474
|
taxBreakdowns?: TaxBreakdown[];
|
|
1656
1475
|
}
|
|
1657
1476
|
export interface LineItemTaxSummary {
|
|
1658
|
-
/**
|
|
1477
|
+
/**
|
|
1478
|
+
* Calculated from external tax summary
|
|
1479
|
+
* @format DECIMAL_VALUE
|
|
1480
|
+
*/
|
|
1659
1481
|
aggregatedTaxAmount?: string;
|
|
1660
|
-
/**
|
|
1482
|
+
/**
|
|
1483
|
+
* Aggregated from tax_breakdowns
|
|
1484
|
+
* @decimalValue options { gte:0, maxScale:6 }
|
|
1485
|
+
*/
|
|
1661
1486
|
aggregatedTaxRate?: string;
|
|
1662
|
-
/**
|
|
1487
|
+
/**
|
|
1488
|
+
* Total taxable amount for this line item.
|
|
1489
|
+
* @format DECIMAL_VALUE
|
|
1490
|
+
* @decimalValue options { maxScale:4 }
|
|
1491
|
+
*/
|
|
1663
1492
|
taxableAmount?: string;
|
|
1664
|
-
/**
|
|
1493
|
+
/**
|
|
1494
|
+
* Aggregated from tax_breakdowns after applying exemptions
|
|
1495
|
+
* @format DECIMAL_VALUE
|
|
1496
|
+
* @decimalValue options { maxScale:4 }
|
|
1497
|
+
*/
|
|
1665
1498
|
finalTaxAmount?: string | null;
|
|
1666
1499
|
}
|
|
1667
1500
|
export interface TaxBreakdown {
|
|
1668
1501
|
taxType?: string;
|
|
1502
|
+
/** @decimalValue options { maxScale:4 } */
|
|
1669
1503
|
taxRate?: string;
|
|
1504
|
+
/** @format DECIMAL_VALUE */
|
|
1670
1505
|
taxAmount?: string | null;
|
|
1506
|
+
/** @format DECIMAL_VALUE */
|
|
1671
1507
|
taxableAmount?: string | null;
|
|
1508
|
+
/** @format DECIMAL_VALUE */
|
|
1672
1509
|
nonTaxableAmount?: string | null;
|
|
1673
|
-
/**
|
|
1510
|
+
/**
|
|
1511
|
+
* Name of the tax that was calculated. For example, "NY State Sales Tax", "Quebec GST", etc.
|
|
1512
|
+
* @maxLength 200
|
|
1513
|
+
*/
|
|
1674
1514
|
taxName?: string | null;
|
|
1675
|
-
/**
|
|
1515
|
+
/**
|
|
1516
|
+
* Jurisdiction that taxes were calculated for.
|
|
1517
|
+
* @maxLength 200
|
|
1518
|
+
*/
|
|
1676
1519
|
jurisdiction?: string | null;
|
|
1677
1520
|
/** Type of jurisdiction that taxes were calculated for. */
|
|
1678
1521
|
jurisdictionType?: string;
|
|
@@ -1682,6 +1525,13 @@ export interface InitiatePaymentMethodSetupRequest {
|
|
|
1682
1525
|
paymentMode?: PaymentMode;
|
|
1683
1526
|
paymentSettings?: PaymentSettings;
|
|
1684
1527
|
}
|
|
1528
|
+
export declare enum PaymentMode {
|
|
1529
|
+
NONE = "NONE",
|
|
1530
|
+
/** The latest invoice of the subscription will be charged. */
|
|
1531
|
+
CHARGE = "CHARGE",
|
|
1532
|
+
/** An authorization invoice with zero amount will be created. */
|
|
1533
|
+
AUTHORIZATION = "AUTHORIZATION"
|
|
1534
|
+
}
|
|
1685
1535
|
export interface PaymentSettings {
|
|
1686
1536
|
/** Allowed payment providers for Subscriptions, for example to limit subscriptions to be created only with "Wix Payments" provider. */
|
|
1687
1537
|
allowedProviderIds?: string[];
|
|
@@ -1689,6 +1539,7 @@ export interface PaymentSettings {
|
|
|
1689
1539
|
orderMethod?: OrderMethod;
|
|
1690
1540
|
/** Wix Pay callback url(s) to return buyer to a third party system */
|
|
1691
1541
|
redirectUrls?: RedirectUrls;
|
|
1542
|
+
/** @format GUID */
|
|
1692
1543
|
paymentMethodId?: string | null;
|
|
1693
1544
|
/**
|
|
1694
1545
|
* Specifies an alternative origin for processing the payment.
|
|
@@ -1716,441 +1567,1128 @@ export interface RedirectUrls {
|
|
|
1716
1567
|
pendingUrl?: string;
|
|
1717
1568
|
}
|
|
1718
1569
|
export interface PaymentOrigin {
|
|
1719
|
-
/**
|
|
1570
|
+
/**
|
|
1571
|
+
* ID of the app for which the Payment will create the order on. For example, Paypal.
|
|
1572
|
+
* @format GUID
|
|
1573
|
+
*/
|
|
1720
1574
|
appId?: string;
|
|
1721
|
-
/**
|
|
1575
|
+
/**
|
|
1576
|
+
* Id of the entity that order will be created on
|
|
1577
|
+
* @format GUID
|
|
1578
|
+
*/
|
|
1722
1579
|
instanceId?: string;
|
|
1723
1580
|
}
|
|
1724
1581
|
export interface InitiatePaymentMethodSetupResponse {
|
|
1582
|
+
/** @format GUID */
|
|
1725
1583
|
paymentOrderId?: string;
|
|
1726
1584
|
}
|
|
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;
|
|
1585
|
+
export interface DomainEvent extends DomainEventBodyOneOf {
|
|
1586
|
+
createdEvent?: EntityCreatedEvent;
|
|
1587
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
1588
|
+
deletedEvent?: EntityDeletedEvent;
|
|
1589
|
+
actionEvent?: ActionEvent;
|
|
1764
1590
|
/**
|
|
1765
|
-
*
|
|
1766
|
-
*
|
|
1591
|
+
* Unique event ID.
|
|
1592
|
+
* Allows clients to ignore duplicate webhooks.
|
|
1767
1593
|
*/
|
|
1768
|
-
fieldMask?: string[];
|
|
1769
|
-
}
|
|
1770
|
-
export interface UpdateSubscriptionResponse {
|
|
1771
|
-
subscription?: Subscription;
|
|
1772
|
-
}
|
|
1773
|
-
export interface UpdateSubscriptionStartDateRequest {
|
|
1774
|
-
/** Subscription ID */
|
|
1775
1594
|
_id?: string;
|
|
1776
1595
|
/**
|
|
1777
|
-
*
|
|
1778
|
-
*
|
|
1779
|
-
* cycles_to_pay_on_creation will be set to 1 if no free trial is set
|
|
1596
|
+
* Assumes actions are also always typed to an entity_type
|
|
1597
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
1780
1598
|
*/
|
|
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;
|
|
1599
|
+
entityFqdn?: string;
|
|
1800
1600
|
/**
|
|
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.
|
|
1601
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
1602
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
1603
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
1808
1604
|
*/
|
|
1809
|
-
|
|
1605
|
+
slug?: string;
|
|
1606
|
+
/** ID of the entity associated with the event. */
|
|
1607
|
+
entityId?: string;
|
|
1608
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
1609
|
+
eventTime?: Date | null;
|
|
1610
|
+
/**
|
|
1611
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
1612
|
+
* (for example, GDPR).
|
|
1613
|
+
*/
|
|
1614
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
1615
|
+
/** If present, indicates the action that triggered the event. */
|
|
1616
|
+
originatedFrom?: string | null;
|
|
1617
|
+
/**
|
|
1618
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
1619
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
1620
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
1621
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
1622
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
1623
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
1624
|
+
*/
|
|
1625
|
+
entityEventSequence?: string | null;
|
|
1810
1626
|
}
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1627
|
+
/** @oneof */
|
|
1628
|
+
export interface DomainEventBodyOneOf {
|
|
1629
|
+
createdEvent?: EntityCreatedEvent;
|
|
1630
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
1631
|
+
deletedEvent?: EntityDeletedEvent;
|
|
1632
|
+
actionEvent?: ActionEvent;
|
|
1814
1633
|
}
|
|
1815
|
-
export interface
|
|
1816
|
-
|
|
1817
|
-
_id?: string;
|
|
1818
|
-
/** Origin entity ID of the subscription to update. */
|
|
1819
|
-
entityId?: string;
|
|
1634
|
+
export interface EntityCreatedEvent {
|
|
1635
|
+
entity?: string;
|
|
1820
1636
|
}
|
|
1821
|
-
export interface
|
|
1822
|
-
|
|
1823
|
-
subscription?: Subscription;
|
|
1637
|
+
export interface RestoreInfo {
|
|
1638
|
+
deletedDate?: Date | null;
|
|
1824
1639
|
}
|
|
1825
|
-
export interface
|
|
1826
|
-
/**
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1640
|
+
export interface EntityUpdatedEvent {
|
|
1641
|
+
/**
|
|
1642
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
1643
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
1644
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
1645
|
+
*/
|
|
1646
|
+
currentEntity?: string;
|
|
1830
1647
|
}
|
|
1831
|
-
export interface
|
|
1832
|
-
|
|
1648
|
+
export interface EntityDeletedEvent {
|
|
1649
|
+
/** Entity that was deleted */
|
|
1650
|
+
deletedEntity?: string | null;
|
|
1833
1651
|
}
|
|
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;
|
|
1652
|
+
export interface ActionEvent {
|
|
1653
|
+
body?: string;
|
|
1847
1654
|
}
|
|
1848
|
-
export interface
|
|
1655
|
+
export interface MessageEnvelope {
|
|
1849
1656
|
/**
|
|
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"}`.
|
|
1657
|
+
* App instance ID.
|
|
1658
|
+
* @format GUID
|
|
1856
1659
|
*/
|
|
1857
|
-
|
|
1660
|
+
instanceId?: string | null;
|
|
1858
1661
|
/**
|
|
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_.
|
|
1662
|
+
* Event type.
|
|
1663
|
+
* @maxLength 150
|
|
1864
1664
|
*/
|
|
1865
|
-
|
|
1665
|
+
eventType?: string;
|
|
1666
|
+
/** The identification type and identity data. */
|
|
1667
|
+
identity?: IdentificationData;
|
|
1668
|
+
/** Stringify payload. */
|
|
1669
|
+
data?: string;
|
|
1866
1670
|
}
|
|
1867
|
-
|
|
1868
|
-
export interface ScheduleAdditionalInfoParamOneOf {
|
|
1671
|
+
export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
1869
1672
|
/**
|
|
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"}`.
|
|
1673
|
+
* ID of a site visitor that has not logged in to the site.
|
|
1674
|
+
* @format GUID
|
|
1876
1675
|
*/
|
|
1877
|
-
|
|
1676
|
+
anonymousVisitorId?: string;
|
|
1878
1677
|
/**
|
|
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_.
|
|
1678
|
+
* ID of a site visitor that has logged in to the site.
|
|
1679
|
+
* @format GUID
|
|
1884
1680
|
*/
|
|
1885
|
-
|
|
1886
|
-
}
|
|
1887
|
-
export interface UpdateSubscriptionItemsResponse {
|
|
1888
|
-
subscription?: Subscription;
|
|
1889
|
-
}
|
|
1890
|
-
export interface BulkUpdateSubscriptionItemsByFilterRequest {
|
|
1681
|
+
memberId?: string;
|
|
1891
1682
|
/**
|
|
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.
|
|
1683
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
1684
|
+
* @format GUID
|
|
1899
1685
|
*/
|
|
1900
|
-
|
|
1686
|
+
wixUserId?: string;
|
|
1901
1687
|
/**
|
|
1902
|
-
*
|
|
1903
|
-
*
|
|
1904
|
-
* with matching `items.catalogReference.catalogItemId` are updated.
|
|
1905
|
-
*
|
|
1906
|
-
* Max: `100` reference catalog item IDs
|
|
1688
|
+
* ID of an app.
|
|
1689
|
+
* @format GUID
|
|
1907
1690
|
*/
|
|
1908
|
-
|
|
1691
|
+
appId?: string;
|
|
1692
|
+
/** @readonly */
|
|
1693
|
+
identityType?: WebhookIdentityType;
|
|
1694
|
+
}
|
|
1695
|
+
/** @oneof */
|
|
1696
|
+
export interface IdentificationDataIdOneOf {
|
|
1909
1697
|
/**
|
|
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.
|
|
1698
|
+
* ID of a site visitor that has not logged in to the site.
|
|
1699
|
+
* @format GUID
|
|
1916
1700
|
*/
|
|
1917
|
-
|
|
1701
|
+
anonymousVisitorId?: string;
|
|
1918
1702
|
/**
|
|
1919
|
-
*
|
|
1920
|
-
*
|
|
1703
|
+
* ID of a site visitor that has logged in to the site.
|
|
1704
|
+
* @format GUID
|
|
1921
1705
|
*/
|
|
1922
|
-
|
|
1706
|
+
memberId?: string;
|
|
1923
1707
|
/**
|
|
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.
|
|
1708
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
1709
|
+
* @format GUID
|
|
1929
1710
|
*/
|
|
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;
|
|
1711
|
+
wixUserId?: string;
|
|
1937
1712
|
/**
|
|
1938
|
-
*
|
|
1939
|
-
*
|
|
1940
|
-
* Min: `1`
|
|
1713
|
+
* ID of an app.
|
|
1714
|
+
* @format GUID
|
|
1941
1715
|
*/
|
|
1942
|
-
|
|
1943
|
-
/** Information about the new item tax. */
|
|
1944
|
-
tax?: Tax;
|
|
1716
|
+
appId?: string;
|
|
1945
1717
|
}
|
|
1946
|
-
export
|
|
1718
|
+
export declare enum WebhookIdentityType {
|
|
1719
|
+
UNKNOWN = "UNKNOWN",
|
|
1720
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
1721
|
+
MEMBER = "MEMBER",
|
|
1722
|
+
WIX_USER = "WIX_USER",
|
|
1723
|
+
APP = "APP"
|
|
1724
|
+
}
|
|
1725
|
+
export interface CreateSubscriptionInStateRequest extends CreateSubscriptionInStateRequestModeOneOf {
|
|
1726
|
+
activeSubscription?: CreateSubscriptionRequest;
|
|
1727
|
+
}
|
|
1728
|
+
/** @oneof */
|
|
1729
|
+
export interface CreateSubscriptionInStateRequestModeOneOf {
|
|
1730
|
+
activeSubscription?: CreateSubscriptionRequest;
|
|
1731
|
+
}
|
|
1732
|
+
export interface CreateSubscriptionRequest {
|
|
1733
|
+
subscription?: Subscription;
|
|
1734
|
+
/** Optional settings for the payments. Should be empty for free subscriptions. */
|
|
1735
|
+
paymentSettings?: PaymentSettings;
|
|
1947
1736
|
/**
|
|
1948
|
-
*
|
|
1949
|
-
*
|
|
1950
|
-
* to retrieve information about the job status.
|
|
1737
|
+
* Optional unique identifier for this request in order to prevent subscription duplications
|
|
1738
|
+
* @format GUID
|
|
1951
1739
|
*/
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
_id?: string;
|
|
1956
|
-
revision?: string;
|
|
1740
|
+
idempotencyKey?: string | null;
|
|
1741
|
+
/** Optional origin override for setting identity of subscription creator instead of extracting from context */
|
|
1742
|
+
originOverride?: OriginOverride;
|
|
1957
1743
|
}
|
|
1958
|
-
export interface
|
|
1744
|
+
export interface OriginOverride {
|
|
1745
|
+
/** @format GUID */
|
|
1746
|
+
appId?: string;
|
|
1747
|
+
/** @format GUID */
|
|
1748
|
+
instanceId?: string;
|
|
1959
1749
|
}
|
|
1960
|
-
export interface
|
|
1961
|
-
|
|
1962
|
-
|
|
1750
|
+
export interface CreateSubscriptionInStateResponse {
|
|
1751
|
+
/** @format GUID */
|
|
1752
|
+
subscriptionId?: string;
|
|
1963
1753
|
}
|
|
1964
|
-
export interface
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1754
|
+
export interface PayCycleRequest {
|
|
1755
|
+
/** @format GUID */
|
|
1756
|
+
subscriptionId: string;
|
|
1757
|
+
paymentTestMode?: PaymentTestMode;
|
|
1758
|
+
/** @format GUID */
|
|
1759
|
+
tenantId: string;
|
|
1968
1760
|
}
|
|
1969
|
-
export declare enum
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1761
|
+
export declare enum PaymentTestMode {
|
|
1762
|
+
REGULAR = "REGULAR",
|
|
1763
|
+
FAIL_TECHNICAL = "FAIL_TECHNICAL",
|
|
1764
|
+
FAIL_DECLINE = "FAIL_DECLINE",
|
|
1765
|
+
FAIL_RETRYABLE_DECLINE = "FAIL_RETRYABLE_DECLINE"
|
|
1974
1766
|
}
|
|
1975
|
-
export interface
|
|
1767
|
+
export interface PayCycleResponse {
|
|
1768
|
+
/** @format GUID */
|
|
1769
|
+
invoiceId?: string;
|
|
1770
|
+
/** @format GUID */
|
|
1771
|
+
paymentOrderId?: string | null;
|
|
1976
1772
|
subscription?: Subscription;
|
|
1977
1773
|
}
|
|
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;
|
|
1774
|
+
export interface GetFullSubscriptionDataRequest {
|
|
1775
|
+
/** @format GUID */
|
|
1776
|
+
_id?: string;
|
|
1987
1777
|
}
|
|
1988
|
-
export interface
|
|
1778
|
+
export interface GetFullSubscriptionDataResponse {
|
|
1989
1779
|
subscription?: Subscription;
|
|
1780
|
+
internalSubscriptionData?: InternalSubscriptionData;
|
|
1990
1781
|
}
|
|
1991
|
-
export interface
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
1782
|
+
export interface InternalSubscriptionData {
|
|
1783
|
+
/** @format GUID */
|
|
1784
|
+
originInstanceId?: string;
|
|
1785
|
+
source?: string | null;
|
|
1786
|
+
billingType?: string;
|
|
1787
|
+
isOneTime?: boolean;
|
|
1788
|
+
migrationDetails?: MigrationDetails;
|
|
1789
|
+
pausePaidDuration?: string | null;
|
|
1790
|
+
authorizationPaymentData?: PaymentData;
|
|
1791
|
+
currentCyclePausePeriods?: PausePeriod[];
|
|
2000
1792
|
}
|
|
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;
|
|
1793
|
+
export interface MigrationDetails {
|
|
1794
|
+
/** system (application) where the Subscription has been created */
|
|
1795
|
+
originSystem?: string;
|
|
1796
|
+
/** date when the Subscription started to be managed in BASS */
|
|
1797
|
+
shiftManagementDate?: Date | null;
|
|
2010
1798
|
}
|
|
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;
|
|
1799
|
+
export interface PausePeriod {
|
|
1800
|
+
startDate?: Date | null;
|
|
1801
|
+
endDate?: Date | null;
|
|
2017
1802
|
}
|
|
2018
|
-
export interface
|
|
2019
|
-
|
|
1803
|
+
export interface GetSubscriptionAndInternalDataRequest {
|
|
1804
|
+
/** @format GUID */
|
|
1805
|
+
subscriptionId?: string;
|
|
1806
|
+
/** @format GUID */
|
|
1807
|
+
tenantId?: string;
|
|
2020
1808
|
}
|
|
2021
|
-
export interface
|
|
2022
|
-
|
|
2023
|
-
|
|
1809
|
+
export interface GetSubscriptionAndInternalDataResponse {
|
|
1810
|
+
subscription?: Subscription;
|
|
1811
|
+
internalSubscriptionData?: InternalSubscriptionData;
|
|
2024
1812
|
}
|
|
2025
|
-
export interface
|
|
2026
|
-
|
|
2027
|
-
|
|
1813
|
+
export interface SearchSubscriptionRequest {
|
|
1814
|
+
/** @format GUID */
|
|
1815
|
+
_id?: string;
|
|
1816
|
+
/** @format GUID */
|
|
1817
|
+
tenantId?: string;
|
|
2028
1818
|
}
|
|
2029
|
-
export interface
|
|
1819
|
+
export interface SearchSubscriptionResponse {
|
|
2030
1820
|
subscription?: Subscription;
|
|
2031
1821
|
}
|
|
2032
|
-
export interface
|
|
2033
|
-
|
|
2034
|
-
|
|
1822
|
+
export interface UpdatePausePaidDurationRequest {
|
|
1823
|
+
/** @format GUID */
|
|
1824
|
+
subscriptionId?: string;
|
|
1825
|
+
/**
|
|
1826
|
+
* @min 1
|
|
1827
|
+
* @max 10000000
|
|
1828
|
+
*/
|
|
1829
|
+
pausePaidDurationSeconds?: string;
|
|
1830
|
+
/** @format GUID */
|
|
1831
|
+
tenantId?: string;
|
|
2035
1832
|
}
|
|
2036
|
-
export interface
|
|
1833
|
+
export interface UpdatePausePaidDurationResponse {
|
|
1834
|
+
}
|
|
1835
|
+
export interface UpdateStatusRequest {
|
|
1836
|
+
/** @format GUID */
|
|
1837
|
+
subscriptionId?: string;
|
|
1838
|
+
/** @format GUID */
|
|
1839
|
+
tenantId?: string;
|
|
1840
|
+
status?: SubscriptionStatusEnumSubscriptionStatus;
|
|
1841
|
+
}
|
|
1842
|
+
export interface UpdateStatusResponse {
|
|
2037
1843
|
subscription?: Subscription;
|
|
2038
1844
|
}
|
|
2039
|
-
export interface
|
|
2040
|
-
/**
|
|
2041
|
-
subscriptionId
|
|
1845
|
+
export interface UpdatePaymentStatusRequest {
|
|
1846
|
+
/** @format GUID */
|
|
1847
|
+
subscriptionId?: string;
|
|
1848
|
+
/** @format GUID */
|
|
1849
|
+
tenantId?: string;
|
|
1850
|
+
paymentStatus?: PaymentStatus;
|
|
2042
1851
|
}
|
|
2043
|
-
export interface
|
|
1852
|
+
export interface UpdatePaymentStatusResponse {
|
|
2044
1853
|
subscription?: Subscription;
|
|
2045
1854
|
}
|
|
2046
|
-
export interface
|
|
2047
|
-
/**
|
|
2048
|
-
|
|
2049
|
-
/**
|
|
2050
|
-
|
|
1855
|
+
export interface ReviveSubscriptionRequest {
|
|
1856
|
+
/** @format GUID */
|
|
1857
|
+
tenantId?: string;
|
|
1858
|
+
/** @format GUID */
|
|
1859
|
+
subscriptionId?: string;
|
|
1860
|
+
revivePolicy?: RevivePolicy;
|
|
1861
|
+
isTestRun?: boolean;
|
|
2051
1862
|
}
|
|
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;
|
|
1863
|
+
export declare enum RevivePolicy {
|
|
1864
|
+
SIMPLE = "SIMPLE",
|
|
1865
|
+
RESUME = "RESUME"
|
|
2060
1866
|
}
|
|
2061
|
-
export interface
|
|
1867
|
+
export interface ReviveSubscriptionResponse {
|
|
2062
1868
|
subscription?: Subscription;
|
|
2063
1869
|
}
|
|
2064
|
-
export interface
|
|
1870
|
+
export interface ConvertSapiRequest {
|
|
1871
|
+
/** @format GUID */
|
|
1872
|
+
subscriptionId?: string;
|
|
2065
1873
|
}
|
|
2066
|
-
export interface
|
|
2067
|
-
|
|
2068
|
-
total?: number;
|
|
1874
|
+
export interface ConvertSapiResponse {
|
|
1875
|
+
subscription?: Subscription;
|
|
2069
1876
|
}
|
|
2070
|
-
export interface
|
|
2071
|
-
|
|
2072
|
-
|
|
1877
|
+
export interface GetSubscriptionInvoicesRequest {
|
|
1878
|
+
/** @format GUID */
|
|
1879
|
+
_id?: string;
|
|
2073
1880
|
}
|
|
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;
|
|
1881
|
+
export interface GetSubscriptionInvoicesResponse {
|
|
1882
|
+
invoices?: SubscriptionInvoice[];
|
|
2082
1883
|
}
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
extensionBillingCycles?: number;
|
|
1884
|
+
export interface SubscriptionInvoice {
|
|
1885
|
+
/** @format GUID */
|
|
1886
|
+
_id?: string;
|
|
1887
|
+
subscriptionCycle?: number;
|
|
1888
|
+
_createdDate?: Date | null;
|
|
2089
1889
|
}
|
|
2090
|
-
export interface
|
|
2091
|
-
/**
|
|
2092
|
-
|
|
1890
|
+
export interface FinishFreeTrialNowRequest {
|
|
1891
|
+
/** @format GUID */
|
|
1892
|
+
subscriptionId?: string;
|
|
1893
|
+
/** @format GUID */
|
|
1894
|
+
tenantId?: string;
|
|
2093
1895
|
}
|
|
2094
|
-
export interface
|
|
2095
|
-
|
|
2096
|
-
/** List of additional fields to be included in the response. */
|
|
2097
|
-
fields?: RequestedFields[];
|
|
1896
|
+
export interface FinishFreeTrialNowResponse {
|
|
1897
|
+
subscription?: Subscription;
|
|
2098
1898
|
}
|
|
2099
|
-
export
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
1899
|
+
export interface SendTimeCapsuleTaskCanceledBIRequest {
|
|
1900
|
+
/** @format GUID */
|
|
1901
|
+
tenantId?: string;
|
|
1902
|
+
/** @format GUID */
|
|
1903
|
+
subscriptionId?: string;
|
|
1904
|
+
/** @minLength 1 */
|
|
1905
|
+
taskType?: string;
|
|
2103
1906
|
}
|
|
2104
|
-
export interface
|
|
2105
|
-
/** List of actions that are allowed. */
|
|
2106
|
-
actions?: Action[];
|
|
2107
|
-
/** List of actions that are not supported, included only if requested. Provides reasons for each unsupported action. */
|
|
2108
|
-
unsupportedActions?: UnsupportedAction[];
|
|
1907
|
+
export interface Empty {
|
|
2109
1908
|
}
|
|
2110
|
-
export interface
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
1909
|
+
export interface ScheduleTimeCapsuleTaskRequest {
|
|
1910
|
+
/** @format GUID */
|
|
1911
|
+
subscriptionId?: string;
|
|
1912
|
+
/** @minLength 1 */
|
|
1913
|
+
taskType?: string;
|
|
1914
|
+
executionTime?: Date | null;
|
|
1915
|
+
/** @format GUID */
|
|
1916
|
+
tenantId?: string;
|
|
2114
1917
|
}
|
|
2115
|
-
export interface
|
|
2116
|
-
|
|
2117
|
-
|
|
1918
|
+
export interface CancelTimeCapsuleTaskRequest {
|
|
1919
|
+
/** @format GUID */
|
|
1920
|
+
tenantId?: string;
|
|
1921
|
+
/** @format GUID */
|
|
1922
|
+
subscriptionId?: string;
|
|
1923
|
+
/** @minLength 1 */
|
|
1924
|
+
taskType?: string;
|
|
2118
1925
|
}
|
|
2119
|
-
export interface
|
|
2120
|
-
/**
|
|
2121
|
-
|
|
2122
|
-
|
|
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;
|
|
1926
|
+
export interface UpdateFullSubscriptionRequest {
|
|
1927
|
+
/** @format GUID */
|
|
1928
|
+
tenantId?: string;
|
|
1929
|
+
subscription?: Subscription;
|
|
2129
1930
|
}
|
|
2130
|
-
export interface
|
|
2131
|
-
|
|
1931
|
+
export interface UpdateFullSubscriptionResponse {
|
|
1932
|
+
subscription?: Subscription;
|
|
2132
1933
|
}
|
|
2133
|
-
export interface
|
|
2134
|
-
/**
|
|
2135
|
-
|
|
1934
|
+
export interface UpdateSubscriptionInvoiceCycleRequest {
|
|
1935
|
+
/** @format GUID */
|
|
1936
|
+
subscriptionId?: string;
|
|
1937
|
+
/** @format GUID */
|
|
1938
|
+
tenantId?: string;
|
|
1939
|
+
/** @format GUID */
|
|
1940
|
+
invoiceId?: string;
|
|
1941
|
+
subscriptionCycle?: number;
|
|
2136
1942
|
}
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
/** Information about a non-existing subscription. */
|
|
2140
|
-
subscriptionInfo?: SubscriptionInfo;
|
|
1943
|
+
export interface UpdateSubscriptionInvoiceCycleResponse {
|
|
1944
|
+
subscriptionInvoice?: SubscriptionInvoice;
|
|
2141
1945
|
}
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
1946
|
+
export interface AddPausePeriodRequest {
|
|
1947
|
+
/** @format GUID */
|
|
1948
|
+
tenantId?: string;
|
|
1949
|
+
/** @format GUID */
|
|
1950
|
+
subscriptionId?: string;
|
|
1951
|
+
pauseStartDate?: Date | null;
|
|
1952
|
+
pauseEndDate?: Date | null;
|
|
2147
1953
|
}
|
|
2148
|
-
export interface
|
|
2149
|
-
|
|
2150
|
-
charges?: Charge[];
|
|
1954
|
+
export interface AddPausePeriodResponse {
|
|
1955
|
+
subscription?: Subscription;
|
|
2151
1956
|
}
|
|
2152
|
-
|
|
2153
|
-
|
|
1957
|
+
export interface RunTimeCapsuleTaskNowRequest {
|
|
1958
|
+
/** @format GUID */
|
|
1959
|
+
tenantId?: string;
|
|
1960
|
+
/** @format GUID */
|
|
1961
|
+
subscriptionId?: string;
|
|
1962
|
+
/** @minLength 1 */
|
|
1963
|
+
taskType?: string;
|
|
1964
|
+
}
|
|
1965
|
+
export interface CreateRecurringInvoiceBORequest {
|
|
1966
|
+
/** @format GUID */
|
|
1967
|
+
subscriptionId?: string;
|
|
1968
|
+
/** @format GUID */
|
|
1969
|
+
tenantId?: string;
|
|
1970
|
+
/** @min 2 */
|
|
1971
|
+
cycleNumber?: number;
|
|
1972
|
+
}
|
|
1973
|
+
export interface CreateRecurringInvoiceBOResponse {
|
|
1974
|
+
invoiceId?: string;
|
|
1975
|
+
}
|
|
1976
|
+
export interface SetShiftingDataRequest {
|
|
1977
|
+
/** @format GUID */
|
|
1978
|
+
subscriptionId?: string;
|
|
1979
|
+
/** @format GUID */
|
|
1980
|
+
tenantId?: string;
|
|
1981
|
+
isBassManaged?: boolean;
|
|
1982
|
+
shiftManagementDate?: Date | null;
|
|
1983
|
+
}
|
|
1984
|
+
export interface SetShiftingDataResponse {
|
|
1985
|
+
subscription?: Subscription;
|
|
1986
|
+
}
|
|
1987
|
+
export interface FixSubscriptionInvoicesRequest extends FixSubscriptionInvoicesRequestModeOneOf {
|
|
1988
|
+
attachInvoice?: AttachInvoice;
|
|
1989
|
+
detachInvoice?: DetachInvoice;
|
|
1990
|
+
/** @format GUID */
|
|
1991
|
+
tenantId?: string;
|
|
1992
|
+
/** @format GUID */
|
|
1993
|
+
subscriptionId?: string;
|
|
1994
|
+
}
|
|
1995
|
+
/** @oneof */
|
|
1996
|
+
export interface FixSubscriptionInvoicesRequestModeOneOf {
|
|
1997
|
+
attachInvoice?: AttachInvoice;
|
|
1998
|
+
detachInvoice?: DetachInvoice;
|
|
1999
|
+
}
|
|
2000
|
+
export interface AttachInvoice {
|
|
2001
|
+
/** @format GUID */
|
|
2002
|
+
invoiceId?: string;
|
|
2003
|
+
}
|
|
2004
|
+
export interface DetachInvoice {
|
|
2005
|
+
/** @format GUID */
|
|
2006
|
+
invoiceId?: string;
|
|
2007
|
+
}
|
|
2008
|
+
export interface FixSubscriptionInvoicesResponse {
|
|
2009
|
+
invoices?: SubscriptionInvoice[];
|
|
2010
|
+
}
|
|
2011
|
+
export interface RestoreDraftSubscriptionRequest {
|
|
2012
|
+
/** @format GUID */
|
|
2013
|
+
tenantId?: string;
|
|
2014
|
+
/** @format GUID */
|
|
2015
|
+
subscriptionId?: string;
|
|
2016
|
+
}
|
|
2017
|
+
export interface RestoreDraftSubscriptionResponse {
|
|
2018
|
+
subscription?: Subscription;
|
|
2019
|
+
}
|
|
2020
|
+
export interface DeleteDraftSubscriptionRequest {
|
|
2021
|
+
/** @format GUID */
|
|
2022
|
+
tenantId?: string;
|
|
2023
|
+
/** @format GUID */
|
|
2024
|
+
subscriptionId?: string;
|
|
2025
|
+
}
|
|
2026
|
+
export interface DeleteDraftSubscriptionResponse {
|
|
2027
|
+
subscription?: Subscription;
|
|
2028
|
+
}
|
|
2029
|
+
export interface DeleteSubscriptionBORequest {
|
|
2030
|
+
/** @format GUID */
|
|
2031
|
+
tenantId?: string;
|
|
2032
|
+
/** @format GUID */
|
|
2033
|
+
subscriptionId?: string;
|
|
2034
|
+
}
|
|
2035
|
+
export interface DeleteSubscriptionBOResponse {
|
|
2036
|
+
subscription?: Subscription;
|
|
2037
|
+
}
|
|
2038
|
+
export interface CancelSubscriptionBORequest {
|
|
2039
|
+
/** @format GUID */
|
|
2040
|
+
tenantId?: string;
|
|
2041
|
+
/** @format GUID */
|
|
2042
|
+
subscriptionId?: string;
|
|
2043
|
+
initiator?: ActionInitiator;
|
|
2044
|
+
reason?: string | null;
|
|
2045
|
+
}
|
|
2046
|
+
export declare enum ActionInitiator {
|
|
2047
|
+
UNDEFINED = "UNDEFINED",
|
|
2048
|
+
BUSINESS = "BUSINESS",
|
|
2049
|
+
CUSTOMER = "CUSTOMER",
|
|
2050
|
+
SYSTEM = "SYSTEM"
|
|
2051
|
+
}
|
|
2052
|
+
export interface CancelSubscriptionBOResponse {
|
|
2053
|
+
subscription?: Subscription;
|
|
2054
|
+
}
|
|
2055
|
+
export interface UpdatePaymentMethodBORequest {
|
|
2056
|
+
/** @format GUID */
|
|
2057
|
+
tenantId?: string;
|
|
2058
|
+
/** @format GUID */
|
|
2059
|
+
subscriptionId?: string;
|
|
2060
|
+
/** @format GUID */
|
|
2061
|
+
paymentMethodId?: string;
|
|
2062
|
+
}
|
|
2063
|
+
export interface UpdatePaymentMethodBOResponse {
|
|
2064
|
+
subscription?: Subscription;
|
|
2065
|
+
}
|
|
2066
|
+
export interface SendSubscriptionActionEventBORequest extends SendSubscriptionActionEventBORequestEventOneOf {
|
|
2067
|
+
billingCycleStarted?: SubscriptionBillingCycleStarted;
|
|
2068
|
+
/** @format GUID */
|
|
2069
|
+
tenantId?: string;
|
|
2070
|
+
/** @format GUID */
|
|
2071
|
+
subscriptionId?: string;
|
|
2072
|
+
}
|
|
2073
|
+
/** @oneof */
|
|
2074
|
+
export interface SendSubscriptionActionEventBORequestEventOneOf {
|
|
2075
|
+
billingCycleStarted?: SubscriptionBillingCycleStarted;
|
|
2076
|
+
}
|
|
2077
|
+
export interface SubscriptionBillingCycleStarted {
|
|
2078
|
+
subscription?: Subscription;
|
|
2079
|
+
/**
|
|
2080
|
+
* Wix Pay transaction id, optional. Exists if event was triggered by a payment.
|
|
2081
|
+
* @format GUID
|
|
2082
|
+
*/
|
|
2083
|
+
paymentTransactionId?: string | null;
|
|
2084
|
+
}
|
|
2085
|
+
export interface SendSubscriptionActionEventResponse {
|
|
2086
|
+
}
|
|
2087
|
+
export interface HandleSubscriptionAfterInvoiceMarkedAsPaidRequest {
|
|
2088
|
+
/** @format GUID */
|
|
2089
|
+
tenantId?: string;
|
|
2090
|
+
/** @format GUID */
|
|
2091
|
+
subscriptionId?: string;
|
|
2092
|
+
transactionId?: string;
|
|
2093
|
+
}
|
|
2094
|
+
export interface PauseSubscriptionBORequest {
|
|
2095
|
+
/** @format GUID */
|
|
2096
|
+
tenantId?: string;
|
|
2097
|
+
/** @format GUID */
|
|
2098
|
+
subscriptionId?: string;
|
|
2099
|
+
pausePolicy?: PausePolicy;
|
|
2100
|
+
pauseAt?: PauseAt;
|
|
2101
|
+
initiator?: ActionInitiator;
|
|
2102
|
+
/** @maxLength 500 */
|
|
2103
|
+
reason?: string | null;
|
|
2104
|
+
}
|
|
2105
|
+
export interface PauseSubscriptionBOResponse {
|
|
2106
|
+
subscription?: Subscription;
|
|
2107
|
+
}
|
|
2108
|
+
export interface SetIsMigratedEvent {
|
|
2109
|
+
/** @format GUID */
|
|
2110
|
+
subscriptionId?: string;
|
|
2111
|
+
}
|
|
2112
|
+
export interface SubscriptionDelayedSyncEvent {
|
|
2113
|
+
/** @format GUID */
|
|
2114
|
+
subscriptionId?: string;
|
|
2115
|
+
}
|
|
2116
|
+
export interface InvoiceAction extends InvoiceActionActionTypeOneOf {
|
|
2117
|
+
payRecurring?: PayRecurringInvoice;
|
|
2118
|
+
}
|
|
2119
|
+
/** @oneof */
|
|
2120
|
+
export interface InvoiceActionActionTypeOneOf {
|
|
2121
|
+
payRecurring?: PayRecurringInvoice;
|
|
2122
|
+
}
|
|
2123
|
+
export interface PayRecurringInvoice {
|
|
2124
|
+
/** @format GUID */
|
|
2125
|
+
invoiceId?: string;
|
|
2126
|
+
}
|
|
2127
|
+
/**
|
|
2128
|
+
* Sent each time a subscription status has been set to Active
|
|
2129
|
+
* Active shows that a subscription is live and operational.
|
|
2130
|
+
* For example:
|
|
2131
|
+
* * For subscription with free trial, free trial start date is also the activation date.
|
|
2132
|
+
* * For a subscription with future start date, the start date is also the activation date.
|
|
2133
|
+
* * When a subscription is resumed from a pause status, the resume date is also the activation date.
|
|
2134
|
+
*/
|
|
2135
|
+
export interface SubscriptionActivated {
|
|
2136
|
+
subscription?: Subscription;
|
|
2137
|
+
}
|
|
2138
|
+
/**
|
|
2139
|
+
* Sent each time a subscription status has been set to Ended
|
|
2140
|
+
* Ended shows that a subscription reached its end date and ended its life cycle as a result of the agreement.
|
|
2141
|
+
* This is different from a Canceled subscription which ends the subscription before a designated end date.
|
|
2142
|
+
* Therefore, Ended and Canceled are mutually exclusive.
|
|
2143
|
+
*/
|
|
2144
|
+
export interface SubscriptionEnded {
|
|
2145
|
+
subscription?: Subscription;
|
|
2146
|
+
}
|
|
2147
|
+
export interface SubscriptionInitialPurchaseCompleted {
|
|
2148
|
+
subscription?: Subscription;
|
|
2149
|
+
actionDetails?: ActionDetails;
|
|
2150
|
+
/** @format GUID */
|
|
2151
|
+
paymentTransactionId?: string | null;
|
|
2152
|
+
}
|
|
2153
|
+
export interface SubscriptionCycleReadyToPay {
|
|
2154
|
+
subscription?: Subscription;
|
|
2155
|
+
}
|
|
2156
|
+
export interface SubscriptionRevived {
|
|
2157
|
+
subscription?: Subscription;
|
|
2158
|
+
}
|
|
2159
|
+
export interface CreateSubscriptionResponse {
|
|
2160
|
+
subscription?: Subscription;
|
|
2161
|
+
/**
|
|
2162
|
+
* Payments order that should be paid (or authorize card) in order to activate subscription. Empty for free subscriptions.
|
|
2163
|
+
* @format GUID
|
|
2164
|
+
*/
|
|
2165
|
+
paymentOrderId?: string | null;
|
|
2166
|
+
}
|
|
2167
|
+
export interface UpdateSubscriptionRequest {
|
|
2168
|
+
/** Revision is validated if Subscription.revision is set */
|
|
2169
|
+
subscription?: Subscription;
|
|
2170
|
+
/**
|
|
2171
|
+
* Supported field: start_date
|
|
2172
|
+
* Can be updated only if Subscription is in Draft state
|
|
2173
|
+
*/
|
|
2174
|
+
fieldMask?: string[];
|
|
2175
|
+
}
|
|
2176
|
+
export interface UpdateSubscriptionResponse {
|
|
2177
|
+
subscription?: Subscription;
|
|
2178
|
+
}
|
|
2179
|
+
export interface UpdateSubscriptionStartDateRequest {
|
|
2180
|
+
/**
|
|
2181
|
+
* Subscription ID
|
|
2182
|
+
* @format GUID
|
|
2183
|
+
*/
|
|
2184
|
+
_id?: string;
|
|
2185
|
+
/**
|
|
2186
|
+
* Can be updated only if Subscription is in Draft state
|
|
2187
|
+
* By setting start_date in the future, end_date will be recalculated for termed Subscriptions
|
|
2188
|
+
* cycles_to_pay_on_creation will be set to 1 if no free trial is set
|
|
2189
|
+
*/
|
|
2190
|
+
startDate?: Date | null;
|
|
2191
|
+
}
|
|
2192
|
+
export interface UpdateSubscriptionStartDateResponse {
|
|
2193
|
+
subscription?: Subscription;
|
|
2194
|
+
}
|
|
2195
|
+
export interface UpdateSubscriptionPoliciesRequest {
|
|
2196
|
+
/**
|
|
2197
|
+
* Subscription ID
|
|
2198
|
+
* @format GUID
|
|
2199
|
+
*/
|
|
2200
|
+
_id?: string;
|
|
2201
|
+
cancellableByCustomer?: boolean | null;
|
|
2202
|
+
}
|
|
2203
|
+
export interface UpdateSubscriptionPoliciesResponse {
|
|
2204
|
+
/** Updated policies of the subscription */
|
|
2205
|
+
policies?: SubscriptionPolicies;
|
|
2206
|
+
}
|
|
2207
|
+
export interface UpdateSubscriptionBillingDateRequest {
|
|
2208
|
+
/**
|
|
2209
|
+
* ID of the subscription to update the billing date for.
|
|
2210
|
+
* @format GUID
|
|
2211
|
+
*/
|
|
2212
|
+
_id: string;
|
|
2213
|
+
/** New billing date in `YYYY-MM-DDThh:mm:ss:sssZ` format. */
|
|
2214
|
+
billingDate: Date | null;
|
|
2215
|
+
/**
|
|
2216
|
+
* Information about how BASS adjusts the total of the next invoice. Extending
|
|
2217
|
+
* the current billing cycle results in a higher payment, while shortening it
|
|
2218
|
+
* leads to a lower payment. BASS offers automatic calculation of the proration
|
|
2219
|
+
* amount based on the number of days added to or removed from the current billing
|
|
2220
|
+
* cycle. Alternatively, you can use your own custom method to calculate the
|
|
2221
|
+
* proration amount. The custom proration amount can't exceed the total of the
|
|
2222
|
+
* current billing cycle.
|
|
2223
|
+
*/
|
|
2224
|
+
proration?: Proration;
|
|
2225
|
+
}
|
|
2226
|
+
export interface UpdateSubscriptionBillingDateResponse {
|
|
2227
|
+
/** Updated subscription. */
|
|
2228
|
+
subscription?: Subscription;
|
|
2229
|
+
}
|
|
2230
|
+
export interface SubscriptionBillingDateUpdated {
|
|
2231
|
+
subscription?: Subscription;
|
|
2232
|
+
billingDate?: Date | null;
|
|
2233
|
+
proration?: Proration;
|
|
2234
|
+
}
|
|
2235
|
+
export interface UpdateSubscriptionOriginRequest {
|
|
2236
|
+
/**
|
|
2237
|
+
* ID of the subscription to update origin.
|
|
2238
|
+
* @format GUID
|
|
2239
|
+
*/
|
|
2240
|
+
_id?: string;
|
|
2241
|
+
/**
|
|
2242
|
+
* Origin entity ID of the subscription to update.
|
|
2243
|
+
* @format GUID
|
|
2244
|
+
*/
|
|
2245
|
+
entityId?: string;
|
|
2246
|
+
}
|
|
2247
|
+
export interface UpdateSubscriptionOriginResponse {
|
|
2248
|
+
/** Updated subscription. */
|
|
2249
|
+
subscription?: Subscription;
|
|
2250
|
+
}
|
|
2251
|
+
export interface ReviseSubscriptionRequest {
|
|
2252
|
+
/**
|
|
2253
|
+
* Subscription ID
|
|
2254
|
+
* @format GUID
|
|
2255
|
+
*/
|
|
2256
|
+
_id?: string;
|
|
2257
|
+
/**
|
|
2258
|
+
* 0 for no revision, maxSize is 100
|
|
2259
|
+
* @maxSize 100
|
|
2260
|
+
*/
|
|
2261
|
+
items?: Item[];
|
|
2262
|
+
}
|
|
2263
|
+
export interface ReviseSubscriptionResponse {
|
|
2264
|
+
subscription?: Subscription;
|
|
2265
|
+
}
|
|
2266
|
+
export interface UpdateSubscriptionItemsRequest {
|
|
2267
|
+
/**
|
|
2268
|
+
* Subscription ID
|
|
2269
|
+
* @format GUID
|
|
2270
|
+
*/
|
|
2271
|
+
_id?: string;
|
|
2272
|
+
/** Update action. For RESET_PENDING_UPDATES, nothing but the subscription ID should be defined in the request. */
|
|
2273
|
+
updateAction?: UpdateAction;
|
|
2274
|
+
/** Updates execution date. Relevant only for UpdateAction.SPECIFIC_DATE. Only specific date is supported. */
|
|
2275
|
+
scheduleAdditionalInfo?: ScheduleAdditionalInfo;
|
|
2276
|
+
/**
|
|
2277
|
+
* Existing items to update
|
|
2278
|
+
* @maxSize 100
|
|
2279
|
+
*/
|
|
2280
|
+
itemsToUpdate?: ItemChange[];
|
|
2281
|
+
/**
|
|
2282
|
+
* Items to add
|
|
2283
|
+
* @maxSize 99
|
|
2284
|
+
*/
|
|
2285
|
+
itemsToAdd?: Item[];
|
|
2286
|
+
/**
|
|
2287
|
+
* Existing items to delete
|
|
2288
|
+
* @format GUID
|
|
2289
|
+
* @maxSize 99
|
|
2290
|
+
*/
|
|
2291
|
+
itemsToDelete?: string[] | null;
|
|
2292
|
+
}
|
|
2293
|
+
export declare enum UpdateAction {
|
|
2294
|
+
NONE = "NONE",
|
|
2295
|
+
/** Update subscription immediately, please note proration for updates changing price are not yet supported */
|
|
2296
|
+
IMMEDIATELY = "IMMEDIATELY",
|
|
2297
|
+
/** Request updates that will take affect only at the start of the next billing cycle. */
|
|
2298
|
+
NEXT_BILLING_CYCLE = "NEXT_BILLING_CYCLE",
|
|
2299
|
+
/** Reset all pending updates */
|
|
2300
|
+
RESET_PENDING_UPDATES = "RESET_PENDING_UPDATES",
|
|
2301
|
+
/** Request updates that will take affect only at a specific date. */
|
|
2302
|
+
SPECIFIC_DATE = "SPECIFIC_DATE"
|
|
2303
|
+
}
|
|
2304
|
+
export interface ScheduleAdditionalInfo extends ScheduleAdditionalInfoParamOneOf {
|
|
2305
|
+
/**
|
|
2306
|
+
* Future date when the update becomes effective in `YYYY-MM-DDThh:mm:ss.sssZ`
|
|
2307
|
+
* format. The use of this field may be restricted in various BASS endpoints.
|
|
2308
|
+
* For example, in _Bulk Update Subscription Items_ it's only available in
|
|
2309
|
+
* combination with `{"updateAction": "SPECIFIC_DATE"}`, in _Resume Subscription_
|
|
2310
|
+
* only in combination with `{"resumeAt": "SPECIFIC_DATE"}`, and in
|
|
2311
|
+
* _Pause Subscription_ only in combination with `{"pauseAt": "SPECIFIC_DATE"}`.
|
|
2312
|
+
*/
|
|
2313
|
+
specificDate?: Date | null;
|
|
2314
|
+
/**
|
|
2315
|
+
* When the update becomes effective, as number of billing cycles from now.
|
|
2316
|
+
* The use of this field may be restricted in various BASS endpoints.
|
|
2317
|
+
* For example, in _Pause Subscription_ it's only available in
|
|
2318
|
+
* combination with `{"pauseAt": "NUMBER_OF_CYCLES_FROM_TODAY"}`.
|
|
2319
|
+
* __Note__: Currently not supported in _Bulk Update Subscription Items by Filter_.
|
|
2320
|
+
* @min 1
|
|
2321
|
+
*/
|
|
2322
|
+
numberOfCycles?: number;
|
|
2323
|
+
}
|
|
2324
|
+
/** @oneof */
|
|
2325
|
+
export interface ScheduleAdditionalInfoParamOneOf {
|
|
2326
|
+
/**
|
|
2327
|
+
* Future date when the update becomes effective in `YYYY-MM-DDThh:mm:ss.sssZ`
|
|
2328
|
+
* format. The use of this field may be restricted in various BASS endpoints.
|
|
2329
|
+
* For example, in _Bulk Update Subscription Items_ it's only available in
|
|
2330
|
+
* combination with `{"updateAction": "SPECIFIC_DATE"}`, in _Resume Subscription_
|
|
2331
|
+
* only in combination with `{"resumeAt": "SPECIFIC_DATE"}`, and in
|
|
2332
|
+
* _Pause Subscription_ only in combination with `{"pauseAt": "SPECIFIC_DATE"}`.
|
|
2333
|
+
*/
|
|
2334
|
+
specificDate?: Date | null;
|
|
2335
|
+
/**
|
|
2336
|
+
* When the update becomes effective, as number of billing cycles from now.
|
|
2337
|
+
* The use of this field may be restricted in various BASS endpoints.
|
|
2338
|
+
* For example, in _Pause Subscription_ it's only available in
|
|
2339
|
+
* combination with `{"pauseAt": "NUMBER_OF_CYCLES_FROM_TODAY"}`.
|
|
2340
|
+
* __Note__: Currently not supported in _Bulk Update Subscription Items by Filter_.
|
|
2341
|
+
* @min 1
|
|
2342
|
+
*/
|
|
2343
|
+
numberOfCycles?: number;
|
|
2344
|
+
}
|
|
2345
|
+
export interface UpdateSubscriptionItemsResponse {
|
|
2346
|
+
subscription?: Subscription;
|
|
2347
|
+
}
|
|
2348
|
+
export interface BulkUpdateSubscriptionItemsByFilterRequest {
|
|
2349
|
+
/**
|
|
2350
|
+
* Filter to identify the subscriptions for which items are updated. For
|
|
2351
|
+
* supported fields see
|
|
2352
|
+
* [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).
|
|
2353
|
+
* Sending an empty subscription filter results in a validation error.
|
|
2354
|
+
* In case you pass `{"updateAction": "RESET_PENDING_UPDATES"}`, use only the
|
|
2355
|
+
* `subscriptionId` field inside this filter. Passing any other filter results
|
|
2356
|
+
* in a failed validation error.
|
|
2357
|
+
*/
|
|
2358
|
+
subscriptionFilter?: Record<string, any> | null;
|
|
2359
|
+
/**
|
|
2360
|
+
* Filter to specify which subscription items are updated. Make sure to use
|
|
2361
|
+
* the catalog item ID and not the item's unique ID. All subscription items
|
|
2362
|
+
* with matching `items.catalogReference.catalogItemId` are updated.
|
|
2363
|
+
*
|
|
2364
|
+
* Max: `100` reference catalog item IDs
|
|
2365
|
+
* @format GUID
|
|
2366
|
+
* @maxSize 100
|
|
2367
|
+
*/
|
|
2368
|
+
catalogReferenceIds?: string[] | null;
|
|
2369
|
+
/**
|
|
2370
|
+
* Information about the update timing and update type.
|
|
2371
|
+
*
|
|
2372
|
+
* + `"IMMEDIATELY"`: The updates become effective immediately.
|
|
2373
|
+
* + `"NEXT_BILLING_CYCLE"`: The updates are scheduled for the beginning of the next billing cycle.
|
|
2374
|
+
* + `"SPECIFIC_DATE"`: The updates are scheduled for the date specified in `scheduleAdditionalInfo.specificDate`.
|
|
2375
|
+
* + `"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.
|
|
2376
|
+
*/
|
|
2377
|
+
updateAction?: UpdateAction;
|
|
2378
|
+
/**
|
|
2379
|
+
* Additional information for updates. Currently, only supported for
|
|
2380
|
+
* `{"updateAction": "SPECIFIC_DATE"}`.
|
|
2381
|
+
*/
|
|
2382
|
+
scheduleAdditionalInfo?: ScheduleAdditionalInfo;
|
|
2383
|
+
/**
|
|
2384
|
+
* Update details for the susbcription items that match the filtering.
|
|
2385
|
+
* Currently, you can update only the item price, quantity, and tax. Note
|
|
2386
|
+
* that all item properties are updated to the same values. In case you want set
|
|
2387
|
+
* different values for individual items, you must call
|
|
2388
|
+
* _Bulk Update Subscription Items By Filter_ multiple times, once per unique update.
|
|
2389
|
+
*/
|
|
2390
|
+
bulkItemUpdateData?: BulkItemChange;
|
|
2391
|
+
/**
|
|
2392
|
+
* __Not implemented yet__. Items to add to the subscriptions matching the filtering.
|
|
2393
|
+
* @maxSize 99
|
|
2394
|
+
*/
|
|
2395
|
+
itemsToAdd?: Item[];
|
|
2396
|
+
}
|
|
2397
|
+
export interface BulkItemChange {
|
|
2398
|
+
/** Information about the new item price. */
|
|
2399
|
+
pricingModel?: PricingModel;
|
|
2400
|
+
/**
|
|
2401
|
+
* New item quantity.
|
|
2402
|
+
*
|
|
2403
|
+
* Min: `1`
|
|
2404
|
+
* @min 1
|
|
2405
|
+
*/
|
|
2406
|
+
quantity?: number | null;
|
|
2407
|
+
/** Information about the new item tax. */
|
|
2408
|
+
tax?: Tax;
|
|
2409
|
+
}
|
|
2410
|
+
export interface BulkUpdateSubscriptionItemsByFilterResponse {
|
|
2411
|
+
/**
|
|
2412
|
+
* ID of your bulk job. You can use
|
|
2413
|
+
* [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)
|
|
2414
|
+
* to retrieve information about the job status.
|
|
2415
|
+
*/
|
|
2416
|
+
jobId?: string;
|
|
2417
|
+
}
|
|
2418
|
+
export interface DeleteSubscriptionRequest {
|
|
2419
|
+
/** @format GUID */
|
|
2420
|
+
_id?: string;
|
|
2421
|
+
revision?: string;
|
|
2422
|
+
}
|
|
2423
|
+
export interface DeleteSubscriptionResponse {
|
|
2424
|
+
}
|
|
2425
|
+
export interface CancelSubscriptionRequest {
|
|
2426
|
+
/** @format GUID */
|
|
2427
|
+
_id: string;
|
|
2428
|
+
actionContext: ActionContext;
|
|
2429
|
+
}
|
|
2430
|
+
export interface ActionContext {
|
|
2431
|
+
initiator?: ActionInitiator;
|
|
2432
|
+
/** Optional action reason message */
|
|
2433
|
+
reason?: string | null;
|
|
2434
|
+
}
|
|
2435
|
+
export interface CancelSubscriptionResponse {
|
|
2436
|
+
subscription?: Subscription;
|
|
2437
|
+
}
|
|
2438
|
+
export interface PauseSubscriptionRequest {
|
|
2439
|
+
/** @format GUID */
|
|
2440
|
+
_id: string;
|
|
2441
|
+
pausePolicy?: PausePolicy;
|
|
2442
|
+
pauseAt?: PauseAt;
|
|
2443
|
+
/** contains additional scheduling information for certain pause_at options (for example: SPECIFIC_DATE & NUMBER_OF_CYCLES_FROM_TODAY) */
|
|
2444
|
+
pauseAtSchedule?: ScheduleAdditionalInfo;
|
|
2445
|
+
/** contains additional scheduling information for certain auto_resume_at either specific date */
|
|
2446
|
+
autoResumeAtSchedule?: ScheduleAdditionalInfo;
|
|
2447
|
+
actionContext: ActionContext;
|
|
2448
|
+
}
|
|
2449
|
+
export interface PauseSubscriptionResponse {
|
|
2450
|
+
subscription?: Subscription;
|
|
2451
|
+
}
|
|
2452
|
+
export interface SubscriptionPaused {
|
|
2453
|
+
subscription?: Subscription;
|
|
2454
|
+
pausePolicy?: PausePolicy;
|
|
2455
|
+
actionDetails?: ActionDetails;
|
|
2456
|
+
}
|
|
2457
|
+
export interface PauseSubscriptionRequested {
|
|
2458
|
+
subscription?: Subscription;
|
|
2459
|
+
pauseAt?: PauseAt;
|
|
2460
|
+
pausePolicy?: PausePolicy;
|
|
2461
|
+
actionDetails?: ActionDetails;
|
|
2462
|
+
}
|
|
2463
|
+
export interface ScheduledPauseCanceled {
|
|
2464
|
+
subscription?: Subscription;
|
|
2465
|
+
actionDetails?: ActionDetails;
|
|
2466
|
+
}
|
|
2467
|
+
export interface ResumeSubscriptionRequest {
|
|
2468
|
+
/** @format GUID */
|
|
2469
|
+
_id: string;
|
|
2470
|
+
resumeAt?: ResumeAt;
|
|
2471
|
+
/** contains additional scheduling information for certain resume_at options (for example: SPECIFIC_DATE) */
|
|
2472
|
+
resumeAtSchedule?: ScheduleAdditionalInfo;
|
|
2473
|
+
actionContext: ActionContext;
|
|
2474
|
+
}
|
|
2475
|
+
export interface ResumeSubscriptionResponse {
|
|
2476
|
+
subscription?: Subscription;
|
|
2477
|
+
}
|
|
2478
|
+
export interface SubscriptionResumed {
|
|
2479
|
+
subscription?: Subscription;
|
|
2480
|
+
actionDetails?: ActionDetails;
|
|
2481
|
+
}
|
|
2482
|
+
export interface ResumeSubscriptionRequested {
|
|
2483
|
+
subscription?: Subscription;
|
|
2484
|
+
resumeAt?: ResumeAt;
|
|
2485
|
+
actionDetails?: ActionDetails;
|
|
2486
|
+
}
|
|
2487
|
+
export interface ScheduledResumeCanceled {
|
|
2488
|
+
subscription?: Subscription;
|
|
2489
|
+
actionDetails?: ActionDetails;
|
|
2490
|
+
}
|
|
2491
|
+
export interface SearchSubscriptionsRequest extends SearchSubscriptionsRequestPagingMethodOneOf {
|
|
2492
|
+
/** Limit number of results and enable to skip rows. The default limit is 25. */
|
|
2493
|
+
paging?: Paging;
|
|
2494
|
+
/** A Cursor option for efficient paging. Pass this field from the previous search response to continue to the next page. */
|
|
2495
|
+
cursor?: CursorPaging;
|
|
2496
|
+
/** A filter object */
|
|
2497
|
+
filter?: any;
|
|
2498
|
+
/** A Sorting option by field name and order. */
|
|
2499
|
+
sorting?: SortingClauses;
|
|
2500
|
+
}
|
|
2501
|
+
/** @oneof */
|
|
2502
|
+
export interface SearchSubscriptionsRequestPagingMethodOneOf {
|
|
2503
|
+
/** Limit number of results and enable to skip rows. The default limit is 25. */
|
|
2504
|
+
paging?: Paging;
|
|
2505
|
+
/** A Cursor option for efficient paging. Pass this field from the previous search response to continue to the next page. */
|
|
2506
|
+
cursor?: CursorPaging;
|
|
2507
|
+
}
|
|
2508
|
+
export interface SortingClauses {
|
|
2509
|
+
sorting?: Sorting[];
|
|
2510
|
+
}
|
|
2511
|
+
export interface SearchSubscriptionsResponse {
|
|
2512
|
+
subscriptions?: Subscription[];
|
|
2513
|
+
cursor?: CursorPaging;
|
|
2514
|
+
}
|
|
2515
|
+
export interface TurnOnSubscriptionAutoRenewalRequest {
|
|
2516
|
+
/** @format GUID */
|
|
2517
|
+
_id: string;
|
|
2518
|
+
actionContext: ActionContext;
|
|
2519
|
+
}
|
|
2520
|
+
export interface TurnOnSubscriptionAutoRenewalResponse {
|
|
2521
|
+
subscription?: Subscription;
|
|
2522
|
+
}
|
|
2523
|
+
export interface SubscriptionAutoRenewalTurnedOn {
|
|
2524
|
+
subscription?: Subscription;
|
|
2525
|
+
actionDetails?: ActionDetails;
|
|
2526
|
+
}
|
|
2527
|
+
export interface TurnOffSubscriptionAutoRenewalRequest {
|
|
2528
|
+
/** @format GUID */
|
|
2529
|
+
_id: string;
|
|
2530
|
+
actionContext: ActionContext;
|
|
2531
|
+
}
|
|
2532
|
+
export interface TurnOffSubscriptionAutoRenewalResponse {
|
|
2533
|
+
subscription?: Subscription;
|
|
2534
|
+
}
|
|
2535
|
+
export interface SubscriptionAutoRenewalTurnedOff {
|
|
2536
|
+
subscription?: Subscription;
|
|
2537
|
+
actionDetails?: ActionDetails;
|
|
2538
|
+
}
|
|
2539
|
+
export interface MarkLatestInvoiceAsPaidRequest {
|
|
2540
|
+
/**
|
|
2541
|
+
* The ID of the offline subscription to mark as paid its latest invoice
|
|
2542
|
+
* @format GUID
|
|
2543
|
+
*/
|
|
2544
|
+
subscriptionId: string;
|
|
2545
|
+
}
|
|
2546
|
+
export interface MarkLatestInvoiceAsPaidResponse {
|
|
2547
|
+
subscription?: Subscription;
|
|
2548
|
+
}
|
|
2549
|
+
export interface LatestInvoiceMarkedAsPaid {
|
|
2550
|
+
subscription?: Subscription;
|
|
2551
|
+
}
|
|
2552
|
+
export interface MultipleSubscriptionsOnOrdersInvoice {
|
|
2553
|
+
/**
|
|
2554
|
+
* the invoice id of the affected subscription
|
|
2555
|
+
* @format GUID
|
|
2556
|
+
*/
|
|
2557
|
+
invoiceId?: string;
|
|
2558
|
+
/**
|
|
2559
|
+
* the order id of the affected subscription
|
|
2560
|
+
* @format GUID
|
|
2561
|
+
*/
|
|
2562
|
+
orderId?: string;
|
|
2563
|
+
}
|
|
2564
|
+
export interface MarkBillingCycleAsPaidRequest {
|
|
2565
|
+
/**
|
|
2566
|
+
* The ID of the subscription to mark as paid its invoice.
|
|
2567
|
+
* @format GUID
|
|
2568
|
+
*/
|
|
2569
|
+
subscriptionId: string;
|
|
2570
|
+
/**
|
|
2571
|
+
* The subscription cycle for which the invoice is to be marked as paid.
|
|
2572
|
+
* If left empty, the most recent cycle will be selected.
|
|
2573
|
+
* @min 1
|
|
2574
|
+
*/
|
|
2575
|
+
paidCycle?: number | null;
|
|
2576
|
+
}
|
|
2577
|
+
export interface MarkBillingCycleAsPaidResponse {
|
|
2578
|
+
subscription?: Subscription;
|
|
2579
|
+
}
|
|
2580
|
+
export interface GetSubscriptionsStatsRequest {
|
|
2581
|
+
}
|
|
2582
|
+
export interface GetSubscriptionsStatsResponse {
|
|
2583
|
+
amountByStatuses?: AmountByStatus[];
|
|
2584
|
+
total?: number;
|
|
2585
|
+
}
|
|
2586
|
+
export interface AmountByStatus {
|
|
2587
|
+
status?: SubscriptionStatusEnumSubscriptionStatus;
|
|
2588
|
+
amount?: number;
|
|
2589
|
+
}
|
|
2590
|
+
export interface ExtendSubscriptionRequest extends ExtendSubscriptionRequestExtendPolicyOneOf {
|
|
2591
|
+
/** User won't be charged for additional period added on top of subscription end date. */
|
|
2592
|
+
extensionPeriod?: Duration;
|
|
2593
|
+
/**
|
|
2594
|
+
* user will be charged for billing cycles added
|
|
2595
|
+
* @min 1
|
|
2596
|
+
*/
|
|
2597
|
+
extensionBillingCycles?: number;
|
|
2598
|
+
/**
|
|
2599
|
+
* The ID of the subscription to be extended
|
|
2600
|
+
* @format GUID
|
|
2601
|
+
*/
|
|
2602
|
+
_id: string;
|
|
2603
|
+
actionContext: ActionContext;
|
|
2604
|
+
}
|
|
2605
|
+
/** @oneof */
|
|
2606
|
+
export interface ExtendSubscriptionRequestExtendPolicyOneOf {
|
|
2607
|
+
/** User won't be charged for additional period added on top of subscription end date. */
|
|
2608
|
+
extensionPeriod?: Duration;
|
|
2609
|
+
/**
|
|
2610
|
+
* user will be charged for billing cycles added
|
|
2611
|
+
* @min 1
|
|
2612
|
+
*/
|
|
2613
|
+
extensionBillingCycles?: number;
|
|
2614
|
+
}
|
|
2615
|
+
export interface ExtendSubscriptionResponse {
|
|
2616
|
+
/** The now extended subscription */
|
|
2617
|
+
subscription?: Subscription;
|
|
2618
|
+
}
|
|
2619
|
+
export interface AllowedActionsRequest {
|
|
2620
|
+
/** @format GUID */
|
|
2621
|
+
_id: string;
|
|
2622
|
+
/**
|
|
2623
|
+
* List of additional fields to be included in the response.
|
|
2624
|
+
* @maxSize 1
|
|
2625
|
+
*/
|
|
2626
|
+
fields?: RequestedFields[];
|
|
2627
|
+
}
|
|
2628
|
+
export declare enum RequestedFields {
|
|
2629
|
+
UNKNOWN_REQUESTED_FIELD = "UNKNOWN_REQUESTED_FIELD",
|
|
2630
|
+
/** Include unsupported action list, including the reasons for the lack of support */
|
|
2631
|
+
UNSUPPORTED_ACTION = "UNSUPPORTED_ACTION"
|
|
2632
|
+
}
|
|
2633
|
+
export interface AllowedActionsResponse {
|
|
2634
|
+
/** List of actions that are allowed. */
|
|
2635
|
+
actions?: Action[];
|
|
2636
|
+
/**
|
|
2637
|
+
* List of actions that are not supported, included only if requested. Provides reasons for each unsupported action.
|
|
2638
|
+
* @maxSize 20
|
|
2639
|
+
*/
|
|
2640
|
+
unsupportedActions?: UnsupportedAction[];
|
|
2641
|
+
}
|
|
2642
|
+
export interface UnsupportedAction {
|
|
2643
|
+
actionType?: ActionType;
|
|
2644
|
+
/**
|
|
2645
|
+
* Provides detailed reasons for the unsupported action. Each `UnsupportedReason` includes a code and a message explaining why the action is not allowed.
|
|
2646
|
+
* @maxSize 20
|
|
2647
|
+
*/
|
|
2648
|
+
reasons?: UnsupportedReason[];
|
|
2649
|
+
}
|
|
2650
|
+
export interface UnsupportedReason {
|
|
2651
|
+
code?: string;
|
|
2652
|
+
description?: string | null;
|
|
2653
|
+
}
|
|
2654
|
+
export interface ListUpcomingChargesRequest {
|
|
2655
|
+
/**
|
|
2656
|
+
* Subscription id charges to be previewed for
|
|
2657
|
+
* @format GUID
|
|
2658
|
+
*/
|
|
2659
|
+
subscriptionId: string;
|
|
2660
|
+
/** Period of time to provide charged for. If not provided,then only next charge will be returned. */
|
|
2661
|
+
customDuration?: Duration;
|
|
2662
|
+
/**
|
|
2663
|
+
* Date of the next billing cycle so that the upcoming charges will be calculated accordingly.
|
|
2664
|
+
* If not provided, the upcoming charges will be calculated according to the existing next billing date.
|
|
2665
|
+
*/
|
|
2666
|
+
nextBillingDate?: Date | null;
|
|
2667
|
+
}
|
|
2668
|
+
export interface ListUpcomingChargesResponse {
|
|
2669
|
+
upcomingCharges?: SubscriptionCharge[];
|
|
2670
|
+
}
|
|
2671
|
+
export interface PreviewSubscriptionChargesRequest extends PreviewSubscriptionChargesRequestSubscriptionOneOf {
|
|
2672
|
+
/** Information about a non-existing subscription. */
|
|
2673
|
+
subscriptionInfo?: SubscriptionInfo;
|
|
2674
|
+
}
|
|
2675
|
+
/** @oneof */
|
|
2676
|
+
export interface PreviewSubscriptionChargesRequestSubscriptionOneOf {
|
|
2677
|
+
/** Information about a non-existing subscription. */
|
|
2678
|
+
subscriptionInfo?: SubscriptionInfo;
|
|
2679
|
+
}
|
|
2680
|
+
/** Subscription information to use for calculating the preview of charges for a subscription. */
|
|
2681
|
+
export interface SubscriptionInfo {
|
|
2682
|
+
billingSettings?: BillingSettings;
|
|
2683
|
+
items?: Item[];
|
|
2684
|
+
startDate?: Date | null;
|
|
2685
|
+
}
|
|
2686
|
+
export interface PreviewSubscriptionChargesResponse {
|
|
2687
|
+
/** Charges for subscription. */
|
|
2688
|
+
charges?: Charge[];
|
|
2689
|
+
}
|
|
2690
|
+
/** Represents a charge applicable to a subscription. */
|
|
2691
|
+
export interface Charge {
|
|
2154
2692
|
/** The cycle number from which the charge starts. */
|
|
2155
2693
|
cycleFrom?: number;
|
|
2156
2694
|
/** The number of cycles for which the charge is applicable. */
|
|
@@ -2161,7 +2699,11 @@ export interface Charge {
|
|
|
2161
2699
|
cycleBillingDate?: Date | null;
|
|
2162
2700
|
}
|
|
2163
2701
|
export interface PreviewSubscriptionsChargesRequest {
|
|
2164
|
-
/**
|
|
2702
|
+
/**
|
|
2703
|
+
* Information required to calculate the preview charges for the subscriptions, including an identifier.
|
|
2704
|
+
* @minSize 1
|
|
2705
|
+
* @maxSize 10
|
|
2706
|
+
*/
|
|
2165
2707
|
subscriptionsBillingDetails?: SubscriptionBillingDetails[];
|
|
2166
2708
|
/**
|
|
2167
2709
|
* Specifies the number of upcoming billing charges to preview for all subscriptions in the order.
|
|
@@ -2174,15 +2716,24 @@ export interface PreviewSubscriptionsChargesRequest {
|
|
|
2174
2716
|
* in this case, charges for cycle 1 through 3.
|
|
2175
2717
|
* If there is a single charge for a subscription, meaning that subscription price remains consistent across all cycles,
|
|
2176
2718
|
* then even if future_charges_count is set, it will be ignored and the only charge this subscription has will be returned.
|
|
2719
|
+
* @min 1
|
|
2720
|
+
* @max 10
|
|
2177
2721
|
*/
|
|
2178
2722
|
numberOfNextRecurringCharges?: number | null;
|
|
2179
2723
|
}
|
|
2180
2724
|
export interface SubscriptionBillingDetails {
|
|
2181
|
-
/**
|
|
2725
|
+
/**
|
|
2726
|
+
* External identifier of the subscription
|
|
2727
|
+
* @format GUID
|
|
2728
|
+
*/
|
|
2182
2729
|
externalId?: string | null;
|
|
2183
2730
|
/** Billing details parameters including schedule, currency, etc. */
|
|
2184
2731
|
billingSettings?: BillingSettings;
|
|
2185
|
-
/**
|
|
2732
|
+
/**
|
|
2733
|
+
* Items, minSize is 1, maxSize is 100
|
|
2734
|
+
* @minSize 1
|
|
2735
|
+
* @maxSize 100
|
|
2736
|
+
*/
|
|
2186
2737
|
items?: Item[];
|
|
2187
2738
|
/** Subscription start date, now if not set */
|
|
2188
2739
|
startDate?: Date | null;
|
|
@@ -2194,7 +2745,10 @@ export interface PreviewSubscriptionsChargesResponse {
|
|
|
2194
2745
|
subscriptionsCharges?: SubscriptionCharges[];
|
|
2195
2746
|
}
|
|
2196
2747
|
export interface SubscriptionCharges {
|
|
2197
|
-
/**
|
|
2748
|
+
/**
|
|
2749
|
+
* External identifier of the subscription
|
|
2750
|
+
* @format GUID
|
|
2751
|
+
*/
|
|
2198
2752
|
externalId?: string | null;
|
|
2199
2753
|
/** Charges for subscription. */
|
|
2200
2754
|
charges?: Charge[];
|
|
@@ -2202,7 +2756,10 @@ export interface SubscriptionCharges {
|
|
|
2202
2756
|
export interface CreateSubscriptionForOrderRequest {
|
|
2203
2757
|
/** Subscription needs to be created */
|
|
2204
2758
|
subscription?: Subscription;
|
|
2205
|
-
/**
|
|
2759
|
+
/**
|
|
2760
|
+
* Optional unique identifier for this request in order to prevent subscription duplications
|
|
2761
|
+
* @format GUID
|
|
2762
|
+
*/
|
|
2206
2763
|
idempotencyKey?: string | null;
|
|
2207
2764
|
}
|
|
2208
2765
|
export interface CreateSubscriptionForOrderResponse {
|
|
@@ -2215,6 +2772,7 @@ export interface CreateSubscriptionForOrderResponse {
|
|
|
2215
2772
|
export interface Invoice {
|
|
2216
2773
|
/**
|
|
2217
2774
|
* Invoice ID.
|
|
2775
|
+
* @format GUID
|
|
2218
2776
|
* @readonly
|
|
2219
2777
|
*/
|
|
2220
2778
|
_id?: string | null;
|
|
@@ -2254,6 +2812,7 @@ export interface Invoice {
|
|
|
2254
2812
|
/**
|
|
2255
2813
|
* 3-letter currency code of the invoice in
|
|
2256
2814
|
* [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
|
|
2815
|
+
* @format CURRENCY
|
|
2257
2816
|
*/
|
|
2258
2817
|
currency?: string;
|
|
2259
2818
|
/** Information about the customer. */
|
|
@@ -2272,11 +2831,13 @@ export interface Invoice {
|
|
|
2272
2831
|
* [payment method](https://bo.wix.com/wix-docs/rest/wix-cashier/settings/payment-method-type/payment-method-type-object).
|
|
2273
2832
|
* Not available for the first payment of a subscription and all offline
|
|
2274
2833
|
* payments.
|
|
2834
|
+
* @format GUID
|
|
2275
2835
|
*/
|
|
2276
2836
|
paymentMethodId?: string | null;
|
|
2277
2837
|
/**
|
|
2278
2838
|
* Cashier [Order ID](https://dev.wix.com/docs/rest/payments/wix-cashier/pay/order#order-object)
|
|
2279
2839
|
* for the corresponding payment.
|
|
2840
|
+
* @format GUID
|
|
2280
2841
|
* @readonly
|
|
2281
2842
|
*/
|
|
2282
2843
|
paymentOrderId?: string | null;
|
|
@@ -2286,7 +2847,10 @@ export interface Invoice {
|
|
|
2286
2847
|
billingAddress?: FullAddressDetails;
|
|
2287
2848
|
/** Shipping address. Available only for `"PHYSICAL"` line items. */
|
|
2288
2849
|
shippingAddress?: FullAddressDetails;
|
|
2289
|
-
/**
|
|
2850
|
+
/**
|
|
2851
|
+
* Shipping fee in `0.00` format.
|
|
2852
|
+
* @format DECIMAL_VALUE
|
|
2853
|
+
*/
|
|
2290
2854
|
shippingFee?: string | null;
|
|
2291
2855
|
/**
|
|
2292
2856
|
* Information about the invoice's totals.
|
|
@@ -2310,6 +2874,7 @@ export interface Invoice {
|
|
|
2310
2874
|
adjustments?: PriceAdjustment[];
|
|
2311
2875
|
/**
|
|
2312
2876
|
* Invoice Number.
|
|
2877
|
+
* @maxLength 10
|
|
2313
2878
|
* @readonly
|
|
2314
2879
|
*/
|
|
2315
2880
|
invoiceNumber?: string | null;
|
|
@@ -2323,23 +2888,29 @@ export interface Invoice {
|
|
|
2323
2888
|
taxData?: TaxData;
|
|
2324
2889
|
/** Business address. */
|
|
2325
2890
|
businessAddress?: Address;
|
|
2326
|
-
/**
|
|
2891
|
+
/**
|
|
2892
|
+
* ID of the billing order that created this invoice.
|
|
2893
|
+
* @format GUID
|
|
2894
|
+
*/
|
|
2327
2895
|
orderId?: string | null;
|
|
2328
2896
|
}
|
|
2329
2897
|
export interface BusinessOriginData {
|
|
2330
2898
|
/**
|
|
2331
2899
|
* ID of the app for which BASS has created the invoice. For example,
|
|
2332
2900
|
* `"1380b703-ce81-ff05-f115-39571d94dfcd"` for the Wix eCommerce app.
|
|
2901
|
+
* @format GUID
|
|
2333
2902
|
*/
|
|
2334
2903
|
appId?: string;
|
|
2335
2904
|
/**
|
|
2336
2905
|
* [Instance ID](https://dev.wix.com/api/rest/app-management/apps/app-instance/get-app-instance)
|
|
2337
2906
|
* of the app for which BASS has created the invoice.
|
|
2907
|
+
* @format GUID
|
|
2338
2908
|
*/
|
|
2339
2909
|
instanceId?: string;
|
|
2340
2910
|
/**
|
|
2341
2911
|
* ID of the entity that triggered the invoice creation. For example, the ID of a
|
|
2342
2912
|
* [pricing plan](https://dev.wix.com/docs/rest/payments/pricing-plans/pricing-plans/plan#plan-object).
|
|
2913
|
+
* @format GUID
|
|
2343
2914
|
*/
|
|
2344
2915
|
entityId?: string;
|
|
2345
2916
|
}
|
|
@@ -2365,6 +2936,7 @@ export declare enum CreationMode {
|
|
|
2365
2936
|
export interface LatestPaymentAttempt {
|
|
2366
2937
|
/**
|
|
2367
2938
|
* ID of the latest payment attempt.
|
|
2939
|
+
* @format GUID
|
|
2368
2940
|
* @readonly
|
|
2369
2941
|
*/
|
|
2370
2942
|
paymentAttemptId?: string;
|
|
@@ -2422,6 +2994,7 @@ export interface PriceAdjustmentValue extends PriceAdjustmentValueAdjustmentValu
|
|
|
2422
2994
|
* Absolute amount that adjusts the price.
|
|
2423
2995
|
*
|
|
2424
2996
|
* Min: `0.01`
|
|
2997
|
+
* @decimalValue options { gt:0.00 }
|
|
2425
2998
|
*/
|
|
2426
2999
|
amount?: string;
|
|
2427
3000
|
/**
|
|
@@ -2433,6 +3006,7 @@ export interface PriceAdjustmentValue extends PriceAdjustmentValueAdjustmentValu
|
|
|
2433
3006
|
*
|
|
2434
3007
|
* Min: `0.01`
|
|
2435
3008
|
* Max: `1.00`
|
|
3009
|
+
* @decimalValue options { gt:0.00, lte:1 }
|
|
2436
3010
|
*/
|
|
2437
3011
|
multiplier?: string;
|
|
2438
3012
|
}
|
|
@@ -2442,6 +3016,7 @@ export interface PriceAdjustmentValueAdjustmentValueTypeOneOf {
|
|
|
2442
3016
|
* Absolute amount that adjusts the price.
|
|
2443
3017
|
*
|
|
2444
3018
|
* Min: `0.01`
|
|
3019
|
+
* @decimalValue options { gt:0.00 }
|
|
2445
3020
|
*/
|
|
2446
3021
|
amount?: string;
|
|
2447
3022
|
/**
|
|
@@ -2453,6 +3028,7 @@ export interface PriceAdjustmentValueAdjustmentValueTypeOneOf {
|
|
|
2453
3028
|
*
|
|
2454
3029
|
* Min: `0.01`
|
|
2455
3030
|
* Max: `1.00`
|
|
3031
|
+
* @decimalValue options { gt:0.00, lte:1 }
|
|
2456
3032
|
*/
|
|
2457
3033
|
multiplier?: string;
|
|
2458
3034
|
}
|
|
@@ -2461,6 +3037,7 @@ export interface InvoiceShippingCharges {
|
|
|
2461
3037
|
* Amount of the shipping fee in `0.00` format.
|
|
2462
3038
|
*
|
|
2463
3039
|
* Min: `0.01`
|
|
3040
|
+
* @decimalValue options { gte:0.00, maxScale:2 }
|
|
2464
3041
|
*/
|
|
2465
3042
|
amount?: string;
|
|
2466
3043
|
/** Tax of the shipping fee */
|
|
@@ -2475,23 +3052,45 @@ export interface TaxData {
|
|
|
2475
3052
|
taxSummary?: TaxSummary;
|
|
2476
3053
|
}
|
|
2477
3054
|
export interface TaxSummary {
|
|
2478
|
-
/**
|
|
3055
|
+
/**
|
|
3056
|
+
* Aggregated from tax_breakdowns with exemptions excluded from amount
|
|
3057
|
+
* @format DECIMAL_VALUE
|
|
3058
|
+
*/
|
|
2479
3059
|
aggregatedTaxAmount?: string;
|
|
2480
|
-
/**
|
|
3060
|
+
/**
|
|
3061
|
+
* Array of each tax applied, grouped by `"jurisdiction"`, `"jurisdiction_type"`, `"tax_type"`, `"tax_name"` and `"tax_rate"`.
|
|
3062
|
+
* @maxSize 50
|
|
3063
|
+
*/
|
|
2481
3064
|
aggregatedTaxBreakdowns?: AggregatedTaxBreakdown[];
|
|
2482
3065
|
}
|
|
2483
3066
|
export interface AggregatedTaxBreakdown {
|
|
2484
|
-
/**
|
|
3067
|
+
/**
|
|
3068
|
+
* Name of the tax that was calculated.
|
|
3069
|
+
* @maxLength 200
|
|
3070
|
+
*/
|
|
2485
3071
|
taxName?: string;
|
|
2486
|
-
/**
|
|
3072
|
+
/**
|
|
3073
|
+
* Type of tax that was calculated.
|
|
3074
|
+
* @maxLength 200
|
|
3075
|
+
*/
|
|
2487
3076
|
taxType?: string;
|
|
2488
|
-
/**
|
|
3077
|
+
/**
|
|
3078
|
+
* Jurisdiction that taxes were calculated for.
|
|
3079
|
+
* @maxLength 200
|
|
3080
|
+
*/
|
|
2489
3081
|
jurisdiction?: string;
|
|
2490
3082
|
/** Type of jurisdiction that taxes were calculated for. */
|
|
2491
3083
|
jurisdictionType?: string;
|
|
2492
|
-
/**
|
|
3084
|
+
/**
|
|
3085
|
+
* Tax rate used for this jurisdiction, as a decimal. For example, 10% tax is `"0.1000"` and 200% tax is `"2.0000"`.
|
|
3086
|
+
* @decimalValue options { gte:0, maxScale:6 }
|
|
3087
|
+
*/
|
|
2493
3088
|
rate?: string;
|
|
2494
|
-
/**
|
|
3089
|
+
/**
|
|
3090
|
+
* Total amount of this tax for this jurisdiction.
|
|
3091
|
+
* @format DECIMAL_VALUE
|
|
3092
|
+
* @decimalValue options { maxScale:4 }
|
|
3093
|
+
*/
|
|
2495
3094
|
aggregatedTaxAmount?: string;
|
|
2496
3095
|
}
|
|
2497
3096
|
export interface Task {
|
|
@@ -2523,8 +3122,6 @@ export interface Reschedule {
|
|
|
2523
3122
|
executeAt?: Date | null;
|
|
2524
3123
|
payload?: string | null;
|
|
2525
3124
|
}
|
|
2526
|
-
export interface Empty {
|
|
2527
|
-
}
|
|
2528
3125
|
export interface V1SubscriptionEvent extends V1SubscriptionEventEventOneOf {
|
|
2529
3126
|
/** A subscriptions was created */
|
|
2530
3127
|
created?: V1SubscriptionCreated;
|
|
@@ -2592,22 +3189,41 @@ export interface V1SubscriptionCreated {
|
|
|
2592
3189
|
export interface V1Subscription {
|
|
2593
3190
|
/**
|
|
2594
3191
|
* ID of the subscription
|
|
3192
|
+
* @format GUID
|
|
2595
3193
|
* @readonly
|
|
2596
3194
|
*/
|
|
2597
3195
|
_id?: string;
|
|
2598
|
-
/**
|
|
3196
|
+
/**
|
|
3197
|
+
* ID of the app which created the subscription
|
|
3198
|
+
* @format GUID
|
|
3199
|
+
*/
|
|
2599
3200
|
wixAppId?: string;
|
|
2600
|
-
/**
|
|
3201
|
+
/**
|
|
3202
|
+
* Instance ID of the Subscriptions app
|
|
3203
|
+
* @format GUID
|
|
3204
|
+
*/
|
|
2601
3205
|
tenantId?: string;
|
|
2602
|
-
/**
|
|
3206
|
+
/**
|
|
3207
|
+
* ID of entity in app (e.g. a cart in stores/order in paid plans)
|
|
3208
|
+
* @format GUID
|
|
3209
|
+
*/
|
|
2603
3210
|
originEntityId?: string;
|
|
2604
3211
|
/** Site member or a contact who bought the subscription */
|
|
2605
3212
|
subscriber?: Subscriber;
|
|
2606
|
-
/**
|
|
3213
|
+
/**
|
|
3214
|
+
* Wix Pay order ID, is empty for free subscriptions
|
|
3215
|
+
* @format GUID
|
|
3216
|
+
*/
|
|
2607
3217
|
wixPayOrderId?: string | null;
|
|
2608
|
-
/**
|
|
3218
|
+
/**
|
|
3219
|
+
* Subscription name (e.g. a product or subscription package name)
|
|
3220
|
+
* @maxLength 150
|
|
3221
|
+
*/
|
|
2609
3222
|
name?: string;
|
|
2610
|
-
/**
|
|
3223
|
+
/**
|
|
3224
|
+
* Optional additional subscription description
|
|
3225
|
+
* @maxLength 500
|
|
3226
|
+
*/
|
|
2611
3227
|
description?: string;
|
|
2612
3228
|
/** Amount to be paid for a single scheduled payment */
|
|
2613
3229
|
price?: Money;
|
|
@@ -2641,10 +3257,14 @@ export interface V1Subscription {
|
|
|
2641
3257
|
validUntilDateWithSuspensions?: Date | null;
|
|
2642
3258
|
/** Duration of single payment subscription (instead of billing_profile) */
|
|
2643
3259
|
singlePaymentDuration?: V1Duration;
|
|
3260
|
+
/** @format GUID */
|
|
2644
3261
|
originInstanceId?: string | null;
|
|
2645
3262
|
}
|
|
2646
3263
|
export interface Subscriber {
|
|
2647
|
-
/**
|
|
3264
|
+
/**
|
|
3265
|
+
* Member or contact ID
|
|
3266
|
+
* @format GUID
|
|
3267
|
+
*/
|
|
2648
3268
|
_id?: string;
|
|
2649
3269
|
/** Member or contact */
|
|
2650
3270
|
identityType?: IdentityType;
|
|
@@ -2659,9 +3279,16 @@ export declare enum IdentityType {
|
|
|
2659
3279
|
}
|
|
2660
3280
|
/** Price of a payment. Includes amount and currency. */
|
|
2661
3281
|
export interface Money {
|
|
2662
|
-
/**
|
|
3282
|
+
/**
|
|
3283
|
+
* Monetary amount i.e. 3.99.
|
|
3284
|
+
* @format DECIMAL_VALUE
|
|
3285
|
+
*/
|
|
2663
3286
|
amount?: string;
|
|
2664
|
-
/**
|
|
3287
|
+
/**
|
|
3288
|
+
* Currency in ISO 4217 format i.e. USD.
|
|
3289
|
+
* @minLength 3
|
|
3290
|
+
* @maxLength 3
|
|
3291
|
+
*/
|
|
2665
3292
|
currency?: string;
|
|
2666
3293
|
}
|
|
2667
3294
|
export declare enum SubscriptionType {
|
|
@@ -2706,395 +3333,299 @@ export declare enum PaymentStatusEnumPaymentStatus {
|
|
|
2706
3333
|
/**
|
|
2707
3334
|
* Recurring payment is described by `frequency` (day, week, month) and `interval`.
|
|
2708
3335
|
*
|
|
2709
|
-
* For example, to create a recurring payment every 14 days, just set `interval` to 14 and frequency to `DAY`.
|
|
2710
|
-
*
|
|
2711
|
-
* In some cases there should be a trial period for the order, after which payments start to occur.
|
|
2712
|
-
* Trial period is also defined as `frequency` and `interval` pair.
|
|
2713
|
-
*
|
|
2714
|
-
* So one can define a monthly 'subscription' with a 14 days trial period.
|
|
2715
|
-
*/
|
|
2716
|
-
export interface V2Subscription {
|
|
2717
|
-
/** frequency of recurring payment (required) */
|
|
2718
|
-
frequency?: SubscriptionFrequency;
|
|
2719
|
-
/** interval of recurring payment (required) */
|
|
2720
|
-
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;
|
|
3336
|
+
* For example, to create a recurring payment every 14 days, just set `interval` to 14 and frequency to `DAY`.
|
|
3337
|
+
*
|
|
3338
|
+
* In some cases there should be a trial period for the order, after which payments start to occur.
|
|
3339
|
+
* Trial period is also defined as `frequency` and `interval` pair.
|
|
3340
|
+
*
|
|
3341
|
+
* So one can define a monthly 'subscription' with a 14 days trial period.
|
|
3342
|
+
*/
|
|
3343
|
+
export interface V2Subscription {
|
|
3344
|
+
/** frequency of recurring payment (required) */
|
|
3345
|
+
frequency?: SubscriptionFrequency;
|
|
3346
|
+
/** interval of recurring payment (required) */
|
|
3347
|
+
interval?: number;
|
|
3348
|
+
/** trial period for recurring payment (optional) */
|
|
3349
|
+
trial?: SubscriptionTrialPeriod;
|
|
3350
|
+
/**
|
|
3351
|
+
* how many billing cycles should be done before subscription finishes
|
|
3352
|
+
* (optional, 0 by default means endless subscription)
|
|
3353
|
+
*/
|
|
3354
|
+
billingCycles?: number;
|
|
3355
|
+
/**
|
|
3356
|
+
* date in the future or in the past when the first billing cycle begins
|
|
3357
|
+
* (the first off-session payment is performed when it ends)
|
|
3358
|
+
*/
|
|
3359
|
+
firstCycleStartDate?: Date | null;
|
|
2926
3360
|
}
|
|
2927
|
-
|
|
2928
|
-
|
|
3361
|
+
/** Frequency unit of recurring payment */
|
|
3362
|
+
export declare enum SubscriptionFrequency {
|
|
3363
|
+
UNDEFINED = "UNDEFINED",
|
|
3364
|
+
DAY = "DAY",
|
|
3365
|
+
WEEK = "WEEK",
|
|
3366
|
+
MONTH = "MONTH",
|
|
3367
|
+
YEAR = "YEAR"
|
|
2929
3368
|
}
|
|
2930
|
-
|
|
2931
|
-
|
|
3369
|
+
/** Trial period of subscription */
|
|
3370
|
+
export interface SubscriptionTrialPeriod {
|
|
3371
|
+
/** trial period in units (required) */
|
|
3372
|
+
period?: number;
|
|
3373
|
+
/** units in which trial period is described (optional, default DAY) */
|
|
3374
|
+
unit?: SubscriptionFrequency;
|
|
2932
3375
|
}
|
|
2933
|
-
export
|
|
2934
|
-
|
|
3376
|
+
export declare enum CancellationInitiator {
|
|
3377
|
+
/** Cancellation initiator undefined */
|
|
3378
|
+
UNDEFINED = "UNDEFINED",
|
|
3379
|
+
/** Subscription was canceled by site owner (default if canceled by user or service identity) */
|
|
3380
|
+
OWNER = "OWNER",
|
|
3381
|
+
/** Subscription was canceled by member (default if canceled by member identity) */
|
|
3382
|
+
MEMBER = "MEMBER",
|
|
3383
|
+
/** Subscription was canceled because of payment failure */
|
|
3384
|
+
PAYMENT_FAILURE = "PAYMENT_FAILURE",
|
|
3385
|
+
/** Subscription was canceled because of payment setup failure */
|
|
3386
|
+
SETUP_FAILURE = "SETUP_FAILURE"
|
|
2935
3387
|
}
|
|
2936
|
-
export interface
|
|
2937
|
-
|
|
3388
|
+
export interface SubscriptionPolicy {
|
|
3389
|
+
/** Subscription expiration date can be updated */
|
|
3390
|
+
expiryDateChangeable?: boolean;
|
|
3391
|
+
/** Subscription can be cancelled by the member who bought it (when memberId == subscriberId) */
|
|
3392
|
+
cancellableByMember?: boolean;
|
|
3393
|
+
/** Subscription expiration date on cancellation can be set to next payment date */
|
|
3394
|
+
cancellableAtNextPaymentCycle?: boolean;
|
|
2938
3395
|
}
|
|
2939
|
-
export interface
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
3396
|
+
export interface Suspension {
|
|
3397
|
+
status?: Status;
|
|
3398
|
+
/** Beginning of the suspended period */
|
|
3399
|
+
startsAt?: Date | null;
|
|
3400
|
+
/** End of the suspended period */
|
|
3401
|
+
endsAt?: Date | null;
|
|
2943
3402
|
}
|
|
2944
|
-
export
|
|
2945
|
-
|
|
2946
|
-
|
|
3403
|
+
export declare enum Status {
|
|
3404
|
+
UNDEFINED = "UNDEFINED",
|
|
3405
|
+
ACTIVE = "ACTIVE",
|
|
3406
|
+
ENDED = "ENDED"
|
|
2947
3407
|
}
|
|
2948
|
-
|
|
2949
|
-
|
|
3408
|
+
/** A duration expressed in amount of time units. */
|
|
3409
|
+
export interface V1Duration {
|
|
3410
|
+
/** Amount of the unit */
|
|
3411
|
+
amount?: number;
|
|
3412
|
+
/** Day, Week, Month, Year. */
|
|
3413
|
+
unit?: SubscriptionFrequency;
|
|
2950
3414
|
}
|
|
2951
|
-
export interface
|
|
2952
|
-
|
|
2953
|
-
subscriptionId?: string;
|
|
2954
|
-
taskType?: string;
|
|
3415
|
+
export interface V1SubscriptionActivated {
|
|
3416
|
+
subscription?: V1Subscription;
|
|
2955
3417
|
}
|
|
2956
|
-
export interface
|
|
2957
|
-
|
|
2958
|
-
taskType?: string;
|
|
2959
|
-
executionTime?: Date | null;
|
|
2960
|
-
tenantId?: string;
|
|
3418
|
+
export interface V1SubscriptionCanceled {
|
|
3419
|
+
subscription?: V1Subscription;
|
|
2961
3420
|
}
|
|
2962
|
-
export interface
|
|
2963
|
-
|
|
2964
|
-
subscriptionId?: string;
|
|
2965
|
-
taskType?: string;
|
|
3421
|
+
export interface V1SubscriptionUpdated {
|
|
3422
|
+
subscription?: V1Subscription;
|
|
2966
3423
|
}
|
|
2967
|
-
export interface
|
|
2968
|
-
|
|
2969
|
-
|
|
3424
|
+
export interface SubscriptionCycleTriggered {
|
|
3425
|
+
subscription?: V1Subscription;
|
|
3426
|
+
billingCycle?: number;
|
|
3427
|
+
/**
|
|
3428
|
+
* Wix Pay transaction id, optional. Exists if event was triggered by a payment.
|
|
3429
|
+
* @format GUID
|
|
3430
|
+
*/
|
|
3431
|
+
transactionId?: string | null;
|
|
2970
3432
|
}
|
|
2971
|
-
export interface
|
|
2972
|
-
subscription?:
|
|
3433
|
+
export interface SubscriptionMarkedAsPaid {
|
|
3434
|
+
subscription?: V1Subscription;
|
|
3435
|
+
/** A number indicating which payment (cycle) was marked as paid. For recurring subscriptions only. */
|
|
3436
|
+
billingCycle?: number | null;
|
|
2973
3437
|
}
|
|
2974
|
-
export interface
|
|
2975
|
-
|
|
2976
|
-
tenantId?: string;
|
|
2977
|
-
invoiceId?: string;
|
|
2978
|
-
subscriptionCycle?: number;
|
|
3438
|
+
export interface SubscriptionCancellationRequested {
|
|
3439
|
+
subscription?: V1Subscription;
|
|
2979
3440
|
}
|
|
2980
|
-
export interface
|
|
2981
|
-
|
|
3441
|
+
export interface SubscriptionSuspended {
|
|
3442
|
+
subscription?: V1Subscription;
|
|
2982
3443
|
}
|
|
2983
|
-
export interface
|
|
2984
|
-
|
|
2985
|
-
subscriptionId?: string;
|
|
2986
|
-
pauseStartDate?: Date | null;
|
|
2987
|
-
pauseEndDate?: Date | null;
|
|
3444
|
+
export interface V1SubscriptionResumed {
|
|
3445
|
+
subscription?: V1Subscription;
|
|
2988
3446
|
}
|
|
2989
|
-
export interface
|
|
2990
|
-
subscription?:
|
|
3447
|
+
export interface SubscriptionExpired {
|
|
3448
|
+
subscription?: V1Subscription;
|
|
2991
3449
|
}
|
|
2992
|
-
export interface
|
|
2993
|
-
|
|
2994
|
-
subscriptionId?: string;
|
|
2995
|
-
taskType?: string;
|
|
3450
|
+
export interface V1SubscriptionInitialPurchaseCompleted {
|
|
3451
|
+
subscription?: V1Subscription;
|
|
2996
3452
|
}
|
|
2997
|
-
export interface
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3453
|
+
export interface ListSubscriptionHistoryRequest {
|
|
3454
|
+
/** @format GUID */
|
|
3455
|
+
subscriptionId: string;
|
|
3456
|
+
/** Determines the type of view for the history: either a comprehensive backoffice view or a user-centric view. */
|
|
3457
|
+
mode?: HistoryViewMode;
|
|
3458
|
+
/** Cursor for efficient paging. If paging through results, pass this field from the previous search response to continue to the next page. */
|
|
3459
|
+
cursor?: CursorPaging;
|
|
3001
3460
|
}
|
|
3002
|
-
export
|
|
3003
|
-
|
|
3461
|
+
export declare enum HistoryViewMode {
|
|
3462
|
+
UNKNOWN = "UNKNOWN",
|
|
3463
|
+
/** Comprehensive view including all history events. */
|
|
3464
|
+
BACKOFFICE = "BACKOFFICE",
|
|
3465
|
+
/** User-centric view of the history. */
|
|
3466
|
+
USER = "USER"
|
|
3004
3467
|
}
|
|
3005
|
-
export interface
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3468
|
+
export interface ListSubscriptionHistoryResponse {
|
|
3469
|
+
/** List of history entries for the subscription. */
|
|
3470
|
+
historyEntries?: SubscriptionHistoryEntry[];
|
|
3471
|
+
/** Paging metadata. A `next` cursor is returned if there are more results. */
|
|
3472
|
+
pagingMetadata?: PagingMetadataV2;
|
|
3010
3473
|
}
|
|
3011
|
-
export interface
|
|
3012
|
-
|
|
3474
|
+
export interface SubscriptionHistoryEntry {
|
|
3475
|
+
/** @format GUID */
|
|
3476
|
+
entryId?: string;
|
|
3477
|
+
/** TODO: add max length? it is not defined in domainevents, so should we? */
|
|
3478
|
+
slug?: string;
|
|
3479
|
+
entryTime?: Date | null;
|
|
3480
|
+
event?: SubscriptionEvent;
|
|
3013
3481
|
}
|
|
3014
|
-
export interface
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3482
|
+
export interface SubscriptionEvent extends SubscriptionEventPayloadOneOf {
|
|
3483
|
+
created?: SubscriptionCreated;
|
|
3484
|
+
updated?: SubscriptionUpdated;
|
|
3485
|
+
deleted?: SubscriptionDeleted;
|
|
3486
|
+
activated?: SubscriptionActivated;
|
|
3487
|
+
ended?: SubscriptionEnded;
|
|
3488
|
+
canceled?: SubscriptionCanceled;
|
|
3489
|
+
paused?: SubscriptionPaused;
|
|
3490
|
+
resumed?: SubscriptionResumed;
|
|
3491
|
+
pauseRequested?: PauseSubscriptionRequested;
|
|
3492
|
+
resumeRequested?: ResumeSubscriptionRequested;
|
|
3493
|
+
scheduledPauseCanceled?: ScheduledPauseCanceled;
|
|
3494
|
+
scheduledResumeCanceled?: ScheduledResumeCanceled;
|
|
3495
|
+
billingCycleStarted?: SubscriptionBillingCycleStarted;
|
|
3496
|
+
autoRenewalTurnedOn?: SubscriptionAutoRenewalTurnedOn;
|
|
3497
|
+
autoRenewalTurnedOff?: SubscriptionAutoRenewalTurnedOff;
|
|
3498
|
+
cycleReadyToPay?: SubscriptionCycleReadyToPay;
|
|
3499
|
+
extended?: SubscriptionExtended;
|
|
3500
|
+
initialPurchaseCompleted?: SubscriptionInitialPurchaseCompleted;
|
|
3501
|
+
latestInvoiceMarkedAsPaid?: LatestInvoiceMarkedAsPaid;
|
|
3502
|
+
revived?: SubscriptionRevived;
|
|
3503
|
+
billingDateUpdated?: SubscriptionBillingDateUpdated;
|
|
3504
|
+
futureUpdatesRequested?: FutureUpdatesRequested;
|
|
3505
|
+
updatesApplied?: UpdatesApplied;
|
|
3506
|
+
resetPendingUpdates?: ResetPendingUpdates;
|
|
3507
|
+
gracePeriodStarted?: GracePeriodStarted;
|
|
3508
|
+
gracePeriodEnded?: GracePeriodEnded;
|
|
3509
|
+
paymentMethodUpdated?: PaymentMethodUpdated;
|
|
3510
|
+
collectionMethodUpdated?: SubscriptionCollectionMethodUpdated;
|
|
3511
|
+
freeTrailStarted?: FreeTrailStarted;
|
|
3512
|
+
freeTrailEnded?: FreeTrailEnded;
|
|
3513
|
+
billingCyclePaid?: SubscriptionBillingCyclePaid;
|
|
3514
|
+
initiatePaymentMethodSetup?: InitiatedPaymentMethodSetup;
|
|
3515
|
+
subscriptionBoAction?: SubscriptionBackOfficeAction;
|
|
3516
|
+
unknown?: UnknownSubscriptionEvent;
|
|
3019
3517
|
}
|
|
3020
3518
|
/** @oneof */
|
|
3021
|
-
export interface
|
|
3022
|
-
|
|
3023
|
-
|
|
3519
|
+
export interface SubscriptionEventPayloadOneOf {
|
|
3520
|
+
created?: SubscriptionCreated;
|
|
3521
|
+
updated?: SubscriptionUpdated;
|
|
3522
|
+
deleted?: SubscriptionDeleted;
|
|
3523
|
+
activated?: SubscriptionActivated;
|
|
3524
|
+
ended?: SubscriptionEnded;
|
|
3525
|
+
canceled?: SubscriptionCanceled;
|
|
3526
|
+
paused?: SubscriptionPaused;
|
|
3527
|
+
resumed?: SubscriptionResumed;
|
|
3528
|
+
pauseRequested?: PauseSubscriptionRequested;
|
|
3529
|
+
resumeRequested?: ResumeSubscriptionRequested;
|
|
3530
|
+
scheduledPauseCanceled?: ScheduledPauseCanceled;
|
|
3531
|
+
scheduledResumeCanceled?: ScheduledResumeCanceled;
|
|
3532
|
+
billingCycleStarted?: SubscriptionBillingCycleStarted;
|
|
3533
|
+
autoRenewalTurnedOn?: SubscriptionAutoRenewalTurnedOn;
|
|
3534
|
+
autoRenewalTurnedOff?: SubscriptionAutoRenewalTurnedOff;
|
|
3535
|
+
cycleReadyToPay?: SubscriptionCycleReadyToPay;
|
|
3536
|
+
extended?: SubscriptionExtended;
|
|
3537
|
+
initialPurchaseCompleted?: SubscriptionInitialPurchaseCompleted;
|
|
3538
|
+
latestInvoiceMarkedAsPaid?: LatestInvoiceMarkedAsPaid;
|
|
3539
|
+
revived?: SubscriptionRevived;
|
|
3540
|
+
billingDateUpdated?: SubscriptionBillingDateUpdated;
|
|
3541
|
+
futureUpdatesRequested?: FutureUpdatesRequested;
|
|
3542
|
+
updatesApplied?: UpdatesApplied;
|
|
3543
|
+
resetPendingUpdates?: ResetPendingUpdates;
|
|
3544
|
+
gracePeriodStarted?: GracePeriodStarted;
|
|
3545
|
+
gracePeriodEnded?: GracePeriodEnded;
|
|
3546
|
+
paymentMethodUpdated?: PaymentMethodUpdated;
|
|
3547
|
+
collectionMethodUpdated?: SubscriptionCollectionMethodUpdated;
|
|
3548
|
+
freeTrailStarted?: FreeTrailStarted;
|
|
3549
|
+
freeTrailEnded?: FreeTrailEnded;
|
|
3550
|
+
billingCyclePaid?: SubscriptionBillingCyclePaid;
|
|
3551
|
+
initiatePaymentMethodSetup?: InitiatedPaymentMethodSetup;
|
|
3552
|
+
subscriptionBoAction?: SubscriptionBackOfficeAction;
|
|
3553
|
+
unknown?: UnknownSubscriptionEvent;
|
|
3024
3554
|
}
|
|
3025
|
-
export interface
|
|
3026
|
-
|
|
3555
|
+
export interface SubscriptionCreated {
|
|
3556
|
+
subscription?: Subscription;
|
|
3027
3557
|
}
|
|
3028
|
-
export interface
|
|
3029
|
-
|
|
3558
|
+
export interface SubscriptionUpdated {
|
|
3559
|
+
current?: Subscription;
|
|
3560
|
+
previous?: Subscription;
|
|
3561
|
+
diff?: SubscriptionDiff;
|
|
3030
3562
|
}
|
|
3031
|
-
export interface
|
|
3032
|
-
|
|
3563
|
+
export interface SubscriptionDiff {
|
|
3564
|
+
added?: string | null;
|
|
3565
|
+
changed?: string | null;
|
|
3566
|
+
deleted?: string | null;
|
|
3033
3567
|
}
|
|
3034
|
-
export interface
|
|
3035
|
-
tenantId?: string;
|
|
3568
|
+
export interface SubscriptionDeleted {
|
|
3036
3569
|
subscriptionId?: string;
|
|
3037
3570
|
}
|
|
3038
|
-
export interface
|
|
3571
|
+
export interface FutureUpdatesRequested {
|
|
3039
3572
|
subscription?: Subscription;
|
|
3573
|
+
requestedUpdateData?: SubscriptionUpdateData;
|
|
3040
3574
|
}
|
|
3041
|
-
export interface
|
|
3042
|
-
tenantId?: string;
|
|
3043
|
-
subscriptionId?: string;
|
|
3044
|
-
}
|
|
3045
|
-
export interface DeleteDraftSubscriptionResponse {
|
|
3575
|
+
export interface UpdatesApplied {
|
|
3046
3576
|
subscription?: Subscription;
|
|
3577
|
+
updateAction?: UpdateAction;
|
|
3578
|
+
appliedUpdateData?: SubscriptionUpdateData;
|
|
3047
3579
|
}
|
|
3048
|
-
export interface
|
|
3049
|
-
tenantId?: string;
|
|
3050
|
-
subscriptionId?: string;
|
|
3051
|
-
}
|
|
3052
|
-
export interface DeleteSubscriptionBOResponse {
|
|
3580
|
+
export interface ResetPendingUpdates {
|
|
3053
3581
|
subscription?: Subscription;
|
|
3054
3582
|
}
|
|
3055
|
-
export interface
|
|
3056
|
-
|
|
3057
|
-
subscriptionId?: string;
|
|
3058
|
-
initiator?: ActionInitiator;
|
|
3059
|
-
reason?: string | null;
|
|
3583
|
+
export interface GracePeriodStarted {
|
|
3584
|
+
subscription?: Subscription;
|
|
3060
3585
|
}
|
|
3061
|
-
export interface
|
|
3586
|
+
export interface GracePeriodEnded {
|
|
3062
3587
|
subscription?: Subscription;
|
|
3588
|
+
/** Indication for the payment settlement method. */
|
|
3589
|
+
paymentSettlementMethod?: PaymentSettlementMethod;
|
|
3063
3590
|
}
|
|
3064
|
-
export
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3591
|
+
export declare enum PaymentSettlementMethod {
|
|
3592
|
+
UNKNOWN = "UNKNOWN",
|
|
3593
|
+
/** System-defined payment settlement. */
|
|
3594
|
+
SYSTEM = "SYSTEM",
|
|
3595
|
+
/** Manually mark the payment as paid. */
|
|
3596
|
+
MARK_AS_PAID = "MARK_AS_PAID",
|
|
3597
|
+
/** Require the customer to pay immediately, by insert a new payment method. */
|
|
3598
|
+
CUSTOMER_PAY_NOW = "CUSTOMER_PAY_NOW"
|
|
3068
3599
|
}
|
|
3069
|
-
export interface
|
|
3600
|
+
export interface PaymentMethodUpdated {
|
|
3070
3601
|
subscription?: Subscription;
|
|
3602
|
+
initiator?: HistoryActionInitiator;
|
|
3603
|
+
paymentMode?: PaymentMode;
|
|
3071
3604
|
}
|
|
3072
|
-
export interface
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
}
|
|
3077
|
-
/** @oneof */
|
|
3078
|
-
export interface SendSubscriptionActionEventBORequestEventOneOf {
|
|
3079
|
-
billingCycleStarted?: SubscriptionBillingCycleStarted;
|
|
3605
|
+
export interface SubscriptionCollectionMethodUpdated {
|
|
3606
|
+
subscription?: Subscription;
|
|
3607
|
+
newCollectionMethod?: CollectionMethodEnumCollectionMethod;
|
|
3608
|
+
previousCollectionMethod?: CollectionMethodEnumCollectionMethod;
|
|
3080
3609
|
}
|
|
3081
|
-
export interface
|
|
3610
|
+
export interface FreeTrailStarted {
|
|
3611
|
+
subscription?: Subscription;
|
|
3082
3612
|
}
|
|
3083
|
-
export interface
|
|
3084
|
-
|
|
3085
|
-
subscriptionId?: string;
|
|
3086
|
-
transactionId?: string;
|
|
3613
|
+
export interface FreeTrailEnded {
|
|
3614
|
+
subscription?: Subscription;
|
|
3087
3615
|
}
|
|
3088
|
-
export interface
|
|
3089
|
-
|
|
3090
|
-
subscriptionId?: string;
|
|
3091
|
-
pausePolicy?: PausePolicy;
|
|
3092
|
-
pauseAt?: PauseAt;
|
|
3093
|
-
initiator?: ActionInitiator;
|
|
3094
|
-
reason?: string | null;
|
|
3616
|
+
export interface InitiatedPaymentMethodSetup {
|
|
3617
|
+
subscription?: Subscription;
|
|
3095
3618
|
}
|
|
3096
|
-
export interface
|
|
3619
|
+
export interface SubscriptionBackOfficeAction {
|
|
3097
3620
|
subscription?: Subscription;
|
|
3621
|
+
/** The backoffice method name */
|
|
3622
|
+
name?: string;
|
|
3623
|
+
/** json as string format, to store the flatted request object */
|
|
3624
|
+
params?: string;
|
|
3625
|
+
}
|
|
3626
|
+
/** Defines unknown events restored from the logs */
|
|
3627
|
+
export interface UnknownSubscriptionEvent {
|
|
3628
|
+
subscriptionAsString?: string | null;
|
|
3098
3629
|
}
|
|
3099
3630
|
interface CustomerNonNullableFields {
|
|
3100
3631
|
visitorId: string;
|
|
@@ -3274,6 +3805,169 @@ interface SubscriptionNonNullableFields {
|
|
|
3274
3805
|
specificDatePendingUpdateData?: SpecificDateSubscriptionUpdateDataNonNullableFields;
|
|
3275
3806
|
items: ItemNonNullableFields[];
|
|
3276
3807
|
}
|
|
3808
|
+
export interface GetSubscriptionResponseNonNullableFields {
|
|
3809
|
+
subscription?: SubscriptionNonNullableFields;
|
|
3810
|
+
}
|
|
3811
|
+
export interface CustomerCancelSubscriptionResponseNonNullableFields {
|
|
3812
|
+
subscription?: SubscriptionNonNullableFields;
|
|
3813
|
+
}
|
|
3814
|
+
export interface CustomerTurnOnAutoRenewalResponseNonNullableFields {
|
|
3815
|
+
subscription?: SubscriptionNonNullableFields;
|
|
3816
|
+
}
|
|
3817
|
+
export interface CustomerTurnOffAutoRenewalResponseNonNullableFields {
|
|
3818
|
+
subscription?: SubscriptionNonNullableFields;
|
|
3819
|
+
}
|
|
3820
|
+
export interface CustomerExtendSubscriptionResponseNonNullableFields {
|
|
3821
|
+
subscription?: SubscriptionNonNullableFields;
|
|
3822
|
+
}
|
|
3823
|
+
export interface QuerySubscriptionsResponseNonNullableFields {
|
|
3824
|
+
subscriptions: SubscriptionNonNullableFields[];
|
|
3825
|
+
}
|
|
3826
|
+
export interface UpdateSubscriptionPaymentMethodResponseNonNullableFields {
|
|
3827
|
+
subscription?: SubscriptionNonNullableFields;
|
|
3828
|
+
}
|
|
3829
|
+
interface ActionNonNullableFields {
|
|
3830
|
+
actionType: ActionType;
|
|
3831
|
+
pausePolicies: PausePolicy[];
|
|
3832
|
+
pauseAt: PauseAt[];
|
|
3833
|
+
resumeAt: ResumeAt[];
|
|
3834
|
+
extendPolicies: ExtendPolicyType[];
|
|
3835
|
+
}
|
|
3836
|
+
export interface CustomerAllowedActionsResponseNonNullableFields {
|
|
3837
|
+
actions: ActionNonNullableFields[];
|
|
3838
|
+
}
|
|
3839
|
+
interface RecurringNonNullableFields {
|
|
3840
|
+
cycleNumber: number;
|
|
3841
|
+
}
|
|
3842
|
+
interface InvoiceDiscountNonNullableFields {
|
|
3843
|
+
amount: string;
|
|
3844
|
+
percentage: string;
|
|
3845
|
+
origin?: DiscountOriginNonNullableFields;
|
|
3846
|
+
}
|
|
3847
|
+
interface InvoiceApplicationFeeNonNullableFields {
|
|
3848
|
+
amount: string;
|
|
3849
|
+
discount?: InvoiceDiscountNonNullableFields;
|
|
3850
|
+
}
|
|
3851
|
+
interface PriceDetailsNonNullableFields {
|
|
3852
|
+
price: string;
|
|
3853
|
+
tax?: TaxNonNullableFields;
|
|
3854
|
+
discount?: InvoiceDiscountNonNullableFields;
|
|
3855
|
+
applicationFeeDetails?: InvoiceApplicationFeeNonNullableFields;
|
|
3856
|
+
}
|
|
3857
|
+
interface LineItemTaxSummaryNonNullableFields {
|
|
3858
|
+
aggregatedTaxAmount: string;
|
|
3859
|
+
aggregatedTaxRate: string;
|
|
3860
|
+
taxableAmount: string;
|
|
3861
|
+
}
|
|
3862
|
+
interface TaxBreakdownNonNullableFields {
|
|
3863
|
+
taxType: string;
|
|
3864
|
+
taxRate: string;
|
|
3865
|
+
jurisdictionType: string;
|
|
3866
|
+
}
|
|
3867
|
+
interface ItemTaxDataNonNullableFields {
|
|
3868
|
+
lineItemTaxSummary?: LineItemTaxSummaryNonNullableFields;
|
|
3869
|
+
taxBreakdowns: TaxBreakdownNonNullableFields[];
|
|
3870
|
+
}
|
|
3871
|
+
interface InvoiceItemNonNullableFields {
|
|
3872
|
+
recurring?: RecurringNonNullableFields;
|
|
3873
|
+
_id: string;
|
|
3874
|
+
name: string;
|
|
3875
|
+
catalogReference?: CatalogReferenceNonNullableFields;
|
|
3876
|
+
category: ItemCategory;
|
|
3877
|
+
quantity: number;
|
|
3878
|
+
priceDetails?: PriceDetailsNonNullableFields;
|
|
3879
|
+
totals?: TotalsNonNullableFields;
|
|
3880
|
+
taxData?: ItemTaxDataNonNullableFields;
|
|
3881
|
+
}
|
|
3882
|
+
interface SubscriptionChargeNonNullableFields {
|
|
3883
|
+
cycle: number;
|
|
3884
|
+
totals?: TotalsNonNullableFields;
|
|
3885
|
+
invoiceItems: InvoiceItemNonNullableFields[];
|
|
3886
|
+
discount?: InvoiceDiscountNonNullableFields;
|
|
3887
|
+
}
|
|
3888
|
+
export interface CustomerListUpcomingChargesResponseNonNullableFields {
|
|
3889
|
+
upcomingCharge?: SubscriptionChargeNonNullableFields;
|
|
3890
|
+
}
|
|
3891
|
+
export interface InitiatePaymentMethodSetupResponseNonNullableFields {
|
|
3892
|
+
paymentOrderId: string;
|
|
3893
|
+
}
|
|
3894
|
+
export interface PayCycleResponseNonNullableFields {
|
|
3895
|
+
invoiceId: string;
|
|
3896
|
+
subscription?: SubscriptionNonNullableFields;
|
|
3897
|
+
}
|
|
3898
|
+
export interface UpdateSubscriptionBillingDateResponseNonNullableFields {
|
|
3899
|
+
subscription?: SubscriptionNonNullableFields;
|
|
3900
|
+
}
|
|
3901
|
+
export interface CancelSubscriptionResponseNonNullableFields {
|
|
3902
|
+
subscription?: SubscriptionNonNullableFields;
|
|
3903
|
+
}
|
|
3904
|
+
export interface PauseSubscriptionResponseNonNullableFields {
|
|
3905
|
+
subscription?: SubscriptionNonNullableFields;
|
|
3906
|
+
}
|
|
3907
|
+
export interface ResumeSubscriptionResponseNonNullableFields {
|
|
3908
|
+
subscription?: SubscriptionNonNullableFields;
|
|
3909
|
+
}
|
|
3910
|
+
export interface SearchSubscriptionsResponseNonNullableFields {
|
|
3911
|
+
subscriptions: SubscriptionNonNullableFields[];
|
|
3912
|
+
}
|
|
3913
|
+
interface CountByStatusNonNullableFields {
|
|
3914
|
+
status: SubscriptionStatusEnumSubscriptionStatus;
|
|
3915
|
+
count: number;
|
|
3916
|
+
}
|
|
3917
|
+
export interface CountSubscriptionsResponseNonNullableFields {
|
|
3918
|
+
countByStatus: CountByStatusNonNullableFields[];
|
|
3919
|
+
total: number;
|
|
3920
|
+
}
|
|
3921
|
+
export interface TurnOnSubscriptionAutoRenewalResponseNonNullableFields {
|
|
3922
|
+
subscription?: SubscriptionNonNullableFields;
|
|
3923
|
+
}
|
|
3924
|
+
export interface TurnOffSubscriptionAutoRenewalResponseNonNullableFields {
|
|
3925
|
+
subscription?: SubscriptionNonNullableFields;
|
|
3926
|
+
}
|
|
3927
|
+
export interface MarkLatestInvoiceAsPaidResponseNonNullableFields {
|
|
3928
|
+
subscription?: SubscriptionNonNullableFields;
|
|
3929
|
+
}
|
|
3930
|
+
export interface MarkBillingCycleAsPaidResponseNonNullableFields {
|
|
3931
|
+
subscription?: SubscriptionNonNullableFields;
|
|
3932
|
+
}
|
|
3933
|
+
interface AmountByStatusNonNullableFields {
|
|
3934
|
+
status: SubscriptionStatusEnumSubscriptionStatus;
|
|
3935
|
+
amount: number;
|
|
3936
|
+
}
|
|
3937
|
+
export interface GetSubscriptionsStatsResponseNonNullableFields {
|
|
3938
|
+
amountByStatuses: AmountByStatusNonNullableFields[];
|
|
3939
|
+
total: number;
|
|
3940
|
+
}
|
|
3941
|
+
export interface ExtendSubscriptionResponseNonNullableFields {
|
|
3942
|
+
subscription?: SubscriptionNonNullableFields;
|
|
3943
|
+
}
|
|
3944
|
+
interface UnsupportedReasonNonNullableFields {
|
|
3945
|
+
code: string;
|
|
3946
|
+
}
|
|
3947
|
+
interface UnsupportedActionNonNullableFields {
|
|
3948
|
+
actionType: ActionType;
|
|
3949
|
+
reasons: UnsupportedReasonNonNullableFields[];
|
|
3950
|
+
}
|
|
3951
|
+
export interface AllowedActionsResponseNonNullableFields {
|
|
3952
|
+
actions: ActionNonNullableFields[];
|
|
3953
|
+
unsupportedActions: UnsupportedActionNonNullableFields[];
|
|
3954
|
+
}
|
|
3955
|
+
export interface ListUpcomingChargesResponseNonNullableFields {
|
|
3956
|
+
upcomingCharges: SubscriptionChargeNonNullableFields[];
|
|
3957
|
+
}
|
|
3958
|
+
interface ChargeNonNullableFields {
|
|
3959
|
+
cycleFrom: number;
|
|
3960
|
+
totals?: TotalsNonNullableFields;
|
|
3961
|
+
}
|
|
3962
|
+
export interface PreviewSubscriptionChargesResponseNonNullableFields {
|
|
3963
|
+
charges: ChargeNonNullableFields[];
|
|
3964
|
+
}
|
|
3965
|
+
interface SubscriptionChargesNonNullableFields {
|
|
3966
|
+
charges: ChargeNonNullableFields[];
|
|
3967
|
+
}
|
|
3968
|
+
export interface PreviewSubscriptionsChargesResponseNonNullableFields {
|
|
3969
|
+
subscriptionsCharges: SubscriptionChargesNonNullableFields[];
|
|
3970
|
+
}
|
|
3277
3971
|
interface SubscriptionCreatedNonNullableFields {
|
|
3278
3972
|
subscription?: SubscriptionNonNullableFields;
|
|
3279
3973
|
}
|
|
@@ -3394,7 +4088,7 @@ interface FreeTrailStartedNonNullableFields {
|
|
|
3394
4088
|
interface FreeTrailEndedNonNullableFields {
|
|
3395
4089
|
subscription?: SubscriptionNonNullableFields;
|
|
3396
4090
|
}
|
|
3397
|
-
interface
|
|
4091
|
+
interface SubscriptionBillingCyclePaidNonNullableFields {
|
|
3398
4092
|
subscription?: SubscriptionNonNullableFields;
|
|
3399
4093
|
paidCycle: number;
|
|
3400
4094
|
invoiceId: string;
|
|
@@ -3438,7 +4132,7 @@ interface SubscriptionEventNonNullableFields {
|
|
|
3438
4132
|
collectionMethodUpdated?: SubscriptionCollectionMethodUpdatedNonNullableFields;
|
|
3439
4133
|
freeTrailStarted?: FreeTrailStartedNonNullableFields;
|
|
3440
4134
|
freeTrailEnded?: FreeTrailEndedNonNullableFields;
|
|
3441
|
-
|
|
4135
|
+
billingCyclePaid?: SubscriptionBillingCyclePaidNonNullableFields;
|
|
3442
4136
|
initiatePaymentMethodSetup?: InitiatedPaymentMethodSetupNonNullableFields;
|
|
3443
4137
|
subscriptionBoAction?: SubscriptionBackOfficeActionNonNullableFields;
|
|
3444
4138
|
}
|
|
@@ -3450,173 +4144,16 @@ interface SubscriptionHistoryEntryNonNullableFields {
|
|
|
3450
4144
|
export interface ListSubscriptionHistoryResponseNonNullableFields {
|
|
3451
4145
|
historyEntries: SubscriptionHistoryEntryNonNullableFields[];
|
|
3452
4146
|
}
|
|
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
4147
|
export interface BaseEventMetadata {
|
|
3617
|
-
/**
|
|
4148
|
+
/**
|
|
4149
|
+
* App instance ID.
|
|
4150
|
+
* @format GUID
|
|
4151
|
+
*/
|
|
3618
4152
|
instanceId?: string | null;
|
|
3619
|
-
/**
|
|
4153
|
+
/**
|
|
4154
|
+
* Event type.
|
|
4155
|
+
* @maxLength 150
|
|
4156
|
+
*/
|
|
3620
4157
|
eventType?: string;
|
|
3621
4158
|
/** The identification type and identity data. */
|
|
3622
4159
|
identity?: IdentificationData;
|
|
@@ -3670,6 +4207,8 @@ export interface SubscriptionCanceledEnvelope {
|
|
|
3670
4207
|
* @permissionId subscriptions.view
|
|
3671
4208
|
* @webhook
|
|
3672
4209
|
* @eventType wix.billing.v1.subscription_canceled
|
|
4210
|
+
* @serviceIdentifier com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService
|
|
4211
|
+
* @slug canceled
|
|
3673
4212
|
* @documentationMaturity preview
|
|
3674
4213
|
*/
|
|
3675
4214
|
export declare function onSubscriptionCanceled(handler: (event: SubscriptionCanceledEnvelope) => void | Promise<void>): void;
|
|
@@ -3684,6 +4223,8 @@ export interface SubscriptionExtendedEnvelope {
|
|
|
3684
4223
|
* @permissionId subscriptions.view
|
|
3685
4224
|
* @webhook
|
|
3686
4225
|
* @eventType wix.billing.v1.subscription_extended
|
|
4226
|
+
* @serviceIdentifier com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService
|
|
4227
|
+
* @slug extended
|
|
3687
4228
|
* @documentationMaturity preview
|
|
3688
4229
|
*/
|
|
3689
4230
|
export declare function onSubscriptionExtended(handler: (event: SubscriptionExtendedEnvelope) => void | Promise<void>): void;
|
|
@@ -3698,6 +4239,8 @@ export interface SubscriptionUpdatedEnvelope {
|
|
|
3698
4239
|
* @permissionId subscriptions.view
|
|
3699
4240
|
* @webhook
|
|
3700
4241
|
* @eventType wix.billing.v1.subscription_updated
|
|
4242
|
+
* @serviceIdentifier com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService
|
|
4243
|
+
* @slug updated
|
|
3701
4244
|
* @documentationMaturity preview
|
|
3702
4245
|
*/
|
|
3703
4246
|
export declare function onSubscriptionUpdated(handler: (event: SubscriptionUpdatedEnvelope) => void | Promise<void>): void;
|
|
@@ -3712,6 +4255,8 @@ export interface SubscriptionAutoRenewalTurnedOffEnvelope {
|
|
|
3712
4255
|
* @permissionId subscriptions.view
|
|
3713
4256
|
* @webhook
|
|
3714
4257
|
* @eventType wix.billing.v1.subscription_auto_renewal_turned_off
|
|
4258
|
+
* @serviceIdentifier com.wixpress.billing.subscriptions.api.v1.SubscriptionsService
|
|
4259
|
+
* @slug auto_renewal_turned_off
|
|
3715
4260
|
* @documentationMaturity preview
|
|
3716
4261
|
*/
|
|
3717
4262
|
export declare function onSubscriptionAutoRenewalTurnedOff(handler: (event: SubscriptionAutoRenewalTurnedOffEnvelope) => void | Promise<void>): void;
|
|
@@ -3726,6 +4271,8 @@ export interface SubscriptionAutoRenewalTurnedOnEnvelope {
|
|
|
3726
4271
|
* @permissionId subscriptions.view
|
|
3727
4272
|
* @webhook
|
|
3728
4273
|
* @eventType wix.billing.v1.subscription_auto_renewal_turned_on
|
|
4274
|
+
* @serviceIdentifier com.wixpress.billing.subscriptions.api.v1.SubscriptionsService
|
|
4275
|
+
* @slug auto_renewal_turned_on
|
|
3729
4276
|
* @documentationMaturity preview
|
|
3730
4277
|
*/
|
|
3731
4278
|
export declare function onSubscriptionAutoRenewalTurnedOn(handler: (event: SubscriptionAutoRenewalTurnedOnEnvelope) => void | Promise<void>): void;
|
|
@@ -3740,6 +4287,8 @@ export interface SubscriptionBillingDateUpdatedEnvelope {
|
|
|
3740
4287
|
* @permissionId subscriptions.view
|
|
3741
4288
|
* @webhook
|
|
3742
4289
|
* @eventType wix.billing.v1.subscription_billing_date_updated
|
|
4290
|
+
* @serviceIdentifier com.wixpress.billing.subscriptions.api.v1.SubscriptionsService
|
|
4291
|
+
* @slug billing_date_updated
|
|
3743
4292
|
* @documentationMaturity preview
|
|
3744
4293
|
*/
|
|
3745
4294
|
export declare function onSubscriptionBillingDateUpdated(handler: (event: SubscriptionBillingDateUpdatedEnvelope) => void | Promise<void>): void;
|
|
@@ -3752,6 +4301,8 @@ export interface SubscriptionLatestInvoiceMarkedAsPaidEnvelope {
|
|
|
3752
4301
|
* @permissionId subscriptions.view
|
|
3753
4302
|
* @webhook
|
|
3754
4303
|
* @eventType wix.billing.v1.subscription_latest_invoice_marked_as_paid
|
|
4304
|
+
* @serviceIdentifier com.wixpress.billing.subscriptions.api.v1.SubscriptionsService
|
|
4305
|
+
* @slug latest_invoice_marked_as_paid
|
|
3755
4306
|
* @documentationMaturity preview
|
|
3756
4307
|
*/
|
|
3757
4308
|
export declare function onSubscriptionLatestInvoiceMarkedAsPaid(handler: (event: SubscriptionLatestInvoiceMarkedAsPaidEnvelope) => void | Promise<void>): void;
|
|
@@ -3766,6 +4317,8 @@ export interface SubscriptionPauseScheduleCanceledEnvelope {
|
|
|
3766
4317
|
* @permissionId subscriptions.view
|
|
3767
4318
|
* @webhook
|
|
3768
4319
|
* @eventType wix.billing.v1.subscription_pause_schedule_canceled
|
|
4320
|
+
* @serviceIdentifier com.wixpress.billing.subscriptions.api.v1.SubscriptionsService
|
|
4321
|
+
* @slug pause_schedule_canceled
|
|
3769
4322
|
* @documentationMaturity preview
|
|
3770
4323
|
*/
|
|
3771
4324
|
export declare function onSubscriptionPauseScheduleCanceled(handler: (event: SubscriptionPauseScheduleCanceledEnvelope) => void | Promise<void>): void;
|
|
@@ -3780,6 +4333,8 @@ export interface SubscriptionPauseScheduledEnvelope {
|
|
|
3780
4333
|
* @permissionId subscriptions.view
|
|
3781
4334
|
* @webhook
|
|
3782
4335
|
* @eventType wix.billing.v1.subscription_pause_scheduled
|
|
4336
|
+
* @serviceIdentifier com.wixpress.billing.subscriptions.api.v1.SubscriptionsService
|
|
4337
|
+
* @slug pause_scheduled
|
|
3783
4338
|
* @documentationMaturity preview
|
|
3784
4339
|
*/
|
|
3785
4340
|
export declare function onSubscriptionPauseScheduled(handler: (event: SubscriptionPauseScheduledEnvelope) => void | Promise<void>): void;
|
|
@@ -3794,6 +4349,8 @@ export interface SubscriptionPausedEnvelope {
|
|
|
3794
4349
|
* @permissionId subscriptions.view
|
|
3795
4350
|
* @webhook
|
|
3796
4351
|
* @eventType wix.billing.v1.subscription_paused
|
|
4352
|
+
* @serviceIdentifier com.wixpress.billing.subscriptions.api.v1.SubscriptionsService
|
|
4353
|
+
* @slug paused
|
|
3797
4354
|
* @documentationMaturity preview
|
|
3798
4355
|
*/
|
|
3799
4356
|
export declare function onSubscriptionPaused(handler: (event: SubscriptionPausedEnvelope) => void | Promise<void>): void;
|
|
@@ -3808,6 +4365,8 @@ export interface SubscriptionResumeScheduleCanceledEnvelope {
|
|
|
3808
4365
|
* @permissionId subscriptions.view
|
|
3809
4366
|
* @webhook
|
|
3810
4367
|
* @eventType wix.billing.v1.subscription_resume_schedule_canceled
|
|
4368
|
+
* @serviceIdentifier com.wixpress.billing.subscriptions.api.v1.SubscriptionsService
|
|
4369
|
+
* @slug resume_schedule_canceled
|
|
3811
4370
|
* @documentationMaturity preview
|
|
3812
4371
|
*/
|
|
3813
4372
|
export declare function onSubscriptionResumeScheduleCanceled(handler: (event: SubscriptionResumeScheduleCanceledEnvelope) => void | Promise<void>): void;
|
|
@@ -3822,6 +4381,8 @@ export interface SubscriptionResumeScheduledEnvelope {
|
|
|
3822
4381
|
* @permissionId subscriptions.view
|
|
3823
4382
|
* @webhook
|
|
3824
4383
|
* @eventType wix.billing.v1.subscription_resume_scheduled
|
|
4384
|
+
* @serviceIdentifier com.wixpress.billing.subscriptions.api.v1.SubscriptionsService
|
|
4385
|
+
* @slug resume_scheduled
|
|
3825
4386
|
* @documentationMaturity preview
|
|
3826
4387
|
*/
|
|
3827
4388
|
export declare function onSubscriptionResumeScheduled(handler: (event: SubscriptionResumeScheduledEnvelope) => void | Promise<void>): void;
|
|
@@ -3836,25 +4397,11 @@ export interface SubscriptionResumedEnvelope {
|
|
|
3836
4397
|
* @permissionId subscriptions.view
|
|
3837
4398
|
* @webhook
|
|
3838
4399
|
* @eventType wix.billing.v1.subscription_resumed
|
|
4400
|
+
* @serviceIdentifier com.wixpress.billing.subscriptions.api.v1.SubscriptionsService
|
|
4401
|
+
* @slug resumed
|
|
3839
4402
|
* @documentationMaturity preview
|
|
3840
4403
|
*/
|
|
3841
4404
|
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
4405
|
/**
|
|
3859
4406
|
* Identity must be a site member and customer subscription belongs to
|
|
3860
4407
|
* @public
|
|
@@ -3910,7 +4457,10 @@ export declare function customerExtendSubscription(_id: string, options?: Custom
|
|
|
3910
4457
|
export interface CustomerExtendSubscriptionOptions {
|
|
3911
4458
|
/** Optional action reason message */
|
|
3912
4459
|
reason?: string | null;
|
|
3913
|
-
/**
|
|
4460
|
+
/**
|
|
4461
|
+
* For termed - Subscription end date will be updated with the extension period and number of cycles will be added
|
|
4462
|
+
* @min 1
|
|
4463
|
+
*/
|
|
3914
4464
|
billingCyclesToAdd: number | null;
|
|
3915
4465
|
}
|
|
3916
4466
|
/**
|
|
@@ -3961,6 +4511,20 @@ export interface CustomerInitiatePaymentMethodSetupOptions {
|
|
|
3961
4511
|
paymentMode?: PaymentMode;
|
|
3962
4512
|
paymentSettings?: PaymentSettings;
|
|
3963
4513
|
}
|
|
4514
|
+
/**
|
|
4515
|
+
* This used only for automation and permitted tenants (QA & testing)
|
|
4516
|
+
* @public
|
|
4517
|
+
* @documentationMaturity preview
|
|
4518
|
+
* @requiredField options.tenantId
|
|
4519
|
+
* @requiredField subscriptionId
|
|
4520
|
+
* @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsBackOfficeService.PayCycle
|
|
4521
|
+
*/
|
|
4522
|
+
export declare function payCycle(subscriptionId: string, options?: PayCycleOptions): Promise<PayCycleResponse & PayCycleResponseNonNullableFields>;
|
|
4523
|
+
export interface PayCycleOptions {
|
|
4524
|
+
paymentTestMode?: PaymentTestMode;
|
|
4525
|
+
/** @format GUID */
|
|
4526
|
+
tenantId: string;
|
|
4527
|
+
}
|
|
3964
4528
|
/**
|
|
3965
4529
|
* Returns a single subscription by its id
|
|
3966
4530
|
* @public
|
|
@@ -4102,7 +4666,7 @@ export declare function querySubscriptions(query: QueryV2): Promise<QuerySubscri
|
|
|
4102
4666
|
* @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.SearchSubscriptions
|
|
4103
4667
|
*/
|
|
4104
4668
|
export declare function searchSubscriptions(options?: SearchSubscriptionsOptions): Promise<SearchSubscriptionsResponse & SearchSubscriptionsResponseNonNullableFields>;
|
|
4105
|
-
export interface SearchSubscriptionsOptions extends
|
|
4669
|
+
export interface SearchSubscriptionsOptions extends SearchSubscriptionsOptionsPagingMethodOneOf {
|
|
4106
4670
|
/** A filter object */
|
|
4107
4671
|
filter?: any;
|
|
4108
4672
|
/** Limit number of results and enable to skip rows. The default limit is 25. */
|
|
@@ -4112,6 +4676,13 @@ export interface SearchSubscriptionsOptions extends SearchSubscriptionsRequestPa
|
|
|
4112
4676
|
/** A Sorting option by field name and order. */
|
|
4113
4677
|
sorting?: SortingClauses;
|
|
4114
4678
|
}
|
|
4679
|
+
/** @oneof */
|
|
4680
|
+
export interface SearchSubscriptionsOptionsPagingMethodOneOf {
|
|
4681
|
+
/** Limit number of results and enable to skip rows. The default limit is 25. */
|
|
4682
|
+
paging?: Paging;
|
|
4683
|
+
/** A Cursor option for efficient paging. Pass this field from the previous search response to continue to the next page. */
|
|
4684
|
+
cursor?: CursorPaging;
|
|
4685
|
+
}
|
|
4115
4686
|
/**
|
|
4116
4687
|
* Counts subscriptions given the provided filters. Returns the total number
|
|
4117
4688
|
* of subscriptions matching the filters and a count per status.
|
|
@@ -4190,10 +4761,11 @@ export declare function turnOffSubscriptionAutoRenewal(_id: string, actionContex
|
|
|
4190
4761
|
* @targetRemovalDate 2025-09-30
|
|
4191
4762
|
*/
|
|
4192
4763
|
export declare function markLatestInvoiceAsPaid(subscriptionId: string): Promise<MarkLatestInvoiceAsPaidResponse & MarkLatestInvoiceAsPaidResponseNonNullableFields>;
|
|
4193
|
-
export interface
|
|
4764
|
+
export interface MarkBillingCycleAsPaidOptions {
|
|
4194
4765
|
/**
|
|
4195
4766
|
* The subscription cycle for which the invoice is to be marked as paid.
|
|
4196
4767
|
* If left empty, the most recent cycle will be selected.
|
|
4768
|
+
* @min 1
|
|
4197
4769
|
*/
|
|
4198
4770
|
paidCycle?: number | null;
|
|
4199
4771
|
}
|
|
@@ -4215,6 +4787,7 @@ export declare function getSubscriptionsStats(): Promise<GetSubscriptionsStatsRe
|
|
|
4215
4787
|
* @documentationMaturity preview
|
|
4216
4788
|
* @requiredField _id
|
|
4217
4789
|
* @requiredField actionContext
|
|
4790
|
+
* @requiredField extendPolicy
|
|
4218
4791
|
* @permissionId subscriptions.manage
|
|
4219
4792
|
* @permissionScope Manage Orders
|
|
4220
4793
|
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
@@ -4222,10 +4795,23 @@ export declare function getSubscriptionsStats(): Promise<GetSubscriptionsStatsRe
|
|
|
4222
4795
|
* @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.ExtendSubscription
|
|
4223
4796
|
*/
|
|
4224
4797
|
export declare function extendSubscription(_id: string, actionContext: ActionContext, options?: ExtendSubscriptionOptions): Promise<ExtendSubscriptionResponse & ExtendSubscriptionResponseNonNullableFields>;
|
|
4225
|
-
export interface ExtendSubscriptionOptions extends
|
|
4798
|
+
export interface ExtendSubscriptionOptions extends ExtendSubscriptionOptionsExtendPolicyOneOf {
|
|
4799
|
+
/** User won't be charged for additional period added on top of subscription end date. */
|
|
4800
|
+
extensionPeriod?: Duration;
|
|
4801
|
+
/**
|
|
4802
|
+
* user will be charged for billing cycles added
|
|
4803
|
+
* @min 1
|
|
4804
|
+
*/
|
|
4805
|
+
extensionBillingCycles?: number;
|
|
4806
|
+
}
|
|
4807
|
+
/** @oneof */
|
|
4808
|
+
export interface ExtendSubscriptionOptionsExtendPolicyOneOf {
|
|
4226
4809
|
/** User won't be charged for additional period added on top of subscription end date. */
|
|
4227
4810
|
extensionPeriod?: Duration;
|
|
4228
|
-
/**
|
|
4811
|
+
/**
|
|
4812
|
+
* user will be charged for billing cycles added
|
|
4813
|
+
* @min 1
|
|
4814
|
+
*/
|
|
4229
4815
|
extensionBillingCycles?: number;
|
|
4230
4816
|
}
|
|
4231
4817
|
/** @public
|
|
@@ -4239,7 +4825,10 @@ export interface ExtendSubscriptionOptions extends ExtendSubscriptionRequestExte
|
|
|
4239
4825
|
*/
|
|
4240
4826
|
export declare function allowedActions(_id: string, options?: AllowedActionsOptions): Promise<AllowedActionsResponse & AllowedActionsResponseNonNullableFields>;
|
|
4241
4827
|
export interface AllowedActionsOptions {
|
|
4242
|
-
/**
|
|
4828
|
+
/**
|
|
4829
|
+
* List of additional fields to be included in the response.
|
|
4830
|
+
* @maxSize 1
|
|
4831
|
+
*/
|
|
4243
4832
|
fields?: RequestedFields[];
|
|
4244
4833
|
}
|
|
4245
4834
|
/**
|
|
@@ -4269,11 +4858,10 @@ export interface ListUpcomingChargesOptions {
|
|
|
4269
4858
|
* Returns all the charges applicable to a subscription based on the provided subscription information.
|
|
4270
4859
|
* @public
|
|
4271
4860
|
* @documentationMaturity preview
|
|
4272
|
-
* @requiredField
|
|
4273
|
-
* @requiredField
|
|
4274
|
-
* @requiredField
|
|
4275
|
-
* @requiredField
|
|
4276
|
-
* @requiredField options.subscriptionInfo.items.pricingModel
|
|
4861
|
+
* @requiredField subscription.subscriptionInfo
|
|
4862
|
+
* @requiredField subscription.subscriptionInfo.billingSettings
|
|
4863
|
+
* @requiredField subscription.subscriptionInfo.items
|
|
4864
|
+
* @requiredField subscription.subscriptionInfo.items.pricingModel
|
|
4277
4865
|
* @permissionId subscriptions.view
|
|
4278
4866
|
* @permissionScope Manage Events
|
|
4279
4867
|
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
@@ -4284,7 +4872,12 @@ export interface ListUpcomingChargesOptions {
|
|
|
4284
4872
|
* @targetRemovalDate 2025-06-30
|
|
4285
4873
|
*/
|
|
4286
4874
|
export declare function previewSubscriptionCharges(options: PreviewSubscriptionChargesOptions): Promise<PreviewSubscriptionChargesResponse & PreviewSubscriptionChargesResponseNonNullableFields>;
|
|
4287
|
-
export interface PreviewSubscriptionChargesOptions extends
|
|
4875
|
+
export interface PreviewSubscriptionChargesOptions extends PreviewSubscriptionChargesOptionsSubscriptionOneOf {
|
|
4876
|
+
/** Information about a non-existing subscription. */
|
|
4877
|
+
subscriptionInfo?: SubscriptionInfo;
|
|
4878
|
+
}
|
|
4879
|
+
/** @oneof */
|
|
4880
|
+
export interface PreviewSubscriptionChargesOptionsSubscriptionOneOf {
|
|
4288
4881
|
/** Information about a non-existing subscription. */
|
|
4289
4882
|
subscriptionInfo?: SubscriptionInfo;
|
|
4290
4883
|
}
|
|
@@ -4294,11 +4887,12 @@ export interface PreviewSubscriptionChargesOptions extends PreviewSubscriptionCh
|
|
|
4294
4887
|
* @public
|
|
4295
4888
|
* @documentationMaturity preview
|
|
4296
4889
|
* @requiredField options.subscriptionsBillingDetails.billingSettings
|
|
4297
|
-
* @requiredField options.subscriptionsBillingDetails.billingSettings.shippingCharges.tax
|
|
4890
|
+
* @requiredField options.subscriptionsBillingDetails.billingSettings.shippingCharges.tax.value
|
|
4298
4891
|
* @requiredField options.subscriptionsBillingDetails.externalId
|
|
4299
4892
|
* @requiredField options.subscriptionsBillingDetails.items
|
|
4300
4893
|
* @requiredField options.subscriptionsBillingDetails.items.pricingModel
|
|
4301
|
-
* @requiredField options.subscriptionsBillingDetails.items.
|
|
4894
|
+
* @requiredField options.subscriptionsBillingDetails.items.pricingModel.model
|
|
4895
|
+
* @requiredField options.subscriptionsBillingDetails.items.tax.value
|
|
4302
4896
|
* @permissionId subscriptions.view
|
|
4303
4897
|
* @permissionScope Manage Events
|
|
4304
4898
|
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
@@ -4307,7 +4901,11 @@ export interface PreviewSubscriptionChargesOptions extends PreviewSubscriptionCh
|
|
|
4307
4901
|
*/
|
|
4308
4902
|
export declare function previewSubscriptionsCharges(options?: PreviewSubscriptionsChargesOptions): Promise<PreviewSubscriptionsChargesResponse & PreviewSubscriptionsChargesResponseNonNullableFields>;
|
|
4309
4903
|
export interface PreviewSubscriptionsChargesOptions {
|
|
4310
|
-
/**
|
|
4904
|
+
/**
|
|
4905
|
+
* Information required to calculate the preview charges for the subscriptions, including an identifier.
|
|
4906
|
+
* @minSize 1
|
|
4907
|
+
* @maxSize 10
|
|
4908
|
+
*/
|
|
4311
4909
|
subscriptionsBillingDetails?: SubscriptionBillingDetails[];
|
|
4312
4910
|
/**
|
|
4313
4911
|
* Specifies the number of upcoming billing charges to preview for all subscriptions in the order.
|
|
@@ -4320,6 +4918,8 @@ export interface PreviewSubscriptionsChargesOptions {
|
|
|
4320
4918
|
* in this case, charges for cycle 1 through 3.
|
|
4321
4919
|
* If there is a single charge for a subscription, meaning that subscription price remains consistent across all cycles,
|
|
4322
4920
|
* then even if future_charges_count is set, it will be ignored and the only charge this subscription has will be returned.
|
|
4921
|
+
* @min 1
|
|
4922
|
+
* @max 10
|
|
4323
4923
|
*/
|
|
4324
4924
|
numberOfNextRecurringCharges?: number | null;
|
|
4325
4925
|
}
|
|
@@ -4339,17 +4939,20 @@ export interface InitiatePaymentMethodSetupOptions {
|
|
|
4339
4939
|
paymentMode?: PaymentMode;
|
|
4340
4940
|
paymentSettings?: PaymentSettings;
|
|
4341
4941
|
}
|
|
4342
|
-
/**
|
|
4343
|
-
* This used only for automation and permitted tenants (QA & testing)
|
|
4344
|
-
* @public
|
|
4942
|
+
/** @public
|
|
4345
4943
|
* @documentationMaturity preview
|
|
4346
|
-
* @requiredField options.tenantId
|
|
4347
4944
|
* @requiredField subscriptionId
|
|
4348
|
-
* @
|
|
4945
|
+
* @permissionId subscriptions.view
|
|
4946
|
+
* @permissionScope Manage Events
|
|
4947
|
+
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
4948
|
+
* @applicableIdentity APP
|
|
4949
|
+
* @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionHistoryService.ListSubscriptionHistory
|
|
4349
4950
|
*/
|
|
4350
|
-
export declare function
|
|
4351
|
-
export interface
|
|
4352
|
-
|
|
4353
|
-
|
|
4951
|
+
export declare function listSubscriptionHistory(subscriptionId: string, options?: ListSubscriptionHistoryOptions): Promise<ListSubscriptionHistoryResponse & ListSubscriptionHistoryResponseNonNullableFields>;
|
|
4952
|
+
export interface ListSubscriptionHistoryOptions {
|
|
4953
|
+
/** Determines the type of view for the history: either a comprehensive backoffice view or a user-centric view. */
|
|
4954
|
+
mode?: HistoryViewMode;
|
|
4955
|
+
/** Cursor for efficient paging. If paging through results, pass this field from the previous search response to continue to the next page. */
|
|
4956
|
+
cursor?: CursorPaging;
|
|
4354
4957
|
}
|
|
4355
4958
|
export {};
|