@wix/auto_sdk_subscription_subscriptions 1.0.0 → 1.0.2

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