@wix/pricing-plans 1.0.69 → 1.0.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/context/package.json +2 -1
- package/meta/package.json +2 -1
- package/package.json +12 -7
- package/type-bundles/context.bundle.d.ts +2401 -0
- package/type-bundles/index.bundle.d.ts +3598 -0
- package/type-bundles/meta.bundle.d.ts +3978 -0
@@ -0,0 +1,3978 @@
|
|
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
|
+
interface Order$1 {
|
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$1;
|
42
|
+
/**
|
43
|
+
* __Deprecated.__ Use `pricing` instead. This property will be removed on September 30, 2022.
|
44
|
+
* @readonly
|
45
|
+
* @deprecated __Deprecated.__ Use `pricing` instead. This property will be removed on September 30, 2022.
|
46
|
+
* @replacedBy pricing
|
47
|
+
* @removalDate 2022-10-01
|
48
|
+
*/
|
49
|
+
priceDetails?: PriceDetails$1;
|
50
|
+
/**
|
51
|
+
* Order pricing model, price, and payment schedule.
|
52
|
+
*
|
53
|
+
* [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).
|
54
|
+
* @readonly
|
55
|
+
*/
|
56
|
+
pricing?: PricingDetails$1;
|
57
|
+
/**
|
58
|
+
* How the order was processed. One of:
|
59
|
+
* + `ONLINE`: The buyer purchased the plan using the site.
|
60
|
+
* + `OFFLINE`: The buyer made a manual, offline purchase without using the site.
|
61
|
+
* + `EXTERNAL`: The buyer made a purchase through an external payment provider.
|
62
|
+
* @readonly
|
63
|
+
*/
|
64
|
+
type?: OrderType$1;
|
65
|
+
/**
|
66
|
+
* Status of the order. One of:
|
67
|
+
* + `DRAFT`: Order has been initiated but payment hasn't been processed yet. The plan isn't yet available for use to the buyer.
|
68
|
+
* + `PENDING`: Order has been purchased and its start date is set in the future.
|
69
|
+
* + `ACTIVE`: Order has been processed. The plan is available for use.
|
70
|
+
* + `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).
|
71
|
+
* + `ENDED`: Order has completed its duration and is no longer available for use.
|
72
|
+
* + `CANCELED`: Order has been [canceled](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/orders/cancel-order).
|
73
|
+
* @readonly
|
74
|
+
*/
|
75
|
+
status?: OrderStatus$1;
|
76
|
+
/**
|
77
|
+
* Whether the order will be canceled at the next payment date.
|
78
|
+
*
|
79
|
+
* If `true`, the order status will be `CANCELED` and the next payment won't be charged. Omitted for single payment orders.
|
80
|
+
* @readonly
|
81
|
+
*/
|
82
|
+
autoRenewCanceled?: boolean | null;
|
83
|
+
/**
|
84
|
+
* Details about the cancellation of an order.
|
85
|
+
*
|
86
|
+
* Only present if the status is `CANCELED`.
|
87
|
+
* @readonly
|
88
|
+
*/
|
89
|
+
cancellation?: Cancellation$1;
|
90
|
+
/**
|
91
|
+
* Status of the last payment for the order.
|
92
|
+
* Updated automatically for online orders. Updated manually by the site owner for offline orders. One of:
|
93
|
+
* + `PAID`: The last payment was paid.
|
94
|
+
* + `REFUNDED`: The last payment was refunded.
|
95
|
+
* + `FAILED`: The last payment transaction didn't complete.
|
96
|
+
* + `UNPAID`: The last payment wasn't paid.
|
97
|
+
* + `PENDING`: Awaiting payment.
|
98
|
+
* + `NOT_APPLICABLE`: No payment was necessary. For example, for free plans or free trials.
|
99
|
+
* @readonly
|
100
|
+
*/
|
101
|
+
lastPaymentStatus?: PaymentStatus$1;
|
102
|
+
/**
|
103
|
+
* Start date and time for the ordered plan.
|
104
|
+
* @readonly
|
105
|
+
*/
|
106
|
+
startDate?: Date;
|
107
|
+
/**
|
108
|
+
* Current end date and time for the ordered plan.
|
109
|
+
*
|
110
|
+
* `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),
|
111
|
+
* 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).
|
112
|
+
*
|
113
|
+
* Omitted if the order is valid until canceled and still `ACTIVE`.
|
114
|
+
* @readonly
|
115
|
+
*/
|
116
|
+
endDate?: Date;
|
117
|
+
/**
|
118
|
+
* List of periods during which the order is paused.
|
119
|
+
* @readonly
|
120
|
+
*/
|
121
|
+
pausePeriods?: PausePeriod$1[];
|
122
|
+
/**
|
123
|
+
* Free trial period for the order, in days.
|
124
|
+
*
|
125
|
+
* Only available for recurring plans.
|
126
|
+
* @readonly
|
127
|
+
*/
|
128
|
+
freeTrialDays?: number | null;
|
129
|
+
/**
|
130
|
+
* Earliest end date and time that the plan for the order can expire.
|
131
|
+
*
|
132
|
+
* Calculated by using the original end date plus any pause periods. Omitted if the order is active until canceled. Reserved for future use.
|
133
|
+
* @readonly
|
134
|
+
*/
|
135
|
+
earliestEndDate?: Date;
|
136
|
+
/**
|
137
|
+
* Current payment cycle for the order.
|
138
|
+
*
|
139
|
+
* `currentCycle` will be omitted if the order's status is `CANCELED` or `ENDED`, or if the `startDate` hasn't passed yet.
|
140
|
+
* @readonly
|
141
|
+
*/
|
142
|
+
currentCycle?: CurrentCycle$1;
|
143
|
+
/**
|
144
|
+
* Plan name at the time of purchase.
|
145
|
+
* @readonly
|
146
|
+
*/
|
147
|
+
planName?: string;
|
148
|
+
/**
|
149
|
+
* Plan description at the time of purchase
|
150
|
+
* @readonly
|
151
|
+
*/
|
152
|
+
planDescription?: string;
|
153
|
+
/**
|
154
|
+
* Plan price as it was at the moment of order creation.
|
155
|
+
* @readonly
|
156
|
+
*/
|
157
|
+
planPrice?: string;
|
158
|
+
/**
|
159
|
+
* Date and time the order was created.
|
160
|
+
* @readonly
|
161
|
+
*/
|
162
|
+
createdDate?: Date;
|
163
|
+
/**
|
164
|
+
* Date and time the order was updated.
|
165
|
+
* @readonly
|
166
|
+
*/
|
167
|
+
updatedDate?: Date;
|
168
|
+
/**
|
169
|
+
* Information about the form submitted during the plan's checkout.
|
170
|
+
* @readonly
|
171
|
+
*/
|
172
|
+
formData?: FormData$1;
|
173
|
+
}
|
174
|
+
interface Buyer$1 {
|
175
|
+
/**
|
176
|
+
* 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).
|
177
|
+
* @readonly
|
178
|
+
*/
|
179
|
+
memberId?: string;
|
180
|
+
/**
|
181
|
+
* 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).
|
182
|
+
* @readonly
|
183
|
+
*/
|
184
|
+
contactId?: string;
|
185
|
+
}
|
186
|
+
interface PriceDetails$1 extends PriceDetailsPricingModelOneOf$1 {
|
187
|
+
/** Order has recurring payments. */
|
188
|
+
subscription?: Recurrence$3;
|
189
|
+
/** One-time payment. Order is valid for a specified duration. */
|
190
|
+
singlePaymentForDuration?: Duration$3;
|
191
|
+
/** One-time payment. Order is valid until it is canceled. */
|
192
|
+
singlePaymentUnlimited?: boolean | null;
|
193
|
+
/** Price of the order excluding tax, specified as a monetary amount. for example, `"9.99"`. */
|
194
|
+
subtotal?: string;
|
195
|
+
/** Total discount applied. */
|
196
|
+
discount?: string;
|
197
|
+
/** Tax applied. */
|
198
|
+
tax?: Tax$1;
|
199
|
+
/**
|
200
|
+
* Price after tax and discount is applied, specified as a monetary amount. For example, `"13.98"`.
|
201
|
+
*
|
202
|
+
* If no tax is applied, the amount is the same as `subtotal`.
|
203
|
+
*/
|
204
|
+
total?: string;
|
205
|
+
/** Plan price as it was at the moment of order creation. */
|
206
|
+
planPrice?: string;
|
207
|
+
/** Currency code. Must be valid ISO 4217 currency code (e.g., USD). */
|
208
|
+
currency?: string;
|
209
|
+
/** Free trial period for the order in days. Only available for recurring plans. */
|
210
|
+
freeTrialDays?: number | null;
|
211
|
+
/** Coupon applied to the order. Empty means no coupon was applied. */
|
212
|
+
coupon?: Coupon$1;
|
213
|
+
}
|
214
|
+
/** @oneof */
|
215
|
+
interface PriceDetailsPricingModelOneOf$1 {
|
216
|
+
/** Order has recurring payments. */
|
217
|
+
subscription?: Recurrence$3;
|
218
|
+
/** One-time payment. Order is valid for a specified duration. */
|
219
|
+
singlePaymentForDuration?: Duration$3;
|
220
|
+
/** One-time payment. Order is valid until it is canceled. */
|
221
|
+
singlePaymentUnlimited?: boolean | null;
|
222
|
+
}
|
223
|
+
interface Tax$1 {
|
224
|
+
/** Name of the tax. For example, VAT. */
|
225
|
+
name?: string;
|
226
|
+
/** Whether tax is included in the original price. When `false`, tax is added at checkout. */
|
227
|
+
includedInPrice?: boolean;
|
228
|
+
/** Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`. */
|
229
|
+
rate?: string;
|
230
|
+
/** Total tax, specified as a monetary amount. For example, `"3.99"`. */
|
231
|
+
amount?: string;
|
232
|
+
}
|
233
|
+
/** An object specifying how often and for how long payments recur (may be forever). */
|
234
|
+
interface Recurrence$3 {
|
235
|
+
/** Length of one payment cycle. */
|
236
|
+
cycleDuration?: Duration$3;
|
237
|
+
/**
|
238
|
+
* Amount of payment cycles this subscription is valid for.
|
239
|
+
*
|
240
|
+
* `0` for unlimited or until-canceled.
|
241
|
+
*/
|
242
|
+
cycleCount?: number | null;
|
243
|
+
}
|
244
|
+
/** A duration expressed in number of time units. */
|
245
|
+
interface Duration$3 {
|
246
|
+
/**
|
247
|
+
* The amount of a duration `unit` in a single payment cycle.
|
248
|
+
*
|
249
|
+
* Currently limited to support only `1`.
|
250
|
+
*/
|
251
|
+
count?: number | null;
|
252
|
+
/** Unit of time for the cycle duration. */
|
253
|
+
unit?: PeriodUnit$3;
|
254
|
+
}
|
255
|
+
declare enum PeriodUnit$3 {
|
256
|
+
UNDEFINED = "UNDEFINED",
|
257
|
+
DAY = "DAY",
|
258
|
+
WEEK = "WEEK",
|
259
|
+
MONTH = "MONTH",
|
260
|
+
YEAR = "YEAR"
|
261
|
+
}
|
262
|
+
interface Coupon$1 {
|
263
|
+
/** Code of the applied coupon. */
|
264
|
+
code?: string;
|
265
|
+
/** Total discount of the coupon, as a monetary amount. */
|
266
|
+
amount?: string;
|
267
|
+
/**
|
268
|
+
* Coupon ID.
|
269
|
+
* @readonly
|
270
|
+
*/
|
271
|
+
id?: string;
|
272
|
+
}
|
273
|
+
interface PricingDetails$1 extends PricingDetailsPricingModelOneOf$1 {
|
274
|
+
/** Pricing model for an order with recurring payment cycles. */
|
275
|
+
subscription?: Recurrence$3;
|
276
|
+
/** Pricing model for an order with a one-time payment and the order is valid for a specific amount of time. */
|
277
|
+
singlePaymentForDuration?: Duration$3;
|
278
|
+
/** Pricing model for an order with a one-time payment and the order is valid until canceled. */
|
279
|
+
singlePaymentUnlimited?: boolean | null;
|
280
|
+
/**
|
281
|
+
* Pricing details for all pricing models.
|
282
|
+
* @readonly
|
283
|
+
*/
|
284
|
+
prices?: SpannedPrice$1[];
|
285
|
+
}
|
286
|
+
/** @oneof */
|
287
|
+
interface PricingDetailsPricingModelOneOf$1 {
|
288
|
+
/** Pricing model for an order with recurring payment cycles. */
|
289
|
+
subscription?: Recurrence$3;
|
290
|
+
/** Pricing model for an order with a one-time payment and the order is valid for a specific amount of time. */
|
291
|
+
singlePaymentForDuration?: Duration$3;
|
292
|
+
/** Pricing model for an order with a one-time payment and the order is valid until canceled. */
|
293
|
+
singlePaymentUnlimited?: boolean | null;
|
294
|
+
}
|
295
|
+
interface SpannedPrice$1 {
|
296
|
+
/**
|
297
|
+
* Cycle duration to apply `price` for.
|
298
|
+
*
|
299
|
+
* Use with all pricing models.
|
300
|
+
* Can apply the same price to multiple payment cycles.
|
301
|
+
*/
|
302
|
+
duration?: PriceDuration$1;
|
303
|
+
/** Order price. */
|
304
|
+
price?: Price$1;
|
305
|
+
}
|
306
|
+
interface PriceDuration$1 {
|
307
|
+
/**
|
308
|
+
* Price starts to apply with this cycle.
|
309
|
+
*
|
310
|
+
* `1` is the first payment cycle for all pricing models.
|
311
|
+
*/
|
312
|
+
cycleFrom?: number;
|
313
|
+
/**
|
314
|
+
* Amount of cycles to apply price for.
|
315
|
+
*
|
316
|
+
* For `subscription` pricing models with a finite number of cycles, the `numberOfCycles` is the same as `pricing.subscription.cycleCount`.
|
317
|
+
*
|
318
|
+
* For `subscription` pricing models that are unlimited or until-canceled, the `numberOfCycles` is not returned.
|
319
|
+
*
|
320
|
+
* For `singlePaymentForDuration` and `singlePaymentUnlimited` pricing models, the `numberOfCycles` is `1`.
|
321
|
+
*/
|
322
|
+
numberOfCycles?: number | null;
|
323
|
+
}
|
324
|
+
interface Price$1 {
|
325
|
+
/** Price of the order excluding tax, specified as a monetary amount. For example, `"9.99"`. */
|
326
|
+
subtotal?: string;
|
327
|
+
/**
|
328
|
+
* Coupon applied to the order.
|
329
|
+
*
|
330
|
+
* See Coupons [to learn more about coupons](https://dev.wix.com/api/rest/coupons).
|
331
|
+
*/
|
332
|
+
coupon?: Coupon$1;
|
333
|
+
/** Total discount applied to the order. */
|
334
|
+
discount?: string;
|
335
|
+
/**
|
336
|
+
* Tax applied to the order.
|
337
|
+
*
|
338
|
+
* Tax is only applied if the site [has it configured](https://support.wix.com/en/article/pricing-plans-setting-up-tax-collection).
|
339
|
+
*/
|
340
|
+
tax?: Tax$1;
|
341
|
+
/**
|
342
|
+
* Price after tax and discount is applied. Specified as a monetary amount, for example, `"13.98"`.
|
343
|
+
*
|
344
|
+
* If no tax is applied, the amount is the same as `subtotal`.
|
345
|
+
*/
|
346
|
+
total?: string;
|
347
|
+
/**
|
348
|
+
* Three-letter currency code in
|
349
|
+
* [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
|
350
|
+
*/
|
351
|
+
currency?: string;
|
352
|
+
/** Price change after billing date was change and price was adjusted. Could be positive and negative values. */
|
353
|
+
proration?: string;
|
354
|
+
}
|
355
|
+
declare enum OrderType$1 {
|
356
|
+
UNDEFINED = "UNDEFINED",
|
357
|
+
/** Payments made by the buyer */
|
358
|
+
ONLINE = "ONLINE",
|
359
|
+
/** Payments managed manually by the site owner */
|
360
|
+
OFFLINE = "OFFLINE",
|
361
|
+
/** Payments managed externally */
|
362
|
+
EXTERNAL = "EXTERNAL"
|
363
|
+
}
|
364
|
+
declare enum OrderMethod {
|
365
|
+
UNKNOWN = "UNKNOWN",
|
366
|
+
/** Mail Order / Telephone Order transaction */
|
367
|
+
MOTO = "MOTO",
|
368
|
+
/** Point of Sale transaction */
|
369
|
+
POS = "POS"
|
370
|
+
}
|
371
|
+
declare enum OrderStatus$1 {
|
372
|
+
/** Order status undefined */
|
373
|
+
UNDEFINED = "UNDEFINED",
|
374
|
+
/** Order created, but hasn't been paid for yet. Filtered out in ListOrders response by default. */
|
375
|
+
DRAFT = "DRAFT",
|
376
|
+
/** Order has been paid for, but the start date is in the future */
|
377
|
+
PENDING = "PENDING",
|
378
|
+
/** Order is active */
|
379
|
+
ACTIVE = "ACTIVE",
|
380
|
+
/** Order is paused until site owner resumes it */
|
381
|
+
PAUSED = "PAUSED",
|
382
|
+
/** Order has ended */
|
383
|
+
ENDED = "ENDED",
|
384
|
+
/** Order has been canceled */
|
385
|
+
CANCELED = "CANCELED"
|
386
|
+
}
|
387
|
+
interface Cancellation$1 {
|
388
|
+
/** Date and time the cancellation was requested. */
|
389
|
+
requestedDate?: Date;
|
390
|
+
/**
|
391
|
+
* Reason for the cancellation. One of:
|
392
|
+
* + `OWNER_ACTION`: Site owner canceled the order.
|
393
|
+
* + `MEMBER_ACTION`: Buyer initiated the cancellation.
|
394
|
+
* + `PAYMENT_FAILURE`: Payment transaction failed.
|
395
|
+
* + `PAYMENT_SETUP_FAILURE`: Buyer's payment details weren't set up correctly.
|
396
|
+
* + `UNKNOWN`: Reason for the cancellation is unknown.
|
397
|
+
*/
|
398
|
+
cause?: CancellationCause$1;
|
399
|
+
/**
|
400
|
+
* When the cancellation takes effect. Set when cancelling the order. One of:
|
401
|
+
* + `IMMEDIATELY`: Cancellation occurs immediately and the buyer can no longer use the plan.
|
402
|
+
* + `NEXT_PAYMENT_DATE`: Cancellation occurs at the next payment date and time. Buyer can continue to use the plan until that date and time.
|
403
|
+
*/
|
404
|
+
effectiveAt?: CancellationEffectiveAt$1;
|
405
|
+
}
|
406
|
+
declare enum CancellationCause$1 {
|
407
|
+
/** Cancellation initiator undefined */
|
408
|
+
UNDEFINED = "UNDEFINED",
|
409
|
+
/** Order was canceled by site owner (default if canceled by user or service identity) */
|
410
|
+
OWNER_ACTION = "OWNER_ACTION",
|
411
|
+
/** Order was canceled by member (default if canceled by member identity) */
|
412
|
+
MEMBER_ACTION = "MEMBER_ACTION",
|
413
|
+
/** Order was canceled because of payment failure */
|
414
|
+
PAYMENT_FAILURE = "PAYMENT_FAILURE",
|
415
|
+
/** Order was canceled because of payment setup failure */
|
416
|
+
PAYMENT_SETUP_FAILURE = "PAYMENT_SETUP_FAILURE",
|
417
|
+
/** Order was cancelled because of an unknown reason. It's not possible to know with certain payment providers (e.g. paypal) */
|
418
|
+
UNKNOWN = "UNKNOWN"
|
419
|
+
}
|
420
|
+
declare enum CancellationEffectiveAt$1 {
|
421
|
+
/** Cancellation time undefined */
|
422
|
+
UNDEFINED = "UNDEFINED",
|
423
|
+
/** Will cancel the order now, i.e. update validUntil to the current date */
|
424
|
+
IMMEDIATELY = "IMMEDIATELY",
|
425
|
+
/** Will cancel the order at the date when next payment should have been made */
|
426
|
+
NEXT_PAYMENT_DATE = "NEXT_PAYMENT_DATE"
|
427
|
+
}
|
428
|
+
declare enum PaymentStatus$1 {
|
429
|
+
/** Payment status undefined */
|
430
|
+
UNDEFINED = "UNDEFINED",
|
431
|
+
/** Payment has been paid */
|
432
|
+
PAID = "PAID",
|
433
|
+
/** Payment has been refunded */
|
434
|
+
REFUNDED = "REFUNDED",
|
435
|
+
/** Recurring payment has failed */
|
436
|
+
FAILED = "FAILED",
|
437
|
+
/** Payment has not been paid */
|
438
|
+
UNPAID = "UNPAID",
|
439
|
+
/** Billing has been initialized, but actual charge is yet to be made. Can happen for free trial and PayPal */
|
440
|
+
PENDING = "PENDING",
|
441
|
+
/** Used in cases where the plan is free */
|
442
|
+
NOT_APPLICABLE = "NOT_APPLICABLE"
|
443
|
+
}
|
444
|
+
interface PausePeriod$1 {
|
445
|
+
/**
|
446
|
+
* Status of the pause period. One of:
|
447
|
+
*
|
448
|
+
* + `ACTIVE`: Status while the order is [paused](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/orders/pause-order).
|
449
|
+
* + `ENDED`: Status when the order is [resumed](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/orders/resume-order).
|
450
|
+
*/
|
451
|
+
status?: Status$1;
|
452
|
+
/** Start date and time of the pause period. */
|
453
|
+
pauseDate?: Date;
|
454
|
+
/**
|
455
|
+
* End date and time of the pause period.
|
456
|
+
*
|
457
|
+
* Omitted while the pause period remains `ACTIVE`.
|
458
|
+
*/
|
459
|
+
resumeDate?: Date;
|
460
|
+
}
|
461
|
+
declare enum Status$1 {
|
462
|
+
UNDEFINED = "UNDEFINED",
|
463
|
+
/** Order suspension is active */
|
464
|
+
ACTIVE = "ACTIVE",
|
465
|
+
/** Order suspension has ended */
|
466
|
+
ENDED = "ENDED"
|
467
|
+
}
|
468
|
+
/**
|
469
|
+
* Current cycle will be empty when order is cancelled, expired or order start date is in the future
|
470
|
+
* Current cycle start and end dates take into account free trial days and suspensions
|
471
|
+
*/
|
472
|
+
interface CurrentCycle$1 {
|
473
|
+
/**
|
474
|
+
* Index of the current payment cycle in the order.
|
475
|
+
*
|
476
|
+
* `0` when order is in a free trial period. In all other cases, the index starts with `1`.
|
477
|
+
*/
|
478
|
+
index?: number;
|
479
|
+
/** Start date and time for the current payment cycle. */
|
480
|
+
startedDate?: Date;
|
481
|
+
/** End date and time for the current payment cycle. */
|
482
|
+
endedDate?: Date;
|
483
|
+
}
|
484
|
+
interface FormData$1 {
|
485
|
+
/**
|
486
|
+
* ID of the order form associated with the plan at checkout.
|
487
|
+
*
|
488
|
+
* Learn more about [forms](https://dev.wix.com/docs/rest/api-reference/wix-forms/form-submissions/introduction).
|
489
|
+
*/
|
490
|
+
formId?: string | null;
|
491
|
+
/** 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. */
|
492
|
+
submissionId?: string | null;
|
493
|
+
/**
|
494
|
+
* Data submitted to the plan's order form at checkout.
|
495
|
+
* @readonly
|
496
|
+
*/
|
497
|
+
submissionData?: Record<string, any>;
|
498
|
+
}
|
499
|
+
interface MemberGetOrderRequest$1 {
|
500
|
+
/** Order ID. */
|
501
|
+
id: string;
|
502
|
+
fieldSet?: Set$1;
|
503
|
+
}
|
504
|
+
declare enum Set$1 {
|
505
|
+
/** Same behavior as BASIC */
|
506
|
+
UNKNOWN_SET = "UNKNOWN_SET",
|
507
|
+
/**
|
508
|
+
* Returns fields of the entity that are available in the database.
|
509
|
+
* By default a field is available in the database unless explicitly specified in the documentation
|
510
|
+
*/
|
511
|
+
BASIC = "BASIC",
|
512
|
+
/**
|
513
|
+
* Returns all fields in the entity.
|
514
|
+
* This might make additional calls to gather the full entity
|
515
|
+
*/
|
516
|
+
FULL = "FULL"
|
517
|
+
}
|
518
|
+
interface MemberGetOrderResponse$1 {
|
519
|
+
/** Requested order. */
|
520
|
+
order?: Order$1;
|
521
|
+
}
|
522
|
+
interface MemberListOrdersRequest$1 {
|
523
|
+
/** Filter by plan IDs. */
|
524
|
+
planIds?: string[];
|
525
|
+
/** Filter for orders where auto renewal was canceled. */
|
526
|
+
autoRenewCanceled?: boolean | null;
|
527
|
+
/** Filter by order status. */
|
528
|
+
orderStatuses?: OrderStatus$1[];
|
529
|
+
/** Filter by payment status. */
|
530
|
+
paymentStatuses?: PaymentStatus$1[];
|
531
|
+
/** Limit the number of pricing plans returned. Default limit is 50. */
|
532
|
+
limit?: number | null;
|
533
|
+
/** Number of entries to offset. */
|
534
|
+
offset?: number | null;
|
535
|
+
/** 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). */
|
536
|
+
sorting?: Sorting$3;
|
537
|
+
fieldSet?: Set$1;
|
538
|
+
}
|
539
|
+
interface Sorting$3 {
|
540
|
+
/** Name of the field to sort by. */
|
541
|
+
fieldName?: string;
|
542
|
+
/** Sort order. */
|
543
|
+
order?: SortOrder$3;
|
544
|
+
}
|
545
|
+
declare enum SortOrder$3 {
|
546
|
+
ASC = "ASC",
|
547
|
+
DESC = "DESC"
|
548
|
+
}
|
549
|
+
interface MemberListOrdersResponse$1 {
|
550
|
+
orders?: Order$1[];
|
551
|
+
/** Object containing paging-related data (number of orders returned, offset). */
|
552
|
+
pagingMetadata?: PagingMetadataV2$3;
|
553
|
+
}
|
554
|
+
interface PagingMetadataV2$3 {
|
555
|
+
/** Number of items returned in the response. */
|
556
|
+
count?: number | null;
|
557
|
+
/** Offset that was requested. */
|
558
|
+
offset?: number | null;
|
559
|
+
/** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
|
560
|
+
total?: number | null;
|
561
|
+
/** Flag that indicates the server failed to calculate the `total` field. */
|
562
|
+
tooManyToCount?: boolean | null;
|
563
|
+
/** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
|
564
|
+
cursors?: Cursors$3;
|
565
|
+
}
|
566
|
+
interface Cursors$3 {
|
567
|
+
/** Cursor string pointing to the next page in the list of results. */
|
568
|
+
next?: string | null;
|
569
|
+
/** Cursor pointing to the previous page in the list of results. */
|
570
|
+
prev?: string | null;
|
571
|
+
}
|
572
|
+
interface RequestCancellationRequest$1 {
|
573
|
+
/** Order ID. */
|
574
|
+
id: string;
|
575
|
+
/** Required. Whether to cancel the order effective immediately or at the next payment date. One-time orders can only be canceled immediately. */
|
576
|
+
effectiveAt: CancellationEffectiveAt$1;
|
577
|
+
}
|
578
|
+
interface RequestCancellationResponse$1 {
|
579
|
+
}
|
580
|
+
interface CreateOfflineOrderRequest$1 {
|
581
|
+
/** 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). */
|
582
|
+
planId: string;
|
583
|
+
/** ID of the member ordering the plan. See [Members for more information about member IDs](https://dev.wix.com/api/rest/members/members). */
|
584
|
+
memberId: string;
|
585
|
+
/**
|
586
|
+
* Start date and time for the ordered plan.
|
587
|
+
*
|
588
|
+
* Default: Current date and time
|
589
|
+
*/
|
590
|
+
startDate?: Date;
|
591
|
+
/**
|
592
|
+
* Whether the order is paid.
|
593
|
+
*
|
594
|
+
* Default: `false`
|
595
|
+
*/
|
596
|
+
paid?: boolean | null;
|
597
|
+
/**
|
598
|
+
* Coupon code to apply.
|
599
|
+
*
|
600
|
+
* See [Coupons to learn more](https://dev.wix.com/api/rest/coupons).
|
601
|
+
*/
|
602
|
+
couponCode?: string | null;
|
603
|
+
/** Form submission id that was submitted together with the order */
|
604
|
+
submissionId?: string | null;
|
605
|
+
}
|
606
|
+
interface CreateOfflineOrderResponse$1 {
|
607
|
+
/** Order. */
|
608
|
+
order?: Order$1;
|
609
|
+
}
|
610
|
+
interface GetOfflineOrderPreviewRequest$1 {
|
611
|
+
/** 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). */
|
612
|
+
planId: string;
|
613
|
+
/** 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). */
|
614
|
+
memberId: string;
|
615
|
+
/**
|
616
|
+
* Start date and time for plan of the previewed order.
|
617
|
+
*
|
618
|
+
* Default: Current date and time
|
619
|
+
*/
|
620
|
+
startDate?: Date;
|
621
|
+
/** Coupon code to apply. See [Coupons to learn more](https://dev.wix.com/api/rest/coupons). */
|
622
|
+
couponCode?: string | null;
|
623
|
+
}
|
624
|
+
interface GetOfflineOrderPreviewResponse$1 {
|
625
|
+
/** The previewed order, as if the plan had been ordered. */
|
626
|
+
order?: Order$1;
|
627
|
+
/**
|
628
|
+
* Whether this previewed order would exceed the permitted amount of purchases available
|
629
|
+
* for this plan for this buyer.
|
630
|
+
*
|
631
|
+
* Always `false` for plans that do not have purchase limits.
|
632
|
+
*/
|
633
|
+
purchaseLimitExceeded?: boolean;
|
634
|
+
}
|
635
|
+
interface GetPricePreviewRequest$1 {
|
636
|
+
/** ID of plan to preview. */
|
637
|
+
planId: string;
|
638
|
+
/**
|
639
|
+
* Coupon code to apply.
|
640
|
+
*
|
641
|
+
* See Coupons [to learn more](https://dev.wix.com/api/rest/coupons).
|
642
|
+
*/
|
643
|
+
couponCode?: string | null;
|
644
|
+
}
|
645
|
+
interface GetPricePreviewResponse$1 {
|
646
|
+
/**
|
647
|
+
* __Deprecated.__ Use `prices` instead. This property will be removed on September 30, 2022.
|
648
|
+
* @deprecated __Deprecated.__ Use `prices` instead. This property will be removed on September 30, 2022.
|
649
|
+
* @replacedBy prices
|
650
|
+
* @removalDate 2022-10-01
|
651
|
+
*/
|
652
|
+
price?: PriceDetails$1;
|
653
|
+
/** Pricing details. */
|
654
|
+
prices?: SpannedPrice$1[];
|
655
|
+
}
|
656
|
+
interface GetOrderRequest$1 {
|
657
|
+
/** Order ID. */
|
658
|
+
id: string;
|
659
|
+
fieldSet?: Set$1;
|
660
|
+
}
|
661
|
+
interface GetOrderResponse$1 {
|
662
|
+
/** Order. */
|
663
|
+
order?: Order$1;
|
664
|
+
}
|
665
|
+
interface ListOrdersRequest$1 {
|
666
|
+
/** 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). */
|
667
|
+
buyerIds?: string[];
|
668
|
+
/** Filter by plan IDs. See [Plans to learn more about pricing plans](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/plans). */
|
669
|
+
planIds?: string[];
|
670
|
+
/** Filter by whether or not the auto-renewal of recurring orders was canceled. */
|
671
|
+
autoRenewCanceled?: boolean | null;
|
672
|
+
/** Filter by order status. */
|
673
|
+
orderStatuses?: OrderStatus$1[];
|
674
|
+
/** Filter by payment status. */
|
675
|
+
paymentStatuses?: PaymentStatus$1[];
|
676
|
+
/**
|
677
|
+
* 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.
|
678
|
+
*
|
679
|
+
* Max: `50`
|
680
|
+
*/
|
681
|
+
limit?: number | null;
|
682
|
+
/** Number of orders to skip in the current sort order. */
|
683
|
+
offset?: number | null;
|
684
|
+
/**
|
685
|
+
* Sort order.
|
686
|
+
*
|
687
|
+
* Use `ASC` for ascending order or `DESC` for descending order.
|
688
|
+
*
|
689
|
+
* Default: `DESC`
|
690
|
+
*/
|
691
|
+
sorting?: Sorting$3;
|
692
|
+
/** Parameter to define amount of fields to return. FULL returns each order's submission data. Supported values: UNKNOWN_SET, BASIC, FULL */
|
693
|
+
fieldSet?: Set$1;
|
694
|
+
}
|
695
|
+
interface ListOrdersResponse$1 {
|
696
|
+
/** List of orders. */
|
697
|
+
orders?: Order$1[];
|
698
|
+
/** Object containing paging-related data (number of orders returned, offset). */
|
699
|
+
pagingMetadata?: PagingMetadataV2$3;
|
700
|
+
}
|
701
|
+
interface PostponeEndDateRequest$1 {
|
702
|
+
/** Order ID. */
|
703
|
+
id: string;
|
704
|
+
/**
|
705
|
+
* New end date and time.
|
706
|
+
*
|
707
|
+
* Must be later than the current end date and time.
|
708
|
+
*/
|
709
|
+
endDate: Date;
|
710
|
+
}
|
711
|
+
interface PostponeEndDateResponse$1 {
|
712
|
+
}
|
713
|
+
interface CancelOrderRequest$1 {
|
714
|
+
/** Order ID. */
|
715
|
+
id: string;
|
716
|
+
/** __Required.__ When the order will be canceled. One-time orders can only be canceled `IMMEDIATELY`. */
|
717
|
+
effectiveAt: CancellationEffectiveAt$1;
|
718
|
+
}
|
719
|
+
interface CancelOrderResponse$1 {
|
720
|
+
}
|
721
|
+
interface MarkAsPaidRequest$1 {
|
722
|
+
/** Order ID. */
|
723
|
+
id: string;
|
724
|
+
}
|
725
|
+
interface MarkAsPaidResponse$1 {
|
726
|
+
}
|
727
|
+
interface PauseOrderRequest$1 {
|
728
|
+
/** Order ID. */
|
729
|
+
id: string;
|
730
|
+
}
|
731
|
+
interface PauseOrderResponse$1 {
|
732
|
+
}
|
733
|
+
interface ResumeOrderRequest$1 {
|
734
|
+
/** Order ID. */
|
735
|
+
id: string;
|
736
|
+
}
|
737
|
+
interface ResumeOrderResponse$1 {
|
738
|
+
}
|
739
|
+
interface MemberGetOrderResponseNonNullableFields$1 {
|
740
|
+
order?: {
|
741
|
+
id: string;
|
742
|
+
planId: string;
|
743
|
+
subscriptionId: string;
|
744
|
+
buyer?: {
|
745
|
+
memberId: string;
|
746
|
+
contactId: string;
|
747
|
+
};
|
748
|
+
priceDetails?: {
|
749
|
+
subscription?: {
|
750
|
+
cycleDuration?: {
|
751
|
+
unit: PeriodUnit$3;
|
752
|
+
};
|
753
|
+
};
|
754
|
+
singlePaymentForDuration?: {
|
755
|
+
unit: PeriodUnit$3;
|
756
|
+
};
|
757
|
+
subtotal: string;
|
758
|
+
discount: string;
|
759
|
+
tax?: {
|
760
|
+
name: string;
|
761
|
+
includedInPrice: boolean;
|
762
|
+
rate: string;
|
763
|
+
amount: string;
|
764
|
+
};
|
765
|
+
total: string;
|
766
|
+
planPrice: string;
|
767
|
+
currency: string;
|
768
|
+
coupon?: {
|
769
|
+
code: string;
|
770
|
+
amount: string;
|
771
|
+
id: string;
|
772
|
+
};
|
773
|
+
};
|
774
|
+
pricing?: {
|
775
|
+
subscription?: {
|
776
|
+
cycleDuration?: {
|
777
|
+
unit: PeriodUnit$3;
|
778
|
+
};
|
779
|
+
};
|
780
|
+
singlePaymentForDuration?: {
|
781
|
+
unit: PeriodUnit$3;
|
782
|
+
};
|
783
|
+
prices: {
|
784
|
+
duration?: {
|
785
|
+
cycleFrom: number;
|
786
|
+
};
|
787
|
+
price?: {
|
788
|
+
subtotal: string;
|
789
|
+
coupon?: {
|
790
|
+
code: string;
|
791
|
+
amount: string;
|
792
|
+
id: string;
|
793
|
+
};
|
794
|
+
discount: string;
|
795
|
+
tax?: {
|
796
|
+
name: string;
|
797
|
+
includedInPrice: boolean;
|
798
|
+
rate: string;
|
799
|
+
amount: string;
|
800
|
+
};
|
801
|
+
total: string;
|
802
|
+
currency: string;
|
803
|
+
fees: {
|
804
|
+
name: string;
|
805
|
+
amount: string;
|
806
|
+
}[];
|
807
|
+
proration: string;
|
808
|
+
};
|
809
|
+
}[];
|
810
|
+
};
|
811
|
+
type: OrderType$1;
|
812
|
+
orderMethod: OrderMethod;
|
813
|
+
status: OrderStatus$1;
|
814
|
+
cancellation?: {
|
815
|
+
cause: CancellationCause$1;
|
816
|
+
effectiveAt: CancellationEffectiveAt$1;
|
817
|
+
};
|
818
|
+
lastPaymentStatus: PaymentStatus$1;
|
819
|
+
pausePeriods: {
|
820
|
+
status: Status$1;
|
821
|
+
}[];
|
822
|
+
currentCycle?: {
|
823
|
+
index: number;
|
824
|
+
};
|
825
|
+
cycles: {
|
826
|
+
index: number;
|
827
|
+
}[];
|
828
|
+
planName: string;
|
829
|
+
planDescription: string;
|
830
|
+
planPrice: string;
|
831
|
+
statusNew: OrderStatus$1;
|
832
|
+
};
|
833
|
+
}
|
834
|
+
interface MemberListOrdersResponseNonNullableFields$1 {
|
835
|
+
orders: {
|
836
|
+
id: string;
|
837
|
+
planId: string;
|
838
|
+
subscriptionId: string;
|
839
|
+
buyer?: {
|
840
|
+
memberId: string;
|
841
|
+
contactId: string;
|
842
|
+
};
|
843
|
+
priceDetails?: {
|
844
|
+
subscription?: {
|
845
|
+
cycleDuration?: {
|
846
|
+
unit: PeriodUnit$3;
|
847
|
+
};
|
848
|
+
};
|
849
|
+
singlePaymentForDuration?: {
|
850
|
+
unit: PeriodUnit$3;
|
851
|
+
};
|
852
|
+
subtotal: string;
|
853
|
+
discount: string;
|
854
|
+
tax?: {
|
855
|
+
name: string;
|
856
|
+
includedInPrice: boolean;
|
857
|
+
rate: string;
|
858
|
+
amount: string;
|
859
|
+
};
|
860
|
+
total: string;
|
861
|
+
planPrice: string;
|
862
|
+
currency: string;
|
863
|
+
coupon?: {
|
864
|
+
code: string;
|
865
|
+
amount: string;
|
866
|
+
id: string;
|
867
|
+
};
|
868
|
+
};
|
869
|
+
pricing?: {
|
870
|
+
subscription?: {
|
871
|
+
cycleDuration?: {
|
872
|
+
unit: PeriodUnit$3;
|
873
|
+
};
|
874
|
+
};
|
875
|
+
singlePaymentForDuration?: {
|
876
|
+
unit: PeriodUnit$3;
|
877
|
+
};
|
878
|
+
prices: {
|
879
|
+
duration?: {
|
880
|
+
cycleFrom: number;
|
881
|
+
};
|
882
|
+
price?: {
|
883
|
+
subtotal: string;
|
884
|
+
coupon?: {
|
885
|
+
code: string;
|
886
|
+
amount: string;
|
887
|
+
id: string;
|
888
|
+
};
|
889
|
+
discount: string;
|
890
|
+
tax?: {
|
891
|
+
name: string;
|
892
|
+
includedInPrice: boolean;
|
893
|
+
rate: string;
|
894
|
+
amount: string;
|
895
|
+
};
|
896
|
+
total: string;
|
897
|
+
currency: string;
|
898
|
+
fees: {
|
899
|
+
name: string;
|
900
|
+
amount: string;
|
901
|
+
}[];
|
902
|
+
proration: string;
|
903
|
+
};
|
904
|
+
}[];
|
905
|
+
};
|
906
|
+
type: OrderType$1;
|
907
|
+
orderMethod: OrderMethod;
|
908
|
+
status: OrderStatus$1;
|
909
|
+
cancellation?: {
|
910
|
+
cause: CancellationCause$1;
|
911
|
+
effectiveAt: CancellationEffectiveAt$1;
|
912
|
+
};
|
913
|
+
lastPaymentStatus: PaymentStatus$1;
|
914
|
+
pausePeriods: {
|
915
|
+
status: Status$1;
|
916
|
+
}[];
|
917
|
+
currentCycle?: {
|
918
|
+
index: number;
|
919
|
+
};
|
920
|
+
cycles: {
|
921
|
+
index: number;
|
922
|
+
}[];
|
923
|
+
planName: string;
|
924
|
+
planDescription: string;
|
925
|
+
planPrice: string;
|
926
|
+
statusNew: OrderStatus$1;
|
927
|
+
}[];
|
928
|
+
}
|
929
|
+
interface CreateOfflineOrderResponseNonNullableFields$1 {
|
930
|
+
order?: {
|
931
|
+
id: string;
|
932
|
+
planId: string;
|
933
|
+
subscriptionId: string;
|
934
|
+
buyer?: {
|
935
|
+
memberId: string;
|
936
|
+
contactId: string;
|
937
|
+
};
|
938
|
+
priceDetails?: {
|
939
|
+
subscription?: {
|
940
|
+
cycleDuration?: {
|
941
|
+
unit: PeriodUnit$3;
|
942
|
+
};
|
943
|
+
};
|
944
|
+
singlePaymentForDuration?: {
|
945
|
+
unit: PeriodUnit$3;
|
946
|
+
};
|
947
|
+
subtotal: string;
|
948
|
+
discount: string;
|
949
|
+
tax?: {
|
950
|
+
name: string;
|
951
|
+
includedInPrice: boolean;
|
952
|
+
rate: string;
|
953
|
+
amount: string;
|
954
|
+
};
|
955
|
+
total: string;
|
956
|
+
planPrice: string;
|
957
|
+
currency: string;
|
958
|
+
coupon?: {
|
959
|
+
code: string;
|
960
|
+
amount: string;
|
961
|
+
id: string;
|
962
|
+
};
|
963
|
+
};
|
964
|
+
pricing?: {
|
965
|
+
subscription?: {
|
966
|
+
cycleDuration?: {
|
967
|
+
unit: PeriodUnit$3;
|
968
|
+
};
|
969
|
+
};
|
970
|
+
singlePaymentForDuration?: {
|
971
|
+
unit: PeriodUnit$3;
|
972
|
+
};
|
973
|
+
prices: {
|
974
|
+
duration?: {
|
975
|
+
cycleFrom: number;
|
976
|
+
};
|
977
|
+
price?: {
|
978
|
+
subtotal: string;
|
979
|
+
coupon?: {
|
980
|
+
code: string;
|
981
|
+
amount: string;
|
982
|
+
id: string;
|
983
|
+
};
|
984
|
+
discount: string;
|
985
|
+
tax?: {
|
986
|
+
name: string;
|
987
|
+
includedInPrice: boolean;
|
988
|
+
rate: string;
|
989
|
+
amount: string;
|
990
|
+
};
|
991
|
+
total: string;
|
992
|
+
currency: string;
|
993
|
+
fees: {
|
994
|
+
name: string;
|
995
|
+
amount: string;
|
996
|
+
}[];
|
997
|
+
proration: string;
|
998
|
+
};
|
999
|
+
}[];
|
1000
|
+
};
|
1001
|
+
type: OrderType$1;
|
1002
|
+
orderMethod: OrderMethod;
|
1003
|
+
status: OrderStatus$1;
|
1004
|
+
cancellation?: {
|
1005
|
+
cause: CancellationCause$1;
|
1006
|
+
effectiveAt: CancellationEffectiveAt$1;
|
1007
|
+
};
|
1008
|
+
lastPaymentStatus: PaymentStatus$1;
|
1009
|
+
pausePeriods: {
|
1010
|
+
status: Status$1;
|
1011
|
+
}[];
|
1012
|
+
currentCycle?: {
|
1013
|
+
index: number;
|
1014
|
+
};
|
1015
|
+
cycles: {
|
1016
|
+
index: number;
|
1017
|
+
}[];
|
1018
|
+
planName: string;
|
1019
|
+
planDescription: string;
|
1020
|
+
planPrice: string;
|
1021
|
+
statusNew: OrderStatus$1;
|
1022
|
+
};
|
1023
|
+
}
|
1024
|
+
interface GetOfflineOrderPreviewResponseNonNullableFields$1 {
|
1025
|
+
order?: {
|
1026
|
+
id: string;
|
1027
|
+
planId: string;
|
1028
|
+
subscriptionId: string;
|
1029
|
+
buyer?: {
|
1030
|
+
memberId: string;
|
1031
|
+
contactId: string;
|
1032
|
+
};
|
1033
|
+
priceDetails?: {
|
1034
|
+
subscription?: {
|
1035
|
+
cycleDuration?: {
|
1036
|
+
unit: PeriodUnit$3;
|
1037
|
+
};
|
1038
|
+
};
|
1039
|
+
singlePaymentForDuration?: {
|
1040
|
+
unit: PeriodUnit$3;
|
1041
|
+
};
|
1042
|
+
subtotal: string;
|
1043
|
+
discount: string;
|
1044
|
+
tax?: {
|
1045
|
+
name: string;
|
1046
|
+
includedInPrice: boolean;
|
1047
|
+
rate: string;
|
1048
|
+
amount: string;
|
1049
|
+
};
|
1050
|
+
total: string;
|
1051
|
+
planPrice: string;
|
1052
|
+
currency: string;
|
1053
|
+
coupon?: {
|
1054
|
+
code: string;
|
1055
|
+
amount: string;
|
1056
|
+
id: string;
|
1057
|
+
};
|
1058
|
+
};
|
1059
|
+
pricing?: {
|
1060
|
+
subscription?: {
|
1061
|
+
cycleDuration?: {
|
1062
|
+
unit: PeriodUnit$3;
|
1063
|
+
};
|
1064
|
+
};
|
1065
|
+
singlePaymentForDuration?: {
|
1066
|
+
unit: PeriodUnit$3;
|
1067
|
+
};
|
1068
|
+
prices: {
|
1069
|
+
duration?: {
|
1070
|
+
cycleFrom: number;
|
1071
|
+
};
|
1072
|
+
price?: {
|
1073
|
+
subtotal: string;
|
1074
|
+
coupon?: {
|
1075
|
+
code: string;
|
1076
|
+
amount: string;
|
1077
|
+
id: string;
|
1078
|
+
};
|
1079
|
+
discount: string;
|
1080
|
+
tax?: {
|
1081
|
+
name: string;
|
1082
|
+
includedInPrice: boolean;
|
1083
|
+
rate: string;
|
1084
|
+
amount: string;
|
1085
|
+
};
|
1086
|
+
total: string;
|
1087
|
+
currency: string;
|
1088
|
+
fees: {
|
1089
|
+
name: string;
|
1090
|
+
amount: string;
|
1091
|
+
}[];
|
1092
|
+
proration: string;
|
1093
|
+
};
|
1094
|
+
}[];
|
1095
|
+
};
|
1096
|
+
type: OrderType$1;
|
1097
|
+
orderMethod: OrderMethod;
|
1098
|
+
status: OrderStatus$1;
|
1099
|
+
cancellation?: {
|
1100
|
+
cause: CancellationCause$1;
|
1101
|
+
effectiveAt: CancellationEffectiveAt$1;
|
1102
|
+
};
|
1103
|
+
lastPaymentStatus: PaymentStatus$1;
|
1104
|
+
pausePeriods: {
|
1105
|
+
status: Status$1;
|
1106
|
+
}[];
|
1107
|
+
currentCycle?: {
|
1108
|
+
index: number;
|
1109
|
+
};
|
1110
|
+
cycles: {
|
1111
|
+
index: number;
|
1112
|
+
}[];
|
1113
|
+
planName: string;
|
1114
|
+
planDescription: string;
|
1115
|
+
planPrice: string;
|
1116
|
+
statusNew: OrderStatus$1;
|
1117
|
+
};
|
1118
|
+
purchaseLimitExceeded: boolean;
|
1119
|
+
}
|
1120
|
+
interface GetPricePreviewResponseNonNullableFields$1 {
|
1121
|
+
price?: {
|
1122
|
+
subscription?: {
|
1123
|
+
cycleDuration?: {
|
1124
|
+
unit: PeriodUnit$3;
|
1125
|
+
};
|
1126
|
+
};
|
1127
|
+
singlePaymentForDuration?: {
|
1128
|
+
unit: PeriodUnit$3;
|
1129
|
+
};
|
1130
|
+
subtotal: string;
|
1131
|
+
discount: string;
|
1132
|
+
tax?: {
|
1133
|
+
name: string;
|
1134
|
+
includedInPrice: boolean;
|
1135
|
+
rate: string;
|
1136
|
+
amount: string;
|
1137
|
+
};
|
1138
|
+
total: string;
|
1139
|
+
planPrice: string;
|
1140
|
+
currency: string;
|
1141
|
+
coupon?: {
|
1142
|
+
code: string;
|
1143
|
+
amount: string;
|
1144
|
+
id: string;
|
1145
|
+
};
|
1146
|
+
};
|
1147
|
+
prices: {
|
1148
|
+
duration?: {
|
1149
|
+
cycleFrom: number;
|
1150
|
+
};
|
1151
|
+
price?: {
|
1152
|
+
subtotal: string;
|
1153
|
+
coupon?: {
|
1154
|
+
code: string;
|
1155
|
+
amount: string;
|
1156
|
+
id: string;
|
1157
|
+
};
|
1158
|
+
discount: string;
|
1159
|
+
tax?: {
|
1160
|
+
name: string;
|
1161
|
+
includedInPrice: boolean;
|
1162
|
+
rate: string;
|
1163
|
+
amount: string;
|
1164
|
+
};
|
1165
|
+
total: string;
|
1166
|
+
currency: string;
|
1167
|
+
fees: {
|
1168
|
+
name: string;
|
1169
|
+
amount: string;
|
1170
|
+
}[];
|
1171
|
+
proration: string;
|
1172
|
+
};
|
1173
|
+
}[];
|
1174
|
+
}
|
1175
|
+
interface GetOrderResponseNonNullableFields$1 {
|
1176
|
+
order?: {
|
1177
|
+
id: string;
|
1178
|
+
planId: string;
|
1179
|
+
subscriptionId: string;
|
1180
|
+
buyer?: {
|
1181
|
+
memberId: string;
|
1182
|
+
contactId: string;
|
1183
|
+
};
|
1184
|
+
priceDetails?: {
|
1185
|
+
subscription?: {
|
1186
|
+
cycleDuration?: {
|
1187
|
+
unit: PeriodUnit$3;
|
1188
|
+
};
|
1189
|
+
};
|
1190
|
+
singlePaymentForDuration?: {
|
1191
|
+
unit: PeriodUnit$3;
|
1192
|
+
};
|
1193
|
+
subtotal: string;
|
1194
|
+
discount: string;
|
1195
|
+
tax?: {
|
1196
|
+
name: string;
|
1197
|
+
includedInPrice: boolean;
|
1198
|
+
rate: string;
|
1199
|
+
amount: string;
|
1200
|
+
};
|
1201
|
+
total: string;
|
1202
|
+
planPrice: string;
|
1203
|
+
currency: string;
|
1204
|
+
coupon?: {
|
1205
|
+
code: string;
|
1206
|
+
amount: string;
|
1207
|
+
id: string;
|
1208
|
+
};
|
1209
|
+
};
|
1210
|
+
pricing?: {
|
1211
|
+
subscription?: {
|
1212
|
+
cycleDuration?: {
|
1213
|
+
unit: PeriodUnit$3;
|
1214
|
+
};
|
1215
|
+
};
|
1216
|
+
singlePaymentForDuration?: {
|
1217
|
+
unit: PeriodUnit$3;
|
1218
|
+
};
|
1219
|
+
prices: {
|
1220
|
+
duration?: {
|
1221
|
+
cycleFrom: number;
|
1222
|
+
};
|
1223
|
+
price?: {
|
1224
|
+
subtotal: string;
|
1225
|
+
coupon?: {
|
1226
|
+
code: string;
|
1227
|
+
amount: string;
|
1228
|
+
id: string;
|
1229
|
+
};
|
1230
|
+
discount: string;
|
1231
|
+
tax?: {
|
1232
|
+
name: string;
|
1233
|
+
includedInPrice: boolean;
|
1234
|
+
rate: string;
|
1235
|
+
amount: string;
|
1236
|
+
};
|
1237
|
+
total: string;
|
1238
|
+
currency: string;
|
1239
|
+
fees: {
|
1240
|
+
name: string;
|
1241
|
+
amount: string;
|
1242
|
+
}[];
|
1243
|
+
proration: string;
|
1244
|
+
};
|
1245
|
+
}[];
|
1246
|
+
};
|
1247
|
+
type: OrderType$1;
|
1248
|
+
orderMethod: OrderMethod;
|
1249
|
+
status: OrderStatus$1;
|
1250
|
+
cancellation?: {
|
1251
|
+
cause: CancellationCause$1;
|
1252
|
+
effectiveAt: CancellationEffectiveAt$1;
|
1253
|
+
};
|
1254
|
+
lastPaymentStatus: PaymentStatus$1;
|
1255
|
+
pausePeriods: {
|
1256
|
+
status: Status$1;
|
1257
|
+
}[];
|
1258
|
+
currentCycle?: {
|
1259
|
+
index: number;
|
1260
|
+
};
|
1261
|
+
cycles: {
|
1262
|
+
index: number;
|
1263
|
+
}[];
|
1264
|
+
planName: string;
|
1265
|
+
planDescription: string;
|
1266
|
+
planPrice: string;
|
1267
|
+
statusNew: OrderStatus$1;
|
1268
|
+
};
|
1269
|
+
}
|
1270
|
+
interface ListOrdersResponseNonNullableFields$1 {
|
1271
|
+
orders: {
|
1272
|
+
id: string;
|
1273
|
+
planId: string;
|
1274
|
+
subscriptionId: string;
|
1275
|
+
buyer?: {
|
1276
|
+
memberId: string;
|
1277
|
+
contactId: string;
|
1278
|
+
};
|
1279
|
+
priceDetails?: {
|
1280
|
+
subscription?: {
|
1281
|
+
cycleDuration?: {
|
1282
|
+
unit: PeriodUnit$3;
|
1283
|
+
};
|
1284
|
+
};
|
1285
|
+
singlePaymentForDuration?: {
|
1286
|
+
unit: PeriodUnit$3;
|
1287
|
+
};
|
1288
|
+
subtotal: string;
|
1289
|
+
discount: string;
|
1290
|
+
tax?: {
|
1291
|
+
name: string;
|
1292
|
+
includedInPrice: boolean;
|
1293
|
+
rate: string;
|
1294
|
+
amount: string;
|
1295
|
+
};
|
1296
|
+
total: string;
|
1297
|
+
planPrice: string;
|
1298
|
+
currency: string;
|
1299
|
+
coupon?: {
|
1300
|
+
code: string;
|
1301
|
+
amount: string;
|
1302
|
+
id: string;
|
1303
|
+
};
|
1304
|
+
};
|
1305
|
+
pricing?: {
|
1306
|
+
subscription?: {
|
1307
|
+
cycleDuration?: {
|
1308
|
+
unit: PeriodUnit$3;
|
1309
|
+
};
|
1310
|
+
};
|
1311
|
+
singlePaymentForDuration?: {
|
1312
|
+
unit: PeriodUnit$3;
|
1313
|
+
};
|
1314
|
+
prices: {
|
1315
|
+
duration?: {
|
1316
|
+
cycleFrom: number;
|
1317
|
+
};
|
1318
|
+
price?: {
|
1319
|
+
subtotal: string;
|
1320
|
+
coupon?: {
|
1321
|
+
code: string;
|
1322
|
+
amount: string;
|
1323
|
+
id: string;
|
1324
|
+
};
|
1325
|
+
discount: string;
|
1326
|
+
tax?: {
|
1327
|
+
name: string;
|
1328
|
+
includedInPrice: boolean;
|
1329
|
+
rate: string;
|
1330
|
+
amount: string;
|
1331
|
+
};
|
1332
|
+
total: string;
|
1333
|
+
currency: string;
|
1334
|
+
fees: {
|
1335
|
+
name: string;
|
1336
|
+
amount: string;
|
1337
|
+
}[];
|
1338
|
+
proration: string;
|
1339
|
+
};
|
1340
|
+
}[];
|
1341
|
+
};
|
1342
|
+
type: OrderType$1;
|
1343
|
+
orderMethod: OrderMethod;
|
1344
|
+
status: OrderStatus$1;
|
1345
|
+
cancellation?: {
|
1346
|
+
cause: CancellationCause$1;
|
1347
|
+
effectiveAt: CancellationEffectiveAt$1;
|
1348
|
+
};
|
1349
|
+
lastPaymentStatus: PaymentStatus$1;
|
1350
|
+
pausePeriods: {
|
1351
|
+
status: Status$1;
|
1352
|
+
}[];
|
1353
|
+
currentCycle?: {
|
1354
|
+
index: number;
|
1355
|
+
};
|
1356
|
+
cycles: {
|
1357
|
+
index: number;
|
1358
|
+
}[];
|
1359
|
+
planName: string;
|
1360
|
+
planDescription: string;
|
1361
|
+
planPrice: string;
|
1362
|
+
statusNew: OrderStatus$1;
|
1363
|
+
}[];
|
1364
|
+
}
|
1365
|
+
|
1366
|
+
/**
|
1367
|
+
* An order object includes all of the details related to the purchase of a Pricing Plan.
|
1368
|
+
* You can manage existing orders, create offline orders, and preview orders not yet purchased.
|
1369
|
+
*
|
1370
|
+
* Orders are based on pricing models based on the payment and duration cycles for each plan. See here to
|
1371
|
+
* [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).
|
1372
|
+
*/
|
1373
|
+
interface Order {
|
1374
|
+
/**
|
1375
|
+
* Order ID.
|
1376
|
+
* @readonly
|
1377
|
+
*/
|
1378
|
+
_id?: string;
|
1379
|
+
/**
|
1380
|
+
* ID of the plan purchased with the order.
|
1381
|
+
* @readonly
|
1382
|
+
*/
|
1383
|
+
planId?: string;
|
1384
|
+
/**
|
1385
|
+
* ID of the related Wix subscription.
|
1386
|
+
*
|
1387
|
+
* Every pricing plan order corresponds to a Wix subscription, including orders for single payment plans. See a [Pricing Plans overview](https://support.wix.com/en/article/pricing-plans-an-overview#create-plans-to-suit-your-business).
|
1388
|
+
* @readonly
|
1389
|
+
*/
|
1390
|
+
subscriptionId?: string;
|
1391
|
+
/**
|
1392
|
+
* Wix Pay order ID.
|
1393
|
+
*
|
1394
|
+
* Provided by Wix whether the order is created online or offline. The field is omitted when the order is free.
|
1395
|
+
* @readonly
|
1396
|
+
*/
|
1397
|
+
wixPayOrderId?: string | null;
|
1398
|
+
/**
|
1399
|
+
* The buyer's IDs. Includes `memberId` and `contactId`.
|
1400
|
+
*
|
1401
|
+
* Currently, Pricing Plan purchases are limited to members only. `contactId` is returned,
|
1402
|
+
* but a buyer will not be able to purchase a plan without a `memberId`.
|
1403
|
+
* @readonly
|
1404
|
+
*/
|
1405
|
+
buyer?: Buyer;
|
1406
|
+
/**
|
1407
|
+
* @internal
|
1408
|
+
* @internal
|
1409
|
+
* @readonly
|
1410
|
+
* @deprecated __Deprecated.__ Use `pricing` instead. This property will be removed on September 30, 2022.
|
1411
|
+
* @replacedBy pricing
|
1412
|
+
* @removalDate 2022-10-01
|
1413
|
+
*/
|
1414
|
+
priceDetails?: PriceDetails;
|
1415
|
+
/**
|
1416
|
+
* Pricing model, price, and payment schedule for the order.
|
1417
|
+
* @readonly
|
1418
|
+
*/
|
1419
|
+
pricing?: PricingDetails;
|
1420
|
+
/**
|
1421
|
+
* How the order was processed. Supported values:
|
1422
|
+
* + `"ONLINE"`: The buyer purchased the plan using the site.
|
1423
|
+
* + `"OFFLINE"`: The buyer made a manual, offline purchase without using the site.
|
1424
|
+
* @readonly
|
1425
|
+
*/
|
1426
|
+
type?: OrderType;
|
1427
|
+
/**
|
1428
|
+
* Status of the order. Supported values:
|
1429
|
+
* + `DRAFT`: Order has been initiated but payment hasn't been processed yet. The plan isn't yet available for use to the buyer.
|
1430
|
+
* + `PENDING`: Order has been purchased and its start date is set in the future.
|
1431
|
+
* + `ACTIVE`: Order has been processed. The plan is available for use.
|
1432
|
+
* + `PAUSED`: Order, and use of the plan, is [paused](#pauseorder). The order, and use of the plan, can be [resumed](#resumeorder).
|
1433
|
+
* + `ENDED`: Order has completed its duration and is no longer available for use.
|
1434
|
+
* + `CANCELED`: Order has been [canceled](#cancelorder).
|
1435
|
+
* @readonly
|
1436
|
+
*/
|
1437
|
+
status?: OrderStatus;
|
1438
|
+
/**
|
1439
|
+
* Whether the order will be canceled at the next payment date.
|
1440
|
+
*
|
1441
|
+
* If `true`, the order status will be `CANCELED` and the next payment won't be charged. Omitted for single payment orders.
|
1442
|
+
* @readonly
|
1443
|
+
*/
|
1444
|
+
autoRenewCanceled?: boolean | null;
|
1445
|
+
/**
|
1446
|
+
* Details about the cancellation of an order.
|
1447
|
+
*
|
1448
|
+
*
|
1449
|
+
* @readonly
|
1450
|
+
*/
|
1451
|
+
cancellation?: Cancellation;
|
1452
|
+
/**
|
1453
|
+
* Status of the last payment for the order.
|
1454
|
+
* Updated automatically for online orders. Updated manually by the site owner for offline orders.
|
1455
|
+
*
|
1456
|
+
* Supported values:
|
1457
|
+
* + `PAID`: The last payment was paid.
|
1458
|
+
* + `REFUNDED`: The last payment was refunded.
|
1459
|
+
* + `FAILED`: The last payment transaction didn't complete.
|
1460
|
+
* + `UNPAID`: The last payment wasn't paid.
|
1461
|
+
* + `PENDING`: Awaiting payment.
|
1462
|
+
* + `NOT_APPLICABLE`: No payment was necessary. For example, for free plans or free trials.
|
1463
|
+
* @readonly
|
1464
|
+
*/
|
1465
|
+
lastPaymentStatus?: PaymentStatus;
|
1466
|
+
/**
|
1467
|
+
* Start date and time for the ordered plan.
|
1468
|
+
* @readonly
|
1469
|
+
*/
|
1470
|
+
startDate?: Date;
|
1471
|
+
/**
|
1472
|
+
* Current end date and time for the ordered plan.
|
1473
|
+
*
|
1474
|
+
* `endDate` may be updated over the course of an order. If the order is [paused](#pauseorder),
|
1475
|
+
* it will have a later `endDate` once it [resumes](#resumeorder). `endDate` may also be [postponed](#postponeenddate).
|
1476
|
+
*
|
1477
|
+
* Omitted if the order is valid until canceled and still `ACTIVE`.
|
1478
|
+
* @readonly
|
1479
|
+
*/
|
1480
|
+
endDate?: Date;
|
1481
|
+
/**
|
1482
|
+
* List of periods during which the order is paused.
|
1483
|
+
* @readonly
|
1484
|
+
*/
|
1485
|
+
pausePeriods?: PausePeriod[];
|
1486
|
+
/**
|
1487
|
+
* Free trial period for the order, in days.
|
1488
|
+
*
|
1489
|
+
* Only available for recurring plans.
|
1490
|
+
* @readonly
|
1491
|
+
*/
|
1492
|
+
freeTrialDays?: number | null;
|
1493
|
+
/**
|
1494
|
+
* Earliest end date and time that the plan for the order can expire.
|
1495
|
+
*
|
1496
|
+
* Calculated by using the original end date plus any pause periods. Omitted if the order is active until canceled. Reserved for future use.
|
1497
|
+
* @readonly
|
1498
|
+
*/
|
1499
|
+
earliestEndDate?: Date;
|
1500
|
+
/**
|
1501
|
+
* Current payment cycle for the order.
|
1502
|
+
*
|
1503
|
+
* `currentCycle` will be omitted if the order's status is `CANCELED` or `ENDED`, or if the `startDate` hasn't passed yet.
|
1504
|
+
* @readonly
|
1505
|
+
*/
|
1506
|
+
currentCycle?: CurrentCycle;
|
1507
|
+
/**
|
1508
|
+
* Plan name at the time of purchase.
|
1509
|
+
* @readonly
|
1510
|
+
*/
|
1511
|
+
planName?: string;
|
1512
|
+
/**
|
1513
|
+
* Plan description at the time of purchase
|
1514
|
+
* @readonly
|
1515
|
+
*/
|
1516
|
+
planDescription?: string;
|
1517
|
+
/**
|
1518
|
+
* Plan price as it was at the moment of order creation.
|
1519
|
+
* @readonly
|
1520
|
+
*/
|
1521
|
+
planPrice?: string;
|
1522
|
+
/**
|
1523
|
+
* Date and time the order was created.
|
1524
|
+
* @readonly
|
1525
|
+
*/
|
1526
|
+
_createdDate?: Date;
|
1527
|
+
/**
|
1528
|
+
* Date and time the order was updated.
|
1529
|
+
* @readonly
|
1530
|
+
*/
|
1531
|
+
_updatedDate?: Date;
|
1532
|
+
/**
|
1533
|
+
* Information about the form submitted during the plan's checkout.
|
1534
|
+
* @readonly
|
1535
|
+
*/
|
1536
|
+
formData?: FormData;
|
1537
|
+
}
|
1538
|
+
interface Buyer {
|
1539
|
+
/**
|
1540
|
+
* Member ID for a buyer.
|
1541
|
+
* @readonly
|
1542
|
+
*/
|
1543
|
+
memberId?: string;
|
1544
|
+
/**
|
1545
|
+
* Contact ID for a buyer.
|
1546
|
+
* @readonly
|
1547
|
+
*/
|
1548
|
+
contactId?: string;
|
1549
|
+
}
|
1550
|
+
interface PriceDetails extends PriceDetailsPricingModelOneOf {
|
1551
|
+
/** Order has recurring payments. */
|
1552
|
+
subscription?: Recurrence$2;
|
1553
|
+
/** One-time payment. Order is valid for a specified duration. */
|
1554
|
+
singlePaymentForDuration?: Duration$2;
|
1555
|
+
/** One-time payment. Order is valid until it is canceled. */
|
1556
|
+
singlePaymentUnlimited?: boolean | null;
|
1557
|
+
/** Price of the order excluding tax, specified as a monetary amount. for example, `"9.99"`. */
|
1558
|
+
subtotal?: string;
|
1559
|
+
/** Total discount applied. */
|
1560
|
+
discount?: string;
|
1561
|
+
/** Tax applied. */
|
1562
|
+
tax?: Tax;
|
1563
|
+
/**
|
1564
|
+
* Price after tax and discount is applied, specified as a monetary amount. For example, `"13.98"`.
|
1565
|
+
*
|
1566
|
+
* If no tax is applied, the amount is the same as `subtotal`.
|
1567
|
+
*/
|
1568
|
+
total?: string;
|
1569
|
+
/** Plan price as it was at the moment of order creation. */
|
1570
|
+
planPrice?: string;
|
1571
|
+
/** Currency code. Must be valid ISO 4217 currency code (e.g., USD). */
|
1572
|
+
currency?: string;
|
1573
|
+
/** Free trial period for the order in days. Only available for recurring plans. */
|
1574
|
+
freeTrialDays?: number | null;
|
1575
|
+
/** Coupon applied to the order. Empty means no coupon was applied. */
|
1576
|
+
coupon?: Coupon;
|
1577
|
+
}
|
1578
|
+
/** @oneof */
|
1579
|
+
interface PriceDetailsPricingModelOneOf {
|
1580
|
+
/** Order has recurring payments. */
|
1581
|
+
subscription?: Recurrence$2;
|
1582
|
+
/** One-time payment. Order is valid for a specified duration. */
|
1583
|
+
singlePaymentForDuration?: Duration$2;
|
1584
|
+
/** One-time payment. Order is valid until it is canceled. */
|
1585
|
+
singlePaymentUnlimited?: boolean | null;
|
1586
|
+
}
|
1587
|
+
interface Tax {
|
1588
|
+
/** Name of the tax. For example, VAT. */
|
1589
|
+
name?: string;
|
1590
|
+
/** Whether tax is included in the original price. When `false`, tax is added at checkout. */
|
1591
|
+
includedInPrice?: boolean;
|
1592
|
+
/** Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`. */
|
1593
|
+
rate?: string;
|
1594
|
+
/** Total tax, specified as a monetary amount. For example, `"3.99"`. */
|
1595
|
+
amount?: string;
|
1596
|
+
}
|
1597
|
+
/** An object specifying how often and for how long payments recur (may be forever). */
|
1598
|
+
interface Recurrence$2 {
|
1599
|
+
/** Length of one payment cycle. */
|
1600
|
+
cycleDuration?: Duration$2;
|
1601
|
+
/**
|
1602
|
+
* Amount of payment cycles this subscription is valid for.
|
1603
|
+
*
|
1604
|
+
* `0` for unlimited or until-canceled.
|
1605
|
+
*/
|
1606
|
+
cycleCount?: number | null;
|
1607
|
+
}
|
1608
|
+
/** A duration expressed in number of time units. */
|
1609
|
+
interface Duration$2 {
|
1610
|
+
/**
|
1611
|
+
* The amount of a duration `unit` in a single payment cycle.
|
1612
|
+
*
|
1613
|
+
* Currently limited to support only `1`.
|
1614
|
+
*/
|
1615
|
+
count?: number | null;
|
1616
|
+
/** Unit of time for the cycle duration. */
|
1617
|
+
unit?: PeriodUnit$2;
|
1618
|
+
}
|
1619
|
+
declare enum PeriodUnit$2 {
|
1620
|
+
UNDEFINED = "UNDEFINED",
|
1621
|
+
DAY = "DAY",
|
1622
|
+
WEEK = "WEEK",
|
1623
|
+
MONTH = "MONTH",
|
1624
|
+
YEAR = "YEAR"
|
1625
|
+
}
|
1626
|
+
interface Coupon {
|
1627
|
+
/** Code of the applied coupon. */
|
1628
|
+
code?: string;
|
1629
|
+
/** Total discount of the coupon, as a monetary amount. */
|
1630
|
+
amount?: string;
|
1631
|
+
/**
|
1632
|
+
* Coupon ID.
|
1633
|
+
* @readonly
|
1634
|
+
*/
|
1635
|
+
_id?: string;
|
1636
|
+
}
|
1637
|
+
interface PricingDetails extends PricingDetailsPricingModelOneOf {
|
1638
|
+
/** Pricing model for an order with recurring payment cycles. */
|
1639
|
+
subscription?: Recurrence$2;
|
1640
|
+
/** Pricing model for an order with a one-time payment and the order is valid for a specific amount of time. */
|
1641
|
+
singlePaymentForDuration?: Duration$2;
|
1642
|
+
/** Pricing model for an order with a one-time payment and the order is valid until canceled. */
|
1643
|
+
singlePaymentUnlimited?: boolean | null;
|
1644
|
+
/**
|
1645
|
+
* Pricing details for all pricing models.
|
1646
|
+
* @readonly
|
1647
|
+
*/
|
1648
|
+
prices?: SpannedPrice[];
|
1649
|
+
}
|
1650
|
+
/** @oneof */
|
1651
|
+
interface PricingDetailsPricingModelOneOf {
|
1652
|
+
/** Pricing model for an order with recurring payment cycles. */
|
1653
|
+
subscription?: Recurrence$2;
|
1654
|
+
/** Pricing model for an order with a one-time payment and the order is valid for a specific amount of time. */
|
1655
|
+
singlePaymentForDuration?: Duration$2;
|
1656
|
+
/** Pricing model for an order with a one-time payment and the order is valid until canceled. */
|
1657
|
+
singlePaymentUnlimited?: boolean | null;
|
1658
|
+
}
|
1659
|
+
interface SpannedPrice {
|
1660
|
+
/**
|
1661
|
+
* Cycle duration to apply `price` for.
|
1662
|
+
*
|
1663
|
+
* Use with all pricing models.
|
1664
|
+
* Can apply the same price to multiple payment cycles.
|
1665
|
+
*/
|
1666
|
+
duration?: PriceDuration;
|
1667
|
+
/** Order price. */
|
1668
|
+
price?: Price;
|
1669
|
+
}
|
1670
|
+
interface PriceDuration {
|
1671
|
+
/**
|
1672
|
+
* Price starts to apply with this cycle.
|
1673
|
+
*
|
1674
|
+
* `1` is the first payment cycle for all pricing models.
|
1675
|
+
*/
|
1676
|
+
cycleFrom?: number;
|
1677
|
+
/**
|
1678
|
+
* Amount of cycles to apply price for.
|
1679
|
+
*
|
1680
|
+
* For `subscription` pricing models with a finite number of cycles, the `numberOfCycles` is the same as `pricing.subscription.cycleCount`.
|
1681
|
+
*
|
1682
|
+
* For `subscription` pricing models that are unlimited or until-canceled, the `numberOfCycles` is not returned.
|
1683
|
+
*
|
1684
|
+
* For `singlePaymentForDuration` and `singlePaymentUnlimited` pricing models, the `numberOfCycles` is `1`.
|
1685
|
+
*/
|
1686
|
+
numberOfCycles?: number | null;
|
1687
|
+
}
|
1688
|
+
interface Price {
|
1689
|
+
/** Price of the order excluding tax, specified as a monetary amount. For example, `"9.99"`. */
|
1690
|
+
subtotal?: string;
|
1691
|
+
/** Coupon applied to the order. */
|
1692
|
+
coupon?: Coupon;
|
1693
|
+
/** Total discount applied to the order. */
|
1694
|
+
discount?: string;
|
1695
|
+
/**
|
1696
|
+
* Tax applied to the order.
|
1697
|
+
*
|
1698
|
+
* Tax is only applied if the site [has it configured](https://support.wix.com/en/article/pricing-plans-setting-up-tax-collection).
|
1699
|
+
*/
|
1700
|
+
tax?: Tax;
|
1701
|
+
/**
|
1702
|
+
* Price after tax and discount is applied. Specified as a monetary amount, for example, `"13.98"`.
|
1703
|
+
*
|
1704
|
+
* If no tax is applied, the amount is the same as `subtotal`.
|
1705
|
+
*/
|
1706
|
+
total?: string;
|
1707
|
+
/**
|
1708
|
+
* Three-letter currency code in
|
1709
|
+
* [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
|
1710
|
+
*/
|
1711
|
+
currency?: string;
|
1712
|
+
/** Price change after billing date was change and price was adjusted. Could be positive and negative values. */
|
1713
|
+
proration?: string;
|
1714
|
+
}
|
1715
|
+
declare enum OrderType {
|
1716
|
+
UNDEFINED = "UNDEFINED",
|
1717
|
+
/** Payments made by the buyer */
|
1718
|
+
ONLINE = "ONLINE",
|
1719
|
+
/** Payments managed manually by the site owner */
|
1720
|
+
OFFLINE = "OFFLINE",
|
1721
|
+
/** Payments managed externally */
|
1722
|
+
EXTERNAL = "EXTERNAL"
|
1723
|
+
}
|
1724
|
+
declare enum OrderStatus {
|
1725
|
+
/** Order status undefined */
|
1726
|
+
UNDEFINED = "UNDEFINED",
|
1727
|
+
/** Order created, but hasn't been paid for yet. Filtered out in ListOrders response by default. */
|
1728
|
+
DRAFT = "DRAFT",
|
1729
|
+
/** Order has been paid for, but the start date is in the future */
|
1730
|
+
PENDING = "PENDING",
|
1731
|
+
/** Order is active */
|
1732
|
+
ACTIVE = "ACTIVE",
|
1733
|
+
/** Order is paused until site owner resumes it */
|
1734
|
+
PAUSED = "PAUSED",
|
1735
|
+
/** Order has ended */
|
1736
|
+
ENDED = "ENDED",
|
1737
|
+
/** Order has been canceled */
|
1738
|
+
CANCELED = "CANCELED"
|
1739
|
+
}
|
1740
|
+
interface Cancellation {
|
1741
|
+
/** Date and time the cancellation was requested. */
|
1742
|
+
requestedDate?: Date;
|
1743
|
+
/**
|
1744
|
+
* Reason for the cancellation. One of:
|
1745
|
+
* + `OWNER_ACTION`: Site owner canceled the order.
|
1746
|
+
* + `MEMBER_ACTION`: Buyer initiated the cancellation.
|
1747
|
+
* + `PAYMENT_FAILURE`: Payment transaction failed.
|
1748
|
+
* + `PAYMENT_SETUP_FAILURE`: Buyer's payment details weren't set up correctly.
|
1749
|
+
* + `UNKNOWN`: Reason for the cancellation is unknown.
|
1750
|
+
*/
|
1751
|
+
cause?: CancellationCause;
|
1752
|
+
/**
|
1753
|
+
* When the cancellation takes effect. Set when cancelling the order. One of:
|
1754
|
+
* + `IMMEDIATELY`: Cancellation occurs immediately and the buyer can no longer use the plan.
|
1755
|
+
* + `NEXT_PAYMENT_DATE`: Cancellation occurs at the next payment date and time. Buyer can continue to use the plan until that date and time.
|
1756
|
+
*/
|
1757
|
+
effectiveAt?: CancellationEffectiveAt;
|
1758
|
+
}
|
1759
|
+
declare enum CancellationCause {
|
1760
|
+
/** Cancellation initiator undefined */
|
1761
|
+
UNDEFINED = "UNDEFINED",
|
1762
|
+
/** Order was canceled by site owner (default if canceled by user or service identity) */
|
1763
|
+
OWNER_ACTION = "OWNER_ACTION",
|
1764
|
+
/** Order was canceled by member (default if canceled by member identity) */
|
1765
|
+
MEMBER_ACTION = "MEMBER_ACTION",
|
1766
|
+
/** Order was canceled because of payment failure */
|
1767
|
+
PAYMENT_FAILURE = "PAYMENT_FAILURE",
|
1768
|
+
/** Order was canceled because of payment setup failure */
|
1769
|
+
PAYMENT_SETUP_FAILURE = "PAYMENT_SETUP_FAILURE",
|
1770
|
+
/** Order was cancelled because of an unknown reason. It's not possible to know with certain payment providers (e.g. paypal) */
|
1771
|
+
UNKNOWN = "UNKNOWN"
|
1772
|
+
}
|
1773
|
+
declare enum CancellationEffectiveAt {
|
1774
|
+
/** Cancellation time undefined */
|
1775
|
+
UNDEFINED = "UNDEFINED",
|
1776
|
+
/** Will cancel the order now, i.e. update validUntil to the current date */
|
1777
|
+
IMMEDIATELY = "IMMEDIATELY",
|
1778
|
+
/** Will cancel the order at the date when next payment should have been made */
|
1779
|
+
NEXT_PAYMENT_DATE = "NEXT_PAYMENT_DATE"
|
1780
|
+
}
|
1781
|
+
declare enum PaymentStatus {
|
1782
|
+
/** Payment status undefined */
|
1783
|
+
UNDEFINED = "UNDEFINED",
|
1784
|
+
/** Payment has been paid */
|
1785
|
+
PAID = "PAID",
|
1786
|
+
/** Payment has been refunded */
|
1787
|
+
REFUNDED = "REFUNDED",
|
1788
|
+
/** Recurring payment has failed */
|
1789
|
+
FAILED = "FAILED",
|
1790
|
+
/** Payment has not been paid */
|
1791
|
+
UNPAID = "UNPAID",
|
1792
|
+
/** Billing has been initialized, but actual charge is yet to be made. Can happen for free trial and PayPal */
|
1793
|
+
PENDING = "PENDING",
|
1794
|
+
/** Used in cases where the plan is free */
|
1795
|
+
NOT_APPLICABLE = "NOT_APPLICABLE"
|
1796
|
+
}
|
1797
|
+
interface PausePeriod {
|
1798
|
+
/**
|
1799
|
+
* Status of the pause period. Supported values:
|
1800
|
+
* + `ACTIVE`: Status while the order is [paused](#pauseorder).
|
1801
|
+
* + `ENDED`: Status when the order is [resumed](#resumeorder).
|
1802
|
+
*/
|
1803
|
+
status?: Status;
|
1804
|
+
/** Start date and time of the pause period. */
|
1805
|
+
pauseDate?: Date;
|
1806
|
+
/**
|
1807
|
+
* End date and time of the pause period.
|
1808
|
+
*
|
1809
|
+
* Omitted while the pause period remains `ACTIVE`.
|
1810
|
+
*/
|
1811
|
+
resumeDate?: Date;
|
1812
|
+
}
|
1813
|
+
declare enum Status {
|
1814
|
+
UNDEFINED = "UNDEFINED",
|
1815
|
+
/** Order suspension is active */
|
1816
|
+
ACTIVE = "ACTIVE",
|
1817
|
+
/** Order suspension has ended */
|
1818
|
+
ENDED = "ENDED"
|
1819
|
+
}
|
1820
|
+
/**
|
1821
|
+
* Current cycle will be empty when order is cancelled, expired or order start date is in the future
|
1822
|
+
* Current cycle start and end dates take into account free trial days and suspensions
|
1823
|
+
*/
|
1824
|
+
interface CurrentCycle {
|
1825
|
+
/**
|
1826
|
+
* Index of the current payment cycle in the order.
|
1827
|
+
*
|
1828
|
+
* `0` when order is in a free trial period. In all other cases, the index starts with `1`.
|
1829
|
+
*/
|
1830
|
+
index?: number;
|
1831
|
+
/** Start date and time for the current payment cycle. */
|
1832
|
+
startedDate?: Date;
|
1833
|
+
/** End date and time for the current payment cycle. */
|
1834
|
+
endedDate?: Date;
|
1835
|
+
}
|
1836
|
+
interface FormData {
|
1837
|
+
/** ID of the form associated with the plan at checkout. */
|
1838
|
+
formId?: string | null;
|
1839
|
+
/** 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. */
|
1840
|
+
submissionId?: string | null;
|
1841
|
+
/**
|
1842
|
+
* Data submitted to the plan's order form at checkout.
|
1843
|
+
*
|
1844
|
+
* This field is returned when a method's `fieldset` is set to `"FULL"`.
|
1845
|
+
*
|
1846
|
+
* @readonly
|
1847
|
+
*/
|
1848
|
+
submissionData?: Record<string, any>;
|
1849
|
+
}
|
1850
|
+
interface MemberGetOrderRequest {
|
1851
|
+
/** Order ID. */
|
1852
|
+
_id: string;
|
1853
|
+
fieldSet?: Set;
|
1854
|
+
}
|
1855
|
+
declare enum Set {
|
1856
|
+
/** Same behavior as BASIC */
|
1857
|
+
UNKNOWN_SET = "UNKNOWN_SET",
|
1858
|
+
/**
|
1859
|
+
* Returns fields of the entity that are available in the database.
|
1860
|
+
* By default a field is available in the database unless explicitly specified in the documentation
|
1861
|
+
*/
|
1862
|
+
BASIC = "BASIC",
|
1863
|
+
/**
|
1864
|
+
* Returns all fields in the entity.
|
1865
|
+
* This might make additional calls to gather the full entity
|
1866
|
+
*/
|
1867
|
+
FULL = "FULL"
|
1868
|
+
}
|
1869
|
+
interface MemberGetOrderResponse {
|
1870
|
+
/** Requested order. */
|
1871
|
+
order?: Order;
|
1872
|
+
}
|
1873
|
+
interface MemberListOrdersRequest {
|
1874
|
+
/** Filter by plan IDs. */
|
1875
|
+
planIds?: string[];
|
1876
|
+
/** Filter for orders where auto renewal was canceled. */
|
1877
|
+
autoRenewCanceled?: boolean | null;
|
1878
|
+
/** Filter by order status. */
|
1879
|
+
orderStatuses?: OrderStatus[];
|
1880
|
+
/** Filter by payment status. */
|
1881
|
+
paymentStatuses?: PaymentStatus[];
|
1882
|
+
/** Limit the number of pricing plans returned. Default limit is 50. */
|
1883
|
+
limit?: number | null;
|
1884
|
+
/** Number of entries to offset. */
|
1885
|
+
offset?: number | null;
|
1886
|
+
/** 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). */
|
1887
|
+
sorting?: Sorting$2;
|
1888
|
+
fieldSet?: Set;
|
1889
|
+
}
|
1890
|
+
interface Sorting$2 {
|
1891
|
+
/** Name of the field to sort by. */
|
1892
|
+
fieldName?: string;
|
1893
|
+
/** Sort order. */
|
1894
|
+
order?: SortOrder$2;
|
1895
|
+
}
|
1896
|
+
declare enum SortOrder$2 {
|
1897
|
+
ASC = "ASC",
|
1898
|
+
DESC = "DESC"
|
1899
|
+
}
|
1900
|
+
interface MemberListOrdersResponse {
|
1901
|
+
/** List of orders. */
|
1902
|
+
orders?: Order[];
|
1903
|
+
/** Object containing paging-related data (number of orders returned, offset). */
|
1904
|
+
pagingMetadata?: PagingMetadataV2$2;
|
1905
|
+
}
|
1906
|
+
interface PagingMetadataV2$2 {
|
1907
|
+
/** Number of items returned in the response. */
|
1908
|
+
count?: number | null;
|
1909
|
+
/** Offset that was requested. */
|
1910
|
+
offset?: number | null;
|
1911
|
+
/** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
|
1912
|
+
total?: number | null;
|
1913
|
+
/** Flag that indicates the server failed to calculate the `total` field. */
|
1914
|
+
tooManyToCount?: boolean | null;
|
1915
|
+
/** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
|
1916
|
+
cursors?: Cursors$2;
|
1917
|
+
}
|
1918
|
+
interface Cursors$2 {
|
1919
|
+
/** Cursor string pointing to the next page in the list of results. */
|
1920
|
+
next?: string | null;
|
1921
|
+
/** Cursor pointing to the previous page in the list of results. */
|
1922
|
+
prev?: string | null;
|
1923
|
+
}
|
1924
|
+
interface RequestCancellationRequest {
|
1925
|
+
/** Order ID. */
|
1926
|
+
_id: string;
|
1927
|
+
/**
|
1928
|
+
* Whether to cancel the order immediately or at the next payment date.
|
1929
|
+
* One-time payment orders can only be canceled immediately.
|
1930
|
+
*
|
1931
|
+
* Supported values:
|
1932
|
+
* - `"IMMEDIATELY"`: Indicates that the order should be canceled immediately.
|
1933
|
+
* - `"NEXT_PAYMENT_DATE"`: Indicates that the order be canceled at the next payment date.
|
1934
|
+
*/
|
1935
|
+
effectiveAt: CancellationEffectiveAt;
|
1936
|
+
}
|
1937
|
+
interface RequestCancellationResponse {
|
1938
|
+
}
|
1939
|
+
interface CreateOfflineOrderRequest {
|
1940
|
+
/** ID of the plan being ordered. */
|
1941
|
+
planId: string;
|
1942
|
+
/** ID of the member ordering the plan. */
|
1943
|
+
memberId: string;
|
1944
|
+
/**
|
1945
|
+
* Start date and time for the ordered plan.
|
1946
|
+
*
|
1947
|
+
* Default: Current date and time
|
1948
|
+
*/
|
1949
|
+
startDate?: Date;
|
1950
|
+
/**
|
1951
|
+
* Whether the order is paid.
|
1952
|
+
*
|
1953
|
+
* Default: `false`
|
1954
|
+
*/
|
1955
|
+
paid?: boolean | null;
|
1956
|
+
/**
|
1957
|
+
* Coupon code to apply.
|
1958
|
+
*
|
1959
|
+
* See [Coupons to learn more](https://dev.wix.com/api/rest/coupons).
|
1960
|
+
*/
|
1961
|
+
couponCode?: string | null;
|
1962
|
+
/** Form submission id that was submitted together with the order */
|
1963
|
+
submissionId?: string | null;
|
1964
|
+
}
|
1965
|
+
interface CreateOfflineOrderResponse {
|
1966
|
+
/** Order. */
|
1967
|
+
order?: Order;
|
1968
|
+
}
|
1969
|
+
interface GetOfflineOrderPreviewRequest {
|
1970
|
+
/** 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). */
|
1971
|
+
planId: string;
|
1972
|
+
/** Member ID of the buyer the previewed order is for. */
|
1973
|
+
memberId: string;
|
1974
|
+
/**
|
1975
|
+
* Start date and time for plan of the previewed order.
|
1976
|
+
*
|
1977
|
+
* Default: Current date and time
|
1978
|
+
*/
|
1979
|
+
startDate?: Date;
|
1980
|
+
/** Coupon code to apply. See [Coupons to learn more](https://dev.wix.com/api/rest/coupons). */
|
1981
|
+
couponCode?: string | null;
|
1982
|
+
}
|
1983
|
+
interface GetOfflineOrderPreviewResponse {
|
1984
|
+
/** The previewed order, as if the plan had been ordered. */
|
1985
|
+
order?: Order;
|
1986
|
+
/**
|
1987
|
+
* Whether this previewed order would exceed the permitted amount of purchases available
|
1988
|
+
* for this plan for this buyer.
|
1989
|
+
*
|
1990
|
+
* Always `false` for plans that do not have purchase limits.
|
1991
|
+
*/
|
1992
|
+
purchaseLimitExceeded?: boolean;
|
1993
|
+
}
|
1994
|
+
interface GetPricePreviewRequest {
|
1995
|
+
/** ID of plan to preview. */
|
1996
|
+
planId: string;
|
1997
|
+
/**
|
1998
|
+
* Coupon code to apply.
|
1999
|
+
*
|
2000
|
+
* See Coupons [to learn more](https://dev.wix.com/api/rest/coupons).
|
2001
|
+
*/
|
2002
|
+
couponCode?: string | null;
|
2003
|
+
}
|
2004
|
+
interface GetPricePreviewResponse {
|
2005
|
+
/**
|
2006
|
+
* @internal
|
2007
|
+
* @internal
|
2008
|
+
* @deprecated __Deprecated.__ Use `prices` instead. This property will be removed on September 30, 2022.
|
2009
|
+
* @replacedBy prices
|
2010
|
+
* @removalDate 2022-10-01
|
2011
|
+
*/
|
2012
|
+
price?: PriceDetails;
|
2013
|
+
/** Pricing details. */
|
2014
|
+
prices?: SpannedPrice[];
|
2015
|
+
}
|
2016
|
+
interface GetOrderRequest {
|
2017
|
+
/** Order ID. */
|
2018
|
+
_id: string;
|
2019
|
+
fieldSet?: Set;
|
2020
|
+
}
|
2021
|
+
interface GetOrderResponse {
|
2022
|
+
/** Order. */
|
2023
|
+
order?: Order;
|
2024
|
+
}
|
2025
|
+
interface ListOrdersRequest {
|
2026
|
+
/** 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). */
|
2027
|
+
buyerIds?: string[];
|
2028
|
+
/** Filter by plan IDs. See [Plans to learn more about pricing plans](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/plans). */
|
2029
|
+
planIds?: string[];
|
2030
|
+
/** Filter by whether or not the auto-renewal of recurring orders was canceled. */
|
2031
|
+
autoRenewCanceled?: boolean | null;
|
2032
|
+
/** Filter by order status. */
|
2033
|
+
orderStatuses?: OrderStatus[];
|
2034
|
+
/** Filter by payment status. */
|
2035
|
+
paymentStatuses?: PaymentStatus[];
|
2036
|
+
/**
|
2037
|
+
* 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.
|
2038
|
+
*
|
2039
|
+
* Max: `50`
|
2040
|
+
*/
|
2041
|
+
limit?: number | null;
|
2042
|
+
/** Number of orders to skip in the current sort order. */
|
2043
|
+
offset?: number | null;
|
2044
|
+
/**
|
2045
|
+
* Sort order.
|
2046
|
+
*
|
2047
|
+
* Use `ASC` for ascending order or `DESC` for descending order.
|
2048
|
+
*
|
2049
|
+
* Default: `DESC`
|
2050
|
+
*/
|
2051
|
+
sorting?: Sorting$2;
|
2052
|
+
/** Parameter to define amount of fields to return. FULL returns each order's submission data. Supported values: UNKNOWN_SET, BASIC, FULL */
|
2053
|
+
fieldSet?: Set;
|
2054
|
+
}
|
2055
|
+
interface ListOrdersResponse {
|
2056
|
+
/** List of orders. */
|
2057
|
+
orders?: Order[];
|
2058
|
+
/** Object containing paging-related data (number of orders returned, offset). */
|
2059
|
+
pagingMetadata?: PagingMetadataV2$2;
|
2060
|
+
}
|
2061
|
+
interface PostponeEndDateRequest {
|
2062
|
+
/** Order ID. */
|
2063
|
+
_id: string;
|
2064
|
+
/**
|
2065
|
+
* New end date and time.
|
2066
|
+
*
|
2067
|
+
* Must be later than the current end date and time.
|
2068
|
+
*/
|
2069
|
+
endDate: Date;
|
2070
|
+
}
|
2071
|
+
interface PostponeEndDateResponse {
|
2072
|
+
}
|
2073
|
+
interface CancelOrderRequest {
|
2074
|
+
/** Order ID. */
|
2075
|
+
_id: string;
|
2076
|
+
/**
|
2077
|
+
* When the order is canceled.
|
2078
|
+
*
|
2079
|
+
* One time orders can only be canceled immediately. Supported values:
|
2080
|
+
* - `"IMMEDIATELY"`: The order is canceled immediately.
|
2081
|
+
* - `"NEXT_PAYMENT_DATE"`: The order is canceled at the next payment date.
|
2082
|
+
*/
|
2083
|
+
effectiveAt: CancellationEffectiveAt;
|
2084
|
+
}
|
2085
|
+
interface CancelOrderResponse {
|
2086
|
+
}
|
2087
|
+
interface MarkAsPaidRequest {
|
2088
|
+
/** Order ID. */
|
2089
|
+
_id: string;
|
2090
|
+
}
|
2091
|
+
interface MarkAsPaidResponse {
|
2092
|
+
}
|
2093
|
+
interface PauseOrderRequest {
|
2094
|
+
/** Order ID. */
|
2095
|
+
_id: string;
|
2096
|
+
}
|
2097
|
+
interface PauseOrderResponse {
|
2098
|
+
}
|
2099
|
+
interface ResumeOrderRequest {
|
2100
|
+
/** Order ID. */
|
2101
|
+
_id: string;
|
2102
|
+
}
|
2103
|
+
interface ResumeOrderResponse {
|
2104
|
+
}
|
2105
|
+
interface MemberGetOrderResponseNonNullableFields {
|
2106
|
+
order?: {
|
2107
|
+
_id: string;
|
2108
|
+
planId: string;
|
2109
|
+
subscriptionId: string;
|
2110
|
+
buyer?: {
|
2111
|
+
memberId: string;
|
2112
|
+
contactId: string;
|
2113
|
+
};
|
2114
|
+
priceDetails?: {
|
2115
|
+
subscription?: {
|
2116
|
+
cycleDuration?: {
|
2117
|
+
unit: PeriodUnit$2;
|
2118
|
+
};
|
2119
|
+
};
|
2120
|
+
singlePaymentForDuration?: {
|
2121
|
+
unit: PeriodUnit$2;
|
2122
|
+
};
|
2123
|
+
subtotal: string;
|
2124
|
+
discount: string;
|
2125
|
+
tax?: {
|
2126
|
+
name: string;
|
2127
|
+
includedInPrice: boolean;
|
2128
|
+
rate: string;
|
2129
|
+
amount: string;
|
2130
|
+
};
|
2131
|
+
total: string;
|
2132
|
+
planPrice: string;
|
2133
|
+
currency: string;
|
2134
|
+
coupon?: {
|
2135
|
+
code: string;
|
2136
|
+
amount: string;
|
2137
|
+
_id: string;
|
2138
|
+
};
|
2139
|
+
};
|
2140
|
+
pricing?: {
|
2141
|
+
subscription?: {
|
2142
|
+
cycleDuration?: {
|
2143
|
+
unit: PeriodUnit$2;
|
2144
|
+
};
|
2145
|
+
};
|
2146
|
+
singlePaymentForDuration?: {
|
2147
|
+
unit: PeriodUnit$2;
|
2148
|
+
};
|
2149
|
+
prices: {
|
2150
|
+
duration?: {
|
2151
|
+
cycleFrom: number;
|
2152
|
+
};
|
2153
|
+
price?: {
|
2154
|
+
subtotal: string;
|
2155
|
+
coupon?: {
|
2156
|
+
code: string;
|
2157
|
+
amount: string;
|
2158
|
+
_id: string;
|
2159
|
+
};
|
2160
|
+
discount: string;
|
2161
|
+
tax?: {
|
2162
|
+
name: string;
|
2163
|
+
includedInPrice: boolean;
|
2164
|
+
rate: string;
|
2165
|
+
amount: string;
|
2166
|
+
};
|
2167
|
+
total: string;
|
2168
|
+
currency: string;
|
2169
|
+
proration: string;
|
2170
|
+
};
|
2171
|
+
}[];
|
2172
|
+
};
|
2173
|
+
type: OrderType;
|
2174
|
+
status: OrderStatus;
|
2175
|
+
cancellation?: {
|
2176
|
+
cause: CancellationCause;
|
2177
|
+
effectiveAt: CancellationEffectiveAt;
|
2178
|
+
};
|
2179
|
+
lastPaymentStatus: PaymentStatus;
|
2180
|
+
pausePeriods: {
|
2181
|
+
status: Status;
|
2182
|
+
}[];
|
2183
|
+
currentCycle?: {
|
2184
|
+
index: number;
|
2185
|
+
};
|
2186
|
+
planName: string;
|
2187
|
+
planDescription: string;
|
2188
|
+
planPrice: string;
|
2189
|
+
};
|
2190
|
+
}
|
2191
|
+
interface MemberListOrdersResponseNonNullableFields {
|
2192
|
+
orders: {
|
2193
|
+
_id: string;
|
2194
|
+
planId: string;
|
2195
|
+
subscriptionId: string;
|
2196
|
+
buyer?: {
|
2197
|
+
memberId: string;
|
2198
|
+
contactId: string;
|
2199
|
+
};
|
2200
|
+
priceDetails?: {
|
2201
|
+
subscription?: {
|
2202
|
+
cycleDuration?: {
|
2203
|
+
unit: PeriodUnit$2;
|
2204
|
+
};
|
2205
|
+
};
|
2206
|
+
singlePaymentForDuration?: {
|
2207
|
+
unit: PeriodUnit$2;
|
2208
|
+
};
|
2209
|
+
subtotal: string;
|
2210
|
+
discount: string;
|
2211
|
+
tax?: {
|
2212
|
+
name: string;
|
2213
|
+
includedInPrice: boolean;
|
2214
|
+
rate: string;
|
2215
|
+
amount: string;
|
2216
|
+
};
|
2217
|
+
total: string;
|
2218
|
+
planPrice: string;
|
2219
|
+
currency: string;
|
2220
|
+
coupon?: {
|
2221
|
+
code: string;
|
2222
|
+
amount: string;
|
2223
|
+
_id: string;
|
2224
|
+
};
|
2225
|
+
};
|
2226
|
+
pricing?: {
|
2227
|
+
subscription?: {
|
2228
|
+
cycleDuration?: {
|
2229
|
+
unit: PeriodUnit$2;
|
2230
|
+
};
|
2231
|
+
};
|
2232
|
+
singlePaymentForDuration?: {
|
2233
|
+
unit: PeriodUnit$2;
|
2234
|
+
};
|
2235
|
+
prices: {
|
2236
|
+
duration?: {
|
2237
|
+
cycleFrom: number;
|
2238
|
+
};
|
2239
|
+
price?: {
|
2240
|
+
subtotal: string;
|
2241
|
+
coupon?: {
|
2242
|
+
code: string;
|
2243
|
+
amount: string;
|
2244
|
+
_id: string;
|
2245
|
+
};
|
2246
|
+
discount: string;
|
2247
|
+
tax?: {
|
2248
|
+
name: string;
|
2249
|
+
includedInPrice: boolean;
|
2250
|
+
rate: string;
|
2251
|
+
amount: string;
|
2252
|
+
};
|
2253
|
+
total: string;
|
2254
|
+
currency: string;
|
2255
|
+
proration: string;
|
2256
|
+
};
|
2257
|
+
}[];
|
2258
|
+
};
|
2259
|
+
type: OrderType;
|
2260
|
+
status: OrderStatus;
|
2261
|
+
cancellation?: {
|
2262
|
+
cause: CancellationCause;
|
2263
|
+
effectiveAt: CancellationEffectiveAt;
|
2264
|
+
};
|
2265
|
+
lastPaymentStatus: PaymentStatus;
|
2266
|
+
pausePeriods: {
|
2267
|
+
status: Status;
|
2268
|
+
}[];
|
2269
|
+
currentCycle?: {
|
2270
|
+
index: number;
|
2271
|
+
};
|
2272
|
+
planName: string;
|
2273
|
+
planDescription: string;
|
2274
|
+
planPrice: string;
|
2275
|
+
}[];
|
2276
|
+
}
|
2277
|
+
interface CreateOfflineOrderResponseNonNullableFields {
|
2278
|
+
order?: {
|
2279
|
+
_id: string;
|
2280
|
+
planId: string;
|
2281
|
+
subscriptionId: string;
|
2282
|
+
buyer?: {
|
2283
|
+
memberId: string;
|
2284
|
+
contactId: string;
|
2285
|
+
};
|
2286
|
+
priceDetails?: {
|
2287
|
+
subscription?: {
|
2288
|
+
cycleDuration?: {
|
2289
|
+
unit: PeriodUnit$2;
|
2290
|
+
};
|
2291
|
+
};
|
2292
|
+
singlePaymentForDuration?: {
|
2293
|
+
unit: PeriodUnit$2;
|
2294
|
+
};
|
2295
|
+
subtotal: string;
|
2296
|
+
discount: string;
|
2297
|
+
tax?: {
|
2298
|
+
name: string;
|
2299
|
+
includedInPrice: boolean;
|
2300
|
+
rate: string;
|
2301
|
+
amount: string;
|
2302
|
+
};
|
2303
|
+
total: string;
|
2304
|
+
planPrice: string;
|
2305
|
+
currency: string;
|
2306
|
+
coupon?: {
|
2307
|
+
code: string;
|
2308
|
+
amount: string;
|
2309
|
+
_id: string;
|
2310
|
+
};
|
2311
|
+
};
|
2312
|
+
pricing?: {
|
2313
|
+
subscription?: {
|
2314
|
+
cycleDuration?: {
|
2315
|
+
unit: PeriodUnit$2;
|
2316
|
+
};
|
2317
|
+
};
|
2318
|
+
singlePaymentForDuration?: {
|
2319
|
+
unit: PeriodUnit$2;
|
2320
|
+
};
|
2321
|
+
prices: {
|
2322
|
+
duration?: {
|
2323
|
+
cycleFrom: number;
|
2324
|
+
};
|
2325
|
+
price?: {
|
2326
|
+
subtotal: string;
|
2327
|
+
coupon?: {
|
2328
|
+
code: string;
|
2329
|
+
amount: string;
|
2330
|
+
_id: string;
|
2331
|
+
};
|
2332
|
+
discount: string;
|
2333
|
+
tax?: {
|
2334
|
+
name: string;
|
2335
|
+
includedInPrice: boolean;
|
2336
|
+
rate: string;
|
2337
|
+
amount: string;
|
2338
|
+
};
|
2339
|
+
total: string;
|
2340
|
+
currency: string;
|
2341
|
+
proration: string;
|
2342
|
+
};
|
2343
|
+
}[];
|
2344
|
+
};
|
2345
|
+
type: OrderType;
|
2346
|
+
status: OrderStatus;
|
2347
|
+
cancellation?: {
|
2348
|
+
cause: CancellationCause;
|
2349
|
+
effectiveAt: CancellationEffectiveAt;
|
2350
|
+
};
|
2351
|
+
lastPaymentStatus: PaymentStatus;
|
2352
|
+
pausePeriods: {
|
2353
|
+
status: Status;
|
2354
|
+
}[];
|
2355
|
+
currentCycle?: {
|
2356
|
+
index: number;
|
2357
|
+
};
|
2358
|
+
planName: string;
|
2359
|
+
planDescription: string;
|
2360
|
+
planPrice: string;
|
2361
|
+
};
|
2362
|
+
}
|
2363
|
+
interface GetOfflineOrderPreviewResponseNonNullableFields {
|
2364
|
+
order?: {
|
2365
|
+
_id: string;
|
2366
|
+
planId: string;
|
2367
|
+
subscriptionId: string;
|
2368
|
+
buyer?: {
|
2369
|
+
memberId: string;
|
2370
|
+
contactId: string;
|
2371
|
+
};
|
2372
|
+
priceDetails?: {
|
2373
|
+
subscription?: {
|
2374
|
+
cycleDuration?: {
|
2375
|
+
unit: PeriodUnit$2;
|
2376
|
+
};
|
2377
|
+
};
|
2378
|
+
singlePaymentForDuration?: {
|
2379
|
+
unit: PeriodUnit$2;
|
2380
|
+
};
|
2381
|
+
subtotal: string;
|
2382
|
+
discount: string;
|
2383
|
+
tax?: {
|
2384
|
+
name: string;
|
2385
|
+
includedInPrice: boolean;
|
2386
|
+
rate: string;
|
2387
|
+
amount: string;
|
2388
|
+
};
|
2389
|
+
total: string;
|
2390
|
+
planPrice: string;
|
2391
|
+
currency: string;
|
2392
|
+
coupon?: {
|
2393
|
+
code: string;
|
2394
|
+
amount: string;
|
2395
|
+
_id: string;
|
2396
|
+
};
|
2397
|
+
};
|
2398
|
+
pricing?: {
|
2399
|
+
subscription?: {
|
2400
|
+
cycleDuration?: {
|
2401
|
+
unit: PeriodUnit$2;
|
2402
|
+
};
|
2403
|
+
};
|
2404
|
+
singlePaymentForDuration?: {
|
2405
|
+
unit: PeriodUnit$2;
|
2406
|
+
};
|
2407
|
+
prices: {
|
2408
|
+
duration?: {
|
2409
|
+
cycleFrom: number;
|
2410
|
+
};
|
2411
|
+
price?: {
|
2412
|
+
subtotal: string;
|
2413
|
+
coupon?: {
|
2414
|
+
code: string;
|
2415
|
+
amount: string;
|
2416
|
+
_id: string;
|
2417
|
+
};
|
2418
|
+
discount: string;
|
2419
|
+
tax?: {
|
2420
|
+
name: string;
|
2421
|
+
includedInPrice: boolean;
|
2422
|
+
rate: string;
|
2423
|
+
amount: string;
|
2424
|
+
};
|
2425
|
+
total: string;
|
2426
|
+
currency: string;
|
2427
|
+
proration: string;
|
2428
|
+
};
|
2429
|
+
}[];
|
2430
|
+
};
|
2431
|
+
type: OrderType;
|
2432
|
+
status: OrderStatus;
|
2433
|
+
cancellation?: {
|
2434
|
+
cause: CancellationCause;
|
2435
|
+
effectiveAt: CancellationEffectiveAt;
|
2436
|
+
};
|
2437
|
+
lastPaymentStatus: PaymentStatus;
|
2438
|
+
pausePeriods: {
|
2439
|
+
status: Status;
|
2440
|
+
}[];
|
2441
|
+
currentCycle?: {
|
2442
|
+
index: number;
|
2443
|
+
};
|
2444
|
+
planName: string;
|
2445
|
+
planDescription: string;
|
2446
|
+
planPrice: string;
|
2447
|
+
};
|
2448
|
+
purchaseLimitExceeded: boolean;
|
2449
|
+
}
|
2450
|
+
interface GetPricePreviewResponseNonNullableFields {
|
2451
|
+
price?: {
|
2452
|
+
subscription?: {
|
2453
|
+
cycleDuration?: {
|
2454
|
+
unit: PeriodUnit$2;
|
2455
|
+
};
|
2456
|
+
};
|
2457
|
+
singlePaymentForDuration?: {
|
2458
|
+
unit: PeriodUnit$2;
|
2459
|
+
};
|
2460
|
+
subtotal: string;
|
2461
|
+
discount: string;
|
2462
|
+
tax?: {
|
2463
|
+
name: string;
|
2464
|
+
includedInPrice: boolean;
|
2465
|
+
rate: string;
|
2466
|
+
amount: string;
|
2467
|
+
};
|
2468
|
+
total: string;
|
2469
|
+
planPrice: string;
|
2470
|
+
currency: string;
|
2471
|
+
coupon?: {
|
2472
|
+
code: string;
|
2473
|
+
amount: string;
|
2474
|
+
_id: string;
|
2475
|
+
};
|
2476
|
+
};
|
2477
|
+
prices: {
|
2478
|
+
duration?: {
|
2479
|
+
cycleFrom: number;
|
2480
|
+
};
|
2481
|
+
price?: {
|
2482
|
+
subtotal: string;
|
2483
|
+
coupon?: {
|
2484
|
+
code: string;
|
2485
|
+
amount: string;
|
2486
|
+
_id: string;
|
2487
|
+
};
|
2488
|
+
discount: string;
|
2489
|
+
tax?: {
|
2490
|
+
name: string;
|
2491
|
+
includedInPrice: boolean;
|
2492
|
+
rate: string;
|
2493
|
+
amount: string;
|
2494
|
+
};
|
2495
|
+
total: string;
|
2496
|
+
currency: string;
|
2497
|
+
proration: string;
|
2498
|
+
};
|
2499
|
+
}[];
|
2500
|
+
}
|
2501
|
+
interface GetOrderResponseNonNullableFields {
|
2502
|
+
order?: {
|
2503
|
+
_id: string;
|
2504
|
+
planId: string;
|
2505
|
+
subscriptionId: string;
|
2506
|
+
buyer?: {
|
2507
|
+
memberId: string;
|
2508
|
+
contactId: string;
|
2509
|
+
};
|
2510
|
+
priceDetails?: {
|
2511
|
+
subscription?: {
|
2512
|
+
cycleDuration?: {
|
2513
|
+
unit: PeriodUnit$2;
|
2514
|
+
};
|
2515
|
+
};
|
2516
|
+
singlePaymentForDuration?: {
|
2517
|
+
unit: PeriodUnit$2;
|
2518
|
+
};
|
2519
|
+
subtotal: string;
|
2520
|
+
discount: string;
|
2521
|
+
tax?: {
|
2522
|
+
name: string;
|
2523
|
+
includedInPrice: boolean;
|
2524
|
+
rate: string;
|
2525
|
+
amount: string;
|
2526
|
+
};
|
2527
|
+
total: string;
|
2528
|
+
planPrice: string;
|
2529
|
+
currency: string;
|
2530
|
+
coupon?: {
|
2531
|
+
code: string;
|
2532
|
+
amount: string;
|
2533
|
+
_id: string;
|
2534
|
+
};
|
2535
|
+
};
|
2536
|
+
pricing?: {
|
2537
|
+
subscription?: {
|
2538
|
+
cycleDuration?: {
|
2539
|
+
unit: PeriodUnit$2;
|
2540
|
+
};
|
2541
|
+
};
|
2542
|
+
singlePaymentForDuration?: {
|
2543
|
+
unit: PeriodUnit$2;
|
2544
|
+
};
|
2545
|
+
prices: {
|
2546
|
+
duration?: {
|
2547
|
+
cycleFrom: number;
|
2548
|
+
};
|
2549
|
+
price?: {
|
2550
|
+
subtotal: string;
|
2551
|
+
coupon?: {
|
2552
|
+
code: string;
|
2553
|
+
amount: string;
|
2554
|
+
_id: string;
|
2555
|
+
};
|
2556
|
+
discount: string;
|
2557
|
+
tax?: {
|
2558
|
+
name: string;
|
2559
|
+
includedInPrice: boolean;
|
2560
|
+
rate: string;
|
2561
|
+
amount: string;
|
2562
|
+
};
|
2563
|
+
total: string;
|
2564
|
+
currency: string;
|
2565
|
+
proration: string;
|
2566
|
+
};
|
2567
|
+
}[];
|
2568
|
+
};
|
2569
|
+
type: OrderType;
|
2570
|
+
status: OrderStatus;
|
2571
|
+
cancellation?: {
|
2572
|
+
cause: CancellationCause;
|
2573
|
+
effectiveAt: CancellationEffectiveAt;
|
2574
|
+
};
|
2575
|
+
lastPaymentStatus: PaymentStatus;
|
2576
|
+
pausePeriods: {
|
2577
|
+
status: Status;
|
2578
|
+
}[];
|
2579
|
+
currentCycle?: {
|
2580
|
+
index: number;
|
2581
|
+
};
|
2582
|
+
planName: string;
|
2583
|
+
planDescription: string;
|
2584
|
+
planPrice: string;
|
2585
|
+
};
|
2586
|
+
}
|
2587
|
+
interface ListOrdersResponseNonNullableFields {
|
2588
|
+
orders: {
|
2589
|
+
_id: string;
|
2590
|
+
planId: string;
|
2591
|
+
subscriptionId: string;
|
2592
|
+
buyer?: {
|
2593
|
+
memberId: string;
|
2594
|
+
contactId: string;
|
2595
|
+
};
|
2596
|
+
priceDetails?: {
|
2597
|
+
subscription?: {
|
2598
|
+
cycleDuration?: {
|
2599
|
+
unit: PeriodUnit$2;
|
2600
|
+
};
|
2601
|
+
};
|
2602
|
+
singlePaymentForDuration?: {
|
2603
|
+
unit: PeriodUnit$2;
|
2604
|
+
};
|
2605
|
+
subtotal: string;
|
2606
|
+
discount: string;
|
2607
|
+
tax?: {
|
2608
|
+
name: string;
|
2609
|
+
includedInPrice: boolean;
|
2610
|
+
rate: string;
|
2611
|
+
amount: string;
|
2612
|
+
};
|
2613
|
+
total: string;
|
2614
|
+
planPrice: string;
|
2615
|
+
currency: string;
|
2616
|
+
coupon?: {
|
2617
|
+
code: string;
|
2618
|
+
amount: string;
|
2619
|
+
_id: string;
|
2620
|
+
};
|
2621
|
+
};
|
2622
|
+
pricing?: {
|
2623
|
+
subscription?: {
|
2624
|
+
cycleDuration?: {
|
2625
|
+
unit: PeriodUnit$2;
|
2626
|
+
};
|
2627
|
+
};
|
2628
|
+
singlePaymentForDuration?: {
|
2629
|
+
unit: PeriodUnit$2;
|
2630
|
+
};
|
2631
|
+
prices: {
|
2632
|
+
duration?: {
|
2633
|
+
cycleFrom: number;
|
2634
|
+
};
|
2635
|
+
price?: {
|
2636
|
+
subtotal: string;
|
2637
|
+
coupon?: {
|
2638
|
+
code: string;
|
2639
|
+
amount: string;
|
2640
|
+
_id: string;
|
2641
|
+
};
|
2642
|
+
discount: string;
|
2643
|
+
tax?: {
|
2644
|
+
name: string;
|
2645
|
+
includedInPrice: boolean;
|
2646
|
+
rate: string;
|
2647
|
+
amount: string;
|
2648
|
+
};
|
2649
|
+
total: string;
|
2650
|
+
currency: string;
|
2651
|
+
proration: string;
|
2652
|
+
};
|
2653
|
+
}[];
|
2654
|
+
};
|
2655
|
+
type: OrderType;
|
2656
|
+
status: OrderStatus;
|
2657
|
+
cancellation?: {
|
2658
|
+
cause: CancellationCause;
|
2659
|
+
effectiveAt: CancellationEffectiveAt;
|
2660
|
+
};
|
2661
|
+
lastPaymentStatus: PaymentStatus;
|
2662
|
+
pausePeriods: {
|
2663
|
+
status: Status;
|
2664
|
+
}[];
|
2665
|
+
currentCycle?: {
|
2666
|
+
index: number;
|
2667
|
+
};
|
2668
|
+
planName: string;
|
2669
|
+
planDescription: string;
|
2670
|
+
planPrice: string;
|
2671
|
+
}[];
|
2672
|
+
}
|
2673
|
+
|
2674
|
+
type __PublicMethodMetaInfo$1<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
2675
|
+
getUrl: (context: any) => string;
|
2676
|
+
httpMethod: K;
|
2677
|
+
path: string;
|
2678
|
+
pathParams: M;
|
2679
|
+
__requestType: T;
|
2680
|
+
__originalRequestType: S;
|
2681
|
+
__responseType: Q;
|
2682
|
+
__originalResponseType: R;
|
2683
|
+
};
|
2684
|
+
declare function memberGetOrder(): __PublicMethodMetaInfo$1<'GET', {
|
2685
|
+
id: string;
|
2686
|
+
}, MemberGetOrderRequest, MemberGetOrderRequest$1, MemberGetOrderResponse & MemberGetOrderResponseNonNullableFields, MemberGetOrderResponse$1 & MemberGetOrderResponseNonNullableFields$1>;
|
2687
|
+
declare function memberListOrders(): __PublicMethodMetaInfo$1<'GET', {}, MemberListOrdersRequest, MemberListOrdersRequest$1, MemberListOrdersResponse & MemberListOrdersResponseNonNullableFields, MemberListOrdersResponse$1 & MemberListOrdersResponseNonNullableFields$1>;
|
2688
|
+
declare function requestCancellation(): __PublicMethodMetaInfo$1<'POST', {
|
2689
|
+
id: string;
|
2690
|
+
}, RequestCancellationRequest, RequestCancellationRequest$1, RequestCancellationResponse, RequestCancellationResponse$1>;
|
2691
|
+
declare function createOfflineOrder(): __PublicMethodMetaInfo$1<'POST', {}, CreateOfflineOrderRequest, CreateOfflineOrderRequest$1, CreateOfflineOrderResponse & CreateOfflineOrderResponseNonNullableFields, CreateOfflineOrderResponse$1 & CreateOfflineOrderResponseNonNullableFields$1>;
|
2692
|
+
declare function getOfflineOrderPreview(): __PublicMethodMetaInfo$1<'POST', {}, GetOfflineOrderPreviewRequest, GetOfflineOrderPreviewRequest$1, GetOfflineOrderPreviewResponse & GetOfflineOrderPreviewResponseNonNullableFields, GetOfflineOrderPreviewResponse$1 & GetOfflineOrderPreviewResponseNonNullableFields$1>;
|
2693
|
+
declare function getPricePreview(): __PublicMethodMetaInfo$1<'POST', {}, GetPricePreviewRequest, GetPricePreviewRequest$1, GetPricePreviewResponse & GetPricePreviewResponseNonNullableFields, GetPricePreviewResponse$1 & GetPricePreviewResponseNonNullableFields$1>;
|
2694
|
+
declare function managementGetOrder(): __PublicMethodMetaInfo$1<'GET', {
|
2695
|
+
id: string;
|
2696
|
+
}, GetOrderRequest, GetOrderRequest$1, GetOrderResponse & GetOrderResponseNonNullableFields, GetOrderResponse$1 & GetOrderResponseNonNullableFields$1>;
|
2697
|
+
declare function managementListOrders(): __PublicMethodMetaInfo$1<'GET', {}, ListOrdersRequest, ListOrdersRequest$1, ListOrdersResponse & ListOrdersResponseNonNullableFields, ListOrdersResponse$1 & ListOrdersResponseNonNullableFields$1>;
|
2698
|
+
declare function postponeEndDate(): __PublicMethodMetaInfo$1<'PATCH', {
|
2699
|
+
id: string;
|
2700
|
+
}, PostponeEndDateRequest, PostponeEndDateRequest$1, PostponeEndDateResponse, PostponeEndDateResponse$1>;
|
2701
|
+
declare function cancelOrder(): __PublicMethodMetaInfo$1<'POST', {
|
2702
|
+
id: string;
|
2703
|
+
}, CancelOrderRequest, CancelOrderRequest$1, CancelOrderResponse, CancelOrderResponse$1>;
|
2704
|
+
declare function markAsPaid(): __PublicMethodMetaInfo$1<'POST', {
|
2705
|
+
id: string;
|
2706
|
+
}, MarkAsPaidRequest, MarkAsPaidRequest$1, MarkAsPaidResponse, MarkAsPaidResponse$1>;
|
2707
|
+
declare function pauseOrder(): __PublicMethodMetaInfo$1<'POST', {
|
2708
|
+
id: string;
|
2709
|
+
}, PauseOrderRequest, PauseOrderRequest$1, PauseOrderResponse, PauseOrderResponse$1>;
|
2710
|
+
declare function resumeOrder(): __PublicMethodMetaInfo$1<'POST', {
|
2711
|
+
id: string;
|
2712
|
+
}, ResumeOrderRequest, ResumeOrderRequest$1, ResumeOrderResponse, ResumeOrderResponse$1>;
|
2713
|
+
|
2714
|
+
declare const meta$1_cancelOrder: typeof cancelOrder;
|
2715
|
+
declare const meta$1_createOfflineOrder: typeof createOfflineOrder;
|
2716
|
+
declare const meta$1_getOfflineOrderPreview: typeof getOfflineOrderPreview;
|
2717
|
+
declare const meta$1_getPricePreview: typeof getPricePreview;
|
2718
|
+
declare const meta$1_managementGetOrder: typeof managementGetOrder;
|
2719
|
+
declare const meta$1_managementListOrders: typeof managementListOrders;
|
2720
|
+
declare const meta$1_markAsPaid: typeof markAsPaid;
|
2721
|
+
declare const meta$1_memberGetOrder: typeof memberGetOrder;
|
2722
|
+
declare const meta$1_memberListOrders: typeof memberListOrders;
|
2723
|
+
declare const meta$1_pauseOrder: typeof pauseOrder;
|
2724
|
+
declare const meta$1_postponeEndDate: typeof postponeEndDate;
|
2725
|
+
declare const meta$1_requestCancellation: typeof requestCancellation;
|
2726
|
+
declare const meta$1_resumeOrder: typeof resumeOrder;
|
2727
|
+
declare namespace meta$1 {
|
2728
|
+
export { type __PublicMethodMetaInfo$1 as __PublicMethodMetaInfo, meta$1_cancelOrder as cancelOrder, meta$1_createOfflineOrder as createOfflineOrder, meta$1_getOfflineOrderPreview as getOfflineOrderPreview, meta$1_getPricePreview as getPricePreview, meta$1_managementGetOrder as managementGetOrder, meta$1_managementListOrders as managementListOrders, meta$1_markAsPaid as markAsPaid, meta$1_memberGetOrder as memberGetOrder, meta$1_memberListOrders as memberListOrders, meta$1_pauseOrder as pauseOrder, meta$1_postponeEndDate as postponeEndDate, meta$1_requestCancellation as requestCancellation, meta$1_resumeOrder as resumeOrder };
|
2729
|
+
}
|
2730
|
+
|
2731
|
+
/** Information about the pricing plan. */
|
2732
|
+
interface Plan$1 {
|
2733
|
+
/**
|
2734
|
+
* Plan ID.
|
2735
|
+
* @readonly
|
2736
|
+
*/
|
2737
|
+
id?: string;
|
2738
|
+
/** Plan name. */
|
2739
|
+
name?: string | null;
|
2740
|
+
/** Plan description. */
|
2741
|
+
description?: string | null;
|
2742
|
+
/** What is included with this plan (e.g., 1 weekly entrance to a specific class). */
|
2743
|
+
perks?: StringList$1;
|
2744
|
+
/** Plan price, payment schedule, and expiration. */
|
2745
|
+
pricing?: Pricing$1;
|
2746
|
+
/** Whether the plan is public (visible to site visitors and members). */
|
2747
|
+
public?: boolean | null;
|
2748
|
+
/**
|
2749
|
+
* Whether the plan is archived. Archived plans are not visible and can't be purchased anymore, but existing purchases remain in effect.
|
2750
|
+
* @readonly
|
2751
|
+
*/
|
2752
|
+
archived?: boolean;
|
2753
|
+
/**
|
2754
|
+
* Whether the plan is marked as primary.
|
2755
|
+
* @readonly
|
2756
|
+
*/
|
2757
|
+
primary?: boolean;
|
2758
|
+
/**
|
2759
|
+
* Whether the plan has any orders (including pending and unpaid orders).
|
2760
|
+
* @readonly
|
2761
|
+
*/
|
2762
|
+
hasOrders?: boolean;
|
2763
|
+
/**
|
2764
|
+
* Date plan was created.
|
2765
|
+
* @readonly
|
2766
|
+
*/
|
2767
|
+
createdDate?: Date;
|
2768
|
+
/**
|
2769
|
+
* Date plan was last updated.
|
2770
|
+
* @readonly
|
2771
|
+
*/
|
2772
|
+
updatedDate?: Date;
|
2773
|
+
/**
|
2774
|
+
* URL-friendly version of plan name. Unique across all plans in the same site.
|
2775
|
+
* @readonly
|
2776
|
+
*/
|
2777
|
+
slug?: string | null;
|
2778
|
+
/**
|
2779
|
+
* Number of times the same buyer can purchase the plan. Currently limited to support:
|
2780
|
+
* - Empty value or a value of `0`, meaning no limitation.
|
2781
|
+
* - Value of `1`, meaning limited to one purchase per buyer.
|
2782
|
+
*/
|
2783
|
+
maxPurchasesPerBuyer?: number | null;
|
2784
|
+
/** Whether the buyer can start the plan at a later date. Defaults to false. */
|
2785
|
+
allowFutureStartDate?: boolean | null;
|
2786
|
+
/** Whether the buyer is allowed to cancel their plan. Defaults to false. */
|
2787
|
+
buyerCanCancel?: boolean | null;
|
2788
|
+
/** Any terms and conditions that apply to the plan. This information will be displayed during checkout. */
|
2789
|
+
termsAndConditions?: string | null;
|
2790
|
+
/**
|
2791
|
+
* ID of the form associated with the plan at checkout.
|
2792
|
+
*
|
2793
|
+
* Learn more about [forms](https://support.wix.com/en/article/wix-forms-an-overview).
|
2794
|
+
*/
|
2795
|
+
formId?: string | null;
|
2796
|
+
}
|
2797
|
+
/** This wrapper type exist in order to distinguish an empty string list from no list at all in update requests. */
|
2798
|
+
interface StringList$1 {
|
2799
|
+
/** List of strings */
|
2800
|
+
values?: string[];
|
2801
|
+
}
|
2802
|
+
/** Plan pricing information. Includes the price of the plan and payment details. */
|
2803
|
+
interface Pricing$1 extends PricingPricingModelOneOf$1 {
|
2804
|
+
/** Plan has recurring payments. */
|
2805
|
+
subscription?: Recurrence$1;
|
2806
|
+
/** One time payment, plan is valid for the specified duration. */
|
2807
|
+
singlePaymentForDuration?: Duration$1;
|
2808
|
+
/** One time payment, plan is valid until it is canceled. */
|
2809
|
+
singlePaymentUnlimited?: boolean | null;
|
2810
|
+
/** Amount for a single payment (or the whole subscription if it's not a recurring plan) */
|
2811
|
+
price?: Money$1;
|
2812
|
+
/** Free trial period for the plan in days. It’s available only for recurring plans. Set to 0 to remove free trial. */
|
2813
|
+
freeTrialDays?: number | null;
|
2814
|
+
}
|
2815
|
+
/** @oneof */
|
2816
|
+
interface PricingPricingModelOneOf$1 {
|
2817
|
+
/** Plan has recurring payments. */
|
2818
|
+
subscription?: Recurrence$1;
|
2819
|
+
/** One time payment, plan is valid for the specified duration. */
|
2820
|
+
singlePaymentForDuration?: Duration$1;
|
2821
|
+
/** One time payment, plan is valid until it is canceled. */
|
2822
|
+
singlePaymentUnlimited?: boolean | null;
|
2823
|
+
}
|
2824
|
+
/** An object specifying how often and for how long payments recur (may be forever). */
|
2825
|
+
interface Recurrence$1 {
|
2826
|
+
/** Length of one payment cycle. */
|
2827
|
+
cycleDuration?: Duration$1;
|
2828
|
+
/**
|
2829
|
+
* Amount of payment cycles this subscription is valid for.
|
2830
|
+
*
|
2831
|
+
* `0` for unlimited or until-canceled.
|
2832
|
+
*/
|
2833
|
+
cycleCount?: number | null;
|
2834
|
+
}
|
2835
|
+
/** A duration expressed in number of time units. */
|
2836
|
+
interface Duration$1 {
|
2837
|
+
/**
|
2838
|
+
* The amount of a duration `unit` in a single payment cycle.
|
2839
|
+
*
|
2840
|
+
* Currently limited to support only `1`.
|
2841
|
+
*/
|
2842
|
+
count?: number | null;
|
2843
|
+
/** Unit of time for the cycle duration. */
|
2844
|
+
unit?: PeriodUnit$1;
|
2845
|
+
}
|
2846
|
+
declare enum PeriodUnit$1 {
|
2847
|
+
UNDEFINED = "UNDEFINED",
|
2848
|
+
DAY = "DAY",
|
2849
|
+
WEEK = "WEEK",
|
2850
|
+
MONTH = "MONTH",
|
2851
|
+
YEAR = "YEAR"
|
2852
|
+
}
|
2853
|
+
interface Money$1 {
|
2854
|
+
/** Monetary amount. Decimal string with a period as a decimal separator (e.g., 3.99). */
|
2855
|
+
value?: string;
|
2856
|
+
/** Currency code. Must be valid ISO 4217 currency code (e.g., USD). */
|
2857
|
+
currency?: string;
|
2858
|
+
}
|
2859
|
+
declare enum AppliedAt {
|
2860
|
+
UNKNOWN_CHARGE_EVENT = "UNKNOWN_CHARGE_EVENT",
|
2861
|
+
/** Will charge the fee on first payment. If order has a free trial meaning it will charge after the free trial. */
|
2862
|
+
FIRST_PAYMENT = "FIRST_PAYMENT"
|
2863
|
+
}
|
2864
|
+
interface ListPublicPlansRequest$1 {
|
2865
|
+
/** Number of items to list. Defaults to 75. See [Pagination](https://dev.wix.com/api/rest/getting-started/pagination). */
|
2866
|
+
limit?: number | null;
|
2867
|
+
/** Number of items to skip. Defaults to 0. See [Pagination](https://dev.wix.com/api/rest/getting-started/pagination). */
|
2868
|
+
offset?: number | null;
|
2869
|
+
/** IDs of plans to list. Non-existent IDs will be ignored and won't cause errors. You can pass a maximum of 100 IDs. */
|
2870
|
+
planIds?: string[];
|
2871
|
+
}
|
2872
|
+
interface ListPublicPlansResponse$1 {
|
2873
|
+
/** List of public pricing plans. */
|
2874
|
+
plans?: PublicPlan$1[];
|
2875
|
+
/** Object containing paging-related data (number of plans returned, offset). */
|
2876
|
+
pagingMetadata?: PagingMetadataV2$1;
|
2877
|
+
}
|
2878
|
+
/** Public plan entity containing information about the pricing plan. Can be read by any site member or visitor. */
|
2879
|
+
interface PublicPlan$1 {
|
2880
|
+
/** Plan ID. */
|
2881
|
+
id?: string;
|
2882
|
+
/** Plan name. */
|
2883
|
+
name?: string | null;
|
2884
|
+
/** Plan description. */
|
2885
|
+
description?: string | null;
|
2886
|
+
/** What is included with this plan (e.g., 1 weekly entrance to a specific class). */
|
2887
|
+
perks?: StringList$1;
|
2888
|
+
/** Plan price, payment schedule, and expiration. */
|
2889
|
+
pricing?: Pricing$1;
|
2890
|
+
/** Whether the plan is marked as primary. */
|
2891
|
+
primary?: boolean;
|
2892
|
+
/** Date plan was created. */
|
2893
|
+
createdDate?: Date;
|
2894
|
+
/** Date plan was last updated. */
|
2895
|
+
updatedDate?: Date;
|
2896
|
+
/** URL-friendly version of plan name. Unique across all plans in the same site. */
|
2897
|
+
slug?: string | null;
|
2898
|
+
/** Number of times the same buyer can purchase the plan. An empty value or a value of zero means no limitation. */
|
2899
|
+
maxPurchasesPerBuyer?: number | null;
|
2900
|
+
/** Whether the buyer can start the plan at a later date. Defaults to false. */
|
2901
|
+
allowFutureStartDate?: boolean | null;
|
2902
|
+
/** Whether the buyer is allowed to cancel their plan. Defaults to false. */
|
2903
|
+
buyerCanCancel?: boolean | null;
|
2904
|
+
/** Any terms and conditions that apply to the plan. This information will be displayed during checkout. */
|
2905
|
+
termsAndConditions?: string | null;
|
2906
|
+
/**
|
2907
|
+
* ID of the form associated with the plan at checkout.
|
2908
|
+
*
|
2909
|
+
* Learn more about [forms](https://support.wix.com/en/article/wix-forms-an-overview).
|
2910
|
+
*/
|
2911
|
+
formId?: string | null;
|
2912
|
+
}
|
2913
|
+
interface PagingMetadataV2$1 {
|
2914
|
+
/** Number of items returned in the response. */
|
2915
|
+
count?: number | null;
|
2916
|
+
/** Offset that was requested. */
|
2917
|
+
offset?: number | null;
|
2918
|
+
/** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
|
2919
|
+
total?: number | null;
|
2920
|
+
/** Flag that indicates the server failed to calculate the `total` field. */
|
2921
|
+
tooManyToCount?: boolean | null;
|
2922
|
+
/** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
|
2923
|
+
cursors?: Cursors$1;
|
2924
|
+
}
|
2925
|
+
interface Cursors$1 {
|
2926
|
+
/** Cursor string pointing to the next page in the list of results. */
|
2927
|
+
next?: string | null;
|
2928
|
+
/** Cursor pointing to the previous page in the list of results. */
|
2929
|
+
prev?: string | null;
|
2930
|
+
}
|
2931
|
+
interface QueryPublicPlansRequest$1 {
|
2932
|
+
query?: QueryV2$1;
|
2933
|
+
}
|
2934
|
+
interface QueryV2$1 {
|
2935
|
+
/** A filter object. See [supported fields and operators](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/plans/filter-and-sort#wix-pricing-plans_pricing-plans_plans_filter-and-sort_query-public-plans) */
|
2936
|
+
filter?: Record<string, any> | null;
|
2937
|
+
/** Sort object in the form [{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}] */
|
2938
|
+
sort?: Sorting$1[];
|
2939
|
+
/** Pointer to page of results using offset. Can not be used together with 'cursorPaging' */
|
2940
|
+
paging?: Paging$1;
|
2941
|
+
}
|
2942
|
+
interface Sorting$1 {
|
2943
|
+
/** Name of the field to sort by. */
|
2944
|
+
fieldName?: string;
|
2945
|
+
/** Sort order. */
|
2946
|
+
order?: SortOrder$1;
|
2947
|
+
}
|
2948
|
+
declare enum SortOrder$1 {
|
2949
|
+
ASC = "ASC",
|
2950
|
+
DESC = "DESC"
|
2951
|
+
}
|
2952
|
+
interface Paging$1 {
|
2953
|
+
/** Number of items to load. */
|
2954
|
+
limit?: number | null;
|
2955
|
+
/** Number of items to skip in the current sort order. */
|
2956
|
+
offset?: number | null;
|
2957
|
+
}
|
2958
|
+
interface QueryPublicPlansResponse$1 {
|
2959
|
+
/** List of public pricing plans that match the specified query. */
|
2960
|
+
plans?: PublicPlan$1[];
|
2961
|
+
/** Object containing paging-related data (number of plans returned, offset). */
|
2962
|
+
pagingMetadata?: PagingMetadataV2$1;
|
2963
|
+
}
|
2964
|
+
interface GetPlanRequest$1 {
|
2965
|
+
/** Plan ID. */
|
2966
|
+
id: string;
|
2967
|
+
}
|
2968
|
+
interface GetPlanResponse$1 {
|
2969
|
+
/** Pricing plan. */
|
2970
|
+
plan?: Plan$1;
|
2971
|
+
}
|
2972
|
+
interface ListPlansRequest$1 {
|
2973
|
+
/** Archived filter. Defaults to ACTIVE (not archived) only. */
|
2974
|
+
archived?: ArchivedFilter$1;
|
2975
|
+
/** Visibility filter. Defaults to PUBLIC_AND_HIDDEN (meaning, both are listed). */
|
2976
|
+
public?: PublicFilter$1;
|
2977
|
+
/** Number of pricing plans to list. Defaults to 75. */
|
2978
|
+
limit?: number | null;
|
2979
|
+
/** Number of pricing plans to skip. Defaults to 0. */
|
2980
|
+
offset?: number | null;
|
2981
|
+
/** Plan ID filter. Non-existent IDs are ignored, and won't cause errors. You can pass a maximum of 100 IDs. */
|
2982
|
+
planIds?: string[];
|
2983
|
+
}
|
2984
|
+
declare enum ArchivedFilter$1 {
|
2985
|
+
/** Returns all plans that are active. */
|
2986
|
+
ACTIVE = "ACTIVE",
|
2987
|
+
/** Returns all plans that are archived. */
|
2988
|
+
ARCHIVED = "ARCHIVED",
|
2989
|
+
/** Returns all plans that are active and archived. */
|
2990
|
+
ARCHIVED_AND_ACTIVE = "ARCHIVED_AND_ACTIVE"
|
2991
|
+
}
|
2992
|
+
declare enum PublicFilter$1 {
|
2993
|
+
/** Returns all public and hidden plans. */
|
2994
|
+
PUBLIC_AND_HIDDEN = "PUBLIC_AND_HIDDEN",
|
2995
|
+
/** Returns only public plans. */
|
2996
|
+
PUBLIC = "PUBLIC",
|
2997
|
+
/** Returns only hidden plans. */
|
2998
|
+
HIDDEN = "HIDDEN"
|
2999
|
+
}
|
3000
|
+
interface ListPlansResponse$1 {
|
3001
|
+
/** List of all public and hidden pricing plans. */
|
3002
|
+
plans?: Plan$1[];
|
3003
|
+
/** Object containing paging-related data (number of plans returned, offset). */
|
3004
|
+
pagingMetadata?: PagingMetadataV2$1;
|
3005
|
+
}
|
3006
|
+
interface GetPlanStatsRequest$1 {
|
3007
|
+
}
|
3008
|
+
interface GetPlanStatsResponse$1 {
|
3009
|
+
/** Total number of plans created, including active plans (both public and hidden) and archived plans. */
|
3010
|
+
totalPlans?: number;
|
3011
|
+
}
|
3012
|
+
interface CreatePlanRequest$1 {
|
3013
|
+
plan: Plan$1;
|
3014
|
+
}
|
3015
|
+
interface CreatePlanResponse$1 {
|
3016
|
+
plan?: Plan$1;
|
3017
|
+
}
|
3018
|
+
interface UpdatePlanRequest$1 {
|
3019
|
+
plan: Plan$1;
|
3020
|
+
}
|
3021
|
+
interface UpdatePlanResponse$1 {
|
3022
|
+
plan?: Plan$1;
|
3023
|
+
}
|
3024
|
+
interface SetPlanVisibilityRequest$1 {
|
3025
|
+
id: string;
|
3026
|
+
visible: boolean;
|
3027
|
+
}
|
3028
|
+
interface SetPlanVisibilityResponse$1 {
|
3029
|
+
plan?: Plan$1;
|
3030
|
+
}
|
3031
|
+
interface MakePlanPrimaryRequest$1 {
|
3032
|
+
id: string;
|
3033
|
+
}
|
3034
|
+
interface MakePlanPrimaryResponse$1 {
|
3035
|
+
plan?: Plan$1;
|
3036
|
+
}
|
3037
|
+
interface ClearPrimaryRequest$1 {
|
3038
|
+
}
|
3039
|
+
interface ClearPrimaryResponse$1 {
|
3040
|
+
}
|
3041
|
+
interface ArchivePlanRequest$1 {
|
3042
|
+
id: string;
|
3043
|
+
}
|
3044
|
+
interface ArchivePlanResponse$1 {
|
3045
|
+
plan?: Plan$1;
|
3046
|
+
}
|
3047
|
+
interface ArrangePlansRequest$1 {
|
3048
|
+
ids: string[];
|
3049
|
+
}
|
3050
|
+
interface ArrangePlansResponse$1 {
|
3051
|
+
}
|
3052
|
+
interface ListPublicPlansResponseNonNullableFields$1 {
|
3053
|
+
plans: {
|
3054
|
+
id: string;
|
3055
|
+
perks?: {
|
3056
|
+
values: string[];
|
3057
|
+
};
|
3058
|
+
pricing?: {
|
3059
|
+
subscription?: {
|
3060
|
+
cycleDuration?: {
|
3061
|
+
unit: PeriodUnit$1;
|
3062
|
+
};
|
3063
|
+
};
|
3064
|
+
singlePaymentForDuration?: {
|
3065
|
+
unit: PeriodUnit$1;
|
3066
|
+
};
|
3067
|
+
price?: {
|
3068
|
+
value: string;
|
3069
|
+
currency: string;
|
3070
|
+
};
|
3071
|
+
feeConfigs: {
|
3072
|
+
fee?: {
|
3073
|
+
name: string;
|
3074
|
+
amount: string;
|
3075
|
+
};
|
3076
|
+
appliedAt: AppliedAt;
|
3077
|
+
}[];
|
3078
|
+
};
|
3079
|
+
primary: boolean;
|
3080
|
+
}[];
|
3081
|
+
}
|
3082
|
+
interface QueryPublicPlansResponseNonNullableFields$1 {
|
3083
|
+
plans: {
|
3084
|
+
id: string;
|
3085
|
+
perks?: {
|
3086
|
+
values: string[];
|
3087
|
+
};
|
3088
|
+
pricing?: {
|
3089
|
+
subscription?: {
|
3090
|
+
cycleDuration?: {
|
3091
|
+
unit: PeriodUnit$1;
|
3092
|
+
};
|
3093
|
+
};
|
3094
|
+
singlePaymentForDuration?: {
|
3095
|
+
unit: PeriodUnit$1;
|
3096
|
+
};
|
3097
|
+
price?: {
|
3098
|
+
value: string;
|
3099
|
+
currency: string;
|
3100
|
+
};
|
3101
|
+
feeConfigs: {
|
3102
|
+
fee?: {
|
3103
|
+
name: string;
|
3104
|
+
amount: string;
|
3105
|
+
};
|
3106
|
+
appliedAt: AppliedAt;
|
3107
|
+
}[];
|
3108
|
+
};
|
3109
|
+
primary: boolean;
|
3110
|
+
}[];
|
3111
|
+
}
|
3112
|
+
interface GetPlanResponseNonNullableFields$1 {
|
3113
|
+
plan?: {
|
3114
|
+
id: string;
|
3115
|
+
perks?: {
|
3116
|
+
values: string[];
|
3117
|
+
};
|
3118
|
+
pricing?: {
|
3119
|
+
subscription?: {
|
3120
|
+
cycleDuration?: {
|
3121
|
+
unit: PeriodUnit$1;
|
3122
|
+
};
|
3123
|
+
};
|
3124
|
+
singlePaymentForDuration?: {
|
3125
|
+
unit: PeriodUnit$1;
|
3126
|
+
};
|
3127
|
+
price?: {
|
3128
|
+
value: string;
|
3129
|
+
currency: string;
|
3130
|
+
};
|
3131
|
+
feeConfigs: {
|
3132
|
+
fee?: {
|
3133
|
+
name: string;
|
3134
|
+
amount: string;
|
3135
|
+
};
|
3136
|
+
appliedAt: AppliedAt;
|
3137
|
+
}[];
|
3138
|
+
};
|
3139
|
+
archived: boolean;
|
3140
|
+
primary: boolean;
|
3141
|
+
hasOrders: boolean;
|
3142
|
+
};
|
3143
|
+
}
|
3144
|
+
interface ListPlansResponseNonNullableFields$1 {
|
3145
|
+
plans: {
|
3146
|
+
id: string;
|
3147
|
+
perks?: {
|
3148
|
+
values: string[];
|
3149
|
+
};
|
3150
|
+
pricing?: {
|
3151
|
+
subscription?: {
|
3152
|
+
cycleDuration?: {
|
3153
|
+
unit: PeriodUnit$1;
|
3154
|
+
};
|
3155
|
+
};
|
3156
|
+
singlePaymentForDuration?: {
|
3157
|
+
unit: PeriodUnit$1;
|
3158
|
+
};
|
3159
|
+
price?: {
|
3160
|
+
value: string;
|
3161
|
+
currency: string;
|
3162
|
+
};
|
3163
|
+
feeConfigs: {
|
3164
|
+
fee?: {
|
3165
|
+
name: string;
|
3166
|
+
amount: string;
|
3167
|
+
};
|
3168
|
+
appliedAt: AppliedAt;
|
3169
|
+
}[];
|
3170
|
+
};
|
3171
|
+
archived: boolean;
|
3172
|
+
primary: boolean;
|
3173
|
+
hasOrders: boolean;
|
3174
|
+
}[];
|
3175
|
+
}
|
3176
|
+
interface GetPlanStatsResponseNonNullableFields$1 {
|
3177
|
+
totalPlans: number;
|
3178
|
+
}
|
3179
|
+
interface CreatePlanResponseNonNullableFields$1 {
|
3180
|
+
plan?: {
|
3181
|
+
id: string;
|
3182
|
+
perks?: {
|
3183
|
+
values: string[];
|
3184
|
+
};
|
3185
|
+
pricing?: {
|
3186
|
+
subscription?: {
|
3187
|
+
cycleDuration?: {
|
3188
|
+
unit: PeriodUnit$1;
|
3189
|
+
};
|
3190
|
+
};
|
3191
|
+
singlePaymentForDuration?: {
|
3192
|
+
unit: PeriodUnit$1;
|
3193
|
+
};
|
3194
|
+
price?: {
|
3195
|
+
value: string;
|
3196
|
+
currency: string;
|
3197
|
+
};
|
3198
|
+
feeConfigs: {
|
3199
|
+
fee?: {
|
3200
|
+
name: string;
|
3201
|
+
amount: string;
|
3202
|
+
};
|
3203
|
+
appliedAt: AppliedAt;
|
3204
|
+
}[];
|
3205
|
+
};
|
3206
|
+
archived: boolean;
|
3207
|
+
primary: boolean;
|
3208
|
+
hasOrders: boolean;
|
3209
|
+
};
|
3210
|
+
}
|
3211
|
+
interface UpdatePlanResponseNonNullableFields$1 {
|
3212
|
+
plan?: {
|
3213
|
+
id: string;
|
3214
|
+
perks?: {
|
3215
|
+
values: string[];
|
3216
|
+
};
|
3217
|
+
pricing?: {
|
3218
|
+
subscription?: {
|
3219
|
+
cycleDuration?: {
|
3220
|
+
unit: PeriodUnit$1;
|
3221
|
+
};
|
3222
|
+
};
|
3223
|
+
singlePaymentForDuration?: {
|
3224
|
+
unit: PeriodUnit$1;
|
3225
|
+
};
|
3226
|
+
price?: {
|
3227
|
+
value: string;
|
3228
|
+
currency: string;
|
3229
|
+
};
|
3230
|
+
feeConfigs: {
|
3231
|
+
fee?: {
|
3232
|
+
name: string;
|
3233
|
+
amount: string;
|
3234
|
+
};
|
3235
|
+
appliedAt: AppliedAt;
|
3236
|
+
}[];
|
3237
|
+
};
|
3238
|
+
archived: boolean;
|
3239
|
+
primary: boolean;
|
3240
|
+
hasOrders: boolean;
|
3241
|
+
};
|
3242
|
+
}
|
3243
|
+
interface SetPlanVisibilityResponseNonNullableFields$1 {
|
3244
|
+
plan?: {
|
3245
|
+
id: string;
|
3246
|
+
perks?: {
|
3247
|
+
values: string[];
|
3248
|
+
};
|
3249
|
+
pricing?: {
|
3250
|
+
subscription?: {
|
3251
|
+
cycleDuration?: {
|
3252
|
+
unit: PeriodUnit$1;
|
3253
|
+
};
|
3254
|
+
};
|
3255
|
+
singlePaymentForDuration?: {
|
3256
|
+
unit: PeriodUnit$1;
|
3257
|
+
};
|
3258
|
+
price?: {
|
3259
|
+
value: string;
|
3260
|
+
currency: string;
|
3261
|
+
};
|
3262
|
+
feeConfigs: {
|
3263
|
+
fee?: {
|
3264
|
+
name: string;
|
3265
|
+
amount: string;
|
3266
|
+
};
|
3267
|
+
appliedAt: AppliedAt;
|
3268
|
+
}[];
|
3269
|
+
};
|
3270
|
+
archived: boolean;
|
3271
|
+
primary: boolean;
|
3272
|
+
hasOrders: boolean;
|
3273
|
+
};
|
3274
|
+
}
|
3275
|
+
interface MakePlanPrimaryResponseNonNullableFields$1 {
|
3276
|
+
plan?: {
|
3277
|
+
id: string;
|
3278
|
+
perks?: {
|
3279
|
+
values: string[];
|
3280
|
+
};
|
3281
|
+
pricing?: {
|
3282
|
+
subscription?: {
|
3283
|
+
cycleDuration?: {
|
3284
|
+
unit: PeriodUnit$1;
|
3285
|
+
};
|
3286
|
+
};
|
3287
|
+
singlePaymentForDuration?: {
|
3288
|
+
unit: PeriodUnit$1;
|
3289
|
+
};
|
3290
|
+
price?: {
|
3291
|
+
value: string;
|
3292
|
+
currency: string;
|
3293
|
+
};
|
3294
|
+
feeConfigs: {
|
3295
|
+
fee?: {
|
3296
|
+
name: string;
|
3297
|
+
amount: string;
|
3298
|
+
};
|
3299
|
+
appliedAt: AppliedAt;
|
3300
|
+
}[];
|
3301
|
+
};
|
3302
|
+
archived: boolean;
|
3303
|
+
primary: boolean;
|
3304
|
+
hasOrders: boolean;
|
3305
|
+
};
|
3306
|
+
}
|
3307
|
+
interface ArchivePlanResponseNonNullableFields$1 {
|
3308
|
+
plan?: {
|
3309
|
+
id: string;
|
3310
|
+
perks?: {
|
3311
|
+
values: string[];
|
3312
|
+
};
|
3313
|
+
pricing?: {
|
3314
|
+
subscription?: {
|
3315
|
+
cycleDuration?: {
|
3316
|
+
unit: PeriodUnit$1;
|
3317
|
+
};
|
3318
|
+
};
|
3319
|
+
singlePaymentForDuration?: {
|
3320
|
+
unit: PeriodUnit$1;
|
3321
|
+
};
|
3322
|
+
price?: {
|
3323
|
+
value: string;
|
3324
|
+
currency: string;
|
3325
|
+
};
|
3326
|
+
feeConfigs: {
|
3327
|
+
fee?: {
|
3328
|
+
name: string;
|
3329
|
+
amount: string;
|
3330
|
+
};
|
3331
|
+
appliedAt: AppliedAt;
|
3332
|
+
}[];
|
3333
|
+
};
|
3334
|
+
archived: boolean;
|
3335
|
+
primary: boolean;
|
3336
|
+
hasOrders: boolean;
|
3337
|
+
};
|
3338
|
+
}
|
3339
|
+
|
3340
|
+
/** Information about the pricing plan. */
|
3341
|
+
interface Plan {
|
3342
|
+
/**
|
3343
|
+
* Plan ID.
|
3344
|
+
* @readonly
|
3345
|
+
*/
|
3346
|
+
_id?: string;
|
3347
|
+
/** Plan name. */
|
3348
|
+
name?: string | null;
|
3349
|
+
/** Plan description. */
|
3350
|
+
description?: string | null;
|
3351
|
+
/**
|
3352
|
+
* List of text strings that promote what is included with this plan.
|
3353
|
+
*
|
3354
|
+
* For example, "Plenty of parking" or "Free gift on your birthday".
|
3355
|
+
*/
|
3356
|
+
perks?: StringList;
|
3357
|
+
/** Plan price, payment schedule, and expiration. */
|
3358
|
+
pricing?: Pricing;
|
3359
|
+
/** Whether the plan is public (visible to site visitors and members). */
|
3360
|
+
public?: boolean | null;
|
3361
|
+
/**
|
3362
|
+
* Whether the plan is archived. Archived plans are not visible and can't be purchased anymore, but existing purchases remain in effect.
|
3363
|
+
* @readonly
|
3364
|
+
*/
|
3365
|
+
archived?: boolean;
|
3366
|
+
/**
|
3367
|
+
* Whether the plan is marked as primary. If `true`, the plan is highlighted on the site with a custom ribbon.
|
3368
|
+
*
|
3369
|
+
* Default: `false`.
|
3370
|
+
* @readonly
|
3371
|
+
*/
|
3372
|
+
primary?: boolean;
|
3373
|
+
/**
|
3374
|
+
* Whether the plan has any orders (including pending and unpaid orders).
|
3375
|
+
* @readonly
|
3376
|
+
*/
|
3377
|
+
hasOrders?: boolean;
|
3378
|
+
/**
|
3379
|
+
* Date plan was created.
|
3380
|
+
* @readonly
|
3381
|
+
*/
|
3382
|
+
_createdDate?: Date;
|
3383
|
+
/**
|
3384
|
+
* Date plan was last updated.
|
3385
|
+
* @readonly
|
3386
|
+
*/
|
3387
|
+
_updatedDate?: Date;
|
3388
|
+
/**
|
3389
|
+
* URL-friendly version of plan name. Unique across all plans in the same site.
|
3390
|
+
* @readonly
|
3391
|
+
*/
|
3392
|
+
slug?: string | null;
|
3393
|
+
/**
|
3394
|
+
* Number of times the same buyer can purchase the plan. Currently limited to support:
|
3395
|
+
* - Empty value or a value of `0`, meaning no limitation.
|
3396
|
+
* - Value of `1`, meaning limited to one purchase per buyer.
|
3397
|
+
*/
|
3398
|
+
maxPurchasesPerBuyer?: number | null;
|
3399
|
+
/**
|
3400
|
+
* Whether the buyer can start the plan at a later date.
|
3401
|
+
*
|
3402
|
+
* Default: `false`.
|
3403
|
+
*
|
3404
|
+
*/
|
3405
|
+
allowFutureStartDate?: boolean | null;
|
3406
|
+
/**
|
3407
|
+
* Whether the buyer is allowed to cancel their plan. If `false`, calling the [`requestCancellation()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/orders/requestcancellation) function returns an error.
|
3408
|
+
*
|
3409
|
+
* Default: `true`.
|
3410
|
+
*
|
3411
|
+
*/
|
3412
|
+
buyerCanCancel?: boolean | null;
|
3413
|
+
/** Any terms and conditions that apply to the plan. This information will be displayed during checkout. */
|
3414
|
+
termsAndConditions?: string | null;
|
3415
|
+
/** ID of the form associated with the plan at checkout. */
|
3416
|
+
formId?: string | null;
|
3417
|
+
}
|
3418
|
+
/** This wrapper type exist in order to distinguish an empty string list from no list at all in update requests. */
|
3419
|
+
interface StringList {
|
3420
|
+
/** List of strings */
|
3421
|
+
values?: string[];
|
3422
|
+
}
|
3423
|
+
/** Plan pricing information. Includes the price of the plan and payment details. */
|
3424
|
+
interface Pricing extends PricingPricingModelOneOf {
|
3425
|
+
/**
|
3426
|
+
* Pricing model indicating that the plan has recurring payments.
|
3427
|
+
*
|
3428
|
+
* Note: This type of subscription is not a "Wix subscription," which encompasses various types of subscriptions, such as Wix Stores subscriptions, Wix invoice subscriptions, and *all* pricing plan models.
|
3429
|
+
*/
|
3430
|
+
subscription?: Recurrence;
|
3431
|
+
/** Pricing model indicating a single payment per cycle and the length of the cycle. The cycle is the duration of the plan, not a payment cycle. */
|
3432
|
+
singlePaymentForDuration?: Duration;
|
3433
|
+
/** Pricing model indicating the plan is paid in one single payment. The plan is valid until canceled. */
|
3434
|
+
singlePaymentUnlimited?: boolean | null;
|
3435
|
+
/** Amount for a single payment. For subscriptions, this is the amount to pay each payment cycle and it is required. For plans that are not recurring plans, it is the single payment amount for the whole subscription. */
|
3436
|
+
price?: Money;
|
3437
|
+
/** Free trial period for the plan in days. Available only for recurring plans, meaning plans whose pricing model is `subscription`. Set to `0` to remove the free trial. */
|
3438
|
+
freeTrialDays?: number | null;
|
3439
|
+
}
|
3440
|
+
/** @oneof */
|
3441
|
+
interface PricingPricingModelOneOf {
|
3442
|
+
/** Plan has recurring payments. */
|
3443
|
+
subscription?: Recurrence;
|
3444
|
+
/** One time payment, plan is valid for the specified duration. */
|
3445
|
+
singlePaymentForDuration?: Duration;
|
3446
|
+
/** One time payment, plan is valid until it is canceled. */
|
3447
|
+
singlePaymentUnlimited?: boolean | null;
|
3448
|
+
}
|
3449
|
+
/** An object specifying how often and for how long payments recur (may be forever). */
|
3450
|
+
interface Recurrence {
|
3451
|
+
/** Length of one payment cycle. For example, 1 month to have monthly payments. Multiply `cycleDuration`'s `count` by `cycleCount` to get the subscription duration. Currently, only a value of `1` is supported. */
|
3452
|
+
cycleDuration?: Duration;
|
3453
|
+
/**
|
3454
|
+
* Amount of payment cycles the subscription is valid for.
|
3455
|
+
*
|
3456
|
+
* `0` for unlimited plans or for plans that are valid until canceled.
|
3457
|
+
*/
|
3458
|
+
cycleCount?: number | null;
|
3459
|
+
}
|
3460
|
+
/** A duration expressed in number of time units. */
|
3461
|
+
interface Duration {
|
3462
|
+
/** Number of days days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`. */
|
3463
|
+
count?: number | null;
|
3464
|
+
/** Unit of time for the cycle duration. */
|
3465
|
+
unit?: PeriodUnit;
|
3466
|
+
}
|
3467
|
+
declare enum PeriodUnit {
|
3468
|
+
UNDEFINED = "UNDEFINED",
|
3469
|
+
DAY = "DAY",
|
3470
|
+
WEEK = "WEEK",
|
3471
|
+
MONTH = "MONTH",
|
3472
|
+
YEAR = "YEAR"
|
3473
|
+
}
|
3474
|
+
interface Money {
|
3475
|
+
/** Monetary amount. Decimal string with a period as a decimal separator. For example, `'3.99'`. Cannot be a negative value. */
|
3476
|
+
value?: string;
|
3477
|
+
/**
|
3478
|
+
* Currency code. Three-letter currency code in
|
3479
|
+
* [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. For example, `'USD'`.
|
3480
|
+
*/
|
3481
|
+
currency?: string;
|
3482
|
+
}
|
3483
|
+
interface ListPublicPlansRequest {
|
3484
|
+
/**
|
3485
|
+
* Number of pricing plans to list.
|
3486
|
+
*
|
3487
|
+
* Default: `75`.
|
3488
|
+
*/
|
3489
|
+
limit?: number | null;
|
3490
|
+
/**
|
3491
|
+
* Number of pricing plans to skip.
|
3492
|
+
*
|
3493
|
+
* Default: `0`.
|
3494
|
+
*/
|
3495
|
+
offset?: number | null;
|
3496
|
+
/** IDs of public plans to list. If non-existent IDs are specified, they are ignored and don't cause errors. If no IDs are specified, all public are listed according to the [order](#arrangeplans) displayed in the Dashboard. You can pass a maximum of 100 IDs. */
|
3497
|
+
planIds?: string[];
|
3498
|
+
}
|
3499
|
+
interface ListPublicPlansResponse {
|
3500
|
+
/** List of public pricing plans. */
|
3501
|
+
plans?: PublicPlan[];
|
3502
|
+
/** Details on the paged set of public pricing plans returned. */
|
3503
|
+
pagingMetadata?: PagingMetadataV2;
|
3504
|
+
}
|
3505
|
+
/** Public plan entity containing information about the pricing plan. Can be read by any site member or visitor. */
|
3506
|
+
interface PublicPlan {
|
3507
|
+
/** Plan ID. */
|
3508
|
+
_id?: string;
|
3509
|
+
/** Plan name. */
|
3510
|
+
name?: string | null;
|
3511
|
+
/** Plan description. */
|
3512
|
+
description?: string | null;
|
3513
|
+
/** What is included with this plan (e.g., 1 weekly entrance to a specific class). */
|
3514
|
+
perks?: StringList;
|
3515
|
+
/** Plan price, payment schedule, and expiration. */
|
3516
|
+
pricing?: Pricing;
|
3517
|
+
/** Whether the plan is marked as primary. */
|
3518
|
+
primary?: boolean;
|
3519
|
+
/** Date plan was created. */
|
3520
|
+
_createdDate?: Date;
|
3521
|
+
/** Date plan was last updated. */
|
3522
|
+
_updatedDate?: Date;
|
3523
|
+
/** URL-friendly version of plan name. Unique across all plans in the same site. */
|
3524
|
+
slug?: string | null;
|
3525
|
+
/** Number of times the same buyer can purchase the plan. An empty value or a value of zero means no limitation. */
|
3526
|
+
maxPurchasesPerBuyer?: number | null;
|
3527
|
+
/** Whether the buyer can start the plan at a later date. Defaults to false. */
|
3528
|
+
allowFutureStartDate?: boolean | null;
|
3529
|
+
/** Whether the buyer is allowed to cancel their plan. Defaults to false. */
|
3530
|
+
buyerCanCancel?: boolean | null;
|
3531
|
+
/** Any terms and conditions that apply to the plan. This information will be displayed during checkout. */
|
3532
|
+
termsAndConditions?: string | null;
|
3533
|
+
/** ID of the form associated with the plan at checkout. */
|
3534
|
+
formId?: string | null;
|
3535
|
+
}
|
3536
|
+
interface PagingMetadataV2 {
|
3537
|
+
/** Number of items returned in the response. */
|
3538
|
+
count?: number | null;
|
3539
|
+
/** Offset that was requested. */
|
3540
|
+
offset?: number | null;
|
3541
|
+
/** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
|
3542
|
+
total?: number | null;
|
3543
|
+
/** Flag that indicates the server failed to calculate the `total` field. */
|
3544
|
+
tooManyToCount?: boolean | null;
|
3545
|
+
/** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
|
3546
|
+
cursors?: Cursors;
|
3547
|
+
}
|
3548
|
+
interface Cursors {
|
3549
|
+
/** Cursor string pointing to the next page in the list of results. */
|
3550
|
+
next?: string | null;
|
3551
|
+
/** Cursor pointing to the previous page in the list of results. */
|
3552
|
+
prev?: string | null;
|
3553
|
+
}
|
3554
|
+
interface QueryPublicPlansRequest {
|
3555
|
+
query?: QueryV2;
|
3556
|
+
}
|
3557
|
+
interface QueryV2 {
|
3558
|
+
/** A filter object. See [supported fields and operators](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/plans/filter-and-sort#wix-pricing-plans_pricing-plans_plans_filter-and-sort_query-public-plans) */
|
3559
|
+
filter?: Record<string, any> | null;
|
3560
|
+
/** Sort object in the form [{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}] */
|
3561
|
+
sort?: Sorting[];
|
3562
|
+
/** Pointer to page of results using offset. Can not be used together with 'cursorPaging' */
|
3563
|
+
paging?: Paging;
|
3564
|
+
}
|
3565
|
+
interface Sorting {
|
3566
|
+
/** Name of the field to sort by. */
|
3567
|
+
fieldName?: string;
|
3568
|
+
/** Sort order. */
|
3569
|
+
order?: SortOrder;
|
3570
|
+
}
|
3571
|
+
declare enum SortOrder {
|
3572
|
+
ASC = "ASC",
|
3573
|
+
DESC = "DESC"
|
3574
|
+
}
|
3575
|
+
interface Paging {
|
3576
|
+
/** Number of items to load. */
|
3577
|
+
limit?: number | null;
|
3578
|
+
/** Number of items to skip in the current sort order. */
|
3579
|
+
offset?: number | null;
|
3580
|
+
}
|
3581
|
+
interface QueryPublicPlansResponse {
|
3582
|
+
/** List of public pricing plans that match the specified query. */
|
3583
|
+
plans?: PublicPlan[];
|
3584
|
+
/** Object containing paging-related data (number of plans returned, offset). */
|
3585
|
+
pagingMetadata?: PagingMetadataV2;
|
3586
|
+
}
|
3587
|
+
interface GetPlanRequest {
|
3588
|
+
/** Plan ID. */
|
3589
|
+
_id: string;
|
3590
|
+
}
|
3591
|
+
interface GetPlanResponse {
|
3592
|
+
/** Pricing plan info. */
|
3593
|
+
plan?: Plan;
|
3594
|
+
}
|
3595
|
+
interface ListPlansRequest {
|
3596
|
+
/**
|
3597
|
+
* Archived filter.
|
3598
|
+
*
|
3599
|
+
* Default: `ACTIVE` (not archived).
|
3600
|
+
*/
|
3601
|
+
archived?: ArchivedFilter;
|
3602
|
+
/**
|
3603
|
+
* Visibility filter.
|
3604
|
+
*
|
3605
|
+
* Default: `PUBLIC_AND_HIDDEN` (meaning, both public and hidden plans are listed).
|
3606
|
+
*
|
3607
|
+
*/
|
3608
|
+
public?: PublicFilter;
|
3609
|
+
/**
|
3610
|
+
* Number of pricing plans to list.
|
3611
|
+
*
|
3612
|
+
* Default: `75`.
|
3613
|
+
*/
|
3614
|
+
limit?: number | null;
|
3615
|
+
/**
|
3616
|
+
* Number of pricing plans to skip.
|
3617
|
+
*
|
3618
|
+
* Default: `0`.
|
3619
|
+
*/
|
3620
|
+
offset?: number | null;
|
3621
|
+
/** IDs of plans to list. If non-existent IDs are specified, they are ignored and don't cause errors. If no IDs are specified, all public and hidden plans (based on `options`) are listed according to the [order](#arrangeplans) displayed in the Dashboard. You can pass a maximum of 100 IDs. */
|
3622
|
+
planIds?: string[];
|
3623
|
+
}
|
3624
|
+
declare enum ArchivedFilter {
|
3625
|
+
/** Returns all plans that are active. */
|
3626
|
+
ACTIVE = "ACTIVE",
|
3627
|
+
/** Returns all plans that are archived. */
|
3628
|
+
ARCHIVED = "ARCHIVED",
|
3629
|
+
/** Returns all plans that are active and archived. */
|
3630
|
+
ARCHIVED_AND_ACTIVE = "ARCHIVED_AND_ACTIVE"
|
3631
|
+
}
|
3632
|
+
declare enum PublicFilter {
|
3633
|
+
/** Returns all public and hidden plans. */
|
3634
|
+
PUBLIC_AND_HIDDEN = "PUBLIC_AND_HIDDEN",
|
3635
|
+
/** Returns only public plans. */
|
3636
|
+
PUBLIC = "PUBLIC",
|
3637
|
+
/** Returns only hidden plans. */
|
3638
|
+
HIDDEN = "HIDDEN"
|
3639
|
+
}
|
3640
|
+
interface ListPlansResponse {
|
3641
|
+
/** List of all public and hidden pricing plans. */
|
3642
|
+
plans?: Plan[];
|
3643
|
+
/** Details on the paged set of pricing plans returned. */
|
3644
|
+
pagingMetadata?: PagingMetadataV2;
|
3645
|
+
}
|
3646
|
+
interface GetPlanStatsRequest {
|
3647
|
+
}
|
3648
|
+
interface GetPlanStatsResponse {
|
3649
|
+
/** Total number of plans created, including active plans (both public and hidden) and archived plans. */
|
3650
|
+
totalPlans?: number;
|
3651
|
+
}
|
3652
|
+
interface CreatePlanRequest {
|
3653
|
+
/** Information for the plan being created. */
|
3654
|
+
plan: Plan;
|
3655
|
+
}
|
3656
|
+
interface CreatePlanResponse {
|
3657
|
+
/** Plan info. */
|
3658
|
+
plan?: Plan;
|
3659
|
+
}
|
3660
|
+
interface UpdatePlanRequest {
|
3661
|
+
/** Plan info to update. */
|
3662
|
+
plan: Plan;
|
3663
|
+
}
|
3664
|
+
interface UpdatePlanResponse {
|
3665
|
+
/** Updated plan info. */
|
3666
|
+
plan?: Plan;
|
3667
|
+
}
|
3668
|
+
interface SetPlanVisibilityRequest {
|
3669
|
+
/** The ID of the plan to either display or hide on the site page. */
|
3670
|
+
_id: string;
|
3671
|
+
/** Whether to set the plan as visible. */
|
3672
|
+
visible: boolean;
|
3673
|
+
}
|
3674
|
+
interface SetPlanVisibilityResponse {
|
3675
|
+
/** Plan info. */
|
3676
|
+
plan?: Plan;
|
3677
|
+
}
|
3678
|
+
interface MakePlanPrimaryRequest {
|
3679
|
+
/** ID of the pricing plan to set as the primary plan. */
|
3680
|
+
_id: string;
|
3681
|
+
}
|
3682
|
+
interface MakePlanPrimaryResponse {
|
3683
|
+
/** Primary plan info. */
|
3684
|
+
plan?: Plan;
|
3685
|
+
}
|
3686
|
+
interface ClearPrimaryRequest {
|
3687
|
+
}
|
3688
|
+
interface ClearPrimaryResponse {
|
3689
|
+
}
|
3690
|
+
interface ArchivePlanRequest {
|
3691
|
+
_id: string;
|
3692
|
+
}
|
3693
|
+
interface ArchivePlanResponse {
|
3694
|
+
/** Archived plan info. */
|
3695
|
+
plan?: Plan;
|
3696
|
+
}
|
3697
|
+
interface ArrangePlansRequest {
|
3698
|
+
/** IDs of all non-archived plans in the order you want them arranged. */
|
3699
|
+
ids: string[];
|
3700
|
+
}
|
3701
|
+
interface ArrangePlansResponse {
|
3702
|
+
}
|
3703
|
+
interface ListPublicPlansResponseNonNullableFields {
|
3704
|
+
plans: {
|
3705
|
+
_id: string;
|
3706
|
+
perks?: {
|
3707
|
+
values: string[];
|
3708
|
+
};
|
3709
|
+
pricing?: {
|
3710
|
+
subscription?: {
|
3711
|
+
cycleDuration?: {
|
3712
|
+
unit: PeriodUnit;
|
3713
|
+
};
|
3714
|
+
};
|
3715
|
+
singlePaymentForDuration?: {
|
3716
|
+
unit: PeriodUnit;
|
3717
|
+
};
|
3718
|
+
price?: {
|
3719
|
+
value: string;
|
3720
|
+
currency: string;
|
3721
|
+
};
|
3722
|
+
};
|
3723
|
+
primary: boolean;
|
3724
|
+
}[];
|
3725
|
+
}
|
3726
|
+
interface QueryPublicPlansResponseNonNullableFields {
|
3727
|
+
plans: {
|
3728
|
+
_id: string;
|
3729
|
+
perks?: {
|
3730
|
+
values: string[];
|
3731
|
+
};
|
3732
|
+
pricing?: {
|
3733
|
+
subscription?: {
|
3734
|
+
cycleDuration?: {
|
3735
|
+
unit: PeriodUnit;
|
3736
|
+
};
|
3737
|
+
};
|
3738
|
+
singlePaymentForDuration?: {
|
3739
|
+
unit: PeriodUnit;
|
3740
|
+
};
|
3741
|
+
price?: {
|
3742
|
+
value: string;
|
3743
|
+
currency: string;
|
3744
|
+
};
|
3745
|
+
};
|
3746
|
+
primary: boolean;
|
3747
|
+
}[];
|
3748
|
+
}
|
3749
|
+
interface GetPlanResponseNonNullableFields {
|
3750
|
+
plan?: {
|
3751
|
+
_id: string;
|
3752
|
+
perks?: {
|
3753
|
+
values: string[];
|
3754
|
+
};
|
3755
|
+
pricing?: {
|
3756
|
+
subscription?: {
|
3757
|
+
cycleDuration?: {
|
3758
|
+
unit: PeriodUnit;
|
3759
|
+
};
|
3760
|
+
};
|
3761
|
+
singlePaymentForDuration?: {
|
3762
|
+
unit: PeriodUnit;
|
3763
|
+
};
|
3764
|
+
price?: {
|
3765
|
+
value: string;
|
3766
|
+
currency: string;
|
3767
|
+
};
|
3768
|
+
};
|
3769
|
+
archived: boolean;
|
3770
|
+
primary: boolean;
|
3771
|
+
hasOrders: boolean;
|
3772
|
+
};
|
3773
|
+
}
|
3774
|
+
interface ListPlansResponseNonNullableFields {
|
3775
|
+
plans: {
|
3776
|
+
_id: string;
|
3777
|
+
perks?: {
|
3778
|
+
values: string[];
|
3779
|
+
};
|
3780
|
+
pricing?: {
|
3781
|
+
subscription?: {
|
3782
|
+
cycleDuration?: {
|
3783
|
+
unit: PeriodUnit;
|
3784
|
+
};
|
3785
|
+
};
|
3786
|
+
singlePaymentForDuration?: {
|
3787
|
+
unit: PeriodUnit;
|
3788
|
+
};
|
3789
|
+
price?: {
|
3790
|
+
value: string;
|
3791
|
+
currency: string;
|
3792
|
+
};
|
3793
|
+
};
|
3794
|
+
archived: boolean;
|
3795
|
+
primary: boolean;
|
3796
|
+
hasOrders: boolean;
|
3797
|
+
}[];
|
3798
|
+
}
|
3799
|
+
interface GetPlanStatsResponseNonNullableFields {
|
3800
|
+
totalPlans: number;
|
3801
|
+
}
|
3802
|
+
interface CreatePlanResponseNonNullableFields {
|
3803
|
+
plan?: {
|
3804
|
+
_id: string;
|
3805
|
+
perks?: {
|
3806
|
+
values: string[];
|
3807
|
+
};
|
3808
|
+
pricing?: {
|
3809
|
+
subscription?: {
|
3810
|
+
cycleDuration?: {
|
3811
|
+
unit: PeriodUnit;
|
3812
|
+
};
|
3813
|
+
};
|
3814
|
+
singlePaymentForDuration?: {
|
3815
|
+
unit: PeriodUnit;
|
3816
|
+
};
|
3817
|
+
price?: {
|
3818
|
+
value: string;
|
3819
|
+
currency: string;
|
3820
|
+
};
|
3821
|
+
};
|
3822
|
+
archived: boolean;
|
3823
|
+
primary: boolean;
|
3824
|
+
hasOrders: boolean;
|
3825
|
+
};
|
3826
|
+
}
|
3827
|
+
interface UpdatePlanResponseNonNullableFields {
|
3828
|
+
plan?: {
|
3829
|
+
_id: string;
|
3830
|
+
perks?: {
|
3831
|
+
values: string[];
|
3832
|
+
};
|
3833
|
+
pricing?: {
|
3834
|
+
subscription?: {
|
3835
|
+
cycleDuration?: {
|
3836
|
+
unit: PeriodUnit;
|
3837
|
+
};
|
3838
|
+
};
|
3839
|
+
singlePaymentForDuration?: {
|
3840
|
+
unit: PeriodUnit;
|
3841
|
+
};
|
3842
|
+
price?: {
|
3843
|
+
value: string;
|
3844
|
+
currency: string;
|
3845
|
+
};
|
3846
|
+
};
|
3847
|
+
archived: boolean;
|
3848
|
+
primary: boolean;
|
3849
|
+
hasOrders: boolean;
|
3850
|
+
};
|
3851
|
+
}
|
3852
|
+
interface SetPlanVisibilityResponseNonNullableFields {
|
3853
|
+
plan?: {
|
3854
|
+
_id: string;
|
3855
|
+
perks?: {
|
3856
|
+
values: string[];
|
3857
|
+
};
|
3858
|
+
pricing?: {
|
3859
|
+
subscription?: {
|
3860
|
+
cycleDuration?: {
|
3861
|
+
unit: PeriodUnit;
|
3862
|
+
};
|
3863
|
+
};
|
3864
|
+
singlePaymentForDuration?: {
|
3865
|
+
unit: PeriodUnit;
|
3866
|
+
};
|
3867
|
+
price?: {
|
3868
|
+
value: string;
|
3869
|
+
currency: string;
|
3870
|
+
};
|
3871
|
+
};
|
3872
|
+
archived: boolean;
|
3873
|
+
primary: boolean;
|
3874
|
+
hasOrders: boolean;
|
3875
|
+
};
|
3876
|
+
}
|
3877
|
+
interface MakePlanPrimaryResponseNonNullableFields {
|
3878
|
+
plan?: {
|
3879
|
+
_id: string;
|
3880
|
+
perks?: {
|
3881
|
+
values: string[];
|
3882
|
+
};
|
3883
|
+
pricing?: {
|
3884
|
+
subscription?: {
|
3885
|
+
cycleDuration?: {
|
3886
|
+
unit: PeriodUnit;
|
3887
|
+
};
|
3888
|
+
};
|
3889
|
+
singlePaymentForDuration?: {
|
3890
|
+
unit: PeriodUnit;
|
3891
|
+
};
|
3892
|
+
price?: {
|
3893
|
+
value: string;
|
3894
|
+
currency: string;
|
3895
|
+
};
|
3896
|
+
};
|
3897
|
+
archived: boolean;
|
3898
|
+
primary: boolean;
|
3899
|
+
hasOrders: boolean;
|
3900
|
+
};
|
3901
|
+
}
|
3902
|
+
interface ArchivePlanResponseNonNullableFields {
|
3903
|
+
plan?: {
|
3904
|
+
_id: string;
|
3905
|
+
perks?: {
|
3906
|
+
values: string[];
|
3907
|
+
};
|
3908
|
+
pricing?: {
|
3909
|
+
subscription?: {
|
3910
|
+
cycleDuration?: {
|
3911
|
+
unit: PeriodUnit;
|
3912
|
+
};
|
3913
|
+
};
|
3914
|
+
singlePaymentForDuration?: {
|
3915
|
+
unit: PeriodUnit;
|
3916
|
+
};
|
3917
|
+
price?: {
|
3918
|
+
value: string;
|
3919
|
+
currency: string;
|
3920
|
+
};
|
3921
|
+
};
|
3922
|
+
archived: boolean;
|
3923
|
+
primary: boolean;
|
3924
|
+
hasOrders: boolean;
|
3925
|
+
};
|
3926
|
+
}
|
3927
|
+
|
3928
|
+
type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
3929
|
+
getUrl: (context: any) => string;
|
3930
|
+
httpMethod: K;
|
3931
|
+
path: string;
|
3932
|
+
pathParams: M;
|
3933
|
+
__requestType: T;
|
3934
|
+
__originalRequestType: S;
|
3935
|
+
__responseType: Q;
|
3936
|
+
__originalResponseType: R;
|
3937
|
+
};
|
3938
|
+
declare function listPublicPlans(): __PublicMethodMetaInfo<'GET', {}, ListPublicPlansRequest, ListPublicPlansRequest$1, ListPublicPlansResponse & ListPublicPlansResponseNonNullableFields, ListPublicPlansResponse$1 & ListPublicPlansResponseNonNullableFields$1>;
|
3939
|
+
declare function queryPublicPlans(): __PublicMethodMetaInfo<'POST', {}, QueryPublicPlansRequest, QueryPublicPlansRequest$1, QueryPublicPlansResponse & QueryPublicPlansResponseNonNullableFields, QueryPublicPlansResponse$1 & QueryPublicPlansResponseNonNullableFields$1>;
|
3940
|
+
declare function getPlan(): __PublicMethodMetaInfo<'GET', {
|
3941
|
+
id: string;
|
3942
|
+
}, GetPlanRequest, GetPlanRequest$1, GetPlanResponse & GetPlanResponseNonNullableFields, GetPlanResponse$1 & GetPlanResponseNonNullableFields$1>;
|
3943
|
+
declare function listPlans(): __PublicMethodMetaInfo<'GET', {}, ListPlansRequest, ListPlansRequest$1, ListPlansResponse & ListPlansResponseNonNullableFields, ListPlansResponse$1 & ListPlansResponseNonNullableFields$1>;
|
3944
|
+
declare function getPlanStats(): __PublicMethodMetaInfo<'GET', {}, GetPlanStatsRequest, GetPlanStatsRequest$1, GetPlanStatsResponse & GetPlanStatsResponseNonNullableFields, GetPlanStatsResponse$1 & GetPlanStatsResponseNonNullableFields$1>;
|
3945
|
+
declare function createPlan(): __PublicMethodMetaInfo<'POST', {}, CreatePlanRequest, CreatePlanRequest$1, CreatePlanResponse & CreatePlanResponseNonNullableFields, CreatePlanResponse$1 & CreatePlanResponseNonNullableFields$1>;
|
3946
|
+
declare function updatePlan(): __PublicMethodMetaInfo<'PATCH', {
|
3947
|
+
planId: string;
|
3948
|
+
}, UpdatePlanRequest, UpdatePlanRequest$1, UpdatePlanResponse & UpdatePlanResponseNonNullableFields, UpdatePlanResponse$1 & UpdatePlanResponseNonNullableFields$1>;
|
3949
|
+
declare function setPlanVisibility(): __PublicMethodMetaInfo<'PUT', {
|
3950
|
+
id: string;
|
3951
|
+
}, SetPlanVisibilityRequest, SetPlanVisibilityRequest$1, SetPlanVisibilityResponse & SetPlanVisibilityResponseNonNullableFields, SetPlanVisibilityResponse$1 & SetPlanVisibilityResponseNonNullableFields$1>;
|
3952
|
+
declare function makePlanPrimary(): __PublicMethodMetaInfo<'POST', {
|
3953
|
+
id: string;
|
3954
|
+
}, MakePlanPrimaryRequest, MakePlanPrimaryRequest$1, MakePlanPrimaryResponse & MakePlanPrimaryResponseNonNullableFields, MakePlanPrimaryResponse$1 & MakePlanPrimaryResponseNonNullableFields$1>;
|
3955
|
+
declare function clearPrimary(): __PublicMethodMetaInfo<'POST', {}, ClearPrimaryRequest, ClearPrimaryRequest$1, ClearPrimaryResponse, ClearPrimaryResponse$1>;
|
3956
|
+
declare function archivePlan(): __PublicMethodMetaInfo<'POST', {
|
3957
|
+
id: string;
|
3958
|
+
}, ArchivePlanRequest, ArchivePlanRequest$1, ArchivePlanResponse & ArchivePlanResponseNonNullableFields, ArchivePlanResponse$1 & ArchivePlanResponseNonNullableFields$1>;
|
3959
|
+
declare function arrangePlans(): __PublicMethodMetaInfo<'POST', {}, ArrangePlansRequest, ArrangePlansRequest$1, ArrangePlansResponse, ArrangePlansResponse$1>;
|
3960
|
+
|
3961
|
+
type meta___PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = __PublicMethodMetaInfo<K, M, T, S, Q, R>;
|
3962
|
+
declare const meta_archivePlan: typeof archivePlan;
|
3963
|
+
declare const meta_arrangePlans: typeof arrangePlans;
|
3964
|
+
declare const meta_clearPrimary: typeof clearPrimary;
|
3965
|
+
declare const meta_createPlan: typeof createPlan;
|
3966
|
+
declare const meta_getPlan: typeof getPlan;
|
3967
|
+
declare const meta_getPlanStats: typeof getPlanStats;
|
3968
|
+
declare const meta_listPlans: typeof listPlans;
|
3969
|
+
declare const meta_listPublicPlans: typeof listPublicPlans;
|
3970
|
+
declare const meta_makePlanPrimary: typeof makePlanPrimary;
|
3971
|
+
declare const meta_queryPublicPlans: typeof queryPublicPlans;
|
3972
|
+
declare const meta_setPlanVisibility: typeof setPlanVisibility;
|
3973
|
+
declare const meta_updatePlan: typeof updatePlan;
|
3974
|
+
declare namespace meta {
|
3975
|
+
export { type meta___PublicMethodMetaInfo as __PublicMethodMetaInfo, meta_archivePlan as archivePlan, meta_arrangePlans as arrangePlans, meta_clearPrimary as clearPrimary, meta_createPlan as createPlan, meta_getPlan as getPlan, meta_getPlanStats as getPlanStats, meta_listPlans as listPlans, meta_listPublicPlans as listPublicPlans, meta_makePlanPrimary as makePlanPrimary, meta_queryPublicPlans as queryPublicPlans, meta_setPlanVisibility as setPlanVisibility, meta_updatePlan as updatePlan };
|
3976
|
+
}
|
3977
|
+
|
3978
|
+
export { meta$1 as orders, meta as plans };
|