@wix/auto_sdk_subscription_subscriptions 1.0.7 → 1.0.8
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/index.d.ts +379 -1
- package/build/cjs/index.js +5651 -15
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +4678 -1
- package/build/cjs/index.typings.js +4714 -15
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +2373 -1
- package/build/cjs/meta.js +3612 -15
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +379 -0
- package/build/es/index.mjs +5549 -0
- package/build/es/index.mjs.map +1 -0
- package/build/{internal/cjs/src/billing-v1-subscription-subscriptions.universal.d.ts → es/index.typings.d.mts} +790 -1149
- package/build/es/index.typings.mjs +4625 -0
- package/build/es/index.typings.mjs.map +1 -0
- package/build/es/meta.d.mts +2373 -0
- package/build/es/meta.mjs +3557 -0
- package/build/es/meta.mjs.map +1 -0
- package/build/internal/cjs/index.d.ts +403 -1
- package/build/internal/cjs/index.js +5651 -15
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +4702 -1
- package/build/internal/cjs/index.typings.js +4714 -15
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +2373 -1
- package/build/internal/cjs/meta.js +3612 -15
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +403 -0
- package/build/internal/es/index.mjs +5549 -0
- package/build/internal/es/index.mjs.map +1 -0
- package/build/internal/es/{src/billing-v1-subscription-subscriptions.universal.d.ts → index.typings.d.mts} +793 -1128
- package/build/internal/es/index.typings.mjs +4625 -0
- package/build/internal/es/index.typings.mjs.map +1 -0
- package/build/internal/es/meta.d.mts +2373 -0
- package/build/internal/es/meta.mjs +3557 -0
- package/build/internal/es/meta.mjs.map +1 -0
- package/package.json +12 -10
- package/build/cjs/src/billing-v1-subscription-subscriptions.context.d.ts +0 -99
- package/build/cjs/src/billing-v1-subscription-subscriptions.context.js +0 -142
- package/build/cjs/src/billing-v1-subscription-subscriptions.context.js.map +0 -1
- package/build/cjs/src/billing-v1-subscription-subscriptions.http.d.ts +0 -134
- package/build/cjs/src/billing-v1-subscription-subscriptions.http.js +0 -3048
- package/build/cjs/src/billing-v1-subscription-subscriptions.http.js.map +0 -1
- package/build/cjs/src/billing-v1-subscription-subscriptions.meta.d.ts +0 -94
- package/build/cjs/src/billing-v1-subscription-subscriptions.meta.js +0 -636
- package/build/cjs/src/billing-v1-subscription-subscriptions.meta.js.map +0 -1
- package/build/cjs/src/billing-v1-subscription-subscriptions.public.d.ts +0 -273
- package/build/cjs/src/billing-v1-subscription-subscriptions.public.js +0 -769
- package/build/cjs/src/billing-v1-subscription-subscriptions.public.js.map +0 -1
- package/build/cjs/src/billing-v1-subscription-subscriptions.types.d.ts +0 -4203
- package/build/cjs/src/billing-v1-subscription-subscriptions.types.js +0 -347
- package/build/cjs/src/billing-v1-subscription-subscriptions.types.js.map +0 -1
- package/build/cjs/src/billing-v1-subscription-subscriptions.universal.d.ts +0 -5013
- package/build/cjs/src/billing-v1-subscription-subscriptions.universal.js +0 -1997
- package/build/cjs/src/billing-v1-subscription-subscriptions.universal.js.map +0 -1
- package/build/es/index.d.ts +0 -1
- package/build/es/index.js +0 -2
- package/build/es/index.js.map +0 -1
- package/build/es/index.typings.d.ts +0 -1
- package/build/es/index.typings.js +0 -2
- package/build/es/index.typings.js.map +0 -1
- package/build/es/meta.d.ts +0 -1
- package/build/es/meta.js +0 -2
- package/build/es/meta.js.map +0 -1
- package/build/es/src/billing-v1-subscription-subscriptions.context.d.ts +0 -99
- package/build/es/src/billing-v1-subscription-subscriptions.context.js +0 -101
- package/build/es/src/billing-v1-subscription-subscriptions.context.js.map +0 -1
- package/build/es/src/billing-v1-subscription-subscriptions.http.d.ts +0 -134
- package/build/es/src/billing-v1-subscription-subscriptions.http.js +0 -3013
- package/build/es/src/billing-v1-subscription-subscriptions.http.js.map +0 -1
- package/build/es/src/billing-v1-subscription-subscriptions.meta.d.ts +0 -94
- package/build/es/src/billing-v1-subscription-subscriptions.meta.js +0 -578
- package/build/es/src/billing-v1-subscription-subscriptions.meta.js.map +0 -1
- package/build/es/src/billing-v1-subscription-subscriptions.public.d.ts +0 -273
- package/build/es/src/billing-v1-subscription-subscriptions.public.js +0 -696
- package/build/es/src/billing-v1-subscription-subscriptions.public.js.map +0 -1
- package/build/es/src/billing-v1-subscription-subscriptions.types.d.ts +0 -4203
- package/build/es/src/billing-v1-subscription-subscriptions.types.js +0 -344
- package/build/es/src/billing-v1-subscription-subscriptions.types.js.map +0 -1
- package/build/es/src/billing-v1-subscription-subscriptions.universal.d.ts +0 -5013
- package/build/es/src/billing-v1-subscription-subscriptions.universal.js +0 -1938
- package/build/es/src/billing-v1-subscription-subscriptions.universal.js.map +0 -1
- package/build/internal/cjs/src/billing-v1-subscription-subscriptions.context.d.ts +0 -101
- package/build/internal/cjs/src/billing-v1-subscription-subscriptions.context.js +0 -142
- package/build/internal/cjs/src/billing-v1-subscription-subscriptions.context.js.map +0 -1
- package/build/internal/cjs/src/billing-v1-subscription-subscriptions.http.d.ts +0 -134
- package/build/internal/cjs/src/billing-v1-subscription-subscriptions.http.js +0 -3048
- package/build/internal/cjs/src/billing-v1-subscription-subscriptions.http.js.map +0 -1
- package/build/internal/cjs/src/billing-v1-subscription-subscriptions.meta.d.ts +0 -94
- package/build/internal/cjs/src/billing-v1-subscription-subscriptions.meta.js +0 -636
- package/build/internal/cjs/src/billing-v1-subscription-subscriptions.meta.js.map +0 -1
- package/build/internal/cjs/src/billing-v1-subscription-subscriptions.public.d.ts +0 -293
- package/build/internal/cjs/src/billing-v1-subscription-subscriptions.public.js +0 -769
- package/build/internal/cjs/src/billing-v1-subscription-subscriptions.public.js.map +0 -1
- package/build/internal/cjs/src/billing-v1-subscription-subscriptions.types.d.ts +0 -4203
- package/build/internal/cjs/src/billing-v1-subscription-subscriptions.types.js +0 -347
- package/build/internal/cjs/src/billing-v1-subscription-subscriptions.types.js.map +0 -1
- package/build/internal/cjs/src/billing-v1-subscription-subscriptions.universal.js +0 -1997
- package/build/internal/cjs/src/billing-v1-subscription-subscriptions.universal.js.map +0 -1
- package/build/internal/es/index.d.ts +0 -1
- package/build/internal/es/index.js +0 -2
- package/build/internal/es/index.js.map +0 -1
- package/build/internal/es/index.typings.d.ts +0 -1
- package/build/internal/es/index.typings.js +0 -2
- package/build/internal/es/index.typings.js.map +0 -1
- package/build/internal/es/meta.d.ts +0 -1
- package/build/internal/es/meta.js +0 -2
- package/build/internal/es/meta.js.map +0 -1
- package/build/internal/es/src/billing-v1-subscription-subscriptions.context.d.ts +0 -101
- package/build/internal/es/src/billing-v1-subscription-subscriptions.context.js +0 -101
- package/build/internal/es/src/billing-v1-subscription-subscriptions.context.js.map +0 -1
- package/build/internal/es/src/billing-v1-subscription-subscriptions.http.d.ts +0 -134
- package/build/internal/es/src/billing-v1-subscription-subscriptions.http.js +0 -3013
- package/build/internal/es/src/billing-v1-subscription-subscriptions.http.js.map +0 -1
- package/build/internal/es/src/billing-v1-subscription-subscriptions.meta.d.ts +0 -94
- package/build/internal/es/src/billing-v1-subscription-subscriptions.meta.js +0 -578
- package/build/internal/es/src/billing-v1-subscription-subscriptions.meta.js.map +0 -1
- package/build/internal/es/src/billing-v1-subscription-subscriptions.public.d.ts +0 -293
- package/build/internal/es/src/billing-v1-subscription-subscriptions.public.js +0 -696
- package/build/internal/es/src/billing-v1-subscription-subscriptions.public.js.map +0 -1
- package/build/internal/es/src/billing-v1-subscription-subscriptions.types.d.ts +0 -4203
- package/build/internal/es/src/billing-v1-subscription-subscriptions.types.js +0 -344
- package/build/internal/es/src/billing-v1-subscription-subscriptions.types.js.map +0 -1
- package/build/internal/es/src/billing-v1-subscription-subscriptions.universal.js +0 -1938
- package/build/internal/es/src/billing-v1-subscription-subscriptions.universal.js.map +0 -1
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { NonNullablePaths } from '@wix/sdk-types';
|
|
2
|
+
|
|
3
|
+
interface Subscription {
|
|
2
4
|
/**
|
|
3
5
|
* Subscription's unique id. Automatically generated and read-only.
|
|
4
6
|
* @format GUID
|
|
@@ -50,7 +52,7 @@ export interface Subscription {
|
|
|
50
52
|
* Status of subscription
|
|
51
53
|
* @readonly
|
|
52
54
|
*/
|
|
53
|
-
status?:
|
|
55
|
+
status?: SubscriptionStatusEnumSubscriptionStatusWithLiterals;
|
|
54
56
|
/** Billing details parameters including schedule, currency, etc. */
|
|
55
57
|
billingSettings?: BillingSettings;
|
|
56
58
|
/**
|
|
@@ -112,13 +114,13 @@ export interface Subscription {
|
|
|
112
114
|
*/
|
|
113
115
|
items?: Item[];
|
|
114
116
|
}
|
|
115
|
-
|
|
117
|
+
interface BusinessOrigin {
|
|
116
118
|
/** @format GUID */
|
|
117
119
|
appId?: string | null;
|
|
118
120
|
/** @format GUID */
|
|
119
121
|
entityId?: string | null;
|
|
120
122
|
}
|
|
121
|
-
|
|
123
|
+
interface Customer extends CustomerIdOneOf {
|
|
122
124
|
/**
|
|
123
125
|
* Visitor ID of the customer. Available when the customer is an anonymous
|
|
124
126
|
* site visitor.
|
|
@@ -144,7 +146,7 @@ export interface Customer extends CustomerIdOneOf {
|
|
|
144
146
|
accountId?: string;
|
|
145
147
|
}
|
|
146
148
|
/** @oneof */
|
|
147
|
-
|
|
149
|
+
interface CustomerIdOneOf {
|
|
148
150
|
/**
|
|
149
151
|
* Visitor ID of the customer. Available when the customer is an anonymous
|
|
150
152
|
* site visitor.
|
|
@@ -169,7 +171,7 @@ export interface CustomerIdOneOf {
|
|
|
169
171
|
*/
|
|
170
172
|
accountId?: string;
|
|
171
173
|
}
|
|
172
|
-
|
|
174
|
+
declare enum SubscriptionStatusEnumSubscriptionStatus {
|
|
173
175
|
UNKNOWN = "UNKNOWN",
|
|
174
176
|
/** Subscription created in this status, but hasn't been paid for yet. Filtered out from subscriptions querying. */
|
|
175
177
|
DRAFT = "DRAFT",
|
|
@@ -184,7 +186,9 @@ export declare enum SubscriptionStatusEnumSubscriptionStatus {
|
|
|
184
186
|
/** Subscription was canceled or auto-renew off. Ended before its time. */
|
|
185
187
|
CANCELED = "CANCELED"
|
|
186
188
|
}
|
|
187
|
-
|
|
189
|
+
/** @enumType */
|
|
190
|
+
type SubscriptionStatusEnumSubscriptionStatusWithLiterals = SubscriptionStatusEnumSubscriptionStatus | 'UNKNOWN' | 'DRAFT' | 'PENDING' | 'ACTIVE' | 'PAUSED' | 'ENDED' | 'CANCELED';
|
|
191
|
+
interface BillingSettings {
|
|
188
192
|
/**
|
|
189
193
|
* Currency of all subscription items prices. Three letter ISO currency code. https://en.wikipedia.org/wiki/ISO_4217
|
|
190
194
|
* @format CURRENCY
|
|
@@ -193,7 +197,7 @@ export interface BillingSettings {
|
|
|
193
197
|
/** customer payment source to make recurring payments with */
|
|
194
198
|
paymentMethod?: PaymentMethod;
|
|
195
199
|
/** Instructs how payments will be collected. */
|
|
196
|
-
collectionMethod?:
|
|
200
|
+
collectionMethod?: CollectionMethodEnumCollectionMethodWithLiterals;
|
|
197
201
|
/**
|
|
198
202
|
* Duration of cycle. For example, 1 MONTH, 2 WEEKS, 7 DAYS, 1 YEAR etc.
|
|
199
203
|
* Shortest supported cycle duration is 7 days.
|
|
@@ -243,14 +247,14 @@ export interface BillingSettings {
|
|
|
243
247
|
*/
|
|
244
248
|
externalCollectionDetails?: ExternalCollectionDetails;
|
|
245
249
|
}
|
|
246
|
-
|
|
250
|
+
interface PaymentMethod {
|
|
247
251
|
/**
|
|
248
252
|
* reference to payment source id stored in payments system
|
|
249
253
|
* @format GUID
|
|
250
254
|
*/
|
|
251
255
|
_id?: string;
|
|
252
256
|
}
|
|
253
|
-
|
|
257
|
+
declare enum CollectionMethodEnumCollectionMethod {
|
|
254
258
|
UNKNOWN = "UNKNOWN",
|
|
255
259
|
/** Subscriber automatically charged */
|
|
256
260
|
AUTO_CHARGE = "AUTO_CHARGE",
|
|
@@ -263,23 +267,27 @@ export declare enum CollectionMethodEnumCollectionMethod {
|
|
|
263
267
|
/** Indicates the product has a zero amount, meaning its free with no payment required. */
|
|
264
268
|
FREE = "FREE"
|
|
265
269
|
}
|
|
266
|
-
|
|
270
|
+
/** @enumType */
|
|
271
|
+
type CollectionMethodEnumCollectionMethodWithLiterals = CollectionMethodEnumCollectionMethod | 'UNKNOWN' | 'AUTO_CHARGE' | 'OFFLINE' | 'SEND_INVOICE' | 'EXTERNAL' | 'FREE';
|
|
272
|
+
interface Duration {
|
|
267
273
|
/** Duration unit: DAY, WEEK, MONTH, YEAR */
|
|
268
|
-
unit?:
|
|
274
|
+
unit?: DurationUnitWithLiterals;
|
|
269
275
|
/**
|
|
270
276
|
* Amount of units. For example, 1 MONTH, 1 YEAR, 2 WEEKS, etc. Optional. Default is 1.
|
|
271
277
|
* @min 1
|
|
272
278
|
*/
|
|
273
279
|
count?: number | null;
|
|
274
280
|
}
|
|
275
|
-
|
|
281
|
+
declare enum DurationUnit {
|
|
276
282
|
UNKNOWN = "UNKNOWN",
|
|
277
283
|
DAY = "DAY",
|
|
278
284
|
WEEK = "WEEK",
|
|
279
285
|
MONTH = "MONTH",
|
|
280
286
|
YEAR = "YEAR"
|
|
281
287
|
}
|
|
282
|
-
|
|
288
|
+
/** @enumType */
|
|
289
|
+
type DurationUnitWithLiterals = DurationUnit | 'UNKNOWN' | 'DAY' | 'WEEK' | 'MONTH' | 'YEAR';
|
|
290
|
+
interface CustomBillingSchedule {
|
|
283
291
|
/**
|
|
284
292
|
* Amount of cycles to be paid on Subscription creation, currently only cycles_to_pay_on_creation equals to 1 is supported
|
|
285
293
|
* When used with Subscription.start_date, Subscription cycles will be paid on creation but Subscription will be activated in the future
|
|
@@ -288,13 +296,13 @@ export interface CustomBillingSchedule {
|
|
|
288
296
|
*/
|
|
289
297
|
cyclesToPayOnCreation?: number | null;
|
|
290
298
|
}
|
|
291
|
-
|
|
299
|
+
interface FullAddressDetails {
|
|
292
300
|
/** Details about the person associated with the address. */
|
|
293
301
|
contactDetails?: FullAddressContactDetails;
|
|
294
302
|
/** Information about the address. */
|
|
295
303
|
address?: Address;
|
|
296
304
|
}
|
|
297
|
-
|
|
305
|
+
interface FullAddressContactDetails {
|
|
298
306
|
/** First name of the contact. */
|
|
299
307
|
firstName?: string | null;
|
|
300
308
|
/** Last name of the contact. */
|
|
@@ -312,7 +320,7 @@ export interface FullAddressContactDetails {
|
|
|
312
320
|
*/
|
|
313
321
|
email?: string | null;
|
|
314
322
|
}
|
|
315
|
-
|
|
323
|
+
interface Address extends AddressStreetOneOf {
|
|
316
324
|
/** Street name and number. */
|
|
317
325
|
streetAddress?: StreetAddress;
|
|
318
326
|
/** Main address line, usually street and number as free text. */
|
|
@@ -335,23 +343,23 @@ export interface Address extends AddressStreetOneOf {
|
|
|
335
343
|
postalCode?: string | null;
|
|
336
344
|
}
|
|
337
345
|
/** @oneof */
|
|
338
|
-
|
|
346
|
+
interface AddressStreetOneOf {
|
|
339
347
|
/** Street name and number. */
|
|
340
348
|
streetAddress?: StreetAddress;
|
|
341
349
|
/** Main address line, usually street and number as free text. */
|
|
342
350
|
addressLine?: string | null;
|
|
343
351
|
}
|
|
344
|
-
|
|
352
|
+
interface StreetAddress {
|
|
345
353
|
/** Street number. */
|
|
346
354
|
number?: string;
|
|
347
355
|
/** Street name. */
|
|
348
356
|
name?: string;
|
|
349
357
|
}
|
|
350
|
-
|
|
358
|
+
interface TaxSettings {
|
|
351
359
|
/** If true then taxes are included in given prices */
|
|
352
360
|
inclusive?: boolean;
|
|
353
361
|
}
|
|
354
|
-
|
|
362
|
+
interface AdditionalFee {
|
|
355
363
|
/**
|
|
356
364
|
* Name of the conditional fee.
|
|
357
365
|
*
|
|
@@ -378,7 +386,7 @@ export interface AdditionalFee {
|
|
|
378
386
|
* @replacedBy cycles
|
|
379
387
|
* @targetRemovalDate 2025-12-31
|
|
380
388
|
*/
|
|
381
|
-
trigger?:
|
|
389
|
+
trigger?: AdditionalFeeTriggerWithLiterals;
|
|
382
390
|
/** Information about the tax of the conditional fee. */
|
|
383
391
|
tax?: Tax;
|
|
384
392
|
/**
|
|
@@ -400,12 +408,14 @@ export interface AdditionalFee {
|
|
|
400
408
|
/** Indicates the source of the fee, Contains app_id and entity_id */
|
|
401
409
|
origin?: Origin;
|
|
402
410
|
}
|
|
403
|
-
|
|
411
|
+
declare enum AdditionalFeeTrigger {
|
|
404
412
|
UNKNOWN = "UNKNOWN",
|
|
405
413
|
/** Charge upon subscription first payment */
|
|
406
414
|
FIRST_PAYMENT = "FIRST_PAYMENT"
|
|
407
415
|
}
|
|
408
|
-
|
|
416
|
+
/** @enumType */
|
|
417
|
+
type AdditionalFeeTriggerWithLiterals = AdditionalFeeTrigger | 'UNKNOWN' | 'FIRST_PAYMENT';
|
|
418
|
+
interface Tax extends TaxValueOneOf {
|
|
409
419
|
/**
|
|
410
420
|
* Tax amount for the invoice's line item. Available when the tax is an
|
|
411
421
|
* amount and not a precentage.
|
|
@@ -428,7 +438,7 @@ export interface Tax extends TaxValueOneOf {
|
|
|
428
438
|
dynamic?: DynamicTax;
|
|
429
439
|
}
|
|
430
440
|
/** @oneof */
|
|
431
|
-
|
|
441
|
+
interface TaxValueOneOf {
|
|
432
442
|
/**
|
|
433
443
|
* Tax amount for the invoice's line item. Available when the tax is an
|
|
434
444
|
* amount and not a precentage.
|
|
@@ -450,16 +460,16 @@ export interface TaxValueOneOf {
|
|
|
450
460
|
/** Dynamic tax calculation */
|
|
451
461
|
dynamic?: DynamicTax;
|
|
452
462
|
}
|
|
453
|
-
|
|
463
|
+
interface DynamicTax {
|
|
454
464
|
/**
|
|
455
465
|
* Tax group ID used to calculate tax, default will be used if not available
|
|
456
466
|
* @format GUID
|
|
457
467
|
*/
|
|
458
468
|
taxGroupId?: string | null;
|
|
459
469
|
/** Taxable address used to calculate tax */
|
|
460
|
-
taxableAddressType?:
|
|
470
|
+
taxableAddressType?: TaxableAddressTypeWithLiterals;
|
|
461
471
|
}
|
|
462
|
-
|
|
472
|
+
declare enum TaxableAddressType {
|
|
463
473
|
UNKNOWN = "UNKNOWN",
|
|
464
474
|
/** Tax will be calculated using a single address */
|
|
465
475
|
BUSINESS = "BUSINESS",
|
|
@@ -468,7 +478,9 @@ export declare enum TaxableAddressType {
|
|
|
468
478
|
/** Tax will be calculated using multiple address (from BUSINESS to SHIPPING) */
|
|
469
479
|
SHIPPING = "SHIPPING"
|
|
470
480
|
}
|
|
471
|
-
|
|
481
|
+
/** @enumType */
|
|
482
|
+
type TaxableAddressTypeWithLiterals = TaxableAddressType | 'UNKNOWN' | 'BUSINESS' | 'BILLING' | 'SHIPPING';
|
|
483
|
+
interface Cycles {
|
|
472
484
|
/**
|
|
473
485
|
* The cycle will start. Minimum cycle number is 1
|
|
474
486
|
* @min 1
|
|
@@ -480,13 +492,13 @@ export interface Cycles {
|
|
|
480
492
|
*/
|
|
481
493
|
numberOfCycles?: number | null;
|
|
482
494
|
}
|
|
483
|
-
|
|
495
|
+
interface Origin {
|
|
484
496
|
/** @format GUID */
|
|
485
497
|
appId?: string;
|
|
486
498
|
/** @format GUID */
|
|
487
499
|
entityId?: string;
|
|
488
500
|
}
|
|
489
|
-
|
|
501
|
+
interface ShippingCharges {
|
|
490
502
|
/**
|
|
491
503
|
* Amount of the shipping fee in `0.00` format.
|
|
492
504
|
*
|
|
@@ -499,7 +511,7 @@ export interface ShippingCharges {
|
|
|
499
511
|
/** @maxSize 5 */
|
|
500
512
|
discounts?: Discount[];
|
|
501
513
|
}
|
|
502
|
-
|
|
514
|
+
interface Discount extends DiscountValueOneOf {
|
|
503
515
|
/**
|
|
504
516
|
* Discount amount.
|
|
505
517
|
* Available when the discount is an amount.
|
|
@@ -522,7 +534,7 @@ export interface Discount extends DiscountValueOneOf {
|
|
|
522
534
|
origin?: DiscountOrigin;
|
|
523
535
|
}
|
|
524
536
|
/** @oneof */
|
|
525
|
-
|
|
537
|
+
interface DiscountValueOneOf {
|
|
526
538
|
/**
|
|
527
539
|
* Discount amount.
|
|
528
540
|
* Available when the discount is an amount.
|
|
@@ -541,7 +553,7 @@ export interface DiscountValueOneOf {
|
|
|
541
553
|
*/
|
|
542
554
|
percentage?: string;
|
|
543
555
|
}
|
|
544
|
-
|
|
556
|
+
interface DiscountCycles {
|
|
545
557
|
/**
|
|
546
558
|
* The cycle from which the discount will start. Minimum cycle number is 1
|
|
547
559
|
* @min 1
|
|
@@ -553,17 +565,17 @@ export interface DiscountCycles {
|
|
|
553
565
|
*/
|
|
554
566
|
numberOfCycles?: number | null;
|
|
555
567
|
}
|
|
556
|
-
|
|
568
|
+
interface DiscountOrigin {
|
|
557
569
|
/** @format GUID */
|
|
558
570
|
appId?: string;
|
|
559
571
|
/** @format GUID */
|
|
560
572
|
entityId?: string;
|
|
561
573
|
}
|
|
562
|
-
|
|
574
|
+
interface ExternalCollectionDetails {
|
|
563
575
|
/** The name of the external collector. */
|
|
564
576
|
collectorName?: string;
|
|
565
577
|
}
|
|
566
|
-
|
|
578
|
+
interface BillingStatus {
|
|
567
579
|
/**
|
|
568
580
|
* Current cycle of subscription billing schedule. When billing schedule starts cycles start from 1
|
|
569
581
|
* and incremented each next billing cycle.
|
|
@@ -587,14 +599,14 @@ export interface BillingStatus {
|
|
|
587
599
|
gracePeriodData?: GracePeriodData;
|
|
588
600
|
}
|
|
589
601
|
/** TODO: fill docs */
|
|
590
|
-
|
|
602
|
+
interface PaymentData {
|
|
591
603
|
/** @format GUID */
|
|
592
604
|
invoiceId?: string;
|
|
593
|
-
paymentStatus?:
|
|
605
|
+
paymentStatus?: PaymentStatusWithLiterals;
|
|
594
606
|
totals?: Totals;
|
|
595
607
|
initialFailedPaymentDate?: Date | null;
|
|
596
608
|
}
|
|
597
|
-
|
|
609
|
+
declare enum PaymentStatus {
|
|
598
610
|
/** Payment status unknown */
|
|
599
611
|
UNKNOWN = "UNKNOWN",
|
|
600
612
|
/** Payment has not been paid */
|
|
@@ -604,7 +616,9 @@ export declare enum PaymentStatus {
|
|
|
604
616
|
/** Payment failed */
|
|
605
617
|
FAILED = "FAILED"
|
|
606
618
|
}
|
|
607
|
-
|
|
619
|
+
/** @enumType */
|
|
620
|
+
type PaymentStatusWithLiterals = PaymentStatus | 'UNKNOWN' | 'UNPAID' | 'PAID' | 'FAILED';
|
|
621
|
+
interface Totals {
|
|
608
622
|
/**
|
|
609
623
|
* Total price of the subscription that the customer must pay per billing
|
|
610
624
|
* cycle. Calculated as: `subtotal + tax + shippingFee + applicationFee + extraCharge - discount - credit`
|
|
@@ -662,7 +676,7 @@ export interface Totals {
|
|
|
662
676
|
*/
|
|
663
677
|
prorationTax?: string | null;
|
|
664
678
|
}
|
|
665
|
-
|
|
679
|
+
interface FreeTrialData {
|
|
666
680
|
/**
|
|
667
681
|
* Date when free trial starts
|
|
668
682
|
* @readonly
|
|
@@ -674,7 +688,7 @@ export interface FreeTrialData {
|
|
|
674
688
|
*/
|
|
675
689
|
endDate?: Date | null;
|
|
676
690
|
}
|
|
677
|
-
|
|
691
|
+
interface UpdateBillingDateData {
|
|
678
692
|
/**
|
|
679
693
|
* Date until the subscription is paid for.
|
|
680
694
|
* Different from `nextBillingDate` only when the next billing date is updated without immediately issuing a new invoice.
|
|
@@ -683,7 +697,7 @@ export interface UpdateBillingDateData {
|
|
|
683
697
|
/** Information about how to adjust the item's payment due to the update of the billing date */
|
|
684
698
|
proration?: Proration;
|
|
685
699
|
}
|
|
686
|
-
|
|
700
|
+
interface Proration extends ProrationTypeOneOf {
|
|
687
701
|
/**
|
|
688
702
|
* BASS automatically calculates the proration amount based on the number
|
|
689
703
|
* of days added to or removed from the current billing cycle. BASS uses
|
|
@@ -699,7 +713,7 @@ export interface Proration extends ProrationTypeOneOf {
|
|
|
699
713
|
custom?: CustomProration;
|
|
700
714
|
}
|
|
701
715
|
/** @oneof */
|
|
702
|
-
|
|
716
|
+
interface ProrationTypeOneOf {
|
|
703
717
|
/**
|
|
704
718
|
* BASS automatically calculates the proration amount based on the number
|
|
705
719
|
* of days added to or removed from the current billing cycle. BASS uses
|
|
@@ -714,9 +728,9 @@ export interface ProrationTypeOneOf {
|
|
|
714
728
|
/** Proration amount that's based on your custom calculation. */
|
|
715
729
|
custom?: CustomProration;
|
|
716
730
|
}
|
|
717
|
-
|
|
731
|
+
interface TimeBasedProration {
|
|
718
732
|
}
|
|
719
|
-
|
|
733
|
+
interface CustomProration extends CustomProrationAmountOneOf {
|
|
720
734
|
/**
|
|
721
735
|
* Proration charge amount that's based on your custom calculation.
|
|
722
736
|
* Increases the total that the customer must pay with the next invoice.
|
|
@@ -735,7 +749,7 @@ export interface CustomProration extends CustomProrationAmountOneOf {
|
|
|
735
749
|
credit?: string;
|
|
736
750
|
}
|
|
737
751
|
/** @oneof */
|
|
738
|
-
|
|
752
|
+
interface CustomProrationAmountOneOf {
|
|
739
753
|
/**
|
|
740
754
|
* Proration charge amount that's based on your custom calculation.
|
|
741
755
|
* Increases the total that the customer must pay with the next invoice.
|
|
@@ -753,7 +767,7 @@ export interface CustomProrationAmountOneOf {
|
|
|
753
767
|
*/
|
|
754
768
|
credit?: string;
|
|
755
769
|
}
|
|
756
|
-
|
|
770
|
+
interface GracePeriodData {
|
|
757
771
|
/**
|
|
758
772
|
* Grace period start date
|
|
759
773
|
* @readonly
|
|
@@ -767,10 +781,10 @@ export interface GracePeriodData {
|
|
|
767
781
|
/** Automatic retry data during grade period, if have any. Optional. */
|
|
768
782
|
automaticRetryData?: AutomaticRetryData;
|
|
769
783
|
}
|
|
770
|
-
|
|
784
|
+
interface AutomaticRetryData {
|
|
771
785
|
enabled?: boolean;
|
|
772
786
|
}
|
|
773
|
-
|
|
787
|
+
interface SubscriptionPolicies {
|
|
774
788
|
/** Subscription can be canceled by the customer who bought it */
|
|
775
789
|
customerCanCancel?: boolean;
|
|
776
790
|
/** Subscription end date can be updated by business */
|
|
@@ -778,23 +792,25 @@ export interface SubscriptionPolicies {
|
|
|
778
792
|
/** Subscription can be canceled not only immediately, but also at end of billing cycle by turning off auto-renew */
|
|
779
793
|
allowEndOfCycleCancellation?: boolean;
|
|
780
794
|
}
|
|
781
|
-
|
|
782
|
-
pausePolicy?:
|
|
783
|
-
pauseAt?:
|
|
795
|
+
interface PauseInfo {
|
|
796
|
+
pausePolicy?: PausePolicyWithLiterals;
|
|
797
|
+
pauseAt?: PauseAtWithLiterals;
|
|
784
798
|
startDate?: Date | null;
|
|
785
799
|
startCycle?: number | null;
|
|
786
|
-
resumeAt?:
|
|
800
|
+
resumeAt?: ResumeAtWithLiterals;
|
|
787
801
|
resumeDate?: Date | null;
|
|
788
802
|
resumeCycle?: number | null;
|
|
789
803
|
}
|
|
790
|
-
|
|
804
|
+
declare enum PausePolicy {
|
|
791
805
|
NONE = "NONE",
|
|
792
806
|
/** Pause the payment and the service. When resuming, the subscription end date is extended by the number of cycles postponed, and if the pause happened in a middle of a cycle, the payment date is postponed by the amount of days that already paid. */
|
|
793
807
|
SERVICE_AND_PAYMENTS = "SERVICE_AND_PAYMENTS",
|
|
794
808
|
/** Pause the service and continue the billing. When resuming, extend the service by the time that was paused */
|
|
795
809
|
SERVICE_ONLY = "SERVICE_ONLY"
|
|
796
810
|
}
|
|
797
|
-
|
|
811
|
+
/** @enumType */
|
|
812
|
+
type PausePolicyWithLiterals = PausePolicy | 'NONE' | 'SERVICE_AND_PAYMENTS' | 'SERVICE_ONLY';
|
|
813
|
+
declare enum PauseAt {
|
|
798
814
|
/** Cancel scheduled pause */
|
|
799
815
|
NONE = "NONE",
|
|
800
816
|
/** Pause the subscription now */
|
|
@@ -806,7 +822,9 @@ export declare enum PauseAt {
|
|
|
806
822
|
/** The number of cycles must be defined in Schedule.number_of_cycles */
|
|
807
823
|
NUMBER_OF_CYCLES_FROM_TODAY = "NUMBER_OF_CYCLES_FROM_TODAY"
|
|
808
824
|
}
|
|
809
|
-
|
|
825
|
+
/** @enumType */
|
|
826
|
+
type PauseAtWithLiterals = PauseAt | 'NONE' | 'IMMEDIATELY' | 'NEXT_BILLING_DATE' | 'SPECIFIC_DATE' | 'NUMBER_OF_CYCLES_FROM_TODAY';
|
|
827
|
+
declare enum ResumeAt {
|
|
810
828
|
/** Cancel scheduled resume */
|
|
811
829
|
NONE = "NONE",
|
|
812
830
|
/** Resume the subscription now */
|
|
@@ -816,22 +834,26 @@ export declare enum ResumeAt {
|
|
|
816
834
|
/** A specific date must be defined in Schedule.specific_date */
|
|
817
835
|
SPECIFIC_DATE = "SPECIFIC_DATE"
|
|
818
836
|
}
|
|
819
|
-
|
|
837
|
+
/** @enumType */
|
|
838
|
+
type ResumeAtWithLiterals = ResumeAt | 'NONE' | 'IMMEDIATELY' | 'NEXT_BILLING_DATE' | 'SPECIFIC_DATE';
|
|
839
|
+
interface CancellationInfo {
|
|
820
840
|
/** Subscription cancel date. Can contain a future or past date */
|
|
821
841
|
cancellationDate?: Date | null;
|
|
822
842
|
/** Initiator for cancellation */
|
|
823
|
-
initiator?:
|
|
843
|
+
initiator?: HistoryActionInitiatorWithLiterals;
|
|
824
844
|
/** Reason for cancellation. Optional. */
|
|
825
845
|
reason?: string | null;
|
|
826
846
|
}
|
|
827
|
-
|
|
847
|
+
declare enum HistoryActionInitiator {
|
|
828
848
|
UNDEFINED = "UNDEFINED",
|
|
829
849
|
BUSINESS = "BUSINESS",
|
|
830
850
|
CUSTOMER = "CUSTOMER",
|
|
831
851
|
SYSTEM = "SYSTEM",
|
|
832
852
|
PAYMENT_FAILURE = "PAYMENT_FAILURE"
|
|
833
853
|
}
|
|
834
|
-
|
|
854
|
+
/** @enumType */
|
|
855
|
+
type HistoryActionInitiatorWithLiterals = HistoryActionInitiator | 'UNDEFINED' | 'BUSINESS' | 'CUSTOMER' | 'SYSTEM' | 'PAYMENT_FAILURE';
|
|
856
|
+
interface SubscriptionUpdateData {
|
|
835
857
|
/** @maxSize 100 */
|
|
836
858
|
itemsToUpdate?: ItemChange[];
|
|
837
859
|
/** @maxSize 99 */
|
|
@@ -844,7 +866,7 @@ export interface SubscriptionUpdateData {
|
|
|
844
866
|
/** @readonly */
|
|
845
867
|
numberOfRequests?: number;
|
|
846
868
|
}
|
|
847
|
-
|
|
869
|
+
interface ItemChange {
|
|
848
870
|
/**
|
|
849
871
|
* Item ID
|
|
850
872
|
* @format GUID
|
|
@@ -855,16 +877,16 @@ export interface ItemChange {
|
|
|
855
877
|
quantity?: number | null;
|
|
856
878
|
tax?: Tax;
|
|
857
879
|
}
|
|
858
|
-
|
|
880
|
+
interface PricingModel extends PricingModelModelOneOf {
|
|
859
881
|
/** Details about the fixed item price. */
|
|
860
882
|
fixedPrice?: FixedPrice;
|
|
861
883
|
}
|
|
862
884
|
/** @oneof */
|
|
863
|
-
|
|
885
|
+
interface PricingModelModelOneOf {
|
|
864
886
|
/** Details about the fixed item price. */
|
|
865
887
|
fixedPrice?: FixedPrice;
|
|
866
888
|
}
|
|
867
|
-
|
|
889
|
+
interface FixedPrice {
|
|
868
890
|
/**
|
|
869
891
|
* Fixed item price with a period as a decimal separator. For example, `3.99`.
|
|
870
892
|
* Price doesn't include tax, discounts, or application fee.
|
|
@@ -874,7 +896,7 @@ export interface FixedPrice {
|
|
|
874
896
|
*/
|
|
875
897
|
itemPrice?: string;
|
|
876
898
|
}
|
|
877
|
-
|
|
899
|
+
interface Item {
|
|
878
900
|
/**
|
|
879
901
|
* Unique identifier of subscription item. Automatically generated and read-only.
|
|
880
902
|
* @readonly
|
|
@@ -895,7 +917,7 @@ export interface Item {
|
|
|
895
917
|
/** References to external product catalog data known to client. */
|
|
896
918
|
catalogReference?: CatalogReference;
|
|
897
919
|
/** Category of item. Whether it is digital or physical one. */
|
|
898
|
-
category?:
|
|
920
|
+
category?: ItemCategoryWithLiterals;
|
|
899
921
|
/**
|
|
900
922
|
* Amount of products
|
|
901
923
|
* @min 1
|
|
@@ -926,7 +948,7 @@ export interface Item {
|
|
|
926
948
|
*/
|
|
927
949
|
metadata?: Record<string, string>;
|
|
928
950
|
}
|
|
929
|
-
|
|
951
|
+
interface CatalogReference {
|
|
930
952
|
/**
|
|
931
953
|
* Product ID from the external catalog.
|
|
932
954
|
* @minLength 1
|
|
@@ -945,12 +967,14 @@ export interface CatalogReference {
|
|
|
945
967
|
*/
|
|
946
968
|
appId?: string | null;
|
|
947
969
|
}
|
|
948
|
-
|
|
970
|
+
declare enum ItemCategory {
|
|
949
971
|
UNKNOWN = "UNKNOWN",
|
|
950
972
|
PHYSICAL = "PHYSICAL",
|
|
951
973
|
DIGITAL = "DIGITAL"
|
|
952
974
|
}
|
|
953
|
-
|
|
975
|
+
/** @enumType */
|
|
976
|
+
type ItemCategoryWithLiterals = ItemCategory | 'UNKNOWN' | 'PHYSICAL' | 'DIGITAL';
|
|
977
|
+
interface ApplicationFee extends ApplicationFeeValueOneOf {
|
|
954
978
|
/**
|
|
955
979
|
* Amount of the application fee in `0.00` format.
|
|
956
980
|
* @format DECIMAL_VALUE
|
|
@@ -965,24 +989,24 @@ export interface ApplicationFee extends ApplicationFeeValueOneOf {
|
|
|
965
989
|
discounts?: Discount[];
|
|
966
990
|
}
|
|
967
991
|
/** @oneof */
|
|
968
|
-
|
|
992
|
+
interface ApplicationFeeValueOneOf {
|
|
969
993
|
/**
|
|
970
994
|
* Amount of the application fee in `0.00` format.
|
|
971
995
|
* @format DECIMAL_VALUE
|
|
972
996
|
*/
|
|
973
997
|
amount?: string;
|
|
974
998
|
}
|
|
975
|
-
|
|
999
|
+
interface SpecificDateSubscriptionUpdateData {
|
|
976
1000
|
updateData?: SubscriptionUpdateData;
|
|
977
1001
|
executionDate?: Date | null;
|
|
978
1002
|
}
|
|
979
|
-
|
|
1003
|
+
interface PlatformOrigin {
|
|
980
1004
|
/** @format GUID */
|
|
981
1005
|
appId?: string | null;
|
|
982
1006
|
/** @format GUID */
|
|
983
1007
|
entityId?: string | null;
|
|
984
1008
|
}
|
|
985
|
-
|
|
1009
|
+
interface SubscriptionBillingCyclePaid {
|
|
986
1010
|
/** The subscription for which one of the invoices has been marked as paid */
|
|
987
1011
|
subscription?: Subscription;
|
|
988
1012
|
/** The cycle that has been marked as paid */
|
|
@@ -998,20 +1022,20 @@ export interface SubscriptionBillingCyclePaid {
|
|
|
998
1022
|
*/
|
|
999
1023
|
paymentTransactionId?: string | null;
|
|
1000
1024
|
}
|
|
1001
|
-
|
|
1025
|
+
interface GetSubscriptionRequest {
|
|
1002
1026
|
/** @format GUID */
|
|
1003
1027
|
_id: string;
|
|
1004
1028
|
}
|
|
1005
|
-
|
|
1029
|
+
interface GetSubscriptionResponse {
|
|
1006
1030
|
subscription?: Subscription;
|
|
1007
1031
|
}
|
|
1008
|
-
|
|
1032
|
+
interface CustomerCancelSubscriptionRequest {
|
|
1009
1033
|
/** @format GUID */
|
|
1010
1034
|
_id: string;
|
|
1011
1035
|
/** Optional action reason message */
|
|
1012
1036
|
reason?: string | null;
|
|
1013
1037
|
}
|
|
1014
|
-
|
|
1038
|
+
interface CustomerCancelSubscriptionResponse {
|
|
1015
1039
|
subscription?: Subscription;
|
|
1016
1040
|
}
|
|
1017
1041
|
/**
|
|
@@ -1021,33 +1045,33 @@ export interface CustomerCancelSubscriptionResponse {
|
|
|
1021
1045
|
* * A user decided to cancel a subscription before the original end date
|
|
1022
1046
|
* * A subscription is canceled due to bad payment
|
|
1023
1047
|
*/
|
|
1024
|
-
|
|
1048
|
+
interface SubscriptionCanceled {
|
|
1025
1049
|
subscription?: Subscription;
|
|
1026
1050
|
actionDetails?: ActionDetails;
|
|
1027
1051
|
}
|
|
1028
|
-
|
|
1029
|
-
initiator?:
|
|
1052
|
+
interface ActionDetails {
|
|
1053
|
+
initiator?: HistoryActionInitiatorWithLiterals;
|
|
1030
1054
|
reason?: string | null;
|
|
1031
1055
|
}
|
|
1032
|
-
|
|
1056
|
+
interface CustomerTurnOnAutoRenewalRequest {
|
|
1033
1057
|
/** @format GUID */
|
|
1034
1058
|
_id: string;
|
|
1035
1059
|
/** Optional action reason message */
|
|
1036
1060
|
reason?: string | null;
|
|
1037
1061
|
}
|
|
1038
|
-
|
|
1062
|
+
interface CustomerTurnOnAutoRenewalResponse {
|
|
1039
1063
|
subscription?: Subscription;
|
|
1040
1064
|
}
|
|
1041
|
-
|
|
1065
|
+
interface CustomerTurnOffAutoRenewalRequest {
|
|
1042
1066
|
/** @format GUID */
|
|
1043
1067
|
_id: string;
|
|
1044
1068
|
/** Optional action reason message */
|
|
1045
1069
|
reason?: string | null;
|
|
1046
1070
|
}
|
|
1047
|
-
|
|
1071
|
+
interface CustomerTurnOffAutoRenewalResponse {
|
|
1048
1072
|
subscription?: Subscription;
|
|
1049
1073
|
}
|
|
1050
|
-
|
|
1074
|
+
interface CustomerExtendSubscriptionRequest {
|
|
1051
1075
|
/**
|
|
1052
1076
|
* The ID of the subscription to be extended
|
|
1053
1077
|
* @format GUID
|
|
@@ -1061,39 +1085,39 @@ export interface CustomerExtendSubscriptionRequest {
|
|
|
1061
1085
|
*/
|
|
1062
1086
|
billingCyclesToAdd: number | null;
|
|
1063
1087
|
}
|
|
1064
|
-
|
|
1088
|
+
interface CustomerExtendSubscriptionResponse {
|
|
1065
1089
|
/** The now extended subscription */
|
|
1066
1090
|
subscription?: Subscription;
|
|
1067
1091
|
}
|
|
1068
|
-
|
|
1092
|
+
interface SubscriptionExtended extends SubscriptionExtendedExtendPolicyOneOf {
|
|
1069
1093
|
extensionPeriod?: Duration;
|
|
1070
1094
|
extensionBillingCycles?: number;
|
|
1071
1095
|
subscription?: Subscription;
|
|
1072
1096
|
actionDetails?: ActionDetails;
|
|
1073
1097
|
}
|
|
1074
1098
|
/** @oneof */
|
|
1075
|
-
|
|
1099
|
+
interface SubscriptionExtendedExtendPolicyOneOf {
|
|
1076
1100
|
extensionPeriod?: Duration;
|
|
1077
1101
|
extensionBillingCycles?: number;
|
|
1078
1102
|
}
|
|
1079
|
-
|
|
1103
|
+
interface QuerySubscriptionsRequest {
|
|
1080
1104
|
query?: QueryV2;
|
|
1081
1105
|
}
|
|
1082
|
-
|
|
1083
|
-
/** Paging options to limit and
|
|
1106
|
+
interface QueryV2 extends QueryV2PagingMethodOneOf {
|
|
1107
|
+
/** Paging options to limit and offset the number of items. */
|
|
1084
1108
|
paging?: Paging;
|
|
1085
1109
|
/** 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
1110
|
cursorPaging?: CursorPaging;
|
|
1087
1111
|
/**
|
|
1088
1112
|
* Filter object.
|
|
1089
1113
|
*
|
|
1090
|
-
* Learn more about
|
|
1114
|
+
* Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters).
|
|
1091
1115
|
*/
|
|
1092
1116
|
filter?: Record<string, any> | null;
|
|
1093
1117
|
/**
|
|
1094
1118
|
* Sort object.
|
|
1095
1119
|
*
|
|
1096
|
-
* Learn more about
|
|
1120
|
+
* Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting).
|
|
1097
1121
|
*/
|
|
1098
1122
|
sort?: Sorting[];
|
|
1099
1123
|
/** 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. */
|
|
@@ -1102,32 +1126,34 @@ export interface QueryV2 extends QueryV2PagingMethodOneOf {
|
|
|
1102
1126
|
fieldsets?: string[];
|
|
1103
1127
|
}
|
|
1104
1128
|
/** @oneof */
|
|
1105
|
-
|
|
1106
|
-
/** Paging options to limit and
|
|
1129
|
+
interface QueryV2PagingMethodOneOf {
|
|
1130
|
+
/** Paging options to limit and offset the number of items. */
|
|
1107
1131
|
paging?: Paging;
|
|
1108
1132
|
/** 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
1133
|
cursorPaging?: CursorPaging;
|
|
1110
1134
|
}
|
|
1111
|
-
|
|
1135
|
+
interface Sorting {
|
|
1112
1136
|
/**
|
|
1113
1137
|
* Name of the field to sort by.
|
|
1114
1138
|
* @maxLength 512
|
|
1115
1139
|
*/
|
|
1116
1140
|
fieldName?: string;
|
|
1117
1141
|
/** Sort order. */
|
|
1118
|
-
order?:
|
|
1142
|
+
order?: SortOrderWithLiterals;
|
|
1119
1143
|
}
|
|
1120
|
-
|
|
1144
|
+
declare enum SortOrder {
|
|
1121
1145
|
ASC = "ASC",
|
|
1122
1146
|
DESC = "DESC"
|
|
1123
1147
|
}
|
|
1124
|
-
|
|
1148
|
+
/** @enumType */
|
|
1149
|
+
type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
|
|
1150
|
+
interface Paging {
|
|
1125
1151
|
/** Number of items to load. */
|
|
1126
1152
|
limit?: number | null;
|
|
1127
1153
|
/** Number of items to skip in the current sort order. */
|
|
1128
1154
|
offset?: number | null;
|
|
1129
1155
|
}
|
|
1130
|
-
|
|
1156
|
+
interface CursorPaging {
|
|
1131
1157
|
/**
|
|
1132
1158
|
* Maximum number of items to return in the results.
|
|
1133
1159
|
* @max 100
|
|
@@ -1142,11 +1168,11 @@ export interface CursorPaging {
|
|
|
1142
1168
|
*/
|
|
1143
1169
|
cursor?: string | null;
|
|
1144
1170
|
}
|
|
1145
|
-
|
|
1171
|
+
interface QuerySubscriptionsResponse {
|
|
1146
1172
|
subscriptions?: Subscription[];
|
|
1147
1173
|
metadata?: PagingMetadataV2;
|
|
1148
1174
|
}
|
|
1149
|
-
|
|
1175
|
+
interface PagingMetadataV2 {
|
|
1150
1176
|
/** Number of items returned in the response. */
|
|
1151
1177
|
count?: number | null;
|
|
1152
1178
|
/** Offset that was requested. */
|
|
@@ -1158,7 +1184,7 @@ export interface PagingMetadataV2 {
|
|
|
1158
1184
|
/** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
|
|
1159
1185
|
cursors?: Cursors;
|
|
1160
1186
|
}
|
|
1161
|
-
|
|
1187
|
+
interface Cursors {
|
|
1162
1188
|
/**
|
|
1163
1189
|
* Cursor string pointing to the next page in the list of results.
|
|
1164
1190
|
* @maxLength 16000
|
|
@@ -1170,11 +1196,11 @@ export interface Cursors {
|
|
|
1170
1196
|
*/
|
|
1171
1197
|
prev?: string | null;
|
|
1172
1198
|
}
|
|
1173
|
-
|
|
1199
|
+
interface CountSubscriptionsRequest {
|
|
1174
1200
|
/** Filters to specify which subscriptions are counted. */
|
|
1175
1201
|
filter?: CountSubscriptionFilter;
|
|
1176
1202
|
}
|
|
1177
|
-
|
|
1203
|
+
interface CountSubscriptionFilter extends CountSubscriptionFilterStatusOneOf {
|
|
1178
1204
|
/** List of statuses to filter the counted subscriptions by. */
|
|
1179
1205
|
statuses?: SubscriptionStatus;
|
|
1180
1206
|
/**
|
|
@@ -1182,7 +1208,7 @@ export interface CountSubscriptionFilter extends CountSubscriptionFilterStatusOn
|
|
|
1182
1208
|
* + `ALL`: Includes these subscription statuses: `"DRAFT"`, `"PENDING"`, `"ACTIVE"`, `"PAUSED"`, `"ENDED"`, and `"CANCELED"`.
|
|
1183
1209
|
* + `LIVE`: Includes these subscription statuses: `"PENDING"`, `"ACTIVE"`, and `"PAUSED"`.
|
|
1184
1210
|
*/
|
|
1185
|
-
statusGroup?:
|
|
1211
|
+
statusGroup?: SubscriptionStatusGroupWithLiterals;
|
|
1186
1212
|
/**
|
|
1187
1213
|
* Customer ID to filter the counted subscriptions by. You can pass a
|
|
1188
1214
|
* [member ID](https://bo.wix.com/wix-docs/rest/members/members/member-object),
|
|
@@ -1200,7 +1226,7 @@ export interface CountSubscriptionFilter extends CountSubscriptionFilterStatusOn
|
|
|
1200
1226
|
paymentMethodId?: string | null;
|
|
1201
1227
|
}
|
|
1202
1228
|
/** @oneof */
|
|
1203
|
-
|
|
1229
|
+
interface CountSubscriptionFilterStatusOneOf {
|
|
1204
1230
|
/** List of statuses to filter the counted subscriptions by. */
|
|
1205
1231
|
statuses?: SubscriptionStatus;
|
|
1206
1232
|
/**
|
|
@@ -1208,23 +1234,25 @@ export interface CountSubscriptionFilterStatusOneOf {
|
|
|
1208
1234
|
* + `ALL`: Includes these subscription statuses: `"DRAFT"`, `"PENDING"`, `"ACTIVE"`, `"PAUSED"`, `"ENDED"`, and `"CANCELED"`.
|
|
1209
1235
|
* + `LIVE`: Includes these subscription statuses: `"PENDING"`, `"ACTIVE"`, and `"PAUSED"`.
|
|
1210
1236
|
*/
|
|
1211
|
-
statusGroup?:
|
|
1237
|
+
statusGroup?: SubscriptionStatusGroupWithLiterals;
|
|
1212
1238
|
}
|
|
1213
|
-
|
|
1239
|
+
interface SubscriptionStatus {
|
|
1214
1240
|
/**
|
|
1215
1241
|
* Statuses to filter the counted subscriptions by.
|
|
1216
1242
|
*
|
|
1217
1243
|
* Max: 6 statuses
|
|
1218
1244
|
* @maxSize 6
|
|
1219
1245
|
*/
|
|
1220
|
-
statuses?:
|
|
1246
|
+
statuses?: SubscriptionStatusEnumSubscriptionStatusWithLiterals[];
|
|
1221
1247
|
}
|
|
1222
|
-
|
|
1248
|
+
declare enum SubscriptionStatusGroup {
|
|
1223
1249
|
ALL = "ALL",
|
|
1224
1250
|
/** Union of ACTIVE, PAUSED and PENDING */
|
|
1225
1251
|
LIVE = "LIVE"
|
|
1226
1252
|
}
|
|
1227
|
-
|
|
1253
|
+
/** @enumType */
|
|
1254
|
+
type SubscriptionStatusGroupWithLiterals = SubscriptionStatusGroup | 'ALL' | 'LIVE';
|
|
1255
|
+
interface CountSubscriptionsResponse {
|
|
1228
1256
|
/**
|
|
1229
1257
|
* List of statuses and the corresponding number of subscriptions that match
|
|
1230
1258
|
* the filters.
|
|
@@ -1233,13 +1261,13 @@ export interface CountSubscriptionsResponse {
|
|
|
1233
1261
|
/** Total number of subscriptions that match the filters. */
|
|
1234
1262
|
total?: number;
|
|
1235
1263
|
}
|
|
1236
|
-
|
|
1264
|
+
interface CountByStatus {
|
|
1237
1265
|
/** Subscription status. */
|
|
1238
|
-
status?:
|
|
1266
|
+
status?: SubscriptionStatusEnumSubscriptionStatusWithLiterals;
|
|
1239
1267
|
/** Number of subscriptions with the status that match the filters. */
|
|
1240
1268
|
count?: number;
|
|
1241
1269
|
}
|
|
1242
|
-
|
|
1270
|
+
interface UpdateSubscriptionPaymentMethodRequest {
|
|
1243
1271
|
/**
|
|
1244
1272
|
* Subscription ID
|
|
1245
1273
|
* @format GUID
|
|
@@ -1248,24 +1276,24 @@ export interface UpdateSubscriptionPaymentMethodRequest {
|
|
|
1248
1276
|
/** @format GUID */
|
|
1249
1277
|
paymentMethodId: string;
|
|
1250
1278
|
}
|
|
1251
|
-
|
|
1279
|
+
interface UpdateSubscriptionPaymentMethodResponse {
|
|
1252
1280
|
subscription?: Subscription;
|
|
1253
1281
|
}
|
|
1254
|
-
|
|
1282
|
+
interface CustomerAllowedActionsRequest {
|
|
1255
1283
|
/** @format GUID */
|
|
1256
1284
|
_id: string;
|
|
1257
1285
|
}
|
|
1258
|
-
|
|
1286
|
+
interface CustomerAllowedActionsResponse {
|
|
1259
1287
|
actions?: Action[];
|
|
1260
1288
|
}
|
|
1261
|
-
|
|
1262
|
-
actionType?:
|
|
1263
|
-
pausePolicies?:
|
|
1264
|
-
pauseAt?:
|
|
1265
|
-
resumeAt?:
|
|
1266
|
-
extendPolicies?:
|
|
1289
|
+
interface Action {
|
|
1290
|
+
actionType?: ActionTypeWithLiterals;
|
|
1291
|
+
pausePolicies?: PausePolicyWithLiterals[];
|
|
1292
|
+
pauseAt?: PauseAtWithLiterals[];
|
|
1293
|
+
resumeAt?: ResumeAtWithLiterals[];
|
|
1294
|
+
extendPolicies?: ExtendPolicyTypeWithLiterals[];
|
|
1267
1295
|
}
|
|
1268
|
-
|
|
1296
|
+
declare enum ActionType {
|
|
1269
1297
|
NONE = "NONE",
|
|
1270
1298
|
CREATION = "CREATION",
|
|
1271
1299
|
CANCEL = "CANCEL",
|
|
@@ -1281,22 +1309,26 @@ export declare enum ActionType {
|
|
|
1281
1309
|
UPDATE_BILLING_DATE = "UPDATE_BILLING_DATE",
|
|
1282
1310
|
UPDATE_COLLECTION_METHOD = "UPDATE_COLLECTION_METHOD"
|
|
1283
1311
|
}
|
|
1284
|
-
|
|
1312
|
+
/** @enumType */
|
|
1313
|
+
type ActionTypeWithLiterals = ActionType | 'NONE' | 'CREATION' | 'CANCEL' | 'CYCLE_AUTO_RENEW_ON' | 'CYCLE_AUTO_RENEW_OFF' | 'PAUSE' | 'RESUME' | 'MARK_AS_PAID' | 'EXTEND' | 'UPDATE' | 'UPDATE_START_DATE' | 'UPM' | 'UPDATE_BILLING_DATE' | 'UPDATE_COLLECTION_METHOD';
|
|
1314
|
+
declare enum ExtendPolicyType {
|
|
1285
1315
|
PERIOD = "PERIOD",
|
|
1286
1316
|
BILLING_CYCLE = "BILLING_CYCLE"
|
|
1287
1317
|
}
|
|
1288
|
-
|
|
1318
|
+
/** @enumType */
|
|
1319
|
+
type ExtendPolicyTypeWithLiterals = ExtendPolicyType | 'PERIOD' | 'BILLING_CYCLE';
|
|
1320
|
+
interface CustomerListUpcomingChargesRequest {
|
|
1289
1321
|
/**
|
|
1290
1322
|
* Subscription id upcoming charge to be previewed for
|
|
1291
1323
|
* @format GUID
|
|
1292
1324
|
*/
|
|
1293
1325
|
_id: string;
|
|
1294
1326
|
}
|
|
1295
|
-
|
|
1327
|
+
interface CustomerListUpcomingChargesResponse {
|
|
1296
1328
|
/** Subscription upcoming charge. Will be empty if no more billing scheduled. */
|
|
1297
1329
|
upcomingCharge?: SubscriptionCharge;
|
|
1298
1330
|
}
|
|
1299
|
-
|
|
1331
|
+
interface SubscriptionCharge {
|
|
1300
1332
|
/** cycle of future charge */
|
|
1301
1333
|
cycle?: number;
|
|
1302
1334
|
/** date of the charge */
|
|
@@ -1308,7 +1340,7 @@ export interface SubscriptionCharge {
|
|
|
1308
1340
|
/** Discount details for the invoice */
|
|
1309
1341
|
discount?: InvoiceDiscount;
|
|
1310
1342
|
}
|
|
1311
|
-
|
|
1343
|
+
interface InvoiceItem extends InvoiceItemPaymentTypeOneOf {
|
|
1312
1344
|
/** Information about a line item that's purchased on a recurring basis. */
|
|
1313
1345
|
recurring?: Recurring;
|
|
1314
1346
|
/**
|
|
@@ -1352,7 +1384,7 @@ export interface InvoiceItem extends InvoiceItemPaymentTypeOneOf {
|
|
|
1352
1384
|
* + `"PHYSICAL"`: A physical product that's shipped to the shipping address.
|
|
1353
1385
|
* + `"DIGITAL"`: A digital product that doesn't require shipping.
|
|
1354
1386
|
*/
|
|
1355
|
-
category?:
|
|
1387
|
+
category?: ItemCategoryWithLiterals;
|
|
1356
1388
|
/** Quantity of the invoice line item. */
|
|
1357
1389
|
quantity?: number;
|
|
1358
1390
|
/** Information about the invoice line item's price. */
|
|
@@ -1364,9 +1396,21 @@ export interface InvoiceItem extends InvoiceItemPaymentTypeOneOf {
|
|
|
1364
1396
|
* @readonly
|
|
1365
1397
|
*/
|
|
1366
1398
|
taxData?: ItemTaxData;
|
|
1399
|
+
/**
|
|
1400
|
+
* ID of the [one time] that belongs to the invoice line item.
|
|
1401
|
+
* @format GUID
|
|
1402
|
+
*/
|
|
1403
|
+
oneTimeItemId?: string | null;
|
|
1404
|
+
/**
|
|
1405
|
+
* Key / Value store to keep up to 10 additional values related to the invoice item.
|
|
1406
|
+
* Key max length = 50, Value max length = 200. Value can not be empty.
|
|
1407
|
+
* Should not include any sensitive or PII information.
|
|
1408
|
+
* @maxSize 10
|
|
1409
|
+
*/
|
|
1410
|
+
metadata?: Record<string, string>;
|
|
1367
1411
|
}
|
|
1368
1412
|
/** @oneof */
|
|
1369
|
-
|
|
1413
|
+
interface InvoiceItemPaymentTypeOneOf {
|
|
1370
1414
|
/** Information about a line item that's purchased on a recurring basis. */
|
|
1371
1415
|
recurring?: Recurring;
|
|
1372
1416
|
/**
|
|
@@ -1375,16 +1419,16 @@ export interface InvoiceItemPaymentTypeOneOf {
|
|
|
1375
1419
|
*/
|
|
1376
1420
|
oneTime?: OneTime;
|
|
1377
1421
|
}
|
|
1378
|
-
|
|
1422
|
+
interface Recurring {
|
|
1379
1423
|
/**
|
|
1380
1424
|
* Number of cycles. Describes how many times a customer purchases the line item
|
|
1381
1425
|
* on a recurring basis.
|
|
1382
1426
|
*/
|
|
1383
1427
|
cycleNumber?: number;
|
|
1384
1428
|
}
|
|
1385
|
-
|
|
1429
|
+
interface OneTime {
|
|
1386
1430
|
}
|
|
1387
|
-
|
|
1431
|
+
interface PriceDetails {
|
|
1388
1432
|
/**
|
|
1389
1433
|
* Price of the invoice line item in `0.00` format.
|
|
1390
1434
|
* A minus sign (-) indicates that the amount is negative.
|
|
@@ -1401,7 +1445,7 @@ export interface PriceDetails {
|
|
|
1401
1445
|
*/
|
|
1402
1446
|
applicationFeeDetails?: InvoiceApplicationFee;
|
|
1403
1447
|
}
|
|
1404
|
-
|
|
1448
|
+
interface InvoiceDiscount extends InvoiceDiscountValueOneOf {
|
|
1405
1449
|
/**
|
|
1406
1450
|
* Discount amount.
|
|
1407
1451
|
* Available when the discount is an amount.
|
|
@@ -1423,7 +1467,7 @@ export interface InvoiceDiscount extends InvoiceDiscountValueOneOf {
|
|
|
1423
1467
|
origin?: DiscountOrigin;
|
|
1424
1468
|
}
|
|
1425
1469
|
/** @oneof */
|
|
1426
|
-
|
|
1470
|
+
interface InvoiceDiscountValueOneOf {
|
|
1427
1471
|
/**
|
|
1428
1472
|
* Discount amount.
|
|
1429
1473
|
* Available when the discount is an amount.
|
|
@@ -1442,7 +1486,7 @@ export interface InvoiceDiscountValueOneOf {
|
|
|
1442
1486
|
*/
|
|
1443
1487
|
percentage?: string;
|
|
1444
1488
|
}
|
|
1445
|
-
|
|
1489
|
+
interface InvoiceApplicationFee extends InvoiceApplicationFeeValueOneOf {
|
|
1446
1490
|
/**
|
|
1447
1491
|
* Application fee amount. Set by the origin app, and not by BASS. Wix
|
|
1448
1492
|
* receives the full `applicationFee`, while the merchant doesn't receive
|
|
@@ -1454,7 +1498,7 @@ export interface InvoiceApplicationFee extends InvoiceApplicationFeeValueOneOf {
|
|
|
1454
1498
|
discount?: InvoiceDiscount;
|
|
1455
1499
|
}
|
|
1456
1500
|
/** @oneof */
|
|
1457
|
-
|
|
1501
|
+
interface InvoiceApplicationFeeValueOneOf {
|
|
1458
1502
|
/**
|
|
1459
1503
|
* Application fee amount. Set by the origin app, and not by BASS. Wix
|
|
1460
1504
|
* receives the full `applicationFee`, while the merchant doesn't receive
|
|
@@ -1463,7 +1507,7 @@ export interface InvoiceApplicationFeeValueOneOf {
|
|
|
1463
1507
|
*/
|
|
1464
1508
|
amount?: string;
|
|
1465
1509
|
}
|
|
1466
|
-
|
|
1510
|
+
interface ItemTaxData {
|
|
1467
1511
|
/** Aggregated tax from tax_breakdowns */
|
|
1468
1512
|
lineItemTaxSummary?: LineItemTaxSummary;
|
|
1469
1513
|
/**
|
|
@@ -1473,7 +1517,7 @@ export interface ItemTaxData {
|
|
|
1473
1517
|
*/
|
|
1474
1518
|
taxBreakdowns?: TaxBreakdown[];
|
|
1475
1519
|
}
|
|
1476
|
-
|
|
1520
|
+
interface LineItemTaxSummary {
|
|
1477
1521
|
/**
|
|
1478
1522
|
* Calculated from external tax summary
|
|
1479
1523
|
* @format DECIMAL_VALUE
|
|
@@ -1497,7 +1541,7 @@ export interface LineItemTaxSummary {
|
|
|
1497
1541
|
*/
|
|
1498
1542
|
finalTaxAmount?: string | null;
|
|
1499
1543
|
}
|
|
1500
|
-
|
|
1544
|
+
interface TaxBreakdown {
|
|
1501
1545
|
taxType?: string;
|
|
1502
1546
|
/** @decimalValue options { maxScale:4 } */
|
|
1503
1547
|
taxRate?: string;
|
|
@@ -1520,23 +1564,25 @@ export interface TaxBreakdown {
|
|
|
1520
1564
|
/** Type of jurisdiction that taxes were calculated for. */
|
|
1521
1565
|
jurisdictionType?: string;
|
|
1522
1566
|
}
|
|
1523
|
-
|
|
1567
|
+
interface InitiatePaymentMethodSetupRequest {
|
|
1524
1568
|
_id: string;
|
|
1525
|
-
paymentMode?:
|
|
1569
|
+
paymentMode?: PaymentModeWithLiterals;
|
|
1526
1570
|
paymentSettings?: PaymentSettings;
|
|
1527
1571
|
}
|
|
1528
|
-
|
|
1572
|
+
declare enum PaymentMode {
|
|
1529
1573
|
NONE = "NONE",
|
|
1530
1574
|
/** The latest invoice of the subscription will be charged. */
|
|
1531
1575
|
CHARGE = "CHARGE",
|
|
1532
1576
|
/** An authorization invoice with zero amount will be created. */
|
|
1533
1577
|
AUTHORIZATION = "AUTHORIZATION"
|
|
1534
1578
|
}
|
|
1535
|
-
|
|
1579
|
+
/** @enumType */
|
|
1580
|
+
type PaymentModeWithLiterals = PaymentMode | 'NONE' | 'CHARGE' | 'AUTHORIZATION';
|
|
1581
|
+
interface PaymentSettings {
|
|
1536
1582
|
/** Allowed payment providers for Subscriptions, for example to limit subscriptions to be created only with "Wix Payments" provider. */
|
|
1537
1583
|
allowedProviderIds?: string[];
|
|
1538
1584
|
/** payment order method, define how the order was applied */
|
|
1539
|
-
orderMethod?:
|
|
1585
|
+
orderMethod?: OrderMethodWithLiterals;
|
|
1540
1586
|
/** Wix Pay callback url(s) to return buyer to a third party system */
|
|
1541
1587
|
redirectUrls?: RedirectUrls;
|
|
1542
1588
|
/** @format GUID */
|
|
@@ -1548,12 +1594,14 @@ export interface PaymentSettings {
|
|
|
1548
1594
|
*/
|
|
1549
1595
|
paymentOrigin?: PaymentOrigin;
|
|
1550
1596
|
}
|
|
1551
|
-
|
|
1597
|
+
declare enum OrderMethod {
|
|
1552
1598
|
UNKNOWN = "UNKNOWN",
|
|
1553
1599
|
MOTO = "MOTO",
|
|
1554
1600
|
NOT_MOTO = "NOT_MOTO"
|
|
1555
1601
|
}
|
|
1556
|
-
|
|
1602
|
+
/** @enumType */
|
|
1603
|
+
type OrderMethodWithLiterals = OrderMethod | 'UNKNOWN' | 'MOTO' | 'NOT_MOTO';
|
|
1604
|
+
interface RedirectUrls {
|
|
1557
1605
|
/** URL to redirect buyer in case of approved (successful) transaction (required) */
|
|
1558
1606
|
successUrl?: string;
|
|
1559
1607
|
/** URL to redirect buyer in case of failed/rejected transaction (required) */
|
|
@@ -1566,7 +1614,7 @@ export interface RedirectUrls {
|
|
|
1566
1614
|
*/
|
|
1567
1615
|
pendingUrl?: string;
|
|
1568
1616
|
}
|
|
1569
|
-
|
|
1617
|
+
interface PaymentOrigin {
|
|
1570
1618
|
/**
|
|
1571
1619
|
* ID of the app for which the Payment will create the order on. For example, Paypal.
|
|
1572
1620
|
* @format GUID
|
|
@@ -1578,34 +1626,30 @@ export interface PaymentOrigin {
|
|
|
1578
1626
|
*/
|
|
1579
1627
|
instanceId?: string;
|
|
1580
1628
|
}
|
|
1581
|
-
|
|
1629
|
+
interface InitiatePaymentMethodSetupResponse {
|
|
1582
1630
|
/** @format GUID */
|
|
1583
1631
|
paymentOrderId?: string;
|
|
1584
1632
|
}
|
|
1585
|
-
|
|
1633
|
+
interface DomainEvent extends DomainEventBodyOneOf {
|
|
1586
1634
|
createdEvent?: EntityCreatedEvent;
|
|
1587
1635
|
updatedEvent?: EntityUpdatedEvent;
|
|
1588
1636
|
deletedEvent?: EntityDeletedEvent;
|
|
1589
1637
|
actionEvent?: ActionEvent;
|
|
1590
|
-
/**
|
|
1591
|
-
* Unique event ID.
|
|
1592
|
-
* Allows clients to ignore duplicate webhooks.
|
|
1593
|
-
*/
|
|
1638
|
+
/** Event ID. With this ID you can easily spot duplicated events and ignore them. */
|
|
1594
1639
|
_id?: string;
|
|
1595
1640
|
/**
|
|
1596
|
-
*
|
|
1597
|
-
*
|
|
1641
|
+
* Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
|
|
1642
|
+
* For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
|
|
1598
1643
|
*/
|
|
1599
1644
|
entityFqdn?: string;
|
|
1600
1645
|
/**
|
|
1601
|
-
*
|
|
1602
|
-
*
|
|
1603
|
-
* Example: created/updated/deleted/started/completed/email_opened
|
|
1646
|
+
* Event action name, placed at the top level to make it easier for users to dispatch messages.
|
|
1647
|
+
* For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
|
|
1604
1648
|
*/
|
|
1605
1649
|
slug?: string;
|
|
1606
1650
|
/** ID of the entity associated with the event. */
|
|
1607
1651
|
entityId?: string;
|
|
1608
|
-
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example
|
|
1652
|
+
/** 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
1653
|
eventTime?: Date | null;
|
|
1610
1654
|
/**
|
|
1611
1655
|
* Whether the event was triggered as a result of a privacy regulation application
|
|
@@ -1615,29 +1659,25 @@ export interface DomainEvent extends DomainEventBodyOneOf {
|
|
|
1615
1659
|
/** If present, indicates the action that triggered the event. */
|
|
1616
1660
|
originatedFrom?: string | null;
|
|
1617
1661
|
/**
|
|
1618
|
-
* A sequence number
|
|
1619
|
-
*
|
|
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.
|
|
1662
|
+
* A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.
|
|
1663
|
+
* You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
|
|
1624
1664
|
*/
|
|
1625
1665
|
entityEventSequence?: string | null;
|
|
1626
1666
|
}
|
|
1627
1667
|
/** @oneof */
|
|
1628
|
-
|
|
1668
|
+
interface DomainEventBodyOneOf {
|
|
1629
1669
|
createdEvent?: EntityCreatedEvent;
|
|
1630
1670
|
updatedEvent?: EntityUpdatedEvent;
|
|
1631
1671
|
deletedEvent?: EntityDeletedEvent;
|
|
1632
1672
|
actionEvent?: ActionEvent;
|
|
1633
1673
|
}
|
|
1634
|
-
|
|
1674
|
+
interface EntityCreatedEvent {
|
|
1635
1675
|
entity?: string;
|
|
1636
1676
|
}
|
|
1637
|
-
|
|
1677
|
+
interface RestoreInfo {
|
|
1638
1678
|
deletedDate?: Date | null;
|
|
1639
1679
|
}
|
|
1640
|
-
|
|
1680
|
+
interface EntityUpdatedEvent {
|
|
1641
1681
|
/**
|
|
1642
1682
|
* 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
1683
|
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
@@ -1645,14 +1685,14 @@ export interface EntityUpdatedEvent {
|
|
|
1645
1685
|
*/
|
|
1646
1686
|
currentEntity?: string;
|
|
1647
1687
|
}
|
|
1648
|
-
|
|
1649
|
-
/** Entity that was deleted */
|
|
1688
|
+
interface EntityDeletedEvent {
|
|
1689
|
+
/** Entity that was deleted. */
|
|
1650
1690
|
deletedEntity?: string | null;
|
|
1651
1691
|
}
|
|
1652
|
-
|
|
1692
|
+
interface ActionEvent {
|
|
1653
1693
|
body?: string;
|
|
1654
1694
|
}
|
|
1655
|
-
|
|
1695
|
+
interface MessageEnvelope {
|
|
1656
1696
|
/**
|
|
1657
1697
|
* App instance ID.
|
|
1658
1698
|
* @format GUID
|
|
@@ -1668,7 +1708,7 @@ export interface MessageEnvelope {
|
|
|
1668
1708
|
/** Stringify payload. */
|
|
1669
1709
|
data?: string;
|
|
1670
1710
|
}
|
|
1671
|
-
|
|
1711
|
+
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
1672
1712
|
/**
|
|
1673
1713
|
* ID of a site visitor that has not logged in to the site.
|
|
1674
1714
|
* @format GUID
|
|
@@ -1690,10 +1730,10 @@ export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
|
1690
1730
|
*/
|
|
1691
1731
|
appId?: string;
|
|
1692
1732
|
/** @readonly */
|
|
1693
|
-
identityType?:
|
|
1733
|
+
identityType?: WebhookIdentityTypeWithLiterals;
|
|
1694
1734
|
}
|
|
1695
1735
|
/** @oneof */
|
|
1696
|
-
|
|
1736
|
+
interface IdentificationDataIdOneOf {
|
|
1697
1737
|
/**
|
|
1698
1738
|
* ID of a site visitor that has not logged in to the site.
|
|
1699
1739
|
* @format GUID
|
|
@@ -1715,21 +1755,23 @@ export interface IdentificationDataIdOneOf {
|
|
|
1715
1755
|
*/
|
|
1716
1756
|
appId?: string;
|
|
1717
1757
|
}
|
|
1718
|
-
|
|
1758
|
+
declare enum WebhookIdentityType {
|
|
1719
1759
|
UNKNOWN = "UNKNOWN",
|
|
1720
1760
|
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
1721
1761
|
MEMBER = "MEMBER",
|
|
1722
1762
|
WIX_USER = "WIX_USER",
|
|
1723
1763
|
APP = "APP"
|
|
1724
1764
|
}
|
|
1725
|
-
|
|
1765
|
+
/** @enumType */
|
|
1766
|
+
type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|
|
1767
|
+
interface CreateSubscriptionInStateRequest extends CreateSubscriptionInStateRequestModeOneOf {
|
|
1726
1768
|
activeSubscription?: CreateSubscriptionRequest;
|
|
1727
1769
|
}
|
|
1728
1770
|
/** @oneof */
|
|
1729
|
-
|
|
1771
|
+
interface CreateSubscriptionInStateRequestModeOneOf {
|
|
1730
1772
|
activeSubscription?: CreateSubscriptionRequest;
|
|
1731
1773
|
}
|
|
1732
|
-
|
|
1774
|
+
interface CreateSubscriptionRequest {
|
|
1733
1775
|
subscription?: Subscription;
|
|
1734
1776
|
/** Optional settings for the payments. Should be empty for free subscriptions. */
|
|
1735
1777
|
paymentSettings?: PaymentSettings;
|
|
@@ -1741,45 +1783,47 @@ export interface CreateSubscriptionRequest {
|
|
|
1741
1783
|
/** Optional origin override for setting identity of subscription creator instead of extracting from context */
|
|
1742
1784
|
originOverride?: OriginOverride;
|
|
1743
1785
|
}
|
|
1744
|
-
|
|
1786
|
+
interface OriginOverride {
|
|
1745
1787
|
/** @format GUID */
|
|
1746
1788
|
appId?: string;
|
|
1747
1789
|
/** @format GUID */
|
|
1748
1790
|
instanceId?: string;
|
|
1749
1791
|
}
|
|
1750
|
-
|
|
1792
|
+
interface CreateSubscriptionInStateResponse {
|
|
1751
1793
|
/** @format GUID */
|
|
1752
1794
|
subscriptionId?: string;
|
|
1753
1795
|
}
|
|
1754
|
-
|
|
1796
|
+
interface PayCycleRequest {
|
|
1755
1797
|
/** @format GUID */
|
|
1756
1798
|
subscriptionId: string;
|
|
1757
|
-
paymentTestMode?:
|
|
1799
|
+
paymentTestMode?: PaymentTestModeWithLiterals;
|
|
1758
1800
|
/** @format GUID */
|
|
1759
1801
|
tenantId: string;
|
|
1760
1802
|
}
|
|
1761
|
-
|
|
1803
|
+
declare enum PaymentTestMode {
|
|
1762
1804
|
REGULAR = "REGULAR",
|
|
1763
1805
|
FAIL_TECHNICAL = "FAIL_TECHNICAL",
|
|
1764
1806
|
FAIL_DECLINE = "FAIL_DECLINE",
|
|
1765
1807
|
FAIL_RETRYABLE_DECLINE = "FAIL_RETRYABLE_DECLINE"
|
|
1766
1808
|
}
|
|
1767
|
-
|
|
1809
|
+
/** @enumType */
|
|
1810
|
+
type PaymentTestModeWithLiterals = PaymentTestMode | 'REGULAR' | 'FAIL_TECHNICAL' | 'FAIL_DECLINE' | 'FAIL_RETRYABLE_DECLINE';
|
|
1811
|
+
interface PayCycleResponse {
|
|
1768
1812
|
/** @format GUID */
|
|
1769
1813
|
invoiceId?: string;
|
|
1770
1814
|
/** @format GUID */
|
|
1771
1815
|
paymentOrderId?: string | null;
|
|
1772
1816
|
subscription?: Subscription;
|
|
1773
1817
|
}
|
|
1774
|
-
|
|
1818
|
+
interface GetFullSubscriptionDataRequest {
|
|
1775
1819
|
/** @format GUID */
|
|
1776
1820
|
_id?: string;
|
|
1777
1821
|
}
|
|
1778
|
-
|
|
1822
|
+
interface GetFullSubscriptionDataResponse {
|
|
1779
1823
|
subscription?: Subscription;
|
|
1780
1824
|
internalSubscriptionData?: InternalSubscriptionData;
|
|
1781
1825
|
}
|
|
1782
|
-
|
|
1826
|
+
interface InternalSubscriptionData {
|
|
1783
1827
|
/** @format GUID */
|
|
1784
1828
|
originInstanceId?: string;
|
|
1785
1829
|
source?: string | null;
|
|
@@ -1790,36 +1834,36 @@ export interface InternalSubscriptionData {
|
|
|
1790
1834
|
authorizationPaymentData?: PaymentData;
|
|
1791
1835
|
currentCyclePausePeriods?: PausePeriod[];
|
|
1792
1836
|
}
|
|
1793
|
-
|
|
1837
|
+
interface MigrationDetails {
|
|
1794
1838
|
/** system (application) where the Subscription has been created */
|
|
1795
1839
|
originSystem?: string;
|
|
1796
1840
|
/** date when the Subscription started to be managed in BASS */
|
|
1797
1841
|
shiftManagementDate?: Date | null;
|
|
1798
1842
|
}
|
|
1799
|
-
|
|
1843
|
+
interface PausePeriod {
|
|
1800
1844
|
startDate?: Date | null;
|
|
1801
1845
|
endDate?: Date | null;
|
|
1802
1846
|
}
|
|
1803
|
-
|
|
1847
|
+
interface GetSubscriptionAndInternalDataRequest {
|
|
1804
1848
|
/** @format GUID */
|
|
1805
1849
|
subscriptionId?: string;
|
|
1806
1850
|
/** @format GUID */
|
|
1807
1851
|
tenantId?: string;
|
|
1808
1852
|
}
|
|
1809
|
-
|
|
1853
|
+
interface GetSubscriptionAndInternalDataResponse {
|
|
1810
1854
|
subscription?: Subscription;
|
|
1811
1855
|
internalSubscriptionData?: InternalSubscriptionData;
|
|
1812
1856
|
}
|
|
1813
|
-
|
|
1857
|
+
interface SearchSubscriptionRequest {
|
|
1814
1858
|
/** @format GUID */
|
|
1815
1859
|
_id?: string;
|
|
1816
1860
|
/** @format GUID */
|
|
1817
1861
|
tenantId?: string;
|
|
1818
1862
|
}
|
|
1819
|
-
|
|
1863
|
+
interface SearchSubscriptionResponse {
|
|
1820
1864
|
subscription?: Subscription;
|
|
1821
1865
|
}
|
|
1822
|
-
|
|
1866
|
+
interface UpdatePausePaidDurationRequest {
|
|
1823
1867
|
/** @format GUID */
|
|
1824
1868
|
subscriptionId?: string;
|
|
1825
1869
|
/**
|
|
@@ -1830,73 +1874,83 @@ export interface UpdatePausePaidDurationRequest {
|
|
|
1830
1874
|
/** @format GUID */
|
|
1831
1875
|
tenantId?: string;
|
|
1832
1876
|
}
|
|
1833
|
-
|
|
1877
|
+
interface UpdatePausePaidDurationResponse {
|
|
1834
1878
|
}
|
|
1835
|
-
|
|
1879
|
+
interface UpdateStatusRequest {
|
|
1836
1880
|
/** @format GUID */
|
|
1837
1881
|
subscriptionId?: string;
|
|
1838
1882
|
/** @format GUID */
|
|
1839
1883
|
tenantId?: string;
|
|
1840
|
-
status?:
|
|
1884
|
+
status?: SubscriptionStatusEnumSubscriptionStatusWithLiterals;
|
|
1841
1885
|
}
|
|
1842
|
-
|
|
1886
|
+
interface UpdateStatusResponse {
|
|
1843
1887
|
subscription?: Subscription;
|
|
1844
1888
|
}
|
|
1845
|
-
|
|
1889
|
+
interface UpdatePaymentStatusRequest {
|
|
1846
1890
|
/** @format GUID */
|
|
1847
1891
|
subscriptionId?: string;
|
|
1848
1892
|
/** @format GUID */
|
|
1849
1893
|
tenantId?: string;
|
|
1850
|
-
paymentStatus?:
|
|
1894
|
+
paymentStatus?: PaymentStatusWithLiterals;
|
|
1851
1895
|
}
|
|
1852
|
-
|
|
1896
|
+
interface UpdatePaymentStatusResponse {
|
|
1853
1897
|
subscription?: Subscription;
|
|
1854
1898
|
}
|
|
1855
|
-
|
|
1899
|
+
interface ReviveSubscriptionRequest {
|
|
1856
1900
|
/** @format GUID */
|
|
1857
1901
|
tenantId?: string;
|
|
1858
1902
|
/** @format GUID */
|
|
1859
1903
|
subscriptionId?: string;
|
|
1860
|
-
revivePolicy?:
|
|
1904
|
+
revivePolicy?: RevivePolicyWithLiterals;
|
|
1861
1905
|
isTestRun?: boolean;
|
|
1862
1906
|
}
|
|
1863
|
-
|
|
1907
|
+
declare enum RevivePolicy {
|
|
1864
1908
|
SIMPLE = "SIMPLE",
|
|
1865
1909
|
RESUME = "RESUME"
|
|
1866
1910
|
}
|
|
1867
|
-
|
|
1911
|
+
/** @enumType */
|
|
1912
|
+
type RevivePolicyWithLiterals = RevivePolicy | 'SIMPLE' | 'RESUME';
|
|
1913
|
+
interface ReviveSubscriptionResponse {
|
|
1868
1914
|
subscription?: Subscription;
|
|
1869
1915
|
}
|
|
1870
|
-
|
|
1916
|
+
interface ConvertSapiRequest {
|
|
1871
1917
|
/** @format GUID */
|
|
1872
1918
|
subscriptionId?: string;
|
|
1873
1919
|
}
|
|
1874
|
-
|
|
1920
|
+
interface ConvertSapiResponse {
|
|
1875
1921
|
subscription?: Subscription;
|
|
1876
1922
|
}
|
|
1877
|
-
|
|
1923
|
+
interface GetSubscriptionInvoicesRequest {
|
|
1878
1924
|
/** @format GUID */
|
|
1879
1925
|
_id?: string;
|
|
1880
1926
|
}
|
|
1881
|
-
|
|
1927
|
+
interface GetSubscriptionInvoicesResponse {
|
|
1882
1928
|
invoices?: SubscriptionInvoice[];
|
|
1883
1929
|
}
|
|
1884
|
-
|
|
1930
|
+
interface SubscriptionInvoice {
|
|
1885
1931
|
/** @format GUID */
|
|
1886
1932
|
_id?: string;
|
|
1887
1933
|
subscriptionCycle?: number;
|
|
1888
1934
|
_createdDate?: Date | null;
|
|
1889
1935
|
}
|
|
1890
|
-
|
|
1936
|
+
interface FinishFreeTrialNowRequest {
|
|
1891
1937
|
/** @format GUID */
|
|
1892
1938
|
subscriptionId?: string;
|
|
1893
1939
|
/** @format GUID */
|
|
1894
1940
|
tenantId?: string;
|
|
1895
1941
|
}
|
|
1896
|
-
|
|
1942
|
+
interface FinishFreeTrialNowResponse {
|
|
1897
1943
|
subscription?: Subscription;
|
|
1898
1944
|
}
|
|
1899
|
-
|
|
1945
|
+
interface FixSubscriptionTimeCapsuleTasksRequest {
|
|
1946
|
+
/** @format GUID */
|
|
1947
|
+
subscriptionId?: string;
|
|
1948
|
+
/** @format GUID */
|
|
1949
|
+
tenantId?: string;
|
|
1950
|
+
}
|
|
1951
|
+
interface FixSubscriptionTimeCapsuleTasksResponse {
|
|
1952
|
+
}
|
|
1953
|
+
interface SendTimeCapsuleTaskCanceledBIRequest {
|
|
1900
1954
|
/** @format GUID */
|
|
1901
1955
|
tenantId?: string;
|
|
1902
1956
|
/** @format GUID */
|
|
@@ -1904,9 +1958,9 @@ export interface SendTimeCapsuleTaskCanceledBIRequest {
|
|
|
1904
1958
|
/** @minLength 1 */
|
|
1905
1959
|
taskType?: string;
|
|
1906
1960
|
}
|
|
1907
|
-
|
|
1961
|
+
interface Empty {
|
|
1908
1962
|
}
|
|
1909
|
-
|
|
1963
|
+
interface ScheduleTimeCapsuleTaskRequest {
|
|
1910
1964
|
/** @format GUID */
|
|
1911
1965
|
subscriptionId?: string;
|
|
1912
1966
|
/** @minLength 1 */
|
|
@@ -1915,7 +1969,7 @@ export interface ScheduleTimeCapsuleTaskRequest {
|
|
|
1915
1969
|
/** @format GUID */
|
|
1916
1970
|
tenantId?: string;
|
|
1917
1971
|
}
|
|
1918
|
-
|
|
1972
|
+
interface CancelTimeCapsuleTaskRequest {
|
|
1919
1973
|
/** @format GUID */
|
|
1920
1974
|
tenantId?: string;
|
|
1921
1975
|
/** @format GUID */
|
|
@@ -1923,15 +1977,15 @@ export interface CancelTimeCapsuleTaskRequest {
|
|
|
1923
1977
|
/** @minLength 1 */
|
|
1924
1978
|
taskType?: string;
|
|
1925
1979
|
}
|
|
1926
|
-
|
|
1980
|
+
interface UpdateFullSubscriptionRequest {
|
|
1927
1981
|
/** @format GUID */
|
|
1928
1982
|
tenantId?: string;
|
|
1929
1983
|
subscription?: Subscription;
|
|
1930
1984
|
}
|
|
1931
|
-
|
|
1985
|
+
interface UpdateFullSubscriptionResponse {
|
|
1932
1986
|
subscription?: Subscription;
|
|
1933
1987
|
}
|
|
1934
|
-
|
|
1988
|
+
interface UpdateSubscriptionInvoiceCycleRequest {
|
|
1935
1989
|
/** @format GUID */
|
|
1936
1990
|
subscriptionId?: string;
|
|
1937
1991
|
/** @format GUID */
|
|
@@ -1940,10 +1994,10 @@ export interface UpdateSubscriptionInvoiceCycleRequest {
|
|
|
1940
1994
|
invoiceId?: string;
|
|
1941
1995
|
subscriptionCycle?: number;
|
|
1942
1996
|
}
|
|
1943
|
-
|
|
1997
|
+
interface UpdateSubscriptionInvoiceCycleResponse {
|
|
1944
1998
|
subscriptionInvoice?: SubscriptionInvoice;
|
|
1945
1999
|
}
|
|
1946
|
-
|
|
2000
|
+
interface AddPausePeriodRequest {
|
|
1947
2001
|
/** @format GUID */
|
|
1948
2002
|
tenantId?: string;
|
|
1949
2003
|
/** @format GUID */
|
|
@@ -1951,10 +2005,10 @@ export interface AddPausePeriodRequest {
|
|
|
1951
2005
|
pauseStartDate?: Date | null;
|
|
1952
2006
|
pauseEndDate?: Date | null;
|
|
1953
2007
|
}
|
|
1954
|
-
|
|
2008
|
+
interface AddPausePeriodResponse {
|
|
1955
2009
|
subscription?: Subscription;
|
|
1956
2010
|
}
|
|
1957
|
-
|
|
2011
|
+
interface RunTimeCapsuleTaskNowRequest {
|
|
1958
2012
|
/** @format GUID */
|
|
1959
2013
|
tenantId?: string;
|
|
1960
2014
|
/** @format GUID */
|
|
@@ -1962,7 +2016,7 @@ export interface RunTimeCapsuleTaskNowRequest {
|
|
|
1962
2016
|
/** @minLength 1 */
|
|
1963
2017
|
taskType?: string;
|
|
1964
2018
|
}
|
|
1965
|
-
|
|
2019
|
+
interface CreateRecurringInvoiceBORequest {
|
|
1966
2020
|
/** @format GUID */
|
|
1967
2021
|
subscriptionId?: string;
|
|
1968
2022
|
/** @format GUID */
|
|
@@ -1970,10 +2024,10 @@ export interface CreateRecurringInvoiceBORequest {
|
|
|
1970
2024
|
/** @min 2 */
|
|
1971
2025
|
cycleNumber?: number;
|
|
1972
2026
|
}
|
|
1973
|
-
|
|
2027
|
+
interface CreateRecurringInvoiceBOResponse {
|
|
1974
2028
|
invoiceId?: string;
|
|
1975
2029
|
}
|
|
1976
|
-
|
|
2030
|
+
interface SetShiftingDataRequest {
|
|
1977
2031
|
/** @format GUID */
|
|
1978
2032
|
subscriptionId?: string;
|
|
1979
2033
|
/** @format GUID */
|
|
@@ -1981,10 +2035,10 @@ export interface SetShiftingDataRequest {
|
|
|
1981
2035
|
isBassManaged?: boolean;
|
|
1982
2036
|
shiftManagementDate?: Date | null;
|
|
1983
2037
|
}
|
|
1984
|
-
|
|
2038
|
+
interface SetShiftingDataResponse {
|
|
1985
2039
|
subscription?: Subscription;
|
|
1986
2040
|
}
|
|
1987
|
-
|
|
2041
|
+
interface FixSubscriptionInvoicesRequest extends FixSubscriptionInvoicesRequestModeOneOf {
|
|
1988
2042
|
attachInvoice?: AttachInvoice;
|
|
1989
2043
|
detachInvoice?: DetachInvoice;
|
|
1990
2044
|
/** @format GUID */
|
|
@@ -1993,66 +2047,68 @@ export interface FixSubscriptionInvoicesRequest extends FixSubscriptionInvoicesR
|
|
|
1993
2047
|
subscriptionId?: string;
|
|
1994
2048
|
}
|
|
1995
2049
|
/** @oneof */
|
|
1996
|
-
|
|
2050
|
+
interface FixSubscriptionInvoicesRequestModeOneOf {
|
|
1997
2051
|
attachInvoice?: AttachInvoice;
|
|
1998
2052
|
detachInvoice?: DetachInvoice;
|
|
1999
2053
|
}
|
|
2000
|
-
|
|
2054
|
+
interface AttachInvoice {
|
|
2001
2055
|
/** @format GUID */
|
|
2002
2056
|
invoiceId?: string;
|
|
2003
2057
|
}
|
|
2004
|
-
|
|
2058
|
+
interface DetachInvoice {
|
|
2005
2059
|
/** @format GUID */
|
|
2006
2060
|
invoiceId?: string;
|
|
2007
2061
|
}
|
|
2008
|
-
|
|
2062
|
+
interface FixSubscriptionInvoicesResponse {
|
|
2009
2063
|
invoices?: SubscriptionInvoice[];
|
|
2010
2064
|
}
|
|
2011
|
-
|
|
2065
|
+
interface RestoreDraftSubscriptionRequest {
|
|
2012
2066
|
/** @format GUID */
|
|
2013
2067
|
tenantId?: string;
|
|
2014
2068
|
/** @format GUID */
|
|
2015
2069
|
subscriptionId?: string;
|
|
2016
2070
|
}
|
|
2017
|
-
|
|
2071
|
+
interface RestoreDraftSubscriptionResponse {
|
|
2018
2072
|
subscription?: Subscription;
|
|
2019
2073
|
}
|
|
2020
|
-
|
|
2074
|
+
interface DeleteDraftSubscriptionRequest {
|
|
2021
2075
|
/** @format GUID */
|
|
2022
2076
|
tenantId?: string;
|
|
2023
2077
|
/** @format GUID */
|
|
2024
2078
|
subscriptionId?: string;
|
|
2025
2079
|
}
|
|
2026
|
-
|
|
2080
|
+
interface DeleteDraftSubscriptionResponse {
|
|
2027
2081
|
subscription?: Subscription;
|
|
2028
2082
|
}
|
|
2029
|
-
|
|
2083
|
+
interface DeleteSubscriptionBORequest {
|
|
2030
2084
|
/** @format GUID */
|
|
2031
2085
|
tenantId?: string;
|
|
2032
2086
|
/** @format GUID */
|
|
2033
2087
|
subscriptionId?: string;
|
|
2034
2088
|
}
|
|
2035
|
-
|
|
2089
|
+
interface DeleteSubscriptionBOResponse {
|
|
2036
2090
|
subscription?: Subscription;
|
|
2037
2091
|
}
|
|
2038
|
-
|
|
2092
|
+
interface CancelSubscriptionBORequest {
|
|
2039
2093
|
/** @format GUID */
|
|
2040
2094
|
tenantId?: string;
|
|
2041
2095
|
/** @format GUID */
|
|
2042
2096
|
subscriptionId?: string;
|
|
2043
|
-
initiator?:
|
|
2097
|
+
initiator?: ActionInitiatorWithLiterals;
|
|
2044
2098
|
reason?: string | null;
|
|
2045
2099
|
}
|
|
2046
|
-
|
|
2100
|
+
declare enum ActionInitiator {
|
|
2047
2101
|
UNDEFINED = "UNDEFINED",
|
|
2048
2102
|
BUSINESS = "BUSINESS",
|
|
2049
2103
|
CUSTOMER = "CUSTOMER",
|
|
2050
2104
|
SYSTEM = "SYSTEM"
|
|
2051
2105
|
}
|
|
2052
|
-
|
|
2106
|
+
/** @enumType */
|
|
2107
|
+
type ActionInitiatorWithLiterals = ActionInitiator | 'UNDEFINED' | 'BUSINESS' | 'CUSTOMER' | 'SYSTEM';
|
|
2108
|
+
interface CancelSubscriptionBOResponse {
|
|
2053
2109
|
subscription?: Subscription;
|
|
2054
2110
|
}
|
|
2055
|
-
|
|
2111
|
+
interface UpdatePaymentMethodBORequest {
|
|
2056
2112
|
/** @format GUID */
|
|
2057
2113
|
tenantId?: string;
|
|
2058
2114
|
/** @format GUID */
|
|
@@ -2060,10 +2116,10 @@ export interface UpdatePaymentMethodBORequest {
|
|
|
2060
2116
|
/** @format GUID */
|
|
2061
2117
|
paymentMethodId?: string;
|
|
2062
2118
|
}
|
|
2063
|
-
|
|
2119
|
+
interface UpdatePaymentMethodBOResponse {
|
|
2064
2120
|
subscription?: Subscription;
|
|
2065
2121
|
}
|
|
2066
|
-
|
|
2122
|
+
interface SendSubscriptionActionEventBORequest extends SendSubscriptionActionEventBORequestEventOneOf {
|
|
2067
2123
|
billingCycleStarted?: SubscriptionBillingCycleStarted;
|
|
2068
2124
|
/** @format GUID */
|
|
2069
2125
|
tenantId?: string;
|
|
@@ -2071,10 +2127,10 @@ export interface SendSubscriptionActionEventBORequest extends SendSubscriptionAc
|
|
|
2071
2127
|
subscriptionId?: string;
|
|
2072
2128
|
}
|
|
2073
2129
|
/** @oneof */
|
|
2074
|
-
|
|
2130
|
+
interface SendSubscriptionActionEventBORequestEventOneOf {
|
|
2075
2131
|
billingCycleStarted?: SubscriptionBillingCycleStarted;
|
|
2076
2132
|
}
|
|
2077
|
-
|
|
2133
|
+
interface SubscriptionBillingCycleStarted {
|
|
2078
2134
|
subscription?: Subscription;
|
|
2079
2135
|
/**
|
|
2080
2136
|
* Wix Pay transaction id, optional. Exists if event was triggered by a payment.
|
|
@@ -2082,45 +2138,45 @@ export interface SubscriptionBillingCycleStarted {
|
|
|
2082
2138
|
*/
|
|
2083
2139
|
paymentTransactionId?: string | null;
|
|
2084
2140
|
}
|
|
2085
|
-
|
|
2141
|
+
interface SendSubscriptionActionEventResponse {
|
|
2086
2142
|
}
|
|
2087
|
-
|
|
2143
|
+
interface HandleSubscriptionAfterInvoiceMarkedAsPaidRequest {
|
|
2088
2144
|
/** @format GUID */
|
|
2089
2145
|
tenantId?: string;
|
|
2090
2146
|
/** @format GUID */
|
|
2091
2147
|
subscriptionId?: string;
|
|
2092
2148
|
transactionId?: string;
|
|
2093
2149
|
}
|
|
2094
|
-
|
|
2150
|
+
interface PauseSubscriptionBORequest {
|
|
2095
2151
|
/** @format GUID */
|
|
2096
2152
|
tenantId?: string;
|
|
2097
2153
|
/** @format GUID */
|
|
2098
2154
|
subscriptionId?: string;
|
|
2099
|
-
pausePolicy?:
|
|
2100
|
-
pauseAt?:
|
|
2101
|
-
initiator?:
|
|
2155
|
+
pausePolicy?: PausePolicyWithLiterals;
|
|
2156
|
+
pauseAt?: PauseAtWithLiterals;
|
|
2157
|
+
initiator?: ActionInitiatorWithLiterals;
|
|
2102
2158
|
/** @maxLength 500 */
|
|
2103
2159
|
reason?: string | null;
|
|
2104
2160
|
}
|
|
2105
|
-
|
|
2161
|
+
interface PauseSubscriptionBOResponse {
|
|
2106
2162
|
subscription?: Subscription;
|
|
2107
2163
|
}
|
|
2108
|
-
|
|
2164
|
+
interface SetIsMigratedEvent {
|
|
2109
2165
|
/** @format GUID */
|
|
2110
2166
|
subscriptionId?: string;
|
|
2111
2167
|
}
|
|
2112
|
-
|
|
2168
|
+
interface SubscriptionDelayedSyncEvent {
|
|
2113
2169
|
/** @format GUID */
|
|
2114
2170
|
subscriptionId?: string;
|
|
2115
2171
|
}
|
|
2116
|
-
|
|
2172
|
+
interface InvoiceAction extends InvoiceActionActionTypeOneOf {
|
|
2117
2173
|
payRecurring?: PayRecurringInvoice;
|
|
2118
2174
|
}
|
|
2119
2175
|
/** @oneof */
|
|
2120
|
-
|
|
2176
|
+
interface InvoiceActionActionTypeOneOf {
|
|
2121
2177
|
payRecurring?: PayRecurringInvoice;
|
|
2122
2178
|
}
|
|
2123
|
-
|
|
2179
|
+
interface PayRecurringInvoice {
|
|
2124
2180
|
/** @format GUID */
|
|
2125
2181
|
invoiceId?: string;
|
|
2126
2182
|
}
|
|
@@ -2132,7 +2188,7 @@ export interface PayRecurringInvoice {
|
|
|
2132
2188
|
* * For a subscription with future start date, the start date is also the activation date.
|
|
2133
2189
|
* * When a subscription is resumed from a pause status, the resume date is also the activation date.
|
|
2134
2190
|
*/
|
|
2135
|
-
|
|
2191
|
+
interface SubscriptionActivated {
|
|
2136
2192
|
subscription?: Subscription;
|
|
2137
2193
|
}
|
|
2138
2194
|
/**
|
|
@@ -2141,22 +2197,22 @@ export interface SubscriptionActivated {
|
|
|
2141
2197
|
* This is different from a Canceled subscription which ends the subscription before a designated end date.
|
|
2142
2198
|
* Therefore, Ended and Canceled are mutually exclusive.
|
|
2143
2199
|
*/
|
|
2144
|
-
|
|
2200
|
+
interface SubscriptionEnded {
|
|
2145
2201
|
subscription?: Subscription;
|
|
2146
2202
|
}
|
|
2147
|
-
|
|
2203
|
+
interface SubscriptionInitialPurchaseCompleted {
|
|
2148
2204
|
subscription?: Subscription;
|
|
2149
2205
|
actionDetails?: ActionDetails;
|
|
2150
2206
|
/** @format GUID */
|
|
2151
2207
|
paymentTransactionId?: string | null;
|
|
2152
2208
|
}
|
|
2153
|
-
|
|
2209
|
+
interface SubscriptionCycleReadyToPay {
|
|
2154
2210
|
subscription?: Subscription;
|
|
2155
2211
|
}
|
|
2156
|
-
|
|
2212
|
+
interface SubscriptionRevived {
|
|
2157
2213
|
subscription?: Subscription;
|
|
2158
2214
|
}
|
|
2159
|
-
|
|
2215
|
+
interface CreateSubscriptionResponse {
|
|
2160
2216
|
subscription?: Subscription;
|
|
2161
2217
|
/**
|
|
2162
2218
|
* Payments order that should be paid (or authorize card) in order to activate subscription. Empty for free subscriptions.
|
|
@@ -2164,7 +2220,7 @@ export interface CreateSubscriptionResponse {
|
|
|
2164
2220
|
*/
|
|
2165
2221
|
paymentOrderId?: string | null;
|
|
2166
2222
|
}
|
|
2167
|
-
|
|
2223
|
+
interface UpdateSubscriptionRequest {
|
|
2168
2224
|
/** Revision is validated if Subscription.revision is set */
|
|
2169
2225
|
subscription?: Subscription;
|
|
2170
2226
|
/**
|
|
@@ -2173,10 +2229,10 @@ export interface UpdateSubscriptionRequest {
|
|
|
2173
2229
|
*/
|
|
2174
2230
|
fieldMask?: string[];
|
|
2175
2231
|
}
|
|
2176
|
-
|
|
2232
|
+
interface UpdateSubscriptionResponse {
|
|
2177
2233
|
subscription?: Subscription;
|
|
2178
2234
|
}
|
|
2179
|
-
|
|
2235
|
+
interface UpdateSubscriptionStartDateRequest {
|
|
2180
2236
|
/**
|
|
2181
2237
|
* Subscription ID
|
|
2182
2238
|
* @format GUID
|
|
@@ -2189,10 +2245,10 @@ export interface UpdateSubscriptionStartDateRequest {
|
|
|
2189
2245
|
*/
|
|
2190
2246
|
startDate?: Date | null;
|
|
2191
2247
|
}
|
|
2192
|
-
|
|
2248
|
+
interface UpdateSubscriptionStartDateResponse {
|
|
2193
2249
|
subscription?: Subscription;
|
|
2194
2250
|
}
|
|
2195
|
-
|
|
2251
|
+
interface UpdateSubscriptionPoliciesRequest {
|
|
2196
2252
|
/**
|
|
2197
2253
|
* Subscription ID
|
|
2198
2254
|
* @format GUID
|
|
@@ -2200,11 +2256,11 @@ export interface UpdateSubscriptionPoliciesRequest {
|
|
|
2200
2256
|
_id?: string;
|
|
2201
2257
|
cancellableByCustomer?: boolean | null;
|
|
2202
2258
|
}
|
|
2203
|
-
|
|
2259
|
+
interface UpdateSubscriptionPoliciesResponse {
|
|
2204
2260
|
/** Updated policies of the subscription */
|
|
2205
2261
|
policies?: SubscriptionPolicies;
|
|
2206
2262
|
}
|
|
2207
|
-
|
|
2263
|
+
interface UpdateSubscriptionBillingDateRequest {
|
|
2208
2264
|
/**
|
|
2209
2265
|
* ID of the subscription to update the billing date for.
|
|
2210
2266
|
* @format GUID
|
|
@@ -2223,16 +2279,16 @@ export interface UpdateSubscriptionBillingDateRequest {
|
|
|
2223
2279
|
*/
|
|
2224
2280
|
proration?: Proration;
|
|
2225
2281
|
}
|
|
2226
|
-
|
|
2282
|
+
interface UpdateSubscriptionBillingDateResponse {
|
|
2227
2283
|
/** Updated subscription. */
|
|
2228
2284
|
subscription?: Subscription;
|
|
2229
2285
|
}
|
|
2230
|
-
|
|
2286
|
+
interface SubscriptionBillingDateUpdated {
|
|
2231
2287
|
subscription?: Subscription;
|
|
2232
2288
|
billingDate?: Date | null;
|
|
2233
2289
|
proration?: Proration;
|
|
2234
2290
|
}
|
|
2235
|
-
|
|
2291
|
+
interface UpdateSubscriptionOriginRequest {
|
|
2236
2292
|
/**
|
|
2237
2293
|
* ID of the subscription to update origin.
|
|
2238
2294
|
* @format GUID
|
|
@@ -2244,11 +2300,11 @@ export interface UpdateSubscriptionOriginRequest {
|
|
|
2244
2300
|
*/
|
|
2245
2301
|
entityId?: string;
|
|
2246
2302
|
}
|
|
2247
|
-
|
|
2303
|
+
interface UpdateSubscriptionOriginResponse {
|
|
2248
2304
|
/** Updated subscription. */
|
|
2249
2305
|
subscription?: Subscription;
|
|
2250
2306
|
}
|
|
2251
|
-
|
|
2307
|
+
interface ReviseSubscriptionRequest {
|
|
2252
2308
|
/**
|
|
2253
2309
|
* Subscription ID
|
|
2254
2310
|
* @format GUID
|
|
@@ -2260,17 +2316,17 @@ export interface ReviseSubscriptionRequest {
|
|
|
2260
2316
|
*/
|
|
2261
2317
|
items?: Item[];
|
|
2262
2318
|
}
|
|
2263
|
-
|
|
2319
|
+
interface ReviseSubscriptionResponse {
|
|
2264
2320
|
subscription?: Subscription;
|
|
2265
2321
|
}
|
|
2266
|
-
|
|
2322
|
+
interface UpdateSubscriptionItemsRequest {
|
|
2267
2323
|
/**
|
|
2268
2324
|
* Subscription ID
|
|
2269
2325
|
* @format GUID
|
|
2270
2326
|
*/
|
|
2271
2327
|
_id?: string;
|
|
2272
2328
|
/** Update action. For RESET_PENDING_UPDATES, nothing but the subscription ID should be defined in the request. */
|
|
2273
|
-
updateAction?:
|
|
2329
|
+
updateAction?: UpdateActionWithLiterals;
|
|
2274
2330
|
/** Updates execution date. Relevant only for UpdateAction.SPECIFIC_DATE. Only specific date is supported. */
|
|
2275
2331
|
scheduleAdditionalInfo?: ScheduleAdditionalInfo;
|
|
2276
2332
|
/**
|
|
@@ -2290,7 +2346,7 @@ export interface UpdateSubscriptionItemsRequest {
|
|
|
2290
2346
|
*/
|
|
2291
2347
|
itemsToDelete?: string[] | null;
|
|
2292
2348
|
}
|
|
2293
|
-
|
|
2349
|
+
declare enum UpdateAction {
|
|
2294
2350
|
NONE = "NONE",
|
|
2295
2351
|
/** Update subscription immediately, please note proration for updates changing price are not yet supported */
|
|
2296
2352
|
IMMEDIATELY = "IMMEDIATELY",
|
|
@@ -2301,7 +2357,9 @@ export declare enum UpdateAction {
|
|
|
2301
2357
|
/** Request updates that will take affect only at a specific date. */
|
|
2302
2358
|
SPECIFIC_DATE = "SPECIFIC_DATE"
|
|
2303
2359
|
}
|
|
2304
|
-
|
|
2360
|
+
/** @enumType */
|
|
2361
|
+
type UpdateActionWithLiterals = UpdateAction | 'NONE' | 'IMMEDIATELY' | 'NEXT_BILLING_CYCLE' | 'RESET_PENDING_UPDATES' | 'SPECIFIC_DATE';
|
|
2362
|
+
interface ScheduleAdditionalInfo extends ScheduleAdditionalInfoParamOneOf {
|
|
2305
2363
|
/**
|
|
2306
2364
|
* Future date when the update becomes effective in `YYYY-MM-DDThh:mm:ss.sssZ`
|
|
2307
2365
|
* format. The use of this field may be restricted in various BASS endpoints.
|
|
@@ -2322,7 +2380,7 @@ export interface ScheduleAdditionalInfo extends ScheduleAdditionalInfoParamOneOf
|
|
|
2322
2380
|
numberOfCycles?: number;
|
|
2323
2381
|
}
|
|
2324
2382
|
/** @oneof */
|
|
2325
|
-
|
|
2383
|
+
interface ScheduleAdditionalInfoParamOneOf {
|
|
2326
2384
|
/**
|
|
2327
2385
|
* Future date when the update becomes effective in `YYYY-MM-DDThh:mm:ss.sssZ`
|
|
2328
2386
|
* format. The use of this field may be restricted in various BASS endpoints.
|
|
@@ -2342,10 +2400,10 @@ export interface ScheduleAdditionalInfoParamOneOf {
|
|
|
2342
2400
|
*/
|
|
2343
2401
|
numberOfCycles?: number;
|
|
2344
2402
|
}
|
|
2345
|
-
|
|
2403
|
+
interface UpdateSubscriptionItemsResponse {
|
|
2346
2404
|
subscription?: Subscription;
|
|
2347
2405
|
}
|
|
2348
|
-
|
|
2406
|
+
interface BulkUpdateSubscriptionItemsByFilterRequest {
|
|
2349
2407
|
/**
|
|
2350
2408
|
* Filter to identify the subscriptions for which items are updated. For
|
|
2351
2409
|
* supported fields see
|
|
@@ -2374,7 +2432,7 @@ export interface BulkUpdateSubscriptionItemsByFilterRequest {
|
|
|
2374
2432
|
* + `"SPECIFIC_DATE"`: The updates are scheduled for the date specified in `scheduleAdditionalInfo.specificDate`.
|
|
2375
2433
|
* + `"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
2434
|
*/
|
|
2377
|
-
updateAction?:
|
|
2435
|
+
updateAction?: UpdateActionWithLiterals;
|
|
2378
2436
|
/**
|
|
2379
2437
|
* Additional information for updates. Currently, only supported for
|
|
2380
2438
|
* `{"updateAction": "SPECIFIC_DATE"}`.
|
|
@@ -2394,7 +2452,7 @@ export interface BulkUpdateSubscriptionItemsByFilterRequest {
|
|
|
2394
2452
|
*/
|
|
2395
2453
|
itemsToAdd?: Item[];
|
|
2396
2454
|
}
|
|
2397
|
-
|
|
2455
|
+
interface BulkItemChange {
|
|
2398
2456
|
/** Information about the new item price. */
|
|
2399
2457
|
pricingModel?: PricingModel;
|
|
2400
2458
|
/**
|
|
@@ -2407,7 +2465,7 @@ export interface BulkItemChange {
|
|
|
2407
2465
|
/** Information about the new item tax. */
|
|
2408
2466
|
tax?: Tax;
|
|
2409
2467
|
}
|
|
2410
|
-
|
|
2468
|
+
interface BulkUpdateSubscriptionItemsByFilterResponse {
|
|
2411
2469
|
/**
|
|
2412
2470
|
* ID of your bulk job. You can use
|
|
2413
2471
|
* [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)
|
|
@@ -2415,80 +2473,80 @@ export interface BulkUpdateSubscriptionItemsByFilterResponse {
|
|
|
2415
2473
|
*/
|
|
2416
2474
|
jobId?: string;
|
|
2417
2475
|
}
|
|
2418
|
-
|
|
2476
|
+
interface DeleteSubscriptionRequest {
|
|
2419
2477
|
/** @format GUID */
|
|
2420
2478
|
_id?: string;
|
|
2421
2479
|
revision?: string;
|
|
2422
2480
|
}
|
|
2423
|
-
|
|
2481
|
+
interface DeleteSubscriptionResponse {
|
|
2424
2482
|
}
|
|
2425
|
-
|
|
2483
|
+
interface CancelSubscriptionRequest {
|
|
2426
2484
|
/** @format GUID */
|
|
2427
2485
|
_id: string;
|
|
2428
2486
|
actionContext: ActionContext;
|
|
2429
2487
|
}
|
|
2430
|
-
|
|
2431
|
-
initiator?:
|
|
2488
|
+
interface ActionContext {
|
|
2489
|
+
initiator?: ActionInitiatorWithLiterals;
|
|
2432
2490
|
/** Optional action reason message */
|
|
2433
2491
|
reason?: string | null;
|
|
2434
2492
|
}
|
|
2435
|
-
|
|
2493
|
+
interface CancelSubscriptionResponse {
|
|
2436
2494
|
subscription?: Subscription;
|
|
2437
2495
|
}
|
|
2438
|
-
|
|
2496
|
+
interface PauseSubscriptionRequest {
|
|
2439
2497
|
/** @format GUID */
|
|
2440
2498
|
_id: string;
|
|
2441
|
-
pausePolicy?:
|
|
2442
|
-
pauseAt?:
|
|
2499
|
+
pausePolicy?: PausePolicyWithLiterals;
|
|
2500
|
+
pauseAt?: PauseAtWithLiterals;
|
|
2443
2501
|
/** contains additional scheduling information for certain pause_at options (for example: SPECIFIC_DATE & NUMBER_OF_CYCLES_FROM_TODAY) */
|
|
2444
2502
|
pauseAtSchedule?: ScheduleAdditionalInfo;
|
|
2445
2503
|
/** contains additional scheduling information for certain auto_resume_at either specific date */
|
|
2446
2504
|
autoResumeAtSchedule?: ScheduleAdditionalInfo;
|
|
2447
2505
|
actionContext: ActionContext;
|
|
2448
2506
|
}
|
|
2449
|
-
|
|
2507
|
+
interface PauseSubscriptionResponse {
|
|
2450
2508
|
subscription?: Subscription;
|
|
2451
2509
|
}
|
|
2452
|
-
|
|
2510
|
+
interface SubscriptionPaused {
|
|
2453
2511
|
subscription?: Subscription;
|
|
2454
|
-
pausePolicy?:
|
|
2512
|
+
pausePolicy?: PausePolicyWithLiterals;
|
|
2455
2513
|
actionDetails?: ActionDetails;
|
|
2456
2514
|
}
|
|
2457
|
-
|
|
2515
|
+
interface PauseSubscriptionRequested {
|
|
2458
2516
|
subscription?: Subscription;
|
|
2459
|
-
pauseAt?:
|
|
2460
|
-
pausePolicy?:
|
|
2517
|
+
pauseAt?: PauseAtWithLiterals;
|
|
2518
|
+
pausePolicy?: PausePolicyWithLiterals;
|
|
2461
2519
|
actionDetails?: ActionDetails;
|
|
2462
2520
|
}
|
|
2463
|
-
|
|
2521
|
+
interface ScheduledPauseCanceled {
|
|
2464
2522
|
subscription?: Subscription;
|
|
2465
2523
|
actionDetails?: ActionDetails;
|
|
2466
2524
|
}
|
|
2467
|
-
|
|
2525
|
+
interface ResumeSubscriptionRequest {
|
|
2468
2526
|
/** @format GUID */
|
|
2469
2527
|
_id: string;
|
|
2470
|
-
resumeAt?:
|
|
2528
|
+
resumeAt?: ResumeAtWithLiterals;
|
|
2471
2529
|
/** contains additional scheduling information for certain resume_at options (for example: SPECIFIC_DATE) */
|
|
2472
2530
|
resumeAtSchedule?: ScheduleAdditionalInfo;
|
|
2473
2531
|
actionContext: ActionContext;
|
|
2474
2532
|
}
|
|
2475
|
-
|
|
2533
|
+
interface ResumeSubscriptionResponse {
|
|
2476
2534
|
subscription?: Subscription;
|
|
2477
2535
|
}
|
|
2478
|
-
|
|
2536
|
+
interface SubscriptionResumed {
|
|
2479
2537
|
subscription?: Subscription;
|
|
2480
2538
|
actionDetails?: ActionDetails;
|
|
2481
2539
|
}
|
|
2482
|
-
|
|
2540
|
+
interface ResumeSubscriptionRequested {
|
|
2483
2541
|
subscription?: Subscription;
|
|
2484
|
-
resumeAt?:
|
|
2542
|
+
resumeAt?: ResumeAtWithLiterals;
|
|
2485
2543
|
actionDetails?: ActionDetails;
|
|
2486
2544
|
}
|
|
2487
|
-
|
|
2545
|
+
interface ScheduledResumeCanceled {
|
|
2488
2546
|
subscription?: Subscription;
|
|
2489
2547
|
actionDetails?: ActionDetails;
|
|
2490
2548
|
}
|
|
2491
|
-
|
|
2549
|
+
interface SearchSubscriptionsRequest extends SearchSubscriptionsRequestPagingMethodOneOf {
|
|
2492
2550
|
/** Limit number of results and enable to skip rows. The default limit is 25. */
|
|
2493
2551
|
paging?: Paging;
|
|
2494
2552
|
/** A Cursor option for efficient paging. Pass this field from the previous search response to continue to the next page. */
|
|
@@ -2499,57 +2557,57 @@ export interface SearchSubscriptionsRequest extends SearchSubscriptionsRequestPa
|
|
|
2499
2557
|
sorting?: SortingClauses;
|
|
2500
2558
|
}
|
|
2501
2559
|
/** @oneof */
|
|
2502
|
-
|
|
2560
|
+
interface SearchSubscriptionsRequestPagingMethodOneOf {
|
|
2503
2561
|
/** Limit number of results and enable to skip rows. The default limit is 25. */
|
|
2504
2562
|
paging?: Paging;
|
|
2505
2563
|
/** A Cursor option for efficient paging. Pass this field from the previous search response to continue to the next page. */
|
|
2506
2564
|
cursor?: CursorPaging;
|
|
2507
2565
|
}
|
|
2508
|
-
|
|
2566
|
+
interface SortingClauses {
|
|
2509
2567
|
sorting?: Sorting[];
|
|
2510
2568
|
}
|
|
2511
|
-
|
|
2569
|
+
interface SearchSubscriptionsResponse {
|
|
2512
2570
|
subscriptions?: Subscription[];
|
|
2513
2571
|
cursor?: CursorPaging;
|
|
2514
2572
|
}
|
|
2515
|
-
|
|
2573
|
+
interface TurnOnSubscriptionAutoRenewalRequest {
|
|
2516
2574
|
/** @format GUID */
|
|
2517
2575
|
_id: string;
|
|
2518
2576
|
actionContext: ActionContext;
|
|
2519
2577
|
}
|
|
2520
|
-
|
|
2578
|
+
interface TurnOnSubscriptionAutoRenewalResponse {
|
|
2521
2579
|
subscription?: Subscription;
|
|
2522
2580
|
}
|
|
2523
|
-
|
|
2581
|
+
interface SubscriptionAutoRenewalTurnedOn {
|
|
2524
2582
|
subscription?: Subscription;
|
|
2525
2583
|
actionDetails?: ActionDetails;
|
|
2526
2584
|
}
|
|
2527
|
-
|
|
2585
|
+
interface TurnOffSubscriptionAutoRenewalRequest {
|
|
2528
2586
|
/** @format GUID */
|
|
2529
2587
|
_id: string;
|
|
2530
2588
|
actionContext: ActionContext;
|
|
2531
2589
|
}
|
|
2532
|
-
|
|
2590
|
+
interface TurnOffSubscriptionAutoRenewalResponse {
|
|
2533
2591
|
subscription?: Subscription;
|
|
2534
2592
|
}
|
|
2535
|
-
|
|
2593
|
+
interface SubscriptionAutoRenewalTurnedOff {
|
|
2536
2594
|
subscription?: Subscription;
|
|
2537
2595
|
actionDetails?: ActionDetails;
|
|
2538
2596
|
}
|
|
2539
|
-
|
|
2597
|
+
interface MarkLatestInvoiceAsPaidRequest {
|
|
2540
2598
|
/**
|
|
2541
2599
|
* The ID of the offline subscription to mark as paid its latest invoice
|
|
2542
2600
|
* @format GUID
|
|
2543
2601
|
*/
|
|
2544
2602
|
subscriptionId: string;
|
|
2545
2603
|
}
|
|
2546
|
-
|
|
2604
|
+
interface MarkLatestInvoiceAsPaidResponse {
|
|
2547
2605
|
subscription?: Subscription;
|
|
2548
2606
|
}
|
|
2549
|
-
|
|
2607
|
+
interface LatestInvoiceMarkedAsPaid {
|
|
2550
2608
|
subscription?: Subscription;
|
|
2551
2609
|
}
|
|
2552
|
-
|
|
2610
|
+
interface MultipleSubscriptionsOnOrdersInvoice {
|
|
2553
2611
|
/**
|
|
2554
2612
|
* the invoice id of the affected subscription
|
|
2555
2613
|
* @format GUID
|
|
@@ -2561,7 +2619,7 @@ export interface MultipleSubscriptionsOnOrdersInvoice {
|
|
|
2561
2619
|
*/
|
|
2562
2620
|
orderId?: string;
|
|
2563
2621
|
}
|
|
2564
|
-
|
|
2622
|
+
interface MarkBillingCycleAsPaidRequest {
|
|
2565
2623
|
/**
|
|
2566
2624
|
* The ID of the subscription to mark as paid its invoice.
|
|
2567
2625
|
* @format GUID
|
|
@@ -2574,20 +2632,20 @@ export interface MarkBillingCycleAsPaidRequest {
|
|
|
2574
2632
|
*/
|
|
2575
2633
|
paidCycle?: number | null;
|
|
2576
2634
|
}
|
|
2577
|
-
|
|
2635
|
+
interface MarkBillingCycleAsPaidResponse {
|
|
2578
2636
|
subscription?: Subscription;
|
|
2579
2637
|
}
|
|
2580
|
-
|
|
2638
|
+
interface GetSubscriptionsStatsRequest {
|
|
2581
2639
|
}
|
|
2582
|
-
|
|
2640
|
+
interface GetSubscriptionsStatsResponse {
|
|
2583
2641
|
amountByStatuses?: AmountByStatus[];
|
|
2584
2642
|
total?: number;
|
|
2585
2643
|
}
|
|
2586
|
-
|
|
2587
|
-
status?:
|
|
2644
|
+
interface AmountByStatus {
|
|
2645
|
+
status?: SubscriptionStatusEnumSubscriptionStatusWithLiterals;
|
|
2588
2646
|
amount?: number;
|
|
2589
2647
|
}
|
|
2590
|
-
|
|
2648
|
+
interface ExtendSubscriptionRequest extends ExtendSubscriptionRequestExtendPolicyOneOf {
|
|
2591
2649
|
/** User won't be charged for additional period added on top of subscription end date. */
|
|
2592
2650
|
extensionPeriod?: Duration;
|
|
2593
2651
|
/**
|
|
@@ -2603,7 +2661,7 @@ export interface ExtendSubscriptionRequest extends ExtendSubscriptionRequestExte
|
|
|
2603
2661
|
actionContext: ActionContext;
|
|
2604
2662
|
}
|
|
2605
2663
|
/** @oneof */
|
|
2606
|
-
|
|
2664
|
+
interface ExtendSubscriptionRequestExtendPolicyOneOf {
|
|
2607
2665
|
/** User won't be charged for additional period added on top of subscription end date. */
|
|
2608
2666
|
extensionPeriod?: Duration;
|
|
2609
2667
|
/**
|
|
@@ -2612,25 +2670,27 @@ export interface ExtendSubscriptionRequestExtendPolicyOneOf {
|
|
|
2612
2670
|
*/
|
|
2613
2671
|
extensionBillingCycles?: number;
|
|
2614
2672
|
}
|
|
2615
|
-
|
|
2673
|
+
interface ExtendSubscriptionResponse {
|
|
2616
2674
|
/** The now extended subscription */
|
|
2617
2675
|
subscription?: Subscription;
|
|
2618
2676
|
}
|
|
2619
|
-
|
|
2677
|
+
interface AllowedActionsRequest {
|
|
2620
2678
|
/** @format GUID */
|
|
2621
2679
|
_id: string;
|
|
2622
2680
|
/**
|
|
2623
2681
|
* List of additional fields to be included in the response.
|
|
2624
2682
|
* @maxSize 1
|
|
2625
2683
|
*/
|
|
2626
|
-
fields?:
|
|
2684
|
+
fields?: RequestedFieldsWithLiterals[];
|
|
2627
2685
|
}
|
|
2628
|
-
|
|
2686
|
+
declare enum RequestedFields {
|
|
2629
2687
|
UNKNOWN_REQUESTED_FIELD = "UNKNOWN_REQUESTED_FIELD",
|
|
2630
2688
|
/** Include unsupported action list, including the reasons for the lack of support */
|
|
2631
2689
|
UNSUPPORTED_ACTION = "UNSUPPORTED_ACTION"
|
|
2632
2690
|
}
|
|
2633
|
-
|
|
2691
|
+
/** @enumType */
|
|
2692
|
+
type RequestedFieldsWithLiterals = RequestedFields | 'UNKNOWN_REQUESTED_FIELD' | 'UNSUPPORTED_ACTION';
|
|
2693
|
+
interface AllowedActionsResponse {
|
|
2634
2694
|
/** List of actions that are allowed. */
|
|
2635
2695
|
actions?: Action[];
|
|
2636
2696
|
/**
|
|
@@ -2639,19 +2699,19 @@ export interface AllowedActionsResponse {
|
|
|
2639
2699
|
*/
|
|
2640
2700
|
unsupportedActions?: UnsupportedAction[];
|
|
2641
2701
|
}
|
|
2642
|
-
|
|
2643
|
-
actionType?:
|
|
2702
|
+
interface UnsupportedAction {
|
|
2703
|
+
actionType?: ActionTypeWithLiterals;
|
|
2644
2704
|
/**
|
|
2645
2705
|
* Provides detailed reasons for the unsupported action. Each `UnsupportedReason` includes a code and a message explaining why the action is not allowed.
|
|
2646
2706
|
* @maxSize 20
|
|
2647
2707
|
*/
|
|
2648
2708
|
reasons?: UnsupportedReason[];
|
|
2649
2709
|
}
|
|
2650
|
-
|
|
2710
|
+
interface UnsupportedReason {
|
|
2651
2711
|
code?: string;
|
|
2652
2712
|
description?: string | null;
|
|
2653
2713
|
}
|
|
2654
|
-
|
|
2714
|
+
interface ListUpcomingChargesRequest {
|
|
2655
2715
|
/**
|
|
2656
2716
|
* Subscription id charges to be previewed for
|
|
2657
2717
|
* @format GUID
|
|
@@ -2665,30 +2725,30 @@ export interface ListUpcomingChargesRequest {
|
|
|
2665
2725
|
*/
|
|
2666
2726
|
nextBillingDate?: Date | null;
|
|
2667
2727
|
}
|
|
2668
|
-
|
|
2728
|
+
interface ListUpcomingChargesResponse {
|
|
2669
2729
|
upcomingCharges?: SubscriptionCharge[];
|
|
2670
2730
|
}
|
|
2671
|
-
|
|
2731
|
+
interface PreviewSubscriptionChargesRequest extends PreviewSubscriptionChargesRequestSubscriptionOneOf {
|
|
2672
2732
|
/** Information about a non-existing subscription. */
|
|
2673
2733
|
subscriptionInfo?: SubscriptionInfo;
|
|
2674
2734
|
}
|
|
2675
2735
|
/** @oneof */
|
|
2676
|
-
|
|
2736
|
+
interface PreviewSubscriptionChargesRequestSubscriptionOneOf {
|
|
2677
2737
|
/** Information about a non-existing subscription. */
|
|
2678
2738
|
subscriptionInfo?: SubscriptionInfo;
|
|
2679
2739
|
}
|
|
2680
2740
|
/** Subscription information to use for calculating the preview of charges for a subscription. */
|
|
2681
|
-
|
|
2741
|
+
interface SubscriptionInfo {
|
|
2682
2742
|
billingSettings?: BillingSettings;
|
|
2683
2743
|
items?: Item[];
|
|
2684
2744
|
startDate?: Date | null;
|
|
2685
2745
|
}
|
|
2686
|
-
|
|
2746
|
+
interface PreviewSubscriptionChargesResponse {
|
|
2687
2747
|
/** Charges for subscription. */
|
|
2688
2748
|
charges?: Charge[];
|
|
2689
2749
|
}
|
|
2690
2750
|
/** Represents a charge applicable to a subscription. */
|
|
2691
|
-
|
|
2751
|
+
interface Charge {
|
|
2692
2752
|
/** The cycle number from which the charge starts. */
|
|
2693
2753
|
cycleFrom?: number;
|
|
2694
2754
|
/** The number of cycles for which the charge is applicable. */
|
|
@@ -2698,7 +2758,7 @@ export interface Charge {
|
|
|
2698
2758
|
/** The billing date from which the charge starts */
|
|
2699
2759
|
cycleBillingDate?: Date | null;
|
|
2700
2760
|
}
|
|
2701
|
-
|
|
2761
|
+
interface PreviewSubscriptionsChargesRequest {
|
|
2702
2762
|
/**
|
|
2703
2763
|
* Information required to calculate the preview charges for the subscriptions, including an identifier.
|
|
2704
2764
|
* @minSize 1
|
|
@@ -2721,7 +2781,7 @@ export interface PreviewSubscriptionsChargesRequest {
|
|
|
2721
2781
|
*/
|
|
2722
2782
|
numberOfNextRecurringCharges?: number | null;
|
|
2723
2783
|
}
|
|
2724
|
-
|
|
2784
|
+
interface SubscriptionBillingDetails {
|
|
2725
2785
|
/**
|
|
2726
2786
|
* External identifier of the subscription
|
|
2727
2787
|
* @format GUID
|
|
@@ -2740,11 +2800,11 @@ export interface SubscriptionBillingDetails {
|
|
|
2740
2800
|
/** Shipping address associated with subscription. At the moment used only for payments. Optional. */
|
|
2741
2801
|
shippingAddress?: FullAddressDetails;
|
|
2742
2802
|
}
|
|
2743
|
-
|
|
2803
|
+
interface PreviewSubscriptionsChargesResponse {
|
|
2744
2804
|
/** Charges for the subscriptions, including an identifier. */
|
|
2745
2805
|
subscriptionsCharges?: SubscriptionCharges[];
|
|
2746
2806
|
}
|
|
2747
|
-
|
|
2807
|
+
interface SubscriptionCharges {
|
|
2748
2808
|
/**
|
|
2749
2809
|
* External identifier of the subscription
|
|
2750
2810
|
* @format GUID
|
|
@@ -2753,7 +2813,7 @@ export interface SubscriptionCharges {
|
|
|
2753
2813
|
/** Charges for subscription. */
|
|
2754
2814
|
charges?: Charge[];
|
|
2755
2815
|
}
|
|
2756
|
-
|
|
2816
|
+
interface CreateSubscriptionForOrderRequest {
|
|
2757
2817
|
/** Subscription needs to be created */
|
|
2758
2818
|
subscription?: Subscription;
|
|
2759
2819
|
/**
|
|
@@ -2762,14 +2822,14 @@ export interface CreateSubscriptionForOrderRequest {
|
|
|
2762
2822
|
*/
|
|
2763
2823
|
idempotencyKey?: string | null;
|
|
2764
2824
|
}
|
|
2765
|
-
|
|
2825
|
+
interface CreateSubscriptionForOrderResponse {
|
|
2766
2826
|
/** Created subscription */
|
|
2767
2827
|
subscription?: Subscription;
|
|
2768
2828
|
/** Non-persistent invoice */
|
|
2769
2829
|
invoice?: Invoice;
|
|
2770
2830
|
}
|
|
2771
2831
|
/** An invoice includes information about the subscription and the customer. */
|
|
2772
|
-
|
|
2832
|
+
interface Invoice {
|
|
2773
2833
|
/**
|
|
2774
2834
|
* Invoice ID.
|
|
2775
2835
|
* @format GUID
|
|
@@ -2808,7 +2868,7 @@ export interface Invoice {
|
|
|
2808
2868
|
* + `"CANCELED"`: The payment process has been stopped because the related subscription has been canceled.
|
|
2809
2869
|
* @readonly
|
|
2810
2870
|
*/
|
|
2811
|
-
status?:
|
|
2871
|
+
status?: InvoiceStatusWithLiterals;
|
|
2812
2872
|
/**
|
|
2813
2873
|
* 3-letter currency code of the invoice in
|
|
2814
2874
|
* [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
|
|
@@ -2825,7 +2885,7 @@ export interface Invoice {
|
|
|
2825
2885
|
* + `"SEND_INVOICE"`: The customer pays through Wix, but some manual input is required.
|
|
2826
2886
|
* + `"OFFLINE"`: The customer pays outside of Wix.
|
|
2827
2887
|
*/
|
|
2828
|
-
collectionMethod?:
|
|
2888
|
+
collectionMethod?: CollectionMethodWithLiterals;
|
|
2829
2889
|
/**
|
|
2830
2890
|
* ID of the
|
|
2831
2891
|
* [payment method](https://bo.wix.com/wix-docs/rest/wix-cashier/settings/payment-method-type/payment-method-type-object).
|
|
@@ -2904,7 +2964,7 @@ export interface Invoice {
|
|
|
2904
2964
|
*/
|
|
2905
2965
|
refundInfo?: RefundInfo;
|
|
2906
2966
|
}
|
|
2907
|
-
|
|
2967
|
+
interface BusinessOriginData {
|
|
2908
2968
|
/**
|
|
2909
2969
|
* ID of the app for which BASS has created the invoice. For example,
|
|
2910
2970
|
* `"1380b703-ce81-ff05-f115-39571d94dfcd"` for the Wix eCommerce app.
|
|
@@ -2924,7 +2984,7 @@ export interface BusinessOriginData {
|
|
|
2924
2984
|
*/
|
|
2925
2985
|
entityId?: string;
|
|
2926
2986
|
}
|
|
2927
|
-
|
|
2987
|
+
declare enum InvoiceStatus {
|
|
2928
2988
|
UNKNOWN = "UNKNOWN",
|
|
2929
2989
|
OPEN = "OPEN",
|
|
2930
2990
|
PAID = "PAID",
|
|
@@ -2933,18 +2993,24 @@ export declare enum InvoiceStatus {
|
|
|
2933
2993
|
CANCELED = "CANCELED",
|
|
2934
2994
|
REFUNDED = "REFUNDED"
|
|
2935
2995
|
}
|
|
2936
|
-
|
|
2996
|
+
/** @enumType */
|
|
2997
|
+
type InvoiceStatusWithLiterals = InvoiceStatus | 'UNKNOWN' | 'OPEN' | 'PAID' | 'FAILED' | 'ATTEMPT_FAILED' | 'CANCELED' | 'REFUNDED';
|
|
2998
|
+
declare enum CollectionMethod {
|
|
2937
2999
|
UNKNOWN = "UNKNOWN",
|
|
2938
3000
|
AUTO_CHARGE = "AUTO_CHARGE",
|
|
2939
3001
|
OFFLINE = "OFFLINE",
|
|
2940
3002
|
SEND_INVOICE = "SEND_INVOICE"
|
|
2941
3003
|
}
|
|
2942
|
-
|
|
3004
|
+
/** @enumType */
|
|
3005
|
+
type CollectionMethodWithLiterals = CollectionMethod | 'UNKNOWN' | 'AUTO_CHARGE' | 'OFFLINE' | 'SEND_INVOICE';
|
|
3006
|
+
declare enum CreationMode {
|
|
2943
3007
|
UNKNOWN = "UNKNOWN",
|
|
2944
3008
|
SYSTEM = "SYSTEM",
|
|
2945
3009
|
MANUAL = "MANUAL"
|
|
2946
3010
|
}
|
|
2947
|
-
|
|
3011
|
+
/** @enumType */
|
|
3012
|
+
type CreationModeWithLiterals = CreationMode | 'UNKNOWN' | 'SYSTEM' | 'MANUAL';
|
|
3013
|
+
interface LatestPaymentAttempt {
|
|
2948
3014
|
/**
|
|
2949
3015
|
* ID of the latest payment attempt.
|
|
2950
3016
|
* @format GUID
|
|
@@ -2970,14 +3036,14 @@ export interface LatestPaymentAttempt {
|
|
|
2970
3036
|
* + `"CANCELED"`: The latest payment attempt has been canceled by BASS.
|
|
2971
3037
|
* @readonly
|
|
2972
3038
|
*/
|
|
2973
|
-
status?:
|
|
3039
|
+
status?: PaymentAttemptStatusWithLiterals;
|
|
2974
3040
|
/**
|
|
2975
3041
|
* Whether BASS tries to collect the payment another time. Available only when
|
|
2976
3042
|
* `latestPaymentAttempt.status` is set to `"DECLINED"`.
|
|
2977
3043
|
*/
|
|
2978
3044
|
retryable?: boolean;
|
|
2979
3045
|
}
|
|
2980
|
-
|
|
3046
|
+
declare enum PaymentAttemptStatus {
|
|
2981
3047
|
UNKNOWN = "UNKNOWN",
|
|
2982
3048
|
SCHEDULED = "SCHEDULED",
|
|
2983
3049
|
IN_PROGRESS = "IN_PROGRESS",
|
|
@@ -2987,20 +3053,22 @@ export declare enum PaymentAttemptStatus {
|
|
|
2987
3053
|
CANCELED = "CANCELED",
|
|
2988
3054
|
PENDING = "PENDING"
|
|
2989
3055
|
}
|
|
2990
|
-
|
|
3056
|
+
/** @enumType */
|
|
3057
|
+
type PaymentAttemptStatusWithLiterals = PaymentAttemptStatus | 'UNKNOWN' | 'SCHEDULED' | 'IN_PROGRESS' | 'PAID' | 'DECLINED' | 'TECHNICAL_FAILURE' | 'CANCELED' | 'PENDING';
|
|
3058
|
+
interface PriceAdjustment extends PriceAdjustmentAdjustmentTypeOneOf {
|
|
2991
3059
|
/** Adjustment that increases the price. */
|
|
2992
3060
|
charge?: PriceAdjustmentValue;
|
|
2993
3061
|
/** Adjustment that lowers the price. */
|
|
2994
3062
|
credit?: PriceAdjustmentValue;
|
|
2995
3063
|
}
|
|
2996
3064
|
/** @oneof */
|
|
2997
|
-
|
|
3065
|
+
interface PriceAdjustmentAdjustmentTypeOneOf {
|
|
2998
3066
|
/** Adjustment that increases the price. */
|
|
2999
3067
|
charge?: PriceAdjustmentValue;
|
|
3000
3068
|
/** Adjustment that lowers the price. */
|
|
3001
3069
|
credit?: PriceAdjustmentValue;
|
|
3002
3070
|
}
|
|
3003
|
-
|
|
3071
|
+
interface PriceAdjustmentValue extends PriceAdjustmentValueAdjustmentValueTypeOneOf {
|
|
3004
3072
|
/**
|
|
3005
3073
|
* Absolute amount that adjusts the price.
|
|
3006
3074
|
*
|
|
@@ -3022,7 +3090,7 @@ export interface PriceAdjustmentValue extends PriceAdjustmentValueAdjustmentValu
|
|
|
3022
3090
|
multiplier?: string;
|
|
3023
3091
|
}
|
|
3024
3092
|
/** @oneof */
|
|
3025
|
-
|
|
3093
|
+
interface PriceAdjustmentValueAdjustmentValueTypeOneOf {
|
|
3026
3094
|
/**
|
|
3027
3095
|
* Absolute amount that adjusts the price.
|
|
3028
3096
|
*
|
|
@@ -3043,7 +3111,7 @@ export interface PriceAdjustmentValueAdjustmentValueTypeOneOf {
|
|
|
3043
3111
|
*/
|
|
3044
3112
|
multiplier?: string;
|
|
3045
3113
|
}
|
|
3046
|
-
|
|
3114
|
+
interface InvoiceShippingCharges {
|
|
3047
3115
|
/**
|
|
3048
3116
|
* Amount of the shipping fee in `0.00` format.
|
|
3049
3117
|
*
|
|
@@ -3058,11 +3126,11 @@ export interface InvoiceShippingCharges {
|
|
|
3058
3126
|
discount?: Discount;
|
|
3059
3127
|
}
|
|
3060
3128
|
/** Tax data from all items */
|
|
3061
|
-
|
|
3129
|
+
interface TaxData {
|
|
3062
3130
|
/** Aggregated tax data from all items */
|
|
3063
3131
|
taxSummary?: TaxSummary;
|
|
3064
3132
|
}
|
|
3065
|
-
|
|
3133
|
+
interface TaxSummary {
|
|
3066
3134
|
/**
|
|
3067
3135
|
* Aggregated from tax_breakdowns with exemptions excluded from amount
|
|
3068
3136
|
* @format DECIMAL_VALUE
|
|
@@ -3074,7 +3142,7 @@ export interface TaxSummary {
|
|
|
3074
3142
|
*/
|
|
3075
3143
|
aggregatedTaxBreakdowns?: AggregatedTaxBreakdown[];
|
|
3076
3144
|
}
|
|
3077
|
-
|
|
3145
|
+
interface AggregatedTaxBreakdown {
|
|
3078
3146
|
/**
|
|
3079
3147
|
* Name of the tax that was calculated.
|
|
3080
3148
|
* @maxLength 200
|
|
@@ -3104,7 +3172,7 @@ export interface AggregatedTaxBreakdown {
|
|
|
3104
3172
|
*/
|
|
3105
3173
|
aggregatedTaxAmount?: string;
|
|
3106
3174
|
}
|
|
3107
|
-
|
|
3175
|
+
interface RefundInfo {
|
|
3108
3176
|
/**
|
|
3109
3177
|
* If refunds are present, this will include the total amount refunded.
|
|
3110
3178
|
* @format DECIMAL_VALUE
|
|
@@ -3117,7 +3185,7 @@ export interface RefundInfo {
|
|
|
3117
3185
|
*/
|
|
3118
3186
|
refunds?: Refund[];
|
|
3119
3187
|
}
|
|
3120
|
-
|
|
3188
|
+
interface Refund {
|
|
3121
3189
|
/**
|
|
3122
3190
|
* refund amount
|
|
3123
3191
|
* @format DECIMAL_VALUE
|
|
@@ -3132,14 +3200,14 @@ export interface Refund {
|
|
|
3132
3200
|
*/
|
|
3133
3201
|
transactionId?: string;
|
|
3134
3202
|
/** a reason for the refund */
|
|
3135
|
-
reason?:
|
|
3203
|
+
reason?: RefundReasonWithLiterals;
|
|
3136
3204
|
/**
|
|
3137
3205
|
* a description of the refund - this is a free text field for the initiator
|
|
3138
3206
|
* @maxLength 255
|
|
3139
3207
|
*/
|
|
3140
3208
|
description?: string | null;
|
|
3141
3209
|
}
|
|
3142
|
-
|
|
3210
|
+
declare enum RefundReason {
|
|
3143
3211
|
UNKNOWN_REFUND_REASON = "UNKNOWN_REFUND_REASON",
|
|
3144
3212
|
DUPLICATE_CHARGE = "DUPLICATE_CHARGE",
|
|
3145
3213
|
FRAUDULENT = "FRAUDULENT",
|
|
@@ -3147,36 +3215,38 @@ export declare enum RefundReason {
|
|
|
3147
3215
|
PROVISION_FAILED = "PROVISION_FAILED",
|
|
3148
3216
|
OTHER = "OTHER"
|
|
3149
3217
|
}
|
|
3150
|
-
|
|
3218
|
+
/** @enumType */
|
|
3219
|
+
type RefundReasonWithLiterals = RefundReason | 'UNKNOWN_REFUND_REASON' | 'DUPLICATE_CHARGE' | 'FRAUDULENT' | 'CUSTOMER_REQUEST' | 'PROVISION_FAILED' | 'OTHER';
|
|
3220
|
+
interface Task {
|
|
3151
3221
|
key?: TaskKey;
|
|
3152
3222
|
executeAt?: Date | null;
|
|
3153
3223
|
payload?: string | null;
|
|
3154
3224
|
}
|
|
3155
|
-
|
|
3225
|
+
interface TaskKey {
|
|
3156
3226
|
appId?: string;
|
|
3157
3227
|
instanceId?: string;
|
|
3158
3228
|
subjectId?: string | null;
|
|
3159
3229
|
}
|
|
3160
|
-
|
|
3230
|
+
interface TaskAction extends TaskActionActionOneOf {
|
|
3161
3231
|
complete?: Complete;
|
|
3162
3232
|
cancel?: Cancel;
|
|
3163
3233
|
reschedule?: Reschedule;
|
|
3164
3234
|
}
|
|
3165
3235
|
/** @oneof */
|
|
3166
|
-
|
|
3236
|
+
interface TaskActionActionOneOf {
|
|
3167
3237
|
complete?: Complete;
|
|
3168
3238
|
cancel?: Cancel;
|
|
3169
3239
|
reschedule?: Reschedule;
|
|
3170
3240
|
}
|
|
3171
|
-
|
|
3241
|
+
interface Complete {
|
|
3172
3242
|
}
|
|
3173
|
-
|
|
3243
|
+
interface Cancel {
|
|
3174
3244
|
}
|
|
3175
|
-
|
|
3245
|
+
interface Reschedule {
|
|
3176
3246
|
executeAt?: Date | null;
|
|
3177
3247
|
payload?: string | null;
|
|
3178
3248
|
}
|
|
3179
|
-
|
|
3249
|
+
interface V1SubscriptionEvent extends V1SubscriptionEventEventOneOf {
|
|
3180
3250
|
/** A subscriptions was created */
|
|
3181
3251
|
created?: V1SubscriptionCreated;
|
|
3182
3252
|
/** Subscription is considered active and will be visible to site owners and members */
|
|
@@ -3207,7 +3277,7 @@ export interface V1SubscriptionEvent extends V1SubscriptionEventEventOneOf {
|
|
|
3207
3277
|
initialPurchaseCompleted?: V1SubscriptionInitialPurchaseCompleted;
|
|
3208
3278
|
}
|
|
3209
3279
|
/** @oneof */
|
|
3210
|
-
|
|
3280
|
+
interface V1SubscriptionEventEventOneOf {
|
|
3211
3281
|
/** A subscriptions was created */
|
|
3212
3282
|
created?: V1SubscriptionCreated;
|
|
3213
3283
|
/** Subscription is considered active and will be visible to site owners and members */
|
|
@@ -3237,10 +3307,10 @@ export interface V1SubscriptionEventEventOneOf {
|
|
|
3237
3307
|
/** Subscription initial purchase completed */
|
|
3238
3308
|
initialPurchaseCompleted?: V1SubscriptionInitialPurchaseCompleted;
|
|
3239
3309
|
}
|
|
3240
|
-
|
|
3310
|
+
interface V1SubscriptionCreated {
|
|
3241
3311
|
subscription?: V1Subscription;
|
|
3242
3312
|
}
|
|
3243
|
-
|
|
3313
|
+
interface V1Subscription {
|
|
3244
3314
|
/**
|
|
3245
3315
|
* ID of the subscription
|
|
3246
3316
|
* @format GUID
|
|
@@ -3284,19 +3354,19 @@ export interface V1Subscription {
|
|
|
3284
3354
|
/** True if the subscription is recurring, false for a single payment subscription */
|
|
3285
3355
|
recurring?: boolean;
|
|
3286
3356
|
/** Online (paid by subscriber using wix pay) or offline (need to manually mark as paid) */
|
|
3287
|
-
subscriptionType?:
|
|
3357
|
+
subscriptionType?: SubscriptionTypeWithLiterals;
|
|
3288
3358
|
/** Active, expired, canceled, etc. */
|
|
3289
|
-
subscriptionStatus?:
|
|
3359
|
+
subscriptionStatus?: V1SubscriptionStatusEnumSubscriptionStatusWithLiterals;
|
|
3290
3360
|
/** Subscription start date (may differ from creation date) */
|
|
3291
3361
|
validFrom?: Date | null;
|
|
3292
3362
|
/** Subscription expiration date */
|
|
3293
3363
|
validUntil?: Date | null;
|
|
3294
3364
|
/** Status of last payment associated with this subscription */
|
|
3295
|
-
lastPaymentStatus?:
|
|
3365
|
+
lastPaymentStatus?: PaymentStatusEnumPaymentStatusWithLiterals;
|
|
3296
3366
|
/** Payment schedule in the wix pay format. Exists for recurring subscriptions only. */
|
|
3297
3367
|
billingProfile?: V2Subscription;
|
|
3298
3368
|
/** Owner, member, etc. - present if subscription is canceled */
|
|
3299
|
-
cancellationInitiator?:
|
|
3369
|
+
cancellationInitiator?: CancellationInitiatorWithLiterals;
|
|
3300
3370
|
/** Optional, present if subscription is canceled */
|
|
3301
3371
|
cancellationReason?: string | null;
|
|
3302
3372
|
/** Can be used for arbitrary app-specific map<string, string> data */
|
|
@@ -3314,16 +3384,16 @@ export interface V1Subscription {
|
|
|
3314
3384
|
/** @format GUID */
|
|
3315
3385
|
originInstanceId?: string | null;
|
|
3316
3386
|
}
|
|
3317
|
-
|
|
3387
|
+
interface Subscriber {
|
|
3318
3388
|
/**
|
|
3319
3389
|
* Member or contact ID
|
|
3320
3390
|
* @format GUID
|
|
3321
3391
|
*/
|
|
3322
3392
|
_id?: string;
|
|
3323
3393
|
/** Member or contact */
|
|
3324
|
-
identityType?:
|
|
3394
|
+
identityType?: IdentityTypeWithLiterals;
|
|
3325
3395
|
}
|
|
3326
|
-
|
|
3396
|
+
declare enum IdentityType {
|
|
3327
3397
|
/** Identity type undefined */
|
|
3328
3398
|
UNDEFINED = "UNDEFINED",
|
|
3329
3399
|
/** Subscription is associated with a member ID */
|
|
@@ -3331,8 +3401,10 @@ export declare enum IdentityType {
|
|
|
3331
3401
|
/** Subscriptions is associated with a contact ID */
|
|
3332
3402
|
CONTACT = "CONTACT"
|
|
3333
3403
|
}
|
|
3404
|
+
/** @enumType */
|
|
3405
|
+
type IdentityTypeWithLiterals = IdentityType | 'UNDEFINED' | 'MEMBER' | 'CONTACT';
|
|
3334
3406
|
/** Price of a payment. Includes amount and currency. */
|
|
3335
|
-
|
|
3407
|
+
interface Money {
|
|
3336
3408
|
/**
|
|
3337
3409
|
* Monetary amount i.e. 3.99.
|
|
3338
3410
|
* @format DECIMAL_VALUE
|
|
@@ -3345,14 +3417,16 @@ export interface Money {
|
|
|
3345
3417
|
*/
|
|
3346
3418
|
currency?: string;
|
|
3347
3419
|
}
|
|
3348
|
-
|
|
3420
|
+
declare enum SubscriptionType {
|
|
3349
3421
|
UNDEFINED = "UNDEFINED",
|
|
3350
3422
|
/** Payments made by the subscriber */
|
|
3351
3423
|
ONLINE = "ONLINE",
|
|
3352
3424
|
/** Payments managed manually by the site owner */
|
|
3353
3425
|
OFFLINE = "OFFLINE"
|
|
3354
3426
|
}
|
|
3355
|
-
|
|
3427
|
+
/** @enumType */
|
|
3428
|
+
type SubscriptionTypeWithLiterals = SubscriptionType | 'UNDEFINED' | 'ONLINE' | 'OFFLINE';
|
|
3429
|
+
declare enum V1SubscriptionStatusEnumSubscriptionStatus {
|
|
3356
3430
|
/** Subscription status undefined */
|
|
3357
3431
|
UNDEFINED = "UNDEFINED",
|
|
3358
3432
|
/** Subscription created, but hasn't been paid for yet. This status if filtered out in ListSubscriptions response by default. */
|
|
@@ -3370,7 +3444,9 @@ export declare enum V1SubscriptionStatusEnumSubscriptionStatus {
|
|
|
3370
3444
|
/** Subscription is suspended */
|
|
3371
3445
|
SUSPENDED = "SUSPENDED"
|
|
3372
3446
|
}
|
|
3373
|
-
|
|
3447
|
+
/** @enumType */
|
|
3448
|
+
type V1SubscriptionStatusEnumSubscriptionStatusWithLiterals = V1SubscriptionStatusEnumSubscriptionStatus | 'UNDEFINED' | 'DRAFT' | 'PENDING' | 'ACTIVE' | 'EXPIRED' | 'CANCELED' | 'PENDING_CANCELLATION' | 'SUSPENDED';
|
|
3449
|
+
declare enum PaymentStatusEnumPaymentStatus {
|
|
3374
3450
|
/** Payment status undefined */
|
|
3375
3451
|
UNDEFINED = "UNDEFINED",
|
|
3376
3452
|
/** Payment has been paid */
|
|
@@ -3384,6 +3460,8 @@ export declare enum PaymentStatusEnumPaymentStatus {
|
|
|
3384
3460
|
/** Billing has been initialized, but actual charge is yet to be made. Can happen for free trial and PayPal */
|
|
3385
3461
|
PENDING = "PENDING"
|
|
3386
3462
|
}
|
|
3463
|
+
/** @enumType */
|
|
3464
|
+
type PaymentStatusEnumPaymentStatusWithLiterals = PaymentStatusEnumPaymentStatus | 'UNDEFINED' | 'PAID' | 'REFUNDED' | 'FAILED' | 'UNPAID' | 'PENDING';
|
|
3387
3465
|
/**
|
|
3388
3466
|
* Recurring payment is described by `frequency` (day, week, month) and `interval`.
|
|
3389
3467
|
*
|
|
@@ -3394,9 +3472,9 @@ export declare enum PaymentStatusEnumPaymentStatus {
|
|
|
3394
3472
|
*
|
|
3395
3473
|
* So one can define a monthly 'subscription' with a 14 days trial period.
|
|
3396
3474
|
*/
|
|
3397
|
-
|
|
3475
|
+
interface V2Subscription {
|
|
3398
3476
|
/** frequency of recurring payment (required) */
|
|
3399
|
-
frequency?:
|
|
3477
|
+
frequency?: SubscriptionFrequencyWithLiterals;
|
|
3400
3478
|
/** interval of recurring payment (required) */
|
|
3401
3479
|
interval?: number;
|
|
3402
3480
|
/** trial period for recurring payment (optional) */
|
|
@@ -3413,21 +3491,23 @@ export interface V2Subscription {
|
|
|
3413
3491
|
firstCycleStartDate?: Date | null;
|
|
3414
3492
|
}
|
|
3415
3493
|
/** Frequency unit of recurring payment */
|
|
3416
|
-
|
|
3494
|
+
declare enum SubscriptionFrequency {
|
|
3417
3495
|
UNDEFINED = "UNDEFINED",
|
|
3418
3496
|
DAY = "DAY",
|
|
3419
3497
|
WEEK = "WEEK",
|
|
3420
3498
|
MONTH = "MONTH",
|
|
3421
3499
|
YEAR = "YEAR"
|
|
3422
3500
|
}
|
|
3501
|
+
/** @enumType */
|
|
3502
|
+
type SubscriptionFrequencyWithLiterals = SubscriptionFrequency | 'UNDEFINED' | 'DAY' | 'WEEK' | 'MONTH' | 'YEAR';
|
|
3423
3503
|
/** Trial period of subscription */
|
|
3424
|
-
|
|
3504
|
+
interface SubscriptionTrialPeriod {
|
|
3425
3505
|
/** trial period in units (required) */
|
|
3426
3506
|
period?: number;
|
|
3427
3507
|
/** units in which trial period is described (optional, default DAY) */
|
|
3428
|
-
unit?:
|
|
3508
|
+
unit?: SubscriptionFrequencyWithLiterals;
|
|
3429
3509
|
}
|
|
3430
|
-
|
|
3510
|
+
declare enum CancellationInitiator {
|
|
3431
3511
|
/** Cancellation initiator undefined */
|
|
3432
3512
|
UNDEFINED = "UNDEFINED",
|
|
3433
3513
|
/** Subscription was canceled by site owner (default if canceled by user or service identity) */
|
|
@@ -3439,7 +3519,9 @@ export declare enum CancellationInitiator {
|
|
|
3439
3519
|
/** Subscription was canceled because of payment setup failure */
|
|
3440
3520
|
SETUP_FAILURE = "SETUP_FAILURE"
|
|
3441
3521
|
}
|
|
3442
|
-
|
|
3522
|
+
/** @enumType */
|
|
3523
|
+
type CancellationInitiatorWithLiterals = CancellationInitiator | 'UNDEFINED' | 'OWNER' | 'MEMBER' | 'PAYMENT_FAILURE' | 'SETUP_FAILURE';
|
|
3524
|
+
interface SubscriptionPolicy {
|
|
3443
3525
|
/** Subscription expiration date can be updated */
|
|
3444
3526
|
expiryDateChangeable?: boolean;
|
|
3445
3527
|
/** Subscription can be cancelled by the member who bought it (when memberId == subscriberId) */
|
|
@@ -3447,35 +3529,37 @@ export interface SubscriptionPolicy {
|
|
|
3447
3529
|
/** Subscription expiration date on cancellation can be set to next payment date */
|
|
3448
3530
|
cancellableAtNextPaymentCycle?: boolean;
|
|
3449
3531
|
}
|
|
3450
|
-
|
|
3451
|
-
status?:
|
|
3532
|
+
interface Suspension {
|
|
3533
|
+
status?: StatusWithLiterals;
|
|
3452
3534
|
/** Beginning of the suspended period */
|
|
3453
3535
|
startsAt?: Date | null;
|
|
3454
3536
|
/** End of the suspended period */
|
|
3455
3537
|
endsAt?: Date | null;
|
|
3456
3538
|
}
|
|
3457
|
-
|
|
3539
|
+
declare enum Status {
|
|
3458
3540
|
UNDEFINED = "UNDEFINED",
|
|
3459
3541
|
ACTIVE = "ACTIVE",
|
|
3460
3542
|
ENDED = "ENDED"
|
|
3461
3543
|
}
|
|
3544
|
+
/** @enumType */
|
|
3545
|
+
type StatusWithLiterals = Status | 'UNDEFINED' | 'ACTIVE' | 'ENDED';
|
|
3462
3546
|
/** A duration expressed in amount of time units. */
|
|
3463
|
-
|
|
3547
|
+
interface V1Duration {
|
|
3464
3548
|
/** Amount of the unit */
|
|
3465
3549
|
amount?: number;
|
|
3466
3550
|
/** Day, Week, Month, Year. */
|
|
3467
|
-
unit?:
|
|
3551
|
+
unit?: SubscriptionFrequencyWithLiterals;
|
|
3468
3552
|
}
|
|
3469
|
-
|
|
3553
|
+
interface V1SubscriptionActivated {
|
|
3470
3554
|
subscription?: V1Subscription;
|
|
3471
3555
|
}
|
|
3472
|
-
|
|
3556
|
+
interface V1SubscriptionCanceled {
|
|
3473
3557
|
subscription?: V1Subscription;
|
|
3474
3558
|
}
|
|
3475
|
-
|
|
3559
|
+
interface V1SubscriptionUpdated {
|
|
3476
3560
|
subscription?: V1Subscription;
|
|
3477
3561
|
}
|
|
3478
|
-
|
|
3562
|
+
interface SubscriptionCycleTriggered {
|
|
3479
3563
|
subscription?: V1Subscription;
|
|
3480
3564
|
billingCycle?: number;
|
|
3481
3565
|
/**
|
|
@@ -3484,48 +3568,50 @@ export interface SubscriptionCycleTriggered {
|
|
|
3484
3568
|
*/
|
|
3485
3569
|
transactionId?: string | null;
|
|
3486
3570
|
}
|
|
3487
|
-
|
|
3571
|
+
interface SubscriptionMarkedAsPaid {
|
|
3488
3572
|
subscription?: V1Subscription;
|
|
3489
3573
|
/** A number indicating which payment (cycle) was marked as paid. For recurring subscriptions only. */
|
|
3490
3574
|
billingCycle?: number | null;
|
|
3491
3575
|
}
|
|
3492
|
-
|
|
3576
|
+
interface SubscriptionCancellationRequested {
|
|
3493
3577
|
subscription?: V1Subscription;
|
|
3494
3578
|
}
|
|
3495
|
-
|
|
3579
|
+
interface SubscriptionSuspended {
|
|
3496
3580
|
subscription?: V1Subscription;
|
|
3497
3581
|
}
|
|
3498
|
-
|
|
3582
|
+
interface V1SubscriptionResumed {
|
|
3499
3583
|
subscription?: V1Subscription;
|
|
3500
3584
|
}
|
|
3501
|
-
|
|
3585
|
+
interface SubscriptionExpired {
|
|
3502
3586
|
subscription?: V1Subscription;
|
|
3503
3587
|
}
|
|
3504
|
-
|
|
3588
|
+
interface V1SubscriptionInitialPurchaseCompleted {
|
|
3505
3589
|
subscription?: V1Subscription;
|
|
3506
3590
|
}
|
|
3507
|
-
|
|
3591
|
+
interface ListSubscriptionHistoryRequest {
|
|
3508
3592
|
/** @format GUID */
|
|
3509
3593
|
subscriptionId: string;
|
|
3510
3594
|
/** Determines the type of view for the history: either a comprehensive backoffice view or a user-centric view. */
|
|
3511
|
-
mode?:
|
|
3595
|
+
mode?: HistoryViewModeWithLiterals;
|
|
3512
3596
|
/** Cursor for efficient paging. If paging through results, pass this field from the previous search response to continue to the next page. */
|
|
3513
3597
|
cursor?: CursorPaging;
|
|
3514
3598
|
}
|
|
3515
|
-
|
|
3599
|
+
declare enum HistoryViewMode {
|
|
3516
3600
|
UNKNOWN = "UNKNOWN",
|
|
3517
3601
|
/** Comprehensive view including all history events. */
|
|
3518
3602
|
BACKOFFICE = "BACKOFFICE",
|
|
3519
3603
|
/** User-centric view of the history. */
|
|
3520
3604
|
USER = "USER"
|
|
3521
3605
|
}
|
|
3522
|
-
|
|
3606
|
+
/** @enumType */
|
|
3607
|
+
type HistoryViewModeWithLiterals = HistoryViewMode | 'UNKNOWN' | 'BACKOFFICE' | 'USER';
|
|
3608
|
+
interface ListSubscriptionHistoryResponse {
|
|
3523
3609
|
/** List of history entries for the subscription. */
|
|
3524
3610
|
historyEntries?: SubscriptionHistoryEntry[];
|
|
3525
3611
|
/** Paging metadata. A `next` cursor is returned if there are more results. */
|
|
3526
3612
|
pagingMetadata?: PagingMetadataV2;
|
|
3527
3613
|
}
|
|
3528
|
-
|
|
3614
|
+
interface SubscriptionHistoryEntry {
|
|
3529
3615
|
/** @format GUID */
|
|
3530
3616
|
entryId?: string;
|
|
3531
3617
|
/** TODO: add max length? it is not defined in domainevents, so should we? */
|
|
@@ -3533,7 +3619,7 @@ export interface SubscriptionHistoryEntry {
|
|
|
3533
3619
|
entryTime?: Date | null;
|
|
3534
3620
|
event?: SubscriptionEvent;
|
|
3535
3621
|
}
|
|
3536
|
-
|
|
3622
|
+
interface SubscriptionEvent extends SubscriptionEventPayloadOneOf {
|
|
3537
3623
|
created?: SubscriptionCreated;
|
|
3538
3624
|
updated?: SubscriptionUpdated;
|
|
3539
3625
|
deleted?: SubscriptionDeleted;
|
|
@@ -3570,7 +3656,7 @@ export interface SubscriptionEvent extends SubscriptionEventPayloadOneOf {
|
|
|
3570
3656
|
unknown?: UnknownSubscriptionEvent;
|
|
3571
3657
|
}
|
|
3572
3658
|
/** @oneof */
|
|
3573
|
-
|
|
3659
|
+
interface SubscriptionEventPayloadOneOf {
|
|
3574
3660
|
created?: SubscriptionCreated;
|
|
3575
3661
|
updated?: SubscriptionUpdated;
|
|
3576
3662
|
deleted?: SubscriptionDeleted;
|
|
@@ -3606,43 +3692,43 @@ export interface SubscriptionEventPayloadOneOf {
|
|
|
3606
3692
|
subscriptionBoAction?: SubscriptionBackOfficeAction;
|
|
3607
3693
|
unknown?: UnknownSubscriptionEvent;
|
|
3608
3694
|
}
|
|
3609
|
-
|
|
3695
|
+
interface SubscriptionCreated {
|
|
3610
3696
|
subscription?: Subscription;
|
|
3611
3697
|
}
|
|
3612
|
-
|
|
3698
|
+
interface SubscriptionUpdated {
|
|
3613
3699
|
current?: Subscription;
|
|
3614
3700
|
previous?: Subscription;
|
|
3615
3701
|
diff?: SubscriptionDiff;
|
|
3616
3702
|
}
|
|
3617
|
-
|
|
3703
|
+
interface SubscriptionDiff {
|
|
3618
3704
|
added?: string | null;
|
|
3619
3705
|
changed?: string | null;
|
|
3620
3706
|
deleted?: string | null;
|
|
3621
3707
|
}
|
|
3622
|
-
|
|
3708
|
+
interface SubscriptionDeleted {
|
|
3623
3709
|
subscriptionId?: string;
|
|
3624
3710
|
}
|
|
3625
|
-
|
|
3711
|
+
interface FutureUpdatesRequested {
|
|
3626
3712
|
subscription?: Subscription;
|
|
3627
3713
|
requestedUpdateData?: SubscriptionUpdateData;
|
|
3628
3714
|
}
|
|
3629
|
-
|
|
3715
|
+
interface UpdatesApplied {
|
|
3630
3716
|
subscription?: Subscription;
|
|
3631
|
-
updateAction?:
|
|
3717
|
+
updateAction?: UpdateActionWithLiterals;
|
|
3632
3718
|
appliedUpdateData?: SubscriptionUpdateData;
|
|
3633
3719
|
}
|
|
3634
|
-
|
|
3720
|
+
interface ResetPendingUpdates {
|
|
3635
3721
|
subscription?: Subscription;
|
|
3636
3722
|
}
|
|
3637
|
-
|
|
3723
|
+
interface GracePeriodStarted {
|
|
3638
3724
|
subscription?: Subscription;
|
|
3639
3725
|
}
|
|
3640
|
-
|
|
3726
|
+
interface GracePeriodEnded {
|
|
3641
3727
|
subscription?: Subscription;
|
|
3642
3728
|
/** Indication for the payment settlement method. */
|
|
3643
|
-
paymentSettlementMethod?:
|
|
3729
|
+
paymentSettlementMethod?: PaymentSettlementMethodWithLiterals;
|
|
3644
3730
|
}
|
|
3645
|
-
|
|
3731
|
+
declare enum PaymentSettlementMethod {
|
|
3646
3732
|
UNKNOWN = "UNKNOWN",
|
|
3647
3733
|
/** System-defined payment settlement. */
|
|
3648
3734
|
SYSTEM = "SYSTEM",
|
|
@@ -3651,26 +3737,28 @@ export declare enum PaymentSettlementMethod {
|
|
|
3651
3737
|
/** Require the customer to pay immediately, by insert a new payment method. */
|
|
3652
3738
|
CUSTOMER_PAY_NOW = "CUSTOMER_PAY_NOW"
|
|
3653
3739
|
}
|
|
3654
|
-
|
|
3740
|
+
/** @enumType */
|
|
3741
|
+
type PaymentSettlementMethodWithLiterals = PaymentSettlementMethod | 'UNKNOWN' | 'SYSTEM' | 'MARK_AS_PAID' | 'CUSTOMER_PAY_NOW';
|
|
3742
|
+
interface PaymentMethodUpdated {
|
|
3655
3743
|
subscription?: Subscription;
|
|
3656
|
-
initiator?:
|
|
3657
|
-
paymentMode?:
|
|
3744
|
+
initiator?: HistoryActionInitiatorWithLiterals;
|
|
3745
|
+
paymentMode?: PaymentModeWithLiterals;
|
|
3658
3746
|
}
|
|
3659
|
-
|
|
3747
|
+
interface SubscriptionCollectionMethodUpdated {
|
|
3660
3748
|
subscription?: Subscription;
|
|
3661
|
-
newCollectionMethod?:
|
|
3662
|
-
previousCollectionMethod?:
|
|
3749
|
+
newCollectionMethod?: CollectionMethodEnumCollectionMethodWithLiterals;
|
|
3750
|
+
previousCollectionMethod?: CollectionMethodEnumCollectionMethodWithLiterals;
|
|
3663
3751
|
}
|
|
3664
|
-
|
|
3752
|
+
interface FreeTrailStarted {
|
|
3665
3753
|
subscription?: Subscription;
|
|
3666
3754
|
}
|
|
3667
|
-
|
|
3755
|
+
interface FreeTrailEnded {
|
|
3668
3756
|
subscription?: Subscription;
|
|
3669
3757
|
}
|
|
3670
|
-
|
|
3758
|
+
interface InitiatedPaymentMethodSetup {
|
|
3671
3759
|
subscription?: Subscription;
|
|
3672
3760
|
}
|
|
3673
|
-
|
|
3761
|
+
interface SubscriptionBackOfficeAction {
|
|
3674
3762
|
subscription?: Subscription;
|
|
3675
3763
|
/** The backoffice method name */
|
|
3676
3764
|
name?: string;
|
|
@@ -3678,527 +3766,104 @@ export interface SubscriptionBackOfficeAction {
|
|
|
3678
3766
|
params?: string;
|
|
3679
3767
|
}
|
|
3680
3768
|
/** Defines unknown events restored from the logs */
|
|
3681
|
-
|
|
3769
|
+
interface UnknownSubscriptionEvent {
|
|
3682
3770
|
subscriptionAsString?: string | null;
|
|
3683
3771
|
}
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
}
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
}
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
}
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
}
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
}
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
|
|
3775
|
-
|
|
3776
|
-
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
}
|
|
3780
|
-
interface ProrationNonNullableFields {
|
|
3781
|
-
custom?: CustomProrationNonNullableFields;
|
|
3782
|
-
}
|
|
3783
|
-
interface UpdateBillingDateDataNonNullableFields {
|
|
3784
|
-
proration?: ProrationNonNullableFields;
|
|
3785
|
-
}
|
|
3786
|
-
interface AutomaticRetryDataNonNullableFields {
|
|
3787
|
-
enabled: boolean;
|
|
3788
|
-
}
|
|
3789
|
-
interface GracePeriodDataNonNullableFields {
|
|
3790
|
-
automaticRetryData?: AutomaticRetryDataNonNullableFields;
|
|
3791
|
-
}
|
|
3792
|
-
interface BillingStatusNonNullableFields {
|
|
3793
|
-
currentCycle: number;
|
|
3794
|
-
latestPaymentData?: PaymentDataNonNullableFields;
|
|
3795
|
-
updateBillingDateData?: UpdateBillingDateDataNonNullableFields;
|
|
3796
|
-
gracePeriodData?: GracePeriodDataNonNullableFields;
|
|
3797
|
-
}
|
|
3798
|
-
interface SubscriptionPoliciesNonNullableFields {
|
|
3799
|
-
customerCanCancel: boolean;
|
|
3800
|
-
businessCanExtend: boolean;
|
|
3801
|
-
allowEndOfCycleCancellation: boolean;
|
|
3802
|
-
}
|
|
3803
|
-
interface PauseInfoNonNullableFields {
|
|
3804
|
-
pausePolicy: PausePolicy;
|
|
3805
|
-
pauseAt: PauseAt;
|
|
3806
|
-
resumeAt: ResumeAt;
|
|
3807
|
-
}
|
|
3808
|
-
interface CancellationInfoNonNullableFields {
|
|
3809
|
-
initiator: HistoryActionInitiator;
|
|
3810
|
-
}
|
|
3811
|
-
interface FixedPriceNonNullableFields {
|
|
3812
|
-
itemPrice: string;
|
|
3813
|
-
}
|
|
3814
|
-
interface PricingModelNonNullableFields {
|
|
3815
|
-
fixedPrice?: FixedPriceNonNullableFields;
|
|
3816
|
-
}
|
|
3817
|
-
interface ItemChangeNonNullableFields {
|
|
3818
|
-
_id: string;
|
|
3819
|
-
pricingModel?: PricingModelNonNullableFields;
|
|
3820
|
-
tax?: TaxNonNullableFields;
|
|
3821
|
-
}
|
|
3822
|
-
interface CatalogReferenceNonNullableFields {
|
|
3823
|
-
catalogItemId: string;
|
|
3824
|
-
}
|
|
3825
|
-
interface ApplicationFeeNonNullableFields {
|
|
3826
|
-
amount: string;
|
|
3827
|
-
discounts: DiscountNonNullableFields[];
|
|
3828
|
-
}
|
|
3829
|
-
interface ItemNonNullableFields {
|
|
3830
|
-
name: string;
|
|
3831
|
-
catalogReference?: CatalogReferenceNonNullableFields;
|
|
3832
|
-
category: ItemCategory;
|
|
3833
|
-
quantity: number;
|
|
3834
|
-
pricingModel?: PricingModelNonNullableFields;
|
|
3835
|
-
tax?: TaxNonNullableFields;
|
|
3836
|
-
discounts: DiscountNonNullableFields[];
|
|
3837
|
-
applicationFee?: ApplicationFeeNonNullableFields;
|
|
3838
|
-
}
|
|
3839
|
-
interface SubscriptionUpdateDataNonNullableFields {
|
|
3840
|
-
itemsToUpdate: ItemChangeNonNullableFields[];
|
|
3841
|
-
itemsToAdd: ItemNonNullableFields[];
|
|
3842
|
-
numberOfRequests: number;
|
|
3843
|
-
}
|
|
3844
|
-
interface SpecificDateSubscriptionUpdateDataNonNullableFields {
|
|
3845
|
-
updateData?: SubscriptionUpdateDataNonNullableFields;
|
|
3846
|
-
}
|
|
3847
|
-
interface SubscriptionNonNullableFields {
|
|
3848
|
-
name: string;
|
|
3849
|
-
customer?: CustomerNonNullableFields;
|
|
3850
|
-
status: SubscriptionStatusEnumSubscriptionStatus;
|
|
3851
|
-
billingSettings?: BillingSettingsNonNullableFields;
|
|
3852
|
-
billingStatus?: BillingStatusNonNullableFields;
|
|
3853
|
-
shippingAddress?: FullAddressDetailsNonNullableFields;
|
|
3854
|
-
policies?: SubscriptionPoliciesNonNullableFields;
|
|
3855
|
-
pauseInfo?: PauseInfoNonNullableFields;
|
|
3856
|
-
cancellationInfo?: CancellationInfoNonNullableFields;
|
|
3857
|
-
pendingUpdateData?: SubscriptionUpdateDataNonNullableFields;
|
|
3858
|
-
bassManaged: boolean;
|
|
3859
|
-
specificDatePendingUpdateData?: SpecificDateSubscriptionUpdateDataNonNullableFields;
|
|
3860
|
-
items: ItemNonNullableFields[];
|
|
3861
|
-
}
|
|
3862
|
-
export interface GetSubscriptionResponseNonNullableFields {
|
|
3863
|
-
subscription?: SubscriptionNonNullableFields;
|
|
3864
|
-
}
|
|
3865
|
-
export interface CustomerCancelSubscriptionResponseNonNullableFields {
|
|
3866
|
-
subscription?: SubscriptionNonNullableFields;
|
|
3867
|
-
}
|
|
3868
|
-
export interface CustomerTurnOnAutoRenewalResponseNonNullableFields {
|
|
3869
|
-
subscription?: SubscriptionNonNullableFields;
|
|
3870
|
-
}
|
|
3871
|
-
export interface CustomerTurnOffAutoRenewalResponseNonNullableFields {
|
|
3872
|
-
subscription?: SubscriptionNonNullableFields;
|
|
3873
|
-
}
|
|
3874
|
-
export interface CustomerExtendSubscriptionResponseNonNullableFields {
|
|
3875
|
-
subscription?: SubscriptionNonNullableFields;
|
|
3876
|
-
}
|
|
3877
|
-
export interface QuerySubscriptionsResponseNonNullableFields {
|
|
3878
|
-
subscriptions: SubscriptionNonNullableFields[];
|
|
3879
|
-
}
|
|
3880
|
-
export interface UpdateSubscriptionPaymentMethodResponseNonNullableFields {
|
|
3881
|
-
subscription?: SubscriptionNonNullableFields;
|
|
3882
|
-
}
|
|
3883
|
-
interface ActionNonNullableFields {
|
|
3884
|
-
actionType: ActionType;
|
|
3885
|
-
pausePolicies: PausePolicy[];
|
|
3886
|
-
pauseAt: PauseAt[];
|
|
3887
|
-
resumeAt: ResumeAt[];
|
|
3888
|
-
extendPolicies: ExtendPolicyType[];
|
|
3889
|
-
}
|
|
3890
|
-
export interface CustomerAllowedActionsResponseNonNullableFields {
|
|
3891
|
-
actions: ActionNonNullableFields[];
|
|
3892
|
-
}
|
|
3893
|
-
interface RecurringNonNullableFields {
|
|
3894
|
-
cycleNumber: number;
|
|
3895
|
-
}
|
|
3896
|
-
interface InvoiceDiscountNonNullableFields {
|
|
3897
|
-
amount: string;
|
|
3898
|
-
percentage: string;
|
|
3899
|
-
origin?: DiscountOriginNonNullableFields;
|
|
3900
|
-
}
|
|
3901
|
-
interface InvoiceApplicationFeeNonNullableFields {
|
|
3902
|
-
amount: string;
|
|
3903
|
-
discount?: InvoiceDiscountNonNullableFields;
|
|
3904
|
-
}
|
|
3905
|
-
interface PriceDetailsNonNullableFields {
|
|
3906
|
-
price: string;
|
|
3907
|
-
tax?: TaxNonNullableFields;
|
|
3908
|
-
discount?: InvoiceDiscountNonNullableFields;
|
|
3909
|
-
applicationFeeDetails?: InvoiceApplicationFeeNonNullableFields;
|
|
3910
|
-
}
|
|
3911
|
-
interface LineItemTaxSummaryNonNullableFields {
|
|
3912
|
-
aggregatedTaxAmount: string;
|
|
3913
|
-
aggregatedTaxRate: string;
|
|
3914
|
-
taxableAmount: string;
|
|
3915
|
-
}
|
|
3916
|
-
interface TaxBreakdownNonNullableFields {
|
|
3917
|
-
taxType: string;
|
|
3918
|
-
taxRate: string;
|
|
3919
|
-
jurisdictionType: string;
|
|
3920
|
-
}
|
|
3921
|
-
interface ItemTaxDataNonNullableFields {
|
|
3922
|
-
lineItemTaxSummary?: LineItemTaxSummaryNonNullableFields;
|
|
3923
|
-
taxBreakdowns: TaxBreakdownNonNullableFields[];
|
|
3924
|
-
}
|
|
3925
|
-
interface InvoiceItemNonNullableFields {
|
|
3926
|
-
recurring?: RecurringNonNullableFields;
|
|
3927
|
-
_id: string;
|
|
3928
|
-
name: string;
|
|
3929
|
-
catalogReference?: CatalogReferenceNonNullableFields;
|
|
3930
|
-
category: ItemCategory;
|
|
3931
|
-
quantity: number;
|
|
3932
|
-
priceDetails?: PriceDetailsNonNullableFields;
|
|
3933
|
-
totals?: TotalsNonNullableFields;
|
|
3934
|
-
taxData?: ItemTaxDataNonNullableFields;
|
|
3935
|
-
}
|
|
3936
|
-
interface SubscriptionChargeNonNullableFields {
|
|
3937
|
-
cycle: number;
|
|
3938
|
-
totals?: TotalsNonNullableFields;
|
|
3939
|
-
invoiceItems: InvoiceItemNonNullableFields[];
|
|
3940
|
-
discount?: InvoiceDiscountNonNullableFields;
|
|
3941
|
-
}
|
|
3942
|
-
export interface CustomerListUpcomingChargesResponseNonNullableFields {
|
|
3943
|
-
upcomingCharge?: SubscriptionChargeNonNullableFields;
|
|
3944
|
-
}
|
|
3945
|
-
export interface InitiatePaymentMethodSetupResponseNonNullableFields {
|
|
3946
|
-
paymentOrderId: string;
|
|
3947
|
-
}
|
|
3948
|
-
export interface PayCycleResponseNonNullableFields {
|
|
3949
|
-
invoiceId: string;
|
|
3950
|
-
subscription?: SubscriptionNonNullableFields;
|
|
3951
|
-
}
|
|
3952
|
-
export interface UpdateSubscriptionBillingDateResponseNonNullableFields {
|
|
3953
|
-
subscription?: SubscriptionNonNullableFields;
|
|
3954
|
-
}
|
|
3955
|
-
export interface CancelSubscriptionResponseNonNullableFields {
|
|
3956
|
-
subscription?: SubscriptionNonNullableFields;
|
|
3957
|
-
}
|
|
3958
|
-
export interface PauseSubscriptionResponseNonNullableFields {
|
|
3959
|
-
subscription?: SubscriptionNonNullableFields;
|
|
3960
|
-
}
|
|
3961
|
-
export interface ResumeSubscriptionResponseNonNullableFields {
|
|
3962
|
-
subscription?: SubscriptionNonNullableFields;
|
|
3963
|
-
}
|
|
3964
|
-
export interface SearchSubscriptionsResponseNonNullableFields {
|
|
3965
|
-
subscriptions: SubscriptionNonNullableFields[];
|
|
3966
|
-
}
|
|
3967
|
-
interface CountByStatusNonNullableFields {
|
|
3968
|
-
status: SubscriptionStatusEnumSubscriptionStatus;
|
|
3969
|
-
count: number;
|
|
3970
|
-
}
|
|
3971
|
-
export interface CountSubscriptionsResponseNonNullableFields {
|
|
3972
|
-
countByStatus: CountByStatusNonNullableFields[];
|
|
3973
|
-
total: number;
|
|
3974
|
-
}
|
|
3975
|
-
export interface TurnOnSubscriptionAutoRenewalResponseNonNullableFields {
|
|
3976
|
-
subscription?: SubscriptionNonNullableFields;
|
|
3977
|
-
}
|
|
3978
|
-
export interface TurnOffSubscriptionAutoRenewalResponseNonNullableFields {
|
|
3979
|
-
subscription?: SubscriptionNonNullableFields;
|
|
3980
|
-
}
|
|
3981
|
-
export interface MarkLatestInvoiceAsPaidResponseNonNullableFields {
|
|
3982
|
-
subscription?: SubscriptionNonNullableFields;
|
|
3983
|
-
}
|
|
3984
|
-
export interface MarkBillingCycleAsPaidResponseNonNullableFields {
|
|
3985
|
-
subscription?: SubscriptionNonNullableFields;
|
|
3986
|
-
}
|
|
3987
|
-
interface AmountByStatusNonNullableFields {
|
|
3988
|
-
status: SubscriptionStatusEnumSubscriptionStatus;
|
|
3989
|
-
amount: number;
|
|
3990
|
-
}
|
|
3991
|
-
export interface GetSubscriptionsStatsResponseNonNullableFields {
|
|
3992
|
-
amountByStatuses: AmountByStatusNonNullableFields[];
|
|
3993
|
-
total: number;
|
|
3994
|
-
}
|
|
3995
|
-
export interface ExtendSubscriptionResponseNonNullableFields {
|
|
3996
|
-
subscription?: SubscriptionNonNullableFields;
|
|
3997
|
-
}
|
|
3998
|
-
interface UnsupportedReasonNonNullableFields {
|
|
3999
|
-
code: string;
|
|
4000
|
-
}
|
|
4001
|
-
interface UnsupportedActionNonNullableFields {
|
|
4002
|
-
actionType: ActionType;
|
|
4003
|
-
reasons: UnsupportedReasonNonNullableFields[];
|
|
4004
|
-
}
|
|
4005
|
-
export interface AllowedActionsResponseNonNullableFields {
|
|
4006
|
-
actions: ActionNonNullableFields[];
|
|
4007
|
-
unsupportedActions: UnsupportedActionNonNullableFields[];
|
|
4008
|
-
}
|
|
4009
|
-
export interface ListUpcomingChargesResponseNonNullableFields {
|
|
4010
|
-
upcomingCharges: SubscriptionChargeNonNullableFields[];
|
|
4011
|
-
}
|
|
4012
|
-
interface ChargeNonNullableFields {
|
|
4013
|
-
cycleFrom: number;
|
|
4014
|
-
totals?: TotalsNonNullableFields;
|
|
4015
|
-
}
|
|
4016
|
-
export interface PreviewSubscriptionChargesResponseNonNullableFields {
|
|
4017
|
-
charges: ChargeNonNullableFields[];
|
|
4018
|
-
}
|
|
4019
|
-
interface SubscriptionChargesNonNullableFields {
|
|
4020
|
-
charges: ChargeNonNullableFields[];
|
|
4021
|
-
}
|
|
4022
|
-
export interface PreviewSubscriptionsChargesResponseNonNullableFields {
|
|
4023
|
-
subscriptionsCharges: SubscriptionChargesNonNullableFields[];
|
|
4024
|
-
}
|
|
4025
|
-
interface SubscriptionCreatedNonNullableFields {
|
|
4026
|
-
subscription?: SubscriptionNonNullableFields;
|
|
4027
|
-
}
|
|
4028
|
-
interface SubscriptionUpdatedNonNullableFields {
|
|
4029
|
-
current?: SubscriptionNonNullableFields;
|
|
4030
|
-
previous?: SubscriptionNonNullableFields;
|
|
4031
|
-
}
|
|
4032
|
-
interface SubscriptionDeletedNonNullableFields {
|
|
4033
|
-
subscriptionId: string;
|
|
4034
|
-
}
|
|
4035
|
-
interface SubscriptionActivatedNonNullableFields {
|
|
4036
|
-
subscription?: SubscriptionNonNullableFields;
|
|
4037
|
-
}
|
|
4038
|
-
interface SubscriptionEndedNonNullableFields {
|
|
4039
|
-
subscription?: SubscriptionNonNullableFields;
|
|
4040
|
-
}
|
|
4041
|
-
interface ActionDetailsNonNullableFields {
|
|
4042
|
-
initiator: HistoryActionInitiator;
|
|
4043
|
-
}
|
|
4044
|
-
interface SubscriptionCanceledNonNullableFields {
|
|
4045
|
-
subscription?: SubscriptionNonNullableFields;
|
|
4046
|
-
actionDetails?: ActionDetailsNonNullableFields;
|
|
4047
|
-
}
|
|
4048
|
-
interface SubscriptionPausedNonNullableFields {
|
|
4049
|
-
subscription?: SubscriptionNonNullableFields;
|
|
4050
|
-
pausePolicy: PausePolicy;
|
|
4051
|
-
actionDetails?: ActionDetailsNonNullableFields;
|
|
4052
|
-
}
|
|
4053
|
-
interface SubscriptionResumedNonNullableFields {
|
|
4054
|
-
subscription?: SubscriptionNonNullableFields;
|
|
4055
|
-
actionDetails?: ActionDetailsNonNullableFields;
|
|
4056
|
-
}
|
|
4057
|
-
interface PauseSubscriptionRequestedNonNullableFields {
|
|
4058
|
-
subscription?: SubscriptionNonNullableFields;
|
|
4059
|
-
pauseAt: PauseAt;
|
|
4060
|
-
pausePolicy: PausePolicy;
|
|
4061
|
-
actionDetails?: ActionDetailsNonNullableFields;
|
|
4062
|
-
}
|
|
4063
|
-
interface ResumeSubscriptionRequestedNonNullableFields {
|
|
4064
|
-
subscription?: SubscriptionNonNullableFields;
|
|
4065
|
-
resumeAt: ResumeAt;
|
|
4066
|
-
actionDetails?: ActionDetailsNonNullableFields;
|
|
4067
|
-
}
|
|
4068
|
-
interface ScheduledPauseCanceledNonNullableFields {
|
|
4069
|
-
subscription?: SubscriptionNonNullableFields;
|
|
4070
|
-
actionDetails?: ActionDetailsNonNullableFields;
|
|
4071
|
-
}
|
|
4072
|
-
interface ScheduledResumeCanceledNonNullableFields {
|
|
4073
|
-
subscription?: SubscriptionNonNullableFields;
|
|
4074
|
-
actionDetails?: ActionDetailsNonNullableFields;
|
|
4075
|
-
}
|
|
4076
|
-
interface SubscriptionBillingCycleStartedNonNullableFields {
|
|
4077
|
-
subscription?: SubscriptionNonNullableFields;
|
|
4078
|
-
}
|
|
4079
|
-
interface SubscriptionAutoRenewalTurnedOnNonNullableFields {
|
|
4080
|
-
subscription?: SubscriptionNonNullableFields;
|
|
4081
|
-
actionDetails?: ActionDetailsNonNullableFields;
|
|
4082
|
-
}
|
|
4083
|
-
interface SubscriptionAutoRenewalTurnedOffNonNullableFields {
|
|
4084
|
-
subscription?: SubscriptionNonNullableFields;
|
|
4085
|
-
actionDetails?: ActionDetailsNonNullableFields;
|
|
4086
|
-
}
|
|
4087
|
-
interface SubscriptionCycleReadyToPayNonNullableFields {
|
|
4088
|
-
subscription?: SubscriptionNonNullableFields;
|
|
4089
|
-
}
|
|
4090
|
-
interface SubscriptionExtendedNonNullableFields {
|
|
4091
|
-
extensionPeriod?: DurationNonNullableFields;
|
|
4092
|
-
extensionBillingCycles: number;
|
|
4093
|
-
subscription?: SubscriptionNonNullableFields;
|
|
4094
|
-
actionDetails?: ActionDetailsNonNullableFields;
|
|
4095
|
-
}
|
|
4096
|
-
interface SubscriptionInitialPurchaseCompletedNonNullableFields {
|
|
4097
|
-
subscription?: SubscriptionNonNullableFields;
|
|
4098
|
-
actionDetails?: ActionDetailsNonNullableFields;
|
|
4099
|
-
}
|
|
4100
|
-
interface LatestInvoiceMarkedAsPaidNonNullableFields {
|
|
4101
|
-
subscription?: SubscriptionNonNullableFields;
|
|
4102
|
-
}
|
|
4103
|
-
interface SubscriptionRevivedNonNullableFields {
|
|
4104
|
-
subscription?: SubscriptionNonNullableFields;
|
|
4105
|
-
}
|
|
4106
|
-
interface SubscriptionBillingDateUpdatedNonNullableFields {
|
|
4107
|
-
subscription?: SubscriptionNonNullableFields;
|
|
4108
|
-
proration?: ProrationNonNullableFields;
|
|
4109
|
-
}
|
|
4110
|
-
interface FutureUpdatesRequestedNonNullableFields {
|
|
4111
|
-
subscription?: SubscriptionNonNullableFields;
|
|
4112
|
-
requestedUpdateData?: SubscriptionUpdateDataNonNullableFields;
|
|
4113
|
-
}
|
|
4114
|
-
interface UpdatesAppliedNonNullableFields {
|
|
4115
|
-
subscription?: SubscriptionNonNullableFields;
|
|
4116
|
-
updateAction: UpdateAction;
|
|
4117
|
-
appliedUpdateData?: SubscriptionUpdateDataNonNullableFields;
|
|
4118
|
-
}
|
|
4119
|
-
interface ResetPendingUpdatesNonNullableFields {
|
|
4120
|
-
subscription?: SubscriptionNonNullableFields;
|
|
4121
|
-
}
|
|
4122
|
-
interface GracePeriodStartedNonNullableFields {
|
|
4123
|
-
subscription?: SubscriptionNonNullableFields;
|
|
4124
|
-
}
|
|
4125
|
-
interface GracePeriodEndedNonNullableFields {
|
|
4126
|
-
subscription?: SubscriptionNonNullableFields;
|
|
4127
|
-
paymentSettlementMethod: PaymentSettlementMethod;
|
|
4128
|
-
}
|
|
4129
|
-
interface PaymentMethodUpdatedNonNullableFields {
|
|
4130
|
-
subscription?: SubscriptionNonNullableFields;
|
|
4131
|
-
initiator: HistoryActionInitiator;
|
|
4132
|
-
paymentMode: PaymentMode;
|
|
4133
|
-
}
|
|
4134
|
-
interface SubscriptionCollectionMethodUpdatedNonNullableFields {
|
|
4135
|
-
subscription?: SubscriptionNonNullableFields;
|
|
4136
|
-
newCollectionMethod: CollectionMethodEnumCollectionMethod;
|
|
4137
|
-
previousCollectionMethod: CollectionMethodEnumCollectionMethod;
|
|
4138
|
-
}
|
|
4139
|
-
interface FreeTrailStartedNonNullableFields {
|
|
4140
|
-
subscription?: SubscriptionNonNullableFields;
|
|
4141
|
-
}
|
|
4142
|
-
interface FreeTrailEndedNonNullableFields {
|
|
4143
|
-
subscription?: SubscriptionNonNullableFields;
|
|
4144
|
-
}
|
|
4145
|
-
interface SubscriptionBillingCyclePaidNonNullableFields {
|
|
4146
|
-
subscription?: SubscriptionNonNullableFields;
|
|
4147
|
-
paidCycle: number;
|
|
4148
|
-
invoiceId: string;
|
|
4149
|
-
}
|
|
4150
|
-
interface InitiatedPaymentMethodSetupNonNullableFields {
|
|
4151
|
-
subscription?: SubscriptionNonNullableFields;
|
|
4152
|
-
}
|
|
4153
|
-
interface SubscriptionBackOfficeActionNonNullableFields {
|
|
4154
|
-
subscription?: SubscriptionNonNullableFields;
|
|
4155
|
-
name: string;
|
|
4156
|
-
params: string;
|
|
4157
|
-
}
|
|
4158
|
-
interface SubscriptionEventNonNullableFields {
|
|
4159
|
-
created?: SubscriptionCreatedNonNullableFields;
|
|
4160
|
-
updated?: SubscriptionUpdatedNonNullableFields;
|
|
4161
|
-
deleted?: SubscriptionDeletedNonNullableFields;
|
|
4162
|
-
activated?: SubscriptionActivatedNonNullableFields;
|
|
4163
|
-
ended?: SubscriptionEndedNonNullableFields;
|
|
4164
|
-
canceled?: SubscriptionCanceledNonNullableFields;
|
|
4165
|
-
paused?: SubscriptionPausedNonNullableFields;
|
|
4166
|
-
resumed?: SubscriptionResumedNonNullableFields;
|
|
4167
|
-
pauseRequested?: PauseSubscriptionRequestedNonNullableFields;
|
|
4168
|
-
resumeRequested?: ResumeSubscriptionRequestedNonNullableFields;
|
|
4169
|
-
scheduledPauseCanceled?: ScheduledPauseCanceledNonNullableFields;
|
|
4170
|
-
scheduledResumeCanceled?: ScheduledResumeCanceledNonNullableFields;
|
|
4171
|
-
billingCycleStarted?: SubscriptionBillingCycleStartedNonNullableFields;
|
|
4172
|
-
autoRenewalTurnedOn?: SubscriptionAutoRenewalTurnedOnNonNullableFields;
|
|
4173
|
-
autoRenewalTurnedOff?: SubscriptionAutoRenewalTurnedOffNonNullableFields;
|
|
4174
|
-
cycleReadyToPay?: SubscriptionCycleReadyToPayNonNullableFields;
|
|
4175
|
-
extended?: SubscriptionExtendedNonNullableFields;
|
|
4176
|
-
initialPurchaseCompleted?: SubscriptionInitialPurchaseCompletedNonNullableFields;
|
|
4177
|
-
latestInvoiceMarkedAsPaid?: LatestInvoiceMarkedAsPaidNonNullableFields;
|
|
4178
|
-
revived?: SubscriptionRevivedNonNullableFields;
|
|
4179
|
-
billingDateUpdated?: SubscriptionBillingDateUpdatedNonNullableFields;
|
|
4180
|
-
futureUpdatesRequested?: FutureUpdatesRequestedNonNullableFields;
|
|
4181
|
-
updatesApplied?: UpdatesAppliedNonNullableFields;
|
|
4182
|
-
resetPendingUpdates?: ResetPendingUpdatesNonNullableFields;
|
|
4183
|
-
gracePeriodStarted?: GracePeriodStartedNonNullableFields;
|
|
4184
|
-
gracePeriodEnded?: GracePeriodEndedNonNullableFields;
|
|
4185
|
-
paymentMethodUpdated?: PaymentMethodUpdatedNonNullableFields;
|
|
4186
|
-
collectionMethodUpdated?: SubscriptionCollectionMethodUpdatedNonNullableFields;
|
|
4187
|
-
freeTrailStarted?: FreeTrailStartedNonNullableFields;
|
|
4188
|
-
freeTrailEnded?: FreeTrailEndedNonNullableFields;
|
|
4189
|
-
billingCyclePaid?: SubscriptionBillingCyclePaidNonNullableFields;
|
|
4190
|
-
initiatePaymentMethodSetup?: InitiatedPaymentMethodSetupNonNullableFields;
|
|
4191
|
-
subscriptionBoAction?: SubscriptionBackOfficeActionNonNullableFields;
|
|
4192
|
-
}
|
|
4193
|
-
interface SubscriptionHistoryEntryNonNullableFields {
|
|
4194
|
-
entryId: string;
|
|
4195
|
-
slug: string;
|
|
4196
|
-
event?: SubscriptionEventNonNullableFields;
|
|
4197
|
-
}
|
|
4198
|
-
export interface ListSubscriptionHistoryResponseNonNullableFields {
|
|
4199
|
-
historyEntries: SubscriptionHistoryEntryNonNullableFields[];
|
|
4200
|
-
}
|
|
4201
|
-
export interface BaseEventMetadata {
|
|
3772
|
+
/** @docsIgnore */
|
|
3773
|
+
type CustomerCancelSubscriptionApplicationErrors = {
|
|
3774
|
+
code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS';
|
|
3775
|
+
description?: string;
|
|
3776
|
+
data?: Record<string, any>;
|
|
3777
|
+
};
|
|
3778
|
+
/** @docsIgnore */
|
|
3779
|
+
type CustomerTurnOnSubscriptionAutoRenewalApplicationErrors = {
|
|
3780
|
+
code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS';
|
|
3781
|
+
description?: string;
|
|
3782
|
+
data?: Record<string, any>;
|
|
3783
|
+
};
|
|
3784
|
+
/** @docsIgnore */
|
|
3785
|
+
type CustomerTurnOffSubscriptionAutoRenewalApplicationErrors = {
|
|
3786
|
+
code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS';
|
|
3787
|
+
description?: string;
|
|
3788
|
+
data?: Record<string, any>;
|
|
3789
|
+
};
|
|
3790
|
+
/** @docsIgnore */
|
|
3791
|
+
type CustomerExtendSubscriptionApplicationErrors = {
|
|
3792
|
+
code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS';
|
|
3793
|
+
description?: string;
|
|
3794
|
+
data?: Record<string, any>;
|
|
3795
|
+
};
|
|
3796
|
+
/** @docsIgnore */
|
|
3797
|
+
type UpdateSubscriptionBillingDateApplicationErrors = {
|
|
3798
|
+
code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS';
|
|
3799
|
+
description?: string;
|
|
3800
|
+
data?: Record<string, any>;
|
|
3801
|
+
};
|
|
3802
|
+
/** @docsIgnore */
|
|
3803
|
+
type CancelSubscriptionApplicationErrors = {
|
|
3804
|
+
code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS';
|
|
3805
|
+
description?: string;
|
|
3806
|
+
data?: Record<string, any>;
|
|
3807
|
+
};
|
|
3808
|
+
/** @docsIgnore */
|
|
3809
|
+
type PauseSubscriptionApplicationErrors = {
|
|
3810
|
+
code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS';
|
|
3811
|
+
description?: string;
|
|
3812
|
+
data?: Record<string, any>;
|
|
3813
|
+
};
|
|
3814
|
+
/** @docsIgnore */
|
|
3815
|
+
type ResumeSubscriptionApplicationErrors = {
|
|
3816
|
+
code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS';
|
|
3817
|
+
description?: string;
|
|
3818
|
+
data?: Record<string, any>;
|
|
3819
|
+
};
|
|
3820
|
+
/** @docsIgnore */
|
|
3821
|
+
type TurnOnSubscriptionAutoRenewalApplicationErrors = {
|
|
3822
|
+
code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS';
|
|
3823
|
+
description?: string;
|
|
3824
|
+
data?: Record<string, any>;
|
|
3825
|
+
};
|
|
3826
|
+
/** @docsIgnore */
|
|
3827
|
+
type TurnOffSubscriptionAutoRenewalApplicationErrors = {
|
|
3828
|
+
code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS';
|
|
3829
|
+
description?: string;
|
|
3830
|
+
data?: Record<string, any>;
|
|
3831
|
+
};
|
|
3832
|
+
/** @docsIgnore */
|
|
3833
|
+
type MarkLatestInvoiceAsPaidApplicationErrors = {
|
|
3834
|
+
code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS';
|
|
3835
|
+
description?: string;
|
|
3836
|
+
data?: Record<string, any>;
|
|
3837
|
+
} | {
|
|
3838
|
+
code?: 'SUBSCRIPTION_PART_OF_ORDER';
|
|
3839
|
+
description?: string;
|
|
3840
|
+
data?: MultipleSubscriptionsOnOrdersInvoice;
|
|
3841
|
+
};
|
|
3842
|
+
/** @docsIgnore */
|
|
3843
|
+
type MarkBillingCycleAsPaidApplicationErrors = {
|
|
3844
|
+
code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS';
|
|
3845
|
+
description?: string;
|
|
3846
|
+
data?: Record<string, any>;
|
|
3847
|
+
} | {
|
|
3848
|
+
code?: 'SUBSCRIPTION_PART_OF_ORDER';
|
|
3849
|
+
description?: string;
|
|
3850
|
+
data?: MultipleSubscriptionsOnOrdersInvoice;
|
|
3851
|
+
} | {
|
|
3852
|
+
code?: 'INVOICE_NOT_FOUND';
|
|
3853
|
+
description?: string;
|
|
3854
|
+
data?: Record<string, any>;
|
|
3855
|
+
} | {
|
|
3856
|
+
code?: 'OPERATION_NOT_SUPPORTED_FOR_COLLECTION_METHOD';
|
|
3857
|
+
description?: string;
|
|
3858
|
+
data?: Record<string, any>;
|
|
3859
|
+
};
|
|
3860
|
+
/** @docsIgnore */
|
|
3861
|
+
type ExtendSubscriptionApplicationErrors = {
|
|
3862
|
+
code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS';
|
|
3863
|
+
description?: string;
|
|
3864
|
+
data?: Record<string, any>;
|
|
3865
|
+
};
|
|
3866
|
+
interface BaseEventMetadata {
|
|
4202
3867
|
/**
|
|
4203
3868
|
* App instance ID.
|
|
4204
3869
|
* @format GUID
|
|
@@ -4212,26 +3877,22 @@ export interface BaseEventMetadata {
|
|
|
4212
3877
|
/** The identification type and identity data. */
|
|
4213
3878
|
identity?: IdentificationData;
|
|
4214
3879
|
}
|
|
4215
|
-
|
|
4216
|
-
/**
|
|
4217
|
-
* Unique event ID.
|
|
4218
|
-
* Allows clients to ignore duplicate webhooks.
|
|
4219
|
-
*/
|
|
3880
|
+
interface EventMetadata extends BaseEventMetadata {
|
|
3881
|
+
/** Event ID. With this ID you can easily spot duplicated events and ignore them. */
|
|
4220
3882
|
_id?: string;
|
|
4221
3883
|
/**
|
|
4222
|
-
*
|
|
4223
|
-
*
|
|
3884
|
+
* Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
|
|
3885
|
+
* For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
|
|
4224
3886
|
*/
|
|
4225
3887
|
entityFqdn?: string;
|
|
4226
3888
|
/**
|
|
4227
|
-
*
|
|
4228
|
-
*
|
|
4229
|
-
* Example: created/updated/deleted/started/completed/email_opened
|
|
3889
|
+
* Event action name, placed at the top level to make it easier for users to dispatch messages.
|
|
3890
|
+
* For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
|
|
4230
3891
|
*/
|
|
4231
3892
|
slug?: string;
|
|
4232
3893
|
/** ID of the entity associated with the event. */
|
|
4233
3894
|
entityId?: string;
|
|
4234
|
-
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example
|
|
3895
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
|
|
4235
3896
|
eventTime?: Date | null;
|
|
4236
3897
|
/**
|
|
4237
3898
|
* Whether the event was triggered as a result of a privacy regulation application
|
|
@@ -4241,21 +3902,19 @@ export interface EventMetadata extends BaseEventMetadata {
|
|
|
4241
3902
|
/** If present, indicates the action that triggered the event. */
|
|
4242
3903
|
originatedFrom?: string | null;
|
|
4243
3904
|
/**
|
|
4244
|
-
* A sequence number
|
|
4245
|
-
*
|
|
4246
|
-
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
4247
|
-
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
4248
|
-
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
4249
|
-
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
3905
|
+
* A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.
|
|
3906
|
+
* You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
|
|
4250
3907
|
*/
|
|
4251
3908
|
entityEventSequence?: string | null;
|
|
4252
3909
|
}
|
|
4253
|
-
|
|
3910
|
+
interface SubscriptionCanceledEnvelope {
|
|
4254
3911
|
data: SubscriptionCanceled;
|
|
4255
3912
|
metadata: EventMetadata;
|
|
4256
3913
|
}
|
|
4257
3914
|
/**
|
|
4258
3915
|
* Triggered when a subscription is canceled.
|
|
3916
|
+
* @permissionScope Manage Stores
|
|
3917
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
4259
3918
|
* @permissionScope Manage Events
|
|
4260
3919
|
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
4261
3920
|
* @permissionId subscriptions.view
|
|
@@ -4265,13 +3924,15 @@ export interface SubscriptionCanceledEnvelope {
|
|
|
4265
3924
|
* @slug canceled
|
|
4266
3925
|
* @documentationMaturity preview
|
|
4267
3926
|
*/
|
|
4268
|
-
|
|
4269
|
-
|
|
3927
|
+
declare function onSubscriptionCanceled(handler: (event: SubscriptionCanceledEnvelope) => void | Promise<void>): void;
|
|
3928
|
+
interface SubscriptionExtendedEnvelope {
|
|
4270
3929
|
data: SubscriptionExtended;
|
|
4271
3930
|
metadata: EventMetadata;
|
|
4272
3931
|
}
|
|
4273
3932
|
/**
|
|
4274
3933
|
* Triggered when subscription has been extended
|
|
3934
|
+
* @permissionScope Manage Stores
|
|
3935
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
4275
3936
|
* @permissionScope Manage Events
|
|
4276
3937
|
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
4277
3938
|
* @permissionId subscriptions.view
|
|
@@ -4281,13 +3942,15 @@ export interface SubscriptionExtendedEnvelope {
|
|
|
4281
3942
|
* @slug extended
|
|
4282
3943
|
* @documentationMaturity preview
|
|
4283
3944
|
*/
|
|
4284
|
-
|
|
4285
|
-
|
|
3945
|
+
declare function onSubscriptionExtended(handler: (event: SubscriptionExtendedEnvelope) => void | Promise<void>): void;
|
|
3946
|
+
interface SubscriptionUpdatedEnvelope {
|
|
4286
3947
|
entity: Subscription;
|
|
4287
3948
|
metadata: EventMetadata;
|
|
4288
3949
|
}
|
|
4289
3950
|
/**
|
|
4290
3951
|
* Triggered when a subscription is updated.
|
|
3952
|
+
* @permissionScope Manage Stores
|
|
3953
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
4291
3954
|
* @permissionScope Manage Events
|
|
4292
3955
|
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
4293
3956
|
* @permissionId subscriptions.view
|
|
@@ -4297,13 +3960,15 @@ export interface SubscriptionUpdatedEnvelope {
|
|
|
4297
3960
|
* @slug updated
|
|
4298
3961
|
* @documentationMaturity preview
|
|
4299
3962
|
*/
|
|
4300
|
-
|
|
4301
|
-
|
|
3963
|
+
declare function onSubscriptionUpdated(handler: (event: SubscriptionUpdatedEnvelope) => void | Promise<void>): void;
|
|
3964
|
+
interface SubscriptionAutoRenewalTurnedOffEnvelope {
|
|
4302
3965
|
data: SubscriptionAutoRenewalTurnedOff;
|
|
4303
3966
|
metadata: EventMetadata;
|
|
4304
3967
|
}
|
|
4305
3968
|
/**
|
|
4306
3969
|
* Triggered when a subscription cycleAutoRenew was turned off.
|
|
3970
|
+
* @permissionScope Manage Stores
|
|
3971
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
4307
3972
|
* @permissionScope Manage Events
|
|
4308
3973
|
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
4309
3974
|
* @permissionId subscriptions.view
|
|
@@ -4313,13 +3978,15 @@ export interface SubscriptionAutoRenewalTurnedOffEnvelope {
|
|
|
4313
3978
|
* @slug auto_renewal_turned_off
|
|
4314
3979
|
* @documentationMaturity preview
|
|
4315
3980
|
*/
|
|
4316
|
-
|
|
4317
|
-
|
|
3981
|
+
declare function onSubscriptionAutoRenewalTurnedOff(handler: (event: SubscriptionAutoRenewalTurnedOffEnvelope) => void | Promise<void>): void;
|
|
3982
|
+
interface SubscriptionAutoRenewalTurnedOnEnvelope {
|
|
4318
3983
|
data: SubscriptionAutoRenewalTurnedOn;
|
|
4319
3984
|
metadata: EventMetadata;
|
|
4320
3985
|
}
|
|
4321
3986
|
/**
|
|
4322
3987
|
* Triggered when a subscription cycleAutoRenew was turned on.
|
|
3988
|
+
* @permissionScope Manage Stores
|
|
3989
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
4323
3990
|
* @permissionScope Manage Events
|
|
4324
3991
|
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
4325
3992
|
* @permissionId subscriptions.view
|
|
@@ -4329,13 +3996,15 @@ export interface SubscriptionAutoRenewalTurnedOnEnvelope {
|
|
|
4329
3996
|
* @slug auto_renewal_turned_on
|
|
4330
3997
|
* @documentationMaturity preview
|
|
4331
3998
|
*/
|
|
4332
|
-
|
|
4333
|
-
|
|
3999
|
+
declare function onSubscriptionAutoRenewalTurnedOn(handler: (event: SubscriptionAutoRenewalTurnedOnEnvelope) => void | Promise<void>): void;
|
|
4000
|
+
interface SubscriptionBillingDateUpdatedEnvelope {
|
|
4334
4001
|
data: SubscriptionBillingDateUpdated;
|
|
4335
4002
|
metadata: EventMetadata;
|
|
4336
4003
|
}
|
|
4337
4004
|
/**
|
|
4338
4005
|
* Triggered when subscription has been extended
|
|
4006
|
+
* @permissionScope Manage Stores
|
|
4007
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
4339
4008
|
* @permissionScope Manage Events
|
|
4340
4009
|
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
4341
4010
|
* @permissionId subscriptions.view
|
|
@@ -4345,12 +4014,14 @@ export interface SubscriptionBillingDateUpdatedEnvelope {
|
|
|
4345
4014
|
* @slug billing_date_updated
|
|
4346
4015
|
* @documentationMaturity preview
|
|
4347
4016
|
*/
|
|
4348
|
-
|
|
4349
|
-
|
|
4017
|
+
declare function onSubscriptionBillingDateUpdated(handler: (event: SubscriptionBillingDateUpdatedEnvelope) => void | Promise<void>): void;
|
|
4018
|
+
interface SubscriptionLatestInvoiceMarkedAsPaidEnvelope {
|
|
4350
4019
|
data: LatestInvoiceMarkedAsPaid;
|
|
4351
4020
|
metadata: EventMetadata;
|
|
4352
4021
|
}
|
|
4353
|
-
/** @permissionScope Manage
|
|
4022
|
+
/** @permissionScope Manage Stores
|
|
4023
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
4024
|
+
* @permissionScope Manage Events
|
|
4354
4025
|
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
4355
4026
|
* @permissionId subscriptions.view
|
|
4356
4027
|
* @webhook
|
|
@@ -4359,13 +4030,15 @@ export interface SubscriptionLatestInvoiceMarkedAsPaidEnvelope {
|
|
|
4359
4030
|
* @slug latest_invoice_marked_as_paid
|
|
4360
4031
|
* @documentationMaturity preview
|
|
4361
4032
|
*/
|
|
4362
|
-
|
|
4363
|
-
|
|
4033
|
+
declare function onSubscriptionLatestInvoiceMarkedAsPaid(handler: (event: SubscriptionLatestInvoiceMarkedAsPaidEnvelope) => void | Promise<void>): void;
|
|
4034
|
+
interface SubscriptionPauseScheduleCanceledEnvelope {
|
|
4364
4035
|
data: ScheduledPauseCanceled;
|
|
4365
4036
|
metadata: EventMetadata;
|
|
4366
4037
|
}
|
|
4367
4038
|
/**
|
|
4368
4039
|
* Triggered when scheduled pause canceled
|
|
4040
|
+
* @permissionScope Manage Stores
|
|
4041
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
4369
4042
|
* @permissionScope Manage Events
|
|
4370
4043
|
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
4371
4044
|
* @permissionId subscriptions.view
|
|
@@ -4375,13 +4048,15 @@ export interface SubscriptionPauseScheduleCanceledEnvelope {
|
|
|
4375
4048
|
* @slug pause_schedule_canceled
|
|
4376
4049
|
* @documentationMaturity preview
|
|
4377
4050
|
*/
|
|
4378
|
-
|
|
4379
|
-
|
|
4051
|
+
declare function onSubscriptionPauseScheduleCanceled(handler: (event: SubscriptionPauseScheduleCanceledEnvelope) => void | Promise<void>): void;
|
|
4052
|
+
interface SubscriptionPauseScheduledEnvelope {
|
|
4380
4053
|
data: PauseSubscriptionRequested;
|
|
4381
4054
|
metadata: EventMetadata;
|
|
4382
4055
|
}
|
|
4383
4056
|
/**
|
|
4384
4057
|
* Triggered when pause subscription requested
|
|
4058
|
+
* @permissionScope Manage Stores
|
|
4059
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
4385
4060
|
* @permissionScope Manage Events
|
|
4386
4061
|
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
4387
4062
|
* @permissionId subscriptions.view
|
|
@@ -4391,13 +4066,15 @@ export interface SubscriptionPauseScheduledEnvelope {
|
|
|
4391
4066
|
* @slug pause_scheduled
|
|
4392
4067
|
* @documentationMaturity preview
|
|
4393
4068
|
*/
|
|
4394
|
-
|
|
4395
|
-
|
|
4069
|
+
declare function onSubscriptionPauseScheduled(handler: (event: SubscriptionPauseScheduledEnvelope) => void | Promise<void>): void;
|
|
4070
|
+
interface SubscriptionPausedEnvelope {
|
|
4396
4071
|
data: SubscriptionPaused;
|
|
4397
4072
|
metadata: EventMetadata;
|
|
4398
4073
|
}
|
|
4399
4074
|
/**
|
|
4400
4075
|
* Triggered when a subscription is paused.
|
|
4076
|
+
* @permissionScope Manage Stores
|
|
4077
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
4401
4078
|
* @permissionScope Manage Events
|
|
4402
4079
|
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
4403
4080
|
* @permissionId subscriptions.view
|
|
@@ -4407,13 +4084,15 @@ export interface SubscriptionPausedEnvelope {
|
|
|
4407
4084
|
* @slug paused
|
|
4408
4085
|
* @documentationMaturity preview
|
|
4409
4086
|
*/
|
|
4410
|
-
|
|
4411
|
-
|
|
4087
|
+
declare function onSubscriptionPaused(handler: (event: SubscriptionPausedEnvelope) => void | Promise<void>): void;
|
|
4088
|
+
interface SubscriptionResumeScheduleCanceledEnvelope {
|
|
4412
4089
|
data: ScheduledResumeCanceled;
|
|
4413
4090
|
metadata: EventMetadata;
|
|
4414
4091
|
}
|
|
4415
4092
|
/**
|
|
4416
4093
|
* Triggered when scheduled pause canceled
|
|
4094
|
+
* @permissionScope Manage Stores
|
|
4095
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
4417
4096
|
* @permissionScope Manage Events
|
|
4418
4097
|
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
4419
4098
|
* @permissionId subscriptions.view
|
|
@@ -4423,13 +4102,15 @@ export interface SubscriptionResumeScheduleCanceledEnvelope {
|
|
|
4423
4102
|
* @slug resume_schedule_canceled
|
|
4424
4103
|
* @documentationMaturity preview
|
|
4425
4104
|
*/
|
|
4426
|
-
|
|
4427
|
-
|
|
4105
|
+
declare function onSubscriptionResumeScheduleCanceled(handler: (event: SubscriptionResumeScheduleCanceledEnvelope) => void | Promise<void>): void;
|
|
4106
|
+
interface SubscriptionResumeScheduledEnvelope {
|
|
4428
4107
|
data: ResumeSubscriptionRequested;
|
|
4429
4108
|
metadata: EventMetadata;
|
|
4430
4109
|
}
|
|
4431
4110
|
/**
|
|
4432
4111
|
* Triggered when resume subscription requested
|
|
4112
|
+
* @permissionScope Manage Stores
|
|
4113
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
4433
4114
|
* @permissionScope Manage Events
|
|
4434
4115
|
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
4435
4116
|
* @permissionId subscriptions.view
|
|
@@ -4439,13 +4120,15 @@ export interface SubscriptionResumeScheduledEnvelope {
|
|
|
4439
4120
|
* @slug resume_scheduled
|
|
4440
4121
|
* @documentationMaturity preview
|
|
4441
4122
|
*/
|
|
4442
|
-
|
|
4443
|
-
|
|
4123
|
+
declare function onSubscriptionResumeScheduled(handler: (event: SubscriptionResumeScheduledEnvelope) => void | Promise<void>): void;
|
|
4124
|
+
interface SubscriptionResumedEnvelope {
|
|
4444
4125
|
data: SubscriptionResumed;
|
|
4445
4126
|
metadata: EventMetadata;
|
|
4446
4127
|
}
|
|
4447
4128
|
/**
|
|
4448
4129
|
* Triggered when a subscription is resumed.
|
|
4130
|
+
* @permissionScope Manage Stores
|
|
4131
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
4449
4132
|
* @permissionScope Manage Events
|
|
4450
4133
|
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
4451
4134
|
* @permissionId subscriptions.view
|
|
@@ -4455,7 +4138,7 @@ export interface SubscriptionResumedEnvelope {
|
|
|
4455
4138
|
* @slug resumed
|
|
4456
4139
|
* @documentationMaturity preview
|
|
4457
4140
|
*/
|
|
4458
|
-
|
|
4141
|
+
declare function onSubscriptionResumed(handler: (event: SubscriptionResumedEnvelope) => void | Promise<void>): void;
|
|
4459
4142
|
/**
|
|
4460
4143
|
* Identity must be a site member and customer subscription belongs to
|
|
4461
4144
|
* @public
|
|
@@ -4463,7 +4146,7 @@ export declare function onSubscriptionResumed(handler: (event: SubscriptionResum
|
|
|
4463
4146
|
* @requiredField _id
|
|
4464
4147
|
* @fqn com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.GetSubscription
|
|
4465
4148
|
*/
|
|
4466
|
-
|
|
4149
|
+
declare function customerGetSubscription(_id: string): Promise<NonNullablePaths<GetSubscriptionResponse, `subscription.name` | `subscription.customer.visitorId` | `subscription.customer.contactId` | `subscription.customer.memberId` | `subscription.customer.accountId` | `subscription.status` | `subscription.billingSettings.currency` | `subscription.billingSettings.paymentMethod._id` | `subscription.billingSettings.collectionMethod` | `subscription.billingSettings.cycleDuration.unit` | `subscription.billingSettings.cycleAutoRenew` | `subscription.billingSettings.billingAddress.address.streetAddress.number` | `subscription.billingSettings.billingAddress.address.streetAddress.name` | `subscription.billingSettings.taxSettings.inclusive` | `subscription.billingSettings.additionalFees` | `subscription.billingSettings.additionalFees.${number}.name` | `subscription.billingSettings.additionalFees.${number}.amount` | `subscription.billingSettings.additionalFees.${number}.trigger` | `subscription.billingSettings.additionalFees.${number}.tax.amount` | `subscription.billingSettings.additionalFees.${number}.tax.percentage` | `subscription.billingSettings.additionalFees.${number}.tax.dynamic.taxableAddressType` | `subscription.billingSettings.additionalFees.${number}.cycles.cycleFrom` | `subscription.billingSettings.additionalFees.${number}.origin.appId` | `subscription.billingSettings.additionalFees.${number}.origin.entityId` | `subscription.billingSettings.shippingCharges.amount` | `subscription.billingSettings.shippingCharges.discounts` | `subscription.billingSettings.shippingCharges.discounts.${number}.amount` | `subscription.billingSettings.shippingCharges.discounts.${number}.percentage` | `subscription.billingSettings.shippingCharges.discounts.${number}.cycles.cycleFrom` | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.appId` | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.entityId` | `subscription.billingSettings.discounts` | `subscription.billingSettings.externalCollectionDetails.collectorName` | `subscription.billingStatus.currentCycle` | `subscription.billingStatus.latestPaymentData.invoiceId` | `subscription.billingStatus.latestPaymentData.paymentStatus` | `subscription.billingStatus.latestPaymentData.totals.totalPrice` | `subscription.billingStatus.latestPaymentData.totals.subtotal` | `subscription.billingStatus.gracePeriodData.automaticRetryData.enabled` | `subscription.policies.customerCanCancel` | `subscription.policies.businessCanExtend` | `subscription.policies.allowEndOfCycleCancellation` | `subscription.pauseInfo.pausePolicy` | `subscription.pauseInfo.pauseAt` | `subscription.pauseInfo.resumeAt` | `subscription.cancellationInfo.initiator` | `subscription.pendingUpdateData.itemsToUpdate` | `subscription.pendingUpdateData.itemsToUpdate.${number}._id` | `subscription.pendingUpdateData.itemsToUpdate.${number}.pricingModel.fixedPrice.itemPrice` | `subscription.pendingUpdateData.itemsToAdd` | `subscription.pendingUpdateData.itemsToAdd.${number}.name` | `subscription.pendingUpdateData.itemsToAdd.${number}.catalogReference.catalogItemId` | `subscription.pendingUpdateData.itemsToAdd.${number}.category` | `subscription.pendingUpdateData.itemsToAdd.${number}.quantity` | `subscription.pendingUpdateData.itemsToAdd.${number}.applicationFee.amount` | `subscription.pendingUpdateData.itemsToDelete` | `subscription.pendingUpdateData.numberOfRequests` | `subscription.items`, 8>>;
|
|
4467
4150
|
/**
|
|
4468
4151
|
* Identity must be a site member and customer subscription belongs to
|
|
4469
4152
|
* @public
|
|
@@ -4471,8 +4154,10 @@ export declare function customerGetSubscription(_id: string): Promise<GetSubscri
|
|
|
4471
4154
|
* @requiredField _id
|
|
4472
4155
|
* @fqn com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.CancelSubscription
|
|
4473
4156
|
*/
|
|
4474
|
-
|
|
4475
|
-
|
|
4157
|
+
declare function customerCancelSubscription(_id: string, options?: CustomerCancelSubscriptionOptions): Promise<NonNullablePaths<CustomerCancelSubscriptionResponse, `subscription.name` | `subscription.customer.visitorId` | `subscription.customer.contactId` | `subscription.customer.memberId` | `subscription.customer.accountId` | `subscription.status` | `subscription.billingSettings.currency` | `subscription.billingSettings.paymentMethod._id` | `subscription.billingSettings.collectionMethod` | `subscription.billingSettings.cycleDuration.unit` | `subscription.billingSettings.cycleAutoRenew` | `subscription.billingSettings.billingAddress.address.streetAddress.number` | `subscription.billingSettings.billingAddress.address.streetAddress.name` | `subscription.billingSettings.taxSettings.inclusive` | `subscription.billingSettings.additionalFees` | `subscription.billingSettings.additionalFees.${number}.name` | `subscription.billingSettings.additionalFees.${number}.amount` | `subscription.billingSettings.additionalFees.${number}.trigger` | `subscription.billingSettings.additionalFees.${number}.tax.amount` | `subscription.billingSettings.additionalFees.${number}.tax.percentage` | `subscription.billingSettings.additionalFees.${number}.tax.dynamic.taxableAddressType` | `subscription.billingSettings.additionalFees.${number}.cycles.cycleFrom` | `subscription.billingSettings.additionalFees.${number}.origin.appId` | `subscription.billingSettings.additionalFees.${number}.origin.entityId` | `subscription.billingSettings.shippingCharges.amount` | `subscription.billingSettings.shippingCharges.discounts` | `subscription.billingSettings.shippingCharges.discounts.${number}.amount` | `subscription.billingSettings.shippingCharges.discounts.${number}.percentage` | `subscription.billingSettings.shippingCharges.discounts.${number}.cycles.cycleFrom` | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.appId` | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.entityId` | `subscription.billingSettings.discounts` | `subscription.billingSettings.externalCollectionDetails.collectorName` | `subscription.billingStatus.currentCycle` | `subscription.billingStatus.latestPaymentData.invoiceId` | `subscription.billingStatus.latestPaymentData.paymentStatus` | `subscription.billingStatus.latestPaymentData.totals.totalPrice` | `subscription.billingStatus.latestPaymentData.totals.subtotal` | `subscription.billingStatus.gracePeriodData.automaticRetryData.enabled` | `subscription.policies.customerCanCancel` | `subscription.policies.businessCanExtend` | `subscription.policies.allowEndOfCycleCancellation` | `subscription.pauseInfo.pausePolicy` | `subscription.pauseInfo.pauseAt` | `subscription.pauseInfo.resumeAt` | `subscription.cancellationInfo.initiator` | `subscription.pendingUpdateData.itemsToUpdate` | `subscription.pendingUpdateData.itemsToUpdate.${number}._id` | `subscription.pendingUpdateData.itemsToUpdate.${number}.pricingModel.fixedPrice.itemPrice` | `subscription.pendingUpdateData.itemsToAdd` | `subscription.pendingUpdateData.itemsToAdd.${number}.name` | `subscription.pendingUpdateData.itemsToAdd.${number}.catalogReference.catalogItemId` | `subscription.pendingUpdateData.itemsToAdd.${number}.category` | `subscription.pendingUpdateData.itemsToAdd.${number}.quantity` | `subscription.pendingUpdateData.itemsToAdd.${number}.applicationFee.amount` | `subscription.pendingUpdateData.itemsToDelete` | `subscription.pendingUpdateData.numberOfRequests` | `subscription.items`, 8> & {
|
|
4158
|
+
__applicationErrorsType?: CustomerCancelSubscriptionApplicationErrors;
|
|
4159
|
+
}>;
|
|
4160
|
+
interface CustomerCancelSubscriptionOptions {
|
|
4476
4161
|
/** Optional action reason message */
|
|
4477
4162
|
reason?: string | null;
|
|
4478
4163
|
}
|
|
@@ -4483,8 +4168,10 @@ export interface CustomerCancelSubscriptionOptions {
|
|
|
4483
4168
|
* @requiredField _id
|
|
4484
4169
|
* @fqn com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.TurnOnSubscriptionAutoRenewal
|
|
4485
4170
|
*/
|
|
4486
|
-
|
|
4487
|
-
|
|
4171
|
+
declare function customerTurnOnSubscriptionAutoRenewal(_id: string, options?: CustomerTurnOnSubscriptionAutoRenewalOptions): Promise<NonNullablePaths<CustomerTurnOnAutoRenewalResponse, `subscription.name` | `subscription.customer.visitorId` | `subscription.customer.contactId` | `subscription.customer.memberId` | `subscription.customer.accountId` | `subscription.status` | `subscription.billingSettings.currency` | `subscription.billingSettings.paymentMethod._id` | `subscription.billingSettings.collectionMethod` | `subscription.billingSettings.cycleDuration.unit` | `subscription.billingSettings.cycleAutoRenew` | `subscription.billingSettings.billingAddress.address.streetAddress.number` | `subscription.billingSettings.billingAddress.address.streetAddress.name` | `subscription.billingSettings.taxSettings.inclusive` | `subscription.billingSettings.additionalFees` | `subscription.billingSettings.additionalFees.${number}.name` | `subscription.billingSettings.additionalFees.${number}.amount` | `subscription.billingSettings.additionalFees.${number}.trigger` | `subscription.billingSettings.additionalFees.${number}.tax.amount` | `subscription.billingSettings.additionalFees.${number}.tax.percentage` | `subscription.billingSettings.additionalFees.${number}.tax.dynamic.taxableAddressType` | `subscription.billingSettings.additionalFees.${number}.cycles.cycleFrom` | `subscription.billingSettings.additionalFees.${number}.origin.appId` | `subscription.billingSettings.additionalFees.${number}.origin.entityId` | `subscription.billingSettings.shippingCharges.amount` | `subscription.billingSettings.shippingCharges.discounts` | `subscription.billingSettings.shippingCharges.discounts.${number}.amount` | `subscription.billingSettings.shippingCharges.discounts.${number}.percentage` | `subscription.billingSettings.shippingCharges.discounts.${number}.cycles.cycleFrom` | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.appId` | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.entityId` | `subscription.billingSettings.discounts` | `subscription.billingSettings.externalCollectionDetails.collectorName` | `subscription.billingStatus.currentCycle` | `subscription.billingStatus.latestPaymentData.invoiceId` | `subscription.billingStatus.latestPaymentData.paymentStatus` | `subscription.billingStatus.latestPaymentData.totals.totalPrice` | `subscription.billingStatus.latestPaymentData.totals.subtotal` | `subscription.billingStatus.gracePeriodData.automaticRetryData.enabled` | `subscription.policies.customerCanCancel` | `subscription.policies.businessCanExtend` | `subscription.policies.allowEndOfCycleCancellation` | `subscription.pauseInfo.pausePolicy` | `subscription.pauseInfo.pauseAt` | `subscription.pauseInfo.resumeAt` | `subscription.cancellationInfo.initiator` | `subscription.pendingUpdateData.itemsToUpdate` | `subscription.pendingUpdateData.itemsToUpdate.${number}._id` | `subscription.pendingUpdateData.itemsToUpdate.${number}.pricingModel.fixedPrice.itemPrice` | `subscription.pendingUpdateData.itemsToAdd` | `subscription.pendingUpdateData.itemsToAdd.${number}.name` | `subscription.pendingUpdateData.itemsToAdd.${number}.catalogReference.catalogItemId` | `subscription.pendingUpdateData.itemsToAdd.${number}.category` | `subscription.pendingUpdateData.itemsToAdd.${number}.quantity` | `subscription.pendingUpdateData.itemsToAdd.${number}.applicationFee.amount` | `subscription.pendingUpdateData.itemsToDelete` | `subscription.pendingUpdateData.numberOfRequests` | `subscription.items`, 8> & {
|
|
4172
|
+
__applicationErrorsType?: CustomerTurnOnSubscriptionAutoRenewalApplicationErrors;
|
|
4173
|
+
}>;
|
|
4174
|
+
interface CustomerTurnOnSubscriptionAutoRenewalOptions {
|
|
4488
4175
|
/** Optional action reason message */
|
|
4489
4176
|
reason?: string | null;
|
|
4490
4177
|
}
|
|
@@ -4495,8 +4182,10 @@ export interface CustomerTurnOnSubscriptionAutoRenewalOptions {
|
|
|
4495
4182
|
* @requiredField _id
|
|
4496
4183
|
* @fqn com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.TurnOffSubscriptionAutoRenewal
|
|
4497
4184
|
*/
|
|
4498
|
-
|
|
4499
|
-
|
|
4185
|
+
declare function customerTurnOffSubscriptionAutoRenewal(_id: string, options?: CustomerTurnOffSubscriptionAutoRenewalOptions): Promise<NonNullablePaths<CustomerTurnOffAutoRenewalResponse, `subscription.name` | `subscription.customer.visitorId` | `subscription.customer.contactId` | `subscription.customer.memberId` | `subscription.customer.accountId` | `subscription.status` | `subscription.billingSettings.currency` | `subscription.billingSettings.paymentMethod._id` | `subscription.billingSettings.collectionMethod` | `subscription.billingSettings.cycleDuration.unit` | `subscription.billingSettings.cycleAutoRenew` | `subscription.billingSettings.billingAddress.address.streetAddress.number` | `subscription.billingSettings.billingAddress.address.streetAddress.name` | `subscription.billingSettings.taxSettings.inclusive` | `subscription.billingSettings.additionalFees` | `subscription.billingSettings.additionalFees.${number}.name` | `subscription.billingSettings.additionalFees.${number}.amount` | `subscription.billingSettings.additionalFees.${number}.trigger` | `subscription.billingSettings.additionalFees.${number}.tax.amount` | `subscription.billingSettings.additionalFees.${number}.tax.percentage` | `subscription.billingSettings.additionalFees.${number}.tax.dynamic.taxableAddressType` | `subscription.billingSettings.additionalFees.${number}.cycles.cycleFrom` | `subscription.billingSettings.additionalFees.${number}.origin.appId` | `subscription.billingSettings.additionalFees.${number}.origin.entityId` | `subscription.billingSettings.shippingCharges.amount` | `subscription.billingSettings.shippingCharges.discounts` | `subscription.billingSettings.shippingCharges.discounts.${number}.amount` | `subscription.billingSettings.shippingCharges.discounts.${number}.percentage` | `subscription.billingSettings.shippingCharges.discounts.${number}.cycles.cycleFrom` | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.appId` | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.entityId` | `subscription.billingSettings.discounts` | `subscription.billingSettings.externalCollectionDetails.collectorName` | `subscription.billingStatus.currentCycle` | `subscription.billingStatus.latestPaymentData.invoiceId` | `subscription.billingStatus.latestPaymentData.paymentStatus` | `subscription.billingStatus.latestPaymentData.totals.totalPrice` | `subscription.billingStatus.latestPaymentData.totals.subtotal` | `subscription.billingStatus.gracePeriodData.automaticRetryData.enabled` | `subscription.policies.customerCanCancel` | `subscription.policies.businessCanExtend` | `subscription.policies.allowEndOfCycleCancellation` | `subscription.pauseInfo.pausePolicy` | `subscription.pauseInfo.pauseAt` | `subscription.pauseInfo.resumeAt` | `subscription.cancellationInfo.initiator` | `subscription.pendingUpdateData.itemsToUpdate` | `subscription.pendingUpdateData.itemsToUpdate.${number}._id` | `subscription.pendingUpdateData.itemsToUpdate.${number}.pricingModel.fixedPrice.itemPrice` | `subscription.pendingUpdateData.itemsToAdd` | `subscription.pendingUpdateData.itemsToAdd.${number}.name` | `subscription.pendingUpdateData.itemsToAdd.${number}.catalogReference.catalogItemId` | `subscription.pendingUpdateData.itemsToAdd.${number}.category` | `subscription.pendingUpdateData.itemsToAdd.${number}.quantity` | `subscription.pendingUpdateData.itemsToAdd.${number}.applicationFee.amount` | `subscription.pendingUpdateData.itemsToDelete` | `subscription.pendingUpdateData.numberOfRequests` | `subscription.items`, 8> & {
|
|
4186
|
+
__applicationErrorsType?: CustomerTurnOffSubscriptionAutoRenewalApplicationErrors;
|
|
4187
|
+
}>;
|
|
4188
|
+
interface CustomerTurnOffSubscriptionAutoRenewalOptions {
|
|
4500
4189
|
/** Optional action reason message */
|
|
4501
4190
|
reason?: string | null;
|
|
4502
4191
|
}
|
|
@@ -4507,8 +4196,10 @@ export interface CustomerTurnOffSubscriptionAutoRenewalOptions {
|
|
|
4507
4196
|
* @requiredField options.billingCyclesToAdd
|
|
4508
4197
|
* @fqn com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.ExtendSubscription
|
|
4509
4198
|
*/
|
|
4510
|
-
|
|
4511
|
-
|
|
4199
|
+
declare function customerExtendSubscription(_id: string, options?: NonNullablePaths<CustomerExtendSubscriptionOptions, `billingCyclesToAdd`, 2>): Promise<NonNullablePaths<CustomerExtendSubscriptionResponse, `subscription.name` | `subscription.customer.visitorId` | `subscription.customer.contactId` | `subscription.customer.memberId` | `subscription.customer.accountId` | `subscription.status` | `subscription.billingSettings.currency` | `subscription.billingSettings.paymentMethod._id` | `subscription.billingSettings.collectionMethod` | `subscription.billingSettings.cycleDuration.unit` | `subscription.billingSettings.cycleAutoRenew` | `subscription.billingSettings.billingAddress.address.streetAddress.number` | `subscription.billingSettings.billingAddress.address.streetAddress.name` | `subscription.billingSettings.taxSettings.inclusive` | `subscription.billingSettings.additionalFees` | `subscription.billingSettings.additionalFees.${number}.name` | `subscription.billingSettings.additionalFees.${number}.amount` | `subscription.billingSettings.additionalFees.${number}.trigger` | `subscription.billingSettings.additionalFees.${number}.tax.amount` | `subscription.billingSettings.additionalFees.${number}.tax.percentage` | `subscription.billingSettings.additionalFees.${number}.tax.dynamic.taxableAddressType` | `subscription.billingSettings.additionalFees.${number}.cycles.cycleFrom` | `subscription.billingSettings.additionalFees.${number}.origin.appId` | `subscription.billingSettings.additionalFees.${number}.origin.entityId` | `subscription.billingSettings.shippingCharges.amount` | `subscription.billingSettings.shippingCharges.discounts` | `subscription.billingSettings.shippingCharges.discounts.${number}.amount` | `subscription.billingSettings.shippingCharges.discounts.${number}.percentage` | `subscription.billingSettings.shippingCharges.discounts.${number}.cycles.cycleFrom` | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.appId` | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.entityId` | `subscription.billingSettings.discounts` | `subscription.billingSettings.externalCollectionDetails.collectorName` | `subscription.billingStatus.currentCycle` | `subscription.billingStatus.latestPaymentData.invoiceId` | `subscription.billingStatus.latestPaymentData.paymentStatus` | `subscription.billingStatus.latestPaymentData.totals.totalPrice` | `subscription.billingStatus.latestPaymentData.totals.subtotal` | `subscription.billingStatus.gracePeriodData.automaticRetryData.enabled` | `subscription.policies.customerCanCancel` | `subscription.policies.businessCanExtend` | `subscription.policies.allowEndOfCycleCancellation` | `subscription.pauseInfo.pausePolicy` | `subscription.pauseInfo.pauseAt` | `subscription.pauseInfo.resumeAt` | `subscription.cancellationInfo.initiator` | `subscription.pendingUpdateData.itemsToUpdate` | `subscription.pendingUpdateData.itemsToUpdate.${number}._id` | `subscription.pendingUpdateData.itemsToUpdate.${number}.pricingModel.fixedPrice.itemPrice` | `subscription.pendingUpdateData.itemsToAdd` | `subscription.pendingUpdateData.itemsToAdd.${number}.name` | `subscription.pendingUpdateData.itemsToAdd.${number}.catalogReference.catalogItemId` | `subscription.pendingUpdateData.itemsToAdd.${number}.category` | `subscription.pendingUpdateData.itemsToAdd.${number}.quantity` | `subscription.pendingUpdateData.itemsToAdd.${number}.applicationFee.amount` | `subscription.pendingUpdateData.itemsToDelete` | `subscription.pendingUpdateData.numberOfRequests` | `subscription.items`, 8> & {
|
|
4200
|
+
__applicationErrorsType?: CustomerExtendSubscriptionApplicationErrors;
|
|
4201
|
+
}>;
|
|
4202
|
+
interface CustomerExtendSubscriptionOptions {
|
|
4512
4203
|
/** Optional action reason message */
|
|
4513
4204
|
reason?: string | null;
|
|
4514
4205
|
/**
|
|
@@ -4523,8 +4214,8 @@ export interface CustomerExtendSubscriptionOptions {
|
|
|
4523
4214
|
* @documentationMaturity preview
|
|
4524
4215
|
* @fqn com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.QuerySubscriptions
|
|
4525
4216
|
*/
|
|
4526
|
-
|
|
4527
|
-
|
|
4217
|
+
declare function customerQuerySubscriptions(options?: CustomerQuerySubscriptionsOptions): Promise<NonNullablePaths<QuerySubscriptionsResponse, `subscriptions` | `subscriptions.${number}.name` | `subscriptions.${number}.customer.visitorId` | `subscriptions.${number}.customer.contactId` | `subscriptions.${number}.customer.memberId` | `subscriptions.${number}.customer.accountId` | `subscriptions.${number}.status` | `subscriptions.${number}.billingSettings.currency` | `subscriptions.${number}.billingSettings.paymentMethod._id` | `subscriptions.${number}.billingSettings.collectionMethod` | `subscriptions.${number}.billingSettings.cycleDuration.unit` | `subscriptions.${number}.billingSettings.cycleAutoRenew` | `subscriptions.${number}.billingSettings.taxSettings.inclusive` | `subscriptions.${number}.billingSettings.shippingCharges.amount` | `subscriptions.${number}.billingSettings.externalCollectionDetails.collectorName` | `subscriptions.${number}.billingStatus.currentCycle` | `subscriptions.${number}.billingStatus.latestPaymentData.invoiceId` | `subscriptions.${number}.billingStatus.latestPaymentData.paymentStatus` | `subscriptions.${number}.policies.customerCanCancel` | `subscriptions.${number}.policies.businessCanExtend` | `subscriptions.${number}.policies.allowEndOfCycleCancellation` | `subscriptions.${number}.pauseInfo.pausePolicy` | `subscriptions.${number}.pauseInfo.pauseAt` | `subscriptions.${number}.pauseInfo.resumeAt` | `subscriptions.${number}.cancellationInfo.initiator` | `subscriptions.${number}.pendingUpdateData.numberOfRequests`, 6>>;
|
|
4218
|
+
interface CustomerQuerySubscriptionsOptions {
|
|
4528
4219
|
query?: QueryV2;
|
|
4529
4220
|
}
|
|
4530
4221
|
/**
|
|
@@ -4537,13 +4228,13 @@ export interface CustomerQuerySubscriptionsOptions {
|
|
|
4537
4228
|
* @requiredField paymentMethodId
|
|
4538
4229
|
* @fqn com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.UpdateSubscriptionPaymentMethod
|
|
4539
4230
|
*/
|
|
4540
|
-
|
|
4231
|
+
declare function customerUpdateSubscriptionPaymentMethod(_id: string, paymentMethodId: string): Promise<NonNullablePaths<UpdateSubscriptionPaymentMethodResponse, `subscription.name` | `subscription.customer.visitorId` | `subscription.customer.contactId` | `subscription.customer.memberId` | `subscription.customer.accountId` | `subscription.status` | `subscription.billingSettings.currency` | `subscription.billingSettings.paymentMethod._id` | `subscription.billingSettings.collectionMethod` | `subscription.billingSettings.cycleDuration.unit` | `subscription.billingSettings.cycleAutoRenew` | `subscription.billingSettings.billingAddress.address.streetAddress.number` | `subscription.billingSettings.billingAddress.address.streetAddress.name` | `subscription.billingSettings.taxSettings.inclusive` | `subscription.billingSettings.additionalFees` | `subscription.billingSettings.additionalFees.${number}.name` | `subscription.billingSettings.additionalFees.${number}.amount` | `subscription.billingSettings.additionalFees.${number}.trigger` | `subscription.billingSettings.additionalFees.${number}.tax.amount` | `subscription.billingSettings.additionalFees.${number}.tax.percentage` | `subscription.billingSettings.additionalFees.${number}.tax.dynamic.taxableAddressType` | `subscription.billingSettings.additionalFees.${number}.cycles.cycleFrom` | `subscription.billingSettings.additionalFees.${number}.origin.appId` | `subscription.billingSettings.additionalFees.${number}.origin.entityId` | `subscription.billingSettings.shippingCharges.amount` | `subscription.billingSettings.shippingCharges.discounts` | `subscription.billingSettings.shippingCharges.discounts.${number}.amount` | `subscription.billingSettings.shippingCharges.discounts.${number}.percentage` | `subscription.billingSettings.shippingCharges.discounts.${number}.cycles.cycleFrom` | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.appId` | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.entityId` | `subscription.billingSettings.discounts` | `subscription.billingSettings.externalCollectionDetails.collectorName` | `subscription.billingStatus.currentCycle` | `subscription.billingStatus.latestPaymentData.invoiceId` | `subscription.billingStatus.latestPaymentData.paymentStatus` | `subscription.billingStatus.latestPaymentData.totals.totalPrice` | `subscription.billingStatus.latestPaymentData.totals.subtotal` | `subscription.billingStatus.gracePeriodData.automaticRetryData.enabled` | `subscription.policies.customerCanCancel` | `subscription.policies.businessCanExtend` | `subscription.policies.allowEndOfCycleCancellation` | `subscription.pauseInfo.pausePolicy` | `subscription.pauseInfo.pauseAt` | `subscription.pauseInfo.resumeAt` | `subscription.cancellationInfo.initiator` | `subscription.pendingUpdateData.itemsToUpdate` | `subscription.pendingUpdateData.itemsToUpdate.${number}._id` | `subscription.pendingUpdateData.itemsToUpdate.${number}.pricingModel.fixedPrice.itemPrice` | `subscription.pendingUpdateData.itemsToAdd` | `subscription.pendingUpdateData.itemsToAdd.${number}.name` | `subscription.pendingUpdateData.itemsToAdd.${number}.catalogReference.catalogItemId` | `subscription.pendingUpdateData.itemsToAdd.${number}.category` | `subscription.pendingUpdateData.itemsToAdd.${number}.quantity` | `subscription.pendingUpdateData.itemsToAdd.${number}.applicationFee.amount` | `subscription.pendingUpdateData.itemsToDelete` | `subscription.pendingUpdateData.numberOfRequests` | `subscription.items`, 8>>;
|
|
4541
4232
|
/** @public
|
|
4542
4233
|
* @documentationMaturity preview
|
|
4543
4234
|
* @requiredField _id
|
|
4544
4235
|
* @fqn com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.AllowedActions
|
|
4545
4236
|
*/
|
|
4546
|
-
|
|
4237
|
+
declare function customerAllowedActions(_id: string): Promise<NonNullablePaths<CustomerAllowedActionsResponse, `actions` | `actions.${number}.actionType`, 4>>;
|
|
4547
4238
|
/**
|
|
4548
4239
|
* List future subscriptions charges.
|
|
4549
4240
|
* @param _id - Subscription id upcoming charge to be previewed for
|
|
@@ -4552,7 +4243,7 @@ export declare function customerAllowedActions(_id: string): Promise<CustomerAll
|
|
|
4552
4243
|
* @requiredField _id
|
|
4553
4244
|
* @fqn com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.ListUpcomingCharges
|
|
4554
4245
|
*/
|
|
4555
|
-
|
|
4246
|
+
declare function customerListUpcomingCharges(_id: string): Promise<NonNullablePaths<CustomerListUpcomingChargesResponse, `upcomingCharge.cycle` | `upcomingCharge.totals.totalPrice` | `upcomingCharge.totals.subtotal` | `upcomingCharge.invoiceItems` | `upcomingCharge.invoiceItems.${number}.recurring.cycleNumber` | `upcomingCharge.invoiceItems.${number}._id` | `upcomingCharge.invoiceItems.${number}.name` | `upcomingCharge.invoiceItems.${number}.catalogReference.catalogItemId` | `upcomingCharge.invoiceItems.${number}.category` | `upcomingCharge.invoiceItems.${number}.quantity` | `upcomingCharge.invoiceItems.${number}.priceDetails.price` | `upcomingCharge.invoiceItems.${number}.priceDetails.tax.amount` | `upcomingCharge.invoiceItems.${number}.priceDetails.tax.percentage` | `upcomingCharge.invoiceItems.${number}.priceDetails.discount.amount` | `upcomingCharge.invoiceItems.${number}.priceDetails.discount.percentage` | `upcomingCharge.invoiceItems.${number}.priceDetails.applicationFeeDetails.amount` | `upcomingCharge.invoiceItems.${number}.taxData.lineItemTaxSummary.aggregatedTaxAmount` | `upcomingCharge.invoiceItems.${number}.taxData.lineItemTaxSummary.aggregatedTaxRate` | `upcomingCharge.invoiceItems.${number}.taxData.lineItemTaxSummary.taxableAmount`, 7>>;
|
|
4556
4247
|
/**
|
|
4557
4248
|
* Creates auto-charge order that can be paid by customer
|
|
4558
4249
|
* @public
|
|
@@ -4560,9 +4251,9 @@ export declare function customerListUpcomingCharges(_id: string): Promise<Custom
|
|
|
4560
4251
|
* @requiredField _id
|
|
4561
4252
|
* @fqn com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.InitiatePaymentMethodSetup
|
|
4562
4253
|
*/
|
|
4563
|
-
|
|
4564
|
-
|
|
4565
|
-
paymentMode?:
|
|
4254
|
+
declare function customerInitiatePaymentMethodSetup(_id: string, options?: CustomerInitiatePaymentMethodSetupOptions): Promise<NonNullablePaths<InitiatePaymentMethodSetupResponse, `paymentOrderId`, 2>>;
|
|
4255
|
+
interface CustomerInitiatePaymentMethodSetupOptions {
|
|
4256
|
+
paymentMode?: PaymentModeWithLiterals;
|
|
4566
4257
|
paymentSettings?: PaymentSettings;
|
|
4567
4258
|
}
|
|
4568
4259
|
/**
|
|
@@ -4573,9 +4264,9 @@ export interface CustomerInitiatePaymentMethodSetupOptions {
|
|
|
4573
4264
|
* @requiredField subscriptionId
|
|
4574
4265
|
* @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsBackOfficeService.PayCycle
|
|
4575
4266
|
*/
|
|
4576
|
-
|
|
4577
|
-
|
|
4578
|
-
paymentTestMode?:
|
|
4267
|
+
declare function payCycle(subscriptionId: string, options?: NonNullablePaths<PayCycleOptions, `tenantId`, 2>): Promise<NonNullablePaths<PayCycleResponse, `invoiceId` | `subscription.name` | `subscription.customer.visitorId` | `subscription.customer.contactId` | `subscription.customer.memberId` | `subscription.customer.accountId` | `subscription.status` | `subscription.billingSettings.currency` | `subscription.billingSettings.paymentMethod._id` | `subscription.billingSettings.collectionMethod` | `subscription.billingSettings.cycleDuration.unit` | `subscription.billingSettings.cycleAutoRenew` | `subscription.billingSettings.billingAddress.address.streetAddress.number` | `subscription.billingSettings.billingAddress.address.streetAddress.name` | `subscription.billingSettings.taxSettings.inclusive` | `subscription.billingSettings.additionalFees` | `subscription.billingSettings.additionalFees.${number}.name` | `subscription.billingSettings.additionalFees.${number}.amount` | `subscription.billingSettings.additionalFees.${number}.trigger` | `subscription.billingSettings.additionalFees.${number}.tax.amount` | `subscription.billingSettings.additionalFees.${number}.tax.percentage` | `subscription.billingSettings.additionalFees.${number}.tax.dynamic.taxableAddressType` | `subscription.billingSettings.additionalFees.${number}.cycles.cycleFrom` | `subscription.billingSettings.additionalFees.${number}.origin.appId` | `subscription.billingSettings.additionalFees.${number}.origin.entityId` | `subscription.billingSettings.shippingCharges.amount` | `subscription.billingSettings.shippingCharges.discounts` | `subscription.billingSettings.shippingCharges.discounts.${number}.amount` | `subscription.billingSettings.shippingCharges.discounts.${number}.percentage` | `subscription.billingSettings.shippingCharges.discounts.${number}.cycles.cycleFrom` | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.appId` | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.entityId` | `subscription.billingSettings.discounts` | `subscription.billingSettings.externalCollectionDetails.collectorName` | `subscription.billingStatus.currentCycle` | `subscription.billingStatus.latestPaymentData.invoiceId` | `subscription.billingStatus.latestPaymentData.paymentStatus` | `subscription.billingStatus.latestPaymentData.totals.totalPrice` | `subscription.billingStatus.latestPaymentData.totals.subtotal` | `subscription.billingStatus.gracePeriodData.automaticRetryData.enabled` | `subscription.policies.customerCanCancel` | `subscription.policies.businessCanExtend` | `subscription.policies.allowEndOfCycleCancellation` | `subscription.pauseInfo.pausePolicy` | `subscription.pauseInfo.pauseAt` | `subscription.pauseInfo.resumeAt` | `subscription.cancellationInfo.initiator` | `subscription.pendingUpdateData.itemsToUpdate` | `subscription.pendingUpdateData.itemsToUpdate.${number}._id` | `subscription.pendingUpdateData.itemsToUpdate.${number}.pricingModel.fixedPrice.itemPrice` | `subscription.pendingUpdateData.itemsToAdd` | `subscription.pendingUpdateData.itemsToAdd.${number}.name` | `subscription.pendingUpdateData.itemsToAdd.${number}.catalogReference.catalogItemId` | `subscription.pendingUpdateData.itemsToAdd.${number}.category` | `subscription.pendingUpdateData.itemsToAdd.${number}.quantity` | `subscription.pendingUpdateData.itemsToAdd.${number}.applicationFee.amount` | `subscription.pendingUpdateData.itemsToDelete` | `subscription.pendingUpdateData.numberOfRequests` | `subscription.items`, 8>>;
|
|
4268
|
+
interface PayCycleOptions {
|
|
4269
|
+
paymentTestMode?: PaymentTestModeWithLiterals;
|
|
4579
4270
|
/** @format GUID */
|
|
4580
4271
|
tenantId: string;
|
|
4581
4272
|
}
|
|
@@ -4585,12 +4276,10 @@ export interface PayCycleOptions {
|
|
|
4585
4276
|
* @documentationMaturity preview
|
|
4586
4277
|
* @requiredField _id
|
|
4587
4278
|
* @permissionId subscriptions.view
|
|
4588
|
-
* @permissionScope Manage Events
|
|
4589
|
-
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
4590
4279
|
* @applicableIdentity APP
|
|
4591
4280
|
* @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.GetSubscription
|
|
4592
4281
|
*/
|
|
4593
|
-
|
|
4282
|
+
declare function getSubscription(_id: string): Promise<NonNullablePaths<GetSubscriptionResponse, `subscription.name` | `subscription.customer.visitorId` | `subscription.customer.contactId` | `subscription.customer.memberId` | `subscription.customer.accountId` | `subscription.status` | `subscription.billingSettings.currency` | `subscription.billingSettings.paymentMethod._id` | `subscription.billingSettings.collectionMethod` | `subscription.billingSettings.cycleDuration.unit` | `subscription.billingSettings.cycleAutoRenew` | `subscription.billingSettings.billingAddress.address.streetAddress.number` | `subscription.billingSettings.billingAddress.address.streetAddress.name` | `subscription.billingSettings.taxSettings.inclusive` | `subscription.billingSettings.additionalFees` | `subscription.billingSettings.additionalFees.${number}.name` | `subscription.billingSettings.additionalFees.${number}.amount` | `subscription.billingSettings.additionalFees.${number}.trigger` | `subscription.billingSettings.additionalFees.${number}.tax.amount` | `subscription.billingSettings.additionalFees.${number}.tax.percentage` | `subscription.billingSettings.additionalFees.${number}.tax.dynamic.taxableAddressType` | `subscription.billingSettings.additionalFees.${number}.cycles.cycleFrom` | `subscription.billingSettings.additionalFees.${number}.origin.appId` | `subscription.billingSettings.additionalFees.${number}.origin.entityId` | `subscription.billingSettings.shippingCharges.amount` | `subscription.billingSettings.shippingCharges.discounts` | `subscription.billingSettings.shippingCharges.discounts.${number}.amount` | `subscription.billingSettings.shippingCharges.discounts.${number}.percentage` | `subscription.billingSettings.shippingCharges.discounts.${number}.cycles.cycleFrom` | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.appId` | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.entityId` | `subscription.billingSettings.discounts` | `subscription.billingSettings.externalCollectionDetails.collectorName` | `subscription.billingStatus.currentCycle` | `subscription.billingStatus.latestPaymentData.invoiceId` | `subscription.billingStatus.latestPaymentData.paymentStatus` | `subscription.billingStatus.latestPaymentData.totals.totalPrice` | `subscription.billingStatus.latestPaymentData.totals.subtotal` | `subscription.billingStatus.gracePeriodData.automaticRetryData.enabled` | `subscription.policies.customerCanCancel` | `subscription.policies.businessCanExtend` | `subscription.policies.allowEndOfCycleCancellation` | `subscription.pauseInfo.pausePolicy` | `subscription.pauseInfo.pauseAt` | `subscription.pauseInfo.resumeAt` | `subscription.cancellationInfo.initiator` | `subscription.pendingUpdateData.itemsToUpdate` | `subscription.pendingUpdateData.itemsToUpdate.${number}._id` | `subscription.pendingUpdateData.itemsToUpdate.${number}.pricingModel.fixedPrice.itemPrice` | `subscription.pendingUpdateData.itemsToAdd` | `subscription.pendingUpdateData.itemsToAdd.${number}.name` | `subscription.pendingUpdateData.itemsToAdd.${number}.catalogReference.catalogItemId` | `subscription.pendingUpdateData.itemsToAdd.${number}.category` | `subscription.pendingUpdateData.itemsToAdd.${number}.quantity` | `subscription.pendingUpdateData.itemsToAdd.${number}.applicationFee.amount` | `subscription.pendingUpdateData.itemsToDelete` | `subscription.pendingUpdateData.numberOfRequests` | `subscription.items`, 8>>;
|
|
4594
4283
|
/**
|
|
4595
4284
|
* Update subscription's payment method.
|
|
4596
4285
|
* Supported only for recurring subscriptions or one time subscriptions during free trial.
|
|
@@ -4600,12 +4289,10 @@ export declare function getSubscription(_id: string): Promise<GetSubscriptionRes
|
|
|
4600
4289
|
* @requiredField _id
|
|
4601
4290
|
* @requiredField paymentMethodId
|
|
4602
4291
|
* @permissionId subscriptions.manage
|
|
4603
|
-
* @permissionScope Manage Orders
|
|
4604
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
4605
4292
|
* @applicableIdentity APP
|
|
4606
4293
|
* @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.UpdateSubscriptionPaymentMethod
|
|
4607
4294
|
*/
|
|
4608
|
-
|
|
4295
|
+
declare function updateSubscriptionPaymentMethod(_id: string, paymentMethodId: string): Promise<NonNullablePaths<UpdateSubscriptionPaymentMethodResponse, `subscription.name` | `subscription.customer.visitorId` | `subscription.customer.contactId` | `subscription.customer.memberId` | `subscription.customer.accountId` | `subscription.status` | `subscription.billingSettings.currency` | `subscription.billingSettings.paymentMethod._id` | `subscription.billingSettings.collectionMethod` | `subscription.billingSettings.cycleDuration.unit` | `subscription.billingSettings.cycleAutoRenew` | `subscription.billingSettings.billingAddress.address.streetAddress.number` | `subscription.billingSettings.billingAddress.address.streetAddress.name` | `subscription.billingSettings.taxSettings.inclusive` | `subscription.billingSettings.additionalFees` | `subscription.billingSettings.additionalFees.${number}.name` | `subscription.billingSettings.additionalFees.${number}.amount` | `subscription.billingSettings.additionalFees.${number}.trigger` | `subscription.billingSettings.additionalFees.${number}.tax.amount` | `subscription.billingSettings.additionalFees.${number}.tax.percentage` | `subscription.billingSettings.additionalFees.${number}.tax.dynamic.taxableAddressType` | `subscription.billingSettings.additionalFees.${number}.cycles.cycleFrom` | `subscription.billingSettings.additionalFees.${number}.origin.appId` | `subscription.billingSettings.additionalFees.${number}.origin.entityId` | `subscription.billingSettings.shippingCharges.amount` | `subscription.billingSettings.shippingCharges.discounts` | `subscription.billingSettings.shippingCharges.discounts.${number}.amount` | `subscription.billingSettings.shippingCharges.discounts.${number}.percentage` | `subscription.billingSettings.shippingCharges.discounts.${number}.cycles.cycleFrom` | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.appId` | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.entityId` | `subscription.billingSettings.discounts` | `subscription.billingSettings.externalCollectionDetails.collectorName` | `subscription.billingStatus.currentCycle` | `subscription.billingStatus.latestPaymentData.invoiceId` | `subscription.billingStatus.latestPaymentData.paymentStatus` | `subscription.billingStatus.latestPaymentData.totals.totalPrice` | `subscription.billingStatus.latestPaymentData.totals.subtotal` | `subscription.billingStatus.gracePeriodData.automaticRetryData.enabled` | `subscription.policies.customerCanCancel` | `subscription.policies.businessCanExtend` | `subscription.policies.allowEndOfCycleCancellation` | `subscription.pauseInfo.pausePolicy` | `subscription.pauseInfo.pauseAt` | `subscription.pauseInfo.resumeAt` | `subscription.cancellationInfo.initiator` | `subscription.pendingUpdateData.itemsToUpdate` | `subscription.pendingUpdateData.itemsToUpdate.${number}._id` | `subscription.pendingUpdateData.itemsToUpdate.${number}.pricingModel.fixedPrice.itemPrice` | `subscription.pendingUpdateData.itemsToAdd` | `subscription.pendingUpdateData.itemsToAdd.${number}.name` | `subscription.pendingUpdateData.itemsToAdd.${number}.catalogReference.catalogItemId` | `subscription.pendingUpdateData.itemsToAdd.${number}.category` | `subscription.pendingUpdateData.itemsToAdd.${number}.quantity` | `subscription.pendingUpdateData.itemsToAdd.${number}.applicationFee.amount` | `subscription.pendingUpdateData.itemsToDelete` | `subscription.pendingUpdateData.numberOfRequests` | `subscription.items`, 8>>;
|
|
4609
4296
|
/**
|
|
4610
4297
|
* Updates the next billing date for a subscription.
|
|
4611
4298
|
*
|
|
@@ -4625,13 +4312,13 @@ export declare function updateSubscriptionPaymentMethod(_id: string, paymentMeth
|
|
|
4625
4312
|
* @requiredField _id
|
|
4626
4313
|
* @requiredField billingDate
|
|
4627
4314
|
* @permissionId subscriptions.manage
|
|
4628
|
-
* @permissionScope Manage Orders
|
|
4629
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
4630
4315
|
* @applicableIdentity APP
|
|
4631
4316
|
* @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.UpdateSubscriptionBillingDate
|
|
4632
4317
|
*/
|
|
4633
|
-
|
|
4634
|
-
|
|
4318
|
+
declare function updateSubscriptionBillingDate(_id: string, billingDate: Date, options?: UpdateSubscriptionBillingDateOptions): Promise<NonNullablePaths<UpdateSubscriptionBillingDateResponse, `subscription.name` | `subscription.customer.visitorId` | `subscription.customer.contactId` | `subscription.customer.memberId` | `subscription.customer.accountId` | `subscription.status` | `subscription.billingSettings.currency` | `subscription.billingSettings.paymentMethod._id` | `subscription.billingSettings.collectionMethod` | `subscription.billingSettings.cycleDuration.unit` | `subscription.billingSettings.cycleAutoRenew` | `subscription.billingSettings.billingAddress.address.streetAddress.number` | `subscription.billingSettings.billingAddress.address.streetAddress.name` | `subscription.billingSettings.taxSettings.inclusive` | `subscription.billingSettings.additionalFees` | `subscription.billingSettings.additionalFees.${number}.name` | `subscription.billingSettings.additionalFees.${number}.amount` | `subscription.billingSettings.additionalFees.${number}.trigger` | `subscription.billingSettings.additionalFees.${number}.tax.amount` | `subscription.billingSettings.additionalFees.${number}.tax.percentage` | `subscription.billingSettings.additionalFees.${number}.tax.dynamic.taxableAddressType` | `subscription.billingSettings.additionalFees.${number}.cycles.cycleFrom` | `subscription.billingSettings.additionalFees.${number}.origin.appId` | `subscription.billingSettings.additionalFees.${number}.origin.entityId` | `subscription.billingSettings.shippingCharges.amount` | `subscription.billingSettings.shippingCharges.discounts` | `subscription.billingSettings.shippingCharges.discounts.${number}.amount` | `subscription.billingSettings.shippingCharges.discounts.${number}.percentage` | `subscription.billingSettings.shippingCharges.discounts.${number}.cycles.cycleFrom` | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.appId` | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.entityId` | `subscription.billingSettings.discounts` | `subscription.billingSettings.externalCollectionDetails.collectorName` | `subscription.billingStatus.currentCycle` | `subscription.billingStatus.latestPaymentData.invoiceId` | `subscription.billingStatus.latestPaymentData.paymentStatus` | `subscription.billingStatus.latestPaymentData.totals.totalPrice` | `subscription.billingStatus.latestPaymentData.totals.subtotal` | `subscription.billingStatus.gracePeriodData.automaticRetryData.enabled` | `subscription.policies.customerCanCancel` | `subscription.policies.businessCanExtend` | `subscription.policies.allowEndOfCycleCancellation` | `subscription.pauseInfo.pausePolicy` | `subscription.pauseInfo.pauseAt` | `subscription.pauseInfo.resumeAt` | `subscription.cancellationInfo.initiator` | `subscription.pendingUpdateData.itemsToUpdate` | `subscription.pendingUpdateData.itemsToUpdate.${number}._id` | `subscription.pendingUpdateData.itemsToUpdate.${number}.pricingModel.fixedPrice.itemPrice` | `subscription.pendingUpdateData.itemsToAdd` | `subscription.pendingUpdateData.itemsToAdd.${number}.name` | `subscription.pendingUpdateData.itemsToAdd.${number}.catalogReference.catalogItemId` | `subscription.pendingUpdateData.itemsToAdd.${number}.category` | `subscription.pendingUpdateData.itemsToAdd.${number}.quantity` | `subscription.pendingUpdateData.itemsToAdd.${number}.applicationFee.amount` | `subscription.pendingUpdateData.itemsToDelete` | `subscription.pendingUpdateData.numberOfRequests` | `subscription.items`, 8> & {
|
|
4319
|
+
__applicationErrorsType?: UpdateSubscriptionBillingDateApplicationErrors;
|
|
4320
|
+
}>;
|
|
4321
|
+
interface UpdateSubscriptionBillingDateOptions {
|
|
4635
4322
|
/**
|
|
4636
4323
|
* Information about how BASS adjusts the total of the next invoice. Extending
|
|
4637
4324
|
* the current billing cycle results in a higher payment, while shortening it
|
|
@@ -4651,12 +4338,12 @@ export interface UpdateSubscriptionBillingDateOptions {
|
|
|
4651
4338
|
* @requiredField _id
|
|
4652
4339
|
* @requiredField actionContext
|
|
4653
4340
|
* @permissionId subscriptions.manage
|
|
4654
|
-
* @permissionScope Manage Orders
|
|
4655
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
4656
4341
|
* @applicableIdentity APP
|
|
4657
4342
|
* @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.CancelSubscription
|
|
4658
4343
|
*/
|
|
4659
|
-
|
|
4344
|
+
declare function cancelSubscription(_id: string, actionContext: ActionContext): Promise<NonNullablePaths<CancelSubscriptionResponse, `subscription.name` | `subscription.customer.visitorId` | `subscription.customer.contactId` | `subscription.customer.memberId` | `subscription.customer.accountId` | `subscription.status` | `subscription.billingSettings.currency` | `subscription.billingSettings.paymentMethod._id` | `subscription.billingSettings.collectionMethod` | `subscription.billingSettings.cycleDuration.unit` | `subscription.billingSettings.cycleAutoRenew` | `subscription.billingSettings.billingAddress.address.streetAddress.number` | `subscription.billingSettings.billingAddress.address.streetAddress.name` | `subscription.billingSettings.taxSettings.inclusive` | `subscription.billingSettings.additionalFees` | `subscription.billingSettings.additionalFees.${number}.name` | `subscription.billingSettings.additionalFees.${number}.amount` | `subscription.billingSettings.additionalFees.${number}.trigger` | `subscription.billingSettings.additionalFees.${number}.tax.amount` | `subscription.billingSettings.additionalFees.${number}.tax.percentage` | `subscription.billingSettings.additionalFees.${number}.tax.dynamic.taxableAddressType` | `subscription.billingSettings.additionalFees.${number}.cycles.cycleFrom` | `subscription.billingSettings.additionalFees.${number}.origin.appId` | `subscription.billingSettings.additionalFees.${number}.origin.entityId` | `subscription.billingSettings.shippingCharges.amount` | `subscription.billingSettings.shippingCharges.discounts` | `subscription.billingSettings.shippingCharges.discounts.${number}.amount` | `subscription.billingSettings.shippingCharges.discounts.${number}.percentage` | `subscription.billingSettings.shippingCharges.discounts.${number}.cycles.cycleFrom` | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.appId` | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.entityId` | `subscription.billingSettings.discounts` | `subscription.billingSettings.externalCollectionDetails.collectorName` | `subscription.billingStatus.currentCycle` | `subscription.billingStatus.latestPaymentData.invoiceId` | `subscription.billingStatus.latestPaymentData.paymentStatus` | `subscription.billingStatus.latestPaymentData.totals.totalPrice` | `subscription.billingStatus.latestPaymentData.totals.subtotal` | `subscription.billingStatus.gracePeriodData.automaticRetryData.enabled` | `subscription.policies.customerCanCancel` | `subscription.policies.businessCanExtend` | `subscription.policies.allowEndOfCycleCancellation` | `subscription.pauseInfo.pausePolicy` | `subscription.pauseInfo.pauseAt` | `subscription.pauseInfo.resumeAt` | `subscription.cancellationInfo.initiator` | `subscription.pendingUpdateData.itemsToUpdate` | `subscription.pendingUpdateData.itemsToUpdate.${number}._id` | `subscription.pendingUpdateData.itemsToUpdate.${number}.pricingModel.fixedPrice.itemPrice` | `subscription.pendingUpdateData.itemsToAdd` | `subscription.pendingUpdateData.itemsToAdd.${number}.name` | `subscription.pendingUpdateData.itemsToAdd.${number}.catalogReference.catalogItemId` | `subscription.pendingUpdateData.itemsToAdd.${number}.category` | `subscription.pendingUpdateData.itemsToAdd.${number}.quantity` | `subscription.pendingUpdateData.itemsToAdd.${number}.applicationFee.amount` | `subscription.pendingUpdateData.itemsToDelete` | `subscription.pendingUpdateData.numberOfRequests` | `subscription.items`, 8> & {
|
|
4345
|
+
__applicationErrorsType?: CancelSubscriptionApplicationErrors;
|
|
4346
|
+
}>;
|
|
4660
4347
|
/**
|
|
4661
4348
|
* Pauses subscription now or in future. Possible to pause also payments schedule.
|
|
4662
4349
|
* @public
|
|
@@ -4664,15 +4351,15 @@ export declare function cancelSubscription(_id: string, actionContext: ActionCon
|
|
|
4664
4351
|
* @requiredField _id
|
|
4665
4352
|
* @requiredField options.actionContext
|
|
4666
4353
|
* @permissionId subscriptions.manage
|
|
4667
|
-
* @permissionScope Manage Orders
|
|
4668
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
4669
4354
|
* @applicableIdentity APP
|
|
4670
4355
|
* @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.PauseSubscription
|
|
4671
4356
|
*/
|
|
4672
|
-
|
|
4673
|
-
|
|
4674
|
-
|
|
4675
|
-
|
|
4357
|
+
declare function pauseSubscription(_id: string, options?: NonNullablePaths<PauseSubscriptionOptions, `actionContext`, 2>): Promise<NonNullablePaths<PauseSubscriptionResponse, `subscription.name` | `subscription.customer.visitorId` | `subscription.customer.contactId` | `subscription.customer.memberId` | `subscription.customer.accountId` | `subscription.status` | `subscription.billingSettings.currency` | `subscription.billingSettings.paymentMethod._id` | `subscription.billingSettings.collectionMethod` | `subscription.billingSettings.cycleDuration.unit` | `subscription.billingSettings.cycleAutoRenew` | `subscription.billingSettings.billingAddress.address.streetAddress.number` | `subscription.billingSettings.billingAddress.address.streetAddress.name` | `subscription.billingSettings.taxSettings.inclusive` | `subscription.billingSettings.additionalFees` | `subscription.billingSettings.additionalFees.${number}.name` | `subscription.billingSettings.additionalFees.${number}.amount` | `subscription.billingSettings.additionalFees.${number}.trigger` | `subscription.billingSettings.additionalFees.${number}.tax.amount` | `subscription.billingSettings.additionalFees.${number}.tax.percentage` | `subscription.billingSettings.additionalFees.${number}.tax.dynamic.taxableAddressType` | `subscription.billingSettings.additionalFees.${number}.cycles.cycleFrom` | `subscription.billingSettings.additionalFees.${number}.origin.appId` | `subscription.billingSettings.additionalFees.${number}.origin.entityId` | `subscription.billingSettings.shippingCharges.amount` | `subscription.billingSettings.shippingCharges.discounts` | `subscription.billingSettings.shippingCharges.discounts.${number}.amount` | `subscription.billingSettings.shippingCharges.discounts.${number}.percentage` | `subscription.billingSettings.shippingCharges.discounts.${number}.cycles.cycleFrom` | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.appId` | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.entityId` | `subscription.billingSettings.discounts` | `subscription.billingSettings.externalCollectionDetails.collectorName` | `subscription.billingStatus.currentCycle` | `subscription.billingStatus.latestPaymentData.invoiceId` | `subscription.billingStatus.latestPaymentData.paymentStatus` | `subscription.billingStatus.latestPaymentData.totals.totalPrice` | `subscription.billingStatus.latestPaymentData.totals.subtotal` | `subscription.billingStatus.gracePeriodData.automaticRetryData.enabled` | `subscription.policies.customerCanCancel` | `subscription.policies.businessCanExtend` | `subscription.policies.allowEndOfCycleCancellation` | `subscription.pauseInfo.pausePolicy` | `subscription.pauseInfo.pauseAt` | `subscription.pauseInfo.resumeAt` | `subscription.cancellationInfo.initiator` | `subscription.pendingUpdateData.itemsToUpdate` | `subscription.pendingUpdateData.itemsToUpdate.${number}._id` | `subscription.pendingUpdateData.itemsToUpdate.${number}.pricingModel.fixedPrice.itemPrice` | `subscription.pendingUpdateData.itemsToAdd` | `subscription.pendingUpdateData.itemsToAdd.${number}.name` | `subscription.pendingUpdateData.itemsToAdd.${number}.catalogReference.catalogItemId` | `subscription.pendingUpdateData.itemsToAdd.${number}.category` | `subscription.pendingUpdateData.itemsToAdd.${number}.quantity` | `subscription.pendingUpdateData.itemsToAdd.${number}.applicationFee.amount` | `subscription.pendingUpdateData.itemsToDelete` | `subscription.pendingUpdateData.numberOfRequests` | `subscription.items`, 8> & {
|
|
4358
|
+
__applicationErrorsType?: PauseSubscriptionApplicationErrors;
|
|
4359
|
+
}>;
|
|
4360
|
+
interface PauseSubscriptionOptions {
|
|
4361
|
+
pausePolicy?: PausePolicyWithLiterals;
|
|
4362
|
+
pauseAt?: PauseAtWithLiterals;
|
|
4676
4363
|
/** contains additional scheduling information for certain pause_at options (for example: SPECIFIC_DATE & NUMBER_OF_CYCLES_FROM_TODAY) */
|
|
4677
4364
|
pauseAtSchedule?: ScheduleAdditionalInfo;
|
|
4678
4365
|
/** contains additional scheduling information for certain auto_resume_at either specific date */
|
|
@@ -4686,14 +4373,14 @@ export interface PauseSubscriptionOptions {
|
|
|
4686
4373
|
* @requiredField _id
|
|
4687
4374
|
* @requiredField options.actionContext
|
|
4688
4375
|
* @permissionId subscriptions.manage
|
|
4689
|
-
* @permissionScope Manage Orders
|
|
4690
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
4691
4376
|
* @applicableIdentity APP
|
|
4692
4377
|
* @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.ResumeSubscription
|
|
4693
4378
|
*/
|
|
4694
|
-
|
|
4695
|
-
|
|
4696
|
-
|
|
4379
|
+
declare function resumeSubscription(_id: string, options?: NonNullablePaths<ResumeSubscriptionOptions, `actionContext`, 2>): Promise<NonNullablePaths<ResumeSubscriptionResponse, `subscription.name` | `subscription.customer.visitorId` | `subscription.customer.contactId` | `subscription.customer.memberId` | `subscription.customer.accountId` | `subscription.status` | `subscription.billingSettings.currency` | `subscription.billingSettings.paymentMethod._id` | `subscription.billingSettings.collectionMethod` | `subscription.billingSettings.cycleDuration.unit` | `subscription.billingSettings.cycleAutoRenew` | `subscription.billingSettings.billingAddress.address.streetAddress.number` | `subscription.billingSettings.billingAddress.address.streetAddress.name` | `subscription.billingSettings.taxSettings.inclusive` | `subscription.billingSettings.additionalFees` | `subscription.billingSettings.additionalFees.${number}.name` | `subscription.billingSettings.additionalFees.${number}.amount` | `subscription.billingSettings.additionalFees.${number}.trigger` | `subscription.billingSettings.additionalFees.${number}.tax.amount` | `subscription.billingSettings.additionalFees.${number}.tax.percentage` | `subscription.billingSettings.additionalFees.${number}.tax.dynamic.taxableAddressType` | `subscription.billingSettings.additionalFees.${number}.cycles.cycleFrom` | `subscription.billingSettings.additionalFees.${number}.origin.appId` | `subscription.billingSettings.additionalFees.${number}.origin.entityId` | `subscription.billingSettings.shippingCharges.amount` | `subscription.billingSettings.shippingCharges.discounts` | `subscription.billingSettings.shippingCharges.discounts.${number}.amount` | `subscription.billingSettings.shippingCharges.discounts.${number}.percentage` | `subscription.billingSettings.shippingCharges.discounts.${number}.cycles.cycleFrom` | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.appId` | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.entityId` | `subscription.billingSettings.discounts` | `subscription.billingSettings.externalCollectionDetails.collectorName` | `subscription.billingStatus.currentCycle` | `subscription.billingStatus.latestPaymentData.invoiceId` | `subscription.billingStatus.latestPaymentData.paymentStatus` | `subscription.billingStatus.latestPaymentData.totals.totalPrice` | `subscription.billingStatus.latestPaymentData.totals.subtotal` | `subscription.billingStatus.gracePeriodData.automaticRetryData.enabled` | `subscription.policies.customerCanCancel` | `subscription.policies.businessCanExtend` | `subscription.policies.allowEndOfCycleCancellation` | `subscription.pauseInfo.pausePolicy` | `subscription.pauseInfo.pauseAt` | `subscription.pauseInfo.resumeAt` | `subscription.cancellationInfo.initiator` | `subscription.pendingUpdateData.itemsToUpdate` | `subscription.pendingUpdateData.itemsToUpdate.${number}._id` | `subscription.pendingUpdateData.itemsToUpdate.${number}.pricingModel.fixedPrice.itemPrice` | `subscription.pendingUpdateData.itemsToAdd` | `subscription.pendingUpdateData.itemsToAdd.${number}.name` | `subscription.pendingUpdateData.itemsToAdd.${number}.catalogReference.catalogItemId` | `subscription.pendingUpdateData.itemsToAdd.${number}.category` | `subscription.pendingUpdateData.itemsToAdd.${number}.quantity` | `subscription.pendingUpdateData.itemsToAdd.${number}.applicationFee.amount` | `subscription.pendingUpdateData.itemsToDelete` | `subscription.pendingUpdateData.numberOfRequests` | `subscription.items`, 8> & {
|
|
4380
|
+
__applicationErrorsType?: ResumeSubscriptionApplicationErrors;
|
|
4381
|
+
}>;
|
|
4382
|
+
interface ResumeSubscriptionOptions {
|
|
4383
|
+
resumeAt?: ResumeAtWithLiterals;
|
|
4697
4384
|
/** contains additional scheduling information for certain resume_at options (for example: SPECIFIC_DATE) */
|
|
4698
4385
|
resumeAtSchedule?: ScheduleAdditionalInfo;
|
|
4699
4386
|
actionContext: ActionContext;
|
|
@@ -4705,22 +4392,18 @@ export interface ResumeSubscriptionOptions {
|
|
|
4705
4392
|
* @documentationMaturity preview
|
|
4706
4393
|
* @requiredField query
|
|
4707
4394
|
* @permissionId subscriptions.view
|
|
4708
|
-
* @permissionScope Manage Events
|
|
4709
|
-
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
4710
4395
|
* @applicableIdentity APP
|
|
4711
4396
|
* @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.QuerySubscriptions
|
|
4712
4397
|
*/
|
|
4713
|
-
|
|
4398
|
+
declare function querySubscriptions(query: QueryV2): Promise<NonNullablePaths<QuerySubscriptionsResponse, `subscriptions` | `subscriptions.${number}.name` | `subscriptions.${number}.customer.visitorId` | `subscriptions.${number}.customer.contactId` | `subscriptions.${number}.customer.memberId` | `subscriptions.${number}.customer.accountId` | `subscriptions.${number}.status` | `subscriptions.${number}.billingSettings.currency` | `subscriptions.${number}.billingSettings.paymentMethod._id` | `subscriptions.${number}.billingSettings.collectionMethod` | `subscriptions.${number}.billingSettings.cycleDuration.unit` | `subscriptions.${number}.billingSettings.cycleAutoRenew` | `subscriptions.${number}.billingSettings.taxSettings.inclusive` | `subscriptions.${number}.billingSettings.shippingCharges.amount` | `subscriptions.${number}.billingSettings.externalCollectionDetails.collectorName` | `subscriptions.${number}.billingStatus.currentCycle` | `subscriptions.${number}.billingStatus.latestPaymentData.invoiceId` | `subscriptions.${number}.billingStatus.latestPaymentData.paymentStatus` | `subscriptions.${number}.policies.customerCanCancel` | `subscriptions.${number}.policies.businessCanExtend` | `subscriptions.${number}.policies.allowEndOfCycleCancellation` | `subscriptions.${number}.pauseInfo.pausePolicy` | `subscriptions.${number}.pauseInfo.pauseAt` | `subscriptions.${number}.pauseInfo.resumeAt` | `subscriptions.${number}.cancellationInfo.initiator` | `subscriptions.${number}.pendingUpdateData.numberOfRequests`, 6>>;
|
|
4714
4399
|
/** @public
|
|
4715
4400
|
* @documentationMaturity preview
|
|
4716
4401
|
* @permissionId subscriptions.view
|
|
4717
|
-
* @permissionScope Manage Events
|
|
4718
|
-
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
4719
4402
|
* @applicableIdentity APP
|
|
4720
4403
|
* @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.SearchSubscriptions
|
|
4721
4404
|
*/
|
|
4722
|
-
|
|
4723
|
-
|
|
4405
|
+
declare function searchSubscriptions(options?: SearchSubscriptionsOptions): Promise<NonNullablePaths<SearchSubscriptionsResponse, `subscriptions` | `subscriptions.${number}.name` | `subscriptions.${number}.customer.visitorId` | `subscriptions.${number}.customer.contactId` | `subscriptions.${number}.customer.memberId` | `subscriptions.${number}.customer.accountId` | `subscriptions.${number}.status` | `subscriptions.${number}.billingSettings.currency` | `subscriptions.${number}.billingSettings.paymentMethod._id` | `subscriptions.${number}.billingSettings.collectionMethod` | `subscriptions.${number}.billingSettings.cycleDuration.unit` | `subscriptions.${number}.billingSettings.cycleAutoRenew` | `subscriptions.${number}.billingSettings.taxSettings.inclusive` | `subscriptions.${number}.billingSettings.shippingCharges.amount` | `subscriptions.${number}.billingSettings.externalCollectionDetails.collectorName` | `subscriptions.${number}.billingStatus.currentCycle` | `subscriptions.${number}.billingStatus.latestPaymentData.invoiceId` | `subscriptions.${number}.billingStatus.latestPaymentData.paymentStatus` | `subscriptions.${number}.policies.customerCanCancel` | `subscriptions.${number}.policies.businessCanExtend` | `subscriptions.${number}.policies.allowEndOfCycleCancellation` | `subscriptions.${number}.pauseInfo.pausePolicy` | `subscriptions.${number}.pauseInfo.pauseAt` | `subscriptions.${number}.pauseInfo.resumeAt` | `subscriptions.${number}.cancellationInfo.initiator` | `subscriptions.${number}.pendingUpdateData.numberOfRequests`, 6>>;
|
|
4406
|
+
interface SearchSubscriptionsOptions extends SearchSubscriptionsOptionsPagingMethodOneOf {
|
|
4724
4407
|
/** A filter object */
|
|
4725
4408
|
filter?: any;
|
|
4726
4409
|
/** Limit number of results and enable to skip rows. The default limit is 25. */
|
|
@@ -4731,7 +4414,7 @@ export interface SearchSubscriptionsOptions extends SearchSubscriptionsOptionsPa
|
|
|
4731
4414
|
sorting?: SortingClauses;
|
|
4732
4415
|
}
|
|
4733
4416
|
/** @oneof */
|
|
4734
|
-
|
|
4417
|
+
interface SearchSubscriptionsOptionsPagingMethodOneOf {
|
|
4735
4418
|
/** Limit number of results and enable to skip rows. The default limit is 25. */
|
|
4736
4419
|
paging?: Paging;
|
|
4737
4420
|
/** A Cursor option for efficient paging. Pass this field from the previous search response to continue to the next page. */
|
|
@@ -4754,13 +4437,11 @@ export interface SearchSubscriptionsOptionsPagingMethodOneOf {
|
|
|
4754
4437
|
* @public
|
|
4755
4438
|
* @documentationMaturity preview
|
|
4756
4439
|
* @permissionId subscriptions.view
|
|
4757
|
-
* @permissionScope Manage Events
|
|
4758
|
-
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
4759
4440
|
* @applicableIdentity APP
|
|
4760
4441
|
* @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.CountSubscriptions
|
|
4761
4442
|
*/
|
|
4762
|
-
|
|
4763
|
-
|
|
4443
|
+
declare function countSubscriptions(options?: CountSubscriptionsOptions): Promise<NonNullablePaths<CountSubscriptionsResponse, `countByStatus` | `countByStatus.${number}.status` | `countByStatus.${number}.count` | `total`, 4>>;
|
|
4444
|
+
interface CountSubscriptionsOptions {
|
|
4764
4445
|
/** Filters to specify which subscriptions are counted. */
|
|
4765
4446
|
filter?: CountSubscriptionFilter;
|
|
4766
4447
|
}
|
|
@@ -4773,12 +4454,12 @@ export interface CountSubscriptionsOptions {
|
|
|
4773
4454
|
* @requiredField _id
|
|
4774
4455
|
* @requiredField actionContext
|
|
4775
4456
|
* @permissionId subscriptions.manage
|
|
4776
|
-
* @permissionScope Manage Orders
|
|
4777
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
4778
4457
|
* @applicableIdentity APP
|
|
4779
4458
|
* @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.TurnOnSubscriptionAutoRenewal
|
|
4780
4459
|
*/
|
|
4781
|
-
|
|
4460
|
+
declare function turnOnSubscriptionAutoRenewal(_id: string, actionContext: ActionContext): Promise<NonNullablePaths<TurnOnSubscriptionAutoRenewalResponse, `subscription.name` | `subscription.customer.visitorId` | `subscription.customer.contactId` | `subscription.customer.memberId` | `subscription.customer.accountId` | `subscription.status` | `subscription.billingSettings.currency` | `subscription.billingSettings.paymentMethod._id` | `subscription.billingSettings.collectionMethod` | `subscription.billingSettings.cycleDuration.unit` | `subscription.billingSettings.cycleAutoRenew` | `subscription.billingSettings.billingAddress.address.streetAddress.number` | `subscription.billingSettings.billingAddress.address.streetAddress.name` | `subscription.billingSettings.taxSettings.inclusive` | `subscription.billingSettings.additionalFees` | `subscription.billingSettings.additionalFees.${number}.name` | `subscription.billingSettings.additionalFees.${number}.amount` | `subscription.billingSettings.additionalFees.${number}.trigger` | `subscription.billingSettings.additionalFees.${number}.tax.amount` | `subscription.billingSettings.additionalFees.${number}.tax.percentage` | `subscription.billingSettings.additionalFees.${number}.tax.dynamic.taxableAddressType` | `subscription.billingSettings.additionalFees.${number}.cycles.cycleFrom` | `subscription.billingSettings.additionalFees.${number}.origin.appId` | `subscription.billingSettings.additionalFees.${number}.origin.entityId` | `subscription.billingSettings.shippingCharges.amount` | `subscription.billingSettings.shippingCharges.discounts` | `subscription.billingSettings.shippingCharges.discounts.${number}.amount` | `subscription.billingSettings.shippingCharges.discounts.${number}.percentage` | `subscription.billingSettings.shippingCharges.discounts.${number}.cycles.cycleFrom` | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.appId` | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.entityId` | `subscription.billingSettings.discounts` | `subscription.billingSettings.externalCollectionDetails.collectorName` | `subscription.billingStatus.currentCycle` | `subscription.billingStatus.latestPaymentData.invoiceId` | `subscription.billingStatus.latestPaymentData.paymentStatus` | `subscription.billingStatus.latestPaymentData.totals.totalPrice` | `subscription.billingStatus.latestPaymentData.totals.subtotal` | `subscription.billingStatus.gracePeriodData.automaticRetryData.enabled` | `subscription.policies.customerCanCancel` | `subscription.policies.businessCanExtend` | `subscription.policies.allowEndOfCycleCancellation` | `subscription.pauseInfo.pausePolicy` | `subscription.pauseInfo.pauseAt` | `subscription.pauseInfo.resumeAt` | `subscription.cancellationInfo.initiator` | `subscription.pendingUpdateData.itemsToUpdate` | `subscription.pendingUpdateData.itemsToUpdate.${number}._id` | `subscription.pendingUpdateData.itemsToUpdate.${number}.pricingModel.fixedPrice.itemPrice` | `subscription.pendingUpdateData.itemsToAdd` | `subscription.pendingUpdateData.itemsToAdd.${number}.name` | `subscription.pendingUpdateData.itemsToAdd.${number}.catalogReference.catalogItemId` | `subscription.pendingUpdateData.itemsToAdd.${number}.category` | `subscription.pendingUpdateData.itemsToAdd.${number}.quantity` | `subscription.pendingUpdateData.itemsToAdd.${number}.applicationFee.amount` | `subscription.pendingUpdateData.itemsToDelete` | `subscription.pendingUpdateData.numberOfRequests` | `subscription.items`, 8> & {
|
|
4461
|
+
__applicationErrorsType?: TurnOnSubscriptionAutoRenewalApplicationErrors;
|
|
4462
|
+
}>;
|
|
4782
4463
|
/**
|
|
4783
4464
|
* Turn off auto-renew of subscription. At next billing date subscription will be canceled.
|
|
4784
4465
|
* Billing settings flag cycle_auto_renew is set to false and information about this operation stored
|
|
@@ -4788,12 +4469,12 @@ export declare function turnOnSubscriptionAutoRenewal(_id: string, actionContext
|
|
|
4788
4469
|
* @requiredField _id
|
|
4789
4470
|
* @requiredField actionContext
|
|
4790
4471
|
* @permissionId subscriptions.manage
|
|
4791
|
-
* @permissionScope Manage Orders
|
|
4792
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
4793
4472
|
* @applicableIdentity APP
|
|
4794
4473
|
* @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.TurnOffSubscriptionAutoRenewal
|
|
4795
4474
|
*/
|
|
4796
|
-
|
|
4475
|
+
declare function turnOffSubscriptionAutoRenewal(_id: string, actionContext: ActionContext): Promise<NonNullablePaths<TurnOffSubscriptionAutoRenewalResponse, `subscription.name` | `subscription.customer.visitorId` | `subscription.customer.contactId` | `subscription.customer.memberId` | `subscription.customer.accountId` | `subscription.status` | `subscription.billingSettings.currency` | `subscription.billingSettings.paymentMethod._id` | `subscription.billingSettings.collectionMethod` | `subscription.billingSettings.cycleDuration.unit` | `subscription.billingSettings.cycleAutoRenew` | `subscription.billingSettings.billingAddress.address.streetAddress.number` | `subscription.billingSettings.billingAddress.address.streetAddress.name` | `subscription.billingSettings.taxSettings.inclusive` | `subscription.billingSettings.additionalFees` | `subscription.billingSettings.additionalFees.${number}.name` | `subscription.billingSettings.additionalFees.${number}.amount` | `subscription.billingSettings.additionalFees.${number}.trigger` | `subscription.billingSettings.additionalFees.${number}.tax.amount` | `subscription.billingSettings.additionalFees.${number}.tax.percentage` | `subscription.billingSettings.additionalFees.${number}.tax.dynamic.taxableAddressType` | `subscription.billingSettings.additionalFees.${number}.cycles.cycleFrom` | `subscription.billingSettings.additionalFees.${number}.origin.appId` | `subscription.billingSettings.additionalFees.${number}.origin.entityId` | `subscription.billingSettings.shippingCharges.amount` | `subscription.billingSettings.shippingCharges.discounts` | `subscription.billingSettings.shippingCharges.discounts.${number}.amount` | `subscription.billingSettings.shippingCharges.discounts.${number}.percentage` | `subscription.billingSettings.shippingCharges.discounts.${number}.cycles.cycleFrom` | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.appId` | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.entityId` | `subscription.billingSettings.discounts` | `subscription.billingSettings.externalCollectionDetails.collectorName` | `subscription.billingStatus.currentCycle` | `subscription.billingStatus.latestPaymentData.invoiceId` | `subscription.billingStatus.latestPaymentData.paymentStatus` | `subscription.billingStatus.latestPaymentData.totals.totalPrice` | `subscription.billingStatus.latestPaymentData.totals.subtotal` | `subscription.billingStatus.gracePeriodData.automaticRetryData.enabled` | `subscription.policies.customerCanCancel` | `subscription.policies.businessCanExtend` | `subscription.policies.allowEndOfCycleCancellation` | `subscription.pauseInfo.pausePolicy` | `subscription.pauseInfo.pauseAt` | `subscription.pauseInfo.resumeAt` | `subscription.cancellationInfo.initiator` | `subscription.pendingUpdateData.itemsToUpdate` | `subscription.pendingUpdateData.itemsToUpdate.${number}._id` | `subscription.pendingUpdateData.itemsToUpdate.${number}.pricingModel.fixedPrice.itemPrice` | `subscription.pendingUpdateData.itemsToAdd` | `subscription.pendingUpdateData.itemsToAdd.${number}.name` | `subscription.pendingUpdateData.itemsToAdd.${number}.catalogReference.catalogItemId` | `subscription.pendingUpdateData.itemsToAdd.${number}.category` | `subscription.pendingUpdateData.itemsToAdd.${number}.quantity` | `subscription.pendingUpdateData.itemsToAdd.${number}.applicationFee.amount` | `subscription.pendingUpdateData.itemsToDelete` | `subscription.pendingUpdateData.numberOfRequests` | `subscription.items`, 8> & {
|
|
4476
|
+
__applicationErrorsType?: TurnOffSubscriptionAutoRenewalApplicationErrors;
|
|
4477
|
+
}>;
|
|
4797
4478
|
/**
|
|
4798
4479
|
* Marks the last invoice as paid used for the following scenarios:
|
|
4799
4480
|
* * Offline subscriptions.
|
|
@@ -4806,40 +4487,16 @@ export declare function turnOffSubscriptionAutoRenewal(_id: string, actionContex
|
|
|
4806
4487
|
* @documentationMaturity preview
|
|
4807
4488
|
* @requiredField subscriptionId
|
|
4808
4489
|
* @permissionId subscriptions.manage
|
|
4809
|
-
* @permissionScope Manage Orders
|
|
4810
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
4811
4490
|
* @applicableIdentity APP
|
|
4812
4491
|
* @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.MarkLatestInvoiceAsPaid
|
|
4813
4492
|
* @deprecated
|
|
4814
4493
|
* @replacedBy com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.MarkInvoiceAsPaid
|
|
4815
4494
|
* @targetRemovalDate 2025-09-30
|
|
4816
4495
|
*/
|
|
4817
|
-
|
|
4818
|
-
|
|
4819
|
-
|
|
4820
|
-
|
|
4821
|
-
* If the invoice contains items other than subscription items, an error will be thrown.
|
|
4822
|
-
*
|
|
4823
|
-
* Marks the invoice as paid for the following scenarios:
|
|
4824
|
-
* 1. Offline subscriptions.
|
|
4825
|
-
* 2. Online subscriptions during the grace period.
|
|
4826
|
-
* This operation will convert the invoice to offline, remove the grace period,
|
|
4827
|
-
* and send a BillingCycleStarted event after the invoice is closed.
|
|
4828
|
-
* 3. Online one-time payment subscriptions with a total price of zero during the purchase flow.
|
|
4829
|
-
* An Activated event will be sent after the invoice is closed, and the subscription will be activated.
|
|
4830
|
-
* 4. For external subscriptions, where the payment occurs outside of BASS, an invoice is created and marked as paid
|
|
4831
|
-
* @param subscriptionId - The ID of the subscription to mark as paid its invoice.
|
|
4832
|
-
* @internal
|
|
4833
|
-
* @documentationMaturity preview
|
|
4834
|
-
* @requiredField subscriptionId
|
|
4835
|
-
* @permissionId subscriptions.manage
|
|
4836
|
-
* @permissionScope Manage Orders
|
|
4837
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
4838
|
-
* @applicableIdentity APP
|
|
4839
|
-
* @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.MarkBillingCycleAsPaid
|
|
4840
|
-
*/
|
|
4841
|
-
export declare function markBillingCycleAsPaid(subscriptionId: string, options?: MarkBillingCycleAsPaidOptions): Promise<MarkBillingCycleAsPaidResponse & MarkBillingCycleAsPaidResponseNonNullableFields>;
|
|
4842
|
-
export interface MarkBillingCycleAsPaidOptions {
|
|
4496
|
+
declare function markLatestInvoiceAsPaid(subscriptionId: string): Promise<NonNullablePaths<MarkLatestInvoiceAsPaidResponse, `subscription.name` | `subscription.customer.visitorId` | `subscription.customer.contactId` | `subscription.customer.memberId` | `subscription.customer.accountId` | `subscription.status` | `subscription.billingSettings.currency` | `subscription.billingSettings.paymentMethod._id` | `subscription.billingSettings.collectionMethod` | `subscription.billingSettings.cycleDuration.unit` | `subscription.billingSettings.cycleAutoRenew` | `subscription.billingSettings.billingAddress.address.streetAddress.number` | `subscription.billingSettings.billingAddress.address.streetAddress.name` | `subscription.billingSettings.taxSettings.inclusive` | `subscription.billingSettings.additionalFees` | `subscription.billingSettings.additionalFees.${number}.name` | `subscription.billingSettings.additionalFees.${number}.amount` | `subscription.billingSettings.additionalFees.${number}.trigger` | `subscription.billingSettings.additionalFees.${number}.tax.amount` | `subscription.billingSettings.additionalFees.${number}.tax.percentage` | `subscription.billingSettings.additionalFees.${number}.tax.dynamic.taxableAddressType` | `subscription.billingSettings.additionalFees.${number}.cycles.cycleFrom` | `subscription.billingSettings.additionalFees.${number}.origin.appId` | `subscription.billingSettings.additionalFees.${number}.origin.entityId` | `subscription.billingSettings.shippingCharges.amount` | `subscription.billingSettings.shippingCharges.discounts` | `subscription.billingSettings.shippingCharges.discounts.${number}.amount` | `subscription.billingSettings.shippingCharges.discounts.${number}.percentage` | `subscription.billingSettings.shippingCharges.discounts.${number}.cycles.cycleFrom` | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.appId` | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.entityId` | `subscription.billingSettings.discounts` | `subscription.billingSettings.externalCollectionDetails.collectorName` | `subscription.billingStatus.currentCycle` | `subscription.billingStatus.latestPaymentData.invoiceId` | `subscription.billingStatus.latestPaymentData.paymentStatus` | `subscription.billingStatus.latestPaymentData.totals.totalPrice` | `subscription.billingStatus.latestPaymentData.totals.subtotal` | `subscription.billingStatus.gracePeriodData.automaticRetryData.enabled` | `subscription.policies.customerCanCancel` | `subscription.policies.businessCanExtend` | `subscription.policies.allowEndOfCycleCancellation` | `subscription.pauseInfo.pausePolicy` | `subscription.pauseInfo.pauseAt` | `subscription.pauseInfo.resumeAt` | `subscription.cancellationInfo.initiator` | `subscription.pendingUpdateData.itemsToUpdate` | `subscription.pendingUpdateData.itemsToUpdate.${number}._id` | `subscription.pendingUpdateData.itemsToUpdate.${number}.pricingModel.fixedPrice.itemPrice` | `subscription.pendingUpdateData.itemsToAdd` | `subscription.pendingUpdateData.itemsToAdd.${number}.name` | `subscription.pendingUpdateData.itemsToAdd.${number}.catalogReference.catalogItemId` | `subscription.pendingUpdateData.itemsToAdd.${number}.category` | `subscription.pendingUpdateData.itemsToAdd.${number}.quantity` | `subscription.pendingUpdateData.itemsToAdd.${number}.applicationFee.amount` | `subscription.pendingUpdateData.itemsToDelete` | `subscription.pendingUpdateData.numberOfRequests` | `subscription.items`, 8> & {
|
|
4497
|
+
__applicationErrorsType?: MarkLatestInvoiceAsPaidApplicationErrors;
|
|
4498
|
+
}>;
|
|
4499
|
+
interface MarkBillingCycleAsPaidOptions {
|
|
4843
4500
|
/**
|
|
4844
4501
|
* The subscription cycle for which the invoice is to be marked as paid.
|
|
4845
4502
|
* If left empty, the most recent cycle will be selected.
|
|
@@ -4852,12 +4509,10 @@ export interface MarkBillingCycleAsPaidOptions {
|
|
|
4852
4509
|
* @public
|
|
4853
4510
|
* @documentationMaturity preview
|
|
4854
4511
|
* @permissionId subscriptions.view
|
|
4855
|
-
* @permissionScope Manage Events
|
|
4856
|
-
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
4857
4512
|
* @applicableIdentity APP
|
|
4858
4513
|
* @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.GetSubscriptionsStats
|
|
4859
4514
|
*/
|
|
4860
|
-
|
|
4515
|
+
declare function getSubscriptionsStats(): Promise<NonNullablePaths<GetSubscriptionsStatsResponse, `amountByStatuses` | `amountByStatuses.${number}.status` | `amountByStatuses.${number}.amount` | `total`, 4>>;
|
|
4861
4516
|
/**
|
|
4862
4517
|
* Extends subscription by moving end date with or without billing cycles addition.
|
|
4863
4518
|
* @param _id - The ID of the subscription to be extended
|
|
@@ -4868,13 +4523,13 @@ export declare function getSubscriptionsStats(): Promise<GetSubscriptionsStatsRe
|
|
|
4868
4523
|
* @requiredField options
|
|
4869
4524
|
* @requiredField options.extendPolicy
|
|
4870
4525
|
* @permissionId subscriptions.manage
|
|
4871
|
-
* @permissionScope Manage Orders
|
|
4872
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
4873
4526
|
* @applicableIdentity APP
|
|
4874
4527
|
* @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.ExtendSubscription
|
|
4875
4528
|
*/
|
|
4876
|
-
|
|
4877
|
-
|
|
4529
|
+
declare function extendSubscription(_id: string, actionContext: ActionContext, options: ExtendSubscriptionOptions): Promise<NonNullablePaths<ExtendSubscriptionResponse, `subscription.name` | `subscription.customer.visitorId` | `subscription.customer.contactId` | `subscription.customer.memberId` | `subscription.customer.accountId` | `subscription.status` | `subscription.billingSettings.currency` | `subscription.billingSettings.paymentMethod._id` | `subscription.billingSettings.collectionMethod` | `subscription.billingSettings.cycleDuration.unit` | `subscription.billingSettings.cycleAutoRenew` | `subscription.billingSettings.billingAddress.address.streetAddress.number` | `subscription.billingSettings.billingAddress.address.streetAddress.name` | `subscription.billingSettings.taxSettings.inclusive` | `subscription.billingSettings.additionalFees` | `subscription.billingSettings.additionalFees.${number}.name` | `subscription.billingSettings.additionalFees.${number}.amount` | `subscription.billingSettings.additionalFees.${number}.trigger` | `subscription.billingSettings.additionalFees.${number}.tax.amount` | `subscription.billingSettings.additionalFees.${number}.tax.percentage` | `subscription.billingSettings.additionalFees.${number}.tax.dynamic.taxableAddressType` | `subscription.billingSettings.additionalFees.${number}.cycles.cycleFrom` | `subscription.billingSettings.additionalFees.${number}.origin.appId` | `subscription.billingSettings.additionalFees.${number}.origin.entityId` | `subscription.billingSettings.shippingCharges.amount` | `subscription.billingSettings.shippingCharges.discounts` | `subscription.billingSettings.shippingCharges.discounts.${number}.amount` | `subscription.billingSettings.shippingCharges.discounts.${number}.percentage` | `subscription.billingSettings.shippingCharges.discounts.${number}.cycles.cycleFrom` | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.appId` | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.entityId` | `subscription.billingSettings.discounts` | `subscription.billingSettings.externalCollectionDetails.collectorName` | `subscription.billingStatus.currentCycle` | `subscription.billingStatus.latestPaymentData.invoiceId` | `subscription.billingStatus.latestPaymentData.paymentStatus` | `subscription.billingStatus.latestPaymentData.totals.totalPrice` | `subscription.billingStatus.latestPaymentData.totals.subtotal` | `subscription.billingStatus.gracePeriodData.automaticRetryData.enabled` | `subscription.policies.customerCanCancel` | `subscription.policies.businessCanExtend` | `subscription.policies.allowEndOfCycleCancellation` | `subscription.pauseInfo.pausePolicy` | `subscription.pauseInfo.pauseAt` | `subscription.pauseInfo.resumeAt` | `subscription.cancellationInfo.initiator` | `subscription.pendingUpdateData.itemsToUpdate` | `subscription.pendingUpdateData.itemsToUpdate.${number}._id` | `subscription.pendingUpdateData.itemsToUpdate.${number}.pricingModel.fixedPrice.itemPrice` | `subscription.pendingUpdateData.itemsToAdd` | `subscription.pendingUpdateData.itemsToAdd.${number}.name` | `subscription.pendingUpdateData.itemsToAdd.${number}.catalogReference.catalogItemId` | `subscription.pendingUpdateData.itemsToAdd.${number}.category` | `subscription.pendingUpdateData.itemsToAdd.${number}.quantity` | `subscription.pendingUpdateData.itemsToAdd.${number}.applicationFee.amount` | `subscription.pendingUpdateData.itemsToDelete` | `subscription.pendingUpdateData.numberOfRequests` | `subscription.items`, 8> & {
|
|
4530
|
+
__applicationErrorsType?: ExtendSubscriptionApplicationErrors;
|
|
4531
|
+
}>;
|
|
4532
|
+
interface ExtendSubscriptionOptions extends ExtendSubscriptionOptionsExtendPolicyOneOf {
|
|
4878
4533
|
/** User won't be charged for additional period added on top of subscription end date. */
|
|
4879
4534
|
extensionPeriod?: Duration;
|
|
4880
4535
|
/**
|
|
@@ -4884,7 +4539,7 @@ export interface ExtendSubscriptionOptions extends ExtendSubscriptionOptionsExte
|
|
|
4884
4539
|
extensionBillingCycles?: number;
|
|
4885
4540
|
}
|
|
4886
4541
|
/** @oneof */
|
|
4887
|
-
|
|
4542
|
+
interface ExtendSubscriptionOptionsExtendPolicyOneOf {
|
|
4888
4543
|
/** User won't be charged for additional period added on top of subscription end date. */
|
|
4889
4544
|
extensionPeriod?: Duration;
|
|
4890
4545
|
/**
|
|
@@ -4897,18 +4552,16 @@ export interface ExtendSubscriptionOptionsExtendPolicyOneOf {
|
|
|
4897
4552
|
* @documentationMaturity preview
|
|
4898
4553
|
* @requiredField _id
|
|
4899
4554
|
* @permissionId subscriptions.manage
|
|
4900
|
-
* @permissionScope Manage Orders
|
|
4901
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
4902
4555
|
* @applicableIdentity APP
|
|
4903
4556
|
* @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.AllowedActions
|
|
4904
4557
|
*/
|
|
4905
|
-
|
|
4906
|
-
|
|
4558
|
+
declare function allowedActions(_id: string, options?: AllowedActionsOptions): Promise<NonNullablePaths<AllowedActionsResponse, `actions` | `actions.${number}.actionType` | `unsupportedActions` | `unsupportedActions.${number}.actionType`, 4>>;
|
|
4559
|
+
interface AllowedActionsOptions {
|
|
4907
4560
|
/**
|
|
4908
4561
|
* List of additional fields to be included in the response.
|
|
4909
4562
|
* @maxSize 1
|
|
4910
4563
|
*/
|
|
4911
|
-
fields?:
|
|
4564
|
+
fields?: RequestedFieldsWithLiterals[];
|
|
4912
4565
|
}
|
|
4913
4566
|
/**
|
|
4914
4567
|
* List future subscriptions charges
|
|
@@ -4917,13 +4570,11 @@ export interface AllowedActionsOptions {
|
|
|
4917
4570
|
* @documentationMaturity preview
|
|
4918
4571
|
* @requiredField subscriptionId
|
|
4919
4572
|
* @permissionId subscriptions.view
|
|
4920
|
-
* @permissionScope Manage Events
|
|
4921
|
-
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
4922
4573
|
* @applicableIdentity APP
|
|
4923
4574
|
* @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.ListUpcomingCharges
|
|
4924
4575
|
*/
|
|
4925
|
-
|
|
4926
|
-
|
|
4576
|
+
declare function listUpcomingCharges(subscriptionId: string, options?: ListUpcomingChargesOptions): Promise<NonNullablePaths<ListUpcomingChargesResponse, `upcomingCharges` | `upcomingCharges.${number}.cycle` | `upcomingCharges.${number}.totals.totalPrice` | `upcomingCharges.${number}.totals.subtotal` | `upcomingCharges.${number}.discount.amount` | `upcomingCharges.${number}.discount.percentage` | `upcomingCharges.${number}.discount.origin.appId` | `upcomingCharges.${number}.discount.origin.entityId`, 6>>;
|
|
4577
|
+
interface ListUpcomingChargesOptions {
|
|
4927
4578
|
/** Period of time to provide charged for. If not provided,then only next charge will be returned. */
|
|
4928
4579
|
customDuration?: Duration;
|
|
4929
4580
|
/**
|
|
@@ -4942,21 +4593,19 @@ export interface ListUpcomingChargesOptions {
|
|
|
4942
4593
|
* @requiredField options.subscription.subscriptionInfo.items
|
|
4943
4594
|
* @requiredField options.subscription.subscriptionInfo.items.pricingModel
|
|
4944
4595
|
* @permissionId subscriptions.view
|
|
4945
|
-
* @permissionScope Manage Events
|
|
4946
|
-
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
4947
4596
|
* @applicableIdentity APP
|
|
4948
4597
|
* @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.PreviewSubscriptionCharges
|
|
4949
4598
|
* @deprecated
|
|
4950
4599
|
* @replacedBy com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.PreviewSubscriptionsCharges
|
|
4951
4600
|
* @targetRemovalDate 2025-06-30
|
|
4952
4601
|
*/
|
|
4953
|
-
|
|
4954
|
-
|
|
4602
|
+
declare function previewSubscriptionCharges(options?: PreviewSubscriptionChargesOptions): Promise<NonNullablePaths<PreviewSubscriptionChargesResponse, `charges` | `charges.${number}.cycleFrom` | `charges.${number}.totals.totalPrice` | `charges.${number}.totals.subtotal`, 5>>;
|
|
4603
|
+
interface PreviewSubscriptionChargesOptions extends PreviewSubscriptionChargesOptionsSubscriptionOneOf {
|
|
4955
4604
|
/** Information about a non-existing subscription. */
|
|
4956
4605
|
subscriptionInfo?: SubscriptionInfo;
|
|
4957
4606
|
}
|
|
4958
4607
|
/** @oneof */
|
|
4959
|
-
|
|
4608
|
+
interface PreviewSubscriptionChargesOptionsSubscriptionOneOf {
|
|
4960
4609
|
/** Information about a non-existing subscription. */
|
|
4961
4610
|
subscriptionInfo?: SubscriptionInfo;
|
|
4962
4611
|
}
|
|
@@ -4966,20 +4615,15 @@ export interface PreviewSubscriptionChargesOptionsSubscriptionOneOf {
|
|
|
4966
4615
|
* @public
|
|
4967
4616
|
* @documentationMaturity preview
|
|
4968
4617
|
* @requiredField options.subscriptionsBillingDetails.billingSettings
|
|
4969
|
-
* @requiredField options.subscriptionsBillingDetails.billingSettings.shippingCharges.tax.value
|
|
4970
4618
|
* @requiredField options.subscriptionsBillingDetails.externalId
|
|
4971
4619
|
* @requiredField options.subscriptionsBillingDetails.items
|
|
4972
4620
|
* @requiredField options.subscriptionsBillingDetails.items.pricingModel
|
|
4973
|
-
* @requiredField options.subscriptionsBillingDetails.items.pricingModel.model
|
|
4974
|
-
* @requiredField options.subscriptionsBillingDetails.items.tax.value
|
|
4975
4621
|
* @permissionId subscriptions.view
|
|
4976
|
-
* @permissionScope Manage Events
|
|
4977
|
-
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
4978
4622
|
* @applicableIdentity APP
|
|
4979
4623
|
* @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.PreviewSubscriptionsCharges
|
|
4980
4624
|
*/
|
|
4981
|
-
|
|
4982
|
-
|
|
4625
|
+
declare function previewSubscriptionsCharges(options?: NonNullablePaths<PreviewSubscriptionsChargesOptions, `subscriptionsBillingDetails.${number}.billingSettings` | `subscriptionsBillingDetails.${number}.externalId` | `subscriptionsBillingDetails.${number}.items` | `subscriptionsBillingDetails.${number}.items.${number}.pricingModel`, 6>): Promise<NonNullablePaths<PreviewSubscriptionsChargesResponse, `subscriptionsCharges`, 2>>;
|
|
4626
|
+
interface PreviewSubscriptionsChargesOptions {
|
|
4983
4627
|
/**
|
|
4984
4628
|
* Information required to calculate the preview charges for the subscriptions, including an identifier.
|
|
4985
4629
|
* @minSize 1
|
|
@@ -5008,30 +4652,27 @@ export interface PreviewSubscriptionsChargesOptions {
|
|
|
5008
4652
|
* @documentationMaturity preview
|
|
5009
4653
|
* @requiredField _id
|
|
5010
4654
|
* @permissionId subscriptions.manage
|
|
5011
|
-
* @permissionScope Manage Orders
|
|
5012
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
5013
4655
|
* @applicableIdentity APP
|
|
5014
4656
|
* @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.InitiatePaymentMethodSetup
|
|
5015
4657
|
*/
|
|
5016
|
-
|
|
5017
|
-
|
|
5018
|
-
paymentMode?:
|
|
4658
|
+
declare function initiatePaymentMethodSetup(_id: string, options?: InitiatePaymentMethodSetupOptions): Promise<NonNullablePaths<InitiatePaymentMethodSetupResponse, `paymentOrderId`, 2>>;
|
|
4659
|
+
interface InitiatePaymentMethodSetupOptions {
|
|
4660
|
+
paymentMode?: PaymentModeWithLiterals;
|
|
5019
4661
|
paymentSettings?: PaymentSettings;
|
|
5020
4662
|
}
|
|
5021
4663
|
/** @public
|
|
5022
4664
|
* @documentationMaturity preview
|
|
5023
4665
|
* @requiredField subscriptionId
|
|
5024
4666
|
* @permissionId subscriptions.view
|
|
5025
|
-
* @permissionScope Manage Events
|
|
5026
|
-
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
5027
4667
|
* @applicableIdentity APP
|
|
5028
4668
|
* @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionHistoryService.ListSubscriptionHistory
|
|
5029
4669
|
*/
|
|
5030
|
-
|
|
5031
|
-
|
|
4670
|
+
declare function listSubscriptionHistory(subscriptionId: string, options?: ListSubscriptionHistoryOptions): Promise<NonNullablePaths<ListSubscriptionHistoryResponse, `historyEntries` | `historyEntries.${number}.entryId` | `historyEntries.${number}.slug` | `historyEntries.${number}.event.deleted.subscriptionId` | `historyEntries.${number}.event.paused.pausePolicy` | `historyEntries.${number}.event.pauseRequested.pauseAt` | `historyEntries.${number}.event.pauseRequested.pausePolicy` | `historyEntries.${number}.event.resumeRequested.resumeAt` | `historyEntries.${number}.event.extended.extensionBillingCycles` | `historyEntries.${number}.event.updatesApplied.updateAction` | `historyEntries.${number}.event.gracePeriodEnded.paymentSettlementMethod` | `historyEntries.${number}.event.paymentMethodUpdated.initiator` | `historyEntries.${number}.event.paymentMethodUpdated.paymentMode` | `historyEntries.${number}.event.collectionMethodUpdated.newCollectionMethod` | `historyEntries.${number}.event.collectionMethodUpdated.previousCollectionMethod` | `historyEntries.${number}.event.billingCyclePaid.paidCycle` | `historyEntries.${number}.event.billingCyclePaid.invoiceId` | `historyEntries.${number}.event.subscriptionBoAction.name` | `historyEntries.${number}.event.subscriptionBoAction.params`, 6>>;
|
|
4671
|
+
interface ListSubscriptionHistoryOptions {
|
|
5032
4672
|
/** Determines the type of view for the history: either a comprehensive backoffice view or a user-centric view. */
|
|
5033
|
-
mode?:
|
|
4673
|
+
mode?: HistoryViewModeWithLiterals;
|
|
5034
4674
|
/** Cursor for efficient paging. If paging through results, pass this field from the previous search response to continue to the next page. */
|
|
5035
4675
|
cursor?: CursorPaging;
|
|
5036
4676
|
}
|
|
5037
|
-
|
|
4677
|
+
|
|
4678
|
+
export { type Action, type ActionContext, type ActionDetails, type ActionEvent, ActionInitiator, type ActionInitiatorWithLiterals, ActionType, type ActionTypeWithLiterals, type AddPausePeriodRequest, type AddPausePeriodResponse, type AdditionalFee, AdditionalFeeTrigger, type AdditionalFeeTriggerWithLiterals, type Address, type AddressStreetOneOf, type AggregatedTaxBreakdown, type AllowedActionsOptions, type AllowedActionsRequest, type AllowedActionsResponse, type AmountByStatus, type ApplicationFee, type ApplicationFeeValueOneOf, type AttachInvoice, type AutomaticRetryData, type BaseEventMetadata, type BillingSettings, type BillingStatus, type BulkItemChange, type BulkUpdateSubscriptionItemsByFilterRequest, type BulkUpdateSubscriptionItemsByFilterResponse, type BusinessOrigin, type BusinessOriginData, type Cancel, type CancelSubscriptionApplicationErrors, type CancelSubscriptionBORequest, type CancelSubscriptionBOResponse, type CancelSubscriptionRequest, type CancelSubscriptionResponse, type CancelTimeCapsuleTaskRequest, type CancellationInfo, CancellationInitiator, type CancellationInitiatorWithLiterals, type CatalogReference, type Charge, CollectionMethod, CollectionMethodEnumCollectionMethod, type CollectionMethodEnumCollectionMethodWithLiterals, type CollectionMethodWithLiterals, type Complete, type ConvertSapiRequest, type ConvertSapiResponse, type CountByStatus, type CountSubscriptionFilter, type CountSubscriptionFilterStatusOneOf, type CountSubscriptionsOptions, type CountSubscriptionsRequest, type CountSubscriptionsResponse, type CreateRecurringInvoiceBORequest, type CreateRecurringInvoiceBOResponse, type CreateSubscriptionForOrderRequest, type CreateSubscriptionForOrderResponse, type CreateSubscriptionInStateRequest, type CreateSubscriptionInStateRequestModeOneOf, type CreateSubscriptionInStateResponse, type CreateSubscriptionRequest, type CreateSubscriptionResponse, CreationMode, type CreationModeWithLiterals, type CursorPaging, type Cursors, type CustomBillingSchedule, type CustomProration, type CustomProrationAmountOneOf, type Customer, type CustomerAllowedActionsRequest, type CustomerAllowedActionsResponse, type CustomerCancelSubscriptionApplicationErrors, type CustomerCancelSubscriptionOptions, type CustomerCancelSubscriptionRequest, type CustomerCancelSubscriptionResponse, type CustomerExtendSubscriptionApplicationErrors, type CustomerExtendSubscriptionOptions, type CustomerExtendSubscriptionRequest, type CustomerExtendSubscriptionResponse, type CustomerIdOneOf, type CustomerInitiatePaymentMethodSetupOptions, type CustomerListUpcomingChargesRequest, type CustomerListUpcomingChargesResponse, type CustomerQuerySubscriptionsOptions, type CustomerTurnOffAutoRenewalRequest, type CustomerTurnOffAutoRenewalResponse, type CustomerTurnOffSubscriptionAutoRenewalApplicationErrors, type CustomerTurnOffSubscriptionAutoRenewalOptions, type CustomerTurnOnAutoRenewalRequest, type CustomerTurnOnAutoRenewalResponse, type CustomerTurnOnSubscriptionAutoRenewalApplicationErrors, type CustomerTurnOnSubscriptionAutoRenewalOptions, type Cycles, type DeleteDraftSubscriptionRequest, type DeleteDraftSubscriptionResponse, type DeleteSubscriptionBORequest, type DeleteSubscriptionBOResponse, type DeleteSubscriptionRequest, type DeleteSubscriptionResponse, type DetachInvoice, type Discount, type DiscountCycles, type DiscountOrigin, type DiscountValueOneOf, type DomainEvent, type DomainEventBodyOneOf, type Duration, DurationUnit, type DurationUnitWithLiterals, type DynamicTax, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, ExtendPolicyType, type ExtendPolicyTypeWithLiterals, type ExtendSubscriptionApplicationErrors, type ExtendSubscriptionOptions, type ExtendSubscriptionOptionsExtendPolicyOneOf, type ExtendSubscriptionRequest, type ExtendSubscriptionRequestExtendPolicyOneOf, type ExtendSubscriptionResponse, type ExternalCollectionDetails, type FinishFreeTrialNowRequest, type FinishFreeTrialNowResponse, type FixSubscriptionInvoicesRequest, type FixSubscriptionInvoicesRequestModeOneOf, type FixSubscriptionInvoicesResponse, type FixSubscriptionTimeCapsuleTasksRequest, type FixSubscriptionTimeCapsuleTasksResponse, type FixedPrice, type FreeTrailEnded, type FreeTrailStarted, type FreeTrialData, type FullAddressContactDetails, type FullAddressDetails, type FutureUpdatesRequested, type GetFullSubscriptionDataRequest, type GetFullSubscriptionDataResponse, type GetSubscriptionAndInternalDataRequest, type GetSubscriptionAndInternalDataResponse, type GetSubscriptionInvoicesRequest, type GetSubscriptionInvoicesResponse, type GetSubscriptionRequest, type GetSubscriptionResponse, type GetSubscriptionsStatsRequest, type GetSubscriptionsStatsResponse, type GracePeriodData, type GracePeriodEnded, type GracePeriodStarted, type HandleSubscriptionAfterInvoiceMarkedAsPaidRequest, HistoryActionInitiator, type HistoryActionInitiatorWithLiterals, HistoryViewMode, type HistoryViewModeWithLiterals, type IdentificationData, type IdentificationDataIdOneOf, IdentityType, type IdentityTypeWithLiterals, type InitiatePaymentMethodSetupOptions, type InitiatePaymentMethodSetupRequest, type InitiatePaymentMethodSetupResponse, type InitiatedPaymentMethodSetup, type InternalSubscriptionData, type Invoice, type InvoiceAction, type InvoiceActionActionTypeOneOf, type InvoiceApplicationFee, type InvoiceApplicationFeeValueOneOf, type InvoiceDiscount, type InvoiceDiscountValueOneOf, type InvoiceItem, type InvoiceItemPaymentTypeOneOf, type InvoiceShippingCharges, InvoiceStatus, type InvoiceStatusWithLiterals, type Item, ItemCategory, type ItemCategoryWithLiterals, type ItemChange, type ItemTaxData, type LatestInvoiceMarkedAsPaid, type LatestPaymentAttempt, type LineItemTaxSummary, type ListSubscriptionHistoryOptions, type ListSubscriptionHistoryRequest, type ListSubscriptionHistoryResponse, type ListUpcomingChargesOptions, type ListUpcomingChargesRequest, type ListUpcomingChargesResponse, type MarkBillingCycleAsPaidApplicationErrors, type MarkBillingCycleAsPaidOptions, type MarkBillingCycleAsPaidRequest, type MarkBillingCycleAsPaidResponse, type MarkLatestInvoiceAsPaidApplicationErrors, type MarkLatestInvoiceAsPaidRequest, type MarkLatestInvoiceAsPaidResponse, type MessageEnvelope, type MigrationDetails, type Money, type MultipleSubscriptionsOnOrdersInvoice, type OneTime, OrderMethod, type OrderMethodWithLiterals, type Origin, type OriginOverride, type Paging, type PagingMetadataV2, PauseAt, type PauseAtWithLiterals, type PauseInfo, type PausePeriod, PausePolicy, type PausePolicyWithLiterals, type PauseSubscriptionApplicationErrors, type PauseSubscriptionBORequest, type PauseSubscriptionBOResponse, type PauseSubscriptionOptions, type PauseSubscriptionRequest, type PauseSubscriptionRequested, type PauseSubscriptionResponse, type PayCycleOptions, type PayCycleRequest, type PayCycleResponse, type PayRecurringInvoice, PaymentAttemptStatus, type PaymentAttemptStatusWithLiterals, type PaymentData, type PaymentMethod, type PaymentMethodUpdated, PaymentMode, type PaymentModeWithLiterals, type PaymentOrigin, type PaymentSettings, PaymentSettlementMethod, type PaymentSettlementMethodWithLiterals, PaymentStatus, PaymentStatusEnumPaymentStatus, type PaymentStatusEnumPaymentStatusWithLiterals, type PaymentStatusWithLiterals, PaymentTestMode, type PaymentTestModeWithLiterals, type PlatformOrigin, type PreviewSubscriptionChargesOptions, type PreviewSubscriptionChargesOptionsSubscriptionOneOf, type PreviewSubscriptionChargesRequest, type PreviewSubscriptionChargesRequestSubscriptionOneOf, type PreviewSubscriptionChargesResponse, type PreviewSubscriptionsChargesOptions, type PreviewSubscriptionsChargesRequest, type PreviewSubscriptionsChargesResponse, type PriceAdjustment, type PriceAdjustmentAdjustmentTypeOneOf, type PriceAdjustmentValue, type PriceAdjustmentValueAdjustmentValueTypeOneOf, type PriceDetails, type PricingModel, type PricingModelModelOneOf, type Proration, type ProrationTypeOneOf, type QuerySubscriptionsRequest, type QuerySubscriptionsResponse, type QueryV2, type QueryV2PagingMethodOneOf, type Recurring, type RedirectUrls, type Refund, type RefundInfo, RefundReason, type RefundReasonWithLiterals, RequestedFields, type RequestedFieldsWithLiterals, type Reschedule, type ResetPendingUpdates, type RestoreDraftSubscriptionRequest, type RestoreDraftSubscriptionResponse, type RestoreInfo, ResumeAt, type ResumeAtWithLiterals, type ResumeSubscriptionApplicationErrors, type ResumeSubscriptionOptions, type ResumeSubscriptionRequest, type ResumeSubscriptionRequested, type ResumeSubscriptionResponse, type ReviseSubscriptionRequest, type ReviseSubscriptionResponse, RevivePolicy, type RevivePolicyWithLiterals, type ReviveSubscriptionRequest, type ReviveSubscriptionResponse, type RunTimeCapsuleTaskNowRequest, type ScheduleAdditionalInfo, type ScheduleAdditionalInfoParamOneOf, type ScheduleTimeCapsuleTaskRequest, type ScheduledPauseCanceled, type ScheduledResumeCanceled, type SearchSubscriptionRequest, type SearchSubscriptionResponse, type SearchSubscriptionsOptions, type SearchSubscriptionsOptionsPagingMethodOneOf, type SearchSubscriptionsRequest, type SearchSubscriptionsRequestPagingMethodOneOf, type SearchSubscriptionsResponse, type SendSubscriptionActionEventBORequest, type SendSubscriptionActionEventBORequestEventOneOf, type SendSubscriptionActionEventResponse, type SendTimeCapsuleTaskCanceledBIRequest, type SetIsMigratedEvent, type SetShiftingDataRequest, type SetShiftingDataResponse, type ShippingCharges, SortOrder, type SortOrderWithLiterals, type Sorting, type SortingClauses, type SpecificDateSubscriptionUpdateData, Status, type StatusWithLiterals, type StreetAddress, type Subscriber, type Subscription, type SubscriptionActivated, type SubscriptionAutoRenewalTurnedOff, type SubscriptionAutoRenewalTurnedOffEnvelope, type SubscriptionAutoRenewalTurnedOn, type SubscriptionAutoRenewalTurnedOnEnvelope, type SubscriptionBackOfficeAction, type SubscriptionBillingCyclePaid, type SubscriptionBillingCycleStarted, type SubscriptionBillingDateUpdated, type SubscriptionBillingDateUpdatedEnvelope, type SubscriptionBillingDetails, type SubscriptionCanceled, type SubscriptionCanceledEnvelope, type SubscriptionCancellationRequested, type SubscriptionCharge, type SubscriptionCharges, type SubscriptionCollectionMethodUpdated, type SubscriptionCreated, type SubscriptionCycleReadyToPay, type SubscriptionCycleTriggered, type SubscriptionDelayedSyncEvent, type SubscriptionDeleted, type SubscriptionDiff, type SubscriptionEnded, type SubscriptionEvent, type SubscriptionEventPayloadOneOf, type SubscriptionExpired, type SubscriptionExtended, type SubscriptionExtendedEnvelope, type SubscriptionExtendedExtendPolicyOneOf, SubscriptionFrequency, type SubscriptionFrequencyWithLiterals, type SubscriptionHistoryEntry, type SubscriptionInfo, type SubscriptionInitialPurchaseCompleted, type SubscriptionInvoice, type SubscriptionLatestInvoiceMarkedAsPaidEnvelope, type SubscriptionMarkedAsPaid, type SubscriptionPauseScheduleCanceledEnvelope, type SubscriptionPauseScheduledEnvelope, type SubscriptionPaused, type SubscriptionPausedEnvelope, type SubscriptionPolicies, type SubscriptionPolicy, type SubscriptionResumeScheduleCanceledEnvelope, type SubscriptionResumeScheduledEnvelope, type SubscriptionResumed, type SubscriptionResumedEnvelope, type SubscriptionRevived, type SubscriptionStatus, SubscriptionStatusEnumSubscriptionStatus, type SubscriptionStatusEnumSubscriptionStatusWithLiterals, SubscriptionStatusGroup, type SubscriptionStatusGroupWithLiterals, type SubscriptionSuspended, type SubscriptionTrialPeriod, SubscriptionType, type SubscriptionTypeWithLiterals, type SubscriptionUpdateData, type SubscriptionUpdated, type SubscriptionUpdatedEnvelope, type Suspension, type Task, type TaskAction, type TaskActionActionOneOf, type TaskKey, type Tax, type TaxBreakdown, type TaxData, type TaxSettings, type TaxSummary, type TaxValueOneOf, TaxableAddressType, type TaxableAddressTypeWithLiterals, type TimeBasedProration, type Totals, type TurnOffSubscriptionAutoRenewalApplicationErrors, type TurnOffSubscriptionAutoRenewalRequest, type TurnOffSubscriptionAutoRenewalResponse, type TurnOnSubscriptionAutoRenewalApplicationErrors, type TurnOnSubscriptionAutoRenewalRequest, type TurnOnSubscriptionAutoRenewalResponse, type UnknownSubscriptionEvent, type UnsupportedAction, type UnsupportedReason, UpdateAction, type UpdateActionWithLiterals, type UpdateBillingDateData, type UpdateFullSubscriptionRequest, type UpdateFullSubscriptionResponse, type UpdatePausePaidDurationRequest, type UpdatePausePaidDurationResponse, type UpdatePaymentMethodBORequest, type UpdatePaymentMethodBOResponse, type UpdatePaymentStatusRequest, type UpdatePaymentStatusResponse, type UpdateStatusRequest, type UpdateStatusResponse, type UpdateSubscriptionBillingDateApplicationErrors, type UpdateSubscriptionBillingDateOptions, type UpdateSubscriptionBillingDateRequest, type UpdateSubscriptionBillingDateResponse, type UpdateSubscriptionInvoiceCycleRequest, type UpdateSubscriptionInvoiceCycleResponse, type UpdateSubscriptionItemsRequest, type UpdateSubscriptionItemsResponse, type UpdateSubscriptionOriginRequest, type UpdateSubscriptionOriginResponse, type UpdateSubscriptionPaymentMethodRequest, type UpdateSubscriptionPaymentMethodResponse, type UpdateSubscriptionPoliciesRequest, type UpdateSubscriptionPoliciesResponse, type UpdateSubscriptionRequest, type UpdateSubscriptionResponse, type UpdateSubscriptionStartDateRequest, type UpdateSubscriptionStartDateResponse, type UpdatesApplied, type V1Duration, type V1Subscription, type V1SubscriptionActivated, type V1SubscriptionCanceled, type V1SubscriptionCreated, type V1SubscriptionEvent, type V1SubscriptionEventEventOneOf, type V1SubscriptionInitialPurchaseCompleted, type V1SubscriptionResumed, V1SubscriptionStatusEnumSubscriptionStatus, type V1SubscriptionStatusEnumSubscriptionStatusWithLiterals, type V1SubscriptionUpdated, type V2Subscription, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, allowedActions, cancelSubscription, countSubscriptions, customerAllowedActions, customerCancelSubscription, customerExtendSubscription, customerGetSubscription, customerInitiatePaymentMethodSetup, customerListUpcomingCharges, customerQuerySubscriptions, customerTurnOffSubscriptionAutoRenewal, customerTurnOnSubscriptionAutoRenewal, customerUpdateSubscriptionPaymentMethod, extendSubscription, getSubscription, getSubscriptionsStats, initiatePaymentMethodSetup, listSubscriptionHistory, listUpcomingCharges, markLatestInvoiceAsPaid, onSubscriptionAutoRenewalTurnedOff, onSubscriptionAutoRenewalTurnedOn, onSubscriptionBillingDateUpdated, onSubscriptionCanceled, onSubscriptionExtended, onSubscriptionLatestInvoiceMarkedAsPaid, onSubscriptionPauseScheduleCanceled, onSubscriptionPauseScheduled, onSubscriptionPaused, onSubscriptionResumeScheduleCanceled, onSubscriptionResumeScheduled, onSubscriptionResumed, onSubscriptionUpdated, pauseSubscription, payCycle, previewSubscriptionCharges, previewSubscriptionsCharges, querySubscriptions, resumeSubscription, searchSubscriptions, turnOffSubscriptionAutoRenewal, turnOnSubscriptionAutoRenewal, updateSubscriptionBillingDate, updateSubscriptionPaymentMethod };
|