@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.
Files changed (73) hide show
  1. package/build/cjs/src/pricing-plans-v2-order-orders.context.d.ts +42 -42
  2. package/build/cjs/src/pricing-plans-v2-order-orders.context.js +46 -46
  3. package/build/cjs/src/pricing-plans-v2-order-orders.context.js.map +1 -1
  4. package/build/cjs/src/pricing-plans-v2-order-orders.http.d.ts +72 -72
  5. package/build/cjs/src/pricing-plans-v2-order-orders.http.js +343 -343
  6. package/build/cjs/src/pricing-plans-v2-order-orders.http.js.map +1 -1
  7. package/build/cjs/src/pricing-plans-v2-order-orders.meta.d.ts +12 -12
  8. package/build/cjs/src/pricing-plans-v2-order-orders.meta.js +89 -89
  9. package/build/cjs/src/pricing-plans-v2-order-orders.meta.js.map +1 -1
  10. package/build/cjs/src/pricing-plans-v2-order-orders.public.d.ts +113 -113
  11. package/build/cjs/src/pricing-plans-v2-order-orders.public.js +94 -94
  12. package/build/cjs/src/pricing-plans-v2-order-orders.public.js.map +1 -1
  13. package/build/cjs/src/pricing-plans-v2-order-orders.types.d.ts +640 -382
  14. package/build/cjs/src/pricing-plans-v2-order-orders.types.js +9 -9
  15. package/build/cjs/src/pricing-plans-v2-order-orders.types.js.map +1 -1
  16. package/build/cjs/src/pricing-plans-v2-order-orders.universal.d.ts +1042 -729
  17. package/build/cjs/src/pricing-plans-v2-order-orders.universal.js +387 -379
  18. package/build/cjs/src/pricing-plans-v2-order-orders.universal.js.map +1 -1
  19. package/build/es/src/pricing-plans-v2-order-orders.context.d.ts +42 -42
  20. package/build/es/src/pricing-plans-v2-order-orders.context.js +41 -41
  21. package/build/es/src/pricing-plans-v2-order-orders.context.js.map +1 -1
  22. package/build/es/src/pricing-plans-v2-order-orders.http.d.ts +72 -72
  23. package/build/es/src/pricing-plans-v2-order-orders.http.js +335 -335
  24. package/build/es/src/pricing-plans-v2-order-orders.http.js.map +1 -1
  25. package/build/es/src/pricing-plans-v2-order-orders.meta.d.ts +12 -12
  26. package/build/es/src/pricing-plans-v2-order-orders.meta.js +73 -73
  27. package/build/es/src/pricing-plans-v2-order-orders.meta.js.map +1 -1
  28. package/build/es/src/pricing-plans-v2-order-orders.public.d.ts +113 -113
  29. package/build/es/src/pricing-plans-v2-order-orders.public.js +81 -81
  30. package/build/es/src/pricing-plans-v2-order-orders.public.js.map +1 -1
  31. package/build/es/src/pricing-plans-v2-order-orders.types.d.ts +640 -382
  32. package/build/es/src/pricing-plans-v2-order-orders.types.js +8 -8
  33. package/build/es/src/pricing-plans-v2-order-orders.types.js.map +1 -1
  34. package/build/es/src/pricing-plans-v2-order-orders.universal.d.ts +1042 -729
  35. package/build/es/src/pricing-plans-v2-order-orders.universal.js +371 -363
  36. package/build/es/src/pricing-plans-v2-order-orders.universal.js.map +1 -1
  37. package/build/internal/cjs/src/pricing-plans-v2-order-orders.context.d.ts +42 -42
  38. package/build/internal/cjs/src/pricing-plans-v2-order-orders.context.js +46 -46
  39. package/build/internal/cjs/src/pricing-plans-v2-order-orders.context.js.map +1 -1
  40. package/build/internal/cjs/src/pricing-plans-v2-order-orders.http.d.ts +72 -72
  41. package/build/internal/cjs/src/pricing-plans-v2-order-orders.http.js +343 -343
  42. package/build/internal/cjs/src/pricing-plans-v2-order-orders.http.js.map +1 -1
  43. package/build/internal/cjs/src/pricing-plans-v2-order-orders.meta.d.ts +12 -12
  44. package/build/internal/cjs/src/pricing-plans-v2-order-orders.meta.js +89 -89
  45. package/build/internal/cjs/src/pricing-plans-v2-order-orders.meta.js.map +1 -1
  46. package/build/internal/cjs/src/pricing-plans-v2-order-orders.public.d.ts +113 -113
  47. package/build/internal/cjs/src/pricing-plans-v2-order-orders.public.js +94 -94
  48. package/build/internal/cjs/src/pricing-plans-v2-order-orders.public.js.map +1 -1
  49. package/build/internal/cjs/src/pricing-plans-v2-order-orders.types.d.ts +640 -382
  50. package/build/internal/cjs/src/pricing-plans-v2-order-orders.types.js +9 -9
  51. package/build/internal/cjs/src/pricing-plans-v2-order-orders.types.js.map +1 -1
  52. package/build/internal/cjs/src/pricing-plans-v2-order-orders.universal.d.ts +1044 -731
  53. package/build/internal/cjs/src/pricing-plans-v2-order-orders.universal.js +387 -379
  54. package/build/internal/cjs/src/pricing-plans-v2-order-orders.universal.js.map +1 -1
  55. package/build/internal/es/src/pricing-plans-v2-order-orders.context.d.ts +42 -42
  56. package/build/internal/es/src/pricing-plans-v2-order-orders.context.js +41 -41
  57. package/build/internal/es/src/pricing-plans-v2-order-orders.context.js.map +1 -1
  58. package/build/internal/es/src/pricing-plans-v2-order-orders.http.d.ts +72 -72
  59. package/build/internal/es/src/pricing-plans-v2-order-orders.http.js +335 -335
  60. package/build/internal/es/src/pricing-plans-v2-order-orders.http.js.map +1 -1
  61. package/build/internal/es/src/pricing-plans-v2-order-orders.meta.d.ts +12 -12
  62. package/build/internal/es/src/pricing-plans-v2-order-orders.meta.js +73 -73
  63. package/build/internal/es/src/pricing-plans-v2-order-orders.meta.js.map +1 -1
  64. package/build/internal/es/src/pricing-plans-v2-order-orders.public.d.ts +113 -113
  65. package/build/internal/es/src/pricing-plans-v2-order-orders.public.js +81 -81
  66. package/build/internal/es/src/pricing-plans-v2-order-orders.public.js.map +1 -1
  67. package/build/internal/es/src/pricing-plans-v2-order-orders.types.d.ts +640 -382
  68. package/build/internal/es/src/pricing-plans-v2-order-orders.types.js +8 -8
  69. package/build/internal/es/src/pricing-plans-v2-order-orders.types.js.map +1 -1
  70. package/build/internal/es/src/pricing-plans-v2-order-orders.universal.d.ts +1044 -731
  71. package/build/internal/es/src/pricing-plans-v2-order-orders.universal.js +371 -363
  72. package/build/internal/es/src/pricing-plans-v2-order-orders.universal.js.map +1 -1
  73. 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;
@@ -110,6 +114,8 @@ export interface Order {
110
114
  *
111
115
  * Only available for recurring plans.
112
116
  * @readonly
117
+ * @min 1
118
+ * @max 999
113
119
  */
114
120
  freeTrialDays?: number | null;
115
121
  /**
@@ -138,6 +144,7 @@ export interface Order {
138
144
  planDescription?: string;
139
145
  /**
140
146
  * Plan price as it was at the moment of order creation.
147
+ * @format DECIMAL_VALUE
141
148
  * @readonly
142
149
  */
143
150
  planPrice?: string;
@@ -160,11 +167,13 @@ export interface Order {
160
167
  export interface Buyer {
161
168
  /**
162
169
  * Member ID for a Wix site member, from the Members API.
170
+ * @format GUID
163
171
  * @readonly
164
172
  */
165
173
  memberId?: string;
166
174
  /**
167
175
  * Contact ID for a Wix site contact, from the Contacts API.
176
+ * @format GUID
168
177
  * @readonly
169
178
  */
170
179
  contactId?: string;
@@ -176,9 +185,15 @@ export interface PriceDetails extends PriceDetailsPricingModelOneOf {
176
185
  singlePaymentForDuration?: Duration;
177
186
  /** One-time payment. Order is valid until it is canceled. */
178
187
  singlePaymentUnlimited?: boolean | null;
179
- /** Price of the order excluding tax, specified as a monetary amount. for example, `"9.99"`. */
188
+ /**
189
+ * Price of the order excluding tax, specified as a monetary amount. for example, `"9.99"`.
190
+ * @format DECIMAL_VALUE
191
+ */
180
192
  subtotal?: string;
181
- /** Total discount applied. */
193
+ /**
194
+ * Total discount applied.
195
+ * @format DECIMAL_VALUE
196
+ */
182
197
  discount?: string;
183
198
  /** Tax applied. */
184
199
  tax?: Tax;
@@ -186,13 +201,24 @@ export interface PriceDetails extends PriceDetailsPricingModelOneOf {
186
201
  * Price after tax and discount is applied, specified as a monetary amount. For example, `"13.98"`.
187
202
  *
188
203
  * If no tax is applied, the amount is the same as `subtotal`.
204
+ * @format DECIMAL_VALUE
189
205
  */
190
206
  total?: string;
191
- /** Plan price as it was at the moment of order creation. */
207
+ /**
208
+ * Plan price as it was at the moment of order creation.
209
+ * @format DECIMAL_VALUE
210
+ */
192
211
  planPrice?: string;
193
- /** Currency code. Must be valid ISO 4217 currency code (e.g., USD). */
212
+ /**
213
+ * Currency code. Must be valid ISO 4217 currency code (e.g., USD).
214
+ * @format CURRENCY
215
+ */
194
216
  currency?: string;
195
- /** Free trial period for the order in days. Only available for recurring plans. */
217
+ /**
218
+ * Free trial period for the order in days. Only available for recurring plans.
219
+ * @min 1
220
+ * @max 999
221
+ */
196
222
  freeTrialDays?: number | null;
197
223
  /** Coupon applied to the order. Empty means no coupon was applied. */
198
224
  coupon?: Coupon;
@@ -211,9 +237,15 @@ export interface Tax {
211
237
  name?: string;
212
238
  /** Whether tax is included in the original price. When `false`, tax is added at checkout. */
213
239
  includedInPrice?: boolean;
214
- /** Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`. */
240
+ /**
241
+ * Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `"7.00"`.
242
+ * @format DECIMAL_VALUE
243
+ */
215
244
  rate?: string;
216
- /** Total tax, specified as a monetary amount. For example, `"3.99"`. */
245
+ /**
246
+ * Total tax, specified as a monetary amount. For example, `"3.99"`.
247
+ * @format DECIMAL_VALUE
248
+ */
217
249
  amount?: string;
218
250
  }
219
251
  /** An object specifying how often and for how long payments recur (may be forever). */
@@ -227,12 +259,16 @@ export interface Recurrence {
227
259
  * Length of a payment cycle. For example, 1 month to have monthly payments.
228
260
  * Multiply `cycleDuration`'s `count` by `cycleCount` to get the subscription duration.
229
261
  * Currently, only a value of `1` is supported.
262
+ * @max 2000
230
263
  */
231
264
  cycleCount?: number | null;
232
265
  }
233
266
  /** A duration expressed in number of time units. */
234
267
  export interface Duration {
235
- /** Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`. */
268
+ /**
269
+ * Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`.
270
+ * @min 1
271
+ */
236
272
  count?: number | null;
237
273
  /** Unit of time for the cycle duration. */
238
274
  unit?: PeriodUnit;
@@ -250,12 +286,20 @@ export declare enum PeriodUnit {
250
286
  YEAR = "YEAR"
251
287
  }
252
288
  export interface Coupon {
253
- /** Code of the applied coupon. */
289
+ /**
290
+ * Code of the applied coupon.
291
+ * @minLength 1
292
+ * @maxLength 20
293
+ */
254
294
  code?: string;
255
- /** Total discount of the coupon, as a monetary amount. */
295
+ /**
296
+ * Total discount of the coupon, as a monetary amount.
297
+ * @format DECIMAL_VALUE
298
+ */
256
299
  amount?: string;
257
300
  /**
258
301
  * Coupon ID.
302
+ * @format GUID
259
303
  * @readonly
260
304
  */
261
305
  id?: string;
@@ -312,11 +356,17 @@ export interface PriceDuration {
312
356
  numberOfCycles?: number | null;
313
357
  }
314
358
  export interface Price {
315
- /** Price of the order excluding tax, specified as a monetary amount. For example, `"9.99"`. */
359
+ /**
360
+ * Price of the order excluding tax, specified as a monetary amount. For example, `"9.99"`.
361
+ * @format DECIMAL_VALUE
362
+ */
316
363
  subtotal?: string;
317
364
  /** Coupon applied to the order, from the Coupons API. */
318
365
  coupon?: Coupon;
319
- /** Total discount applied to the order. */
366
+ /**
367
+ * Total discount applied to the order.
368
+ * @format DECIMAL_VALUE
369
+ */
320
370
  discount?: string;
321
371
  /**
322
372
  * Tax applied to the order.
@@ -328,20 +378,32 @@ export interface Price {
328
378
  * Price after tax and discount is applied. Specified as a monetary amount, for example, `"13.98"`.
329
379
  *
330
380
  * If no tax is applied, the amount is the same as `subtotal`.
381
+ * @format DECIMAL_VALUE
331
382
  */
332
383
  total?: string;
333
384
  /**
334
385
  * Three-letter currency code in
335
386
  * [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
387
+ * @format CURRENCY
336
388
  */
337
389
  currency?: string;
338
- /** Price change after billing date was change and price was adjusted. Could be positive and negative values. */
390
+ /**
391
+ * Price change after billing date was change and price was adjusted. Could be positive and negative values.
392
+ * @format DECIMAL_VALUE
393
+ */
339
394
  proration?: string;
340
395
  }
341
396
  export interface Fee {
342
- /** Fee name */
397
+ /**
398
+ * Fee name
399
+ * @minLength 1
400
+ * @maxLength 40
401
+ */
343
402
  name?: string;
344
- /** Amount of fee to be charged */
403
+ /**
404
+ * Amount of fee to be charged
405
+ * @decimalValue options { lt:1000000000000, gt:0.000, maxScale:3 }
406
+ */
345
407
  amount?: string;
346
408
  }
347
409
  export declare enum OrderType {
@@ -474,9 +536,15 @@ export interface OrderCycle {
474
536
  endedDate?: Date | null;
475
537
  }
476
538
  export interface FormData {
477
- /** 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. */
539
+ /**
540
+ * 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.
541
+ * @format GUID
542
+ */
478
543
  formId?: string | null;
479
- /** 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. */
544
+ /**
545
+ * 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.
546
+ * @format GUID
547
+ */
480
548
  submissionId?: string | null;
481
549
  /**
482
550
  * Data submitted to the plan's order form at checkout.
@@ -558,8 +626,39 @@ export interface ActionEvent {
558
626
  }
559
627
  export interface Empty {
560
628
  }
561
- export interface MemberGetOrderRequest {
562
- /** Order ID. */
629
+ export interface OrderPurchased {
630
+ /** Order that was paid for. If a free or an offline order, the order that was created. */
631
+ order?: Order;
632
+ }
633
+ export interface OrderStarted {
634
+ /** Order that reached its `startDate`. */
635
+ order?: Order;
636
+ }
637
+ /**
638
+ * Triggered at the start of a new payment cycle for an existing order.
639
+ *
640
+ * This webhook does not trigger at the initial start of an offline order.
641
+ */
642
+ export interface OrderCycleStarted {
643
+ /** Order whose new cycle started. */
644
+ order?: Order;
645
+ /** 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. */
646
+ cycleNumber?: number;
647
+ }
648
+ /** Emitted when a recurring order is canceled for the next payment cycle */
649
+ export interface OrderAutoRenewCanceled {
650
+ /** Order that is canceled, effective at the end of the current payment cycle. */
651
+ order?: Order;
652
+ }
653
+ export interface OrderEnded {
654
+ /** Order that ended. */
655
+ order?: Order;
656
+ }
657
+ export interface GetOrderRequest {
658
+ /**
659
+ * Order ID.
660
+ * @format GUID
661
+ */
563
662
  id: string;
564
663
  /**
565
664
  * Predefined set of fields to return.
@@ -576,24 +675,44 @@ export declare enum Set {
576
675
  /** Returns all order form submission data. */
577
676
  FULL = "FULL"
578
677
  }
579
- export interface MemberGetOrderResponse {
580
- /** Requested order. */
678
+ export interface GetOrderResponse {
679
+ /** Order. */
581
680
  order?: Order;
582
681
  }
583
- export interface MemberListOrdersRequest {
584
- /** Filter by plan IDs. */
682
+ export interface ListOrdersRequest {
683
+ /**
684
+ * Filter by a buyer's member ID, from the Members API.
685
+ * @format GUID
686
+ */
687
+ buyerIds?: string[];
688
+ /**
689
+ * Filter by plan IDs, from the Plans API.
690
+ * @format GUID
691
+ */
585
692
  planIds?: string[];
586
- /** Filter for orders where auto renewal was canceled. */
693
+ /** Filter by whether or not the auto-renewal of recurring orders was canceled. */
587
694
  autoRenewCanceled?: boolean | null;
588
695
  /** Filter by order status. */
589
696
  orderStatuses?: OrderStatus[];
590
697
  /** Filter by payment status. */
591
698
  paymentStatuses?: PaymentStatus[];
592
- /** Limit the number of pricing plans returned. Default limit is 50. */
699
+ /**
700
+ * Number of orders to return. See Sorting and Paging for more information.
701
+ *
702
+ * Max: `50`
703
+ * @min 1
704
+ * @max 50
705
+ */
593
706
  limit?: number | null;
594
- /** Number of entries to offset. */
707
+ /** Number of orders to skip in the current sort order. */
595
708
  offset?: number | null;
596
- /** Sorting direction (defaults to ASC) and field to sort by. */
709
+ /**
710
+ * Sort order.
711
+ *
712
+ * Use `ASC` for ascending order or `DESC` for descending order.
713
+ *
714
+ * Default: `DESC`.
715
+ */
597
716
  sorting?: Sorting;
598
717
  /**
599
718
  * Predefined set of fields to return.
@@ -603,7 +722,10 @@ export interface MemberListOrdersRequest {
603
722
  fieldSet?: Set;
604
723
  }
605
724
  export interface Sorting {
606
- /** Name of the field to sort by. */
725
+ /**
726
+ * Name of the field to sort by.
727
+ * @maxLength 512
728
+ */
607
729
  fieldName?: string;
608
730
  /** Sort order. */
609
731
  order?: SortOrder;
@@ -612,8 +734,8 @@ export declare enum SortOrder {
612
734
  ASC = "ASC",
613
735
  DESC = "DESC"
614
736
  }
615
- export interface MemberListOrdersResponse {
616
- /** Requested orders. */
737
+ export interface ListOrdersResponse {
738
+ /** List of orders. */
617
739
  orders?: Order[];
618
740
  /** Object containing paging-related data (number of orders returned, offset). */
619
741
  pagingMetadata?: PagingMetadataV2;
@@ -631,16 +753,18 @@ export interface PagingMetadataV2 {
631
753
  cursors?: Cursors;
632
754
  }
633
755
  export interface Cursors {
634
- /** Cursor string pointing to the next page in the list of results. */
756
+ /**
757
+ * Cursor string pointing to the next page in the list of results.
758
+ * @maxLength 16000
759
+ */
635
760
  next?: string | null;
636
- /** Cursor pointing to the previous page in the list of results. */
761
+ /**
762
+ * Cursor pointing to the previous page in the list of results.
763
+ * @maxLength 16000
764
+ */
637
765
  prev?: string | null;
638
766
  }
639
- /**
640
- * TODO: Write orders filter and sort docs page
641
- * Retrieves a list of up to 1,000 orders, based on the provided paging, sorting, and filtering.
642
- */
643
- export interface QueryOrdersRequest {
767
+ export interface OrdersQueryOrdersRequest {
644
768
  /** Query filter. */
645
769
  query?: QueryV2;
646
770
  }
@@ -680,29 +804,96 @@ export interface Paging {
680
804
  offset?: number | null;
681
805
  }
682
806
  export interface CursorPaging {
683
- /** Maximum number of items to return in the results. */
807
+ /**
808
+ * Maximum number of items to return in the results.
809
+ * @max 100
810
+ */
684
811
  limit?: number | null;
685
812
  /**
686
813
  * Pointer to the next or previous page in the list of results.
687
814
  *
688
815
  * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
689
816
  * Not relevant for the first request.
817
+ * @maxLength 16000
690
818
  */
691
819
  cursor?: string | null;
692
820
  }
693
- export interface QueryOrdersResponse {
694
- /** Order data. */
821
+ export interface OrdersQueryOrdersResponse {
822
+ /** Retrieved orders. */
695
823
  plans?: Order[];
696
824
  /** Paging-related data (number of orders returned, offset). */
697
825
  pagingMetadata?: PagingMetadataV2;
698
826
  }
699
- export interface RequestCancellationRequest {
700
- /** Order ID. */
827
+ export interface GetOrdersStatsRequest {
828
+ }
829
+ export interface GetOrdersStatsResponse {
830
+ /** Total number of orders. */
831
+ totalOrderCount?: number;
832
+ /** Number of active orders. */
833
+ activeOrderCount?: number;
834
+ }
835
+ export interface GetAvailableOrderActionsRequest {
836
+ /**
837
+ * Order ID.
838
+ * @format GUID
839
+ */
840
+ id?: string;
841
+ }
842
+ export interface GetAvailableOrderActionsResponse {
843
+ /** Whether the order can be suspended. */
844
+ suspendable?: boolean;
845
+ /** If the order cannot be suspended, a reason is returned here. */
846
+ notSuspendableReason?: ReasonNotSuspendable;
847
+ /** Whether the order can be canceled by the buyer. */
848
+ cancelableByBuyer?: boolean;
849
+ }
850
+ export declare enum ReasonNotSuspendable {
851
+ /** Undefined reason. */
852
+ UNDEFINED = "UNDEFINED",
853
+ /** Saved in the database but is awaiting payment. Non-active orders can't be suspended. */
854
+ PENDING = "PENDING",
855
+ /** Trial orders can't be suspended. */
856
+ TRIAL = "TRIAL",
857
+ /** Canceled orders can't be suspended. */
858
+ CANCELED = "CANCELED",
859
+ /** Ended orders can't be suspended. */
860
+ ENDED = "ENDED",
861
+ /** Paid for orders with future start dates can't be suspended. */
862
+ NOT_STARTED = "NOT_STARTED",
863
+ /** Order is already suspended. */
864
+ ALREADY_SUSPENDED = "ALREADY_SUSPENDED",
865
+ /** Orders based on recurring payments using older stripe versions can't be suspended. */
866
+ OLD_STRIPE = "OLD_STRIPE"
867
+ }
868
+ export interface PostponeEndDateRequest {
869
+ /**
870
+ * Order ID.
871
+ * @format GUID
872
+ */
701
873
  id: string;
702
- /** Required. Whether to cancel the order effective immediately or at the next payment date. One-time orders can only be canceled immediately. */
874
+ /**
875
+ * New end date and time.
876
+ *
877
+ * Must be later than the current end date and time.
878
+ */
879
+ endDate: Date | null;
880
+ }
881
+ export interface PostponeEndDateResponse {
882
+ }
883
+ export interface OrderEndDatePostponed {
884
+ /** Order whose `endDate` was postponed. */
885
+ order?: Order;
886
+ }
887
+ export interface CancelOrderRequest {
888
+ /**
889
+ * Order ID.
890
+ * @format GUID
891
+ */
892
+ id: string;
893
+ /** __Required.__ When the order will be canceled. One-time orders can only be canceled `IMMEDIATELY`. */
703
894
  effectiveAt: CancellationEffectiveAt;
704
895
  }
705
- export interface RequestCancellationResponse {
896
+ export interface CancelOrderResponse {
706
897
  }
707
898
  /**
708
899
  * Emitted when an order is canceled immediately or when cycle ends for an order with canceled auto renewal
@@ -713,94 +904,329 @@ export interface OrderCanceled {
713
904
  /** Canceled order. */
714
905
  order?: Order;
715
906
  }
716
- export interface MessageEnvelope {
717
- /** App instance ID. */
718
- instanceId?: string | null;
719
- /** Event type. */
720
- eventType?: string;
721
- /** The identification type and identity data. */
722
- identity?: IdentificationData;
723
- /** Stringify payload. */
724
- data?: string;
725
- }
726
- export interface IdentificationData extends IdentificationDataIdOneOf {
727
- /** ID of a site visitor that has not logged in to the site. */
728
- anonymousVisitorId?: string;
729
- /** ID of a site visitor that has logged in to the site. */
730
- memberId?: string;
731
- /** ID of a Wix user (site owner, contributor, etc.). */
732
- wixUserId?: string;
733
- /** ID of an app. */
734
- appId?: string;
735
- /** @readonly */
736
- identityType?: WebhookIdentityType;
907
+ export interface MarkAsPaidRequest {
908
+ /**
909
+ * Order ID.
910
+ * @format GUID
911
+ */
912
+ id: string;
737
913
  }
738
- /** @oneof */
739
- export interface IdentificationDataIdOneOf {
740
- /** ID of a site visitor that has not logged in to the site. */
741
- anonymousVisitorId?: string;
742
- /** ID of a site visitor that has logged in to the site. */
743
- memberId?: string;
744
- /** ID of a Wix user (site owner, contributor, etc.). */
745
- wixUserId?: string;
746
- /** ID of an app. */
747
- appId?: string;
914
+ export interface MarkAsPaidResponse {
748
915
  }
749
- export declare enum WebhookIdentityType {
750
- UNKNOWN = "UNKNOWN",
751
- ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
752
- MEMBER = "MEMBER",
753
- WIX_USER = "WIX_USER",
754
- APP = "APP"
916
+ export interface OrderMarkedAsPaid {
917
+ /** Order that was marked as paid. */
918
+ order?: Order;
755
919
  }
756
- export interface CreateOnlineOrderRequest {
757
- /** Plan ID. */
758
- planId: string;
920
+ export interface PauseOrderRequest {
759
921
  /**
760
- * Start date and time for the plan of the online order in a `YYYY-MM-DDThh:mm[:ss][.sss]Z` format.
761
- *
762
- * Default: Current date and time.
922
+ * Order ID.
923
+ * @format GUID
763
924
  */
764
- startDate?: Date | null;
765
- /** Coupon code to apply. */
766
- couponCode?: string | null;
767
- /** Provided if checkout is initiated on buyer's behalf. */
768
- onBehalf?: OnBehalf;
769
- /** Submission ID of the form submitted with this order. */
770
- submissionId?: string | null;
925
+ id: string;
771
926
  }
772
- export interface OnBehalf {
773
- /** Member ID. */
774
- memberId?: string;
775
- /** Method by which checkout is initiated. */
776
- orderMethod?: OrderMethod;
927
+ export interface PauseOrderResponse {
777
928
  }
778
- export interface CreateOnlineOrderResponse {
779
- /** Created online order. */
929
+ export interface OrderPaused {
930
+ /** Paused order. */
780
931
  order?: Order;
781
932
  }
782
- export interface CouponsError {
783
- /** Coupon code. */
784
- couponCode?: string;
785
- /** Plan ID. */
786
- planId?: string;
787
- }
788
- export interface CreateGuestOnlineOrderRequest {
789
- /** Plan ID. */
790
- planId?: string;
933
+ export interface BulkPauseOrderRequest {
791
934
  /**
792
- * Start date for the ordered plan.
793
- *
935
+ * List of Order IDs.
936
+ * @format GUID
937
+ * @minSize 1
938
+ * @maxSize 100
939
+ */
940
+ ids?: string[];
941
+ /** Set to true to return Order entity in response. */
942
+ returnFullEntity?: boolean;
943
+ }
944
+ export interface BulkPauseOrderResponse {
945
+ /** Orders that were paused. */
946
+ results?: BulkOrderResult[];
947
+ /** Bulk action metadata. */
948
+ bulkActionMetadata?: BulkActionMetadata;
949
+ }
950
+ export interface BulkOrderResult {
951
+ /** Item metadata */
952
+ itemMetadata?: ItemMetadata;
953
+ /** The order. */
954
+ order?: Order;
955
+ }
956
+ export interface ItemMetadata {
957
+ /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
958
+ id?: string | null;
959
+ /** Index of the item within the request array. Allows for correlation between request and response items. */
960
+ originalIndex?: number;
961
+ /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
962
+ success?: boolean;
963
+ /** Details about the error in case of failure. */
964
+ error?: ApplicationError;
965
+ }
966
+ export interface ApplicationError {
967
+ /** Error code. */
968
+ code?: string;
969
+ /** Description of the error. */
970
+ description?: string;
971
+ /** Data related to the error. */
972
+ data?: Record<string, any> | null;
973
+ }
974
+ export interface BulkActionMetadata {
975
+ /** Number of items that were successfully processed. */
976
+ totalSuccesses?: number;
977
+ /** Number of items that couldn't be processed. */
978
+ totalFailures?: number;
979
+ /** Number of failures without details because detailed failure threshold was exceeded. */
980
+ undetailedFailures?: number;
981
+ }
982
+ export interface ResumeOrderRequest {
983
+ /**
984
+ * Order ID.
985
+ * @format GUID
986
+ */
987
+ id: string;
988
+ }
989
+ export interface ResumeOrderResponse {
990
+ }
991
+ export interface OrderResumed {
992
+ /** Resumed order. */
993
+ order?: Order;
994
+ }
995
+ export interface BulkResumeOrderRequest {
996
+ /**
997
+ * List of Order IDs.
998
+ * @format GUID
999
+ * @minSize 1
1000
+ * @maxSize 100
1001
+ */
1002
+ ids?: string[];
1003
+ /** Set to true to return Order entity in response. */
1004
+ returnFullEntity?: boolean;
1005
+ }
1006
+ export interface BulkResumeOrderResponse {
1007
+ /** Orders that were resumed. */
1008
+ results?: BulkOrderResult[];
1009
+ /** Bulk action metadata. */
1010
+ bulkActionMetadata?: BulkActionMetadata;
1011
+ }
1012
+ export interface MessageEnvelope {
1013
+ /**
1014
+ * App instance ID.
1015
+ * @format GUID
1016
+ */
1017
+ instanceId?: string | null;
1018
+ /**
1019
+ * Event type.
1020
+ * @maxLength 150
1021
+ */
1022
+ eventType?: string;
1023
+ /** The identification type and identity data. */
1024
+ identity?: IdentificationData;
1025
+ /** Stringify payload. */
1026
+ data?: string;
1027
+ }
1028
+ export interface IdentificationData extends IdentificationDataIdOneOf {
1029
+ /**
1030
+ * ID of a site visitor that has not logged in to the site.
1031
+ * @format GUID
1032
+ */
1033
+ anonymousVisitorId?: string;
1034
+ /**
1035
+ * ID of a site visitor that has logged in to the site.
1036
+ * @format GUID
1037
+ */
1038
+ memberId?: string;
1039
+ /**
1040
+ * ID of a Wix user (site owner, contributor, etc.).
1041
+ * @format GUID
1042
+ */
1043
+ wixUserId?: string;
1044
+ /**
1045
+ * ID of an app.
1046
+ * @format GUID
1047
+ */
1048
+ appId?: string;
1049
+ /** @readonly */
1050
+ identityType?: WebhookIdentityType;
1051
+ }
1052
+ /** @oneof */
1053
+ export interface IdentificationDataIdOneOf {
1054
+ /**
1055
+ * ID of a site visitor that has not logged in to the site.
1056
+ * @format GUID
1057
+ */
1058
+ anonymousVisitorId?: string;
1059
+ /**
1060
+ * ID of a site visitor that has logged in to the site.
1061
+ * @format GUID
1062
+ */
1063
+ memberId?: string;
1064
+ /**
1065
+ * ID of a Wix user (site owner, contributor, etc.).
1066
+ * @format GUID
1067
+ */
1068
+ wixUserId?: string;
1069
+ /**
1070
+ * ID of an app.
1071
+ * @format GUID
1072
+ */
1073
+ appId?: string;
1074
+ }
1075
+ export declare enum WebhookIdentityType {
1076
+ UNKNOWN = "UNKNOWN",
1077
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
1078
+ MEMBER = "MEMBER",
1079
+ WIX_USER = "WIX_USER",
1080
+ APP = "APP"
1081
+ }
1082
+ export interface MemberGetOrderRequest {
1083
+ /**
1084
+ * Order ID.
1085
+ * @format GUID
1086
+ */
1087
+ id: string;
1088
+ /**
1089
+ * Predefined set of fields to return.
1090
+ *
1091
+ * Default: If `fieldSet` is omitted, no order form submission data is returned.
1092
+ */
1093
+ fieldSet?: Set;
1094
+ }
1095
+ export interface MemberGetOrderResponse {
1096
+ /** Requested order. */
1097
+ order?: Order;
1098
+ }
1099
+ export interface MemberListOrdersRequest {
1100
+ /**
1101
+ * Filter by plan IDs.
1102
+ * @format GUID
1103
+ */
1104
+ planIds?: string[];
1105
+ /** Filter for orders where auto renewal was canceled. */
1106
+ autoRenewCanceled?: boolean | null;
1107
+ /** Filter by order status. */
1108
+ orderStatuses?: OrderStatus[];
1109
+ /** Filter by payment status. */
1110
+ paymentStatuses?: PaymentStatus[];
1111
+ /**
1112
+ * Limit the number of pricing plans returned. Default limit is 50.
1113
+ * @min 1
1114
+ * @max 50
1115
+ */
1116
+ limit?: number | null;
1117
+ /** Number of entries to offset. */
1118
+ offset?: number | null;
1119
+ /** Sorting direction (defaults to ASC) and field to sort by. */
1120
+ sorting?: Sorting;
1121
+ /**
1122
+ * Predefined set of fields to return.
1123
+ *
1124
+ * Default: If `fieldSet` is omitted, no order form submission data is returned.
1125
+ */
1126
+ fieldSet?: Set;
1127
+ }
1128
+ export interface MemberListOrdersResponse {
1129
+ /** Requested orders. */
1130
+ orders?: Order[];
1131
+ /** Object containing paging-related data (number of orders returned, offset). */
1132
+ pagingMetadata?: PagingMetadataV2;
1133
+ }
1134
+ /**
1135
+ * TODO: Write orders filter and sort docs page
1136
+ * Retrieves a list of up to 1,000 orders, based on the provided paging, sorting, and filtering.
1137
+ */
1138
+ export interface QueryOrdersRequest {
1139
+ /** Query filter. */
1140
+ query?: QueryV2;
1141
+ }
1142
+ export interface QueryOrdersResponse {
1143
+ /** Order data. */
1144
+ plans?: Order[];
1145
+ /** Paging-related data (number of orders returned, offset). */
1146
+ pagingMetadata?: PagingMetadataV2;
1147
+ }
1148
+ export interface RequestCancellationRequest {
1149
+ /**
1150
+ * Order ID.
1151
+ * @format GUID
1152
+ */
1153
+ id: string;
1154
+ /** Required. Whether to cancel the order effective immediately or at the next payment date. One-time orders can only be canceled immediately. */
1155
+ effectiveAt: CancellationEffectiveAt;
1156
+ }
1157
+ export interface RequestCancellationResponse {
1158
+ }
1159
+ export interface CreateOnlineOrderRequest {
1160
+ /**
1161
+ * Plan ID.
1162
+ * @format GUID
1163
+ */
1164
+ planId: string;
1165
+ /**
1166
+ * Start date and time for the plan of the online order in a `YYYY-MM-DDThh:mm[:ss][.sss]Z` format.
1167
+ *
1168
+ * Default: Current date and time.
1169
+ */
1170
+ startDate?: Date | null;
1171
+ /**
1172
+ * Coupon code to apply.
1173
+ * @minLength 1
1174
+ * @maxLength 20
1175
+ */
1176
+ couponCode?: string | null;
1177
+ /** Provided if checkout is initiated on buyer's behalf. */
1178
+ onBehalf?: OnBehalf;
1179
+ /**
1180
+ * Submission ID of the form submitted with this order.
1181
+ * @format GUID
1182
+ */
1183
+ submissionId?: string | null;
1184
+ }
1185
+ export interface OnBehalf {
1186
+ /**
1187
+ * Member ID.
1188
+ * @format GUID
1189
+ */
1190
+ memberId?: string;
1191
+ /** Method by which checkout is initiated. */
1192
+ orderMethod?: OrderMethod;
1193
+ }
1194
+ export interface CreateOnlineOrderResponse {
1195
+ /** Created online order. */
1196
+ order?: Order;
1197
+ }
1198
+ export interface CouponsError {
1199
+ /** Coupon code. */
1200
+ couponCode?: string;
1201
+ /** Plan ID. */
1202
+ planId?: string;
1203
+ }
1204
+ export interface CreateGuestOnlineOrderRequest {
1205
+ /**
1206
+ * Plan ID.
1207
+ * @format GUID
1208
+ */
1209
+ planId?: string;
1210
+ /**
1211
+ * Start date for the ordered plan.
1212
+ *
794
1213
  * Default: Current date
795
1214
  */
796
1215
  startDate?: Date | null;
797
- /** Coupon code to apply. */
1216
+ /**
1217
+ * Coupon code to apply.
1218
+ * @minLength 1
1219
+ * @maxLength 20
1220
+ */
798
1221
  couponCode?: string | null;
799
1222
  /** Captcha data to prove you are not a robot */
800
1223
  captcha?: Captcha;
801
1224
  /** Visitor info */
802
1225
  guest?: Guest;
803
- /** Form submission id that was submitted together with the order */
1226
+ /**
1227
+ * Form submission id that was submitted together with the order
1228
+ * @format GUID
1229
+ */
804
1230
  submissionId?: string | null;
805
1231
  }
806
1232
  export interface Captcha {
@@ -808,7 +1234,10 @@ export interface Captcha {
808
1234
  token?: string;
809
1235
  }
810
1236
  export interface Guest {
811
- /** Email for checkout */
1237
+ /**
1238
+ * Email for checkout
1239
+ * @format EMAIL
1240
+ */
812
1241
  email?: string;
813
1242
  }
814
1243
  export interface CreateGuestOnlineOrderResponse {
@@ -816,9 +1245,15 @@ export interface CreateGuestOnlineOrderResponse {
816
1245
  order?: Order;
817
1246
  }
818
1247
  export interface CreateOfflineOrderRequest {
819
- /** ID of the plan being ordered, from the Plans API. */
1248
+ /**
1249
+ * ID of the plan being ordered, from the Plans API.
1250
+ * @format GUID
1251
+ */
820
1252
  planId: string;
821
- /** ID of the member ordering the plan, from the Members API. */
1253
+ /**
1254
+ * ID of the member ordering the plan, from the Members API.
1255
+ * @format GUID
1256
+ */
822
1257
  memberId: string;
823
1258
  /**
824
1259
  * Start date and time for the ordered plan in a `YYYY-MM-DDThh:mm[:ss][.sss]Z` format.
@@ -832,9 +1267,16 @@ export interface CreateOfflineOrderRequest {
832
1267
  * Default: `false`
833
1268
  */
834
1269
  paid?: boolean | null;
835
- /** Coupon code to apply, from the Coupons API. */
1270
+ /**
1271
+ * Coupon code to apply, from the Coupons API.
1272
+ * @minLength 1
1273
+ * @maxLength 20
1274
+ */
836
1275
  couponCode?: string | null;
837
- /** Form submission ID that was submitted with the order. */
1276
+ /**
1277
+ * Form submission ID that was submitted with the order.
1278
+ * @format GUID
1279
+ */
838
1280
  submissionId?: string | null;
839
1281
  }
840
1282
  export interface CreateOfflineOrderResponse {
@@ -842,9 +1284,15 @@ export interface CreateOfflineOrderResponse {
842
1284
  order?: Order;
843
1285
  }
844
1286
  export interface CreateExternalOrderRequest {
845
- /** Plan ID. */
1287
+ /**
1288
+ * Plan ID.
1289
+ * @format GUID
1290
+ */
846
1291
  planId?: string;
847
- /** Form submission id that was submitted together with the order */
1292
+ /**
1293
+ * Form submission id that was submitted together with the order
1294
+ * @format GUID
1295
+ */
848
1296
  submissionId?: string | null;
849
1297
  }
850
1298
  export interface CreateExternalOrderResponse {
@@ -852,7 +1300,10 @@ export interface CreateExternalOrderResponse {
852
1300
  order?: Order;
853
1301
  }
854
1302
  export interface GetOnlineOrderPreviewRequest {
855
- /** Plan ID. */
1303
+ /**
1304
+ * Plan ID.
1305
+ * @format GUID
1306
+ */
856
1307
  planId: string;
857
1308
  /**
858
1309
  * Start date and time for the plan of the order preview in a `YYYY-MM-DDThh:mm[:ss][.sss]Z` format.
@@ -860,7 +1311,11 @@ export interface GetOnlineOrderPreviewRequest {
860
1311
  * Default: Current date and time.
861
1312
  */
862
1313
  startDate?: Date | null;
863
- /** Coupon code to apply. */
1314
+ /**
1315
+ * Coupon code to apply.
1316
+ * @minLength 1
1317
+ * @maxLength 20
1318
+ */
864
1319
  couponCode?: string | null;
865
1320
  }
866
1321
  export interface GetOnlineOrderPreviewResponse {
@@ -870,7 +1325,10 @@ export interface GetOnlineOrderPreviewResponse {
870
1325
  purchaseLimitExceeded?: boolean;
871
1326
  }
872
1327
  export interface GetGuestOnlineOrderPreviewRequest {
873
- /** Plan ID. */
1328
+ /**
1329
+ * Plan ID.
1330
+ * @format GUID
1331
+ */
874
1332
  planId?: string;
875
1333
  /**
876
1334
  * Start date for the ordered plan.
@@ -878,9 +1336,16 @@ export interface GetGuestOnlineOrderPreviewRequest {
878
1336
  * Default: Current date
879
1337
  */
880
1338
  startDate?: Date | null;
881
- /** Coupon code to apply. */
1339
+ /**
1340
+ * Coupon code to apply.
1341
+ * @minLength 1
1342
+ * @maxLength 20
1343
+ */
882
1344
  couponCode?: string | null;
883
- /** Email for checkout */
1345
+ /**
1346
+ * Email for checkout
1347
+ * @format EMAIL
1348
+ */
884
1349
  email?: string;
885
1350
  }
886
1351
  export interface GetGuestOnlineOrderPreviewResponse {
@@ -893,9 +1358,15 @@ export interface GetGuestOnlineOrderPreviewResponse {
893
1358
  purchaseLimitExceeded?: boolean;
894
1359
  }
895
1360
  export interface GetOfflineOrderPreviewRequest {
896
- /** ID of the plan of the previewed order, from the Plans API. */
1361
+ /**
1362
+ * ID of the plan of the previewed order, from the Plans API.
1363
+ * @format GUID
1364
+ */
897
1365
  planId: string;
898
- /** Member ID of the buyer the previewed order is for, from the Members API. */
1366
+ /**
1367
+ * Member ID of the buyer the previewed order is for, from the Members API.
1368
+ * @format GUID
1369
+ */
899
1370
  memberId: string;
900
1371
  /**
901
1372
  * Start date and time for plan of the previewed order in a `YYYY-MM-DDThh:mm[:ss][.sss]Z` format.
@@ -903,7 +1374,11 @@ export interface GetOfflineOrderPreviewRequest {
903
1374
  * Default: Current date and time.
904
1375
  */
905
1376
  startDate?: Date | null;
906
- /** Coupon code to apply, from the Coupons API. */
1377
+ /**
1378
+ * Coupon code to apply, from the Coupons API.
1379
+ * @minLength 1
1380
+ * @maxLength 20
1381
+ */
907
1382
  couponCode?: string | null;
908
1383
  }
909
1384
  export interface GetOfflineOrderPreviewResponse {
@@ -918,9 +1393,16 @@ export interface GetOfflineOrderPreviewResponse {
918
1393
  purchaseLimitExceeded?: boolean;
919
1394
  }
920
1395
  export interface GetPricePreviewRequest {
921
- /** ID of plan to preview. */
1396
+ /**
1397
+ * ID of plan to preview.
1398
+ * @format GUID
1399
+ */
922
1400
  planId: string;
923
- /** Coupon code to apply, from the Coupons API. */
1401
+ /**
1402
+ * Coupon code to apply, from the Coupons API.
1403
+ * @minLength 1
1404
+ * @maxLength 20
1405
+ */
924
1406
  couponCode?: string | null;
925
1407
  }
926
1408
  export interface GetPricePreviewResponse {
@@ -935,7 +1417,10 @@ export interface GetPricePreviewResponse {
935
1417
  prices?: SpannedPrice[];
936
1418
  }
937
1419
  export interface ChangeStartDateRequest {
938
- /** Draft order ID. */
1420
+ /**
1421
+ * Draft order ID.
1422
+ * @format GUID
1423
+ */
939
1424
  orderId?: string;
940
1425
  /** New valid from date (timestamp). */
941
1426
  startDate?: Date | null;
@@ -949,9 +1434,16 @@ export interface OrderStartDateChanged {
949
1434
  order?: Order;
950
1435
  }
951
1436
  export interface ApplyCouponRequest {
952
- /** Draft order ID. */
1437
+ /**
1438
+ * Draft order ID.
1439
+ * @format GUID
1440
+ */
953
1441
  orderId?: string;
954
- /** Coupon code to apply. */
1442
+ /**
1443
+ * Coupon code to apply.
1444
+ * @minLength 1
1445
+ * @maxLength 20
1446
+ */
955
1447
  couponCode?: string;
956
1448
  }
957
1449
  export interface ApplyCouponResponse {
@@ -959,255 +1451,21 @@ export interface ApplyCouponResponse {
959
1451
  order?: Order;
960
1452
  }
961
1453
  export interface SetSubmissionRequest {
962
- /** Order ID. */
963
- orderId?: string;
964
- /** Submission ID. */
965
- submissionId?: string;
966
- }
967
- export interface SetSubmissionResponse {
968
- /** Order with submission id */
969
- order?: Order;
970
- }
971
- export interface OrderPurchased {
972
- /** Order that was paid for. If a free or an offline order, the order that was created. */
973
- order?: Order;
974
- }
975
- export interface OrderStarted {
976
- /** Order that reached its `startDate`. */
977
- order?: Order;
978
- }
979
- /**
980
- * Triggered at the start of a new payment cycle for an existing order.
981
- *
982
- * This webhook does not trigger at the initial start of an offline order.
983
- */
984
- export interface OrderCycleStarted {
985
- /** Order whose new cycle started. */
986
- order?: Order;
987
- /** 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. */
988
- cycleNumber?: number;
989
- }
990
- /** Emitted when a recurring order is canceled for the next payment cycle */
991
- export interface OrderAutoRenewCanceled {
992
- /** Order that is canceled, effective at the end of the current payment cycle. */
993
- order?: Order;
994
- }
995
- export interface OrderEnded {
996
- /** Order that ended. */
997
- order?: Order;
998
- }
999
- export interface GetOrderRequest {
1000
- /** Order ID. */
1001
- id: string;
1002
- /**
1003
- * Predefined set of fields to return.
1004
- *
1005
- * Default: If `fieldSet` is omitted, no order form submission data is returned.
1006
- */
1007
- fieldSet?: Set;
1008
- }
1009
- export interface GetOrderResponse {
1010
- /** Order. */
1011
- order?: Order;
1012
- }
1013
- export interface ListOrdersRequest {
1014
- /** Filter by a buyer's member ID, from the Members API. */
1015
- buyerIds?: string[];
1016
- /** Filter by plan IDs, from the Plans API. */
1017
- planIds?: string[];
1018
- /** Filter by whether or not the auto-renewal of recurring orders was canceled. */
1019
- autoRenewCanceled?: boolean | null;
1020
- /** Filter by order status. */
1021
- orderStatuses?: OrderStatus[];
1022
- /** Filter by payment status. */
1023
- paymentStatuses?: PaymentStatus[];
1024
- /**
1025
- * Number of orders to return. See Sorting and Paging for more information.
1026
- *
1027
- * Max: `50`
1028
- */
1029
- limit?: number | null;
1030
- /** Number of orders to skip in the current sort order. */
1031
- offset?: number | null;
1032
- /**
1033
- * Sort order.
1034
- *
1035
- * Use `ASC` for ascending order or `DESC` for descending order.
1036
- *
1037
- * Default: `DESC`.
1038
- */
1039
- sorting?: Sorting;
1040
1454
  /**
1041
- * Predefined set of fields to return.
1042
- *
1043
- * Default: If `fieldSet` is omitted, no order form submission data is returned.
1455
+ * Order ID.
1456
+ * @format GUID
1044
1457
  */
1045
- fieldSet?: Set;
1046
- }
1047
- export interface ListOrdersResponse {
1048
- /** List of orders. */
1049
- orders?: Order[];
1050
- /** Object containing paging-related data (number of orders returned, offset). */
1051
- pagingMetadata?: PagingMetadataV2;
1052
- }
1053
- export interface OrdersQueryOrdersRequest {
1054
- /** Query filter. */
1055
- query?: QueryV2;
1056
- }
1057
- export interface OrdersQueryOrdersResponse {
1058
- /** Retrieved orders. */
1059
- plans?: Order[];
1060
- /** Paging-related data (number of orders returned, offset). */
1061
- pagingMetadata?: PagingMetadataV2;
1062
- }
1063
- export interface GetOrdersStatsRequest {
1064
- }
1065
- export interface GetOrdersStatsResponse {
1066
- /** Total number of orders. */
1067
- totalOrderCount?: number;
1068
- /** Number of active orders. */
1069
- activeOrderCount?: number;
1070
- }
1071
- export interface GetAvailableOrderActionsRequest {
1072
- /** Order ID. */
1073
- id?: string;
1074
- }
1075
- export interface GetAvailableOrderActionsResponse {
1076
- /** Whether the order can be suspended. */
1077
- suspendable?: boolean;
1078
- /** If the order cannot be suspended, a reason is returned here. */
1079
- notSuspendableReason?: ReasonNotSuspendable;
1080
- /** Whether the order can be canceled by the buyer. */
1081
- cancelableByBuyer?: boolean;
1082
- }
1083
- export declare enum ReasonNotSuspendable {
1084
- /** Undefined reason. */
1085
- UNDEFINED = "UNDEFINED",
1086
- /** Saved in the database but is awaiting payment. Non-active orders can't be suspended. */
1087
- PENDING = "PENDING",
1088
- /** Trial orders can't be suspended. */
1089
- TRIAL = "TRIAL",
1090
- /** Canceled orders can't be suspended. */
1091
- CANCELED = "CANCELED",
1092
- /** Ended orders can't be suspended. */
1093
- ENDED = "ENDED",
1094
- /** Paid for orders with future start dates can't be suspended. */
1095
- NOT_STARTED = "NOT_STARTED",
1096
- /** Order is already suspended. */
1097
- ALREADY_SUSPENDED = "ALREADY_SUSPENDED",
1098
- /** Orders based on recurring payments using older stripe versions can't be suspended. */
1099
- OLD_STRIPE = "OLD_STRIPE"
1100
- }
1101
- export interface PostponeEndDateRequest {
1102
- /** Order ID. */
1103
- id: string;
1458
+ orderId?: string;
1104
1459
  /**
1105
- * New end date and time.
1106
- *
1107
- * Must be later than the current end date and time.
1460
+ * Submission ID.
1461
+ * @format GUID
1108
1462
  */
1109
- endDate: Date | null;
1110
- }
1111
- export interface PostponeEndDateResponse {
1112
- }
1113
- export interface OrderEndDatePostponed {
1114
- /** Order whose `endDate` was postponed. */
1115
- order?: Order;
1116
- }
1117
- export interface CancelOrderRequest {
1118
- /** Order ID. */
1119
- id: string;
1120
- /** __Required.__ When the order will be canceled. One-time orders can only be canceled `IMMEDIATELY`. */
1121
- effectiveAt: CancellationEffectiveAt;
1122
- }
1123
- export interface CancelOrderResponse {
1124
- }
1125
- export interface MarkAsPaidRequest {
1126
- /** Order ID. */
1127
- id: string;
1128
- }
1129
- export interface MarkAsPaidResponse {
1130
- }
1131
- export interface OrderMarkedAsPaid {
1132
- /** Order that was marked as paid. */
1133
- order?: Order;
1134
- }
1135
- export interface PauseOrderRequest {
1136
- /** Order ID. */
1137
- id: string;
1138
- }
1139
- export interface PauseOrderResponse {
1140
- }
1141
- export interface OrderPaused {
1142
- /** Paused order. */
1143
- order?: Order;
1144
- }
1145
- export interface BulkPauseOrderRequest {
1146
- /** List of Order IDs. */
1147
- ids?: string[];
1148
- /** Set to true to return Order entity in response. */
1149
- returnFullEntity?: boolean;
1150
- }
1151
- export interface BulkPauseOrderResponse {
1152
- /** Orders that were paused. */
1153
- results?: BulkOrderResult[];
1154
- /** Bulk action metadata. */
1155
- bulkActionMetadata?: BulkActionMetadata;
1156
- }
1157
- export interface BulkOrderResult {
1158
- /** Item metadata */
1159
- itemMetadata?: ItemMetadata;
1160
- /** The order. */
1161
- order?: Order;
1162
- }
1163
- export interface ItemMetadata {
1164
- /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
1165
- id?: string | null;
1166
- /** Index of the item within the request array. Allows for correlation between request and response items. */
1167
- originalIndex?: number;
1168
- /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
1169
- success?: boolean;
1170
- /** Details about the error in case of failure. */
1171
- error?: ApplicationError;
1172
- }
1173
- export interface ApplicationError {
1174
- /** Error code. */
1175
- code?: string;
1176
- /** Description of the error. */
1177
- description?: string;
1178
- /** Data related to the error. */
1179
- data?: Record<string, any> | null;
1180
- }
1181
- export interface BulkActionMetadata {
1182
- /** Number of items that were successfully processed. */
1183
- totalSuccesses?: number;
1184
- /** Number of items that couldn't be processed. */
1185
- totalFailures?: number;
1186
- /** Number of failures without details because detailed failure threshold was exceeded. */
1187
- undetailedFailures?: number;
1188
- }
1189
- export interface ResumeOrderRequest {
1190
- /** Order ID. */
1191
- id: string;
1192
- }
1193
- export interface ResumeOrderResponse {
1463
+ submissionId?: string;
1194
1464
  }
1195
- export interface OrderResumed {
1196
- /** Resumed order. */
1465
+ export interface SetSubmissionResponse {
1466
+ /** Order with submission id */
1197
1467
  order?: Order;
1198
1468
  }
1199
- export interface BulkResumeOrderRequest {
1200
- /** List of Order IDs. */
1201
- ids?: string[];
1202
- /** Set to true to return Order entity in response. */
1203
- returnFullEntity?: boolean;
1204
- }
1205
- export interface BulkResumeOrderResponse {
1206
- /** Orders that were resumed. */
1207
- results?: BulkOrderResult[];
1208
- /** Bulk action metadata. */
1209
- bulkActionMetadata?: BulkActionMetadata;
1210
- }
1211
1469
  interface BuyerNonNullableFields {
1212
1470
  memberId: string;
1213
1471
  contactId: string;
@@ -1301,6 +1559,12 @@ interface OrderNonNullableFields {
1301
1559
  statusNew: OrderStatus;
1302
1560
  onEcom: boolean;
1303
1561
  }
1562
+ export interface GetOrderResponseNonNullableFields {
1563
+ order?: OrderNonNullableFields;
1564
+ }
1565
+ export interface ListOrdersResponseNonNullableFields {
1566
+ orders: OrderNonNullableFields[];
1567
+ }
1304
1568
  export interface MemberGetOrderResponseNonNullableFields {
1305
1569
  order?: OrderNonNullableFields;
1306
1570
  }
@@ -1325,10 +1589,4 @@ export interface GetPricePreviewResponseNonNullableFields {
1325
1589
  price?: PriceDetailsNonNullableFields;
1326
1590
  prices: SpannedPriceNonNullableFields[];
1327
1591
  }
1328
- export interface GetOrderResponseNonNullableFields {
1329
- order?: OrderNonNullableFields;
1330
- }
1331
- export interface ListOrdersResponseNonNullableFields {
1332
- orders: OrderNonNullableFields[];
1333
- }
1334
1592
  export {};