@wix/auto_sdk_pricing-plans_orders 1.0.2 → 1.0.4
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/build/cjs/src/pricing-plans-v2-order-orders.context.d.ts +42 -42
- package/build/cjs/src/pricing-plans-v2-order-orders.context.js +46 -46
- package/build/cjs/src/pricing-plans-v2-order-orders.context.js.map +1 -1
- package/build/cjs/src/pricing-plans-v2-order-orders.http.d.ts +72 -72
- package/build/cjs/src/pricing-plans-v2-order-orders.http.js +343 -343
- package/build/cjs/src/pricing-plans-v2-order-orders.http.js.map +1 -1
- package/build/cjs/src/pricing-plans-v2-order-orders.meta.d.ts +12 -12
- package/build/cjs/src/pricing-plans-v2-order-orders.meta.js +89 -89
- package/build/cjs/src/pricing-plans-v2-order-orders.meta.js.map +1 -1
- package/build/cjs/src/pricing-plans-v2-order-orders.public.d.ts +113 -113
- package/build/cjs/src/pricing-plans-v2-order-orders.public.js +94 -94
- package/build/cjs/src/pricing-plans-v2-order-orders.public.js.map +1 -1
- package/build/cjs/src/pricing-plans-v2-order-orders.types.d.ts +640 -382
- package/build/cjs/src/pricing-plans-v2-order-orders.types.js +9 -9
- package/build/cjs/src/pricing-plans-v2-order-orders.types.js.map +1 -1
- package/build/cjs/src/pricing-plans-v2-order-orders.universal.d.ts +1042 -729
- package/build/cjs/src/pricing-plans-v2-order-orders.universal.js +387 -379
- package/build/cjs/src/pricing-plans-v2-order-orders.universal.js.map +1 -1
- package/build/es/src/pricing-plans-v2-order-orders.context.d.ts +42 -42
- package/build/es/src/pricing-plans-v2-order-orders.context.js +41 -41
- package/build/es/src/pricing-plans-v2-order-orders.context.js.map +1 -1
- package/build/es/src/pricing-plans-v2-order-orders.http.d.ts +72 -72
- package/build/es/src/pricing-plans-v2-order-orders.http.js +335 -335
- package/build/es/src/pricing-plans-v2-order-orders.http.js.map +1 -1
- package/build/es/src/pricing-plans-v2-order-orders.meta.d.ts +12 -12
- package/build/es/src/pricing-plans-v2-order-orders.meta.js +73 -73
- package/build/es/src/pricing-plans-v2-order-orders.meta.js.map +1 -1
- package/build/es/src/pricing-plans-v2-order-orders.public.d.ts +113 -113
- package/build/es/src/pricing-plans-v2-order-orders.public.js +81 -81
- package/build/es/src/pricing-plans-v2-order-orders.public.js.map +1 -1
- package/build/es/src/pricing-plans-v2-order-orders.types.d.ts +640 -382
- package/build/es/src/pricing-plans-v2-order-orders.types.js +8 -8
- package/build/es/src/pricing-plans-v2-order-orders.types.js.map +1 -1
- package/build/es/src/pricing-plans-v2-order-orders.universal.d.ts +1042 -729
- package/build/es/src/pricing-plans-v2-order-orders.universal.js +371 -363
- package/build/es/src/pricing-plans-v2-order-orders.universal.js.map +1 -1
- package/build/internal/cjs/src/pricing-plans-v2-order-orders.context.d.ts +42 -42
- package/build/internal/cjs/src/pricing-plans-v2-order-orders.context.js +46 -46
- package/build/internal/cjs/src/pricing-plans-v2-order-orders.context.js.map +1 -1
- package/build/internal/cjs/src/pricing-plans-v2-order-orders.http.d.ts +72 -72
- package/build/internal/cjs/src/pricing-plans-v2-order-orders.http.js +343 -343
- package/build/internal/cjs/src/pricing-plans-v2-order-orders.http.js.map +1 -1
- package/build/internal/cjs/src/pricing-plans-v2-order-orders.meta.d.ts +12 -12
- package/build/internal/cjs/src/pricing-plans-v2-order-orders.meta.js +89 -89
- package/build/internal/cjs/src/pricing-plans-v2-order-orders.meta.js.map +1 -1
- package/build/internal/cjs/src/pricing-plans-v2-order-orders.public.d.ts +113 -113
- package/build/internal/cjs/src/pricing-plans-v2-order-orders.public.js +94 -94
- package/build/internal/cjs/src/pricing-plans-v2-order-orders.public.js.map +1 -1
- package/build/internal/cjs/src/pricing-plans-v2-order-orders.types.d.ts +640 -382
- package/build/internal/cjs/src/pricing-plans-v2-order-orders.types.js +9 -9
- package/build/internal/cjs/src/pricing-plans-v2-order-orders.types.js.map +1 -1
- package/build/internal/cjs/src/pricing-plans-v2-order-orders.universal.d.ts +1044 -731
- package/build/internal/cjs/src/pricing-plans-v2-order-orders.universal.js +387 -379
- package/build/internal/cjs/src/pricing-plans-v2-order-orders.universal.js.map +1 -1
- package/build/internal/es/src/pricing-plans-v2-order-orders.context.d.ts +42 -42
- package/build/internal/es/src/pricing-plans-v2-order-orders.context.js +41 -41
- package/build/internal/es/src/pricing-plans-v2-order-orders.context.js.map +1 -1
- package/build/internal/es/src/pricing-plans-v2-order-orders.http.d.ts +72 -72
- package/build/internal/es/src/pricing-plans-v2-order-orders.http.js +335 -335
- package/build/internal/es/src/pricing-plans-v2-order-orders.http.js.map +1 -1
- package/build/internal/es/src/pricing-plans-v2-order-orders.meta.d.ts +12 -12
- package/build/internal/es/src/pricing-plans-v2-order-orders.meta.js +73 -73
- package/build/internal/es/src/pricing-plans-v2-order-orders.meta.js.map +1 -1
- package/build/internal/es/src/pricing-plans-v2-order-orders.public.d.ts +113 -113
- package/build/internal/es/src/pricing-plans-v2-order-orders.public.js +81 -81
- package/build/internal/es/src/pricing-plans-v2-order-orders.public.js.map +1 -1
- package/build/internal/es/src/pricing-plans-v2-order-orders.types.d.ts +640 -382
- package/build/internal/es/src/pricing-plans-v2-order-orders.types.js +8 -8
- package/build/internal/es/src/pricing-plans-v2-order-orders.types.js.map +1 -1
- package/build/internal/es/src/pricing-plans-v2-order-orders.universal.d.ts +1044 -731
- package/build/internal/es/src/pricing-plans-v2-order-orders.universal.js +371 -363
- package/build/internal/es/src/pricing-plans-v2-order-orders.universal.js.map +1 -1
- package/package.json +4 -4
|
@@ -8,11 +8,13 @@
|
|
|
8
8
|
export interface Order {
|
|
9
9
|
/**
|
|
10
10
|
* Order ID.
|
|
11
|
+
* @format GUID
|
|
11
12
|
* @readonly
|
|
12
13
|
*/
|
|
13
14
|
_id?: string;
|
|
14
15
|
/**
|
|
15
16
|
* ID of the plan purchased with the order, from the Plans API.
|
|
17
|
+
* @format GUID
|
|
16
18
|
* @readonly
|
|
17
19
|
*/
|
|
18
20
|
planId?: string;
|
|
@@ -21,6 +23,7 @@ export interface Order {
|
|
|
21
23
|
*
|
|
22
24
|
* Every pricing plan order corresponds to a Wix subscription, including orders for single payment plans. Learn more in
|
|
23
25
|
* a [Pricing Plans overview](https://support.wix.com/en/article/pricing-plans-an-overview#create-plans-to-suit-your-business).
|
|
26
|
+
* @format GUID
|
|
24
27
|
* @readonly
|
|
25
28
|
*/
|
|
26
29
|
subscriptionId?: string;
|
|
@@ -28,6 +31,7 @@ export interface Order {
|
|
|
28
31
|
* Wix Pay order ID.
|
|
29
32
|
*
|
|
30
33
|
* Provided by Wix whether the order is created online or offline. The field is omitted when the order is free.
|
|
34
|
+
* @format GUID
|
|
31
35
|
* @readonly
|
|
32
36
|
*/
|
|
33
37
|
wixPayOrderId?: string | null;
|
|
@@ -102,6 +106,8 @@ export interface Order {
|
|
|
102
106
|
*
|
|
103
107
|
* Only available for recurring plans.
|
|
104
108
|
* @readonly
|
|
109
|
+
* @min 1
|
|
110
|
+
* @max 999
|
|
105
111
|
*/
|
|
106
112
|
freeTrialDays?: number | null;
|
|
107
113
|
/**
|
|
@@ -130,6 +136,7 @@ export interface Order {
|
|
|
130
136
|
planDescription?: string;
|
|
131
137
|
/**
|
|
132
138
|
* Plan price as it was at the moment of order creation.
|
|
139
|
+
* @format DECIMAL_VALUE
|
|
133
140
|
* @readonly
|
|
134
141
|
*/
|
|
135
142
|
planPrice?: string;
|
|
@@ -152,11 +159,13 @@ export interface Order {
|
|
|
152
159
|
export interface Buyer {
|
|
153
160
|
/**
|
|
154
161
|
* Member ID for a Wix site member, from the Members API.
|
|
162
|
+
* @format GUID
|
|
155
163
|
* @readonly
|
|
156
164
|
*/
|
|
157
165
|
memberId?: string;
|
|
158
166
|
/**
|
|
159
167
|
* Contact ID for a Wix site contact, from the Contacts API.
|
|
168
|
+
* @format GUID
|
|
160
169
|
* @readonly
|
|
161
170
|
*/
|
|
162
171
|
contactId?: string;
|
|
@@ -168,9 +177,15 @@ export interface PriceDetails extends PriceDetailsPricingModelOneOf {
|
|
|
168
177
|
singlePaymentForDuration?: Duration;
|
|
169
178
|
/** One-time payment. Order is valid until it is canceled. */
|
|
170
179
|
singlePaymentUnlimited?: boolean | null;
|
|
171
|
-
/**
|
|
180
|
+
/**
|
|
181
|
+
* Price of the order excluding tax, specified as a monetary amount. for example, `"9.99"`.
|
|
182
|
+
* @format DECIMAL_VALUE
|
|
183
|
+
*/
|
|
172
184
|
subtotal?: string;
|
|
173
|
-
/**
|
|
185
|
+
/**
|
|
186
|
+
* Total discount applied.
|
|
187
|
+
* @format DECIMAL_VALUE
|
|
188
|
+
*/
|
|
174
189
|
discount?: string;
|
|
175
190
|
/** Tax applied. */
|
|
176
191
|
tax?: Tax;
|
|
@@ -178,13 +193,24 @@ export interface PriceDetails extends PriceDetailsPricingModelOneOf {
|
|
|
178
193
|
* Price after tax and discount is applied, specified as a monetary amount. For example, `"13.98"`.
|
|
179
194
|
*
|
|
180
195
|
* If no tax is applied, the amount is the same as `subtotal`.
|
|
196
|
+
* @format DECIMAL_VALUE
|
|
181
197
|
*/
|
|
182
198
|
total?: string;
|
|
183
|
-
/**
|
|
199
|
+
/**
|
|
200
|
+
* Plan price as it was at the moment of order creation.
|
|
201
|
+
* @format DECIMAL_VALUE
|
|
202
|
+
*/
|
|
184
203
|
planPrice?: string;
|
|
185
|
-
/**
|
|
204
|
+
/**
|
|
205
|
+
* Currency code. Must be valid ISO 4217 currency code (e.g., USD).
|
|
206
|
+
* @format CURRENCY
|
|
207
|
+
*/
|
|
186
208
|
currency?: string;
|
|
187
|
-
/**
|
|
209
|
+
/**
|
|
210
|
+
* Free trial period for the order in days. Only available for recurring plans.
|
|
211
|
+
* @min 1
|
|
212
|
+
* @max 999
|
|
213
|
+
*/
|
|
188
214
|
freeTrialDays?: number | null;
|
|
189
215
|
/** Coupon applied to the order. Empty means no coupon was applied. */
|
|
190
216
|
coupon?: Coupon;
|
|
@@ -203,9 +229,15 @@ export interface Tax {
|
|
|
203
229
|
name?: string;
|
|
204
230
|
/** Whether tax is included in the original price. When `false`, tax is added at checkout. */
|
|
205
231
|
includedInPrice?: boolean;
|
|
206
|
-
/**
|
|
232
|
+
/**
|
|
233
|
+
* Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`.
|
|
234
|
+
* @format DECIMAL_VALUE
|
|
235
|
+
*/
|
|
207
236
|
rate?: string;
|
|
208
|
-
/**
|
|
237
|
+
/**
|
|
238
|
+
* Total tax, specified as a monetary amount. For example, `"3.99"`.
|
|
239
|
+
* @format DECIMAL_VALUE
|
|
240
|
+
*/
|
|
209
241
|
amount?: string;
|
|
210
242
|
}
|
|
211
243
|
/** An object specifying how often and for how long payments recur (may be forever). */
|
|
@@ -219,12 +251,16 @@ export interface Recurrence {
|
|
|
219
251
|
* Length of a payment cycle. For example, 1 month to have monthly payments.
|
|
220
252
|
* Multiply `cycleDuration`'s `count` by `cycleCount` to get the subscription duration.
|
|
221
253
|
* Currently, only a value of `1` is supported.
|
|
254
|
+
* @max 2000
|
|
222
255
|
*/
|
|
223
256
|
cycleCount?: number | null;
|
|
224
257
|
}
|
|
225
258
|
/** A duration expressed in number of time units. */
|
|
226
259
|
export interface Duration {
|
|
227
|
-
/**
|
|
260
|
+
/**
|
|
261
|
+
* Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`.
|
|
262
|
+
* @min 1
|
|
263
|
+
*/
|
|
228
264
|
count?: number | null;
|
|
229
265
|
/** Unit of time for the cycle duration. */
|
|
230
266
|
unit?: PeriodUnit;
|
|
@@ -242,12 +278,20 @@ export declare enum PeriodUnit {
|
|
|
242
278
|
YEAR = "YEAR"
|
|
243
279
|
}
|
|
244
280
|
export interface Coupon {
|
|
245
|
-
/**
|
|
281
|
+
/**
|
|
282
|
+
* Code of the applied coupon.
|
|
283
|
+
* @minLength 1
|
|
284
|
+
* @maxLength 20
|
|
285
|
+
*/
|
|
246
286
|
code?: string;
|
|
247
|
-
/**
|
|
287
|
+
/**
|
|
288
|
+
* Total discount of the coupon, as a monetary amount.
|
|
289
|
+
* @format DECIMAL_VALUE
|
|
290
|
+
*/
|
|
248
291
|
amount?: string;
|
|
249
292
|
/**
|
|
250
293
|
* Coupon ID.
|
|
294
|
+
* @format GUID
|
|
251
295
|
* @readonly
|
|
252
296
|
*/
|
|
253
297
|
_id?: string;
|
|
@@ -304,11 +348,17 @@ export interface PriceDuration {
|
|
|
304
348
|
numberOfCycles?: number | null;
|
|
305
349
|
}
|
|
306
350
|
export interface Price {
|
|
307
|
-
/**
|
|
351
|
+
/**
|
|
352
|
+
* Price of the order excluding tax, specified as a monetary amount. For example, `"9.99"`.
|
|
353
|
+
* @format DECIMAL_VALUE
|
|
354
|
+
*/
|
|
308
355
|
subtotal?: string;
|
|
309
356
|
/** Coupon applied to the order, from the Coupons API. */
|
|
310
357
|
coupon?: Coupon;
|
|
311
|
-
/**
|
|
358
|
+
/**
|
|
359
|
+
* Total discount applied to the order.
|
|
360
|
+
* @format DECIMAL_VALUE
|
|
361
|
+
*/
|
|
312
362
|
discount?: string;
|
|
313
363
|
/**
|
|
314
364
|
* Tax applied to the order.
|
|
@@ -320,20 +370,32 @@ export interface Price {
|
|
|
320
370
|
* Price after tax and discount is applied. Specified as a monetary amount, for example, `"13.98"`.
|
|
321
371
|
*
|
|
322
372
|
* If no tax is applied, the amount is the same as `subtotal`.
|
|
373
|
+
* @format DECIMAL_VALUE
|
|
323
374
|
*/
|
|
324
375
|
total?: string;
|
|
325
376
|
/**
|
|
326
377
|
* Three-letter currency code in
|
|
327
378
|
* [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
|
|
379
|
+
* @format CURRENCY
|
|
328
380
|
*/
|
|
329
381
|
currency?: string;
|
|
330
|
-
/**
|
|
382
|
+
/**
|
|
383
|
+
* Price change after billing date was change and price was adjusted. Could be positive and negative values.
|
|
384
|
+
* @format DECIMAL_VALUE
|
|
385
|
+
*/
|
|
331
386
|
proration?: string;
|
|
332
387
|
}
|
|
333
388
|
export interface Fee {
|
|
334
|
-
/**
|
|
389
|
+
/**
|
|
390
|
+
* Fee name
|
|
391
|
+
* @minLength 1
|
|
392
|
+
* @maxLength 40
|
|
393
|
+
*/
|
|
335
394
|
name?: string;
|
|
336
|
-
/**
|
|
395
|
+
/**
|
|
396
|
+
* Amount of fee to be charged
|
|
397
|
+
* @decimalValue options { lt:1000000000000, gt:0.000, maxScale:3 }
|
|
398
|
+
*/
|
|
337
399
|
amount?: string;
|
|
338
400
|
}
|
|
339
401
|
export declare enum OrderType {
|
|
@@ -466,9 +528,15 @@ export interface OrderCycle {
|
|
|
466
528
|
endedDate?: Date | null;
|
|
467
529
|
}
|
|
468
530
|
export interface FormData {
|
|
469
|
-
/**
|
|
531
|
+
/**
|
|
532
|
+
* ID of the order form ([REST](https://dev.wix.com/docs/rest/api-reference/wix-forms/form-submissions/introduction)|[SDK](https://dev.wix.com/docs/sdk/backend-modules/forms/submissions/introduction)) associated with the plan at checkout.
|
|
533
|
+
* @format GUID
|
|
534
|
+
*/
|
|
470
535
|
formId?: string | null;
|
|
471
|
-
/**
|
|
536
|
+
/**
|
|
537
|
+
* 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.
|
|
538
|
+
* @format GUID
|
|
539
|
+
*/
|
|
472
540
|
submissionId?: string | null;
|
|
473
541
|
/**
|
|
474
542
|
* Data submitted to the plan's order form at checkout.
|
|
@@ -548,8 +616,39 @@ export interface ActionEvent {
|
|
|
548
616
|
}
|
|
549
617
|
export interface Empty {
|
|
550
618
|
}
|
|
551
|
-
export interface
|
|
552
|
-
/** Order
|
|
619
|
+
export interface OrderPurchased {
|
|
620
|
+
/** Order that was paid for. If a free or an offline order, the order that was created. */
|
|
621
|
+
order?: Order;
|
|
622
|
+
}
|
|
623
|
+
export interface OrderStarted {
|
|
624
|
+
/** Order that reached its `startDate`. */
|
|
625
|
+
order?: Order;
|
|
626
|
+
}
|
|
627
|
+
/**
|
|
628
|
+
* Triggered at the start of a new payment cycle for an existing order.
|
|
629
|
+
*
|
|
630
|
+
* This webhook does not trigger at the initial start of an offline order.
|
|
631
|
+
*/
|
|
632
|
+
export interface OrderCycleStarted {
|
|
633
|
+
/** Order whose new cycle started. */
|
|
634
|
+
order?: Order;
|
|
635
|
+
/** Number of the payment cycle will be 0 when the order is in the free trial period. In other cases, the cycle number starts from 1. */
|
|
636
|
+
cycleNumber?: number;
|
|
637
|
+
}
|
|
638
|
+
/** Emitted when a recurring order is canceled for the next payment cycle */
|
|
639
|
+
export interface OrderAutoRenewCanceled {
|
|
640
|
+
/** Order that is canceled, effective at the end of the current payment cycle. */
|
|
641
|
+
order?: Order;
|
|
642
|
+
}
|
|
643
|
+
export interface OrderEnded {
|
|
644
|
+
/** Order that ended. */
|
|
645
|
+
order?: Order;
|
|
646
|
+
}
|
|
647
|
+
export interface GetOrderRequest {
|
|
648
|
+
/**
|
|
649
|
+
* Order ID.
|
|
650
|
+
* @format GUID
|
|
651
|
+
*/
|
|
553
652
|
_id: string;
|
|
554
653
|
/**
|
|
555
654
|
* Predefined set of fields to return.
|
|
@@ -566,24 +665,44 @@ export declare enum Set {
|
|
|
566
665
|
/** Returns all order form submission data. */
|
|
567
666
|
FULL = "FULL"
|
|
568
667
|
}
|
|
569
|
-
export interface
|
|
570
|
-
/**
|
|
668
|
+
export interface GetOrderResponse {
|
|
669
|
+
/** Order. */
|
|
571
670
|
order?: Order;
|
|
572
671
|
}
|
|
573
|
-
export interface
|
|
574
|
-
/**
|
|
672
|
+
export interface ListOrdersRequest {
|
|
673
|
+
/**
|
|
674
|
+
* Filter by a buyer's member ID, from the Members API.
|
|
675
|
+
* @format GUID
|
|
676
|
+
*/
|
|
677
|
+
buyerIds?: string[];
|
|
678
|
+
/**
|
|
679
|
+
* Filter by plan IDs, from the Plans API.
|
|
680
|
+
* @format GUID
|
|
681
|
+
*/
|
|
575
682
|
planIds?: string[];
|
|
576
|
-
/** Filter
|
|
683
|
+
/** Filter by whether or not the auto-renewal of recurring orders was canceled. */
|
|
577
684
|
autoRenewCanceled?: boolean | null;
|
|
578
685
|
/** Filter by order status. */
|
|
579
686
|
orderStatuses?: OrderStatus[];
|
|
580
687
|
/** Filter by payment status. */
|
|
581
688
|
paymentStatuses?: PaymentStatus[];
|
|
582
|
-
/**
|
|
689
|
+
/**
|
|
690
|
+
* Number of orders to return. See Sorting and Paging for more information.
|
|
691
|
+
*
|
|
692
|
+
* Max: `50`
|
|
693
|
+
* @min 1
|
|
694
|
+
* @max 50
|
|
695
|
+
*/
|
|
583
696
|
limit?: number | null;
|
|
584
|
-
/** Number of
|
|
697
|
+
/** Number of orders to skip in the current sort order. */
|
|
585
698
|
offset?: number | null;
|
|
586
|
-
/**
|
|
699
|
+
/**
|
|
700
|
+
* Sort order.
|
|
701
|
+
*
|
|
702
|
+
* Use `ASC` for ascending order or `DESC` for descending order.
|
|
703
|
+
*
|
|
704
|
+
* Default: `DESC`.
|
|
705
|
+
*/
|
|
587
706
|
sorting?: Sorting;
|
|
588
707
|
/**
|
|
589
708
|
* Predefined set of fields to return.
|
|
@@ -593,7 +712,10 @@ export interface MemberListOrdersRequest {
|
|
|
593
712
|
fieldSet?: Set;
|
|
594
713
|
}
|
|
595
714
|
export interface Sorting {
|
|
596
|
-
/**
|
|
715
|
+
/**
|
|
716
|
+
* Name of the field to sort by.
|
|
717
|
+
* @maxLength 512
|
|
718
|
+
*/
|
|
597
719
|
fieldName?: string;
|
|
598
720
|
/** Sort order. */
|
|
599
721
|
order?: SortOrder;
|
|
@@ -602,8 +724,8 @@ export declare enum SortOrder {
|
|
|
602
724
|
ASC = "ASC",
|
|
603
725
|
DESC = "DESC"
|
|
604
726
|
}
|
|
605
|
-
export interface
|
|
606
|
-
/**
|
|
727
|
+
export interface ListOrdersResponse {
|
|
728
|
+
/** List of orders. */
|
|
607
729
|
orders?: Order[];
|
|
608
730
|
/** Object containing paging-related data (number of orders returned, offset). */
|
|
609
731
|
pagingMetadata?: PagingMetadataV2;
|
|
@@ -621,16 +743,18 @@ export interface PagingMetadataV2 {
|
|
|
621
743
|
cursors?: Cursors;
|
|
622
744
|
}
|
|
623
745
|
export interface Cursors {
|
|
624
|
-
/**
|
|
746
|
+
/**
|
|
747
|
+
* Cursor string pointing to the next page in the list of results.
|
|
748
|
+
* @maxLength 16000
|
|
749
|
+
*/
|
|
625
750
|
next?: string | null;
|
|
626
|
-
/**
|
|
751
|
+
/**
|
|
752
|
+
* Cursor pointing to the previous page in the list of results.
|
|
753
|
+
* @maxLength 16000
|
|
754
|
+
*/
|
|
627
755
|
prev?: string | null;
|
|
628
756
|
}
|
|
629
|
-
|
|
630
|
-
* TODO: Write orders filter and sort docs page
|
|
631
|
-
* Retrieves a list of up to 1,000 orders, based on the provided paging, sorting, and filtering.
|
|
632
|
-
*/
|
|
633
|
-
export interface QueryOrdersRequest {
|
|
757
|
+
export interface OrdersQueryOrdersRequest {
|
|
634
758
|
/** Query filter. */
|
|
635
759
|
query?: QueryV2;
|
|
636
760
|
}
|
|
@@ -670,29 +794,96 @@ export interface Paging {
|
|
|
670
794
|
offset?: number | null;
|
|
671
795
|
}
|
|
672
796
|
export interface CursorPaging {
|
|
673
|
-
/**
|
|
797
|
+
/**
|
|
798
|
+
* Maximum number of items to return in the results.
|
|
799
|
+
* @max 100
|
|
800
|
+
*/
|
|
674
801
|
limit?: number | null;
|
|
675
802
|
/**
|
|
676
803
|
* Pointer to the next or previous page in the list of results.
|
|
677
804
|
*
|
|
678
805
|
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
679
806
|
* Not relevant for the first request.
|
|
807
|
+
* @maxLength 16000
|
|
680
808
|
*/
|
|
681
809
|
cursor?: string | null;
|
|
682
810
|
}
|
|
683
|
-
export interface
|
|
684
|
-
/**
|
|
811
|
+
export interface OrdersQueryOrdersResponse {
|
|
812
|
+
/** Retrieved orders. */
|
|
685
813
|
plans?: Order[];
|
|
686
814
|
/** Paging-related data (number of orders returned, offset). */
|
|
687
815
|
pagingMetadata?: PagingMetadataV2;
|
|
688
816
|
}
|
|
689
|
-
export interface
|
|
690
|
-
|
|
817
|
+
export interface GetOrdersStatsRequest {
|
|
818
|
+
}
|
|
819
|
+
export interface GetOrdersStatsResponse {
|
|
820
|
+
/** Total number of orders. */
|
|
821
|
+
totalOrderCount?: number;
|
|
822
|
+
/** Number of active orders. */
|
|
823
|
+
activeOrderCount?: number;
|
|
824
|
+
}
|
|
825
|
+
export interface GetAvailableOrderActionsRequest {
|
|
826
|
+
/**
|
|
827
|
+
* Order ID.
|
|
828
|
+
* @format GUID
|
|
829
|
+
*/
|
|
830
|
+
_id?: string;
|
|
831
|
+
}
|
|
832
|
+
export interface GetAvailableOrderActionsResponse {
|
|
833
|
+
/** Whether the order can be suspended. */
|
|
834
|
+
suspendable?: boolean;
|
|
835
|
+
/** If the order cannot be suspended, a reason is returned here. */
|
|
836
|
+
notSuspendableReason?: ReasonNotSuspendable;
|
|
837
|
+
/** Whether the order can be canceled by the buyer. */
|
|
838
|
+
cancelableByBuyer?: boolean;
|
|
839
|
+
}
|
|
840
|
+
export declare enum ReasonNotSuspendable {
|
|
841
|
+
/** Undefined reason. */
|
|
842
|
+
UNDEFINED = "UNDEFINED",
|
|
843
|
+
/** Saved in the database but is awaiting payment. Non-active orders can't be suspended. */
|
|
844
|
+
PENDING = "PENDING",
|
|
845
|
+
/** Trial orders can't be suspended. */
|
|
846
|
+
TRIAL = "TRIAL",
|
|
847
|
+
/** Canceled orders can't be suspended. */
|
|
848
|
+
CANCELED = "CANCELED",
|
|
849
|
+
/** Ended orders can't be suspended. */
|
|
850
|
+
ENDED = "ENDED",
|
|
851
|
+
/** Paid for orders with future start dates can't be suspended. */
|
|
852
|
+
NOT_STARTED = "NOT_STARTED",
|
|
853
|
+
/** Order is already suspended. */
|
|
854
|
+
ALREADY_SUSPENDED = "ALREADY_SUSPENDED",
|
|
855
|
+
/** Orders based on recurring payments using older stripe versions can't be suspended. */
|
|
856
|
+
OLD_STRIPE = "OLD_STRIPE"
|
|
857
|
+
}
|
|
858
|
+
export interface PostponeEndDateRequest {
|
|
859
|
+
/**
|
|
860
|
+
* Order ID.
|
|
861
|
+
* @format GUID
|
|
862
|
+
*/
|
|
691
863
|
_id: string;
|
|
692
|
-
/**
|
|
864
|
+
/**
|
|
865
|
+
* New end date and time.
|
|
866
|
+
*
|
|
867
|
+
* Must be later than the current end date and time.
|
|
868
|
+
*/
|
|
869
|
+
endDate: Date | null;
|
|
870
|
+
}
|
|
871
|
+
export interface PostponeEndDateResponse {
|
|
872
|
+
}
|
|
873
|
+
export interface OrderEndDatePostponed {
|
|
874
|
+
/** Order whose `endDate` was postponed. */
|
|
875
|
+
order?: Order;
|
|
876
|
+
}
|
|
877
|
+
export interface CancelOrderRequest {
|
|
878
|
+
/**
|
|
879
|
+
* Order ID.
|
|
880
|
+
* @format GUID
|
|
881
|
+
*/
|
|
882
|
+
_id: string;
|
|
883
|
+
/** __Required.__ When the order will be canceled. One-time orders can only be canceled `IMMEDIATELY`. */
|
|
693
884
|
effectiveAt: CancellationEffectiveAt;
|
|
694
885
|
}
|
|
695
|
-
export interface
|
|
886
|
+
export interface CancelOrderResponse {
|
|
696
887
|
}
|
|
697
888
|
/**
|
|
698
889
|
* Emitted when an order is canceled immediately or when cycle ends for an order with canceled auto renewal
|
|
@@ -703,94 +894,329 @@ export interface OrderCanceled {
|
|
|
703
894
|
/** Canceled order. */
|
|
704
895
|
order?: Order;
|
|
705
896
|
}
|
|
706
|
-
export interface
|
|
707
|
-
/**
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
identity?: IdentificationData;
|
|
713
|
-
/** Stringify payload. */
|
|
714
|
-
data?: string;
|
|
715
|
-
}
|
|
716
|
-
export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
717
|
-
/** ID of a site visitor that has not logged in to the site. */
|
|
718
|
-
anonymousVisitorId?: string;
|
|
719
|
-
/** ID of a site visitor that has logged in to the site. */
|
|
720
|
-
memberId?: string;
|
|
721
|
-
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
722
|
-
wixUserId?: string;
|
|
723
|
-
/** ID of an app. */
|
|
724
|
-
appId?: string;
|
|
725
|
-
/** @readonly */
|
|
726
|
-
identityType?: WebhookIdentityType;
|
|
897
|
+
export interface MarkAsPaidRequest {
|
|
898
|
+
/**
|
|
899
|
+
* Order ID.
|
|
900
|
+
* @format GUID
|
|
901
|
+
*/
|
|
902
|
+
_id: string;
|
|
727
903
|
}
|
|
728
|
-
|
|
729
|
-
export interface IdentificationDataIdOneOf {
|
|
730
|
-
/** ID of a site visitor that has not logged in to the site. */
|
|
731
|
-
anonymousVisitorId?: string;
|
|
732
|
-
/** ID of a site visitor that has logged in to the site. */
|
|
733
|
-
memberId?: string;
|
|
734
|
-
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
735
|
-
wixUserId?: string;
|
|
736
|
-
/** ID of an app. */
|
|
737
|
-
appId?: string;
|
|
904
|
+
export interface MarkAsPaidResponse {
|
|
738
905
|
}
|
|
739
|
-
export
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
MEMBER = "MEMBER",
|
|
743
|
-
WIX_USER = "WIX_USER",
|
|
744
|
-
APP = "APP"
|
|
906
|
+
export interface OrderMarkedAsPaid {
|
|
907
|
+
/** Order that was marked as paid. */
|
|
908
|
+
order?: Order;
|
|
745
909
|
}
|
|
746
|
-
export interface
|
|
747
|
-
/** Plan ID. */
|
|
748
|
-
planId: string;
|
|
910
|
+
export interface PauseOrderRequest {
|
|
749
911
|
/**
|
|
750
|
-
*
|
|
751
|
-
*
|
|
752
|
-
* Default: Current date and time.
|
|
912
|
+
* Order ID.
|
|
913
|
+
* @format GUID
|
|
753
914
|
*/
|
|
754
|
-
|
|
755
|
-
/** Coupon code to apply. */
|
|
756
|
-
couponCode?: string | null;
|
|
757
|
-
/** Provided if checkout is initiated on buyer's behalf. */
|
|
758
|
-
onBehalf?: OnBehalf;
|
|
759
|
-
/** Submission ID of the form submitted with this order. */
|
|
760
|
-
submissionId?: string | null;
|
|
915
|
+
_id: string;
|
|
761
916
|
}
|
|
762
|
-
export interface
|
|
763
|
-
/** Member ID. */
|
|
764
|
-
memberId?: string;
|
|
765
|
-
/** Method by which checkout is initiated. */
|
|
766
|
-
orderMethod?: OrderMethod;
|
|
917
|
+
export interface PauseOrderResponse {
|
|
767
918
|
}
|
|
768
|
-
export interface
|
|
769
|
-
/**
|
|
919
|
+
export interface OrderPaused {
|
|
920
|
+
/** Paused order. */
|
|
770
921
|
order?: Order;
|
|
771
922
|
}
|
|
772
|
-
export interface
|
|
773
|
-
/** Coupon code. */
|
|
774
|
-
couponCode?: string;
|
|
775
|
-
/** Plan ID. */
|
|
776
|
-
planId?: string;
|
|
777
|
-
}
|
|
778
|
-
export interface CreateGuestOnlineOrderRequest {
|
|
779
|
-
/** Plan ID. */
|
|
780
|
-
planId?: string;
|
|
923
|
+
export interface BulkPauseOrderRequest {
|
|
781
924
|
/**
|
|
782
|
-
*
|
|
783
|
-
*
|
|
925
|
+
* List of Order IDs.
|
|
926
|
+
* @format GUID
|
|
927
|
+
* @minSize 1
|
|
928
|
+
* @maxSize 100
|
|
929
|
+
*/
|
|
930
|
+
ids?: string[];
|
|
931
|
+
/** Set to true to return Order entity in response. */
|
|
932
|
+
returnFullEntity?: boolean;
|
|
933
|
+
}
|
|
934
|
+
export interface BulkPauseOrderResponse {
|
|
935
|
+
/** Orders that were paused. */
|
|
936
|
+
results?: BulkOrderResult[];
|
|
937
|
+
/** Bulk action metadata. */
|
|
938
|
+
bulkActionMetadata?: BulkActionMetadata;
|
|
939
|
+
}
|
|
940
|
+
export interface BulkOrderResult {
|
|
941
|
+
/** Item metadata */
|
|
942
|
+
itemMetadata?: ItemMetadata;
|
|
943
|
+
/** The order. */
|
|
944
|
+
order?: Order;
|
|
945
|
+
}
|
|
946
|
+
export interface ItemMetadata {
|
|
947
|
+
/** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
|
|
948
|
+
_id?: string | null;
|
|
949
|
+
/** Index of the item within the request array. Allows for correlation between request and response items. */
|
|
950
|
+
originalIndex?: number;
|
|
951
|
+
/** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
|
|
952
|
+
success?: boolean;
|
|
953
|
+
/** Details about the error in case of failure. */
|
|
954
|
+
error?: ApplicationError;
|
|
955
|
+
}
|
|
956
|
+
export interface ApplicationError {
|
|
957
|
+
/** Error code. */
|
|
958
|
+
code?: string;
|
|
959
|
+
/** Description of the error. */
|
|
960
|
+
description?: string;
|
|
961
|
+
/** Data related to the error. */
|
|
962
|
+
data?: Record<string, any> | null;
|
|
963
|
+
}
|
|
964
|
+
export interface BulkActionMetadata {
|
|
965
|
+
/** Number of items that were successfully processed. */
|
|
966
|
+
totalSuccesses?: number;
|
|
967
|
+
/** Number of items that couldn't be processed. */
|
|
968
|
+
totalFailures?: number;
|
|
969
|
+
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
970
|
+
undetailedFailures?: number;
|
|
971
|
+
}
|
|
972
|
+
export interface ResumeOrderRequest {
|
|
973
|
+
/**
|
|
974
|
+
* Order ID.
|
|
975
|
+
* @format GUID
|
|
976
|
+
*/
|
|
977
|
+
_id: string;
|
|
978
|
+
}
|
|
979
|
+
export interface ResumeOrderResponse {
|
|
980
|
+
}
|
|
981
|
+
export interface OrderResumed {
|
|
982
|
+
/** Resumed order. */
|
|
983
|
+
order?: Order;
|
|
984
|
+
}
|
|
985
|
+
export interface BulkResumeOrderRequest {
|
|
986
|
+
/**
|
|
987
|
+
* List of Order IDs.
|
|
988
|
+
* @format GUID
|
|
989
|
+
* @minSize 1
|
|
990
|
+
* @maxSize 100
|
|
991
|
+
*/
|
|
992
|
+
ids?: string[];
|
|
993
|
+
/** Set to true to return Order entity in response. */
|
|
994
|
+
returnFullEntity?: boolean;
|
|
995
|
+
}
|
|
996
|
+
export interface BulkResumeOrderResponse {
|
|
997
|
+
/** Orders that were resumed. */
|
|
998
|
+
results?: BulkOrderResult[];
|
|
999
|
+
/** Bulk action metadata. */
|
|
1000
|
+
bulkActionMetadata?: BulkActionMetadata;
|
|
1001
|
+
}
|
|
1002
|
+
export interface MessageEnvelope {
|
|
1003
|
+
/**
|
|
1004
|
+
* App instance ID.
|
|
1005
|
+
* @format GUID
|
|
1006
|
+
*/
|
|
1007
|
+
instanceId?: string | null;
|
|
1008
|
+
/**
|
|
1009
|
+
* Event type.
|
|
1010
|
+
* @maxLength 150
|
|
1011
|
+
*/
|
|
1012
|
+
eventType?: string;
|
|
1013
|
+
/** The identification type and identity data. */
|
|
1014
|
+
identity?: IdentificationData;
|
|
1015
|
+
/** Stringify payload. */
|
|
1016
|
+
data?: string;
|
|
1017
|
+
}
|
|
1018
|
+
export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
1019
|
+
/**
|
|
1020
|
+
* ID of a site visitor that has not logged in to the site.
|
|
1021
|
+
* @format GUID
|
|
1022
|
+
*/
|
|
1023
|
+
anonymousVisitorId?: string;
|
|
1024
|
+
/**
|
|
1025
|
+
* ID of a site visitor that has logged in to the site.
|
|
1026
|
+
* @format GUID
|
|
1027
|
+
*/
|
|
1028
|
+
memberId?: string;
|
|
1029
|
+
/**
|
|
1030
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
1031
|
+
* @format GUID
|
|
1032
|
+
*/
|
|
1033
|
+
wixUserId?: string;
|
|
1034
|
+
/**
|
|
1035
|
+
* ID of an app.
|
|
1036
|
+
* @format GUID
|
|
1037
|
+
*/
|
|
1038
|
+
appId?: string;
|
|
1039
|
+
/** @readonly */
|
|
1040
|
+
identityType?: WebhookIdentityType;
|
|
1041
|
+
}
|
|
1042
|
+
/** @oneof */
|
|
1043
|
+
export interface IdentificationDataIdOneOf {
|
|
1044
|
+
/**
|
|
1045
|
+
* ID of a site visitor that has not logged in to the site.
|
|
1046
|
+
* @format GUID
|
|
1047
|
+
*/
|
|
1048
|
+
anonymousVisitorId?: string;
|
|
1049
|
+
/**
|
|
1050
|
+
* ID of a site visitor that has logged in to the site.
|
|
1051
|
+
* @format GUID
|
|
1052
|
+
*/
|
|
1053
|
+
memberId?: string;
|
|
1054
|
+
/**
|
|
1055
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
1056
|
+
* @format GUID
|
|
1057
|
+
*/
|
|
1058
|
+
wixUserId?: string;
|
|
1059
|
+
/**
|
|
1060
|
+
* ID of an app.
|
|
1061
|
+
* @format GUID
|
|
1062
|
+
*/
|
|
1063
|
+
appId?: string;
|
|
1064
|
+
}
|
|
1065
|
+
export declare enum WebhookIdentityType {
|
|
1066
|
+
UNKNOWN = "UNKNOWN",
|
|
1067
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
1068
|
+
MEMBER = "MEMBER",
|
|
1069
|
+
WIX_USER = "WIX_USER",
|
|
1070
|
+
APP = "APP"
|
|
1071
|
+
}
|
|
1072
|
+
export interface MemberGetOrderRequest {
|
|
1073
|
+
/**
|
|
1074
|
+
* Order ID.
|
|
1075
|
+
* @format GUID
|
|
1076
|
+
*/
|
|
1077
|
+
_id: string;
|
|
1078
|
+
/**
|
|
1079
|
+
* Predefined set of fields to return.
|
|
1080
|
+
*
|
|
1081
|
+
* Default: If `fieldSet` is omitted, no order form submission data is returned.
|
|
1082
|
+
*/
|
|
1083
|
+
fieldSet?: Set;
|
|
1084
|
+
}
|
|
1085
|
+
export interface MemberGetOrderResponse {
|
|
1086
|
+
/** Requested order. */
|
|
1087
|
+
order?: Order;
|
|
1088
|
+
}
|
|
1089
|
+
export interface MemberListOrdersRequest {
|
|
1090
|
+
/**
|
|
1091
|
+
* Filter by plan IDs.
|
|
1092
|
+
* @format GUID
|
|
1093
|
+
*/
|
|
1094
|
+
planIds?: string[];
|
|
1095
|
+
/** Filter for orders where auto renewal was canceled. */
|
|
1096
|
+
autoRenewCanceled?: boolean | null;
|
|
1097
|
+
/** Filter by order status. */
|
|
1098
|
+
orderStatuses?: OrderStatus[];
|
|
1099
|
+
/** Filter by payment status. */
|
|
1100
|
+
paymentStatuses?: PaymentStatus[];
|
|
1101
|
+
/**
|
|
1102
|
+
* Limit the number of pricing plans returned. Default limit is 50.
|
|
1103
|
+
* @min 1
|
|
1104
|
+
* @max 50
|
|
1105
|
+
*/
|
|
1106
|
+
limit?: number | null;
|
|
1107
|
+
/** Number of entries to offset. */
|
|
1108
|
+
offset?: number | null;
|
|
1109
|
+
/** Sorting direction (defaults to ASC) and field to sort by. */
|
|
1110
|
+
sorting?: Sorting;
|
|
1111
|
+
/**
|
|
1112
|
+
* Predefined set of fields to return.
|
|
1113
|
+
*
|
|
1114
|
+
* Default: If `fieldSet` is omitted, no order form submission data is returned.
|
|
1115
|
+
*/
|
|
1116
|
+
fieldSet?: Set;
|
|
1117
|
+
}
|
|
1118
|
+
export interface MemberListOrdersResponse {
|
|
1119
|
+
/** Requested orders. */
|
|
1120
|
+
orders?: Order[];
|
|
1121
|
+
/** Object containing paging-related data (number of orders returned, offset). */
|
|
1122
|
+
pagingMetadata?: PagingMetadataV2;
|
|
1123
|
+
}
|
|
1124
|
+
/**
|
|
1125
|
+
* TODO: Write orders filter and sort docs page
|
|
1126
|
+
* Retrieves a list of up to 1,000 orders, based on the provided paging, sorting, and filtering.
|
|
1127
|
+
*/
|
|
1128
|
+
export interface QueryOrdersRequest {
|
|
1129
|
+
/** Query filter. */
|
|
1130
|
+
query?: QueryV2;
|
|
1131
|
+
}
|
|
1132
|
+
export interface QueryOrdersResponse {
|
|
1133
|
+
/** Order data. */
|
|
1134
|
+
plans?: Order[];
|
|
1135
|
+
/** Paging-related data (number of orders returned, offset). */
|
|
1136
|
+
pagingMetadata?: PagingMetadataV2;
|
|
1137
|
+
}
|
|
1138
|
+
export interface RequestCancellationRequest {
|
|
1139
|
+
/**
|
|
1140
|
+
* Order ID.
|
|
1141
|
+
* @format GUID
|
|
1142
|
+
*/
|
|
1143
|
+
_id: string;
|
|
1144
|
+
/** Required. Whether to cancel the order effective immediately or at the next payment date. One-time orders can only be canceled immediately. */
|
|
1145
|
+
effectiveAt: CancellationEffectiveAt;
|
|
1146
|
+
}
|
|
1147
|
+
export interface RequestCancellationResponse {
|
|
1148
|
+
}
|
|
1149
|
+
export interface CreateOnlineOrderRequest {
|
|
1150
|
+
/**
|
|
1151
|
+
* Plan ID.
|
|
1152
|
+
* @format GUID
|
|
1153
|
+
*/
|
|
1154
|
+
planId: string;
|
|
1155
|
+
/**
|
|
1156
|
+
* Start date and time for the plan of the online order in a `YYYY-MM-DDThh:mm[:ss][.sss]Z` format.
|
|
1157
|
+
*
|
|
1158
|
+
* Default: Current date and time.
|
|
1159
|
+
*/
|
|
1160
|
+
startDate?: Date | null;
|
|
1161
|
+
/**
|
|
1162
|
+
* Coupon code to apply.
|
|
1163
|
+
* @minLength 1
|
|
1164
|
+
* @maxLength 20
|
|
1165
|
+
*/
|
|
1166
|
+
couponCode?: string | null;
|
|
1167
|
+
/** Provided if checkout is initiated on buyer's behalf. */
|
|
1168
|
+
onBehalf?: OnBehalf;
|
|
1169
|
+
/**
|
|
1170
|
+
* Submission ID of the form submitted with this order.
|
|
1171
|
+
* @format GUID
|
|
1172
|
+
*/
|
|
1173
|
+
submissionId?: string | null;
|
|
1174
|
+
}
|
|
1175
|
+
export interface OnBehalf {
|
|
1176
|
+
/**
|
|
1177
|
+
* Member ID.
|
|
1178
|
+
* @format GUID
|
|
1179
|
+
*/
|
|
1180
|
+
memberId?: string;
|
|
1181
|
+
/** Method by which checkout is initiated. */
|
|
1182
|
+
orderMethod?: OrderMethod;
|
|
1183
|
+
}
|
|
1184
|
+
export interface CreateOnlineOrderResponse {
|
|
1185
|
+
/** Created online order. */
|
|
1186
|
+
order?: Order;
|
|
1187
|
+
}
|
|
1188
|
+
export interface CouponsError {
|
|
1189
|
+
/** Coupon code. */
|
|
1190
|
+
couponCode?: string;
|
|
1191
|
+
/** Plan ID. */
|
|
1192
|
+
planId?: string;
|
|
1193
|
+
}
|
|
1194
|
+
export interface CreateGuestOnlineOrderRequest {
|
|
1195
|
+
/**
|
|
1196
|
+
* Plan ID.
|
|
1197
|
+
* @format GUID
|
|
1198
|
+
*/
|
|
1199
|
+
planId?: string;
|
|
1200
|
+
/**
|
|
1201
|
+
* Start date for the ordered plan.
|
|
1202
|
+
*
|
|
784
1203
|
* Default: Current date
|
|
785
1204
|
*/
|
|
786
1205
|
startDate?: Date | null;
|
|
787
|
-
/**
|
|
1206
|
+
/**
|
|
1207
|
+
* Coupon code to apply.
|
|
1208
|
+
* @minLength 1
|
|
1209
|
+
* @maxLength 20
|
|
1210
|
+
*/
|
|
788
1211
|
couponCode?: string | null;
|
|
789
1212
|
/** Captcha data to prove you are not a robot */
|
|
790
1213
|
captcha?: Captcha;
|
|
791
1214
|
/** Visitor info */
|
|
792
1215
|
guest?: Guest;
|
|
793
|
-
/**
|
|
1216
|
+
/**
|
|
1217
|
+
* Form submission id that was submitted together with the order
|
|
1218
|
+
* @format GUID
|
|
1219
|
+
*/
|
|
794
1220
|
submissionId?: string | null;
|
|
795
1221
|
}
|
|
796
1222
|
export interface Captcha {
|
|
@@ -798,7 +1224,10 @@ export interface Captcha {
|
|
|
798
1224
|
token?: string;
|
|
799
1225
|
}
|
|
800
1226
|
export interface Guest {
|
|
801
|
-
/**
|
|
1227
|
+
/**
|
|
1228
|
+
* Email for checkout
|
|
1229
|
+
* @format EMAIL
|
|
1230
|
+
*/
|
|
802
1231
|
email?: string;
|
|
803
1232
|
}
|
|
804
1233
|
export interface CreateGuestOnlineOrderResponse {
|
|
@@ -806,9 +1235,15 @@ export interface CreateGuestOnlineOrderResponse {
|
|
|
806
1235
|
order?: Order;
|
|
807
1236
|
}
|
|
808
1237
|
export interface CreateOfflineOrderRequest {
|
|
809
|
-
/**
|
|
1238
|
+
/**
|
|
1239
|
+
* ID of the plan being ordered, from the Plans API.
|
|
1240
|
+
* @format GUID
|
|
1241
|
+
*/
|
|
810
1242
|
planId: string;
|
|
811
|
-
/**
|
|
1243
|
+
/**
|
|
1244
|
+
* ID of the member ordering the plan, from the Members API.
|
|
1245
|
+
* @format GUID
|
|
1246
|
+
*/
|
|
812
1247
|
memberId: string;
|
|
813
1248
|
/**
|
|
814
1249
|
* Start date and time for the ordered plan in a `YYYY-MM-DDThh:mm[:ss][.sss]Z` format.
|
|
@@ -822,9 +1257,16 @@ export interface CreateOfflineOrderRequest {
|
|
|
822
1257
|
* Default: `false`
|
|
823
1258
|
*/
|
|
824
1259
|
paid?: boolean | null;
|
|
825
|
-
/**
|
|
1260
|
+
/**
|
|
1261
|
+
* Coupon code to apply, from the Coupons API.
|
|
1262
|
+
* @minLength 1
|
|
1263
|
+
* @maxLength 20
|
|
1264
|
+
*/
|
|
826
1265
|
couponCode?: string | null;
|
|
827
|
-
/**
|
|
1266
|
+
/**
|
|
1267
|
+
* Form submission ID that was submitted with the order.
|
|
1268
|
+
* @format GUID
|
|
1269
|
+
*/
|
|
828
1270
|
submissionId?: string | null;
|
|
829
1271
|
}
|
|
830
1272
|
export interface CreateOfflineOrderResponse {
|
|
@@ -832,9 +1274,15 @@ export interface CreateOfflineOrderResponse {
|
|
|
832
1274
|
order?: Order;
|
|
833
1275
|
}
|
|
834
1276
|
export interface CreateExternalOrderRequest {
|
|
835
|
-
/**
|
|
1277
|
+
/**
|
|
1278
|
+
* Plan ID.
|
|
1279
|
+
* @format GUID
|
|
1280
|
+
*/
|
|
836
1281
|
planId?: string;
|
|
837
|
-
/**
|
|
1282
|
+
/**
|
|
1283
|
+
* Form submission id that was submitted together with the order
|
|
1284
|
+
* @format GUID
|
|
1285
|
+
*/
|
|
838
1286
|
submissionId?: string | null;
|
|
839
1287
|
}
|
|
840
1288
|
export interface CreateExternalOrderResponse {
|
|
@@ -842,7 +1290,10 @@ export interface CreateExternalOrderResponse {
|
|
|
842
1290
|
order?: Order;
|
|
843
1291
|
}
|
|
844
1292
|
export interface GetOnlineOrderPreviewRequest {
|
|
845
|
-
/**
|
|
1293
|
+
/**
|
|
1294
|
+
* Plan ID.
|
|
1295
|
+
* @format GUID
|
|
1296
|
+
*/
|
|
846
1297
|
planId: string;
|
|
847
1298
|
/**
|
|
848
1299
|
* Start date and time for the plan of the order preview in a `YYYY-MM-DDThh:mm[:ss][.sss]Z` format.
|
|
@@ -850,7 +1301,11 @@ export interface GetOnlineOrderPreviewRequest {
|
|
|
850
1301
|
* Default: Current date and time.
|
|
851
1302
|
*/
|
|
852
1303
|
startDate?: Date | null;
|
|
853
|
-
/**
|
|
1304
|
+
/**
|
|
1305
|
+
* Coupon code to apply.
|
|
1306
|
+
* @minLength 1
|
|
1307
|
+
* @maxLength 20
|
|
1308
|
+
*/
|
|
854
1309
|
couponCode?: string | null;
|
|
855
1310
|
}
|
|
856
1311
|
export interface GetOnlineOrderPreviewResponse {
|
|
@@ -860,7 +1315,10 @@ export interface GetOnlineOrderPreviewResponse {
|
|
|
860
1315
|
purchaseLimitExceeded?: boolean;
|
|
861
1316
|
}
|
|
862
1317
|
export interface GetGuestOnlineOrderPreviewRequest {
|
|
863
|
-
/**
|
|
1318
|
+
/**
|
|
1319
|
+
* Plan ID.
|
|
1320
|
+
* @format GUID
|
|
1321
|
+
*/
|
|
864
1322
|
planId?: string;
|
|
865
1323
|
/**
|
|
866
1324
|
* Start date for the ordered plan.
|
|
@@ -868,9 +1326,16 @@ export interface GetGuestOnlineOrderPreviewRequest {
|
|
|
868
1326
|
* Default: Current date
|
|
869
1327
|
*/
|
|
870
1328
|
startDate?: Date | null;
|
|
871
|
-
/**
|
|
1329
|
+
/**
|
|
1330
|
+
* Coupon code to apply.
|
|
1331
|
+
* @minLength 1
|
|
1332
|
+
* @maxLength 20
|
|
1333
|
+
*/
|
|
872
1334
|
couponCode?: string | null;
|
|
873
|
-
/**
|
|
1335
|
+
/**
|
|
1336
|
+
* Email for checkout
|
|
1337
|
+
* @format EMAIL
|
|
1338
|
+
*/
|
|
874
1339
|
email?: string;
|
|
875
1340
|
}
|
|
876
1341
|
export interface GetGuestOnlineOrderPreviewResponse {
|
|
@@ -882,315 +1347,108 @@ export interface GetGuestOnlineOrderPreviewResponse {
|
|
|
882
1347
|
*/
|
|
883
1348
|
purchaseLimitExceeded?: boolean;
|
|
884
1349
|
}
|
|
885
|
-
export interface GetOfflineOrderPreviewRequest {
|
|
886
|
-
/** ID of the plan of the previewed order, from the Plans API. */
|
|
887
|
-
planId: string;
|
|
888
|
-
/** Member ID of the buyer the previewed order is for, from the Members API. */
|
|
889
|
-
memberId: string;
|
|
890
|
-
/**
|
|
891
|
-
* Start date and time for plan of the previewed order in a `YYYY-MM-DDThh:mm[:ss][.sss]Z` format.
|
|
892
|
-
*
|
|
893
|
-
* Default: Current date and time.
|
|
894
|
-
*/
|
|
895
|
-
startDate?: Date | null;
|
|
896
|
-
/** Coupon code to apply, from the Coupons API. */
|
|
897
|
-
couponCode?: string | null;
|
|
898
|
-
}
|
|
899
|
-
export interface GetOfflineOrderPreviewResponse {
|
|
900
|
-
/** The previewed order, as if the plan had been ordered. */
|
|
901
|
-
order?: Order;
|
|
902
|
-
/**
|
|
903
|
-
* Whether this previewed order would exceed the permitted amount of purchases available
|
|
904
|
-
* for this plan for this buyer.
|
|
905
|
-
*
|
|
906
|
-
* Always `false` for plans that do not have purchase limits.
|
|
907
|
-
*/
|
|
908
|
-
purchaseLimitExceeded?: boolean;
|
|
909
|
-
}
|
|
910
|
-
export interface GetPricePreviewRequest {
|
|
911
|
-
/** ID of plan to preview. */
|
|
912
|
-
planId: string;
|
|
913
|
-
/** Coupon code to apply, from the Coupons API. */
|
|
914
|
-
couponCode?: string | null;
|
|
915
|
-
}
|
|
916
|
-
export interface GetPricePreviewResponse {
|
|
917
|
-
/** Pricing details. */
|
|
918
|
-
prices?: SpannedPrice[];
|
|
919
|
-
}
|
|
920
|
-
export interface ChangeStartDateRequest {
|
|
921
|
-
/** Draft order ID. */
|
|
922
|
-
orderId?: string;
|
|
923
|
-
/** New valid from date (timestamp). */
|
|
924
|
-
startDate?: Date | null;
|
|
925
|
-
}
|
|
926
|
-
export interface ChangeStartDateResponse {
|
|
927
|
-
/** Updated draft order. */
|
|
928
|
-
order?: Order;
|
|
929
|
-
}
|
|
930
|
-
export interface OrderStartDateChanged {
|
|
931
|
-
/** Order whose `startDate` changed. */
|
|
932
|
-
order?: Order;
|
|
933
|
-
}
|
|
934
|
-
export interface ApplyCouponRequest {
|
|
935
|
-
/** Draft order ID. */
|
|
936
|
-
orderId?: string;
|
|
937
|
-
/** Coupon code to apply. */
|
|
938
|
-
couponCode?: string;
|
|
939
|
-
}
|
|
940
|
-
export interface ApplyCouponResponse {
|
|
941
|
-
/** Order with applied coupon and recalculated tax. */
|
|
942
|
-
order?: Order;
|
|
943
|
-
}
|
|
944
|
-
export interface SetSubmissionRequest {
|
|
945
|
-
/** Order ID. */
|
|
946
|
-
orderId?: string;
|
|
947
|
-
/** Submission ID. */
|
|
948
|
-
submissionId?: string;
|
|
949
|
-
}
|
|
950
|
-
export interface SetSubmissionResponse {
|
|
951
|
-
/** Order with submission id */
|
|
952
|
-
order?: Order;
|
|
953
|
-
}
|
|
954
|
-
export interface OrderPurchased {
|
|
955
|
-
/** Order that was paid for. If a free or an offline order, the order that was created. */
|
|
956
|
-
order?: Order;
|
|
957
|
-
}
|
|
958
|
-
export interface OrderStarted {
|
|
959
|
-
/** Order that reached its `startDate`. */
|
|
960
|
-
order?: Order;
|
|
961
|
-
}
|
|
962
|
-
/**
|
|
963
|
-
* Triggered at the start of a new payment cycle for an existing order.
|
|
964
|
-
*
|
|
965
|
-
* This webhook does not trigger at the initial start of an offline order.
|
|
966
|
-
*/
|
|
967
|
-
export interface OrderCycleStarted {
|
|
968
|
-
/** Order whose new cycle started. */
|
|
969
|
-
order?: Order;
|
|
970
|
-
/** Number of the payment cycle will be 0 when the order is in the free trial period. In other cases, the cycle number starts from 1. */
|
|
971
|
-
cycleNumber?: number;
|
|
972
|
-
}
|
|
973
|
-
/** Emitted when a recurring order is canceled for the next payment cycle */
|
|
974
|
-
export interface OrderAutoRenewCanceled {
|
|
975
|
-
/** Order that is canceled, effective at the end of the current payment cycle. */
|
|
976
|
-
order?: Order;
|
|
977
|
-
}
|
|
978
|
-
export interface OrderEnded {
|
|
979
|
-
/** Order that ended. */
|
|
980
|
-
order?: Order;
|
|
981
|
-
}
|
|
982
|
-
export interface GetOrderRequest {
|
|
983
|
-
/** Order ID. */
|
|
984
|
-
_id: string;
|
|
985
|
-
/**
|
|
986
|
-
* Predefined set of fields to return.
|
|
987
|
-
*
|
|
988
|
-
* Default: If `fieldSet` is omitted, no order form submission data is returned.
|
|
989
|
-
*/
|
|
990
|
-
fieldSet?: Set;
|
|
991
|
-
}
|
|
992
|
-
export interface GetOrderResponse {
|
|
993
|
-
/** Order. */
|
|
994
|
-
order?: Order;
|
|
995
|
-
}
|
|
996
|
-
export interface ListOrdersRequest {
|
|
997
|
-
/** Filter by a buyer's member ID, from the Members API. */
|
|
998
|
-
buyerIds?: string[];
|
|
999
|
-
/** Filter by plan IDs, from the Plans API. */
|
|
1000
|
-
planIds?: string[];
|
|
1001
|
-
/** Filter by whether or not the auto-renewal of recurring orders was canceled. */
|
|
1002
|
-
autoRenewCanceled?: boolean | null;
|
|
1003
|
-
/** Filter by order status. */
|
|
1004
|
-
orderStatuses?: OrderStatus[];
|
|
1005
|
-
/** Filter by payment status. */
|
|
1006
|
-
paymentStatuses?: PaymentStatus[];
|
|
1007
|
-
/**
|
|
1008
|
-
* Number of orders to return. See Sorting and Paging for more information.
|
|
1009
|
-
*
|
|
1010
|
-
* Max: `50`
|
|
1011
|
-
*/
|
|
1012
|
-
limit?: number | null;
|
|
1013
|
-
/** Number of orders to skip in the current sort order. */
|
|
1014
|
-
offset?: number | null;
|
|
1015
|
-
/**
|
|
1016
|
-
* Sort order.
|
|
1017
|
-
*
|
|
1018
|
-
* Use `ASC` for ascending order or `DESC` for descending order.
|
|
1019
|
-
*
|
|
1020
|
-
* Default: `DESC`.
|
|
1021
|
-
*/
|
|
1022
|
-
sorting?: Sorting;
|
|
1023
|
-
/**
|
|
1024
|
-
* Predefined set of fields to return.
|
|
1025
|
-
*
|
|
1026
|
-
* Default: If `fieldSet` is omitted, no order form submission data is returned.
|
|
1027
|
-
*/
|
|
1028
|
-
fieldSet?: Set;
|
|
1029
|
-
}
|
|
1030
|
-
export interface ListOrdersResponse {
|
|
1031
|
-
/** List of orders. */
|
|
1032
|
-
orders?: Order[];
|
|
1033
|
-
/** Object containing paging-related data (number of orders returned, offset). */
|
|
1034
|
-
pagingMetadata?: PagingMetadataV2;
|
|
1035
|
-
}
|
|
1036
|
-
export interface OrdersQueryOrdersRequest {
|
|
1037
|
-
/** Query filter. */
|
|
1038
|
-
query?: QueryV2;
|
|
1039
|
-
}
|
|
1040
|
-
export interface OrdersQueryOrdersResponse {
|
|
1041
|
-
/** Retrieved orders. */
|
|
1042
|
-
plans?: Order[];
|
|
1043
|
-
/** Paging-related data (number of orders returned, offset). */
|
|
1044
|
-
pagingMetadata?: PagingMetadataV2;
|
|
1045
|
-
}
|
|
1046
|
-
export interface GetOrdersStatsRequest {
|
|
1047
|
-
}
|
|
1048
|
-
export interface GetOrdersStatsResponse {
|
|
1049
|
-
/** Total number of orders. */
|
|
1050
|
-
totalOrderCount?: number;
|
|
1051
|
-
/** Number of active orders. */
|
|
1052
|
-
activeOrderCount?: number;
|
|
1053
|
-
}
|
|
1054
|
-
export interface GetAvailableOrderActionsRequest {
|
|
1055
|
-
/** Order ID. */
|
|
1056
|
-
_id?: string;
|
|
1057
|
-
}
|
|
1058
|
-
export interface GetAvailableOrderActionsResponse {
|
|
1059
|
-
/** Whether the order can be suspended. */
|
|
1060
|
-
suspendable?: boolean;
|
|
1061
|
-
/** If the order cannot be suspended, a reason is returned here. */
|
|
1062
|
-
notSuspendableReason?: ReasonNotSuspendable;
|
|
1063
|
-
/** Whether the order can be canceled by the buyer. */
|
|
1064
|
-
cancelableByBuyer?: boolean;
|
|
1065
|
-
}
|
|
1066
|
-
export declare enum ReasonNotSuspendable {
|
|
1067
|
-
/** Undefined reason. */
|
|
1068
|
-
UNDEFINED = "UNDEFINED",
|
|
1069
|
-
/** Saved in the database but is awaiting payment. Non-active orders can't be suspended. */
|
|
1070
|
-
PENDING = "PENDING",
|
|
1071
|
-
/** Trial orders can't be suspended. */
|
|
1072
|
-
TRIAL = "TRIAL",
|
|
1073
|
-
/** Canceled orders can't be suspended. */
|
|
1074
|
-
CANCELED = "CANCELED",
|
|
1075
|
-
/** Ended orders can't be suspended. */
|
|
1076
|
-
ENDED = "ENDED",
|
|
1077
|
-
/** Paid for orders with future start dates can't be suspended. */
|
|
1078
|
-
NOT_STARTED = "NOT_STARTED",
|
|
1079
|
-
/** Order is already suspended. */
|
|
1080
|
-
ALREADY_SUSPENDED = "ALREADY_SUSPENDED",
|
|
1081
|
-
/** Orders based on recurring payments using older stripe versions can't be suspended. */
|
|
1082
|
-
OLD_STRIPE = "OLD_STRIPE"
|
|
1083
|
-
}
|
|
1084
|
-
export interface PostponeEndDateRequest {
|
|
1085
|
-
/** Order ID. */
|
|
1086
|
-
_id: string;
|
|
1350
|
+
export interface GetOfflineOrderPreviewRequest {
|
|
1087
1351
|
/**
|
|
1088
|
-
*
|
|
1352
|
+
* ID of the plan of the previewed order, from the Plans API.
|
|
1353
|
+
* @format GUID
|
|
1354
|
+
*/
|
|
1355
|
+
planId: string;
|
|
1356
|
+
/**
|
|
1357
|
+
* Member ID of the buyer the previewed order is for, from the Members API.
|
|
1358
|
+
* @format GUID
|
|
1359
|
+
*/
|
|
1360
|
+
memberId: string;
|
|
1361
|
+
/**
|
|
1362
|
+
* Start date and time for plan of the previewed order in a `YYYY-MM-DDThh:mm[:ss][.sss]Z` format.
|
|
1089
1363
|
*
|
|
1090
|
-
*
|
|
1364
|
+
* Default: Current date and time.
|
|
1091
1365
|
*/
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1366
|
+
startDate?: Date | null;
|
|
1367
|
+
/**
|
|
1368
|
+
* Coupon code to apply, from the Coupons API.
|
|
1369
|
+
* @minLength 1
|
|
1370
|
+
* @maxLength 20
|
|
1371
|
+
*/
|
|
1372
|
+
couponCode?: string | null;
|
|
1095
1373
|
}
|
|
1096
|
-
export interface
|
|
1097
|
-
/**
|
|
1374
|
+
export interface GetOfflineOrderPreviewResponse {
|
|
1375
|
+
/** The previewed order, as if the plan had been ordered. */
|
|
1098
1376
|
order?: Order;
|
|
1377
|
+
/**
|
|
1378
|
+
* Whether this previewed order would exceed the permitted amount of purchases available
|
|
1379
|
+
* for this plan for this buyer.
|
|
1380
|
+
*
|
|
1381
|
+
* Always `false` for plans that do not have purchase limits.
|
|
1382
|
+
*/
|
|
1383
|
+
purchaseLimitExceeded?: boolean;
|
|
1099
1384
|
}
|
|
1100
|
-
export interface
|
|
1101
|
-
/**
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1385
|
+
export interface GetPricePreviewRequest {
|
|
1386
|
+
/**
|
|
1387
|
+
* ID of plan to preview.
|
|
1388
|
+
* @format GUID
|
|
1389
|
+
*/
|
|
1390
|
+
planId: string;
|
|
1391
|
+
/**
|
|
1392
|
+
* Coupon code to apply, from the Coupons API.
|
|
1393
|
+
* @minLength 1
|
|
1394
|
+
* @maxLength 20
|
|
1395
|
+
*/
|
|
1396
|
+
couponCode?: string | null;
|
|
1107
1397
|
}
|
|
1108
|
-
export interface
|
|
1109
|
-
/**
|
|
1110
|
-
|
|
1398
|
+
export interface GetPricePreviewResponse {
|
|
1399
|
+
/** Pricing details. */
|
|
1400
|
+
prices?: SpannedPrice[];
|
|
1111
1401
|
}
|
|
1112
|
-
export interface
|
|
1402
|
+
export interface ChangeStartDateRequest {
|
|
1403
|
+
/**
|
|
1404
|
+
* Draft order ID.
|
|
1405
|
+
* @format GUID
|
|
1406
|
+
*/
|
|
1407
|
+
orderId?: string;
|
|
1408
|
+
/** New valid from date (timestamp). */
|
|
1409
|
+
startDate?: Date | null;
|
|
1113
1410
|
}
|
|
1114
|
-
export interface
|
|
1115
|
-
/**
|
|
1411
|
+
export interface ChangeStartDateResponse {
|
|
1412
|
+
/** Updated draft order. */
|
|
1116
1413
|
order?: Order;
|
|
1117
1414
|
}
|
|
1118
|
-
export interface
|
|
1119
|
-
/** Order
|
|
1120
|
-
_id: string;
|
|
1121
|
-
}
|
|
1122
|
-
export interface PauseOrderResponse {
|
|
1123
|
-
}
|
|
1124
|
-
export interface OrderPaused {
|
|
1125
|
-
/** Paused order. */
|
|
1415
|
+
export interface OrderStartDateChanged {
|
|
1416
|
+
/** Order whose `startDate` changed. */
|
|
1126
1417
|
order?: Order;
|
|
1127
1418
|
}
|
|
1128
|
-
export interface
|
|
1129
|
-
/**
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1419
|
+
export interface ApplyCouponRequest {
|
|
1420
|
+
/**
|
|
1421
|
+
* Draft order ID.
|
|
1422
|
+
* @format GUID
|
|
1423
|
+
*/
|
|
1424
|
+
orderId?: string;
|
|
1425
|
+
/**
|
|
1426
|
+
* Coupon code to apply.
|
|
1427
|
+
* @minLength 1
|
|
1428
|
+
* @maxLength 20
|
|
1429
|
+
*/
|
|
1430
|
+
couponCode?: string;
|
|
1139
1431
|
}
|
|
1140
|
-
export interface
|
|
1141
|
-
/**
|
|
1142
|
-
itemMetadata?: ItemMetadata;
|
|
1143
|
-
/** The order. */
|
|
1432
|
+
export interface ApplyCouponResponse {
|
|
1433
|
+
/** Order with applied coupon and recalculated tax. */
|
|
1144
1434
|
order?: Order;
|
|
1145
1435
|
}
|
|
1146
|
-
export interface
|
|
1147
|
-
/**
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
/** Error code. */
|
|
1158
|
-
code?: string;
|
|
1159
|
-
/** Description of the error. */
|
|
1160
|
-
description?: string;
|
|
1161
|
-
/** Data related to the error. */
|
|
1162
|
-
data?: Record<string, any> | null;
|
|
1163
|
-
}
|
|
1164
|
-
export interface BulkActionMetadata {
|
|
1165
|
-
/** Number of items that were successfully processed. */
|
|
1166
|
-
totalSuccesses?: number;
|
|
1167
|
-
/** Number of items that couldn't be processed. */
|
|
1168
|
-
totalFailures?: number;
|
|
1169
|
-
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
1170
|
-
undetailedFailures?: number;
|
|
1171
|
-
}
|
|
1172
|
-
export interface ResumeOrderRequest {
|
|
1173
|
-
/** Order ID. */
|
|
1174
|
-
_id: string;
|
|
1175
|
-
}
|
|
1176
|
-
export interface ResumeOrderResponse {
|
|
1436
|
+
export interface SetSubmissionRequest {
|
|
1437
|
+
/**
|
|
1438
|
+
* Order ID.
|
|
1439
|
+
* @format GUID
|
|
1440
|
+
*/
|
|
1441
|
+
orderId?: string;
|
|
1442
|
+
/**
|
|
1443
|
+
* Submission ID.
|
|
1444
|
+
* @format GUID
|
|
1445
|
+
*/
|
|
1446
|
+
submissionId?: string;
|
|
1177
1447
|
}
|
|
1178
|
-
export interface
|
|
1179
|
-
/**
|
|
1448
|
+
export interface SetSubmissionResponse {
|
|
1449
|
+
/** Order with submission id */
|
|
1180
1450
|
order?: Order;
|
|
1181
1451
|
}
|
|
1182
|
-
export interface BulkResumeOrderRequest {
|
|
1183
|
-
/** List of Order IDs. */
|
|
1184
|
-
ids?: string[];
|
|
1185
|
-
/** Set to true to return Order entity in response. */
|
|
1186
|
-
returnFullEntity?: boolean;
|
|
1187
|
-
}
|
|
1188
|
-
export interface BulkResumeOrderResponse {
|
|
1189
|
-
/** Orders that were resumed. */
|
|
1190
|
-
results?: BulkOrderResult[];
|
|
1191
|
-
/** Bulk action metadata. */
|
|
1192
|
-
bulkActionMetadata?: BulkActionMetadata;
|
|
1193
|
-
}
|
|
1194
1452
|
interface BuyerNonNullableFields {
|
|
1195
1453
|
memberId: string;
|
|
1196
1454
|
contactId: string;
|
|
@@ -1282,6 +1540,12 @@ export interface OrderNonNullableFields {
|
|
|
1282
1540
|
planPrice: string;
|
|
1283
1541
|
onEcom: boolean;
|
|
1284
1542
|
}
|
|
1543
|
+
export interface GetOrderResponseNonNullableFields {
|
|
1544
|
+
order?: OrderNonNullableFields;
|
|
1545
|
+
}
|
|
1546
|
+
export interface ListOrdersResponseNonNullableFields {
|
|
1547
|
+
orders: OrderNonNullableFields[];
|
|
1548
|
+
}
|
|
1285
1549
|
export interface MemberGetOrderResponseNonNullableFields {
|
|
1286
1550
|
order?: OrderNonNullableFields;
|
|
1287
1551
|
}
|
|
@@ -1306,16 +1570,16 @@ export interface GetPricePreviewResponseNonNullableFields {
|
|
|
1306
1570
|
price?: PriceDetailsNonNullableFields;
|
|
1307
1571
|
prices: SpannedPriceNonNullableFields[];
|
|
1308
1572
|
}
|
|
1309
|
-
export interface GetOrderResponseNonNullableFields {
|
|
1310
|
-
order?: OrderNonNullableFields;
|
|
1311
|
-
}
|
|
1312
|
-
export interface ListOrdersResponseNonNullableFields {
|
|
1313
|
-
orders: OrderNonNullableFields[];
|
|
1314
|
-
}
|
|
1315
1573
|
export interface BaseEventMetadata {
|
|
1316
|
-
/**
|
|
1574
|
+
/**
|
|
1575
|
+
* App instance ID.
|
|
1576
|
+
* @format GUID
|
|
1577
|
+
*/
|
|
1317
1578
|
instanceId?: string | null;
|
|
1318
|
-
/**
|
|
1579
|
+
/**
|
|
1580
|
+
* Event type.
|
|
1581
|
+
* @maxLength 150
|
|
1582
|
+
*/
|
|
1319
1583
|
eventType?: string;
|
|
1320
1584
|
/** The identification type and identity data. */
|
|
1321
1585
|
identity?: IdentificationData;
|
|
@@ -1358,81 +1622,16 @@ export interface EventMetadata extends BaseEventMetadata {
|
|
|
1358
1622
|
*/
|
|
1359
1623
|
entityEventSequence?: string | null;
|
|
1360
1624
|
}
|
|
1361
|
-
export interface
|
|
1362
|
-
data:
|
|
1363
|
-
metadata: EventMetadata;
|
|
1364
|
-
}
|
|
1365
|
-
/**
|
|
1366
|
-
* Triggered when an order is canceled.
|
|
1367
|
-
*
|
|
1368
|
-
* This webhook is triggered either immediately or at the end of the current payment cycle, as follows:
|
|
1369
|
-
* + If the order is canceled and `effectiveAt` is set to `IMMEDIATELY`, the webhook is triggered immediately when canceled.
|
|
1370
|
-
* + If the order is canceled and `effectiveAt` is set to `NEXT_PAYMENT_DATE`, the webhook is triggered at the end of the current payment cycle. In this case, the Order Auto Renew Canceled Webhook is triggered immediately.
|
|
1371
|
-
* @permissionScope Manage Orders
|
|
1372
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
1373
|
-
* @permissionScope Read Orders
|
|
1374
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS
|
|
1375
|
-
* @permissionScope Manage Events
|
|
1376
|
-
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
1377
|
-
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
1378
|
-
* @webhook
|
|
1379
|
-
* @eventType wix.pricing_plans.v2.order_canceled
|
|
1380
|
-
* @serviceIdentifier com.wixpress.membership.v2.orders.member.MemberOrdersService
|
|
1381
|
-
* @slug canceled
|
|
1382
|
-
*/
|
|
1383
|
-
export declare function onOrderCanceled(handler: (event: OrderCanceledEnvelope) => void | Promise<void>): void;
|
|
1384
|
-
export interface OrderCreatedEnvelope {
|
|
1385
|
-
entity: Order;
|
|
1386
|
-
metadata: EventMetadata;
|
|
1387
|
-
}
|
|
1388
|
-
/**
|
|
1389
|
-
* Triggered when an order is created.
|
|
1390
|
-
* @permissionScope Manage Orders
|
|
1391
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
1392
|
-
* @permissionScope Read Orders
|
|
1393
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS
|
|
1394
|
-
* @permissionScope Manage Events
|
|
1395
|
-
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
1396
|
-
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
1397
|
-
* @webhook
|
|
1398
|
-
* @eventType wix.pricing_plans.v2.order_created
|
|
1399
|
-
* @serviceIdentifier com.wixpress.membership.v2.orders.CheckoutService
|
|
1400
|
-
* @slug created
|
|
1401
|
-
*/
|
|
1402
|
-
export declare function onOrderCreated(handler: (event: OrderCreatedEnvelope) => void | Promise<void>): void;
|
|
1403
|
-
export interface OrderStartDateChangedEnvelope {
|
|
1404
|
-
data: OrderStartDateChanged;
|
|
1405
|
-
metadata: EventMetadata;
|
|
1406
|
-
}
|
|
1407
|
-
/**
|
|
1408
|
-
* Triggered when an order's `startDate` is changed.
|
|
1409
|
-
* @permissionScope Manage Orders
|
|
1410
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
1411
|
-
* @permissionScope Read Orders
|
|
1412
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS
|
|
1413
|
-
* @permissionScope Manage Events
|
|
1414
|
-
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
1415
|
-
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
1416
|
-
* @webhook
|
|
1417
|
-
* @eventType wix.pricing_plans.v2.order_start_date_changed
|
|
1418
|
-
* @serviceIdentifier com.wixpress.membership.v2.orders.CheckoutService
|
|
1419
|
-
* @slug start_date_changed
|
|
1420
|
-
*/
|
|
1421
|
-
export declare function onOrderStartDateChanged(handler: (event: OrderStartDateChangedEnvelope) => void | Promise<void>): void;
|
|
1422
|
-
export interface OrderUpdatedEnvelope {
|
|
1423
|
-
entity: Order;
|
|
1625
|
+
export interface OrderAutoRenewCanceledEnvelope {
|
|
1626
|
+
data: OrderAutoRenewCanceled;
|
|
1424
1627
|
metadata: EventMetadata;
|
|
1425
1628
|
}
|
|
1426
1629
|
/**
|
|
1427
|
-
* Triggered
|
|
1630
|
+
* Triggered when an order is canceled and `effectiveAt` is set to `NEXT_PAYMENT_DATE`.
|
|
1428
1631
|
*
|
|
1429
|
-
*
|
|
1430
|
-
* +
|
|
1431
|
-
* +
|
|
1432
|
-
* + Offline order is marked as paid. Order Marked As Paid is also triggered.
|
|
1433
|
-
* + End date of the order is postponed. Order End Date Postponed is also triggered
|
|
1434
|
-
* + Order is paused, or a paused order is resumed. Order Paused and Order Resumed, respectively, are also triggered.
|
|
1435
|
-
* + Order is canceled, either immediately or at the end of the payment cycle. Order Canceled and Order Auto Renew Canceled, respectively, are also triggered.
|
|
1632
|
+
* This webhook is *not* triggered in the following scenarios:
|
|
1633
|
+
* + When an order is canceled and `effectiveAt` is set to `IMMEDIATELY`. Instead, at the time of cancellation, Order Canceled is triggered.
|
|
1634
|
+
* + When an order expires at the end of the current payment cycle because it was canceled and `effectiveAt` was set to `NEXT_PAYMENT_DATE`. Instead, at the time of expiration, Order Canceled and Order Ended are triggered.
|
|
1436
1635
|
* @permissionScope Manage Orders
|
|
1437
1636
|
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
1438
1637
|
* @permissionScope Read Orders
|
|
@@ -1441,21 +1640,21 @@ export interface OrderUpdatedEnvelope {
|
|
|
1441
1640
|
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
1442
1641
|
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
1443
1642
|
* @webhook
|
|
1444
|
-
* @eventType wix.pricing_plans.v2.
|
|
1445
|
-
* @serviceIdentifier com.wixpress.membership.v2.orders.
|
|
1446
|
-
* @slug
|
|
1643
|
+
* @eventType wix.pricing_plans.v2.order_auto_renew_canceled
|
|
1644
|
+
* @serviceIdentifier com.wixpress.membership.v2.orders.OrderManagementService
|
|
1645
|
+
* @slug auto_renew_canceled
|
|
1447
1646
|
*/
|
|
1448
|
-
export declare function
|
|
1449
|
-
export interface
|
|
1450
|
-
data:
|
|
1647
|
+
export declare function onOrderAutoRenewCanceled(handler: (event: OrderAutoRenewCanceledEnvelope) => void | Promise<void>): void;
|
|
1648
|
+
export interface OrderCanceledEnvelope {
|
|
1649
|
+
data: OrderCanceled;
|
|
1451
1650
|
metadata: EventMetadata;
|
|
1452
1651
|
}
|
|
1453
1652
|
/**
|
|
1454
|
-
* Triggered when an order is canceled
|
|
1653
|
+
* Triggered when an order is canceled.
|
|
1455
1654
|
*
|
|
1456
|
-
* This webhook is
|
|
1457
|
-
* +
|
|
1458
|
-
* +
|
|
1655
|
+
* This webhook is triggered either immediately or at the end of the current payment cycle, as follows:
|
|
1656
|
+
* + If the order is canceled and `effectiveAt` is set to `IMMEDIATELY`, the webhook is triggered immediately when canceled.
|
|
1657
|
+
* + If the order is canceled and `effectiveAt` is set to `NEXT_PAYMENT_DATE`, the webhook is triggered at the end of the current payment cycle. In this case, the Order Auto Renew Canceled Webhook is triggered immediately.
|
|
1459
1658
|
* @permissionScope Manage Orders
|
|
1460
1659
|
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
1461
1660
|
* @permissionScope Read Orders
|
|
@@ -1464,11 +1663,11 @@ export interface OrderAutoRenewCanceledEnvelope {
|
|
|
1464
1663
|
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
1465
1664
|
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
1466
1665
|
* @webhook
|
|
1467
|
-
* @eventType wix.pricing_plans.v2.
|
|
1666
|
+
* @eventType wix.pricing_plans.v2.order_canceled
|
|
1468
1667
|
* @serviceIdentifier com.wixpress.membership.v2.orders.OrderManagementService
|
|
1469
|
-
* @slug
|
|
1668
|
+
* @slug canceled
|
|
1470
1669
|
*/
|
|
1471
|
-
export declare function
|
|
1670
|
+
export declare function onOrderCanceled(handler: (event: OrderCanceledEnvelope) => void | Promise<void>): void;
|
|
1472
1671
|
export interface OrderCycleStartedEnvelope {
|
|
1473
1672
|
data: OrderCycleStarted;
|
|
1474
1673
|
metadata: EventMetadata;
|
|
@@ -1601,36 +1800,297 @@ export interface OrderResumedEnvelope {
|
|
|
1601
1800
|
* Triggered when a paused order is resumed.
|
|
1602
1801
|
* @permissionScope Manage Orders
|
|
1603
1802
|
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
1604
|
-
* @permissionScope Read Orders
|
|
1605
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS
|
|
1606
|
-
* @permissionScope Manage Events
|
|
1607
|
-
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
1608
|
-
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
1609
|
-
* @webhook
|
|
1610
|
-
* @eventType wix.pricing_plans.v2.order_resumed
|
|
1611
|
-
* @serviceIdentifier com.wixpress.membership.v2.orders.OrderManagementService
|
|
1612
|
-
* @slug resumed
|
|
1803
|
+
* @permissionScope Read Orders
|
|
1804
|
+
* @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS
|
|
1805
|
+
* @permissionScope Manage Events
|
|
1806
|
+
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
1807
|
+
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
1808
|
+
* @webhook
|
|
1809
|
+
* @eventType wix.pricing_plans.v2.order_resumed
|
|
1810
|
+
* @serviceIdentifier com.wixpress.membership.v2.orders.OrderManagementService
|
|
1811
|
+
* @slug resumed
|
|
1812
|
+
*/
|
|
1813
|
+
export declare function onOrderResumed(handler: (event: OrderResumedEnvelope) => void | Promise<void>): void;
|
|
1814
|
+
export interface OrderStartedEnvelope {
|
|
1815
|
+
data: OrderStarted;
|
|
1816
|
+
metadata: EventMetadata;
|
|
1817
|
+
}
|
|
1818
|
+
/**
|
|
1819
|
+
* Triggered when an order reaches its `startDate`. Applies to both purchased and free orders.
|
|
1820
|
+
* @permissionScope Manage Orders
|
|
1821
|
+
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
1822
|
+
* @permissionScope Read Orders
|
|
1823
|
+
* @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS
|
|
1824
|
+
* @permissionScope Manage Events
|
|
1825
|
+
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
1826
|
+
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
1827
|
+
* @webhook
|
|
1828
|
+
* @eventType wix.pricing_plans.v2.order_started
|
|
1829
|
+
* @serviceIdentifier com.wixpress.membership.v2.orders.OrderManagementService
|
|
1830
|
+
* @slug started
|
|
1831
|
+
*/
|
|
1832
|
+
export declare function onOrderStarted(handler: (event: OrderStartedEnvelope) => void | Promise<void>): void;
|
|
1833
|
+
export interface OrderUpdatedEnvelope {
|
|
1834
|
+
entity: Order;
|
|
1835
|
+
metadata: EventMetadata;
|
|
1836
|
+
}
|
|
1837
|
+
/**
|
|
1838
|
+
* Triggered for any of the following update events:
|
|
1839
|
+
*
|
|
1840
|
+
* + Order is paid for. Order Purchased is also triggered.
|
|
1841
|
+
* + Order reaches its start date or end date. Order Started and Order Ended, respectively, are also triggered.
|
|
1842
|
+
* + New payment cycle of an order starts. Order Cycle Started is also triggered.
|
|
1843
|
+
* + Offline order is marked as paid. Order Marked As Paid is also triggered.
|
|
1844
|
+
* + End date of the order is postponed. Order End Date Postponed is also triggered
|
|
1845
|
+
* + Order is paused, or a paused order is resumed. Order Paused and Order Resumed, respectively, are also triggered.
|
|
1846
|
+
* + Order is canceled, either immediately or at the end of the payment cycle. Order Canceled and Order Auto Renew Canceled, respectively, are also triggered.
|
|
1847
|
+
* @permissionScope Manage Orders
|
|
1848
|
+
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
1849
|
+
* @permissionScope Read Orders
|
|
1850
|
+
* @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS
|
|
1851
|
+
* @permissionScope Manage Events
|
|
1852
|
+
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
1853
|
+
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
1854
|
+
* @webhook
|
|
1855
|
+
* @eventType wix.pricing_plans.v2.order_updated
|
|
1856
|
+
* @serviceIdentifier com.wixpress.membership.v2.orders.OrderManagementService
|
|
1857
|
+
* @slug updated
|
|
1858
|
+
*/
|
|
1859
|
+
export declare function onOrderUpdated(handler: (event: OrderUpdatedEnvelope) => void | Promise<void>): void;
|
|
1860
|
+
export interface OrderCreatedEnvelope {
|
|
1861
|
+
entity: Order;
|
|
1862
|
+
metadata: EventMetadata;
|
|
1863
|
+
}
|
|
1864
|
+
/**
|
|
1865
|
+
* Triggered when an order is created.
|
|
1866
|
+
* @permissionScope Manage Orders
|
|
1867
|
+
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
1868
|
+
* @permissionScope Read Orders
|
|
1869
|
+
* @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS
|
|
1870
|
+
* @permissionScope Manage Events
|
|
1871
|
+
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
1872
|
+
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
1873
|
+
* @webhook
|
|
1874
|
+
* @eventType wix.pricing_plans.v2.order_created
|
|
1875
|
+
* @serviceIdentifier com.wixpress.membership.v2.orders.CheckoutService
|
|
1876
|
+
* @slug created
|
|
1877
|
+
*/
|
|
1878
|
+
export declare function onOrderCreated(handler: (event: OrderCreatedEnvelope) => void | Promise<void>): void;
|
|
1879
|
+
export interface OrderStartDateChangedEnvelope {
|
|
1880
|
+
data: OrderStartDateChanged;
|
|
1881
|
+
metadata: EventMetadata;
|
|
1882
|
+
}
|
|
1883
|
+
/**
|
|
1884
|
+
* Triggered when an order's `startDate` is changed.
|
|
1885
|
+
* @permissionScope Manage Orders
|
|
1886
|
+
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
1887
|
+
* @permissionScope Read Orders
|
|
1888
|
+
* @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS
|
|
1889
|
+
* @permissionScope Manage Events
|
|
1890
|
+
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
1891
|
+
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
1892
|
+
* @webhook
|
|
1893
|
+
* @eventType wix.pricing_plans.v2.order_start_date_changed
|
|
1894
|
+
* @serviceIdentifier com.wixpress.membership.v2.orders.CheckoutService
|
|
1895
|
+
* @slug start_date_changed
|
|
1896
|
+
*/
|
|
1897
|
+
export declare function onOrderStartDateChanged(handler: (event: OrderStartDateChangedEnvelope) => void | Promise<void>): void;
|
|
1898
|
+
/**
|
|
1899
|
+
* Retrieves an order by ID.
|
|
1900
|
+
* @param _id - Order ID.
|
|
1901
|
+
* @public
|
|
1902
|
+
* @requiredField _id
|
|
1903
|
+
* @param options - Options to use when getting an order.
|
|
1904
|
+
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
1905
|
+
* @permissionScope Manage Orders
|
|
1906
|
+
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
1907
|
+
* @permissionScope Read Orders
|
|
1908
|
+
* @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS
|
|
1909
|
+
* @permissionScope Manage Events
|
|
1910
|
+
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
1911
|
+
* @applicableIdentity APP
|
|
1912
|
+
* @fqn com.wixpress.membership.v2.orders.OrderManagementService.GetOrder
|
|
1913
|
+
*/
|
|
1914
|
+
export declare function managementGetOrder(_id: string, options?: ManagementGetOrderOptions): Promise<GetOrderResponse & GetOrderResponseNonNullableFields>;
|
|
1915
|
+
export interface ManagementGetOrderOptions {
|
|
1916
|
+
/**
|
|
1917
|
+
* Predefined set of fields to return.
|
|
1918
|
+
*
|
|
1919
|
+
* Default: If `fieldSet` is omitted, no order form submission data is returned.
|
|
1920
|
+
*/
|
|
1921
|
+
fieldSet?: Set;
|
|
1922
|
+
}
|
|
1923
|
+
/**
|
|
1924
|
+
* Retrieves a list of up to 50 pricing plan orders and details, given the specified sorting and filtering.
|
|
1925
|
+
*
|
|
1926
|
+
* By default, this endpoint will retrieve all orders and return them sorted by `createdDate` in `DESC`, descending order.
|
|
1927
|
+
* `sort.fieldName` supports `endDate` and `createdDate` fields and defaults to `ASC`, ascending order.
|
|
1928
|
+
* @public
|
|
1929
|
+
* @param options - Filtering, sorting, and pagination options.
|
|
1930
|
+
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
1931
|
+
* @permissionScope Manage Orders
|
|
1932
|
+
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
1933
|
+
* @permissionScope Read Orders
|
|
1934
|
+
* @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS
|
|
1935
|
+
* @permissionScope Manage Events
|
|
1936
|
+
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
1937
|
+
* @applicableIdentity APP
|
|
1938
|
+
* @fqn com.wixpress.membership.v2.orders.OrderManagementService.ListOrders
|
|
1939
|
+
*/
|
|
1940
|
+
export declare function managementListOrders(options?: ManagementListOrdersOptions): Promise<ListOrdersResponse & ListOrdersResponseNonNullableFields>;
|
|
1941
|
+
export interface ManagementListOrdersOptions {
|
|
1942
|
+
/**
|
|
1943
|
+
* Filter by a buyer's member ID, from the Members API.
|
|
1944
|
+
* @format GUID
|
|
1945
|
+
*/
|
|
1946
|
+
buyerIds?: string[];
|
|
1947
|
+
/**
|
|
1948
|
+
* Filter by plan IDs, from the Plans API.
|
|
1949
|
+
* @format GUID
|
|
1950
|
+
*/
|
|
1951
|
+
planIds?: string[];
|
|
1952
|
+
/** Filter by whether or not the auto-renewal of recurring orders was canceled. */
|
|
1953
|
+
autoRenewCanceled?: boolean | null;
|
|
1954
|
+
/** Filter by order status. */
|
|
1955
|
+
orderStatuses?: OrderStatus[];
|
|
1956
|
+
/** Filter by payment status. */
|
|
1957
|
+
paymentStatuses?: PaymentStatus[];
|
|
1958
|
+
/**
|
|
1959
|
+
* Number of orders to return. See Sorting and Paging for more information.
|
|
1960
|
+
*
|
|
1961
|
+
* Max: `50`
|
|
1962
|
+
* @min 1
|
|
1963
|
+
* @max 50
|
|
1964
|
+
*/
|
|
1965
|
+
limit?: number | null;
|
|
1966
|
+
/** Number of orders to skip in the current sort order. */
|
|
1967
|
+
offset?: number | null;
|
|
1968
|
+
/**
|
|
1969
|
+
* Sort order.
|
|
1970
|
+
*
|
|
1971
|
+
* Use `ASC` for ascending order or `DESC` for descending order.
|
|
1972
|
+
*
|
|
1973
|
+
* Default: `DESC`.
|
|
1974
|
+
*/
|
|
1975
|
+
sorting?: Sorting;
|
|
1976
|
+
/**
|
|
1977
|
+
* Predefined set of fields to return.
|
|
1978
|
+
*
|
|
1979
|
+
* Default: If `fieldSet` is omitted, no order form submission data is returned.
|
|
1980
|
+
*/
|
|
1981
|
+
fieldSet?: Set;
|
|
1982
|
+
}
|
|
1983
|
+
/**
|
|
1984
|
+
* Extends the duration of a pricing plan order by postponing the order's `endDate`. Postponing the end date of an order does not impact payments.
|
|
1985
|
+
*
|
|
1986
|
+
* New `endDate` must be later than the order's current `endDate`. Can't postpone orders that are unlimited.
|
|
1987
|
+
* Can't postpone an order with `status`: `PAUSED`.
|
|
1988
|
+
* @param _id - Order ID.
|
|
1989
|
+
* @param endDate - New end date and time.
|
|
1990
|
+
*
|
|
1991
|
+
* Must be later than the current end date and time.
|
|
1992
|
+
* @public
|
|
1993
|
+
* @requiredField _id
|
|
1994
|
+
* @requiredField endDate
|
|
1995
|
+
* @param options - Options for postponing the end date of an order.
|
|
1996
|
+
* @permissionId PRICING_PLANS.MANAGE_ORDERS
|
|
1997
|
+
* @permissionScope Manage Orders
|
|
1998
|
+
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
1999
|
+
* @applicableIdentity APP
|
|
2000
|
+
* @fqn com.wixpress.membership.v2.orders.OrderManagementService.PostponeEndDate
|
|
2001
|
+
*/
|
|
2002
|
+
export declare function postponeEndDate(_id: string, endDate: Date | null): Promise<void>;
|
|
2003
|
+
/**
|
|
2004
|
+
* Cancels an existing order.
|
|
2005
|
+
*
|
|
2006
|
+
* For orders with recurring payments, a cancellation can be set to occur either `IMMEDIATELY` or at the `NEXT_PAYMENT_DATE`.
|
|
2007
|
+
* For orders with one-time payments, a cancellation can only be set for `IMMEDIATELY`.
|
|
2008
|
+
*
|
|
2009
|
+
* #### Canceling during the free trial period.
|
|
2010
|
+
*
|
|
2011
|
+
* When a buyer cancels their order during the free trial period, the buyer's subscription expires at the end
|
|
2012
|
+
* of the free trial period and they will not be billed. The buyer may continue using the benefits until the end
|
|
2013
|
+
* of the free trial period.
|
|
2014
|
+
*
|
|
2015
|
+
* When a Wix user cancels an ordered plan during the free trial period, they choose whether to apply the cancellation
|
|
2016
|
+
* `IMMEDIATELY` or at the `NEXT_PAYMENT_DATE`. Canceling `IMMEDIATELY` will end the subscription for the buyer
|
|
2017
|
+
* immediately, even during the free trial period and the buyer won't be billed. Canceling at the
|
|
2018
|
+
* `NEXT_PAYMENT_DATE` allows the buyer to continue using the benefits of the subscription until the end of the free trial period.
|
|
2019
|
+
* Then, the subscription ends and the buyer is not billed.
|
|
2020
|
+
* @param _id - Order ID.
|
|
2021
|
+
* @param effectiveAt - __Required.__ When the order will be canceled. One-time orders can only be canceled `IMMEDIATELY`.
|
|
2022
|
+
* @public
|
|
2023
|
+
* @requiredField _id
|
|
2024
|
+
* @requiredField effectiveAt
|
|
2025
|
+
* @param options - Options for canceling orders.
|
|
2026
|
+
* @permissionId PRICING_PLANS.MANAGE_ORDERS
|
|
2027
|
+
* @permissionScope Manage Orders
|
|
2028
|
+
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
2029
|
+
* @applicableIdentity APP
|
|
2030
|
+
* @fqn com.wixpress.membership.v2.orders.OrderManagementService.CancelOrder
|
|
2031
|
+
*/
|
|
2032
|
+
export declare function cancelOrder(_id: string, effectiveAt: CancellationEffectiveAt): Promise<void>;
|
|
2033
|
+
/**
|
|
2034
|
+
* Marks an offline order as paid.
|
|
2035
|
+
* > __Note__: Marking separate payment cycles as paid is not yet supported. The entire order will be marked as paid. Subsequent offline payments do trigger events and emails, but are not registered as additional offline payments.
|
|
2036
|
+
*
|
|
2037
|
+
* Marking an offline order as paid causes the following changes:
|
|
2038
|
+
* - The order's `lastPaymentStatus` changes to `"PAID"`.
|
|
2039
|
+
* - The order's status changes to either `"PENDING"` or `"ACTIVE"`, depending on the order's `startDate`.
|
|
2040
|
+
*
|
|
2041
|
+
* An error occurs if you attempt to:
|
|
2042
|
+
* - Mark an already-paid, offline order as paid. You cannot mark an offline order as paid twice.
|
|
2043
|
+
* - Mark an online order as paid. The Mark as Paid method is supported for offline orders only.
|
|
2044
|
+
* @param _id - Order ID.
|
|
2045
|
+
* @public
|
|
2046
|
+
* @requiredField _id
|
|
2047
|
+
* @permissionId PRICING_PLANS.MANAGE_ORDERS
|
|
2048
|
+
* @permissionScope Manage Orders
|
|
2049
|
+
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
2050
|
+
* @applicableIdentity APP
|
|
2051
|
+
* @fqn com.wixpress.membership.v2.orders.OrderManagementService.MarkAsPaid
|
|
2052
|
+
*/
|
|
2053
|
+
export declare function markAsPaid(_id: string): Promise<void>;
|
|
2054
|
+
/**
|
|
2055
|
+
* Pauses an order. Calling this method changes the order status to `"PAUSED"` and updates the `pausePeriods` array.
|
|
2056
|
+
*
|
|
2057
|
+
* Only orders with `status`: `ACTIVE` can be paused.
|
|
2058
|
+
* For orders with recurring payments, it also pauses the payment schedule. Buyers are not charged when an order is paused.
|
|
2059
|
+
* Pausing an order affects the end date of the order by adding the time the order is paused to the `endDate`.
|
|
2060
|
+
* The `endDate` and the `earliestEndDate` for the order are adjusted to include the pause period when the order is resumed.
|
|
2061
|
+
*
|
|
2062
|
+
* To resume a paused order, call Resume Order.
|
|
2063
|
+
* @param _id - Order ID.
|
|
2064
|
+
* @public
|
|
2065
|
+
* @requiredField _id
|
|
2066
|
+
* @permissionId PRICING_PLANS.MANAGE_ORDERS
|
|
2067
|
+
* @permissionScope Manage Orders
|
|
2068
|
+
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
2069
|
+
* @applicableIdentity APP
|
|
2070
|
+
* @fqn com.wixpress.membership.v2.orders.OrderManagementService.PauseOrder
|
|
1613
2071
|
*/
|
|
1614
|
-
export declare function
|
|
1615
|
-
export interface OrderStartedEnvelope {
|
|
1616
|
-
data: OrderStarted;
|
|
1617
|
-
metadata: EventMetadata;
|
|
1618
|
-
}
|
|
2072
|
+
export declare function pauseOrder(_id: string): Promise<void>;
|
|
1619
2073
|
/**
|
|
1620
|
-
*
|
|
2074
|
+
* Resumes a paused order. For orders with recurring payments, it also restarts the payment schedule.
|
|
2075
|
+
*
|
|
2076
|
+
* Resuming an order causes the following changes:
|
|
2077
|
+
* - The order status changes to `"ACTIVE"`.
|
|
2078
|
+
* - The `pausePeriods` array is updated.
|
|
2079
|
+
* - The `endDate` for the order is adjusted to include the pause period.
|
|
2080
|
+
* - For orders with recurring payments, the payment schedule is restarted.
|
|
2081
|
+
* - The `earliestEndDate` is adjusted to include the pause period. (This property is reserved for future use).
|
|
2082
|
+
*
|
|
2083
|
+
* To pause an order, call Pause Order.
|
|
2084
|
+
* @param _id - Order ID.
|
|
2085
|
+
* @public
|
|
2086
|
+
* @requiredField _id
|
|
2087
|
+
* @permissionId PRICING_PLANS.MANAGE_ORDERS
|
|
1621
2088
|
* @permissionScope Manage Orders
|
|
1622
2089
|
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
1623
|
-
* @
|
|
1624
|
-
* @
|
|
1625
|
-
* @permissionScope Manage Events
|
|
1626
|
-
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
1627
|
-
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
1628
|
-
* @webhook
|
|
1629
|
-
* @eventType wix.pricing_plans.v2.order_started
|
|
1630
|
-
* @serviceIdentifier com.wixpress.membership.v2.orders.OrderManagementService
|
|
1631
|
-
* @slug started
|
|
2090
|
+
* @applicableIdentity APP
|
|
2091
|
+
* @fqn com.wixpress.membership.v2.orders.OrderManagementService.ResumeOrder
|
|
1632
2092
|
*/
|
|
1633
|
-
export declare function
|
|
2093
|
+
export declare function resumeOrder(_id: string): Promise<void>;
|
|
1634
2094
|
/**
|
|
1635
2095
|
* Retrieves an order for the currently logged-in member by ID.
|
|
1636
2096
|
* @param _id - Order ID.
|
|
@@ -1661,7 +2121,10 @@ export interface MemberGetOrderOptions {
|
|
|
1661
2121
|
*/
|
|
1662
2122
|
export declare function memberListOrders(options?: MemberListOrdersOptions): Promise<MemberListOrdersResponse & MemberListOrdersResponseNonNullableFields>;
|
|
1663
2123
|
export interface MemberListOrdersOptions {
|
|
1664
|
-
/**
|
|
2124
|
+
/**
|
|
2125
|
+
* Filter by plan IDs.
|
|
2126
|
+
* @format GUID
|
|
2127
|
+
*/
|
|
1665
2128
|
planIds?: string[];
|
|
1666
2129
|
/** Filter for orders where auto renewal was canceled. */
|
|
1667
2130
|
autoRenewCanceled?: boolean | null;
|
|
@@ -1669,7 +2132,11 @@ export interface MemberListOrdersOptions {
|
|
|
1669
2132
|
orderStatuses?: OrderStatus[];
|
|
1670
2133
|
/** Filter by payment status. */
|
|
1671
2134
|
paymentStatuses?: PaymentStatus[];
|
|
1672
|
-
/**
|
|
2135
|
+
/**
|
|
2136
|
+
* Limit the number of pricing plans returned. Default limit is 50.
|
|
2137
|
+
* @min 1
|
|
2138
|
+
* @max 50
|
|
2139
|
+
*/
|
|
1673
2140
|
limit?: number | null;
|
|
1674
2141
|
/** Number of entries to offset. */
|
|
1675
2142
|
offset?: number | null;
|
|
@@ -1722,11 +2189,18 @@ export interface CreateOnlineOrderOptions {
|
|
|
1722
2189
|
* Default: Current date and time.
|
|
1723
2190
|
*/
|
|
1724
2191
|
startDate?: Date | null;
|
|
1725
|
-
/**
|
|
2192
|
+
/**
|
|
2193
|
+
* Coupon code to apply.
|
|
2194
|
+
* @minLength 1
|
|
2195
|
+
* @maxLength 20
|
|
2196
|
+
*/
|
|
1726
2197
|
couponCode?: string | null;
|
|
1727
2198
|
/** Provided if checkout is initiated on buyer's behalf. */
|
|
1728
2199
|
onBehalf?: OnBehalf;
|
|
1729
|
-
/**
|
|
2200
|
+
/**
|
|
2201
|
+
* Submission ID of the form submitted with this order.
|
|
2202
|
+
* @format GUID
|
|
2203
|
+
*/
|
|
1730
2204
|
submissionId?: string | null;
|
|
1731
2205
|
}
|
|
1732
2206
|
/**
|
|
@@ -1773,9 +2247,16 @@ export interface CreateOfflineOrderOptions {
|
|
|
1773
2247
|
* Default: `false`
|
|
1774
2248
|
*/
|
|
1775
2249
|
paid?: boolean | null;
|
|
1776
|
-
/**
|
|
2250
|
+
/**
|
|
2251
|
+
* Coupon code to apply, from the Coupons API.
|
|
2252
|
+
* @minLength 1
|
|
2253
|
+
* @maxLength 20
|
|
2254
|
+
*/
|
|
1777
2255
|
couponCode?: string | null;
|
|
1778
|
-
/**
|
|
2256
|
+
/**
|
|
2257
|
+
* Form submission ID that was submitted with the order.
|
|
2258
|
+
* @format GUID
|
|
2259
|
+
*/
|
|
1779
2260
|
submissionId?: string | null;
|
|
1780
2261
|
}
|
|
1781
2262
|
/**
|
|
@@ -1792,12 +2273,16 @@ export interface CreateOfflineOrderOptions {
|
|
|
1792
2273
|
* @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
|
|
1793
2274
|
* @permissionScope Manage Events
|
|
1794
2275
|
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
2276
|
+
* @permissionScope Manage Challenges
|
|
2277
|
+
* @permissionScopeId SCOPE.CHALLENGES.MANAGE
|
|
1795
2278
|
* @permissionScope Manage Portfolio
|
|
1796
2279
|
* @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
|
|
1797
2280
|
* @permissionScope Access Verticals by Automations
|
|
1798
2281
|
* @permissionScopeId SCOPE.CRM.ACCESS-VERTICALS-BY-AUTOMATIONS
|
|
1799
2282
|
* @permissionScope Manage Restaurants - all permissions
|
|
1800
2283
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
2284
|
+
* @permissionScope Set Up Automations
|
|
2285
|
+
* @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
|
|
1801
2286
|
* @applicableIdentity APP
|
|
1802
2287
|
* @applicableIdentity MEMBER
|
|
1803
2288
|
* @fqn com.wixpress.membership.v2.orders.CheckoutService.GetOnlineOrderPreview
|
|
@@ -1810,7 +2295,11 @@ export interface GetOnlineOrderPreviewOptions {
|
|
|
1810
2295
|
* Default: Current date and time.
|
|
1811
2296
|
*/
|
|
1812
2297
|
startDate?: Date | null;
|
|
1813
|
-
/**
|
|
2298
|
+
/**
|
|
2299
|
+
* Coupon code to apply.
|
|
2300
|
+
* @minLength 1
|
|
2301
|
+
* @maxLength 20
|
|
2302
|
+
*/
|
|
1814
2303
|
couponCode?: string | null;
|
|
1815
2304
|
}
|
|
1816
2305
|
/**
|
|
@@ -1845,7 +2334,11 @@ export interface GetOfflineOrderPreviewOptions {
|
|
|
1845
2334
|
* Default: Current date and time.
|
|
1846
2335
|
*/
|
|
1847
2336
|
startDate?: Date | null;
|
|
1848
|
-
/**
|
|
2337
|
+
/**
|
|
2338
|
+
* Coupon code to apply, from the Coupons API.
|
|
2339
|
+
* @minLength 1
|
|
2340
|
+
* @maxLength 20
|
|
2341
|
+
*/
|
|
1849
2342
|
couponCode?: string | null;
|
|
1850
2343
|
}
|
|
1851
2344
|
/**
|
|
@@ -1872,6 +2365,8 @@ export interface GetOfflineOrderPreviewOptions {
|
|
|
1872
2365
|
* @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS
|
|
1873
2366
|
* @permissionScope Manage Events
|
|
1874
2367
|
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
2368
|
+
* @permissionScope Manage Challenges
|
|
2369
|
+
* @permissionScopeId SCOPE.CHALLENGES.MANAGE
|
|
1875
2370
|
* @permissionScope Manage Portfolio
|
|
1876
2371
|
* @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
|
|
1877
2372
|
* @permissionScope Access Verticals by Automations
|
|
@@ -1880,201 +2375,19 @@ export interface GetOfflineOrderPreviewOptions {
|
|
|
1880
2375
|
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS
|
|
1881
2376
|
* @permissionScope Manage Restaurants - all permissions
|
|
1882
2377
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
2378
|
+
* @permissionScope Set Up Automations
|
|
2379
|
+
* @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
|
|
1883
2380
|
* @applicableIdentity APP
|
|
1884
2381
|
* @applicableIdentity VISITOR
|
|
1885
2382
|
* @fqn com.wixpress.membership.v2.orders.CheckoutService.GetPricePreview
|
|
1886
2383
|
*/
|
|
1887
2384
|
export declare function getPricePreview(planId: string, options?: GetPricePreviewOptions): Promise<GetPricePreviewResponse & GetPricePreviewResponseNonNullableFields>;
|
|
1888
2385
|
export interface GetPricePreviewOptions {
|
|
1889
|
-
/** Coupon code to apply, from the Coupons API. */
|
|
1890
|
-
couponCode?: string | null;
|
|
1891
|
-
}
|
|
1892
|
-
/**
|
|
1893
|
-
* Retrieves an order by ID.
|
|
1894
|
-
* @param _id - Order ID.
|
|
1895
|
-
* @public
|
|
1896
|
-
* @requiredField _id
|
|
1897
|
-
* @param options - Options to use when getting an order.
|
|
1898
|
-
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
1899
|
-
* @permissionScope Manage Orders
|
|
1900
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
1901
|
-
* @permissionScope Read Orders
|
|
1902
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS
|
|
1903
|
-
* @permissionScope Manage Events
|
|
1904
|
-
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
1905
|
-
* @applicableIdentity APP
|
|
1906
|
-
* @fqn com.wixpress.membership.v2.orders.OrderManagementService.GetOrder
|
|
1907
|
-
*/
|
|
1908
|
-
export declare function managementGetOrder(_id: string, options?: ManagementGetOrderOptions): Promise<GetOrderResponse & GetOrderResponseNonNullableFields>;
|
|
1909
|
-
export interface ManagementGetOrderOptions {
|
|
1910
|
-
/**
|
|
1911
|
-
* Predefined set of fields to return.
|
|
1912
|
-
*
|
|
1913
|
-
* Default: If `fieldSet` is omitted, no order form submission data is returned.
|
|
1914
|
-
*/
|
|
1915
|
-
fieldSet?: Set;
|
|
1916
|
-
}
|
|
1917
|
-
/**
|
|
1918
|
-
* Retrieves a list of up to 50 pricing plan orders and details, given the specified sorting and filtering.
|
|
1919
|
-
*
|
|
1920
|
-
* By default, this endpoint will retrieve all orders and return them sorted by `createdDate` in `DESC`, descending order.
|
|
1921
|
-
* `sort.fieldName` supports `endDate` and `createdDate` fields and defaults to `ASC`, ascending order.
|
|
1922
|
-
* @public
|
|
1923
|
-
* @param options - Filtering, sorting, and pagination options.
|
|
1924
|
-
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
1925
|
-
* @permissionScope Manage Orders
|
|
1926
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
1927
|
-
* @permissionScope Read Orders
|
|
1928
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS
|
|
1929
|
-
* @permissionScope Manage Events
|
|
1930
|
-
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
1931
|
-
* @applicableIdentity APP
|
|
1932
|
-
* @fqn com.wixpress.membership.v2.orders.OrderManagementService.ListOrders
|
|
1933
|
-
*/
|
|
1934
|
-
export declare function managementListOrders(options?: ManagementListOrdersOptions): Promise<ListOrdersResponse & ListOrdersResponseNonNullableFields>;
|
|
1935
|
-
export interface ManagementListOrdersOptions {
|
|
1936
|
-
/** Filter by a buyer's member ID, from the Members API. */
|
|
1937
|
-
buyerIds?: string[];
|
|
1938
|
-
/** Filter by plan IDs, from the Plans API. */
|
|
1939
|
-
planIds?: string[];
|
|
1940
|
-
/** Filter by whether or not the auto-renewal of recurring orders was canceled. */
|
|
1941
|
-
autoRenewCanceled?: boolean | null;
|
|
1942
|
-
/** Filter by order status. */
|
|
1943
|
-
orderStatuses?: OrderStatus[];
|
|
1944
|
-
/** Filter by payment status. */
|
|
1945
|
-
paymentStatuses?: PaymentStatus[];
|
|
1946
|
-
/**
|
|
1947
|
-
* Number of orders to return. See Sorting and Paging for more information.
|
|
1948
|
-
*
|
|
1949
|
-
* Max: `50`
|
|
1950
|
-
*/
|
|
1951
|
-
limit?: number | null;
|
|
1952
|
-
/** Number of orders to skip in the current sort order. */
|
|
1953
|
-
offset?: number | null;
|
|
1954
|
-
/**
|
|
1955
|
-
* Sort order.
|
|
1956
|
-
*
|
|
1957
|
-
* Use `ASC` for ascending order or `DESC` for descending order.
|
|
1958
|
-
*
|
|
1959
|
-
* Default: `DESC`.
|
|
1960
|
-
*/
|
|
1961
|
-
sorting?: Sorting;
|
|
1962
2386
|
/**
|
|
1963
|
-
*
|
|
1964
|
-
*
|
|
1965
|
-
*
|
|
2387
|
+
* Coupon code to apply, from the Coupons API.
|
|
2388
|
+
* @minLength 1
|
|
2389
|
+
* @maxLength 20
|
|
1966
2390
|
*/
|
|
1967
|
-
|
|
2391
|
+
couponCode?: string | null;
|
|
1968
2392
|
}
|
|
1969
|
-
/**
|
|
1970
|
-
* Extends the duration of a pricing plan order by postponing the order's `endDate`. Postponing the end date of an order does not impact payments.
|
|
1971
|
-
*
|
|
1972
|
-
* New `endDate` must be later than the order's current `endDate`. Can't postpone orders that are unlimited.
|
|
1973
|
-
* Can't postpone an order with `status`: `PAUSED`.
|
|
1974
|
-
* @param _id - Order ID.
|
|
1975
|
-
* @param endDate - New end date and time.
|
|
1976
|
-
*
|
|
1977
|
-
* Must be later than the current end date and time.
|
|
1978
|
-
* @public
|
|
1979
|
-
* @requiredField _id
|
|
1980
|
-
* @requiredField endDate
|
|
1981
|
-
* @param options - Options for postponing the end date of an order.
|
|
1982
|
-
* @permissionId PRICING_PLANS.MANAGE_ORDERS
|
|
1983
|
-
* @permissionScope Manage Orders
|
|
1984
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
1985
|
-
* @applicableIdentity APP
|
|
1986
|
-
* @fqn com.wixpress.membership.v2.orders.OrderManagementService.PostponeEndDate
|
|
1987
|
-
*/
|
|
1988
|
-
export declare function postponeEndDate(_id: string, endDate: Date | null): Promise<void>;
|
|
1989
|
-
/**
|
|
1990
|
-
* Cancels an existing order.
|
|
1991
|
-
*
|
|
1992
|
-
* For orders with recurring payments, a cancellation can be set to occur either `IMMEDIATELY` or at the `NEXT_PAYMENT_DATE`.
|
|
1993
|
-
* For orders with one-time payments, a cancellation can only be set for `IMMEDIATELY`.
|
|
1994
|
-
*
|
|
1995
|
-
* #### Canceling during the free trial period.
|
|
1996
|
-
*
|
|
1997
|
-
* When a buyer cancels their order during the free trial period, the buyer's subscription expires at the end
|
|
1998
|
-
* of the free trial period and they will not be billed. The buyer may continue using the benefits until the end
|
|
1999
|
-
* of the free trial period.
|
|
2000
|
-
*
|
|
2001
|
-
* When a Wix user cancels an ordered plan during the free trial period, they choose whether to apply the cancellation
|
|
2002
|
-
* `IMMEDIATELY` or at the `NEXT_PAYMENT_DATE`. Canceling `IMMEDIATELY` will end the subscription for the buyer
|
|
2003
|
-
* immediately, even during the free trial period and the buyer won't be billed. Canceling at the
|
|
2004
|
-
* `NEXT_PAYMENT_DATE` allows the buyer to continue using the benefits of the subscription until the end of the free trial period.
|
|
2005
|
-
* Then, the subscription ends and the buyer is not billed.
|
|
2006
|
-
* @param _id - Order ID.
|
|
2007
|
-
* @param effectiveAt - __Required.__ When the order will be canceled. One-time orders can only be canceled `IMMEDIATELY`.
|
|
2008
|
-
* @public
|
|
2009
|
-
* @requiredField _id
|
|
2010
|
-
* @requiredField effectiveAt
|
|
2011
|
-
* @param options - Options for canceling orders.
|
|
2012
|
-
* @permissionId PRICING_PLANS.MANAGE_ORDERS
|
|
2013
|
-
* @permissionScope Manage Orders
|
|
2014
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
2015
|
-
* @applicableIdentity APP
|
|
2016
|
-
* @fqn com.wixpress.membership.v2.orders.OrderManagementService.CancelOrder
|
|
2017
|
-
*/
|
|
2018
|
-
export declare function cancelOrder(_id: string, effectiveAt: CancellationEffectiveAt): Promise<void>;
|
|
2019
|
-
/**
|
|
2020
|
-
* Marks an offline order as paid.
|
|
2021
|
-
* > __Note__: Marking separate payment cycles as paid is not yet supported. The entire order will be marked as paid. Subsequent offline payments do trigger events and emails, but are not registered as additional offline payments.
|
|
2022
|
-
*
|
|
2023
|
-
* Marking an offline order as paid causes the following changes:
|
|
2024
|
-
* - The order's `lastPaymentStatus` changes to `"PAID"`.
|
|
2025
|
-
* - The order's status changes to either `"PENDING"` or `"ACTIVE"`, depending on the order's `startDate`.
|
|
2026
|
-
*
|
|
2027
|
-
* An error occurs if you attempt to:
|
|
2028
|
-
* - Mark an already-paid, offline order as paid. You cannot mark an offline order as paid twice.
|
|
2029
|
-
* - Mark an online order as paid. The Mark as Paid method is supported for offline orders only.
|
|
2030
|
-
* @param _id - Order ID.
|
|
2031
|
-
* @public
|
|
2032
|
-
* @requiredField _id
|
|
2033
|
-
* @permissionId PRICING_PLANS.MANAGE_ORDERS
|
|
2034
|
-
* @permissionScope Manage Orders
|
|
2035
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
2036
|
-
* @applicableIdentity APP
|
|
2037
|
-
* @fqn com.wixpress.membership.v2.orders.OrderManagementService.MarkAsPaid
|
|
2038
|
-
*/
|
|
2039
|
-
export declare function markAsPaid(_id: string): Promise<void>;
|
|
2040
|
-
/**
|
|
2041
|
-
* Pauses an order. Calling this method changes the order status to `"PAUSED"` and updates the `pausePeriods` array.
|
|
2042
|
-
*
|
|
2043
|
-
* Only orders with `status`: `ACTIVE` can be paused.
|
|
2044
|
-
* For orders with recurring payments, it also pauses the payment schedule. Buyers are not charged when an order is paused.
|
|
2045
|
-
* Pausing an order affects the end date of the order by adding the time the order is paused to the `endDate`.
|
|
2046
|
-
* The `endDate` and the `earliestEndDate` for the order are adjusted to include the pause period when the order is resumed.
|
|
2047
|
-
*
|
|
2048
|
-
* To resume a paused order, call Resume Order.
|
|
2049
|
-
* @param _id - Order ID.
|
|
2050
|
-
* @public
|
|
2051
|
-
* @requiredField _id
|
|
2052
|
-
* @permissionId PRICING_PLANS.MANAGE_ORDERS
|
|
2053
|
-
* @permissionScope Manage Orders
|
|
2054
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
2055
|
-
* @applicableIdentity APP
|
|
2056
|
-
* @fqn com.wixpress.membership.v2.orders.OrderManagementService.PauseOrder
|
|
2057
|
-
*/
|
|
2058
|
-
export declare function pauseOrder(_id: string): Promise<void>;
|
|
2059
|
-
/**
|
|
2060
|
-
* Resumes a paused order. For orders with recurring payments, it also restarts the payment schedule.
|
|
2061
|
-
*
|
|
2062
|
-
* Resuming an order causes the following changes:
|
|
2063
|
-
* - The order status changes to `"ACTIVE"`.
|
|
2064
|
-
* - The `pausePeriods` array is updated.
|
|
2065
|
-
* - The `endDate` for the order is adjusted to include the pause period.
|
|
2066
|
-
* - For orders with recurring payments, the payment schedule is restarted.
|
|
2067
|
-
* - The `earliestEndDate` is adjusted to include the pause period. (This property is reserved for future use).
|
|
2068
|
-
*
|
|
2069
|
-
* To pause an order, call Pause Order.
|
|
2070
|
-
* @param _id - Order ID.
|
|
2071
|
-
* @public
|
|
2072
|
-
* @requiredField _id
|
|
2073
|
-
* @permissionId PRICING_PLANS.MANAGE_ORDERS
|
|
2074
|
-
* @permissionScope Manage Orders
|
|
2075
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
2076
|
-
* @applicableIdentity APP
|
|
2077
|
-
* @fqn com.wixpress.membership.v2.orders.OrderManagementService.ResumeOrder
|
|
2078
|
-
*/
|
|
2079
|
-
export declare function resumeOrder(_id: string): Promise<void>;
|
|
2080
2393
|
export {};
|