@wix/auto_sdk_subscription_subscriptions 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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 +13 -11
  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 +19 -3
  5. package/build/cjs/src/billing-v1-subscription-subscriptions.http.js +1914 -1851
  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 +8 -5
  8. package/build/cjs/src/billing-v1-subscription-subscriptions.meta.js +44 -25
  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 +18 -11
  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 +2034 -1465
  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 +2114 -1465
  17. package/build/cjs/src/billing-v1-subscription-subscriptions.universal.js +401 -339
  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 +6 -4
  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 +19 -3
  23. package/build/es/src/billing-v1-subscription-subscriptions.http.js +1854 -1792
  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 +8 -5
  26. package/build/es/src/billing-v1-subscription-subscriptions.meta.js +40 -22
  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 +14 -8
  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 +2034 -1465
  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 +2114 -1465
  35. package/build/es/src/billing-v1-subscription-subscriptions.universal.js +394 -333
  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 +7 -5
  38. package/build/internal/cjs/src/billing-v1-subscription-subscriptions.context.js +13 -11
  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 +19 -3
  41. package/build/internal/cjs/src/billing-v1-subscription-subscriptions.http.js +1914 -1851
  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 +8 -5
  44. package/build/internal/cjs/src/billing-v1-subscription-subscriptions.meta.js +44 -25
  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 +35 -13
  47. package/build/internal/cjs/src/billing-v1-subscription-subscriptions.public.js +18 -11
  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 +2034 -1465
  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 +2253 -1578
  53. package/build/internal/cjs/src/billing-v1-subscription-subscriptions.universal.js +401 -339
  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 +7 -5
  56. package/build/internal/es/src/billing-v1-subscription-subscriptions.context.js +6 -4
  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 +19 -3
  59. package/build/internal/es/src/billing-v1-subscription-subscriptions.http.js +1854 -1792
  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 +8 -5
  62. package/build/internal/es/src/billing-v1-subscription-subscriptions.meta.js +40 -22
  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 +35 -13
  65. package/build/internal/es/src/billing-v1-subscription-subscriptions.public.js +14 -8
  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 +2034 -1465
  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 +2253 -1578
  71. package/build/internal/es/src/billing-v1-subscription-subscriptions.universal.js +394 -333
  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,58 @@ export interface SpecificDateSubscriptionUpdateData {
835
977
  executionDate?: Date | null;
836
978
  }
837
979
  export interface PlatformOrigin {
980
+ /** @format GUID */
838
981
  appId?: string | null;
982
+ /** @format GUID */
839
983
  entityId?: string | null;
840
984
  }
985
+ /** TODO: to delete after ECOM adjustments */
841
986
  export interface InvoiceMarkedAsPaid {
842
987
  /** The subscription for which one of the invoices has been marked as paid */
843
988
  subscription?: Subscription;
844
989
  /** The cycle that has been marked as paid */
845
990
  paidCycle?: number;
846
- /** The invoice ID that has been marked as paid */
991
+ /**
992
+ * The invoice ID that has been marked as paid
993
+ * @format GUID
994
+ */
847
995
  invoiceId?: string;
848
- /** The transaction ID of the payment order that has been marked as paid */
996
+ /**
997
+ * The transaction ID of the payment order that has been marked as paid
998
+ * @format GUID
999
+ */
849
1000
  paymentTransactionId?: string | null;
850
1001
  }
851
- export interface 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;
1002
+ export interface SubscriptionBillingCyclePaid {
1003
+ /** The subscription for which one of the invoices has been marked as paid */
1004
+ subscription?: Subscription;
1005
+ /** The cycle that has been marked as paid */
1006
+ paidCycle?: number;
868
1007
  /**
869
- * 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.
1008
+ * The invoice ID that has been marked as paid
1009
+ * @format GUID
873
1010
  */
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;
1011
+ invoiceId?: string;
1012
+ /**
1013
+ * The transaction ID of the payment order that has been marked as paid
1014
+ * @format GUID
1015
+ */
1016
+ paymentTransactionId?: string | null;
924
1017
  }
925
- /** @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;
1018
+ export interface GetSubscriptionRequest {
1019
+ /** @format GUID */
1020
+ id: string;
961
1021
  }
962
- export interface SubscriptionCreated {
1022
+ export interface GetSubscriptionResponse {
963
1023
  subscription?: Subscription;
964
1024
  }
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;
1025
+ export interface CustomerCancelSubscriptionRequest {
1026
+ /** @format GUID */
1027
+ id: string;
1028
+ /** Optional action reason message */
1029
+ reason?: string | null;
988
1030
  }
989
- /**
990
- * Sent each time a subscription status has been set to Ended
991
- * Ended shows that a subscription reached its end date and ended its life cycle as a result of the agreement.
992
- * This is different from a Canceled subscription which ends the subscription before a designated end date.
993
- * Therefore, Ended and Canceled are mutually exclusive.
994
- */
995
- export interface SubscriptionEnded {
1031
+ export interface CustomerCancelSubscriptionResponse {
996
1032
  subscription?: Subscription;
997
1033
  }
998
1034
  /**
@@ -1010,53 +1046,45 @@ export interface ActionDetails {
1010
1046
  initiator?: HistoryActionInitiator;
1011
1047
  reason?: string | null;
1012
1048
  }
1013
- export interface SubscriptionPaused {
1014
- subscription?: Subscription;
1015
- pausePolicy?: PausePolicy;
1016
- actionDetails?: ActionDetails;
1049
+ export interface CustomerTurnOnAutoRenewalRequest {
1050
+ /** @format GUID */
1051
+ id: string;
1052
+ /** Optional action reason message */
1053
+ reason?: string | null;
1017
1054
  }
1018
- export interface SubscriptionResumed {
1055
+ export interface CustomerTurnOnAutoRenewalResponse {
1019
1056
  subscription?: Subscription;
1020
- actionDetails?: ActionDetails;
1021
1057
  }
1022
- export interface PauseSubscriptionRequested {
1023
- subscription?: Subscription;
1024
- pauseAt?: PauseAt;
1025
- pausePolicy?: PausePolicy;
1026
- actionDetails?: ActionDetails;
1058
+ export interface CustomerTurnOffAutoRenewalRequest {
1059
+ /** @format GUID */
1060
+ id: string;
1061
+ /** Optional action reason message */
1062
+ reason?: string | null;
1027
1063
  }
1028
- export interface ResumeSubscriptionRequested {
1064
+ export interface CustomerTurnOffAutoRenewalResponse {
1029
1065
  subscription?: Subscription;
1030
- resumeAt?: ResumeAt;
1031
- actionDetails?: ActionDetails;
1032
1066
  }
1033
- export interface ScheduledPauseCanceled {
1067
+ export interface CustomerExtendSubscriptionRequest {
1068
+ /**
1069
+ * The ID of the subscription to be extended
1070
+ * @format GUID
1071
+ */
1072
+ id: string;
1073
+ /** Optional action reason message */
1074
+ reason?: string | null;
1075
+ /**
1076
+ * For termed - Subscription end date will be updated with the extension period and number of cycles will be added
1077
+ * @min 1
1078
+ */
1079
+ billingCyclesToAdd: number | null;
1080
+ }
1081
+ export interface CustomerExtendSubscriptionResponse {
1082
+ /** The now extended subscription */
1034
1083
  subscription?: Subscription;
1035
- actionDetails?: ActionDetails;
1036
1084
  }
1037
- export interface ScheduledResumeCanceled {
1038
- subscription?: Subscription;
1039
- actionDetails?: ActionDetails;
1040
- }
1041
- export interface SubscriptionBillingCycleStarted {
1042
- subscription?: Subscription;
1043
- /** Wix Pay transaction id, optional. Exists if event was triggered by a payment. */
1044
- paymentTransactionId?: string | null;
1045
- }
1046
- export interface SubscriptionAutoRenewalTurnedOn {
1047
- subscription?: Subscription;
1048
- actionDetails?: ActionDetails;
1049
- }
1050
- export interface SubscriptionAutoRenewalTurnedOff {
1051
- subscription?: Subscription;
1052
- actionDetails?: ActionDetails;
1053
- }
1054
- export interface SubscriptionCycleReadyToPay {
1055
- subscription?: Subscription;
1056
- }
1057
- export interface SubscriptionExtended extends SubscriptionExtendedExtendPolicyOneOf {
1058
- extensionPeriod?: Duration;
1059
- extensionBillingCycles?: number;
1085
+ export interface SubscriptionExtended extends SubscriptionExtendedExtendPolicyOneOf {
1086
+ extensionPeriod?: Duration;
1087
+ extensionBillingCycles?: number;
1060
1088
  subscription?: Subscription;
1061
1089
  actionDetails?: ActionDetails;
1062
1090
  }
@@ -1065,98 +1093,75 @@ export interface SubscriptionExtendedExtendPolicyOneOf {
1065
1093
  extensionPeriod?: Duration;
1066
1094
  extensionBillingCycles?: number;
1067
1095
  }
1068
- export interface 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;
1096
+ export interface QuerySubscriptionsRequest {
1097
+ query?: QueryV2;
1128
1098
  }
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"
1099
+ export interface QueryV2 extends QueryV2PagingMethodOneOf {
1100
+ /** Paging options to limit and skip the number of items. */
1101
+ paging?: Paging;
1102
+ /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
1103
+ cursorPaging?: CursorPaging;
1104
+ /**
1105
+ * Filter object.
1106
+ *
1107
+ * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
1108
+ */
1109
+ filter?: Record<string, any> | null;
1110
+ /**
1111
+ * Sort object.
1112
+ *
1113
+ * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
1114
+ */
1115
+ sort?: Sorting[];
1116
+ /** Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned. */
1117
+ fields?: string[];
1118
+ /** Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned. */
1119
+ fieldsets?: string[];
1135
1120
  }
1136
- export interface SubscriptionCollectionMethodUpdated {
1137
- subscription?: Subscription;
1138
- newCollectionMethod?: CollectionMethodEnumCollectionMethod;
1139
- previousCollectionMethod?: CollectionMethodEnumCollectionMethod;
1121
+ /** @oneof */
1122
+ export interface QueryV2PagingMethodOneOf {
1123
+ /** Paging options to limit and skip the number of items. */
1124
+ paging?: Paging;
1125
+ /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
1126
+ cursorPaging?: CursorPaging;
1140
1127
  }
1141
- export interface FreeTrailStarted {
1142
- subscription?: Subscription;
1128
+ export interface Sorting {
1129
+ /**
1130
+ * Name of the field to sort by.
1131
+ * @maxLength 512
1132
+ */
1133
+ fieldName?: string;
1134
+ /** Sort order. */
1135
+ order?: SortOrder;
1143
1136
  }
1144
- export interface FreeTrailEnded {
1145
- subscription?: Subscription;
1137
+ export declare enum SortOrder {
1138
+ ASC = "ASC",
1139
+ DESC = "DESC"
1146
1140
  }
1147
- export interface InitiatedPaymentMethodSetup {
1148
- subscription?: Subscription;
1141
+ export interface Paging {
1142
+ /** Number of items to load. */
1143
+ limit?: number | null;
1144
+ /** Number of items to skip in the current sort order. */
1145
+ offset?: number | null;
1149
1146
  }
1150
- export interface 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;
1147
+ export interface CursorPaging {
1148
+ /**
1149
+ * Maximum number of items to return in the results.
1150
+ * @max 100
1151
+ */
1152
+ limit?: number | null;
1153
+ /**
1154
+ * Pointer to the next or previous page in the list of results.
1155
+ *
1156
+ * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
1157
+ * Not relevant for the first request.
1158
+ * @maxLength 16000
1159
+ */
1160
+ cursor?: string | null;
1156
1161
  }
1157
- /** Defines unknown events restored from the logs */
1158
- export interface UnknownSubscriptionEvent {
1159
- subscriptionAsString?: string | null;
1162
+ export interface QuerySubscriptionsResponse {
1163
+ subscriptions?: Subscription[];
1164
+ metadata?: PagingMetadataV2;
1160
1165
  }
1161
1166
  export interface PagingMetadataV2 {
1162
1167
  /** Number of items returned in the response. */
@@ -1171,267 +1176,70 @@ export interface PagingMetadataV2 {
1171
1176
  cursors?: Cursors;
1172
1177
  }
1173
1178
  export interface Cursors {
1174
- /** Cursor string pointing to the next page in the list of results. */
1175
- next?: string | null;
1176
- /** Cursor pointing to the previous page in the list of results. */
1177
- prev?: string | null;
1178
- }
1179
- export interface DomainEvent extends DomainEventBodyOneOf {
1180
- createdEvent?: EntityCreatedEvent;
1181
- updatedEvent?: EntityUpdatedEvent;
1182
- deletedEvent?: EntityDeletedEvent;
1183
- actionEvent?: ActionEvent;
1184
1179
  /**
1185
- * Unique event ID.
1186
- * Allows clients to ignore duplicate webhooks.
1180
+ * Cursor string pointing to the next page in the list of results.
1181
+ * @maxLength 16000
1187
1182
  */
1188
- id?: string;
1183
+ next?: string | null;
1189
1184
  /**
1190
- * Assumes actions are also always typed to an entity_type
1191
- * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
1185
+ * Cursor pointing to the previous page in the list of results.
1186
+ * @maxLength 16000
1192
1187
  */
1193
- entityFqdn?: string;
1188
+ prev?: string | null;
1189
+ }
1190
+ export interface CountSubscriptionsRequest {
1191
+ /** Filters to specify which subscriptions are counted. */
1192
+ filter?: CountSubscriptionFilter;
1193
+ }
1194
+ export interface CountSubscriptionFilter extends CountSubscriptionFilterStatusOneOf {
1195
+ /** List of statuses to filter the counted subscriptions by. */
1196
+ statuses?: SubscriptionStatus;
1194
1197
  /**
1195
- * 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
1198
+ * Predefined status combination to filter the counted subscriptions by.
1199
+ * + `ALL`: Includes these subscription statuses: `"DRAFT"`, `"PENDING"`, `"ACTIVE"`, `"PAUSED"`, `"ENDED"`, and `"CANCELED"`.
1200
+ * + `LIVE`: Includes these subscription statuses: `"PENDING"`, `"ACTIVE"`, and `"PAUSED"`.
1198
1201
  */
1199
- 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;
1202
+ statusGroup?: SubscriptionStatusGroup;
1204
1203
  /**
1205
- * Whether the event was triggered as a result of a privacy regulation application
1206
- * (for example, GDPR).
1204
+ * Customer ID to filter the counted subscriptions by. You can pass a
1205
+ * [member ID](https://bo.wix.com/wix-docs/rest/members/members/member-object),
1206
+ * [contact ID](https://bo.wix.com/wix-docs/rest/crm/contacts/contacts-v4/contact-object),
1207
+ * or the ID of an anonymous site visitor as `customerId`. When providing a
1208
+ * `customerId` you must also specify a `paymentMethodId`.
1209
+ * @format GUID
1207
1210
  */
1208
- triggeredByAnonymizeRequest?: boolean | null;
1209
- /** If present, indicates the action that triggered the event. */
1210
- originatedFrom?: string | null;
1211
+ customerId?: string | null;
1211
1212
  /**
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.
1213
+ * ID of the payment method to filter the counted subscriptions by.
1214
+ * You must provide a `paymentMethodId` when passing a `customerId`.
1215
+ * @format GUID
1218
1216
  */
1219
- entityEventSequence?: string | null;
1217
+ paymentMethodId?: string | null;
1220
1218
  }
1221
1219
  /** @oneof */
1222
- export interface DomainEventBodyOneOf {
1223
- createdEvent?: EntityCreatedEvent;
1224
- updatedEvent?: EntityUpdatedEvent;
1225
- deletedEvent?: EntityDeletedEvent;
1226
- actionEvent?: ActionEvent;
1227
- }
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;
1232
- }
1233
- export interface RestoreInfo {
1234
- deletedDate?: Date | null;
1220
+ export interface CountSubscriptionFilterStatusOneOf {
1221
+ /** List of statuses to filter the counted subscriptions by. */
1222
+ statuses?: SubscriptionStatus;
1223
+ /**
1224
+ * Predefined status combination to filter the counted subscriptions by.
1225
+ * + `ALL`: Includes these subscription statuses: `"DRAFT"`, `"PENDING"`, `"ACTIVE"`, `"PAUSED"`, `"ENDED"`, and `"CANCELED"`.
1226
+ * + `LIVE`: Includes these subscription statuses: `"PENDING"`, `"ACTIVE"`, and `"PAUSED"`.
1227
+ */
1228
+ statusGroup?: SubscriptionStatusGroup;
1235
1229
  }
1236
- export interface EntityUpdatedEvent {
1230
+ export interface SubscriptionStatus {
1237
1231
  /**
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.
1232
+ * Statuses to filter the counted subscriptions by.
1233
+ *
1234
+ * Max: 6 statuses
1235
+ * @maxSize 6
1241
1236
  */
1242
- currentEntityAsJson?: string;
1237
+ statuses?: SubscriptionStatusEnumSubscriptionStatus[];
1243
1238
  }
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"
1239
+ export declare enum SubscriptionStatusGroup {
1240
+ ALL = "ALL",
1241
+ /** Union of ACTIVE, PAUSED and PENDING */
1242
+ LIVE = "LIVE"
1435
1243
  }
1436
1244
  export interface CountSubscriptionsResponse {
1437
1245
  /**
@@ -1449,14 +1257,19 @@ export interface CountByStatus {
1449
1257
  count?: number;
1450
1258
  }
1451
1259
  export interface UpdateSubscriptionPaymentMethodRequest {
1452
- /** Subscription ID */
1260
+ /**
1261
+ * Subscription ID
1262
+ * @format GUID
1263
+ */
1453
1264
  id: string;
1265
+ /** @format GUID */
1454
1266
  paymentMethodId: string;
1455
1267
  }
1456
1268
  export interface UpdateSubscriptionPaymentMethodResponse {
1457
1269
  subscription?: Subscription;
1458
1270
  }
1459
1271
  export interface CustomerAllowedActionsRequest {
1272
+ /** @format GUID */
1460
1273
  id: string;
1461
1274
  }
1462
1275
  export interface CustomerAllowedActionsResponse {
@@ -1490,7 +1303,10 @@ export declare enum ExtendPolicyType {
1490
1303
  BILLING_CYCLE = "BILLING_CYCLE"
1491
1304
  }
1492
1305
  export interface CustomerListUpcomingChargesRequest {
1493
- /** Subscription id upcoming charge to be previewed for */
1306
+ /**
1307
+ * Subscription id upcoming charge to be previewed for
1308
+ * @format GUID
1309
+ */
1494
1310
  id: string;
1495
1311
  }
1496
1312
  export interface CustomerListUpcomingChargesResponse {
@@ -1517,11 +1333,15 @@ export interface InvoiceItem extends InvoiceItemPaymentTypeOneOf {
1517
1333
  * time, not on a recurring basis.
1518
1334
  */
1519
1335
  oneTime?: OneTime;
1520
- /** ID of the invoice line item. */
1336
+ /**
1337
+ * ID of the invoice line item.
1338
+ * @format GUID
1339
+ */
1521
1340
  id?: string;
1522
1341
  /**
1523
1342
  * ID of the [subscription](https://bo.wix.com/wix-docs/rest/premium/premium-subscriptions-manager/subscription-object)
1524
1343
  * that belongs to the invoice line item.
1344
+ * @format GUID
1525
1345
  */
1526
1346
  subscriptionId?: string | null;
1527
1347
  /**
@@ -1529,12 +1349,15 @@ export interface InvoiceItem extends InvoiceItemPaymentTypeOneOf {
1529
1349
  * Typically the product name.
1530
1350
  *
1531
1351
  * Max: 200 characters
1352
+ * @minLength 1
1353
+ * @maxLength 200
1532
1354
  */
1533
1355
  name?: string;
1534
1356
  /**
1535
1357
  * Description of the invoice line item.
1536
1358
  *
1537
1359
  * Max: 500 characters
1360
+ * @maxLength 500
1538
1361
  */
1539
1362
  description?: string | null;
1540
1363
  /** Information about the product from the external product catalog. */
@@ -1582,6 +1405,7 @@ export interface PriceDetails {
1582
1405
  /**
1583
1406
  * Price of the invoice line item in `0.00` format.
1584
1407
  * A minus sign (-) indicates that the amount is negative.
1408
+ * @format DECIMAL_VALUE
1585
1409
  */
1586
1410
  price?: string;
1587
1411
  /** Information about the invoice line item's tax. */
@@ -1600,6 +1424,7 @@ export interface InvoiceDiscount extends InvoiceDiscountValueOneOf {
1600
1424
  * Available when the discount is an amount.
1601
1425
  *
1602
1426
  * Min: `0.01`
1427
+ * @decimalValue options - {gt:0.00}
1603
1428
  */
1604
1429
  amount?: string;
1605
1430
  /**
@@ -1608,6 +1433,7 @@ export interface InvoiceDiscount extends InvoiceDiscountValueOneOf {
1608
1433
  *
1609
1434
  * Min: `0.01`
1610
1435
  * Max: `100`
1436
+ * @decimalValue options - {gt:0.00,lte:100}
1611
1437
  */
1612
1438
  percentage?: string;
1613
1439
  /** Indicates the source of the discount. . Contains app_id and entity_id */
@@ -1620,6 +1446,7 @@ export interface InvoiceDiscountValueOneOf {
1620
1446
  * Available when the discount is an amount.
1621
1447
  *
1622
1448
  * Min: `0.01`
1449
+ * @decimalValue options - {gt:0.00}
1623
1450
  */
1624
1451
  amount?: string;
1625
1452
  /**
@@ -1628,6 +1455,7 @@ export interface InvoiceDiscountValueOneOf {
1628
1455
  *
1629
1456
  * Min: `0.01`
1630
1457
  * Max: `100`
1458
+ * @decimalValue options - {gt:0.00,lte:100}
1631
1459
  */
1632
1460
  percentage?: string;
1633
1461
  }
@@ -1636,6 +1464,7 @@ export interface InvoiceApplicationFee extends InvoiceApplicationFeeValueOneOf {
1636
1464
  * Application fee amount. Set by the origin app, and not by BASS. Wix
1637
1465
  * receives the full `applicationFee`, while the merchant doesn't receive
1638
1466
  * any portion of it.
1467
+ * @format DECIMAL_VALUE
1639
1468
  */
1640
1469
  amount?: string;
1641
1470
  /** Information about the discount for the invoice line item's application fee. */
@@ -1647,34 +1476,63 @@ export interface InvoiceApplicationFeeValueOneOf {
1647
1476
  * Application fee amount. Set by the origin app, and not by BASS. Wix
1648
1477
  * receives the full `applicationFee`, while the merchant doesn't receive
1649
1478
  * any portion of it.
1479
+ * @format DECIMAL_VALUE
1650
1480
  */
1651
1481
  amount?: string;
1652
1482
  }
1653
1483
  export interface ItemTaxData {
1654
1484
  /** Aggregated tax from tax_breakdowns */
1655
1485
  lineItemTaxSummary?: LineItemTaxSummary;
1656
- /** A detailed description of all the tax authorities applied on this item. */
1486
+ /**
1487
+ * A detailed description of all the tax authorities applied on this item.
1488
+ * @minSize 1
1489
+ * @maxSize 100
1490
+ */
1657
1491
  taxBreakdowns?: TaxBreakdown[];
1658
1492
  }
1659
1493
  export interface LineItemTaxSummary {
1660
- /** Calculated from external tax summary */
1494
+ /**
1495
+ * Calculated from external tax summary
1496
+ * @format DECIMAL_VALUE
1497
+ */
1661
1498
  aggregatedTaxAmount?: string;
1662
- /** Aggregated from tax_breakdowns */
1499
+ /**
1500
+ * Aggregated from tax_breakdowns
1501
+ * @decimalValue options - {gte:0,maxScale:6}
1502
+ */
1663
1503
  aggregatedTaxRate?: string;
1664
- /** Total taxable amount for this line item. */
1504
+ /**
1505
+ * Total taxable amount for this line item.
1506
+ * @format DECIMAL_VALUE
1507
+ * @decimalValue options - {maxScale:4}
1508
+ */
1665
1509
  taxableAmount?: string;
1666
- /** Aggregated from tax_breakdowns after applying exemptions */
1510
+ /**
1511
+ * Aggregated from tax_breakdowns after applying exemptions
1512
+ * @format DECIMAL_VALUE
1513
+ * @decimalValue options - {maxScale:4}
1514
+ */
1667
1515
  finalTaxAmount?: string | null;
1668
1516
  }
1669
1517
  export interface TaxBreakdown {
1670
1518
  taxType?: string;
1519
+ /** @decimalValue options - {maxScale:4} */
1671
1520
  taxRate?: string;
1521
+ /** @format DECIMAL_VALUE */
1672
1522
  taxAmount?: string | null;
1523
+ /** @format DECIMAL_VALUE */
1673
1524
  taxableAmount?: string | null;
1525
+ /** @format DECIMAL_VALUE */
1674
1526
  nonTaxableAmount?: string | null;
1675
- /** Name of the tax that was calculated. For example, "NY State Sales Tax", "Quebec GST", etc. */
1527
+ /**
1528
+ * Name of the tax that was calculated. For example, "NY State Sales Tax", "Quebec GST", etc.
1529
+ * @maxLength 200
1530
+ */
1676
1531
  taxName?: string | null;
1677
- /** Jurisdiction that taxes were calculated for. */
1532
+ /**
1533
+ * Jurisdiction that taxes were calculated for.
1534
+ * @maxLength 200
1535
+ */
1678
1536
  jurisdiction?: string | null;
1679
1537
  /** Type of jurisdiction that taxes were calculated for. */
1680
1538
  jurisdictionType?: string;
@@ -1684,6 +1542,13 @@ export interface InitiatePaymentMethodSetupRequest {
1684
1542
  paymentMode?: PaymentMode;
1685
1543
  paymentSettings?: PaymentSettings;
1686
1544
  }
1545
+ export declare enum PaymentMode {
1546
+ NONE = "NONE",
1547
+ /** The latest invoice of the subscription will be charged. */
1548
+ CHARGE = "CHARGE",
1549
+ /** An authorization invoice with zero amount will be created. */
1550
+ AUTHORIZATION = "AUTHORIZATION"
1551
+ }
1687
1552
  export interface PaymentSettings {
1688
1553
  /** Allowed payment providers for Subscriptions, for example to limit subscriptions to be created only with "Wix Payments" provider. */
1689
1554
  allowedProviderIds?: string[];
@@ -1691,6 +1556,7 @@ export interface PaymentSettings {
1691
1556
  orderMethod?: OrderMethod;
1692
1557
  /** Wix Pay callback url(s) to return buyer to a third party system */
1693
1558
  redirectUrls?: RedirectUrls;
1559
+ /** @format GUID */
1694
1560
  paymentMethodId?: string | null;
1695
1561
  /**
1696
1562
  * Specifies an alternative origin for processing the payment.
@@ -1718,453 +1584,1164 @@ export interface RedirectUrls {
1718
1584
  pendingUrl?: string;
1719
1585
  }
1720
1586
  export interface PaymentOrigin {
1721
- /** ID of the app for which the Payment will create the order on. For example, Paypal. */
1587
+ /**
1588
+ * ID of the app for which the Payment will create the order on. For example, Paypal.
1589
+ * @format GUID
1590
+ */
1722
1591
  appId?: string;
1723
- /** Id of the entity that order will be created on */
1592
+ /**
1593
+ * Id of the entity that order will be created on
1594
+ * @format GUID
1595
+ */
1724
1596
  instanceId?: string;
1725
1597
  }
1726
1598
  export interface InitiatePaymentMethodSetupResponse {
1599
+ /** @format GUID */
1727
1600
  paymentOrderId?: string;
1728
1601
  }
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;
1602
+ export interface DomainEvent extends DomainEventBodyOneOf {
1603
+ createdEvent?: EntityCreatedEvent;
1604
+ updatedEvent?: EntityUpdatedEvent;
1605
+ deletedEvent?: EntityDeletedEvent;
1606
+ actionEvent?: ActionEvent;
1766
1607
  /**
1767
- * Supported field: start_date
1768
- * Can be updated only if Subscription is in Draft state
1608
+ * Unique event ID.
1609
+ * Allows clients to ignore duplicate webhooks.
1769
1610
  */
1770
- fieldMask?: string[];
1771
- }
1772
- export interface UpdateSubscriptionResponse {
1773
- subscription?: Subscription;
1774
- }
1775
- export interface UpdateSubscriptionStartDateRequest {
1776
- /** Subscription ID */
1777
1611
  id?: string;
1778
1612
  /**
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
1613
+ * Assumes actions are also always typed to an entity_type
1614
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
1782
1615
  */
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;
1616
+ entityFqdn?: string;
1802
1617
  /**
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.
1618
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
1619
+ * This is although the created/updated/deleted notion is duplication of the oneof types
1620
+ * Example: created/updated/deleted/started/completed/email_opened
1810
1621
  */
1811
- proration?: Proration;
1622
+ slug?: string;
1623
+ /** ID of the entity associated with the event. */
1624
+ entityId?: string;
1625
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
1626
+ eventTime?: Date | null;
1627
+ /**
1628
+ * Whether the event was triggered as a result of a privacy regulation application
1629
+ * (for example, GDPR).
1630
+ */
1631
+ triggeredByAnonymizeRequest?: boolean | null;
1632
+ /** If present, indicates the action that triggered the event. */
1633
+ originatedFrom?: string | null;
1634
+ /**
1635
+ * A sequence number defining the order of updates to the underlying entity.
1636
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
1637
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
1638
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
1639
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
1640
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
1641
+ */
1642
+ entityEventSequence?: string | null;
1812
1643
  }
1813
- export interface UpdateSubscriptionBillingDateResponse {
1814
- /** Updated subscription. */
1815
- subscription?: Subscription;
1644
+ /** @oneof */
1645
+ export interface DomainEventBodyOneOf {
1646
+ createdEvent?: EntityCreatedEvent;
1647
+ updatedEvent?: EntityUpdatedEvent;
1648
+ deletedEvent?: EntityDeletedEvent;
1649
+ actionEvent?: ActionEvent;
1816
1650
  }
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;
1651
+ export interface EntityCreatedEvent {
1652
+ entityAsJson?: string;
1653
+ /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
1654
+ restoreInfo?: RestoreInfo;
1822
1655
  }
1823
- export interface UpdateSubscriptionOriginResponse {
1824
- /** Updated subscription. */
1825
- subscription?: Subscription;
1656
+ export interface RestoreInfo {
1657
+ deletedDate?: Date | null;
1826
1658
  }
1827
- export interface ReviseSubscriptionRequest {
1828
- /** Subscription ID */
1829
- id?: string;
1830
- /** 0 for no revision, maxSize is 100 */
1831
- items?: Item[];
1659
+ export interface EntityUpdatedEvent {
1660
+ /**
1661
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
1662
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
1663
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
1664
+ */
1665
+ currentEntityAsJson?: string;
1832
1666
  }
1833
- export interface ReviseSubscriptionResponse {
1834
- subscription?: Subscription;
1667
+ export interface EntityDeletedEvent {
1668
+ /** Entity that was deleted */
1669
+ deletedEntityAsJson?: string | null;
1835
1670
  }
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;
1671
+ export interface ActionEvent {
1672
+ bodyAsJson?: string;
1849
1673
  }
1850
- export interface ScheduleAdditionalInfo extends ScheduleAdditionalInfoParamOneOf {
1674
+ export interface MessageEnvelope {
1851
1675
  /**
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"}`.
1676
+ * App instance ID.
1677
+ * @format GUID
1858
1678
  */
1859
- specificDate?: Date | null;
1679
+ instanceId?: string | null;
1860
1680
  /**
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_.
1681
+ * Event type.
1682
+ * @maxLength 150
1866
1683
  */
1867
- numberOfCycles?: number;
1684
+ eventType?: string;
1685
+ /** The identification type and identity data. */
1686
+ identity?: IdentificationData;
1687
+ /** Stringify payload. */
1688
+ data?: string;
1868
1689
  }
1869
- /** @oneof */
1870
- export interface ScheduleAdditionalInfoParamOneOf {
1690
+ export interface IdentificationData extends IdentificationDataIdOneOf {
1871
1691
  /**
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"}`.
1692
+ * ID of a site visitor that has not logged in to the site.
1693
+ * @format GUID
1878
1694
  */
1879
- specificDate?: Date | null;
1695
+ anonymousVisitorId?: string;
1880
1696
  /**
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_.
1697
+ * ID of a site visitor that has logged in to the site.
1698
+ * @format GUID
1886
1699
  */
1887
- numberOfCycles?: number;
1888
- }
1889
- export interface UpdateSubscriptionItemsResponse {
1890
- subscription?: Subscription;
1891
- }
1892
- export interface BulkUpdateSubscriptionItemsByFilterRequest {
1700
+ memberId?: string;
1893
1701
  /**
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.
1702
+ * ID of a Wix user (site owner, contributor, etc.).
1703
+ * @format GUID
1901
1704
  */
1902
- subscriptionFilter?: Record<string, any> | null;
1705
+ wixUserId?: string;
1903
1706
  /**
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
1707
+ * ID of an app.
1708
+ * @format GUID
1909
1709
  */
1910
- catalogReferenceIds?: string[] | null;
1710
+ appId?: string;
1711
+ /** @readonly */
1712
+ identityType?: WebhookIdentityType;
1713
+ }
1714
+ /** @oneof */
1715
+ export interface IdentificationDataIdOneOf {
1911
1716
  /**
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.
1717
+ * ID of a site visitor that has not logged in to the site.
1718
+ * @format GUID
1918
1719
  */
1919
- updateAction?: UpdateAction;
1720
+ anonymousVisitorId?: string;
1920
1721
  /**
1921
- * Additional information for updates. Currently, only supported for
1922
- * `{"updateAction": "SPECIFIC_DATE"}`.
1722
+ * ID of a site visitor that has logged in to the site.
1723
+ * @format GUID
1923
1724
  */
1924
- scheduleAdditionalInfo?: ScheduleAdditionalInfo;
1725
+ memberId?: string;
1925
1726
  /**
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.
1727
+ * ID of a Wix user (site owner, contributor, etc.).
1728
+ * @format GUID
1931
1729
  */
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;
1730
+ wixUserId?: string;
1939
1731
  /**
1940
- * New item quantity.
1941
- *
1942
- * Min: `1`
1732
+ * ID of an app.
1733
+ * @format GUID
1943
1734
  */
1944
- quantity?: number | null;
1945
- /** Information about the new item tax. */
1946
- tax?: Tax;
1735
+ appId?: string;
1947
1736
  }
1948
- export interface BulkUpdateSubscriptionItemsByFilterResponse {
1949
- /**
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.
1953
- */
1954
- jobId?: string;
1737
+ export declare enum WebhookIdentityType {
1738
+ UNKNOWN = "UNKNOWN",
1739
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
1740
+ MEMBER = "MEMBER",
1741
+ WIX_USER = "WIX_USER",
1742
+ APP = "APP"
1955
1743
  }
1956
- export interface DeleteSubscriptionRequest {
1957
- id?: string;
1958
- revision?: string;
1744
+ export interface CreateSubscriptionInStateRequest extends CreateSubscriptionInStateRequestModeOneOf {
1745
+ activeSubscription?: CreateSubscriptionRequest;
1959
1746
  }
1960
- export interface DeleteSubscriptionResponse {
1747
+ /** @oneof */
1748
+ export interface CreateSubscriptionInStateRequestModeOneOf {
1749
+ activeSubscription?: CreateSubscriptionRequest;
1961
1750
  }
1962
- export interface CancelSubscriptionRequest {
1963
- id: string;
1964
- actionContext: ActionContext;
1751
+ export interface CreateSubscriptionRequest {
1752
+ subscription?: Subscription;
1753
+ /** Optional settings for the payments. Should be empty for free subscriptions. */
1754
+ paymentSettings?: PaymentSettings;
1755
+ /**
1756
+ * Optional unique identifier for this request in order to prevent subscription duplications
1757
+ * @format GUID
1758
+ */
1759
+ idempotencyKey?: string | null;
1760
+ /** Optional origin override for setting identity of subscription creator instead of extracting from context */
1761
+ originOverride?: OriginOverride;
1965
1762
  }
1966
- export interface ActionContext {
1967
- initiator?: ActionInitiator;
1968
- /** Optional action reason message */
1969
- reason?: string | null;
1763
+ export interface OriginOverride {
1764
+ /** @format GUID */
1765
+ appId?: string;
1766
+ /** @format GUID */
1767
+ instanceId?: string;
1970
1768
  }
1971
- export declare enum ActionInitiator {
1972
- UNDEFINED = "UNDEFINED",
1973
- BUSINESS = "BUSINESS",
1974
- CUSTOMER = "CUSTOMER",
1975
- SYSTEM = "SYSTEM"
1769
+ export interface CreateSubscriptionInStateResponse {
1770
+ /** @format GUID */
1771
+ subscriptionId?: string;
1976
1772
  }
1977
- export interface CancelSubscriptionResponse {
1978
- subscription?: Subscription;
1773
+ export interface PayCycleRequest {
1774
+ /** @format GUID */
1775
+ subscriptionId: string;
1776
+ paymentTestMode?: PaymentTestMode;
1777
+ /** @format GUID */
1778
+ tenantId: string;
1979
1779
  }
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;
1780
+ export declare enum PaymentTestMode {
1781
+ REGULAR = "REGULAR",
1782
+ FAIL_TECHNICAL = "FAIL_TECHNICAL",
1783
+ FAIL_DECLINE = "FAIL_DECLINE",
1784
+ FAIL_RETRYABLE_DECLINE = "FAIL_RETRYABLE_DECLINE"
1989
1785
  }
1990
- export interface PauseSubscriptionResponse {
1786
+ export interface PayCycleResponse {
1787
+ /** @format GUID */
1788
+ invoiceId?: string;
1789
+ /** @format GUID */
1790
+ paymentOrderId?: string | null;
1991
1791
  subscription?: Subscription;
1992
1792
  }
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;
1793
+ export interface GetFullSubscriptionDataRequest {
1794
+ /** @format GUID */
1795
+ id?: string;
1999
1796
  }
2000
- export interface ResumeSubscriptionResponse {
1797
+ export interface GetFullSubscriptionDataResponse {
2001
1798
  subscription?: Subscription;
1799
+ internalSubscriptionData?: InternalSubscriptionData;
2002
1800
  }
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;
1801
+ export interface InternalSubscriptionData {
1802
+ /** @format GUID */
1803
+ originInstanceId?: string;
1804
+ source?: string | null;
1805
+ billingType?: string;
1806
+ isOneTime?: boolean;
1807
+ migrationDetails?: MigrationDetails;
1808
+ pausePaidDuration?: string | null;
1809
+ authorizationPaymentData?: PaymentData;
1810
+ currentCyclePausePeriods?: PausePeriod[];
2012
1811
  }
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;
1812
+ export interface MigrationDetails {
1813
+ /** system (application) where the Subscription has been created */
1814
+ originSystem?: string;
1815
+ /** date when the Subscription started to be managed in BASS */
1816
+ shiftManagementDate?: Date | null;
2019
1817
  }
2020
- export interface SortingClauses {
2021
- sorting?: Sorting[];
1818
+ export interface PausePeriod {
1819
+ startDate?: Date | null;
1820
+ endDate?: Date | null;
2022
1821
  }
2023
- export interface SearchSubscriptionsResponse {
2024
- subscriptions?: Subscription[];
2025
- cursor?: CursorPaging;
1822
+ export interface GetSubscriptionAndInternalDataRequest {
1823
+ /** @format GUID */
1824
+ subscriptionId?: string;
1825
+ /** @format GUID */
1826
+ tenantId?: string;
2026
1827
  }
2027
- export interface TurnOnSubscriptionAutoRenewalRequest {
2028
- id: string;
2029
- actionContext: ActionContext;
1828
+ export interface GetSubscriptionAndInternalDataResponse {
1829
+ subscription?: Subscription;
1830
+ internalSubscriptionData?: InternalSubscriptionData;
2030
1831
  }
2031
- export interface TurnOnSubscriptionAutoRenewalResponse {
1832
+ export interface SearchSubscriptionRequest {
1833
+ /** @format GUID */
1834
+ id?: string;
1835
+ /** @format GUID */
1836
+ tenantId?: string;
1837
+ }
1838
+ export interface SearchSubscriptionResponse {
2032
1839
  subscription?: Subscription;
2033
1840
  }
2034
- export interface TurnOffSubscriptionAutoRenewalRequest {
2035
- id: string;
2036
- actionContext: ActionContext;
1841
+ export interface UpdatePausePaidDurationRequest {
1842
+ /** @format GUID */
1843
+ subscriptionId?: string;
1844
+ /**
1845
+ * @min 1
1846
+ * @max 10000000
1847
+ */
1848
+ pausePaidDurationSeconds?: string;
1849
+ /** @format GUID */
1850
+ tenantId?: string;
2037
1851
  }
2038
- export interface TurnOffSubscriptionAutoRenewalResponse {
1852
+ export interface UpdatePausePaidDurationResponse {
1853
+ }
1854
+ export interface UpdateStatusRequest {
1855
+ /** @format GUID */
1856
+ subscriptionId?: string;
1857
+ /** @format GUID */
1858
+ tenantId?: string;
1859
+ status?: SubscriptionStatusEnumSubscriptionStatus;
1860
+ }
1861
+ export interface UpdateStatusResponse {
2039
1862
  subscription?: Subscription;
2040
1863
  }
2041
- export interface MarkLatestInvoiceAsPaidRequest {
2042
- /** The ID of the offline subscription to mark as paid its latest invoice */
2043
- subscriptionId: string;
1864
+ export interface UpdatePaymentStatusRequest {
1865
+ /** @format GUID */
1866
+ subscriptionId?: string;
1867
+ /** @format GUID */
1868
+ tenantId?: string;
1869
+ paymentStatus?: PaymentStatus;
2044
1870
  }
2045
- export interface MarkLatestInvoiceAsPaidResponse {
1871
+ export interface UpdatePaymentStatusResponse {
2046
1872
  subscription?: Subscription;
2047
1873
  }
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;
1874
+ export interface ReviveSubscriptionRequest {
1875
+ /** @format GUID */
1876
+ tenantId?: string;
1877
+ /** @format GUID */
1878
+ subscriptionId?: string;
1879
+ revivePolicy?: RevivePolicy;
1880
+ isTestRun?: boolean;
2053
1881
  }
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;
1882
+ export declare enum RevivePolicy {
1883
+ SIMPLE = "SIMPLE",
1884
+ RESUME = "RESUME"
2062
1885
  }
2063
- export interface MarkInvoiceAsPaidResponse {
1886
+ export interface ReviveSubscriptionResponse {
2064
1887
  subscription?: Subscription;
2065
1888
  }
2066
- export interface GetSubscriptionsStatsRequest {
1889
+ export interface ConvertSapiRequest {
1890
+ /** @format GUID */
1891
+ subscriptionId?: string;
2067
1892
  }
2068
- export interface GetSubscriptionsStatsResponse {
2069
- amountByStatuses?: AmountByStatus[];
2070
- total?: number;
1893
+ export interface ConvertSapiResponse {
1894
+ subscription?: Subscription;
2071
1895
  }
2072
- export interface AmountByStatus {
2073
- status?: SubscriptionStatusEnumSubscriptionStatus;
2074
- amount?: number;
1896
+ export interface GetSubscriptionInvoicesRequest {
1897
+ /** @format GUID */
1898
+ id?: string;
2075
1899
  }
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;
1900
+ export interface GetSubscriptionInvoicesResponse {
1901
+ invoices?: SubscriptionInvoice[];
2084
1902
  }
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;
1903
+ export interface SubscriptionInvoice {
1904
+ /** @format GUID */
1905
+ id?: string;
1906
+ subscriptionCycle?: number;
1907
+ createdDate?: Date | null;
2091
1908
  }
2092
- export interface ExtendSubscriptionResponse {
2093
- /** The now extended subscription */
1909
+ export interface FinishFreeTrialNowRequest {
1910
+ /** @format GUID */
1911
+ subscriptionId?: string;
1912
+ /** @format GUID */
1913
+ tenantId?: string;
1914
+ }
1915
+ export interface FinishFreeTrialNowResponse {
2094
1916
  subscription?: Subscription;
2095
1917
  }
2096
- export interface AllowedActionsRequest {
2097
- id: string;
2098
- /** List of additional fields to be included in the response. */
2099
- fields?: RequestedFields[];
1918
+ export interface SendTimeCapsuleTaskCanceledBIRequest {
1919
+ /** @format GUID */
1920
+ tenantId?: string;
1921
+ /** @format GUID */
1922
+ subscriptionId?: string;
1923
+ /** @minLength 1 */
1924
+ taskType?: string;
2100
1925
  }
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"
1926
+ export interface Empty {
2105
1927
  }
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[];
1928
+ export interface ScheduleTimeCapsuleTaskRequest {
1929
+ /** @format GUID */
1930
+ subscriptionId?: string;
1931
+ /** @minLength 1 */
1932
+ taskType?: string;
1933
+ executionTime?: Date | null;
1934
+ /** @format GUID */
1935
+ tenantId?: string;
2111
1936
  }
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[];
1937
+ export interface CancelTimeCapsuleTaskRequest {
1938
+ /** @format GUID */
1939
+ tenantId?: string;
1940
+ /** @format GUID */
1941
+ subscriptionId?: string;
1942
+ /** @minLength 1 */
1943
+ taskType?: string;
2116
1944
  }
2117
- export interface UnsupportedReason {
2118
- code?: string;
2119
- description?: string | null;
1945
+ export interface UpdateFullSubscriptionRequest {
1946
+ /** @format GUID */
1947
+ tenantId?: string;
1948
+ subscription?: Subscription;
2120
1949
  }
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;
1950
+ export interface UpdateFullSubscriptionResponse {
1951
+ subscription?: Subscription;
2131
1952
  }
2132
- export interface ListUpcomingChargesResponse {
2133
- upcomingCharges?: SubscriptionCharge[];
1953
+ export interface UpdateSubscriptionInvoiceCycleRequest {
1954
+ /** @format GUID */
1955
+ subscriptionId?: string;
1956
+ /** @format GUID */
1957
+ tenantId?: string;
1958
+ /** @format GUID */
1959
+ invoiceId?: string;
1960
+ subscriptionCycle?: number;
2134
1961
  }
2135
- export interface PreviewSubscriptionChargesRequest extends PreviewSubscriptionChargesRequestSubscriptionOneOf {
2136
- /** Information about a non-existing subscription. */
2137
- subscriptionInfo?: SubscriptionInfo;
1962
+ export interface UpdateSubscriptionInvoiceCycleResponse {
1963
+ subscriptionInvoice?: SubscriptionInvoice;
2138
1964
  }
2139
- /** @oneof */
2140
- export interface PreviewSubscriptionChargesRequestSubscriptionOneOf {
2141
- /** Information about a non-existing subscription. */
2142
- subscriptionInfo?: SubscriptionInfo;
1965
+ export interface AddPausePeriodRequest {
1966
+ /** @format GUID */
1967
+ tenantId?: string;
1968
+ /** @format GUID */
1969
+ subscriptionId?: string;
1970
+ pauseStartDate?: Date | null;
1971
+ pauseEndDate?: Date | null;
2143
1972
  }
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;
1973
+ export interface AddPausePeriodResponse {
1974
+ subscription?: Subscription;
2149
1975
  }
2150
- export interface PreviewSubscriptionChargesResponse {
2151
- /** Charges for subscription. */
2152
- charges?: Charge[];
1976
+ export interface RunTimeCapsuleTaskNowRequest {
1977
+ /** @format GUID */
1978
+ tenantId?: string;
1979
+ /** @format GUID */
1980
+ subscriptionId?: string;
1981
+ /** @minLength 1 */
1982
+ taskType?: string;
2153
1983
  }
2154
- /** Represents a charge applicable to a subscription. */
2155
- export interface Charge {
2156
- /** The cycle number from which the charge starts. */
2157
- cycleFrom?: number;
2158
- /** The number of cycles for which the charge is applicable. */
2159
- cycleCount?: number | null;
2160
- /** The breakdown of the charge */
2161
- totals?: Totals;
2162
- /** The billing date from which the charge starts */
2163
- cycleBillingDate?: Date | null;
1984
+ export interface CreateRecurringInvoiceBORequest {
1985
+ /** @format GUID */
1986
+ subscriptionId?: string;
1987
+ /** @format GUID */
1988
+ tenantId?: string;
1989
+ /** @min 2 */
1990
+ cycleNumber?: number;
2164
1991
  }
2165
- export interface PreviewSubscriptionsChargesRequest {
2166
- /** Information required to calculate the preview charges for the subscriptions, including an identifier. */
2167
- subscriptionsBillingDetails?: SubscriptionBillingDetails[];
1992
+ export interface CreateRecurringInvoiceBOResponse {
1993
+ invoiceId?: string;
1994
+ }
1995
+ export interface SetShiftingDataRequest {
1996
+ /** @format GUID */
1997
+ subscriptionId?: string;
1998
+ /** @format GUID */
1999
+ tenantId?: string;
2000
+ isBassManaged?: boolean;
2001
+ shiftManagementDate?: Date | null;
2002
+ }
2003
+ export interface SetShiftingDataResponse {
2004
+ subscription?: Subscription;
2005
+ }
2006
+ export interface FixSubscriptionInvoicesRequest extends FixSubscriptionInvoicesRequestModeOneOf {
2007
+ attachInvoice?: AttachInvoice;
2008
+ detachInvoice?: DetachInvoice;
2009
+ /** @format GUID */
2010
+ tenantId?: string;
2011
+ /** @format GUID */
2012
+ subscriptionId?: string;
2013
+ }
2014
+ /** @oneof */
2015
+ export interface FixSubscriptionInvoicesRequestModeOneOf {
2016
+ attachInvoice?: AttachInvoice;
2017
+ detachInvoice?: DetachInvoice;
2018
+ }
2019
+ export interface AttachInvoice {
2020
+ /** @format GUID */
2021
+ invoiceId?: string;
2022
+ }
2023
+ export interface DetachInvoice {
2024
+ /** @format GUID */
2025
+ invoiceId?: string;
2026
+ }
2027
+ export interface FixSubscriptionInvoicesResponse {
2028
+ invoices?: SubscriptionInvoice[];
2029
+ }
2030
+ export interface RestoreDraftSubscriptionRequest {
2031
+ /** @format GUID */
2032
+ tenantId?: string;
2033
+ /** @format GUID */
2034
+ subscriptionId?: string;
2035
+ }
2036
+ export interface RestoreDraftSubscriptionResponse {
2037
+ subscription?: Subscription;
2038
+ }
2039
+ export interface DeleteDraftSubscriptionRequest {
2040
+ /** @format GUID */
2041
+ tenantId?: string;
2042
+ /** @format GUID */
2043
+ subscriptionId?: string;
2044
+ }
2045
+ export interface DeleteDraftSubscriptionResponse {
2046
+ subscription?: Subscription;
2047
+ }
2048
+ export interface DeleteSubscriptionBORequest {
2049
+ /** @format GUID */
2050
+ tenantId?: string;
2051
+ /** @format GUID */
2052
+ subscriptionId?: string;
2053
+ }
2054
+ export interface DeleteSubscriptionBOResponse {
2055
+ subscription?: Subscription;
2056
+ }
2057
+ export interface CancelSubscriptionBORequest {
2058
+ /** @format GUID */
2059
+ tenantId?: string;
2060
+ /** @format GUID */
2061
+ subscriptionId?: string;
2062
+ initiator?: ActionInitiator;
2063
+ reason?: string | null;
2064
+ }
2065
+ export declare enum ActionInitiator {
2066
+ UNDEFINED = "UNDEFINED",
2067
+ BUSINESS = "BUSINESS",
2068
+ CUSTOMER = "CUSTOMER",
2069
+ SYSTEM = "SYSTEM"
2070
+ }
2071
+ export interface CancelSubscriptionBOResponse {
2072
+ subscription?: Subscription;
2073
+ }
2074
+ export interface UpdatePaymentMethodBORequest {
2075
+ /** @format GUID */
2076
+ tenantId?: string;
2077
+ /** @format GUID */
2078
+ subscriptionId?: string;
2079
+ /** @format GUID */
2080
+ paymentMethodId?: string;
2081
+ }
2082
+ export interface UpdatePaymentMethodBOResponse {
2083
+ subscription?: Subscription;
2084
+ }
2085
+ export interface SendSubscriptionActionEventBORequest extends SendSubscriptionActionEventBORequestEventOneOf {
2086
+ billingCycleStarted?: SubscriptionBillingCycleStarted;
2087
+ /** @format GUID */
2088
+ tenantId?: string;
2089
+ /** @format GUID */
2090
+ subscriptionId?: string;
2091
+ }
2092
+ /** @oneof */
2093
+ export interface SendSubscriptionActionEventBORequestEventOneOf {
2094
+ billingCycleStarted?: SubscriptionBillingCycleStarted;
2095
+ }
2096
+ export interface SubscriptionBillingCycleStarted {
2097
+ subscription?: Subscription;
2098
+ /**
2099
+ * Wix Pay transaction id, optional. Exists if event was triggered by a payment.
2100
+ * @format GUID
2101
+ */
2102
+ paymentTransactionId?: string | null;
2103
+ }
2104
+ export interface SendSubscriptionActionEventResponse {
2105
+ }
2106
+ export interface HandleSubscriptionAfterInvoiceMarkedAsPaidRequest {
2107
+ /** @format GUID */
2108
+ tenantId?: string;
2109
+ /** @format GUID */
2110
+ subscriptionId?: string;
2111
+ transactionId?: string;
2112
+ }
2113
+ export interface PauseSubscriptionBORequest {
2114
+ /** @format GUID */
2115
+ tenantId?: string;
2116
+ /** @format GUID */
2117
+ subscriptionId?: string;
2118
+ pausePolicy?: PausePolicy;
2119
+ pauseAt?: PauseAt;
2120
+ initiator?: ActionInitiator;
2121
+ /** @maxLength 500 */
2122
+ reason?: string | null;
2123
+ }
2124
+ export interface PauseSubscriptionBOResponse {
2125
+ subscription?: Subscription;
2126
+ }
2127
+ export interface SetIsMigratedEvent {
2128
+ /** @format GUID */
2129
+ subscriptionId?: string;
2130
+ }
2131
+ export interface SubscriptionDelayedSyncEvent {
2132
+ /** @format GUID */
2133
+ subscriptionId?: string;
2134
+ }
2135
+ export interface InvoiceAction extends InvoiceActionActionTypeOneOf {
2136
+ payRecurring?: PayRecurringInvoice;
2137
+ }
2138
+ /** @oneof */
2139
+ export interface InvoiceActionActionTypeOneOf {
2140
+ payRecurring?: PayRecurringInvoice;
2141
+ }
2142
+ export interface PayRecurringInvoice {
2143
+ /** @format GUID */
2144
+ invoiceId?: string;
2145
+ }
2146
+ /**
2147
+ * Sent each time a subscription status has been set to Active
2148
+ * Active shows that a subscription is live and operational.
2149
+ * For example:
2150
+ * * For subscription with free trial, free trial start date is also the activation date.
2151
+ * * For a subscription with future start date, the start date is also the activation date.
2152
+ * * When a subscription is resumed from a pause status, the resume date is also the activation date.
2153
+ */
2154
+ export interface SubscriptionActivated {
2155
+ subscription?: Subscription;
2156
+ }
2157
+ /**
2158
+ * Sent each time a subscription status has been set to Ended
2159
+ * Ended shows that a subscription reached its end date and ended its life cycle as a result of the agreement.
2160
+ * This is different from a Canceled subscription which ends the subscription before a designated end date.
2161
+ * Therefore, Ended and Canceled are mutually exclusive.
2162
+ */
2163
+ export interface SubscriptionEnded {
2164
+ subscription?: Subscription;
2165
+ }
2166
+ export interface SubscriptionInitialPurchaseCompleted {
2167
+ subscription?: Subscription;
2168
+ actionDetails?: ActionDetails;
2169
+ /** @format GUID */
2170
+ paymentTransactionId?: string | null;
2171
+ }
2172
+ export interface SubscriptionCycleReadyToPay {
2173
+ subscription?: Subscription;
2174
+ }
2175
+ export interface SubscriptionRevived {
2176
+ subscription?: Subscription;
2177
+ }
2178
+ export interface CreateSubscriptionResponse {
2179
+ subscription?: Subscription;
2180
+ /**
2181
+ * Payments order that should be paid (or authorize card) in order to activate subscription. Empty for free subscriptions.
2182
+ * @format GUID
2183
+ */
2184
+ paymentOrderId?: string | null;
2185
+ }
2186
+ export interface UpdateSubscriptionRequest {
2187
+ /** Revision is validated if Subscription.revision is set */
2188
+ subscription?: Subscription;
2189
+ /**
2190
+ * Supported field: start_date
2191
+ * Can be updated only if Subscription is in Draft state
2192
+ */
2193
+ fieldMask?: string[];
2194
+ }
2195
+ export interface UpdateSubscriptionResponse {
2196
+ subscription?: Subscription;
2197
+ }
2198
+ export interface UpdateSubscriptionStartDateRequest {
2199
+ /**
2200
+ * Subscription ID
2201
+ * @format GUID
2202
+ */
2203
+ id?: string;
2204
+ /**
2205
+ * Can be updated only if Subscription is in Draft state
2206
+ * By setting start_date in the future, end_date will be recalculated for termed Subscriptions
2207
+ * cycles_to_pay_on_creation will be set to 1 if no free trial is set
2208
+ */
2209
+ startDate?: Date | null;
2210
+ }
2211
+ export interface UpdateSubscriptionStartDateResponse {
2212
+ subscription?: Subscription;
2213
+ }
2214
+ export interface UpdateSubscriptionPoliciesRequest {
2215
+ /**
2216
+ * Subscription ID
2217
+ * @format GUID
2218
+ */
2219
+ id?: string;
2220
+ cancellableByCustomer?: boolean | null;
2221
+ }
2222
+ export interface UpdateSubscriptionPoliciesResponse {
2223
+ /** Updated policies of the subscription */
2224
+ policies?: SubscriptionPolicies;
2225
+ }
2226
+ export interface UpdateSubscriptionBillingDateRequest {
2227
+ /**
2228
+ * ID of the subscription to update the billing date for.
2229
+ * @format GUID
2230
+ */
2231
+ id: string;
2232
+ /** New billing date in `YYYY-MM-DDThh:mm:ss:sssZ` format. */
2233
+ billingDate: Date | null;
2234
+ /**
2235
+ * Information about how BASS adjusts the total of the next invoice. Extending
2236
+ * the current billing cycle results in a higher payment, while shortening it
2237
+ * leads to a lower payment. BASS offers automatic calculation of the proration
2238
+ * amount based on the number of days added to or removed from the current billing
2239
+ * cycle. Alternatively, you can use your own custom method to calculate the
2240
+ * proration amount. The custom proration amount can't exceed the total of the
2241
+ * current billing cycle.
2242
+ */
2243
+ proration?: Proration;
2244
+ }
2245
+ export interface UpdateSubscriptionBillingDateResponse {
2246
+ /** Updated subscription. */
2247
+ subscription?: Subscription;
2248
+ }
2249
+ export interface SubscriptionBillingDateUpdated {
2250
+ subscription?: Subscription;
2251
+ billingDate?: Date | null;
2252
+ proration?: Proration;
2253
+ }
2254
+ export interface UpdateSubscriptionOriginRequest {
2255
+ /**
2256
+ * ID of the subscription to update origin.
2257
+ * @format GUID
2258
+ */
2259
+ id?: string;
2260
+ /**
2261
+ * Origin entity ID of the subscription to update.
2262
+ * @format GUID
2263
+ */
2264
+ entityId?: string;
2265
+ }
2266
+ export interface UpdateSubscriptionOriginResponse {
2267
+ /** Updated subscription. */
2268
+ subscription?: Subscription;
2269
+ }
2270
+ export interface ReviseSubscriptionRequest {
2271
+ /**
2272
+ * Subscription ID
2273
+ * @format GUID
2274
+ */
2275
+ id?: string;
2276
+ /**
2277
+ * 0 for no revision, maxSize is 100
2278
+ * @maxSize 100
2279
+ */
2280
+ items?: Item[];
2281
+ }
2282
+ export interface ReviseSubscriptionResponse {
2283
+ subscription?: Subscription;
2284
+ }
2285
+ export interface UpdateSubscriptionItemsRequest {
2286
+ /**
2287
+ * Subscription ID
2288
+ * @format GUID
2289
+ */
2290
+ id?: string;
2291
+ /** Update action. For RESET_PENDING_UPDATES, nothing but the subscription ID should be defined in the request. */
2292
+ updateAction?: UpdateAction;
2293
+ /** Updates execution date. Relevant only for UpdateAction.SPECIFIC_DATE. Only specific date is supported. */
2294
+ scheduleAdditionalInfo?: ScheduleAdditionalInfo;
2295
+ /**
2296
+ * Existing items to update
2297
+ * @maxSize 100
2298
+ */
2299
+ itemsToUpdate?: ItemChange[];
2300
+ /**
2301
+ * Items to add
2302
+ * @maxSize 99
2303
+ */
2304
+ itemsToAdd?: Item[];
2305
+ /**
2306
+ * Existing items to delete
2307
+ * @format GUID
2308
+ * @maxSize 99
2309
+ */
2310
+ itemsToDelete?: string[] | null;
2311
+ }
2312
+ export declare enum UpdateAction {
2313
+ NONE = "NONE",
2314
+ /** Update subscription immediately, please note proration for updates changing price are not yet supported */
2315
+ IMMEDIATELY = "IMMEDIATELY",
2316
+ /** Request updates that will take affect only at the start of the next billing cycle. */
2317
+ NEXT_BILLING_CYCLE = "NEXT_BILLING_CYCLE",
2318
+ /** Reset all pending updates */
2319
+ RESET_PENDING_UPDATES = "RESET_PENDING_UPDATES",
2320
+ /** Request updates that will take affect only at a specific date. */
2321
+ SPECIFIC_DATE = "SPECIFIC_DATE"
2322
+ }
2323
+ export interface ScheduleAdditionalInfo extends ScheduleAdditionalInfoParamOneOf {
2324
+ /**
2325
+ * Future date when the update becomes effective in `YYYY-MM-DDThh:mm:ss.sssZ`
2326
+ * format. The use of this field may be restricted in various BASS endpoints.
2327
+ * For example, in _Bulk Update Subscription Items_ it's only available in
2328
+ * combination with `{"updateAction": "SPECIFIC_DATE"}`, in _Resume Subscription_
2329
+ * only in combination with `{"resumeAt": "SPECIFIC_DATE"}`, and in
2330
+ * _Pause Subscription_ only in combination with `{"pauseAt": "SPECIFIC_DATE"}`.
2331
+ */
2332
+ specificDate?: Date | null;
2333
+ /**
2334
+ * When the update becomes effective, as number of billing cycles from now.
2335
+ * The use of this field may be restricted in various BASS endpoints.
2336
+ * For example, in _Pause Subscription_ it's only available in
2337
+ * combination with `{"pauseAt": "NUMBER_OF_CYCLES_FROM_TODAY"}`.
2338
+ * __Note__: Currently not supported in _Bulk Update Subscription Items by Filter_.
2339
+ * @min 1
2340
+ */
2341
+ numberOfCycles?: number;
2342
+ }
2343
+ /** @oneof */
2344
+ export interface ScheduleAdditionalInfoParamOneOf {
2345
+ /**
2346
+ * Future date when the update becomes effective in `YYYY-MM-DDThh:mm:ss.sssZ`
2347
+ * format. The use of this field may be restricted in various BASS endpoints.
2348
+ * For example, in _Bulk Update Subscription Items_ it's only available in
2349
+ * combination with `{"updateAction": "SPECIFIC_DATE"}`, in _Resume Subscription_
2350
+ * only in combination with `{"resumeAt": "SPECIFIC_DATE"}`, and in
2351
+ * _Pause Subscription_ only in combination with `{"pauseAt": "SPECIFIC_DATE"}`.
2352
+ */
2353
+ specificDate?: Date | null;
2354
+ /**
2355
+ * When the update becomes effective, as number of billing cycles from now.
2356
+ * The use of this field may be restricted in various BASS endpoints.
2357
+ * For example, in _Pause Subscription_ it's only available in
2358
+ * combination with `{"pauseAt": "NUMBER_OF_CYCLES_FROM_TODAY"}`.
2359
+ * __Note__: Currently not supported in _Bulk Update Subscription Items by Filter_.
2360
+ * @min 1
2361
+ */
2362
+ numberOfCycles?: number;
2363
+ }
2364
+ export interface UpdateSubscriptionItemsResponse {
2365
+ subscription?: Subscription;
2366
+ }
2367
+ export interface BulkUpdateSubscriptionItemsByFilterRequest {
2368
+ /**
2369
+ * Filter to identify the subscriptions for which items are updated. For
2370
+ * supported fields see
2371
+ * [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).
2372
+ * Sending an empty subscription filter results in a validation error.
2373
+ * In case you pass `{"updateAction": "RESET_PENDING_UPDATES"}`, use only the
2374
+ * `subscriptionId` field inside this filter. Passing any other filter results
2375
+ * in a failed validation error.
2376
+ */
2377
+ subscriptionFilter?: Record<string, any> | null;
2378
+ /**
2379
+ * Filter to specify which subscription items are updated. Make sure to use
2380
+ * the catalog item ID and not the item's unique ID. All subscription items
2381
+ * with matching `items.catalogReference.catalogItemId` are updated.
2382
+ *
2383
+ * Max: `100` reference catalog item IDs
2384
+ * @format GUID
2385
+ * @maxSize 100
2386
+ */
2387
+ catalogReferenceIds?: string[] | null;
2388
+ /**
2389
+ * Information about the update timing and update type.
2390
+ *
2391
+ * + `"IMMEDIATELY"`: The updates become effective immediately.
2392
+ * + `"NEXT_BILLING_CYCLE"`: The updates are scheduled for the beginning of the next billing cycle.
2393
+ * + `"SPECIFIC_DATE"`: The updates are scheduled for the date specified in `scheduleAdditionalInfo.specificDate`.
2394
+ * + `"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.
2395
+ */
2396
+ updateAction?: UpdateAction;
2397
+ /**
2398
+ * Additional information for updates. Currently, only supported for
2399
+ * `{"updateAction": "SPECIFIC_DATE"}`.
2400
+ */
2401
+ scheduleAdditionalInfo?: ScheduleAdditionalInfo;
2402
+ /**
2403
+ * Update details for the susbcription items that match the filtering.
2404
+ * Currently, you can update only the item price, quantity, and tax. Note
2405
+ * that all item properties are updated to the same values. In case you want set
2406
+ * different values for individual items, you must call
2407
+ * _Bulk Update Subscription Items By Filter_ multiple times, once per unique update.
2408
+ */
2409
+ bulkItemUpdateData?: BulkItemChange;
2410
+ /**
2411
+ * __Not implemented yet__. Items to add to the subscriptions matching the filtering.
2412
+ * @maxSize 99
2413
+ */
2414
+ itemsToAdd?: Item[];
2415
+ }
2416
+ export interface BulkItemChange {
2417
+ /** Information about the new item price. */
2418
+ pricingModel?: PricingModel;
2419
+ /**
2420
+ * New item quantity.
2421
+ *
2422
+ * Min: `1`
2423
+ * @min 1
2424
+ */
2425
+ quantity?: number | null;
2426
+ /** Information about the new item tax. */
2427
+ tax?: Tax;
2428
+ }
2429
+ export interface BulkUpdateSubscriptionItemsByFilterResponse {
2430
+ /**
2431
+ * ID of your bulk job. You can use
2432
+ * [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)
2433
+ * to retrieve information about the job status.
2434
+ */
2435
+ jobId?: string;
2436
+ }
2437
+ export interface DeleteSubscriptionRequest {
2438
+ /** @format GUID */
2439
+ id?: string;
2440
+ revision?: string;
2441
+ }
2442
+ export interface DeleteSubscriptionResponse {
2443
+ }
2444
+ export interface CancelSubscriptionRequest {
2445
+ /** @format GUID */
2446
+ id: string;
2447
+ actionContext: ActionContext;
2448
+ }
2449
+ export interface ActionContext {
2450
+ initiator?: ActionInitiator;
2451
+ /** Optional action reason message */
2452
+ reason?: string | null;
2453
+ }
2454
+ export interface CancelSubscriptionResponse {
2455
+ subscription?: Subscription;
2456
+ }
2457
+ export interface PauseSubscriptionRequest {
2458
+ /** @format GUID */
2459
+ id: string;
2460
+ pausePolicy?: PausePolicy;
2461
+ pauseAt?: PauseAt;
2462
+ /** contains additional scheduling information for certain pause_at options (for example: SPECIFIC_DATE & NUMBER_OF_CYCLES_FROM_TODAY) */
2463
+ pauseAtSchedule?: ScheduleAdditionalInfo;
2464
+ /** contains additional scheduling information for certain auto_resume_at either specific date */
2465
+ autoResumeAtSchedule?: ScheduleAdditionalInfo;
2466
+ actionContext: ActionContext;
2467
+ }
2468
+ export interface PauseSubscriptionResponse {
2469
+ subscription?: Subscription;
2470
+ }
2471
+ export interface SubscriptionPaused {
2472
+ subscription?: Subscription;
2473
+ pausePolicy?: PausePolicy;
2474
+ actionDetails?: ActionDetails;
2475
+ }
2476
+ export interface PauseSubscriptionRequested {
2477
+ subscription?: Subscription;
2478
+ pauseAt?: PauseAt;
2479
+ pausePolicy?: PausePolicy;
2480
+ actionDetails?: ActionDetails;
2481
+ }
2482
+ export interface ScheduledPauseCanceled {
2483
+ subscription?: Subscription;
2484
+ actionDetails?: ActionDetails;
2485
+ }
2486
+ export interface ResumeSubscriptionRequest {
2487
+ /** @format GUID */
2488
+ id: string;
2489
+ resumeAt?: ResumeAt;
2490
+ /** contains additional scheduling information for certain resume_at options (for example: SPECIFIC_DATE) */
2491
+ resumeAtSchedule?: ScheduleAdditionalInfo;
2492
+ actionContext: ActionContext;
2493
+ }
2494
+ export interface ResumeSubscriptionResponse {
2495
+ subscription?: Subscription;
2496
+ }
2497
+ export interface SubscriptionResumed {
2498
+ subscription?: Subscription;
2499
+ actionDetails?: ActionDetails;
2500
+ }
2501
+ export interface ResumeSubscriptionRequested {
2502
+ subscription?: Subscription;
2503
+ resumeAt?: ResumeAt;
2504
+ actionDetails?: ActionDetails;
2505
+ }
2506
+ export interface ScheduledResumeCanceled {
2507
+ subscription?: Subscription;
2508
+ actionDetails?: ActionDetails;
2509
+ }
2510
+ export interface SearchSubscriptionsRequest extends SearchSubscriptionsRequestPagingMethodOneOf {
2511
+ /** Limit number of results and enable to skip rows. The default limit is 25. */
2512
+ paging?: Paging;
2513
+ /** A Cursor option for efficient paging. Pass this field from the previous search response to continue to the next page. */
2514
+ cursor?: CursorPaging;
2515
+ /** A filter object */
2516
+ filter?: any;
2517
+ /** A Sorting option by field name and order. */
2518
+ sorting?: SortingClauses;
2519
+ }
2520
+ /** @oneof */
2521
+ export interface SearchSubscriptionsRequestPagingMethodOneOf {
2522
+ /** Limit number of results and enable to skip rows. The default limit is 25. */
2523
+ paging?: Paging;
2524
+ /** A Cursor option for efficient paging. Pass this field from the previous search response to continue to the next page. */
2525
+ cursor?: CursorPaging;
2526
+ }
2527
+ export interface SortingClauses {
2528
+ sorting?: Sorting[];
2529
+ }
2530
+ export interface SearchSubscriptionsResponse {
2531
+ subscriptions?: Subscription[];
2532
+ cursor?: CursorPaging;
2533
+ }
2534
+ export interface TurnOnSubscriptionAutoRenewalRequest {
2535
+ /** @format GUID */
2536
+ id: string;
2537
+ actionContext: ActionContext;
2538
+ }
2539
+ export interface TurnOnSubscriptionAutoRenewalResponse {
2540
+ subscription?: Subscription;
2541
+ }
2542
+ export interface SubscriptionAutoRenewalTurnedOn {
2543
+ subscription?: Subscription;
2544
+ actionDetails?: ActionDetails;
2545
+ }
2546
+ export interface TurnOffSubscriptionAutoRenewalRequest {
2547
+ /** @format GUID */
2548
+ id: string;
2549
+ actionContext: ActionContext;
2550
+ }
2551
+ export interface TurnOffSubscriptionAutoRenewalResponse {
2552
+ subscription?: Subscription;
2553
+ }
2554
+ export interface SubscriptionAutoRenewalTurnedOff {
2555
+ subscription?: Subscription;
2556
+ actionDetails?: ActionDetails;
2557
+ }
2558
+ export interface MarkLatestInvoiceAsPaidRequest {
2559
+ /**
2560
+ * The ID of the offline subscription to mark as paid its latest invoice
2561
+ * @format GUID
2562
+ */
2563
+ subscriptionId: string;
2564
+ }
2565
+ export interface MarkLatestInvoiceAsPaidResponse {
2566
+ subscription?: Subscription;
2567
+ }
2568
+ export interface LatestInvoiceMarkedAsPaid {
2569
+ subscription?: Subscription;
2570
+ }
2571
+ export interface MultipleSubscriptionsOnOrdersInvoice {
2572
+ /**
2573
+ * the invoice id of the affected subscription
2574
+ * @format GUID
2575
+ */
2576
+ invoiceId?: string;
2577
+ /**
2578
+ * the order id of the affected subscription
2579
+ * @format GUID
2580
+ */
2581
+ orderId?: string;
2582
+ }
2583
+ /** TODO: to delete after ECOM adjustments */
2584
+ export interface MarkInvoiceAsPaidRequest {
2585
+ /**
2586
+ * The ID of the subscription to mark as paid its invoice.
2587
+ * @format GUID
2588
+ */
2589
+ subscriptionId: string;
2590
+ /**
2591
+ * The subscription cycle for which the invoice is to be marked as paid.
2592
+ * If left empty, the most recent cycle will be selected.
2593
+ * @min 1
2594
+ */
2595
+ paidCycle?: number | null;
2596
+ }
2597
+ /** TODO: to delete after ECOM adjustments */
2598
+ export interface MarkInvoiceAsPaidResponse {
2599
+ subscription?: Subscription;
2600
+ }
2601
+ export interface MarkBillingCycleAsPaidRequest {
2602
+ /**
2603
+ * The ID of the subscription to mark as paid its invoice.
2604
+ * @format GUID
2605
+ */
2606
+ subscriptionId: string;
2607
+ /**
2608
+ * The subscription cycle for which the invoice is to be marked as paid.
2609
+ * If left empty, the most recent cycle will be selected.
2610
+ * @min 1
2611
+ */
2612
+ paidCycle?: number | null;
2613
+ }
2614
+ export interface MarkBillingCycleAsPaidResponse {
2615
+ subscription?: Subscription;
2616
+ }
2617
+ export interface GetSubscriptionsStatsRequest {
2618
+ }
2619
+ export interface GetSubscriptionsStatsResponse {
2620
+ amountByStatuses?: AmountByStatus[];
2621
+ total?: number;
2622
+ }
2623
+ export interface AmountByStatus {
2624
+ status?: SubscriptionStatusEnumSubscriptionStatus;
2625
+ amount?: number;
2626
+ }
2627
+ export interface ExtendSubscriptionRequest extends ExtendSubscriptionRequestExtendPolicyOneOf {
2628
+ /** User won't be charged for additional period added on top of subscription end date. */
2629
+ extensionPeriod?: Duration;
2630
+ /**
2631
+ * user will be charged for billing cycles added
2632
+ * @min 1
2633
+ */
2634
+ extensionBillingCycles?: number;
2635
+ /**
2636
+ * The ID of the subscription to be extended
2637
+ * @format GUID
2638
+ */
2639
+ id: string;
2640
+ actionContext: ActionContext;
2641
+ }
2642
+ /** @oneof */
2643
+ export interface ExtendSubscriptionRequestExtendPolicyOneOf {
2644
+ /** User won't be charged for additional period added on top of subscription end date. */
2645
+ extensionPeriod?: Duration;
2646
+ /**
2647
+ * user will be charged for billing cycles added
2648
+ * @min 1
2649
+ */
2650
+ extensionBillingCycles?: number;
2651
+ }
2652
+ export interface ExtendSubscriptionResponse {
2653
+ /** The now extended subscription */
2654
+ subscription?: Subscription;
2655
+ }
2656
+ export interface AllowedActionsRequest {
2657
+ /** @format GUID */
2658
+ id: string;
2659
+ /**
2660
+ * List of additional fields to be included in the response.
2661
+ * @maxSize 1
2662
+ */
2663
+ fields?: RequestedFields[];
2664
+ }
2665
+ export declare enum RequestedFields {
2666
+ UNKNOWN_REQUESTED_FIELD = "UNKNOWN_REQUESTED_FIELD",
2667
+ /** Include unsupported action list, including the reasons for the lack of support */
2668
+ UNSUPPORTED_ACTION = "UNSUPPORTED_ACTION"
2669
+ }
2670
+ export interface AllowedActionsResponse {
2671
+ /** List of actions that are allowed. */
2672
+ actions?: Action[];
2673
+ /**
2674
+ * List of actions that are not supported, included only if requested. Provides reasons for each unsupported action.
2675
+ * @maxSize 20
2676
+ */
2677
+ unsupportedActions?: UnsupportedAction[];
2678
+ }
2679
+ export interface UnsupportedAction {
2680
+ actionType?: ActionType;
2681
+ /**
2682
+ * Provides detailed reasons for the unsupported action. Each `UnsupportedReason` includes a code and a message explaining why the action is not allowed.
2683
+ * @maxSize 20
2684
+ */
2685
+ reasons?: UnsupportedReason[];
2686
+ }
2687
+ export interface UnsupportedReason {
2688
+ code?: string;
2689
+ description?: string | null;
2690
+ }
2691
+ export interface ListUpcomingChargesRequest {
2692
+ /**
2693
+ * Subscription id charges to be previewed for
2694
+ * @format GUID
2695
+ */
2696
+ subscriptionId: string;
2697
+ /** Period of time to provide charged for. If not provided,then only next charge will be returned. */
2698
+ customDuration?: Duration;
2699
+ /**
2700
+ * Date of the next billing cycle so that the upcoming charges will be calculated accordingly.
2701
+ * If not provided, the upcoming charges will be calculated according to the existing next billing date.
2702
+ */
2703
+ nextBillingDate?: Date | null;
2704
+ }
2705
+ export interface ListUpcomingChargesResponse {
2706
+ upcomingCharges?: SubscriptionCharge[];
2707
+ }
2708
+ export interface PreviewSubscriptionChargesRequest extends PreviewSubscriptionChargesRequestSubscriptionOneOf {
2709
+ /** Information about a non-existing subscription. */
2710
+ subscriptionInfo?: SubscriptionInfo;
2711
+ }
2712
+ /** @oneof */
2713
+ export interface PreviewSubscriptionChargesRequestSubscriptionOneOf {
2714
+ /** Information about a non-existing subscription. */
2715
+ subscriptionInfo?: SubscriptionInfo;
2716
+ }
2717
+ /** Subscription information to use for calculating the preview of charges for a subscription. */
2718
+ export interface SubscriptionInfo {
2719
+ billingSettings?: BillingSettings;
2720
+ items?: Item[];
2721
+ startDate?: Date | null;
2722
+ }
2723
+ export interface PreviewSubscriptionChargesResponse {
2724
+ /** Charges for subscription. */
2725
+ charges?: Charge[];
2726
+ }
2727
+ /** Represents a charge applicable to a subscription. */
2728
+ export interface Charge {
2729
+ /** The cycle number from which the charge starts. */
2730
+ cycleFrom?: number;
2731
+ /** The number of cycles for which the charge is applicable. */
2732
+ cycleCount?: number | null;
2733
+ /** The breakdown of the charge */
2734
+ totals?: Totals;
2735
+ /** The billing date from which the charge starts */
2736
+ cycleBillingDate?: Date | null;
2737
+ }
2738
+ export interface PreviewSubscriptionsChargesRequest {
2739
+ /**
2740
+ * Information required to calculate the preview charges for the subscriptions, including an identifier.
2741
+ * @minSize 1
2742
+ * @maxSize 10
2743
+ */
2744
+ subscriptionsBillingDetails?: SubscriptionBillingDetails[];
2168
2745
  /**
2169
2746
  * Specifies the number of upcoming billing charges to preview for all subscriptions in the order.
2170
2747
  * For instance, if a subscription costs $10 for the first 3 cycles, $12 for cycles 4 through 7,
@@ -2176,15 +2753,24 @@ export interface PreviewSubscriptionsChargesRequest {
2176
2753
  * in this case, charges for cycle 1 through 3.
2177
2754
  * If there is a single charge for a subscription, meaning that subscription price remains consistent across all cycles,
2178
2755
  * then even if future_charges_count is set, it will be ignored and the only charge this subscription has will be returned.
2756
+ * @min 1
2757
+ * @max 10
2179
2758
  */
2180
2759
  numberOfNextRecurringCharges?: number | null;
2181
2760
  }
2182
2761
  export interface SubscriptionBillingDetails {
2183
- /** External identifier of the subscription */
2762
+ /**
2763
+ * External identifier of the subscription
2764
+ * @format GUID
2765
+ */
2184
2766
  externalId?: string | null;
2185
2767
  /** Billing details parameters including schedule, currency, etc. */
2186
2768
  billingSettings?: BillingSettings;
2187
- /** Items, minSize is 1, maxSize is 100 */
2769
+ /**
2770
+ * Items, minSize is 1, maxSize is 100
2771
+ * @minSize 1
2772
+ * @maxSize 100
2773
+ */
2188
2774
  items?: Item[];
2189
2775
  /** Subscription start date, now if not set */
2190
2776
  startDate?: Date | null;
@@ -2196,7 +2782,10 @@ export interface PreviewSubscriptionsChargesResponse {
2196
2782
  subscriptionsCharges?: SubscriptionCharges[];
2197
2783
  }
2198
2784
  export interface SubscriptionCharges {
2199
- /** External identifier of the subscription */
2785
+ /**
2786
+ * External identifier of the subscription
2787
+ * @format GUID
2788
+ */
2200
2789
  externalId?: string | null;
2201
2790
  /** Charges for subscription. */
2202
2791
  charges?: Charge[];
@@ -2204,7 +2793,10 @@ export interface SubscriptionCharges {
2204
2793
  export interface CreateSubscriptionForOrderRequest {
2205
2794
  /** Subscription needs to be created */
2206
2795
  subscription?: Subscription;
2207
- /** Optional unique identifier for this request in order to prevent subscription duplications */
2796
+ /**
2797
+ * Optional unique identifier for this request in order to prevent subscription duplications
2798
+ * @format GUID
2799
+ */
2208
2800
  idempotencyKey?: string | null;
2209
2801
  }
2210
2802
  export interface CreateSubscriptionForOrderResponse {
@@ -2217,6 +2809,7 @@ export interface CreateSubscriptionForOrderResponse {
2217
2809
  export interface Invoice {
2218
2810
  /**
2219
2811
  * Invoice ID.
2812
+ * @format GUID
2220
2813
  * @readonly
2221
2814
  */
2222
2815
  id?: string | null;
@@ -2256,6 +2849,7 @@ export interface Invoice {
2256
2849
  /**
2257
2850
  * 3-letter currency code of the invoice in
2258
2851
  * [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
2852
+ * @format CURRENCY
2259
2853
  */
2260
2854
  currency?: string;
2261
2855
  /** Information about the customer. */
@@ -2274,11 +2868,13 @@ export interface Invoice {
2274
2868
  * [payment method](https://bo.wix.com/wix-docs/rest/wix-cashier/settings/payment-method-type/payment-method-type-object).
2275
2869
  * Not available for the first payment of a subscription and all offline
2276
2870
  * payments.
2871
+ * @format GUID
2277
2872
  */
2278
2873
  paymentMethodId?: string | null;
2279
2874
  /**
2280
2875
  * Cashier [Order ID](https://dev.wix.com/docs/rest/payments/wix-cashier/pay/order#order-object)
2281
2876
  * for the corresponding payment.
2877
+ * @format GUID
2282
2878
  * @readonly
2283
2879
  */
2284
2880
  paymentOrderId?: string | null;
@@ -2288,7 +2884,10 @@ export interface Invoice {
2288
2884
  billingAddress?: FullAddressDetails;
2289
2885
  /** Shipping address. Available only for `"PHYSICAL"` line items. */
2290
2886
  shippingAddress?: FullAddressDetails;
2291
- /** Shipping fee in `0.00` format. */
2887
+ /**
2888
+ * Shipping fee in `0.00` format.
2889
+ * @format DECIMAL_VALUE
2890
+ */
2292
2891
  shippingFee?: string | null;
2293
2892
  /**
2294
2893
  * Information about the invoice's totals.
@@ -2312,6 +2911,7 @@ export interface Invoice {
2312
2911
  adjustments?: PriceAdjustment[];
2313
2912
  /**
2314
2913
  * Invoice Number.
2914
+ * @maxLength 10
2315
2915
  * @readonly
2316
2916
  */
2317
2917
  invoiceNumber?: string | null;
@@ -2325,23 +2925,29 @@ export interface Invoice {
2325
2925
  taxData?: TaxData;
2326
2926
  /** Business address. */
2327
2927
  businessAddress?: Address;
2328
- /** ID of the billing order that created this invoice. */
2928
+ /**
2929
+ * ID of the billing order that created this invoice.
2930
+ * @format GUID
2931
+ */
2329
2932
  orderId?: string | null;
2330
2933
  }
2331
2934
  export interface BusinessOriginData {
2332
2935
  /**
2333
2936
  * ID of the app for which BASS has created the invoice. For example,
2334
2937
  * `"1380b703-ce81-ff05-f115-39571d94dfcd"` for the Wix eCommerce app.
2938
+ * @format GUID
2335
2939
  */
2336
2940
  appId?: string;
2337
2941
  /**
2338
2942
  * [Instance ID](https://dev.wix.com/api/rest/app-management/apps/app-instance/get-app-instance)
2339
2943
  * of the app for which BASS has created the invoice.
2944
+ * @format GUID
2340
2945
  */
2341
2946
  instanceId?: string;
2342
2947
  /**
2343
2948
  * ID of the entity that triggered the invoice creation. For example, the ID of a
2344
2949
  * [pricing plan](https://dev.wix.com/docs/rest/payments/pricing-plans/pricing-plans/plan#plan-object).
2950
+ * @format GUID
2345
2951
  */
2346
2952
  entityId?: string;
2347
2953
  }
@@ -2367,6 +2973,7 @@ export declare enum CreationMode {
2367
2973
  export interface LatestPaymentAttempt {
2368
2974
  /**
2369
2975
  * ID of the latest payment attempt.
2976
+ * @format GUID
2370
2977
  * @readonly
2371
2978
  */
2372
2979
  paymentAttemptId?: string;
@@ -2424,6 +3031,7 @@ export interface PriceAdjustmentValue extends PriceAdjustmentValueAdjustmentValu
2424
3031
  * Absolute amount that adjusts the price.
2425
3032
  *
2426
3033
  * Min: `0.01`
3034
+ * @decimalValue options - {gt:0.00}
2427
3035
  */
2428
3036
  amount?: string;
2429
3037
  /**
@@ -2435,6 +3043,7 @@ export interface PriceAdjustmentValue extends PriceAdjustmentValueAdjustmentValu
2435
3043
  *
2436
3044
  * Min: `0.01`
2437
3045
  * Max: `1.00`
3046
+ * @decimalValue options - {gt:0.00,lte:1}
2438
3047
  */
2439
3048
  multiplier?: string;
2440
3049
  }
@@ -2444,6 +3053,7 @@ export interface PriceAdjustmentValueAdjustmentValueTypeOneOf {
2444
3053
  * Absolute amount that adjusts the price.
2445
3054
  *
2446
3055
  * Min: `0.01`
3056
+ * @decimalValue options - {gt:0.00}
2447
3057
  */
2448
3058
  amount?: string;
2449
3059
  /**
@@ -2455,6 +3065,7 @@ export interface PriceAdjustmentValueAdjustmentValueTypeOneOf {
2455
3065
  *
2456
3066
  * Min: `0.01`
2457
3067
  * Max: `1.00`
3068
+ * @decimalValue options - {gt:0.00,lte:1}
2458
3069
  */
2459
3070
  multiplier?: string;
2460
3071
  }
@@ -2463,6 +3074,7 @@ export interface InvoiceShippingCharges {
2463
3074
  * Amount of the shipping fee in `0.00` format.
2464
3075
  *
2465
3076
  * Min: `0.01`
3077
+ * @decimalValue options - {gte:0.00,maxScale:2}
2466
3078
  */
2467
3079
  amount?: string;
2468
3080
  /** Tax of the shipping fee */
@@ -2477,23 +3089,45 @@ export interface TaxData {
2477
3089
  taxSummary?: TaxSummary;
2478
3090
  }
2479
3091
  export interface TaxSummary {
2480
- /** Aggregated from tax_breakdowns with exemptions excluded from amount */
3092
+ /**
3093
+ * Aggregated from tax_breakdowns with exemptions excluded from amount
3094
+ * @format DECIMAL_VALUE
3095
+ */
2481
3096
  aggregatedTaxAmount?: string;
2482
- /** Array of each tax applied, grouped by `"jurisdiction"`, `"jurisdiction_type"`, `"tax_type"`, `"tax_name"` and `"tax_rate"`. */
3097
+ /**
3098
+ * Array of each tax applied, grouped by `"jurisdiction"`, `"jurisdiction_type"`, `"tax_type"`, `"tax_name"` and `"tax_rate"`.
3099
+ * @maxSize 50
3100
+ */
2483
3101
  aggregatedTaxBreakdowns?: AggregatedTaxBreakdown[];
2484
3102
  }
2485
3103
  export interface AggregatedTaxBreakdown {
2486
- /** Name of the tax that was calculated. */
3104
+ /**
3105
+ * Name of the tax that was calculated.
3106
+ * @maxLength 200
3107
+ */
2487
3108
  taxName?: string;
2488
- /** Type of tax that was calculated. */
3109
+ /**
3110
+ * Type of tax that was calculated.
3111
+ * @maxLength 200
3112
+ */
2489
3113
  taxType?: string;
2490
- /** Jurisdiction that taxes were calculated for. */
3114
+ /**
3115
+ * Jurisdiction that taxes were calculated for.
3116
+ * @maxLength 200
3117
+ */
2491
3118
  jurisdiction?: string;
2492
3119
  /** Type of jurisdiction that taxes were calculated for. */
2493
3120
  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"`. */
3121
+ /**
3122
+ * Tax rate used for this jurisdiction, as a decimal. For example, 10% tax is `"0.1000"` and 200% tax is `"2.0000"`.
3123
+ * @decimalValue options - {gte:0,maxScale:6}
3124
+ */
2495
3125
  rate?: string;
2496
- /** Total amount of this tax for this jurisdiction. */
3126
+ /**
3127
+ * Total amount of this tax for this jurisdiction.
3128
+ * @format DECIMAL_VALUE
3129
+ * @decimalValue options - {maxScale:4}
3130
+ */
2497
3131
  aggregatedTaxAmount?: string;
2498
3132
  }
2499
3133
  export interface Task {
@@ -2525,8 +3159,6 @@ export interface Reschedule {
2525
3159
  executeAt?: Date | null;
2526
3160
  payload?: string | null;
2527
3161
  }
2528
- export interface Empty {
2529
- }
2530
3162
  export interface V1SubscriptionEvent extends V1SubscriptionEventEventOneOf {
2531
3163
  /** A subscriptions was created */
2532
3164
  created?: V1SubscriptionCreated;
@@ -2594,22 +3226,41 @@ export interface V1SubscriptionCreated {
2594
3226
  export interface V1Subscription {
2595
3227
  /**
2596
3228
  * ID of the subscription
3229
+ * @format GUID
2597
3230
  * @readonly
2598
3231
  */
2599
3232
  id?: string;
2600
- /** ID of the app which created the subscription */
3233
+ /**
3234
+ * ID of the app which created the subscription
3235
+ * @format GUID
3236
+ */
2601
3237
  wixAppId?: string;
2602
- /** Instance ID of the Subscriptions app */
3238
+ /**
3239
+ * Instance ID of the Subscriptions app
3240
+ * @format GUID
3241
+ */
2603
3242
  tenantId?: string;
2604
- /** ID of entity in app (e.g. a cart in stores/order in paid plans) */
3243
+ /**
3244
+ * ID of entity in app (e.g. a cart in stores/order in paid plans)
3245
+ * @format GUID
3246
+ */
2605
3247
  originEntityId?: string;
2606
3248
  /** Site member or a contact who bought the subscription */
2607
3249
  subscriber?: Subscriber;
2608
- /** Wix Pay order ID, is empty for free subscriptions */
3250
+ /**
3251
+ * Wix Pay order ID, is empty for free subscriptions
3252
+ * @format GUID
3253
+ */
2609
3254
  wixPayOrderId?: string | null;
2610
- /** Subscription name (e.g. a product or subscription package name) */
3255
+ /**
3256
+ * Subscription name (e.g. a product or subscription package name)
3257
+ * @maxLength 150
3258
+ */
2611
3259
  name?: string;
2612
- /** Optional additional subscription description */
3260
+ /**
3261
+ * Optional additional subscription description
3262
+ * @maxLength 500
3263
+ */
2613
3264
  description?: string;
2614
3265
  /** Amount to be paid for a single scheduled payment */
2615
3266
  price?: Money;
@@ -2643,10 +3294,14 @@ export interface V1Subscription {
2643
3294
  validUntilDateWithSuspensions?: Date | null;
2644
3295
  /** Duration of single payment subscription (instead of billing_profile) */
2645
3296
  singlePaymentDuration?: V1Duration;
3297
+ /** @format GUID */
2646
3298
  originInstanceId?: string | null;
2647
3299
  }
2648
3300
  export interface Subscriber {
2649
- /** Member or contact ID */
3301
+ /**
3302
+ * Member or contact ID
3303
+ * @format GUID
3304
+ */
2650
3305
  id?: string;
2651
3306
  /** Member or contact */
2652
3307
  identityType?: IdentityType;
@@ -2661,9 +3316,16 @@ export declare enum IdentityType {
2661
3316
  }
2662
3317
  /** Price of a payment. Includes amount and currency. */
2663
3318
  export interface Money {
2664
- /** Monetary amount i.e. 3.99. */
3319
+ /**
3320
+ * Monetary amount i.e. 3.99.
3321
+ * @format DECIMAL_VALUE
3322
+ */
2665
3323
  amount?: string;
2666
- /** Currency in ISO 4217 format i.e. USD. */
3324
+ /**
3325
+ * Currency in ISO 4217 format i.e. USD.
3326
+ * @minLength 3
3327
+ * @maxLength 3
3328
+ */
2667
3329
  currency?: string;
2668
3330
  }
2669
3331
  export declare enum SubscriptionType {
@@ -2741,362 +3403,266 @@ export declare enum SubscriptionFrequency {
2741
3403
  MONTH = "MONTH",
2742
3404
  YEAR = "YEAR"
2743
3405
  }
2744
- /** Trial period of subscription */
2745
- export interface SubscriptionTrialPeriod {
2746
- /** trial period in units (required) */
2747
- 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;
2934
- }
2935
- export interface GetSubscriptionInvoicesRequest {
2936
- id?: string;
2937
- }
2938
- export interface GetSubscriptionInvoicesResponse {
2939
- invoices?: SubscriptionInvoice[];
2940
- }
2941
- export interface SubscriptionInvoice {
2942
- id?: string;
2943
- subscriptionCycle?: number;
2944
- createdDate?: Date | null;
2945
- }
2946
- export interface FinishFreeTrialNowRequest {
2947
- subscriptionId?: string;
2948
- tenantId?: string;
2949
- }
2950
- export interface FinishFreeTrialNowResponse {
2951
- subscription?: Subscription;
3406
+ /** Trial period of subscription */
3407
+ export interface SubscriptionTrialPeriod {
3408
+ /** trial period in units (required) */
3409
+ period?: number;
3410
+ /** units in which trial period is described (optional, default DAY) */
3411
+ unit?: SubscriptionFrequency;
2952
3412
  }
2953
- export interface SendTimeCapsuleTaskCanceledBIRequest {
2954
- tenantId?: string;
2955
- subscriptionId?: string;
2956
- taskType?: string;
3413
+ export declare enum CancellationInitiator {
3414
+ /** Cancellation initiator undefined */
3415
+ UNDEFINED = "UNDEFINED",
3416
+ /** Subscription was canceled by site owner (default if canceled by user or service identity) */
3417
+ OWNER = "OWNER",
3418
+ /** Subscription was canceled by member (default if canceled by member identity) */
3419
+ MEMBER = "MEMBER",
3420
+ /** Subscription was canceled because of payment failure */
3421
+ PAYMENT_FAILURE = "PAYMENT_FAILURE",
3422
+ /** Subscription was canceled because of payment setup failure */
3423
+ SETUP_FAILURE = "SETUP_FAILURE"
2957
3424
  }
2958
- export interface ScheduleTimeCapsuleTaskRequest {
2959
- subscriptionId?: string;
2960
- taskType?: string;
2961
- executionTime?: Date | null;
2962
- tenantId?: string;
3425
+ export interface SubscriptionPolicy {
3426
+ /** Subscription expiration date can be updated */
3427
+ expiryDateChangeable?: boolean;
3428
+ /** Subscription can be cancelled by the member who bought it (when memberId == subscriberId) */
3429
+ cancellableByMember?: boolean;
3430
+ /** Subscription expiration date on cancellation can be set to next payment date */
3431
+ cancellableAtNextPaymentCycle?: boolean;
2963
3432
  }
2964
- export interface CancelTimeCapsuleTaskRequest {
2965
- tenantId?: string;
2966
- subscriptionId?: string;
2967
- taskType?: string;
3433
+ export interface Suspension {
3434
+ status?: Status;
3435
+ /** Beginning of the suspended period */
3436
+ startsAt?: Date | null;
3437
+ /** End of the suspended period */
3438
+ endsAt?: Date | null;
2968
3439
  }
2969
- export interface UpdateFullSubscriptionRequest {
2970
- tenantId?: string;
2971
- subscription?: Subscription;
3440
+ export declare enum Status {
3441
+ UNDEFINED = "UNDEFINED",
3442
+ ACTIVE = "ACTIVE",
3443
+ ENDED = "ENDED"
2972
3444
  }
2973
- export interface UpdateFullSubscriptionResponse {
2974
- subscription?: Subscription;
3445
+ /** A duration expressed in amount of time units. */
3446
+ export interface V1Duration {
3447
+ /** Amount of the unit */
3448
+ amount?: number;
3449
+ /** Day, Week, Month, Year. */
3450
+ unit?: SubscriptionFrequency;
2975
3451
  }
2976
- export interface UpdateSubscriptionInvoiceCycleRequest {
2977
- subscriptionId?: string;
2978
- tenantId?: string;
2979
- invoiceId?: string;
2980
- subscriptionCycle?: number;
3452
+ export interface V1SubscriptionActivated {
3453
+ subscription?: V1Subscription;
2981
3454
  }
2982
- export interface UpdateSubscriptionInvoiceCycleResponse {
2983
- subscriptionInvoice?: SubscriptionInvoice;
3455
+ export interface V1SubscriptionCanceled {
3456
+ subscription?: V1Subscription;
2984
3457
  }
2985
- export interface AddPausePeriodRequest {
2986
- tenantId?: string;
2987
- subscriptionId?: string;
2988
- pauseStartDate?: Date | null;
2989
- pauseEndDate?: Date | null;
3458
+ export interface V1SubscriptionUpdated {
3459
+ subscription?: V1Subscription;
2990
3460
  }
2991
- export interface AddPausePeriodResponse {
2992
- subscription?: Subscription;
3461
+ export interface SubscriptionCycleTriggered {
3462
+ subscription?: V1Subscription;
3463
+ billingCycle?: number;
3464
+ /**
3465
+ * Wix Pay transaction id, optional. Exists if event was triggered by a payment.
3466
+ * @format GUID
3467
+ */
3468
+ transactionId?: string | null;
2993
3469
  }
2994
- export interface RunTimeCapsuleTaskNowRequest {
2995
- tenantId?: string;
2996
- subscriptionId?: string;
2997
- taskType?: string;
3470
+ export interface SubscriptionMarkedAsPaid {
3471
+ subscription?: V1Subscription;
3472
+ /** A number indicating which payment (cycle) was marked as paid. For recurring subscriptions only. */
3473
+ billingCycle?: number | null;
2998
3474
  }
2999
- export interface CreateRecurringInvoiceBORequest {
3000
- subscriptionId?: string;
3001
- tenantId?: string;
3002
- cycleNumber?: number;
3475
+ export interface SubscriptionCancellationRequested {
3476
+ subscription?: V1Subscription;
3003
3477
  }
3004
- export interface CreateRecurringInvoiceBOResponse {
3005
- invoiceId?: string;
3478
+ export interface SubscriptionSuspended {
3479
+ subscription?: V1Subscription;
3006
3480
  }
3007
- export interface SetShiftingDataRequest {
3008
- subscriptionId?: string;
3009
- tenantId?: string;
3010
- isBassManaged?: boolean;
3011
- shiftManagementDate?: Date | null;
3481
+ export interface V1SubscriptionResumed {
3482
+ subscription?: V1Subscription;
3012
3483
  }
3013
- export interface SetShiftingDataResponse {
3014
- subscription?: Subscription;
3484
+ export interface SubscriptionExpired {
3485
+ subscription?: V1Subscription;
3015
3486
  }
3016
- export interface FixSubscriptionInvoicesRequest extends FixSubscriptionInvoicesRequestModeOneOf {
3017
- attachInvoice?: AttachInvoice;
3018
- detachInvoice?: DetachInvoice;
3019
- tenantId?: string;
3020
- subscriptionId?: string;
3487
+ export interface V1SubscriptionInitialPurchaseCompleted {
3488
+ subscription?: V1Subscription;
3021
3489
  }
3022
- /** @oneof */
3023
- export interface FixSubscriptionInvoicesRequestModeOneOf {
3024
- attachInvoice?: AttachInvoice;
3025
- detachInvoice?: DetachInvoice;
3490
+ export interface ListSubscriptionHistoryRequest {
3491
+ /** @format GUID */
3492
+ subscriptionId: string;
3493
+ /** Determines the type of view for the history: either a comprehensive backoffice view or a user-centric view. */
3494
+ mode?: HistoryViewMode;
3495
+ /** Cursor for efficient paging. If paging through results, pass this field from the previous search response to continue to the next page. */
3496
+ cursor?: CursorPaging;
3026
3497
  }
3027
- export interface AttachInvoice {
3028
- invoiceId?: string;
3498
+ export declare enum HistoryViewMode {
3499
+ UNKNOWN = "UNKNOWN",
3500
+ /** Comprehensive view including all history events. */
3501
+ BACKOFFICE = "BACKOFFICE",
3502
+ /** User-centric view of the history. */
3503
+ USER = "USER"
3029
3504
  }
3030
- export interface DetachInvoice {
3031
- invoiceId?: string;
3505
+ export interface ListSubscriptionHistoryResponse {
3506
+ /** List of history entries for the subscription. */
3507
+ historyEntries?: SubscriptionHistoryEntry[];
3508
+ /** Paging metadata. A `next` cursor is returned if there are more results. */
3509
+ pagingMetadata?: PagingMetadataV2;
3032
3510
  }
3033
- export interface FixSubscriptionInvoicesResponse {
3034
- invoices?: SubscriptionInvoice[];
3511
+ export interface SubscriptionHistoryEntry {
3512
+ /** @format GUID */
3513
+ entryId?: string;
3514
+ /** TODO: add max length? it is not defined in domainevents, so should we? */
3515
+ slug?: string;
3516
+ entryTime?: Date | null;
3517
+ event?: SubscriptionEvent;
3035
3518
  }
3036
- export interface RestoreDraftSubscriptionRequest {
3037
- tenantId?: string;
3038
- subscriptionId?: string;
3519
+ export interface SubscriptionEvent extends SubscriptionEventPayloadOneOf {
3520
+ created?: SubscriptionCreated;
3521
+ updated?: SubscriptionUpdated;
3522
+ deleted?: SubscriptionDeleted;
3523
+ activated?: SubscriptionActivated;
3524
+ ended?: SubscriptionEnded;
3525
+ canceled?: SubscriptionCanceled;
3526
+ paused?: SubscriptionPaused;
3527
+ resumed?: SubscriptionResumed;
3528
+ pauseRequested?: PauseSubscriptionRequested;
3529
+ resumeRequested?: ResumeSubscriptionRequested;
3530
+ scheduledPauseCanceled?: ScheduledPauseCanceled;
3531
+ scheduledResumeCanceled?: ScheduledResumeCanceled;
3532
+ billingCycleStarted?: SubscriptionBillingCycleStarted;
3533
+ autoRenewalTurnedOn?: SubscriptionAutoRenewalTurnedOn;
3534
+ autoRenewalTurnedOff?: SubscriptionAutoRenewalTurnedOff;
3535
+ cycleReadyToPay?: SubscriptionCycleReadyToPay;
3536
+ extended?: SubscriptionExtended;
3537
+ initialPurchaseCompleted?: SubscriptionInitialPurchaseCompleted;
3538
+ latestInvoiceMarkedAsPaid?: LatestInvoiceMarkedAsPaid;
3539
+ revived?: SubscriptionRevived;
3540
+ billingDateUpdated?: SubscriptionBillingDateUpdated;
3541
+ futureUpdatesRequested?: FutureUpdatesRequested;
3542
+ updatesApplied?: UpdatesApplied;
3543
+ resetPendingUpdates?: ResetPendingUpdates;
3544
+ gracePeriodStarted?: GracePeriodStarted;
3545
+ gracePeriodEnded?: GracePeriodEnded;
3546
+ paymentMethodUpdated?: PaymentMethodUpdated;
3547
+ collectionMethodUpdated?: SubscriptionCollectionMethodUpdated;
3548
+ freeTrailStarted?: FreeTrailStarted;
3549
+ freeTrailEnded?: FreeTrailEnded;
3550
+ billingCyclePaid?: SubscriptionBillingCyclePaid;
3551
+ initiatePaymentMethodSetup?: InitiatedPaymentMethodSetup;
3552
+ subscriptionBoAction?: SubscriptionBackOfficeAction;
3553
+ unknown?: UnknownSubscriptionEvent;
3039
3554
  }
3040
- export interface RestoreDraftSubscriptionResponse {
3555
+ /** @oneof */
3556
+ export interface SubscriptionEventPayloadOneOf {
3557
+ created?: SubscriptionCreated;
3558
+ updated?: SubscriptionUpdated;
3559
+ deleted?: SubscriptionDeleted;
3560
+ activated?: SubscriptionActivated;
3561
+ ended?: SubscriptionEnded;
3562
+ canceled?: SubscriptionCanceled;
3563
+ paused?: SubscriptionPaused;
3564
+ resumed?: SubscriptionResumed;
3565
+ pauseRequested?: PauseSubscriptionRequested;
3566
+ resumeRequested?: ResumeSubscriptionRequested;
3567
+ scheduledPauseCanceled?: ScheduledPauseCanceled;
3568
+ scheduledResumeCanceled?: ScheduledResumeCanceled;
3569
+ billingCycleStarted?: SubscriptionBillingCycleStarted;
3570
+ autoRenewalTurnedOn?: SubscriptionAutoRenewalTurnedOn;
3571
+ autoRenewalTurnedOff?: SubscriptionAutoRenewalTurnedOff;
3572
+ cycleReadyToPay?: SubscriptionCycleReadyToPay;
3573
+ extended?: SubscriptionExtended;
3574
+ initialPurchaseCompleted?: SubscriptionInitialPurchaseCompleted;
3575
+ latestInvoiceMarkedAsPaid?: LatestInvoiceMarkedAsPaid;
3576
+ revived?: SubscriptionRevived;
3577
+ billingDateUpdated?: SubscriptionBillingDateUpdated;
3578
+ futureUpdatesRequested?: FutureUpdatesRequested;
3579
+ updatesApplied?: UpdatesApplied;
3580
+ resetPendingUpdates?: ResetPendingUpdates;
3581
+ gracePeriodStarted?: GracePeriodStarted;
3582
+ gracePeriodEnded?: GracePeriodEnded;
3583
+ paymentMethodUpdated?: PaymentMethodUpdated;
3584
+ collectionMethodUpdated?: SubscriptionCollectionMethodUpdated;
3585
+ freeTrailStarted?: FreeTrailStarted;
3586
+ freeTrailEnded?: FreeTrailEnded;
3587
+ billingCyclePaid?: SubscriptionBillingCyclePaid;
3588
+ initiatePaymentMethodSetup?: InitiatedPaymentMethodSetup;
3589
+ subscriptionBoAction?: SubscriptionBackOfficeAction;
3590
+ unknown?: UnknownSubscriptionEvent;
3591
+ }
3592
+ export interface SubscriptionCreated {
3041
3593
  subscription?: Subscription;
3042
3594
  }
3043
- export interface DeleteDraftSubscriptionRequest {
3044
- tenantId?: string;
3045
- subscriptionId?: string;
3595
+ export interface SubscriptionUpdated {
3596
+ current?: Subscription;
3597
+ previous?: Subscription;
3598
+ diff?: SubscriptionDiff;
3046
3599
  }
3047
- export interface DeleteDraftSubscriptionResponse {
3048
- subscription?: Subscription;
3600
+ export interface SubscriptionDiff {
3601
+ added?: string | null;
3602
+ changed?: string | null;
3603
+ deleted?: string | null;
3049
3604
  }
3050
- export interface DeleteSubscriptionBORequest {
3051
- tenantId?: string;
3605
+ export interface SubscriptionDeleted {
3052
3606
  subscriptionId?: string;
3053
3607
  }
3054
- export interface DeleteSubscriptionBOResponse {
3608
+ export interface FutureUpdatesRequested {
3055
3609
  subscription?: Subscription;
3610
+ requestedUpdateData?: SubscriptionUpdateData;
3056
3611
  }
3057
- export interface CancelSubscriptionBORequest {
3058
- tenantId?: string;
3059
- subscriptionId?: string;
3060
- initiator?: ActionInitiator;
3061
- reason?: string | null;
3612
+ export interface UpdatesApplied {
3613
+ subscription?: Subscription;
3614
+ updateAction?: UpdateAction;
3615
+ appliedUpdateData?: SubscriptionUpdateData;
3062
3616
  }
3063
- export interface CancelSubscriptionBOResponse {
3617
+ export interface ResetPendingUpdates {
3064
3618
  subscription?: Subscription;
3065
3619
  }
3066
- export interface UpdatePaymentMethodBORequest {
3067
- tenantId?: string;
3068
- subscriptionId?: string;
3069
- paymentMethodId?: string;
3620
+ export interface GracePeriodStarted {
3621
+ subscription?: Subscription;
3070
3622
  }
3071
- export interface UpdatePaymentMethodBOResponse {
3623
+ export interface GracePeriodEnded {
3072
3624
  subscription?: Subscription;
3625
+ /** Indication for the payment settlement method. */
3626
+ paymentSettlementMethod?: PaymentSettlementMethod;
3073
3627
  }
3074
- export interface SendSubscriptionActionEventBORequest extends SendSubscriptionActionEventBORequestEventOneOf {
3075
- billingCycleStarted?: SubscriptionBillingCycleStarted;
3076
- tenantId?: string;
3077
- subscriptionId?: string;
3628
+ export declare enum PaymentSettlementMethod {
3629
+ UNKNOWN = "UNKNOWN",
3630
+ /** System-defined payment settlement. */
3631
+ SYSTEM = "SYSTEM",
3632
+ /** Manually mark the payment as paid. */
3633
+ MARK_AS_PAID = "MARK_AS_PAID",
3634
+ /** Require the customer to pay immediately, by insert a new payment method. */
3635
+ CUSTOMER_PAY_NOW = "CUSTOMER_PAY_NOW"
3078
3636
  }
3079
- /** @oneof */
3080
- export interface SendSubscriptionActionEventBORequestEventOneOf {
3081
- billingCycleStarted?: SubscriptionBillingCycleStarted;
3637
+ export interface PaymentMethodUpdated {
3638
+ subscription?: Subscription;
3639
+ initiator?: HistoryActionInitiator;
3640
+ paymentMode?: PaymentMode;
3082
3641
  }
3083
- export interface SendSubscriptionActionEventResponse {
3642
+ export interface SubscriptionCollectionMethodUpdated {
3643
+ subscription?: Subscription;
3644
+ newCollectionMethod?: CollectionMethodEnumCollectionMethod;
3645
+ previousCollectionMethod?: CollectionMethodEnumCollectionMethod;
3084
3646
  }
3085
- export interface HandleSubscriptionAfterInvoiceMarkedAsPaidRequest {
3086
- tenantId?: string;
3087
- subscriptionId?: string;
3088
- transactionId?: string;
3647
+ export interface FreeTrailStarted {
3648
+ subscription?: Subscription;
3089
3649
  }
3090
- export interface PauseSubscriptionBORequest {
3091
- tenantId?: string;
3092
- subscriptionId?: string;
3093
- pausePolicy?: PausePolicy;
3094
- pauseAt?: PauseAt;
3095
- initiator?: ActionInitiator;
3096
- reason?: string | null;
3650
+ export interface FreeTrailEnded {
3651
+ subscription?: Subscription;
3097
3652
  }
3098
- export interface PauseSubscriptionBOResponse {
3653
+ export interface InitiatedPaymentMethodSetup {
3654
+ subscription?: Subscription;
3655
+ }
3656
+ export interface SubscriptionBackOfficeAction {
3099
3657
  subscription?: Subscription;
3658
+ /** The backoffice method name */
3659
+ name?: string;
3660
+ /** json as string format, to store the flatted request object */
3661
+ params?: string;
3662
+ }
3663
+ /** Defines unknown events restored from the logs */
3664
+ export interface UnknownSubscriptionEvent {
3665
+ subscriptionAsString?: string | null;
3100
3666
  }
3101
3667
  interface CustomerNonNullableFields {
3102
3668
  visitorId: string;
@@ -3203,78 +3769,244 @@ interface UpdateBillingDateDataNonNullableFields {
3203
3769
  interface AutomaticRetryDataNonNullableFields {
3204
3770
  enabled: boolean;
3205
3771
  }
3206
- interface GracePeriodDataNonNullableFields {
3207
- automaticRetryData?: AutomaticRetryDataNonNullableFields;
3772
+ interface GracePeriodDataNonNullableFields {
3773
+ automaticRetryData?: AutomaticRetryDataNonNullableFields;
3774
+ }
3775
+ interface BillingStatusNonNullableFields {
3776
+ currentCycle: number;
3777
+ latestPaymentData?: PaymentDataNonNullableFields;
3778
+ updateBillingDateData?: UpdateBillingDateDataNonNullableFields;
3779
+ gracePeriodData?: GracePeriodDataNonNullableFields;
3780
+ }
3781
+ interface SubscriptionPoliciesNonNullableFields {
3782
+ customerCanCancel: boolean;
3783
+ businessCanExtend: boolean;
3784
+ allowEndOfCycleCancellation: boolean;
3785
+ }
3786
+ interface PauseInfoNonNullableFields {
3787
+ pausePolicy: PausePolicy;
3788
+ pauseAt: PauseAt;
3789
+ resumeAt: ResumeAt;
3790
+ }
3791
+ interface CancellationInfoNonNullableFields {
3792
+ initiator: HistoryActionInitiator;
3793
+ }
3794
+ interface FixedPriceNonNullableFields {
3795
+ itemPrice: string;
3796
+ }
3797
+ interface PricingModelNonNullableFields {
3798
+ fixedPrice?: FixedPriceNonNullableFields;
3799
+ }
3800
+ interface ItemChangeNonNullableFields {
3801
+ id: string;
3802
+ pricingModel?: PricingModelNonNullableFields;
3803
+ tax?: TaxNonNullableFields;
3804
+ }
3805
+ interface CatalogReferenceNonNullableFields {
3806
+ catalogItemId: string;
3807
+ }
3808
+ interface ApplicationFeeNonNullableFields {
3809
+ amount: string;
3810
+ discounts: DiscountNonNullableFields[];
3811
+ }
3812
+ interface ItemNonNullableFields {
3813
+ name: string;
3814
+ catalogReference?: CatalogReferenceNonNullableFields;
3815
+ category: ItemCategory;
3816
+ quantity: number;
3817
+ pricingModel?: PricingModelNonNullableFields;
3818
+ tax?: TaxNonNullableFields;
3819
+ discounts: DiscountNonNullableFields[];
3820
+ applicationFee?: ApplicationFeeNonNullableFields;
3821
+ }
3822
+ interface SubscriptionUpdateDataNonNullableFields {
3823
+ itemsToUpdate: ItemChangeNonNullableFields[];
3824
+ itemsToAdd: ItemNonNullableFields[];
3825
+ numberOfRequests: number;
3826
+ }
3827
+ interface SpecificDateSubscriptionUpdateDataNonNullableFields {
3828
+ updateData?: SubscriptionUpdateDataNonNullableFields;
3829
+ }
3830
+ interface SubscriptionNonNullableFields {
3831
+ name: string;
3832
+ customer?: CustomerNonNullableFields;
3833
+ status: SubscriptionStatusEnumSubscriptionStatus;
3834
+ billingSettings?: BillingSettingsNonNullableFields;
3835
+ billingStatus?: BillingStatusNonNullableFields;
3836
+ shippingAddress?: FullAddressDetailsNonNullableFields;
3837
+ policies?: SubscriptionPoliciesNonNullableFields;
3838
+ pauseInfo?: PauseInfoNonNullableFields;
3839
+ cancellationInfo?: CancellationInfoNonNullableFields;
3840
+ pendingUpdateData?: SubscriptionUpdateDataNonNullableFields;
3841
+ bassManaged: boolean;
3842
+ specificDatePendingUpdateData?: SpecificDateSubscriptionUpdateDataNonNullableFields;
3843
+ items: ItemNonNullableFields[];
3844
+ }
3845
+ export interface GetSubscriptionResponseNonNullableFields {
3846
+ subscription?: SubscriptionNonNullableFields;
3847
+ }
3848
+ export interface CustomerCancelSubscriptionResponseNonNullableFields {
3849
+ subscription?: SubscriptionNonNullableFields;
3850
+ }
3851
+ export interface CustomerTurnOnAutoRenewalResponseNonNullableFields {
3852
+ subscription?: SubscriptionNonNullableFields;
3853
+ }
3854
+ export interface CustomerTurnOffAutoRenewalResponseNonNullableFields {
3855
+ subscription?: SubscriptionNonNullableFields;
3856
+ }
3857
+ export interface CustomerExtendSubscriptionResponseNonNullableFields {
3858
+ subscription?: SubscriptionNonNullableFields;
3859
+ }
3860
+ export interface QuerySubscriptionsResponseNonNullableFields {
3861
+ subscriptions: SubscriptionNonNullableFields[];
3862
+ }
3863
+ export interface UpdateSubscriptionPaymentMethodResponseNonNullableFields {
3864
+ subscription?: SubscriptionNonNullableFields;
3865
+ }
3866
+ interface ActionNonNullableFields {
3867
+ actionType: ActionType;
3868
+ pausePolicies: PausePolicy[];
3869
+ pauseAt: PauseAt[];
3870
+ resumeAt: ResumeAt[];
3871
+ extendPolicies: ExtendPolicyType[];
3872
+ }
3873
+ export interface CustomerAllowedActionsResponseNonNullableFields {
3874
+ actions: ActionNonNullableFields[];
3875
+ }
3876
+ interface RecurringNonNullableFields {
3877
+ cycleNumber: number;
3878
+ }
3879
+ interface InvoiceDiscountNonNullableFields {
3880
+ amount: string;
3881
+ percentage: string;
3882
+ origin?: DiscountOriginNonNullableFields;
3883
+ }
3884
+ interface InvoiceApplicationFeeNonNullableFields {
3885
+ amount: string;
3886
+ discount?: InvoiceDiscountNonNullableFields;
3887
+ }
3888
+ interface PriceDetailsNonNullableFields {
3889
+ price: string;
3890
+ tax?: TaxNonNullableFields;
3891
+ discount?: InvoiceDiscountNonNullableFields;
3892
+ applicationFeeDetails?: InvoiceApplicationFeeNonNullableFields;
3893
+ }
3894
+ interface LineItemTaxSummaryNonNullableFields {
3895
+ aggregatedTaxAmount: string;
3896
+ aggregatedTaxRate: string;
3897
+ taxableAmount: string;
3898
+ }
3899
+ interface TaxBreakdownNonNullableFields {
3900
+ taxType: string;
3901
+ taxRate: string;
3902
+ jurisdictionType: string;
3903
+ }
3904
+ interface ItemTaxDataNonNullableFields {
3905
+ lineItemTaxSummary?: LineItemTaxSummaryNonNullableFields;
3906
+ taxBreakdowns: TaxBreakdownNonNullableFields[];
3907
+ }
3908
+ interface InvoiceItemNonNullableFields {
3909
+ recurring?: RecurringNonNullableFields;
3910
+ id: string;
3911
+ name: string;
3912
+ catalogReference?: CatalogReferenceNonNullableFields;
3913
+ category: ItemCategory;
3914
+ quantity: number;
3915
+ priceDetails?: PriceDetailsNonNullableFields;
3916
+ totals?: TotalsNonNullableFields;
3917
+ taxData?: ItemTaxDataNonNullableFields;
3918
+ }
3919
+ interface SubscriptionChargeNonNullableFields {
3920
+ cycle: number;
3921
+ totals?: TotalsNonNullableFields;
3922
+ invoiceItems: InvoiceItemNonNullableFields[];
3923
+ discount?: InvoiceDiscountNonNullableFields;
3924
+ }
3925
+ export interface CustomerListUpcomingChargesResponseNonNullableFields {
3926
+ upcomingCharge?: SubscriptionChargeNonNullableFields;
3927
+ }
3928
+ export interface InitiatePaymentMethodSetupResponseNonNullableFields {
3929
+ paymentOrderId: string;
3930
+ }
3931
+ export interface PayCycleResponseNonNullableFields {
3932
+ invoiceId: string;
3933
+ subscription?: SubscriptionNonNullableFields;
3934
+ }
3935
+ export interface UpdateSubscriptionBillingDateResponseNonNullableFields {
3936
+ subscription?: SubscriptionNonNullableFields;
3937
+ }
3938
+ export interface CancelSubscriptionResponseNonNullableFields {
3939
+ subscription?: SubscriptionNonNullableFields;
3940
+ }
3941
+ export interface PauseSubscriptionResponseNonNullableFields {
3942
+ subscription?: SubscriptionNonNullableFields;
3943
+ }
3944
+ export interface ResumeSubscriptionResponseNonNullableFields {
3945
+ subscription?: SubscriptionNonNullableFields;
3946
+ }
3947
+ export interface SearchSubscriptionsResponseNonNullableFields {
3948
+ subscriptions: SubscriptionNonNullableFields[];
3949
+ }
3950
+ interface CountByStatusNonNullableFields {
3951
+ status: SubscriptionStatusEnumSubscriptionStatus;
3952
+ count: number;
3953
+ }
3954
+ export interface CountSubscriptionsResponseNonNullableFields {
3955
+ countByStatus: CountByStatusNonNullableFields[];
3956
+ total: number;
3957
+ }
3958
+ export interface TurnOnSubscriptionAutoRenewalResponseNonNullableFields {
3959
+ subscription?: SubscriptionNonNullableFields;
3960
+ }
3961
+ export interface TurnOffSubscriptionAutoRenewalResponseNonNullableFields {
3962
+ subscription?: SubscriptionNonNullableFields;
3963
+ }
3964
+ export interface MarkLatestInvoiceAsPaidResponseNonNullableFields {
3965
+ subscription?: SubscriptionNonNullableFields;
3208
3966
  }
3209
- interface BillingStatusNonNullableFields {
3210
- currentCycle: number;
3211
- latestPaymentData?: PaymentDataNonNullableFields;
3212
- updateBillingDateData?: UpdateBillingDateDataNonNullableFields;
3213
- gracePeriodData?: GracePeriodDataNonNullableFields;
3967
+ export interface MarkInvoiceAsPaidResponseNonNullableFields {
3968
+ subscription?: SubscriptionNonNullableFields;
3214
3969
  }
3215
- interface SubscriptionPoliciesNonNullableFields {
3216
- customerCanCancel: boolean;
3217
- businessCanExtend: boolean;
3218
- allowEndOfCycleCancellation: boolean;
3970
+ export interface MarkBillingCycleAsPaidResponseNonNullableFields {
3971
+ subscription?: SubscriptionNonNullableFields;
3219
3972
  }
3220
- interface PauseInfoNonNullableFields {
3221
- pausePolicy: PausePolicy;
3222
- pauseAt: PauseAt;
3223
- resumeAt: ResumeAt;
3973
+ interface AmountByStatusNonNullableFields {
3974
+ status: SubscriptionStatusEnumSubscriptionStatus;
3975
+ amount: number;
3224
3976
  }
3225
- interface CancellationInfoNonNullableFields {
3226
- initiator: HistoryActionInitiator;
3977
+ export interface GetSubscriptionsStatsResponseNonNullableFields {
3978
+ amountByStatuses: AmountByStatusNonNullableFields[];
3979
+ total: number;
3227
3980
  }
3228
- interface FixedPriceNonNullableFields {
3229
- itemPrice: string;
3981
+ export interface ExtendSubscriptionResponseNonNullableFields {
3982
+ subscription?: SubscriptionNonNullableFields;
3230
3983
  }
3231
- interface PricingModelNonNullableFields {
3232
- fixedPrice?: FixedPriceNonNullableFields;
3984
+ interface UnsupportedReasonNonNullableFields {
3985
+ code: string;
3233
3986
  }
3234
- interface ItemChangeNonNullableFields {
3235
- id: string;
3236
- pricingModel?: PricingModelNonNullableFields;
3237
- tax?: TaxNonNullableFields;
3987
+ interface UnsupportedActionNonNullableFields {
3988
+ actionType: ActionType;
3989
+ reasons: UnsupportedReasonNonNullableFields[];
3238
3990
  }
3239
- interface CatalogReferenceNonNullableFields {
3240
- catalogItemId: string;
3991
+ export interface AllowedActionsResponseNonNullableFields {
3992
+ actions: ActionNonNullableFields[];
3993
+ unsupportedActions: UnsupportedActionNonNullableFields[];
3241
3994
  }
3242
- interface ApplicationFeeNonNullableFields {
3243
- amount: string;
3244
- discounts: DiscountNonNullableFields[];
3995
+ export interface ListUpcomingChargesResponseNonNullableFields {
3996
+ upcomingCharges: SubscriptionChargeNonNullableFields[];
3245
3997
  }
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;
3998
+ interface ChargeNonNullableFields {
3999
+ cycleFrom: number;
4000
+ totals?: TotalsNonNullableFields;
3255
4001
  }
3256
- interface SubscriptionUpdateDataNonNullableFields {
3257
- itemsToUpdate: ItemChangeNonNullableFields[];
3258
- itemsToAdd: ItemNonNullableFields[];
3259
- numberOfRequests: number;
4002
+ export interface PreviewSubscriptionChargesResponseNonNullableFields {
4003
+ charges: ChargeNonNullableFields[];
3260
4004
  }
3261
- interface SpecificDateSubscriptionUpdateDataNonNullableFields {
3262
- updateData?: SubscriptionUpdateDataNonNullableFields;
4005
+ interface SubscriptionChargesNonNullableFields {
4006
+ charges: ChargeNonNullableFields[];
3263
4007
  }
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[];
4008
+ export interface PreviewSubscriptionsChargesResponseNonNullableFields {
4009
+ subscriptionsCharges: SubscriptionChargesNonNullableFields[];
3278
4010
  }
3279
4011
  interface SubscriptionCreatedNonNullableFields {
3280
4012
  subscription?: SubscriptionNonNullableFields;
@@ -3396,7 +4128,7 @@ interface FreeTrailStartedNonNullableFields {
3396
4128
  interface FreeTrailEndedNonNullableFields {
3397
4129
  subscription?: SubscriptionNonNullableFields;
3398
4130
  }
3399
- interface InvoiceMarkedAsPaidNonNullableFields {
4131
+ interface SubscriptionBillingCyclePaidNonNullableFields {
3400
4132
  subscription?: SubscriptionNonNullableFields;
3401
4133
  paidCycle: number;
3402
4134
  invoiceId: string;
@@ -3440,7 +4172,7 @@ interface SubscriptionEventNonNullableFields {
3440
4172
  collectionMethodUpdated?: SubscriptionCollectionMethodUpdatedNonNullableFields;
3441
4173
  freeTrailStarted?: FreeTrailStartedNonNullableFields;
3442
4174
  freeTrailEnded?: FreeTrailEndedNonNullableFields;
3443
- invoiceMarkedAsPaid?: InvoiceMarkedAsPaidNonNullableFields;
4175
+ billingCyclePaid?: SubscriptionBillingCyclePaidNonNullableFields;
3444
4176
  initiatePaymentMethodSetup?: InitiatedPaymentMethodSetupNonNullableFields;
3445
4177
  subscriptionBoAction?: SubscriptionBackOfficeActionNonNullableFields;
3446
4178
  }
@@ -3452,167 +4184,4 @@ interface SubscriptionHistoryEntryNonNullableFields {
3452
4184
  export interface ListSubscriptionHistoryResponseNonNullableFields {
3453
4185
  historyEntries: SubscriptionHistoryEntryNonNullableFields[];
3454
4186
  }
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
4187
  export {};