@wix/pricing-plans 1.0.53 → 1.0.55

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 (97) hide show
  1. package/build/cjs/context.d.ts +2 -2
  2. package/build/cjs/context.js +2 -2
  3. package/build/cjs/context.js.map +1 -1
  4. package/build/cjs/index.d.ts +2 -2
  5. package/build/cjs/index.js +2 -2
  6. package/build/cjs/index.js.map +1 -1
  7. package/build/cjs/meta.d.ts +2 -2
  8. package/build/cjs/meta.js +2 -2
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/context.d.ts +2 -2
  11. package/build/es/context.js +2 -2
  12. package/build/es/context.js.map +1 -1
  13. package/build/es/index.d.ts +2 -2
  14. package/build/es/index.js +2 -2
  15. package/build/es/index.js.map +1 -1
  16. package/build/es/meta.d.ts +2 -2
  17. package/build/es/meta.js +2 -2
  18. package/build/es/meta.js.map +1 -1
  19. package/package.json +12 -9
  20. package/build/cjs/index.typings.d.ts +0 -2
  21. package/build/cjs/index.typings.js +0 -29
  22. package/build/cjs/index.typings.js.map +0 -1
  23. package/build/cjs/src/pricing-plans-v2-order.context.d.ts +0 -15
  24. package/build/cjs/src/pricing-plans-v2-order.context.js +0 -148
  25. package/build/cjs/src/pricing-plans-v2-order.context.js.map +0 -1
  26. package/build/cjs/src/pricing-plans-v2-order.http.d.ts +0 -165
  27. package/build/cjs/src/pricing-plans-v2-order.http.js +0 -818
  28. package/build/cjs/src/pricing-plans-v2-order.http.js.map +0 -1
  29. package/build/cjs/src/pricing-plans-v2-order.meta.d.ts +0 -41
  30. package/build/cjs/src/pricing-plans-v2-order.meta.js +0 -275
  31. package/build/cjs/src/pricing-plans-v2-order.meta.js.map +0 -1
  32. package/build/cjs/src/pricing-plans-v2-order.public.d.ts +0 -103
  33. package/build/cjs/src/pricing-plans-v2-order.public.js +0 -96
  34. package/build/cjs/src/pricing-plans-v2-order.public.js.map +0 -1
  35. package/build/cjs/src/pricing-plans-v2-order.types.d.ts +0 -1801
  36. package/build/cjs/src/pricing-plans-v2-order.types.js +0 -135
  37. package/build/cjs/src/pricing-plans-v2-order.types.js.map +0 -1
  38. package/build/cjs/src/pricing-plans-v2-order.universal.d.ts +0 -2203
  39. package/build/cjs/src/pricing-plans-v2-order.universal.js +0 -1137
  40. package/build/cjs/src/pricing-plans-v2-order.universal.js.map +0 -1
  41. package/build/cjs/src/pricing-plans-v2-plan.context.d.ts +0 -14
  42. package/build/cjs/src/pricing-plans-v2-plan.context.js +0 -137
  43. package/build/cjs/src/pricing-plans-v2-plan.context.js.map +0 -1
  44. package/build/cjs/src/pricing-plans-v2-plan.http.d.ts +0 -134
  45. package/build/cjs/src/pricing-plans-v2-plan.http.js +0 -544
  46. package/build/cjs/src/pricing-plans-v2-plan.http.js.map +0 -1
  47. package/build/cjs/src/pricing-plans-v2-plan.meta.d.ts +0 -34
  48. package/build/cjs/src/pricing-plans-v2-plan.meta.js +0 -256
  49. package/build/cjs/src/pricing-plans-v2-plan.meta.js.map +0 -1
  50. package/build/cjs/src/pricing-plans-v2-plan.public.d.ts +0 -85
  51. package/build/cjs/src/pricing-plans-v2-plan.public.js +0 -84
  52. package/build/cjs/src/pricing-plans-v2-plan.public.js.map +0 -1
  53. package/build/cjs/src/pricing-plans-v2-plan.types.d.ts +0 -732
  54. package/build/cjs/src/pricing-plans-v2-plan.types.js +0 -41
  55. package/build/cjs/src/pricing-plans-v2-plan.types.js.map +0 -1
  56. package/build/cjs/src/pricing-plans-v2-plan.universal.d.ts +0 -1163
  57. package/build/cjs/src/pricing-plans-v2-plan.universal.js +0 -908
  58. package/build/cjs/src/pricing-plans-v2-plan.universal.js.map +0 -1
  59. package/build/es/index.typings.d.ts +0 -2
  60. package/build/es/index.typings.js +0 -3
  61. package/build/es/index.typings.js.map +0 -1
  62. package/build/es/src/pricing-plans-v2-order.context.d.ts +0 -15
  63. package/build/es/src/pricing-plans-v2-order.context.js +0 -132
  64. package/build/es/src/pricing-plans-v2-order.context.js.map +0 -1
  65. package/build/es/src/pricing-plans-v2-order.http.d.ts +0 -165
  66. package/build/es/src/pricing-plans-v2-order.http.js +0 -802
  67. package/build/es/src/pricing-plans-v2-order.http.js.map +0 -1
  68. package/build/es/src/pricing-plans-v2-order.meta.d.ts +0 -41
  69. package/build/es/src/pricing-plans-v2-order.meta.js +0 -236
  70. package/build/es/src/pricing-plans-v2-order.meta.js.map +0 -1
  71. package/build/es/src/pricing-plans-v2-order.public.d.ts +0 -103
  72. package/build/es/src/pricing-plans-v2-order.public.js +0 -69
  73. package/build/es/src/pricing-plans-v2-order.public.js.map +0 -1
  74. package/build/es/src/pricing-plans-v2-order.types.d.ts +0 -1801
  75. package/build/es/src/pricing-plans-v2-order.types.js +0 -132
  76. package/build/es/src/pricing-plans-v2-order.types.js.map +0 -1
  77. package/build/es/src/pricing-plans-v2-order.universal.d.ts +0 -2203
  78. package/build/es/src/pricing-plans-v2-order.universal.js +0 -1098
  79. package/build/es/src/pricing-plans-v2-order.universal.js.map +0 -1
  80. package/build/es/src/pricing-plans-v2-plan.context.d.ts +0 -14
  81. package/build/es/src/pricing-plans-v2-plan.context.js +0 -122
  82. package/build/es/src/pricing-plans-v2-plan.context.js.map +0 -1
  83. package/build/es/src/pricing-plans-v2-plan.http.d.ts +0 -134
  84. package/build/es/src/pricing-plans-v2-plan.http.js +0 -529
  85. package/build/es/src/pricing-plans-v2-plan.http.js.map +0 -1
  86. package/build/es/src/pricing-plans-v2-plan.meta.d.ts +0 -34
  87. package/build/es/src/pricing-plans-v2-plan.meta.js +0 -218
  88. package/build/es/src/pricing-plans-v2-plan.meta.js.map +0 -1
  89. package/build/es/src/pricing-plans-v2-plan.public.d.ts +0 -85
  90. package/build/es/src/pricing-plans-v2-plan.public.js +0 -64
  91. package/build/es/src/pricing-plans-v2-plan.public.js.map +0 -1
  92. package/build/es/src/pricing-plans-v2-plan.types.d.ts +0 -732
  93. package/build/es/src/pricing-plans-v2-plan.types.js +0 -38
  94. package/build/es/src/pricing-plans-v2-plan.types.js.map +0 -1
  95. package/build/es/src/pricing-plans-v2-plan.universal.d.ts +0 -1163
  96. package/build/es/src/pricing-plans-v2-plan.universal.js +0 -870
  97. package/build/es/src/pricing-plans-v2-plan.universal.js.map +0 -1
@@ -1,1801 +0,0 @@
1
- /**
2
- * An order object includes all of the details related to the purchase of a Pricing Plan.
3
- * You can manage existing orders, create offline orders, and preview orders not yet purchased.
4
- *
5
- * Orders are based on pricing models based on the payment and duration cycles for each plan. See here to
6
- * [learn more about pricing models](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/introduction#wix-pricing-plans_pricing-plans_introduction_pricing-models).
7
- */
8
- export interface Order {
9
- /**
10
- * Order ID.
11
- * @readonly
12
- */
13
- id?: string;
14
- /**
15
- * ID of the plan purchased with the order. See [Plans for more information about pricing plans](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/plans/introduction).
16
- * @readonly
17
- */
18
- planId?: string;
19
- /**
20
- * ID of the related Wix subscription.
21
- *
22
- * Every pricing plan order corresponds to a Wix subscription, including orders for single payment plans. See here
23
- * for a [Pricing Plans overview](https://support.wix.com/en/article/pricing-plans-an-overview#create-plans-to-suit-your-business).
24
- * @readonly
25
- */
26
- subscriptionId?: string;
27
- /**
28
- * Wix Pay order ID.
29
- *
30
- * Provided by Wix whether the order is created online or offline. The field is omitted when the order is free.
31
- * @readonly
32
- */
33
- wixPayOrderId?: string | null;
34
- /**
35
- * The buyer's IDs. Includes `memberId` and `contactId`.
36
- *
37
- * Currently, Pricing Plan purchases are limited to members only. `contactId` is returned,
38
- * but a buyer will not be able to purchase a plan without a `memberId`.
39
- * @readonly
40
- */
41
- buyer?: Buyer;
42
- /**
43
- * __Deprecated.__ Use `pricing` instead. This property will be removed on September 30, 2022.
44
- * @readonly
45
- */
46
- priceDetails?: PriceDetails;
47
- /**
48
- * Order pricing model, price, and payment schedule.
49
- *
50
- * [Learn more about pricing models](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/introduction#wix-pricing-plans_pricing-plans_introduction_pricing-models).
51
- * @readonly
52
- */
53
- pricing?: PricingDetails;
54
- /**
55
- * How the order was processed. One of:
56
- * + `ONLINE`: The buyer purchased the plan using the site.
57
- * + `OFFLINE`: The buyer made a manual, offline purchase without using the site.
58
- * + `EXTERNAL`: The buyer made a purchase through an external payment provider.
59
- * @readonly
60
- */
61
- type?: OrderType;
62
- /**
63
- * Status of the order. One of:
64
- * + `DRAFT`: Order has been initiated but payment hasn't been processed yet. The plan isn't yet available for use to the buyer.
65
- * + `PENDING`: Order has been purchased and its start date is set in the future.
66
- * + `ACTIVE`: Order has been processed. The plan is available for use.
67
- * + `PAUSED`: Order, and use of the plan, is [paused](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/orders/pause-order). The order, and use of the plan, can be [resumed](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/orders/resume-order).
68
- * + `ENDED`: Order has completed its duration and is no longer available for use.
69
- * + `CANCELED`: Order has been [canceled](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/orders/cancel-order).
70
- * @readonly
71
- */
72
- status?: OrderStatus;
73
- /**
74
- * Whether the order will be canceled at the next payment date.
75
- *
76
- * If `true`, the order status will be `CANCELED` and the next payment won't be charged. Omitted for single payment orders.
77
- * @readonly
78
- */
79
- autoRenewCanceled?: boolean | null;
80
- /**
81
- * Details about the cancellation of an order.
82
- *
83
- * Only present if the status is `CANCELED`.
84
- * @readonly
85
- */
86
- cancellation?: Cancellation;
87
- /**
88
- * Status of the last payment for the order.
89
- * Updated automatically for online orders. Updated manually by the site owner for offline orders. One of:
90
- * + `PAID`: The last payment was paid.
91
- * + `REFUNDED`: The last payment was refunded.
92
- * + `FAILED`: The last payment transaction didn't complete.
93
- * + `UNPAID`: The last payment wasn't paid.
94
- * + `PENDING`: Awaiting payment.
95
- * + `NOT_APPLICABLE`: No payment was necessary. For example, for free plans or free trials.
96
- * @readonly
97
- */
98
- lastPaymentStatus?: PaymentStatus;
99
- /**
100
- * Start date and time for the ordered plan.
101
- * @readonly
102
- */
103
- startDate?: Date;
104
- /**
105
- * Current end date and time for the ordered plan.
106
- *
107
- * `endDate` may be updated over the course of an order. If the order is [paused](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/orders/pause-order),
108
- * it will have a later `endDate` once it [resumes](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/orders/resume-order). `endDate` may also be [postponed](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/orders/postpone-end-date).
109
- *
110
- * Omitted if the order is valid until canceled and still `ACTIVE`.
111
- * @readonly
112
- */
113
- endDate?: Date;
114
- /**
115
- * List of periods during which the order is paused.
116
- * @readonly
117
- */
118
- pausePeriods?: PausePeriod[];
119
- /**
120
- * Free trial period for the order, in days.
121
- *
122
- * Only available for recurring plans.
123
- * @readonly
124
- */
125
- freeTrialDays?: number | null;
126
- /**
127
- * Earliest end date and time that the plan for the order can expire.
128
- *
129
- * Calculated by using the original end date plus any pause periods. Omitted if the order is active until canceled. Reserved for future use.
130
- * @readonly
131
- */
132
- earliestEndDate?: Date;
133
- /**
134
- * Current payment cycle for the order.
135
- *
136
- * `currentCycle` will be omitted if the order's status is `CANCELED` or `ENDED`, or if the `startDate` hasn't passed yet.
137
- * @readonly
138
- */
139
- currentCycle?: CurrentCycle;
140
- /**
141
- * Plan name at the time of purchase.
142
- * @readonly
143
- */
144
- planName?: string;
145
- /**
146
- * Plan description at the time of purchase
147
- * @readonly
148
- */
149
- planDescription?: string;
150
- /**
151
- * Plan price as it was at the moment of order creation.
152
- * @readonly
153
- */
154
- planPrice?: string;
155
- /**
156
- * Date and time the order was created.
157
- * @readonly
158
- */
159
- createdDate?: Date;
160
- /**
161
- * Date and time the order was updated.
162
- * @readonly
163
- */
164
- updatedDate?: Date;
165
- /**
166
- * Information about the form submitted during the plan's checkout.
167
- * @readonly
168
- */
169
- formData?: FormData;
170
- }
171
- export interface Buyer {
172
- /**
173
- * Member ID for a Wix site member. See [Members to learn more about a site's members](https://dev.wix.com/api/rest/members/members).
174
- * @readonly
175
- */
176
- memberId?: string;
177
- /**
178
- * Contact ID for a Wix site contact. See [Contacts to learn more about a site's contacts](https://dev.wix.com/api/rest/contacts/contacts/contacts-v4/contact-object).
179
- * @readonly
180
- */
181
- contactId?: string;
182
- }
183
- export interface PriceDetails extends PriceDetailsPricingModelOneOf {
184
- /** Order has recurring payments. */
185
- subscription?: Recurrence;
186
- /** One-time payment. Order is valid for a specified duration. */
187
- singlePaymentForDuration?: Duration;
188
- /** One-time payment. Order is valid until it is canceled. */
189
- singlePaymentUnlimited?: boolean | null;
190
- /** Price of the order excluding tax, specified as a monetary amount. for example, `"9.99"`. */
191
- subtotal?: string;
192
- /** Total discount applied. */
193
- discount?: string;
194
- /** Tax applied. */
195
- tax?: Tax;
196
- /**
197
- * Price after tax and discount is applied, specified as a monetary amount. For example, `"13.98"`.
198
- *
199
- * If no tax is applied, the amount is the same as `subtotal`.
200
- */
201
- total?: string;
202
- /** Plan price as it was at the moment of order creation. */
203
- planPrice?: string;
204
- /** Currency code. Must be valid ISO 4217 currency code (e.g., USD). */
205
- currency?: string;
206
- /** Free trial period for the order in days. Only available for recurring plans. */
207
- freeTrialDays?: number | null;
208
- /** Coupon applied to the order. Empty means no coupon was applied. */
209
- coupon?: Coupon;
210
- }
211
- /** @oneof */
212
- export interface PriceDetailsPricingModelOneOf {
213
- /** Order has recurring payments. */
214
- subscription?: Recurrence;
215
- /** One-time payment. Order is valid for a specified duration. */
216
- singlePaymentForDuration?: Duration;
217
- /** One-time payment. Order is valid until it is canceled. */
218
- singlePaymentUnlimited?: boolean | null;
219
- }
220
- export interface Tax {
221
- /** Name of the tax. For example, VAT. */
222
- name?: string;
223
- /** Whether tax is included in the original price. When `false`, tax is added at checkout. */
224
- includedInPrice?: boolean;
225
- /** Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`. */
226
- rate?: string;
227
- /** Total tax, specified as a monetary amount. For example, `"3.99"`. */
228
- amount?: string;
229
- }
230
- /** An object specifying how often and for how long payments recur (may be forever). */
231
- export interface Recurrence {
232
- /** Length of one payment cycle. */
233
- cycleDuration?: Duration;
234
- /**
235
- * Amount of payment cycles this subscription is valid for.
236
- *
237
- * `0` for unlimited or until-canceled.
238
- */
239
- cycleCount?: number | null;
240
- }
241
- /** A duration expressed in number of time units. */
242
- export interface Duration {
243
- /**
244
- * The amount of a duration `unit` in a single payment cycle.
245
- *
246
- * Currently limited to support only `1`.
247
- */
248
- count?: number | null;
249
- /** Unit of time for the cycle duration. */
250
- unit?: PeriodUnit;
251
- }
252
- export declare enum PeriodUnit {
253
- UNDEFINED = "UNDEFINED",
254
- DAY = "DAY",
255
- WEEK = "WEEK",
256
- MONTH = "MONTH",
257
- YEAR = "YEAR"
258
- }
259
- export interface Coupon {
260
- /** Code of the applied coupon. */
261
- code?: string;
262
- /** Total discount of the coupon, as a monetary amount. */
263
- amount?: string;
264
- /**
265
- * Coupon ID.
266
- * @readonly
267
- */
268
- id?: string;
269
- }
270
- export interface PricingDetails extends PricingDetailsPricingModelOneOf {
271
- /** Pricing model for an order with recurring payment cycles. */
272
- subscription?: Recurrence;
273
- /** Pricing model for an order with a one-time payment and the order is valid for a specific amount of time. */
274
- singlePaymentForDuration?: Duration;
275
- /** Pricing model for an order with a one-time payment and the order is valid until canceled. */
276
- singlePaymentUnlimited?: boolean | null;
277
- /**
278
- * Pricing details for all pricing models.
279
- * @readonly
280
- */
281
- prices?: SpannedPrice[];
282
- }
283
- /** @oneof */
284
- export interface PricingDetailsPricingModelOneOf {
285
- /** Pricing model for an order with recurring payment cycles. */
286
- subscription?: Recurrence;
287
- /** Pricing model for an order with a one-time payment and the order is valid for a specific amount of time. */
288
- singlePaymentForDuration?: Duration;
289
- /** Pricing model for an order with a one-time payment and the order is valid until canceled. */
290
- singlePaymentUnlimited?: boolean | null;
291
- }
292
- export interface SpannedPrice {
293
- /**
294
- * Cycle duration to apply `price` for.
295
- *
296
- * Use with all pricing models.
297
- * Can apply the same price to multiple payment cycles.
298
- */
299
- duration?: PriceDuration;
300
- /** Order price. */
301
- price?: Price;
302
- }
303
- export interface PriceDuration {
304
- /**
305
- * Price starts to apply with this cycle.
306
- *
307
- * `1` is the first payment cycle for all pricing models.
308
- */
309
- cycleFrom?: number;
310
- /**
311
- * Amount of cycles to apply price for.
312
- *
313
- * For `subscription` pricing models with a finite number of cycles, the `numberOfCycles` is the same as `pricing.subscription.cycleCount`.
314
- *
315
- * For `subscription` pricing models that are unlimited or until-canceled, the `numberOfCycles` is not returned.
316
- *
317
- * For `singlePaymentForDuration` and `singlePaymentUnlimited` pricing models, the `numberOfCycles` is `1`.
318
- */
319
- numberOfCycles?: number | null;
320
- }
321
- export interface Price {
322
- /** Price of the order excluding tax, specified as a monetary amount. For example, `"9.99"`. */
323
- subtotal?: string;
324
- /**
325
- * Coupon applied to the order.
326
- *
327
- * See Coupons [to learn more about coupons](https://dev.wix.com/api/rest/coupons).
328
- */
329
- coupon?: Coupon;
330
- /** Total discount applied to the order. */
331
- discount?: string;
332
- /**
333
- * Tax applied to the order.
334
- *
335
- * Tax is only applied if the site [has it configured](https://support.wix.com/en/article/pricing-plans-setting-up-tax-collection).
336
- */
337
- tax?: Tax;
338
- /**
339
- * Price after tax and discount is applied. Specified as a monetary amount, for example, `"13.98"`.
340
- *
341
- * If no tax is applied, the amount is the same as `subtotal`.
342
- */
343
- total?: string;
344
- /**
345
- * Three-letter currency code in
346
- * [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
347
- */
348
- currency?: string;
349
- /** Price change after billing date was change and price was adjusted. Could be positive and negative values. */
350
- proration?: string;
351
- }
352
- export interface Fee {
353
- /** Fee name */
354
- name?: string;
355
- /** Amount of fee to be charged */
356
- amount?: string;
357
- }
358
- export declare enum OrderType {
359
- UNDEFINED = "UNDEFINED",
360
- /** Payments made by the buyer */
361
- ONLINE = "ONLINE",
362
- /** Payments managed manually by the site owner */
363
- OFFLINE = "OFFLINE",
364
- /** Payments managed externally */
365
- EXTERNAL = "EXTERNAL"
366
- }
367
- export declare enum OrderMethod {
368
- UNKNOWN = "UNKNOWN",
369
- /** Mail Order / Telephone Order transaction */
370
- MOTO = "MOTO",
371
- /** Point of Sale transaction */
372
- POS = "POS"
373
- }
374
- export declare enum OrderStatus {
375
- /** Order status undefined */
376
- UNDEFINED = "UNDEFINED",
377
- /** Order created, but hasn't been paid for yet. Filtered out in ListOrders response by default. */
378
- DRAFT = "DRAFT",
379
- /** Order has been paid for, but the start date is in the future */
380
- PENDING = "PENDING",
381
- /** Order is active */
382
- ACTIVE = "ACTIVE",
383
- /** Order is paused until site owner resumes it */
384
- PAUSED = "PAUSED",
385
- /** Order has ended */
386
- ENDED = "ENDED",
387
- /** Order has been canceled */
388
- CANCELED = "CANCELED"
389
- }
390
- export interface Cancellation {
391
- /** Date and time the cancellation was requested. */
392
- requestedDate?: Date;
393
- /**
394
- * Reason for the cancellation. One of:
395
- * + `OWNER_ACTION`: Site owner canceled the order.
396
- * + `MEMBER_ACTION`: Buyer initiated the cancellation.
397
- * + `PAYMENT_FAILURE`: Payment transaction failed.
398
- * + `PAYMENT_SETUP_FAILURE`: Buyer's payment details weren't set up correctly.
399
- * + `UNKNOWN`: Reason for the cancellation is unknown.
400
- */
401
- cause?: CancellationCause;
402
- /**
403
- * When the cancellation takes effect. Set when cancelling the order. One of:
404
- * + `IMMEDIATELY`: Cancellation occurs immediately and the buyer can no longer use the plan.
405
- * + `NEXT_PAYMENT_DATE`: Cancellation occurs at the next payment date and time. Buyer can continue to use the plan until that date and time.
406
- */
407
- effectiveAt?: CancellationEffectiveAt;
408
- }
409
- export declare enum CancellationCause {
410
- /** Cancellation initiator undefined */
411
- UNDEFINED = "UNDEFINED",
412
- /** Order was canceled by site owner (default if canceled by user or service identity) */
413
- OWNER_ACTION = "OWNER_ACTION",
414
- /** Order was canceled by member (default if canceled by member identity) */
415
- MEMBER_ACTION = "MEMBER_ACTION",
416
- /** Order was canceled because of payment failure */
417
- PAYMENT_FAILURE = "PAYMENT_FAILURE",
418
- /** Order was canceled because of payment setup failure */
419
- PAYMENT_SETUP_FAILURE = "PAYMENT_SETUP_FAILURE",
420
- /** Order was cancelled because of an unknown reason. It's not possible to know with certain payment providers (e.g. paypal) */
421
- UNKNOWN = "UNKNOWN"
422
- }
423
- export declare enum CancellationEffectiveAt {
424
- /** Cancellation time undefined */
425
- UNDEFINED = "UNDEFINED",
426
- /** Will cancel the order now, i.e. update validUntil to the current date */
427
- IMMEDIATELY = "IMMEDIATELY",
428
- /** Will cancel the order at the date when next payment should have been made */
429
- NEXT_PAYMENT_DATE = "NEXT_PAYMENT_DATE"
430
- }
431
- export declare enum PaymentStatus {
432
- /** Payment status undefined */
433
- UNDEFINED = "UNDEFINED",
434
- /** Payment has been paid */
435
- PAID = "PAID",
436
- /** Payment has been refunded */
437
- REFUNDED = "REFUNDED",
438
- /** Recurring payment has failed */
439
- FAILED = "FAILED",
440
- /** Payment has not been paid */
441
- UNPAID = "UNPAID",
442
- /** Billing has been initialized, but actual charge is yet to be made. Can happen for free trial and PayPal */
443
- PENDING = "PENDING",
444
- /** Used in cases where the plan is free */
445
- NOT_APPLICABLE = "NOT_APPLICABLE"
446
- }
447
- export interface PausePeriod {
448
- /**
449
- * Status of the pause period. One of:
450
- *
451
- * + `ACTIVE`: Status while the order is [paused](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/orders/pause-order).
452
- * + `ENDED`: Status when the order is [resumed](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/orders/resume-order).
453
- */
454
- status?: Status;
455
- /** Start date and time of the pause period. */
456
- pauseDate?: Date;
457
- /**
458
- * End date and time of the pause period.
459
- *
460
- * Omitted while the pause period remains `ACTIVE`.
461
- */
462
- resumeDate?: Date;
463
- }
464
- export declare enum Status {
465
- UNDEFINED = "UNDEFINED",
466
- /** Order suspension is active */
467
- ACTIVE = "ACTIVE",
468
- /** Order suspension has ended */
469
- ENDED = "ENDED"
470
- }
471
- /**
472
- * Current cycle will be empty when order is cancelled, expired or order start date is in the future
473
- * Current cycle start and end dates take into account free trial days and suspensions
474
- */
475
- export interface CurrentCycle {
476
- /**
477
- * Index of the current payment cycle in the order.
478
- *
479
- * `0` when order is in a free trial period. In all other cases, the index starts with `1`.
480
- */
481
- index?: number;
482
- /** Start date and time for the current payment cycle. */
483
- startedDate?: Date;
484
- /** End date and time for the current payment cycle. */
485
- endedDate?: Date;
486
- }
487
- /** Order cycle start and end dates take into account free trial days and suspensions */
488
- export interface OrderCycle {
489
- /**
490
- * Index of this cycle in the order.
491
- *
492
- * `0` when order is in a free trial period. In all other cases, the index starts with `1`.
493
- */
494
- index?: number;
495
- /** Start date and time for this order cycle. */
496
- startedDate?: Date;
497
- /** End date and time for this order cycle. */
498
- endedDate?: Date;
499
- }
500
- export interface FormData {
501
- /**
502
- * ID of the order form associated with the plan at checkout.
503
- *
504
- * Learn more about [forms](https://dev.wix.com/docs/rest/api-reference/wix-forms/form-submissions/introduction).
505
- */
506
- formId?: string | null;
507
- /** ID of a submission to the plan's order form at checkout. Every time a visitor completes the checkout process for a plan, a new submission is created. */
508
- submissionId?: string | null;
509
- /**
510
- * Data submitted to the plan's order form at checkout.
511
- * @readonly
512
- */
513
- submissionData?: Record<string, any>;
514
- }
515
- export interface DomainEvent extends DomainEventBodyOneOf {
516
- createdEvent?: EntityCreatedEvent;
517
- updatedEvent?: EntityUpdatedEvent;
518
- deletedEvent?: EntityDeletedEvent;
519
- actionEvent?: ActionEvent;
520
- /**
521
- * Unique event ID.
522
- * Allows clients to ignore duplicate webhooks.
523
- */
524
- id?: string;
525
- /**
526
- * Assumes actions are also always typed to an entity_type
527
- * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
528
- */
529
- entityFqdn?: string;
530
- /**
531
- * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
532
- * This is although the created/updated/deleted notion is duplication of the oneof types
533
- * Example: created/updated/deleted/started/completed/email_opened
534
- */
535
- slug?: string;
536
- /** ID of the entity associated with the event. */
537
- entityId?: string;
538
- /** Event timestamp. */
539
- eventTime?: Date;
540
- /**
541
- * Whether the event was triggered as a result of a privacy regulation application
542
- * (for example, GDPR).
543
- */
544
- triggeredByAnonymizeRequest?: boolean | null;
545
- /** If present, indicates the action that triggered the event. */
546
- originatedFrom?: string | null;
547
- /**
548
- * A sequence number defining the order of updates to the underlying entity.
549
- * For example, given that some entity was updated at 16:00 and than again at 16:01,
550
- * it is guaranteed that the sequence number of the second update is strictly higher than the first.
551
- * As the consumer, you can use this value to ensure that you handle messages in the correct order.
552
- * To do so, you will need to persist this number on your end, and compare the sequence number from the
553
- * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
554
- */
555
- entityEventSequence?: string | null;
556
- }
557
- /** @oneof */
558
- export interface DomainEventBodyOneOf {
559
- createdEvent?: EntityCreatedEvent;
560
- updatedEvent?: EntityUpdatedEvent;
561
- deletedEvent?: EntityDeletedEvent;
562
- actionEvent?: ActionEvent;
563
- }
564
- export interface EntityCreatedEvent {
565
- entityAsJson?: string;
566
- }
567
- export interface EntityUpdatedEvent {
568
- /**
569
- * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
570
- * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
571
- * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
572
- */
573
- currentEntityAsJson?: string;
574
- }
575
- export interface EntityDeletedEvent {
576
- /** Entity that was deleted */
577
- deletedEntityAsJson?: string | null;
578
- }
579
- export interface ActionEvent {
580
- bodyAsJson?: string;
581
- }
582
- export interface Empty {
583
- }
584
- export interface MemberGetOrderRequest {
585
- /** Order ID. */
586
- id: string;
587
- fieldSet?: Set;
588
- }
589
- export declare enum Set {
590
- /** Same behavior as BASIC */
591
- UNKNOWN_SET = "UNKNOWN_SET",
592
- /**
593
- * Returns fields of the entity that are available in the database.
594
- * By default a field is available in the database unless explicitly specified in the documentation
595
- */
596
- BASIC = "BASIC",
597
- /**
598
- * Returns all fields in the entity.
599
- * This might make additional calls to gather the full entity
600
- */
601
- FULL = "FULL"
602
- }
603
- export interface MemberGetOrderResponse {
604
- /** Requested order. */
605
- order?: Order;
606
- }
607
- export interface MemberListOrdersRequest {
608
- /** Filter by plan IDs. */
609
- planIds?: string[];
610
- /** Filter for orders where auto renewal was canceled. */
611
- autoRenewCanceled?: boolean | null;
612
- /** Filter by order status. */
613
- orderStatuses?: OrderStatus[];
614
- /** Filter by payment status. */
615
- paymentStatuses?: PaymentStatus[];
616
- /** Limit the number of pricing plans returned. Default limit is 50. */
617
- limit?: number | null;
618
- /** Number of entries to offset. */
619
- offset?: number | null;
620
- /** Sorting direction (defaults to ASC) and field to sort by. [See available fields here](https://dev.wix.com/api/rest/pricing-plans/pricing-plans/order-v2/filter-and-sort). */
621
- sorting?: Sorting;
622
- fieldSet?: Set;
623
- }
624
- export interface Sorting {
625
- /** Name of the field to sort by. */
626
- fieldName?: string;
627
- /** Sort order. */
628
- order?: SortOrder;
629
- }
630
- export declare enum SortOrder {
631
- ASC = "ASC",
632
- DESC = "DESC"
633
- }
634
- export interface MemberListOrdersResponse {
635
- orders?: Order[];
636
- /** Object containing paging-related data (number of orders returned, offset). */
637
- pagingMetadata?: PagingMetadataV2;
638
- }
639
- export interface PagingMetadataV2 {
640
- /** Number of items returned in the response. */
641
- count?: number | null;
642
- /** Offset that was requested. */
643
- offset?: number | null;
644
- /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
645
- total?: number | null;
646
- /** Flag that indicates the server failed to calculate the `total` field. */
647
- tooManyToCount?: boolean | null;
648
- /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
649
- cursors?: Cursors;
650
- }
651
- export interface Cursors {
652
- /** Cursor string pointing to the next page in the list of results. */
653
- next?: string | null;
654
- /** Cursor pointing to the previous page in the list of results. */
655
- prev?: string | null;
656
- }
657
- /**
658
- * TODO: Write orders filter and sort docs page
659
- * Retrieves a list of up to 1,000 orders, based on the provided paging, [sorting, and filtering](https://dev.wix.com/api/rest/pricing-plans/pricing-plans/order-v2/filter-and-sort).
660
- */
661
- export interface QueryOrdersRequest {
662
- query?: QueryV2;
663
- }
664
- export interface QueryV2 extends QueryV2PagingMethodOneOf {
665
- /** Paging options to limit and skip the number of items. */
666
- paging?: Paging;
667
- /** 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`. */
668
- cursorPaging?: CursorPaging;
669
- /**
670
- * Filter object in the following format:
671
- * `"filter" : {
672
- * "fieldName1": "value1",
673
- * "fieldName2":{"$operator":"value2"}
674
- * }`
675
- * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
676
- */
677
- filter?: Record<string, any> | null;
678
- /**
679
- * Sort object in the following format:
680
- * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
681
- */
682
- sort?: Sorting[];
683
- /** 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. */
684
- fields?: string[];
685
- /** 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. */
686
- fieldsets?: string[];
687
- }
688
- /** @oneof */
689
- export interface QueryV2PagingMethodOneOf {
690
- /** Paging options to limit and skip the number of items. */
691
- paging?: Paging;
692
- /** 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`. */
693
- cursorPaging?: CursorPaging;
694
- }
695
- export interface Paging {
696
- /** Number of items to load. */
697
- limit?: number | null;
698
- /** Number of items to skip in the current sort order. */
699
- offset?: number | null;
700
- }
701
- export interface CursorPaging {
702
- /** Maximum number of items to return in the results. */
703
- limit?: number | null;
704
- /**
705
- * Pointer to the next or previous page in the list of results.
706
- *
707
- * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
708
- * Not relevant for the first request.
709
- */
710
- cursor?: string | null;
711
- }
712
- export interface QueryOrdersResponse {
713
- /** Order data. */
714
- plans?: Order[];
715
- /** Paging-related data (number of orders returned, offset). */
716
- pagingMetadata?: PagingMetadataV2;
717
- }
718
- export interface RequestCancellationRequest {
719
- /** Order ID. */
720
- id: string;
721
- /** Required. Whether to cancel the order effective immediately or at the next payment date. One-time orders can only be canceled immediately. */
722
- effectiveAt: CancellationEffectiveAt;
723
- }
724
- export interface RequestCancellationResponse {
725
- }
726
- /**
727
- * Emitted when an order is canceled immediately or when cycle ends for an order with canceled auto renewal
728
- *
729
- * To determine the specific reason of the cancellation check `order.cancellation.cause` field.
730
- */
731
- export interface OrderCanceled {
732
- /** Canceled order. */
733
- order?: Order;
734
- }
735
- export interface CreateOnlineOrderRequest {
736
- /** Plan ID. */
737
- planId?: string;
738
- /**
739
- * Start date for the ordered plan.
740
- *
741
- * Default: Current date
742
- */
743
- startDate?: Date;
744
- /** Coupon code to apply. */
745
- couponCode?: string | null;
746
- /** Provided if checkout is initiated on buyer's behalf. */
747
- onBehalf?: OnBehalf;
748
- /** Form submission id that was submitted together with the order */
749
- submissionId?: string | null;
750
- }
751
- export interface OnBehalf {
752
- /** Member ID. */
753
- memberId?: string;
754
- /** Method by which checkout is initiated on buyer's behalf */
755
- orderMethod?: OrderMethod;
756
- }
757
- export interface CreateOnlineOrderResponse {
758
- /** Order. */
759
- order?: Order;
760
- }
761
- export interface CouponsError {
762
- couponCode?: string;
763
- planId?: string;
764
- }
765
- export interface CreateGuestOnlineOrderRequest {
766
- /** Plan ID. */
767
- planId?: string;
768
- /**
769
- * Start date for the ordered plan.
770
- *
771
- * Default: Current date
772
- */
773
- startDate?: Date;
774
- /** Coupon code to apply. */
775
- couponCode?: string | null;
776
- /** Captcha data to prove you are not a robot */
777
- captcha?: Captcha;
778
- /** Visitor info */
779
- guest?: Guest;
780
- /** Form submission id that was submitted together with the order */
781
- submissionId?: string | null;
782
- }
783
- export interface Captcha {
784
- /** Token from captcha */
785
- token?: string;
786
- }
787
- export interface Guest {
788
- /** Email for checkout */
789
- email?: string;
790
- }
791
- export interface CreateGuestOnlineOrderResponse {
792
- /** Order. */
793
- order?: Order;
794
- }
795
- export interface CreateOfflineOrderRequest {
796
- /** ID of the plan being ordered. See [Plans for more information about plan IDs](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/plans). */
797
- planId: string;
798
- /** ID of the member ordering the plan. See [Members for more information about member IDs](https://dev.wix.com/api/rest/members/members). */
799
- memberId: string;
800
- /**
801
- * Start date and time for the ordered plan.
802
- *
803
- * Default: Current date and time
804
- */
805
- startDate?: Date;
806
- /**
807
- * Whether the order is paid.
808
- *
809
- * Default: `false`
810
- */
811
- paid?: boolean | null;
812
- /**
813
- * Coupon code to apply.
814
- *
815
- * See [Coupons to learn more](https://dev.wix.com/api/rest/coupons).
816
- */
817
- couponCode?: string | null;
818
- /** Form submission id that was submitted together with the order */
819
- submissionId?: string | null;
820
- }
821
- export interface CreateOfflineOrderResponse {
822
- /** Order. */
823
- order?: Order;
824
- }
825
- export interface CreateExternalOrderRequest {
826
- /** Plan ID. */
827
- planId?: string;
828
- /** Form submission id that was submitted together with the order */
829
- submissionId?: string | null;
830
- }
831
- export interface CreateExternalOrderResponse {
832
- /** Created order */
833
- order?: Order;
834
- }
835
- export interface GetOnlineOrderPreviewRequest {
836
- /** Plan ID. */
837
- planId?: string;
838
- /**
839
- * Start date for the ordered plan.
840
- *
841
- * Default: Current date
842
- */
843
- startDate?: Date;
844
- /** Coupon code to apply. */
845
- couponCode?: string | null;
846
- }
847
- export interface GetOnlineOrderPreviewResponse {
848
- /** Will be missing if limit is exceeded */
849
- order?: Order;
850
- /**
851
- * Whether the purchase limit has already been reached for this plan by this member.
852
- * Always false for plans without purchase limits.
853
- */
854
- purchaseLimitExceeded?: boolean;
855
- }
856
- export interface GetGuestOnlineOrderPreviewRequest {
857
- /** Plan ID. */
858
- planId?: string;
859
- /**
860
- * Start date for the ordered plan.
861
- *
862
- * Default: Current date
863
- */
864
- startDate?: Date;
865
- /** Coupon code to apply. */
866
- couponCode?: string | null;
867
- email?: string;
868
- }
869
- export interface GetGuestOnlineOrderPreviewResponse {
870
- /** Will be missing if limit is exceeded */
871
- order?: Order;
872
- /**
873
- * Whether the purchase limit has already been reached for this plan by this email.
874
- * Always false for plans without purchase limits.
875
- */
876
- purchaseLimitExceeded?: boolean;
877
- }
878
- export interface GetOfflineOrderPreviewRequest {
879
- /** ID of the plan of the previewed order. See [Plans for more information about plan IDs](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/plans). */
880
- planId: string;
881
- /** Member ID of the buyer the previewed order is for. See [Members for more information about member IDs](https://dev.wix.com/api/rest/members/members). */
882
- memberId: string;
883
- /**
884
- * Start date and time for plan of the previewed order.
885
- *
886
- * Default: Current date and time
887
- */
888
- startDate?: Date;
889
- /** Coupon code to apply. See [Coupons to learn more](https://dev.wix.com/api/rest/coupons). */
890
- couponCode?: string | null;
891
- }
892
- export interface GetOfflineOrderPreviewResponse {
893
- /** The previewed order, as if the plan had been ordered. */
894
- order?: Order;
895
- /**
896
- * Whether this previewed order would exceed the permitted amount of purchases available
897
- * for this plan for this buyer.
898
- *
899
- * Always `false` for plans that do not have purchase limits.
900
- */
901
- purchaseLimitExceeded?: boolean;
902
- }
903
- export interface GetPricePreviewRequest {
904
- /** ID of plan to preview. */
905
- planId: string;
906
- /**
907
- * Coupon code to apply.
908
- *
909
- * See Coupons [to learn more](https://dev.wix.com/api/rest/coupons).
910
- */
911
- couponCode?: string | null;
912
- }
913
- export interface GetPricePreviewResponse {
914
- /** __Deprecated.__ Use `prices` instead. This property will be removed on September 30, 2022. */
915
- price?: PriceDetails;
916
- /** Pricing details. */
917
- prices?: SpannedPrice[];
918
- }
919
- export interface ChangeStartDateRequest {
920
- /** Draft order ID. */
921
- orderId?: string;
922
- /** New valid from date (timestamp). */
923
- startDate?: Date;
924
- }
925
- export interface ChangeStartDateResponse {
926
- /** Updated draft order. */
927
- order?: Order;
928
- }
929
- export interface OrderStartDateChanged {
930
- /** Order whose `startDate` changed. */
931
- order?: Order;
932
- }
933
- export interface ApplyCouponRequest {
934
- /** Draft order ID. */
935
- orderId?: string;
936
- /** Coupon code to apply. */
937
- couponCode?: string;
938
- }
939
- export interface ApplyCouponResponse {
940
- /** Order with applied coupon and recalculated tax. */
941
- order?: Order;
942
- }
943
- export interface SetSubmissionRequest {
944
- orderId?: string;
945
- submissionId?: string;
946
- }
947
- export interface SetSubmissionResponse {
948
- /** Order with submission id */
949
- order?: Order;
950
- }
951
- export interface OrderPurchased {
952
- /** Order that was paid for. If a free or an offline order, the order that was created. */
953
- order?: Order;
954
- }
955
- export interface OrderStarted {
956
- /** Order that reached its `startDate`. */
957
- order?: Order;
958
- }
959
- /**
960
- * Triggered at the start of a new payment cycle for an existing order.
961
- *
962
- * This webhook does not trigger at the initial start of an offline order.
963
- */
964
- export interface OrderCycleStarted {
965
- /** Order whose new cycle started. */
966
- order?: Order;
967
- /** Number of the payment cycle will be 0 when the order is in the free trial period. In other cases, the cycle number starts from 1. */
968
- cycleNumber?: number;
969
- }
970
- /** Emitted when a recurring order is canceled for the next payment cycle */
971
- export interface OrderAutoRenewCanceled {
972
- /** Order that is canceled, effective at the end of the current payment cycle. */
973
- order?: Order;
974
- }
975
- export interface OrderEnded {
976
- /** Order that ended. */
977
- order?: Order;
978
- }
979
- export interface GetOrderRequest {
980
- /** Order ID. */
981
- id: string;
982
- fieldSet?: Set;
983
- }
984
- export interface GetOrderResponse {
985
- /** Order. */
986
- order?: Order;
987
- }
988
- export interface ListOrdersRequest {
989
- /** Filter by a buyer's member ID. See [Members to learn more about a site's members](https://dev.wix.com/api/rest/members/members). */
990
- buyerIds?: string[];
991
- /** Filter by plan IDs. See [Plans to learn more about pricing plans](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/plans). */
992
- planIds?: string[];
993
- /** Filter by whether or not the auto-renewal of recurring orders was canceled. */
994
- autoRenewCanceled?: boolean | null;
995
- /** Filter by order status. */
996
- orderStatuses?: OrderStatus[];
997
- /** Filter by payment status. */
998
- paymentStatuses?: PaymentStatus[];
999
- /**
1000
- * Number of orders to return. See [Pagination](https://dev.wix.com/api/rest/getting-started/sorting-and-paging#getting-started_sorting-and-paging_paging) for more information.
1001
- *
1002
- * Max: `50`
1003
- */
1004
- limit?: number | null;
1005
- /** Number of orders to skip in the current sort order. */
1006
- offset?: number | null;
1007
- /**
1008
- * Sort order.
1009
- *
1010
- * Use `ASC` for ascending order or `DESC` for descending order.
1011
- *
1012
- * Default: `DESC`
1013
- */
1014
- sorting?: Sorting;
1015
- /** Parameter to define amount of fields to return. FULL returns each order's submission data. Supported values: UNKNOWN_SET, BASIC, FULL */
1016
- fieldSet?: Set;
1017
- }
1018
- export interface ListOrdersResponse {
1019
- /** List of orders. */
1020
- orders?: Order[];
1021
- /** Object containing paging-related data (number of orders returned, offset). */
1022
- pagingMetadata?: PagingMetadataV2;
1023
- }
1024
- export interface OrdersQueryOrdersRequest {
1025
- /** [See available fields here](https://dev.wix.com/api/rest/pricing-plans/pricing-plans/order-v2/filter-and-sort). */
1026
- query?: QueryV2;
1027
- }
1028
- export interface OrdersQueryOrdersResponse {
1029
- /** Retrieved orders. */
1030
- plans?: Order[];
1031
- /** Paging-related data (number of orders returned, offset). */
1032
- pagingMetadata?: PagingMetadataV2;
1033
- }
1034
- export interface GetOrdersStatsRequest {
1035
- }
1036
- export interface GetOrdersStatsResponse {
1037
- /** Total number of orders. */
1038
- totalOrderCount?: number;
1039
- /** Number of active orders. */
1040
- activeOrderCount?: number;
1041
- }
1042
- export interface GetAvailableOrderActionsRequest {
1043
- /** Order ID. */
1044
- id?: string;
1045
- }
1046
- export interface GetAvailableOrderActionsResponse {
1047
- /** Whether the order can be suspended. */
1048
- suspendable?: boolean;
1049
- /** If the order cannot be suspended, a reason is returned here. */
1050
- notSuspendableReason?: ReasonNotSuspendable;
1051
- /** Whether the order can be canceled by the buyer. */
1052
- cancelableByBuyer?: boolean;
1053
- }
1054
- export declare enum ReasonNotSuspendable {
1055
- /** Reason unknown */
1056
- UNDEFINED = "UNDEFINED",
1057
- /** Saved in the database but is awaiting payment. Non-active orders cannot be suspended */
1058
- PENDING = "PENDING",
1059
- /** Trial orders cannot be suspended */
1060
- TRIAL = "TRIAL",
1061
- /** Canceled orders cannot be suspended */
1062
- CANCELED = "CANCELED",
1063
- /** Ended orders cannot be suspended */
1064
- ENDED = "ENDED",
1065
- /** Paid for orders with future start dates cannot be suspended */
1066
- NOT_STARTED = "NOT_STARTED",
1067
- /** Order is already suspended */
1068
- ALREADY_SUSPENDED = "ALREADY_SUSPENDED",
1069
- /** Orders based on recurring payments using older Stripe versions cannot be suspended */
1070
- OLD_STRIPE = "OLD_STRIPE"
1071
- }
1072
- export interface PostponeEndDateRequest {
1073
- /** Order ID. */
1074
- id: string;
1075
- /**
1076
- * New end date and time.
1077
- *
1078
- * Must be later than the current end date and time.
1079
- */
1080
- endDate: Date;
1081
- }
1082
- export interface PostponeEndDateResponse {
1083
- }
1084
- export interface OrderEndDatePostponed {
1085
- /** Order whose `endDate` was postponed. */
1086
- order?: Order;
1087
- }
1088
- export interface CancelOrderRequest {
1089
- /** Order ID. */
1090
- id: string;
1091
- /** __Required.__ When the order will be canceled. One-time orders can only be canceled `IMMEDIATELY`. */
1092
- effectiveAt: CancellationEffectiveAt;
1093
- }
1094
- export interface CancelOrderResponse {
1095
- }
1096
- export interface MarkAsPaidRequest {
1097
- /** Order ID. */
1098
- id: string;
1099
- }
1100
- export interface MarkAsPaidResponse {
1101
- }
1102
- export interface OrderMarkedAsPaid {
1103
- /** Order that was marked as paid. */
1104
- order?: Order;
1105
- }
1106
- export interface PauseOrderRequest {
1107
- /** Order ID. */
1108
- id: string;
1109
- }
1110
- export interface PauseOrderResponse {
1111
- }
1112
- export interface OrderPaused {
1113
- /** Paused order. */
1114
- order?: Order;
1115
- }
1116
- export interface BulkPauseOrderRequest {
1117
- /** List of Order IDs. */
1118
- ids?: string[];
1119
- /** Set to true to return Order entity in response. */
1120
- returnFullEntity?: boolean;
1121
- }
1122
- export interface BulkPauseOrderResponse {
1123
- results?: BulkOrderResult[];
1124
- bulkActionMetadata?: BulkActionMetadata;
1125
- }
1126
- export interface BulkOrderResult {
1127
- itemMetadata?: ItemMetadata;
1128
- order?: Order;
1129
- }
1130
- export interface ItemMetadata {
1131
- /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
1132
- id?: string | null;
1133
- /** Index of the item within the request array. Allows for correlation between request and response items. */
1134
- originalIndex?: number;
1135
- /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
1136
- success?: boolean;
1137
- /** Details about the error in case of failure. */
1138
- error?: ApplicationError;
1139
- }
1140
- export interface ApplicationError {
1141
- /** Error code. */
1142
- code?: string;
1143
- /** Description of the error. */
1144
- description?: string;
1145
- /** Data related to the error. */
1146
- data?: Record<string, any> | null;
1147
- }
1148
- export interface BulkActionMetadata {
1149
- /** Number of items that were successfully processed. */
1150
- totalSuccesses?: number;
1151
- /** Number of items that couldn't be processed. */
1152
- totalFailures?: number;
1153
- /** Number of failures without details because detailed failure threshold was exceeded. */
1154
- undetailedFailures?: number;
1155
- }
1156
- export interface ResumeOrderRequest {
1157
- /** Order ID. */
1158
- id: string;
1159
- }
1160
- export interface ResumeOrderResponse {
1161
- }
1162
- export interface OrderResumed {
1163
- /** Resumed order. */
1164
- order?: Order;
1165
- }
1166
- export interface BulkResumeOrderRequest {
1167
- /** List of Order IDs. */
1168
- ids?: string[];
1169
- /** Set to true to return Order entity in response. */
1170
- returnFullEntity?: boolean;
1171
- }
1172
- export interface BulkResumeOrderResponse {
1173
- results?: BulkOrderResult[];
1174
- bulkActionMetadata?: BulkActionMetadata;
1175
- }
1176
- export interface MemberGetOrderResponseNonNullableFields {
1177
- order?: {
1178
- id: string;
1179
- planId: string;
1180
- subscriptionId: string;
1181
- buyer?: {
1182
- memberId: string;
1183
- contactId: string;
1184
- };
1185
- priceDetails?: {
1186
- subscription?: {
1187
- cycleDuration?: {
1188
- unit: PeriodUnit;
1189
- };
1190
- };
1191
- singlePaymentForDuration?: {
1192
- unit: PeriodUnit;
1193
- };
1194
- subtotal: string;
1195
- discount: string;
1196
- tax?: {
1197
- name: string;
1198
- includedInPrice: boolean;
1199
- rate: string;
1200
- amount: string;
1201
- };
1202
- total: string;
1203
- planPrice: string;
1204
- currency: string;
1205
- coupon?: {
1206
- code: string;
1207
- amount: string;
1208
- id: string;
1209
- };
1210
- };
1211
- pricing?: {
1212
- subscription?: {
1213
- cycleDuration?: {
1214
- unit: PeriodUnit;
1215
- };
1216
- };
1217
- singlePaymentForDuration?: {
1218
- unit: PeriodUnit;
1219
- };
1220
- prices: {
1221
- duration?: {
1222
- cycleFrom: number;
1223
- };
1224
- price?: {
1225
- subtotal: string;
1226
- coupon?: {
1227
- code: string;
1228
- amount: string;
1229
- id: string;
1230
- };
1231
- discount: string;
1232
- tax?: {
1233
- name: string;
1234
- includedInPrice: boolean;
1235
- rate: string;
1236
- amount: string;
1237
- };
1238
- total: string;
1239
- currency: string;
1240
- fees: {
1241
- name: string;
1242
- amount: string;
1243
- }[];
1244
- proration: string;
1245
- };
1246
- }[];
1247
- };
1248
- type: OrderType;
1249
- orderMethod: OrderMethod;
1250
- status: OrderStatus;
1251
- cancellation?: {
1252
- cause: CancellationCause;
1253
- effectiveAt: CancellationEffectiveAt;
1254
- };
1255
- lastPaymentStatus: PaymentStatus;
1256
- pausePeriods: {
1257
- status: Status;
1258
- }[];
1259
- currentCycle?: {
1260
- index: number;
1261
- };
1262
- cycles: {
1263
- index: number;
1264
- }[];
1265
- planName: string;
1266
- planDescription: string;
1267
- planPrice: string;
1268
- statusNew: OrderStatus;
1269
- };
1270
- }
1271
- export interface MemberListOrdersResponseNonNullableFields {
1272
- orders: {
1273
- id: string;
1274
- planId: string;
1275
- subscriptionId: string;
1276
- buyer?: {
1277
- memberId: string;
1278
- contactId: string;
1279
- };
1280
- priceDetails?: {
1281
- subscription?: {
1282
- cycleDuration?: {
1283
- unit: PeriodUnit;
1284
- };
1285
- };
1286
- singlePaymentForDuration?: {
1287
- unit: PeriodUnit;
1288
- };
1289
- subtotal: string;
1290
- discount: string;
1291
- tax?: {
1292
- name: string;
1293
- includedInPrice: boolean;
1294
- rate: string;
1295
- amount: string;
1296
- };
1297
- total: string;
1298
- planPrice: string;
1299
- currency: string;
1300
- coupon?: {
1301
- code: string;
1302
- amount: string;
1303
- id: string;
1304
- };
1305
- };
1306
- pricing?: {
1307
- subscription?: {
1308
- cycleDuration?: {
1309
- unit: PeriodUnit;
1310
- };
1311
- };
1312
- singlePaymentForDuration?: {
1313
- unit: PeriodUnit;
1314
- };
1315
- prices: {
1316
- duration?: {
1317
- cycleFrom: number;
1318
- };
1319
- price?: {
1320
- subtotal: string;
1321
- coupon?: {
1322
- code: string;
1323
- amount: string;
1324
- id: string;
1325
- };
1326
- discount: string;
1327
- tax?: {
1328
- name: string;
1329
- includedInPrice: boolean;
1330
- rate: string;
1331
- amount: string;
1332
- };
1333
- total: string;
1334
- currency: string;
1335
- fees: {
1336
- name: string;
1337
- amount: string;
1338
- }[];
1339
- proration: string;
1340
- };
1341
- }[];
1342
- };
1343
- type: OrderType;
1344
- orderMethod: OrderMethod;
1345
- status: OrderStatus;
1346
- cancellation?: {
1347
- cause: CancellationCause;
1348
- effectiveAt: CancellationEffectiveAt;
1349
- };
1350
- lastPaymentStatus: PaymentStatus;
1351
- pausePeriods: {
1352
- status: Status;
1353
- }[];
1354
- currentCycle?: {
1355
- index: number;
1356
- };
1357
- cycles: {
1358
- index: number;
1359
- }[];
1360
- planName: string;
1361
- planDescription: string;
1362
- planPrice: string;
1363
- statusNew: OrderStatus;
1364
- }[];
1365
- }
1366
- export interface CreateOfflineOrderResponseNonNullableFields {
1367
- order?: {
1368
- id: string;
1369
- planId: string;
1370
- subscriptionId: string;
1371
- buyer?: {
1372
- memberId: string;
1373
- contactId: string;
1374
- };
1375
- priceDetails?: {
1376
- subscription?: {
1377
- cycleDuration?: {
1378
- unit: PeriodUnit;
1379
- };
1380
- };
1381
- singlePaymentForDuration?: {
1382
- unit: PeriodUnit;
1383
- };
1384
- subtotal: string;
1385
- discount: string;
1386
- tax?: {
1387
- name: string;
1388
- includedInPrice: boolean;
1389
- rate: string;
1390
- amount: string;
1391
- };
1392
- total: string;
1393
- planPrice: string;
1394
- currency: string;
1395
- coupon?: {
1396
- code: string;
1397
- amount: string;
1398
- id: string;
1399
- };
1400
- };
1401
- pricing?: {
1402
- subscription?: {
1403
- cycleDuration?: {
1404
- unit: PeriodUnit;
1405
- };
1406
- };
1407
- singlePaymentForDuration?: {
1408
- unit: PeriodUnit;
1409
- };
1410
- prices: {
1411
- duration?: {
1412
- cycleFrom: number;
1413
- };
1414
- price?: {
1415
- subtotal: string;
1416
- coupon?: {
1417
- code: string;
1418
- amount: string;
1419
- id: string;
1420
- };
1421
- discount: string;
1422
- tax?: {
1423
- name: string;
1424
- includedInPrice: boolean;
1425
- rate: string;
1426
- amount: string;
1427
- };
1428
- total: string;
1429
- currency: string;
1430
- fees: {
1431
- name: string;
1432
- amount: string;
1433
- }[];
1434
- proration: string;
1435
- };
1436
- }[];
1437
- };
1438
- type: OrderType;
1439
- orderMethod: OrderMethod;
1440
- status: OrderStatus;
1441
- cancellation?: {
1442
- cause: CancellationCause;
1443
- effectiveAt: CancellationEffectiveAt;
1444
- };
1445
- lastPaymentStatus: PaymentStatus;
1446
- pausePeriods: {
1447
- status: Status;
1448
- }[];
1449
- currentCycle?: {
1450
- index: number;
1451
- };
1452
- cycles: {
1453
- index: number;
1454
- }[];
1455
- planName: string;
1456
- planDescription: string;
1457
- planPrice: string;
1458
- statusNew: OrderStatus;
1459
- };
1460
- }
1461
- export interface GetOfflineOrderPreviewResponseNonNullableFields {
1462
- order?: {
1463
- id: string;
1464
- planId: string;
1465
- subscriptionId: string;
1466
- buyer?: {
1467
- memberId: string;
1468
- contactId: string;
1469
- };
1470
- priceDetails?: {
1471
- subscription?: {
1472
- cycleDuration?: {
1473
- unit: PeriodUnit;
1474
- };
1475
- };
1476
- singlePaymentForDuration?: {
1477
- unit: PeriodUnit;
1478
- };
1479
- subtotal: string;
1480
- discount: string;
1481
- tax?: {
1482
- name: string;
1483
- includedInPrice: boolean;
1484
- rate: string;
1485
- amount: string;
1486
- };
1487
- total: string;
1488
- planPrice: string;
1489
- currency: string;
1490
- coupon?: {
1491
- code: string;
1492
- amount: string;
1493
- id: string;
1494
- };
1495
- };
1496
- pricing?: {
1497
- subscription?: {
1498
- cycleDuration?: {
1499
- unit: PeriodUnit;
1500
- };
1501
- };
1502
- singlePaymentForDuration?: {
1503
- unit: PeriodUnit;
1504
- };
1505
- prices: {
1506
- duration?: {
1507
- cycleFrom: number;
1508
- };
1509
- price?: {
1510
- subtotal: string;
1511
- coupon?: {
1512
- code: string;
1513
- amount: string;
1514
- id: string;
1515
- };
1516
- discount: string;
1517
- tax?: {
1518
- name: string;
1519
- includedInPrice: boolean;
1520
- rate: string;
1521
- amount: string;
1522
- };
1523
- total: string;
1524
- currency: string;
1525
- fees: {
1526
- name: string;
1527
- amount: string;
1528
- }[];
1529
- proration: string;
1530
- };
1531
- }[];
1532
- };
1533
- type: OrderType;
1534
- orderMethod: OrderMethod;
1535
- status: OrderStatus;
1536
- cancellation?: {
1537
- cause: CancellationCause;
1538
- effectiveAt: CancellationEffectiveAt;
1539
- };
1540
- lastPaymentStatus: PaymentStatus;
1541
- pausePeriods: {
1542
- status: Status;
1543
- }[];
1544
- currentCycle?: {
1545
- index: number;
1546
- };
1547
- cycles: {
1548
- index: number;
1549
- }[];
1550
- planName: string;
1551
- planDescription: string;
1552
- planPrice: string;
1553
- statusNew: OrderStatus;
1554
- };
1555
- purchaseLimitExceeded: boolean;
1556
- }
1557
- export interface GetPricePreviewResponseNonNullableFields {
1558
- price?: {
1559
- subscription?: {
1560
- cycleDuration?: {
1561
- unit: PeriodUnit;
1562
- };
1563
- };
1564
- singlePaymentForDuration?: {
1565
- unit: PeriodUnit;
1566
- };
1567
- subtotal: string;
1568
- discount: string;
1569
- tax?: {
1570
- name: string;
1571
- includedInPrice: boolean;
1572
- rate: string;
1573
- amount: string;
1574
- };
1575
- total: string;
1576
- planPrice: string;
1577
- currency: string;
1578
- coupon?: {
1579
- code: string;
1580
- amount: string;
1581
- id: string;
1582
- };
1583
- };
1584
- prices: {
1585
- duration?: {
1586
- cycleFrom: number;
1587
- };
1588
- price?: {
1589
- subtotal: string;
1590
- coupon?: {
1591
- code: string;
1592
- amount: string;
1593
- id: string;
1594
- };
1595
- discount: string;
1596
- tax?: {
1597
- name: string;
1598
- includedInPrice: boolean;
1599
- rate: string;
1600
- amount: string;
1601
- };
1602
- total: string;
1603
- currency: string;
1604
- fees: {
1605
- name: string;
1606
- amount: string;
1607
- }[];
1608
- proration: string;
1609
- };
1610
- }[];
1611
- }
1612
- export interface GetOrderResponseNonNullableFields {
1613
- order?: {
1614
- id: string;
1615
- planId: string;
1616
- subscriptionId: string;
1617
- buyer?: {
1618
- memberId: string;
1619
- contactId: string;
1620
- };
1621
- priceDetails?: {
1622
- subscription?: {
1623
- cycleDuration?: {
1624
- unit: PeriodUnit;
1625
- };
1626
- };
1627
- singlePaymentForDuration?: {
1628
- unit: PeriodUnit;
1629
- };
1630
- subtotal: string;
1631
- discount: string;
1632
- tax?: {
1633
- name: string;
1634
- includedInPrice: boolean;
1635
- rate: string;
1636
- amount: string;
1637
- };
1638
- total: string;
1639
- planPrice: string;
1640
- currency: string;
1641
- coupon?: {
1642
- code: string;
1643
- amount: string;
1644
- id: string;
1645
- };
1646
- };
1647
- pricing?: {
1648
- subscription?: {
1649
- cycleDuration?: {
1650
- unit: PeriodUnit;
1651
- };
1652
- };
1653
- singlePaymentForDuration?: {
1654
- unit: PeriodUnit;
1655
- };
1656
- prices: {
1657
- duration?: {
1658
- cycleFrom: number;
1659
- };
1660
- price?: {
1661
- subtotal: string;
1662
- coupon?: {
1663
- code: string;
1664
- amount: string;
1665
- id: string;
1666
- };
1667
- discount: string;
1668
- tax?: {
1669
- name: string;
1670
- includedInPrice: boolean;
1671
- rate: string;
1672
- amount: string;
1673
- };
1674
- total: string;
1675
- currency: string;
1676
- fees: {
1677
- name: string;
1678
- amount: string;
1679
- }[];
1680
- proration: string;
1681
- };
1682
- }[];
1683
- };
1684
- type: OrderType;
1685
- orderMethod: OrderMethod;
1686
- status: OrderStatus;
1687
- cancellation?: {
1688
- cause: CancellationCause;
1689
- effectiveAt: CancellationEffectiveAt;
1690
- };
1691
- lastPaymentStatus: PaymentStatus;
1692
- pausePeriods: {
1693
- status: Status;
1694
- }[];
1695
- currentCycle?: {
1696
- index: number;
1697
- };
1698
- cycles: {
1699
- index: number;
1700
- }[];
1701
- planName: string;
1702
- planDescription: string;
1703
- planPrice: string;
1704
- statusNew: OrderStatus;
1705
- };
1706
- }
1707
- export interface ListOrdersResponseNonNullableFields {
1708
- orders: {
1709
- id: string;
1710
- planId: string;
1711
- subscriptionId: string;
1712
- buyer?: {
1713
- memberId: string;
1714
- contactId: string;
1715
- };
1716
- priceDetails?: {
1717
- subscription?: {
1718
- cycleDuration?: {
1719
- unit: PeriodUnit;
1720
- };
1721
- };
1722
- singlePaymentForDuration?: {
1723
- unit: PeriodUnit;
1724
- };
1725
- subtotal: string;
1726
- discount: string;
1727
- tax?: {
1728
- name: string;
1729
- includedInPrice: boolean;
1730
- rate: string;
1731
- amount: string;
1732
- };
1733
- total: string;
1734
- planPrice: string;
1735
- currency: string;
1736
- coupon?: {
1737
- code: string;
1738
- amount: string;
1739
- id: string;
1740
- };
1741
- };
1742
- pricing?: {
1743
- subscription?: {
1744
- cycleDuration?: {
1745
- unit: PeriodUnit;
1746
- };
1747
- };
1748
- singlePaymentForDuration?: {
1749
- unit: PeriodUnit;
1750
- };
1751
- prices: {
1752
- duration?: {
1753
- cycleFrom: number;
1754
- };
1755
- price?: {
1756
- subtotal: string;
1757
- coupon?: {
1758
- code: string;
1759
- amount: string;
1760
- id: string;
1761
- };
1762
- discount: string;
1763
- tax?: {
1764
- name: string;
1765
- includedInPrice: boolean;
1766
- rate: string;
1767
- amount: string;
1768
- };
1769
- total: string;
1770
- currency: string;
1771
- fees: {
1772
- name: string;
1773
- amount: string;
1774
- }[];
1775
- proration: string;
1776
- };
1777
- }[];
1778
- };
1779
- type: OrderType;
1780
- orderMethod: OrderMethod;
1781
- status: OrderStatus;
1782
- cancellation?: {
1783
- cause: CancellationCause;
1784
- effectiveAt: CancellationEffectiveAt;
1785
- };
1786
- lastPaymentStatus: PaymentStatus;
1787
- pausePeriods: {
1788
- status: Status;
1789
- }[];
1790
- currentCycle?: {
1791
- index: number;
1792
- };
1793
- cycles: {
1794
- index: number;
1795
- }[];
1796
- planName: string;
1797
- planDescription: string;
1798
- planPrice: string;
1799
- statusNew: OrderStatus;
1800
- }[];
1801
- }