@wix/auto_sdk_subscription_subscriptions 1.0.7 → 1.0.8

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