@wix/auto_sdk_pricing-plans_orders 1.0.115 → 1.0.117

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 (49) hide show
  1. package/build/cjs/index.d.ts +155 -155
  2. package/build/cjs/index.js +452 -452
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +524 -498
  5. package/build/cjs/index.typings.js +323 -323
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +268 -268
  8. package/build/cjs/meta.js +334 -334
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/cjs/schemas.d.ts +30 -30
  11. package/build/cjs/schemas.js +59 -59
  12. package/build/cjs/schemas.js.map +1 -1
  13. package/build/es/index.d.mts +155 -155
  14. package/build/es/index.mjs +452 -452
  15. package/build/es/index.mjs.map +1 -1
  16. package/build/es/index.typings.d.mts +524 -498
  17. package/build/es/index.typings.mjs +323 -323
  18. package/build/es/index.typings.mjs.map +1 -1
  19. package/build/es/meta.d.mts +268 -268
  20. package/build/es/meta.mjs +334 -334
  21. package/build/es/meta.mjs.map +1 -1
  22. package/build/es/schemas.d.mts +30 -30
  23. package/build/es/schemas.mjs +59 -59
  24. package/build/es/schemas.mjs.map +1 -1
  25. package/build/internal/cjs/index.d.ts +155 -155
  26. package/build/internal/cjs/index.js +452 -452
  27. package/build/internal/cjs/index.js.map +1 -1
  28. package/build/internal/cjs/index.typings.d.ts +524 -498
  29. package/build/internal/cjs/index.typings.js +323 -323
  30. package/build/internal/cjs/index.typings.js.map +1 -1
  31. package/build/internal/cjs/meta.d.ts +268 -268
  32. package/build/internal/cjs/meta.js +334 -334
  33. package/build/internal/cjs/meta.js.map +1 -1
  34. package/build/internal/cjs/schemas.d.ts +30 -30
  35. package/build/internal/cjs/schemas.js +59 -59
  36. package/build/internal/cjs/schemas.js.map +1 -1
  37. package/build/internal/es/index.d.mts +155 -155
  38. package/build/internal/es/index.mjs +452 -452
  39. package/build/internal/es/index.mjs.map +1 -1
  40. package/build/internal/es/index.typings.d.mts +524 -498
  41. package/build/internal/es/index.typings.mjs +323 -323
  42. package/build/internal/es/index.typings.mjs.map +1 -1
  43. package/build/internal/es/meta.d.mts +268 -268
  44. package/build/internal/es/meta.mjs +334 -334
  45. package/build/internal/es/meta.mjs.map +1 -1
  46. package/build/internal/es/schemas.d.mts +30 -30
  47. package/build/internal/es/schemas.mjs +59 -59
  48. package/build/internal/es/schemas.mjs.map +1 -1
  49. package/package.json +2 -2
@@ -635,35 +635,7 @@ interface ActionEvent {
635
635
  }
636
636
  interface Empty {
637
637
  }
638
- interface OrderPurchased {
639
- /** Order that was paid for. If a free or an offline order, the order that was created. */
640
- order?: Order;
641
- }
642
- interface OrderStarted {
643
- /** Order that reached its `startDate`. */
644
- order?: Order;
645
- }
646
- /**
647
- * Triggered at the start of a new payment cycle for an existing order.
648
- *
649
- * This webhook does not trigger at the initial start of an offline order.
650
- */
651
- interface OrderCycleStarted {
652
- /** Order whose new cycle started. */
653
- order?: Order;
654
- /** 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. */
655
- cycleNumber?: number;
656
- }
657
- /** Emitted when a recurring order is canceled for the next payment cycle */
658
- interface OrderAutoRenewCanceled {
659
- /** Order that is canceled, effective at the end of the current payment cycle. */
660
- order?: Order;
661
- }
662
- interface OrderEnded {
663
- /** Order that ended. */
664
- order?: Order;
665
- }
666
- interface GetOrderRequest {
638
+ interface MemberGetOrderRequest {
667
639
  /**
668
640
  * Order ID.
669
641
  * @format GUID
@@ -686,44 +658,31 @@ declare enum Set {
686
658
  }
687
659
  /** @enumType */
688
660
  type SetWithLiterals = Set | 'UNKNOWN_SET' | 'BASIC' | 'FULL';
689
- interface GetOrderResponse {
690
- /** Order. */
661
+ interface MemberGetOrderResponse {
662
+ /** Requested order. */
691
663
  order?: Order;
692
664
  }
693
- interface ListOrdersRequest {
694
- /**
695
- * Filter by a buyer's member ID, from the Members API.
696
- * @format GUID
697
- */
698
- buyerIds?: string[];
665
+ interface MemberListOrdersRequest {
699
666
  /**
700
- * Filter by plan IDs, from the Plans API.
667
+ * Filter by plan IDs.
701
668
  * @format GUID
702
669
  */
703
670
  planIds?: string[];
704
- /** Filter by whether or not the auto-renewal of recurring orders was canceled. */
671
+ /** Filter for orders where auto renewal was canceled. */
705
672
  autoRenewCanceled?: boolean | null;
706
673
  /** Filter by order status. */
707
674
  orderStatuses?: OrderStatusWithLiterals[];
708
675
  /** Filter by payment status. */
709
676
  paymentStatuses?: PaymentStatusWithLiterals[];
710
677
  /**
711
- * Number of orders to return. See Sorting and Paging for more information.
712
- *
713
- * Max: `50`
678
+ * Limit the number of pricing plans returned. Default limit is 50.
714
679
  * @min 1
715
680
  * @max 50
716
681
  */
717
682
  limit?: number | null;
718
- /** Number of orders to skip in the current sort order. */
683
+ /** Number of entries to offset. */
719
684
  offset?: number | null;
720
- /**
721
- * Sort order.
722
- *
723
- * Use `ASC` for ascending order or `DESC` for descending order.
724
- *
725
- * Default: `DESC`.
726
- */
685
+ /** Sorting direction (defaults to ASC) and field to sort by. */
727
686
  sorting?: Sorting;
728
687
  /**
729
688
  * Predefined set of fields to return.
@@ -747,8 +706,8 @@ declare enum SortOrder {
747
706
  }
748
707
  /** @enumType */
749
708
  type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
750
- interface ListOrdersResponse {
751
- /** List of orders. */
709
+ interface MemberListOrdersResponse {
710
+ /** Requested orders. */
752
711
  orders?: Order[];
753
712
  /** Object containing paging-related data (number of orders returned, offset). */
754
713
  pagingMetadata?: PagingMetadataV2;
@@ -777,7 +736,11 @@ interface Cursors {
777
736
  */
778
737
  prev?: string | null;
779
738
  }
780
- interface OrdersQueryOrdersRequest {
739
+ /**
740
+ * TODO: Write orders filter and sort docs page
741
+ * Retrieves a list of up to 1,000 orders, based on the provided paging, sorting, and filtering.
742
+ */
743
+ interface QueryOrdersRequest {
781
744
  /** Query filter. */
782
745
  query?: QueryV2;
783
746
  }
@@ -831,84 +794,22 @@ interface CursorPaging {
831
794
  */
832
795
  cursor?: string | null;
833
796
  }
834
- interface OrdersQueryOrdersResponse {
835
- /** Retrieved orders. */
797
+ interface QueryOrdersResponse {
798
+ /** Order data. */
836
799
  plans?: Order[];
837
800
  /** Paging-related data (number of orders returned, offset). */
838
801
  pagingMetadata?: PagingMetadataV2;
839
802
  }
840
- interface GetOrdersStatsRequest {
841
- }
842
- interface GetOrdersStatsResponse {
843
- /** Total number of orders. */
844
- totalOrderCount?: number;
845
- /** Number of active orders. */
846
- activeOrderCount?: number;
847
- }
848
- interface GetAvailableOrderActionsRequest {
849
- /**
850
- * Order ID.
851
- * @format GUID
852
- */
853
- _id?: string;
854
- }
855
- interface GetAvailableOrderActionsResponse {
856
- /** Whether the order can be suspended. */
857
- suspendable?: boolean;
858
- /** If the order cannot be suspended, a reason is returned here. */
859
- notSuspendableReason?: ReasonNotSuspendableWithLiterals;
860
- /** Whether the order can be canceled by the buyer. */
861
- cancelableByBuyer?: boolean;
862
- }
863
- declare enum ReasonNotSuspendable {
864
- /** Undefined reason. */
865
- UNDEFINED = "UNDEFINED",
866
- /** Saved in the database but is awaiting payment. Non-active orders can't be suspended. */
867
- PENDING = "PENDING",
868
- /** Trial orders can't be suspended. */
869
- TRIAL = "TRIAL",
870
- /** Canceled orders can't be suspended. */
871
- CANCELED = "CANCELED",
872
- /** Ended orders can't be suspended. */
873
- ENDED = "ENDED",
874
- /** Paid for orders with future start dates can't be suspended. */
875
- NOT_STARTED = "NOT_STARTED",
876
- /** Order is already suspended. */
877
- ALREADY_SUSPENDED = "ALREADY_SUSPENDED",
878
- /** Orders based on recurring payments using older stripe versions can't be suspended. */
879
- OLD_STRIPE = "OLD_STRIPE"
880
- }
881
- /** @enumType */
882
- type ReasonNotSuspendableWithLiterals = ReasonNotSuspendable | 'UNDEFINED' | 'PENDING' | 'TRIAL' | 'CANCELED' | 'ENDED' | 'NOT_STARTED' | 'ALREADY_SUSPENDED' | 'OLD_STRIPE';
883
- interface PostponeEndDateRequest {
884
- /**
885
- * Order ID.
886
- * @format GUID
887
- */
888
- _id: string;
889
- /**
890
- * New end date and time.
891
- *
892
- * Must be later than the current end date and time.
893
- */
894
- endDate: Date | null;
895
- }
896
- interface PostponeEndDateResponse {
897
- }
898
- interface OrderEndDatePostponed {
899
- /** Order whose `endDate` was postponed. */
900
- order?: Order;
901
- }
902
- interface CancelOrderRequest {
803
+ interface RequestCancellationRequest {
903
804
  /**
904
805
  * Order ID.
905
806
  * @format GUID
906
807
  */
907
808
  _id: string;
908
- /** __Required.__ When the order will be canceled. One-time orders can only be canceled `IMMEDIATELY`. */
809
+ /** Required. Whether to cancel the order effective immediately or at the next payment date. One-time orders can only be canceled immediately. */
909
810
  effectiveAt: CancellationEffectiveAtWithLiterals;
910
811
  }
911
- interface CancelOrderResponse {
812
+ interface RequestCancellationResponse {
912
813
  }
913
814
  /**
914
815
  * Emitted when an order is canceled immediately or when cycle ends for an order with canceled auto renewal
@@ -919,111 +820,6 @@ interface OrderCanceled {
919
820
  /** Canceled order. */
920
821
  order?: Order;
921
822
  }
922
- interface MarkAsPaidRequest {
923
- /**
924
- * Order ID.
925
- * @format GUID
926
- */
927
- _id: string;
928
- }
929
- interface MarkAsPaidResponse {
930
- }
931
- interface OrderMarkedAsPaid {
932
- /** Order that was marked as paid. */
933
- order?: Order;
934
- }
935
- interface PauseOrderRequest {
936
- /**
937
- * Order ID.
938
- * @format GUID
939
- */
940
- _id: string;
941
- }
942
- interface PauseOrderResponse {
943
- }
944
- interface OrderPaused {
945
- /** Paused order. */
946
- order?: Order;
947
- }
948
- interface BulkPauseOrderRequest {
949
- /**
950
- * List of Order IDs.
951
- * @format GUID
952
- * @minSize 1
953
- * @maxSize 100
954
- */
955
- ids?: string[];
956
- /** Set to true to return Order entity in response. */
957
- returnFullEntity?: boolean;
958
- }
959
- interface BulkPauseOrderResponse {
960
- /** Orders that were paused. */
961
- results?: BulkOrderResult[];
962
- /** Bulk action metadata. */
963
- bulkActionMetadata?: BulkActionMetadata;
964
- }
965
- interface BulkOrderResult {
966
- /** Item metadata */
967
- itemMetadata?: ItemMetadata;
968
- /** The order. */
969
- order?: Order;
970
- }
971
- interface ItemMetadata {
972
- /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
973
- _id?: string | null;
974
- /** Index of the item within the request array. Allows for correlation between request and response items. */
975
- originalIndex?: number;
976
- /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
977
- success?: boolean;
978
- /** Details about the error in case of failure. */
979
- error?: ApplicationError;
980
- }
981
- interface ApplicationError {
982
- /** Error code. */
983
- code?: string;
984
- /** Description of the error. */
985
- description?: string;
986
- /** Data related to the error. */
987
- data?: Record<string, any> | null;
988
- }
989
- interface BulkActionMetadata {
990
- /** Number of items that were successfully processed. */
991
- totalSuccesses?: number;
992
- /** Number of items that couldn't be processed. */
993
- totalFailures?: number;
994
- /** Number of failures without details because detailed failure threshold was exceeded. */
995
- undetailedFailures?: number;
996
- }
997
- interface ResumeOrderRequest {
998
- /**
999
- * Order ID.
1000
- * @format GUID
1001
- */
1002
- _id: string;
1003
- }
1004
- interface ResumeOrderResponse {
1005
- }
1006
- interface OrderResumed {
1007
- /** Resumed order. */
1008
- order?: Order;
1009
- }
1010
- interface BulkResumeOrderRequest {
1011
- /**
1012
- * List of Order IDs.
1013
- * @format GUID
1014
- * @minSize 1
1015
- * @maxSize 100
1016
- */
1017
- ids?: string[];
1018
- /** Set to true to return Order entity in response. */
1019
- returnFullEntity?: boolean;
1020
- }
1021
- interface BulkResumeOrderResponse {
1022
- /** Orders that were resumed. */
1023
- results?: BulkOrderResult[];
1024
- /** Bulk action metadata. */
1025
- bulkActionMetadata?: BulkActionMetadata;
1026
- }
1027
823
  interface MessageEnvelope {
1028
824
  /**
1029
825
  * App instance ID.
@@ -1426,44 +1222,85 @@ interface SetSubmissionResponse {
1426
1222
  /** Order with submission id */
1427
1223
  order?: Order;
1428
1224
  }
1429
- interface MemberGetOrderRequest {
1430
- /**
1431
- * Order ID.
1432
- * @format GUID
1433
- */
1434
- _id: string;
1435
- /**
1436
- * Predefined set of fields to return.
1437
- *
1438
- * Default: If `fieldSet` is omitted, no order form submission data is returned.
1225
+ interface OrderPurchased {
1226
+ /** Order that was paid for. If a free or an offline order, the order that was created. */
1227
+ order?: Order;
1228
+ }
1229
+ interface OrderStarted {
1230
+ /** Order that reached its `startDate`. */
1231
+ order?: Order;
1232
+ }
1233
+ /**
1234
+ * Triggered at the start of a new payment cycle for an existing order.
1235
+ *
1236
+ * This webhook does not trigger at the initial start of an offline order.
1237
+ */
1238
+ interface OrderCycleStarted {
1239
+ /** Order whose new cycle started. */
1240
+ order?: Order;
1241
+ /** 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. */
1242
+ cycleNumber?: number;
1243
+ }
1244
+ /** Emitted when a recurring order is canceled for the next payment cycle */
1245
+ interface OrderAutoRenewCanceled {
1246
+ /** Order that is canceled, effective at the end of the current payment cycle. */
1247
+ order?: Order;
1248
+ }
1249
+ interface OrderEnded {
1250
+ /** Order that ended. */
1251
+ order?: Order;
1252
+ }
1253
+ interface GetOrderRequest {
1254
+ /**
1255
+ * Order ID.
1256
+ * @format GUID
1257
+ */
1258
+ _id: string;
1259
+ /**
1260
+ * Predefined set of fields to return.
1261
+ *
1262
+ * Default: If `fieldSet` is omitted, no order form submission data is returned.
1439
1263
  */
1440
1264
  fieldSet?: SetWithLiterals;
1441
1265
  }
1442
- interface MemberGetOrderResponse {
1443
- /** Requested order. */
1266
+ interface GetOrderResponse {
1267
+ /** Order. */
1444
1268
  order?: Order;
1445
1269
  }
1446
- interface MemberListOrdersRequest {
1270
+ interface ListOrdersRequest {
1447
1271
  /**
1448
- * Filter by plan IDs.
1272
+ * Filter by a buyer's member ID, from the Members API.
1273
+ * @format GUID
1274
+ */
1275
+ buyerIds?: string[];
1276
+ /**
1277
+ * Filter by plan IDs, from the Plans API.
1449
1278
  * @format GUID
1450
1279
  */
1451
1280
  planIds?: string[];
1452
- /** Filter for orders where auto renewal was canceled. */
1281
+ /** Filter by whether or not the auto-renewal of recurring orders was canceled. */
1453
1282
  autoRenewCanceled?: boolean | null;
1454
1283
  /** Filter by order status. */
1455
1284
  orderStatuses?: OrderStatusWithLiterals[];
1456
1285
  /** Filter by payment status. */
1457
1286
  paymentStatuses?: PaymentStatusWithLiterals[];
1458
1287
  /**
1459
- * Limit the number of pricing plans returned. Default limit is 50.
1288
+ * Number of orders to return. See Sorting and Paging for more information.
1289
+ *
1290
+ * Max: `50`
1460
1291
  * @min 1
1461
1292
  * @max 50
1462
1293
  */
1463
1294
  limit?: number | null;
1464
- /** Number of entries to offset. */
1295
+ /** Number of orders to skip in the current sort order. */
1465
1296
  offset?: number | null;
1466
- /** Sorting direction (defaults to ASC) and field to sort by. */
1297
+ /**
1298
+ * Sort order.
1299
+ *
1300
+ * Use `ASC` for ascending order or `DESC` for descending order.
1301
+ *
1302
+ * Default: `DESC`.
1303
+ */
1467
1304
  sorting?: Sorting;
1468
1305
  /**
1469
1306
  * Predefined set of fields to return.
@@ -1472,36 +1309,199 @@ interface MemberListOrdersRequest {
1472
1309
  */
1473
1310
  fieldSet?: SetWithLiterals;
1474
1311
  }
1475
- interface MemberListOrdersResponse {
1476
- /** Requested orders. */
1312
+ interface ListOrdersResponse {
1313
+ /** List of orders. */
1477
1314
  orders?: Order[];
1478
1315
  /** Object containing paging-related data (number of orders returned, offset). */
1479
1316
  pagingMetadata?: PagingMetadataV2;
1480
1317
  }
1481
- /**
1482
- * TODO: Write orders filter and sort docs page
1483
- * Retrieves a list of up to 1,000 orders, based on the provided paging, sorting, and filtering.
1484
- */
1485
- interface QueryOrdersRequest {
1318
+ interface OrdersQueryOrdersRequest {
1486
1319
  /** Query filter. */
1487
1320
  query?: QueryV2;
1488
1321
  }
1489
- interface QueryOrdersResponse {
1490
- /** Order data. */
1322
+ interface OrdersQueryOrdersResponse {
1323
+ /** Retrieved orders. */
1491
1324
  plans?: Order[];
1492
1325
  /** Paging-related data (number of orders returned, offset). */
1493
1326
  pagingMetadata?: PagingMetadataV2;
1494
1327
  }
1495
- interface RequestCancellationRequest {
1328
+ interface GetOrdersStatsRequest {
1329
+ }
1330
+ interface GetOrdersStatsResponse {
1331
+ /** Total number of orders. */
1332
+ totalOrderCount?: number;
1333
+ /** Number of active orders. */
1334
+ activeOrderCount?: number;
1335
+ }
1336
+ interface GetAvailableOrderActionsRequest {
1337
+ /**
1338
+ * Order ID.
1339
+ * @format GUID
1340
+ */
1341
+ _id?: string;
1342
+ }
1343
+ interface GetAvailableOrderActionsResponse {
1344
+ /** Whether the order can be suspended. */
1345
+ suspendable?: boolean;
1346
+ /** If the order cannot be suspended, a reason is returned here. */
1347
+ notSuspendableReason?: ReasonNotSuspendableWithLiterals;
1348
+ /** Whether the order can be canceled by the buyer. */
1349
+ cancelableByBuyer?: boolean;
1350
+ }
1351
+ declare enum ReasonNotSuspendable {
1352
+ /** Undefined reason. */
1353
+ UNDEFINED = "UNDEFINED",
1354
+ /** Saved in the database but is awaiting payment. Non-active orders can't be suspended. */
1355
+ PENDING = "PENDING",
1356
+ /** Trial orders can't be suspended. */
1357
+ TRIAL = "TRIAL",
1358
+ /** Canceled orders can't be suspended. */
1359
+ CANCELED = "CANCELED",
1360
+ /** Ended orders can't be suspended. */
1361
+ ENDED = "ENDED",
1362
+ /** Paid for orders with future start dates can't be suspended. */
1363
+ NOT_STARTED = "NOT_STARTED",
1364
+ /** Order is already suspended. */
1365
+ ALREADY_SUSPENDED = "ALREADY_SUSPENDED",
1366
+ /** Orders based on recurring payments using older stripe versions can't be suspended. */
1367
+ OLD_STRIPE = "OLD_STRIPE"
1368
+ }
1369
+ /** @enumType */
1370
+ type ReasonNotSuspendableWithLiterals = ReasonNotSuspendable | 'UNDEFINED' | 'PENDING' | 'TRIAL' | 'CANCELED' | 'ENDED' | 'NOT_STARTED' | 'ALREADY_SUSPENDED' | 'OLD_STRIPE';
1371
+ interface PostponeEndDateRequest {
1496
1372
  /**
1497
1373
  * Order ID.
1498
1374
  * @format GUID
1499
1375
  */
1500
1376
  _id: string;
1501
- /** Required. Whether to cancel the order effective immediately or at the next payment date. One-time orders can only be canceled immediately. */
1377
+ /**
1378
+ * New end date and time.
1379
+ *
1380
+ * Must be later than the current end date and time.
1381
+ */
1382
+ endDate: Date | null;
1383
+ }
1384
+ interface PostponeEndDateResponse {
1385
+ }
1386
+ interface OrderEndDatePostponed {
1387
+ /** Order whose `endDate` was postponed. */
1388
+ order?: Order;
1389
+ }
1390
+ interface CancelOrderRequest {
1391
+ /**
1392
+ * Order ID.
1393
+ * @format GUID
1394
+ */
1395
+ _id: string;
1396
+ /** __Required.__ When the order will be canceled. One-time orders can only be canceled `IMMEDIATELY`. */
1502
1397
  effectiveAt: CancellationEffectiveAtWithLiterals;
1503
1398
  }
1504
- interface RequestCancellationResponse {
1399
+ interface CancelOrderResponse {
1400
+ }
1401
+ interface MarkAsPaidRequest {
1402
+ /**
1403
+ * Order ID.
1404
+ * @format GUID
1405
+ */
1406
+ _id: string;
1407
+ }
1408
+ interface MarkAsPaidResponse {
1409
+ }
1410
+ interface OrderMarkedAsPaid {
1411
+ /** Order that was marked as paid. */
1412
+ order?: Order;
1413
+ }
1414
+ interface PauseOrderRequest {
1415
+ /**
1416
+ * Order ID.
1417
+ * @format GUID
1418
+ */
1419
+ _id: string;
1420
+ }
1421
+ interface PauseOrderResponse {
1422
+ }
1423
+ interface OrderPaused {
1424
+ /** Paused order. */
1425
+ order?: Order;
1426
+ }
1427
+ interface BulkPauseOrderRequest {
1428
+ /**
1429
+ * List of Order IDs.
1430
+ * @format GUID
1431
+ * @minSize 1
1432
+ * @maxSize 100
1433
+ */
1434
+ ids?: string[];
1435
+ /** Set to true to return Order entity in response. */
1436
+ returnFullEntity?: boolean;
1437
+ }
1438
+ interface BulkPauseOrderResponse {
1439
+ /** Orders that were paused. */
1440
+ results?: BulkOrderResult[];
1441
+ /** Bulk action metadata. */
1442
+ bulkActionMetadata?: BulkActionMetadata;
1443
+ }
1444
+ interface BulkOrderResult {
1445
+ /** Item metadata */
1446
+ itemMetadata?: ItemMetadata;
1447
+ /** The order. */
1448
+ order?: Order;
1449
+ }
1450
+ interface ItemMetadata {
1451
+ /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
1452
+ _id?: string | null;
1453
+ /** Index of the item within the request array. Allows for correlation between request and response items. */
1454
+ originalIndex?: number;
1455
+ /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
1456
+ success?: boolean;
1457
+ /** Details about the error in case of failure. */
1458
+ error?: ApplicationError;
1459
+ }
1460
+ interface ApplicationError {
1461
+ /** Error code. */
1462
+ code?: string;
1463
+ /** Description of the error. */
1464
+ description?: string;
1465
+ /** Data related to the error. */
1466
+ data?: Record<string, any> | null;
1467
+ }
1468
+ interface BulkActionMetadata {
1469
+ /** Number of items that were successfully processed. */
1470
+ totalSuccesses?: number;
1471
+ /** Number of items that couldn't be processed. */
1472
+ totalFailures?: number;
1473
+ /** Number of failures without details because detailed failure threshold was exceeded. */
1474
+ undetailedFailures?: number;
1475
+ }
1476
+ interface ResumeOrderRequest {
1477
+ /**
1478
+ * Order ID.
1479
+ * @format GUID
1480
+ */
1481
+ _id: string;
1482
+ }
1483
+ interface ResumeOrderResponse {
1484
+ }
1485
+ interface OrderResumed {
1486
+ /** Resumed order. */
1487
+ order?: Order;
1488
+ }
1489
+ interface BulkResumeOrderRequest {
1490
+ /**
1491
+ * List of Order IDs.
1492
+ * @format GUID
1493
+ * @minSize 1
1494
+ * @maxSize 100
1495
+ */
1496
+ ids?: string[];
1497
+ /** Set to true to return Order entity in response. */
1498
+ returnFullEntity?: boolean;
1499
+ }
1500
+ interface BulkResumeOrderResponse {
1501
+ /** Orders that were resumed. */
1502
+ results?: BulkOrderResult[];
1503
+ /** Bulk action metadata. */
1504
+ bulkActionMetadata?: BulkActionMetadata;
1505
1505
  }
1506
1506
  /** @docsIgnore */
1507
1507
  type CreateOnlineOrderApplicationErrors = {
@@ -1854,16 +1854,18 @@ interface AccountInfoMetadata {
1854
1854
  /** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */
1855
1855
  parentAccountId?: string;
1856
1856
  }
1857
- interface OrderAutoRenewCanceledEnvelope {
1858
- data: OrderAutoRenewCanceled;
1857
+ interface OrderCanceledEnvelope {
1858
+ data: OrderCanceled;
1859
1859
  metadata: EventMetadata;
1860
1860
  }
1861
1861
  /**
1862
- * Triggered when an order is canceled and `effectiveAt` is set to `NEXT_PAYMENT_DATE`.
1862
+ * Triggered when an order is canceled.
1863
1863
  *
1864
- * This webhook is *not* triggered in the following scenarios:
1865
- * + When an order is canceled and `effectiveAt` is set to `IMMEDIATELY`. Instead, at the time of cancellation, Order Canceled is triggered.
1866
- * + 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.
1864
+ * This webhook is triggered either immediately or at the end of the current payment cycle, as follows:
1865
+ * + If the order is canceled and `effectiveAt` is set to `IMMEDIATELY`, the webhook is triggered immediately when canceled.
1866
+ * + 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.
1867
+ * @permissionScope Manage_Wix_Rentals_App_Forms_submissions
1868
+ * @permissionScopeId SCOPE.RENTALS.MANAGE
1867
1869
  * @permissionScope Manage Orders
1868
1870
  * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
1869
1871
  * @permissionScope Read Orders
@@ -1874,21 +1876,73 @@ interface OrderAutoRenewCanceledEnvelope {
1874
1876
  * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
1875
1877
  * @permissionId PRICING_PLANS.READ_ORDERS
1876
1878
  * @webhook
1877
- * @eventType wix.pricing_plans.v2.order_auto_renew_canceled
1878
- * @serviceIdentifier com.wixpress.membership.v2.orders.OrderManagementService
1879
- * @slug auto_renew_canceled
1879
+ * @eventType wix.pricing_plans.v2.order_canceled
1880
+ * @serviceIdentifier com.wixpress.membership.v2.orders.member.MemberOrdersService
1881
+ * @slug canceled
1880
1882
  */
1881
- declare function onOrderAutoRenewCanceled(handler: (event: OrderAutoRenewCanceledEnvelope) => void | Promise<void>): void;
1882
- interface OrderCanceledEnvelope {
1883
- data: OrderCanceled;
1883
+ declare function onOrderCanceled(handler: (event: OrderCanceledEnvelope) => void | Promise<void>): void;
1884
+ interface OrderCreatedEnvelope {
1885
+ entity: Order;
1884
1886
  metadata: EventMetadata;
1885
1887
  }
1886
1888
  /**
1887
- * Triggered when an order is canceled.
1889
+ * Triggered when an order is created.
1890
+ * @permissionScope Manage_Wix_Rentals_App_Forms_submissions
1891
+ * @permissionScopeId SCOPE.RENTALS.MANAGE
1892
+ * @permissionScope Manage Orders
1893
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
1894
+ * @permissionScope Read Orders
1895
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS
1896
+ * @permissionScope Manage plans and orders of Pricing Plans
1897
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS-AND-ORDERS
1898
+ * @permissionScope Manage Events
1899
+ * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
1900
+ * @permissionId PRICING_PLANS.READ_ORDERS
1901
+ * @webhook
1902
+ * @eventType wix.pricing_plans.v2.order_created
1903
+ * @serviceIdentifier com.wixpress.membership.v2.orders.CheckoutService
1904
+ * @slug created
1905
+ */
1906
+ declare function onOrderCreated(handler: (event: OrderCreatedEnvelope) => void | Promise<void>): void;
1907
+ interface OrderStartDateChangedEnvelope {
1908
+ data: OrderStartDateChanged;
1909
+ metadata: EventMetadata;
1910
+ }
1911
+ /**
1912
+ * Triggered when an order's `startDate` is changed.
1913
+ * @permissionScope Manage_Wix_Rentals_App_Forms_submissions
1914
+ * @permissionScopeId SCOPE.RENTALS.MANAGE
1915
+ * @permissionScope Manage Orders
1916
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
1917
+ * @permissionScope Read Orders
1918
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS
1919
+ * @permissionScope Manage plans and orders of Pricing Plans
1920
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS-AND-ORDERS
1921
+ * @permissionScope Manage Events
1922
+ * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
1923
+ * @permissionId PRICING_PLANS.READ_ORDERS
1924
+ * @webhook
1925
+ * @eventType wix.pricing_plans.v2.order_start_date_changed
1926
+ * @serviceIdentifier com.wixpress.membership.v2.orders.CheckoutService
1927
+ * @slug start_date_changed
1928
+ */
1929
+ declare function onOrderStartDateChanged(handler: (event: OrderStartDateChangedEnvelope) => void | Promise<void>): void;
1930
+ interface OrderUpdatedEnvelope {
1931
+ entity: Order;
1932
+ metadata: EventMetadata;
1933
+ }
1934
+ /**
1935
+ * Triggered for any of the following update events:
1888
1936
  *
1889
- * This webhook is triggered either immediately or at the end of the current payment cycle, as follows:
1890
- * + If the order is canceled and `effectiveAt` is set to `IMMEDIATELY`, the webhook is triggered immediately when canceled.
1891
- * + 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.
1937
+ * + Order is paid for. Order Purchased is also triggered.
1938
+ * + Order reaches its start date or end date. Order Started and Order Ended, respectively, are also triggered.
1939
+ * + New payment cycle of an order starts. Order Cycle Started is also triggered.
1940
+ * + Offline order is marked as paid. Order Marked As Paid is also triggered.
1941
+ * + End date of the order is postponed. Order End Date Postponed is also triggered
1942
+ * + Order is paused, or a paused order is resumed. Order Paused and Order Resumed, respectively, are also triggered.
1943
+ * + Order is canceled, either immediately or at the end of the payment cycle. Order Canceled and Order Auto Renew Canceled, respectively, are also triggered.
1944
+ * @permissionScope Manage_Wix_Rentals_App_Forms_submissions
1945
+ * @permissionScopeId SCOPE.RENTALS.MANAGE
1892
1946
  * @permissionScope Manage Orders
1893
1947
  * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
1894
1948
  * @permissionScope Read Orders
@@ -1899,11 +1953,38 @@ interface OrderCanceledEnvelope {
1899
1953
  * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
1900
1954
  * @permissionId PRICING_PLANS.READ_ORDERS
1901
1955
  * @webhook
1902
- * @eventType wix.pricing_plans.v2.order_canceled
1956
+ * @eventType wix.pricing_plans.v2.order_updated
1957
+ * @serviceIdentifier com.wixpress.membership.v2.orders.CheckoutService
1958
+ * @slug updated
1959
+ */
1960
+ declare function onOrderUpdated(handler: (event: OrderUpdatedEnvelope) => void | Promise<void>): void;
1961
+ interface OrderAutoRenewCanceledEnvelope {
1962
+ data: OrderAutoRenewCanceled;
1963
+ metadata: EventMetadata;
1964
+ }
1965
+ /**
1966
+ * Triggered when an order is canceled and `effectiveAt` is set to `NEXT_PAYMENT_DATE`.
1967
+ *
1968
+ * This webhook is *not* triggered in the following scenarios:
1969
+ * + When an order is canceled and `effectiveAt` is set to `IMMEDIATELY`. Instead, at the time of cancellation, Order Canceled is triggered.
1970
+ * + 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.
1971
+ * @permissionScope Manage_Wix_Rentals_App_Forms_submissions
1972
+ * @permissionScopeId SCOPE.RENTALS.MANAGE
1973
+ * @permissionScope Manage Orders
1974
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
1975
+ * @permissionScope Read Orders
1976
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS
1977
+ * @permissionScope Manage plans and orders of Pricing Plans
1978
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS-AND-ORDERS
1979
+ * @permissionScope Manage Events
1980
+ * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
1981
+ * @permissionId PRICING_PLANS.READ_ORDERS
1982
+ * @webhook
1983
+ * @eventType wix.pricing_plans.v2.order_auto_renew_canceled
1903
1984
  * @serviceIdentifier com.wixpress.membership.v2.orders.OrderManagementService
1904
- * @slug canceled
1985
+ * @slug auto_renew_canceled
1905
1986
  */
1906
- declare function onOrderCanceled(handler: (event: OrderCanceledEnvelope) => void | Promise<void>): void;
1987
+ declare function onOrderAutoRenewCanceled(handler: (event: OrderAutoRenewCanceledEnvelope) => void | Promise<void>): void;
1907
1988
  interface OrderCycleStartedEnvelope {
1908
1989
  data: OrderCycleStarted;
1909
1990
  metadata: EventMetadata;
@@ -1912,6 +1993,8 @@ interface OrderCycleStartedEnvelope {
1912
1993
  * Triggered at the start of a new payment cycle for an existing order.
1913
1994
  *
1914
1995
  * Not triggered at the initial start of an offline order.
1996
+ * @permissionScope Manage_Wix_Rentals_App_Forms_submissions
1997
+ * @permissionScopeId SCOPE.RENTALS.MANAGE
1915
1998
  * @permissionScope Manage Orders
1916
1999
  * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
1917
2000
  * @permissionScope Read Orders
@@ -1933,6 +2016,8 @@ interface OrderEndDatePostponedEnvelope {
1933
2016
  }
1934
2017
  /**
1935
2018
  * Triggered when an order's `endDate` is postponed.
2019
+ * @permissionScope Manage_Wix_Rentals_App_Forms_submissions
2020
+ * @permissionScopeId SCOPE.RENTALS.MANAGE
1936
2021
  * @permissionScope Manage Orders
1937
2022
  * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
1938
2023
  * @permissionScope Read Orders
@@ -1958,6 +2043,8 @@ interface OrderEndedEnvelope {
1958
2043
  * This webhook is triggered:
1959
2044
  * + When an order expires at the end of the current payment cycle.
1960
2045
  * + When an order is canceled and `effectiveAt` is set to `IMMEDIATELY`.
2046
+ * @permissionScope Manage_Wix_Rentals_App_Forms_submissions
2047
+ * @permissionScopeId SCOPE.RENTALS.MANAGE
1961
2048
  * @permissionScope Manage Orders
1962
2049
  * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
1963
2050
  * @permissionScope Read Orders
@@ -1979,6 +2066,8 @@ interface OrderMarkedAsPaidEnvelope {
1979
2066
  }
1980
2067
  /**
1981
2068
  * Triggered when an offline order is marked as paid.
2069
+ * @permissionScope Manage_Wix_Rentals_App_Forms_submissions
2070
+ * @permissionScopeId SCOPE.RENTALS.MANAGE
1982
2071
  * @permissionScope Manage Orders
1983
2072
  * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
1984
2073
  * @permissionScope Read Orders
@@ -2000,6 +2089,8 @@ interface OrderPausedEnvelope {
2000
2089
  }
2001
2090
  /**
2002
2091
  * Triggered when an order is paused.
2092
+ * @permissionScope Manage_Wix_Rentals_App_Forms_submissions
2093
+ * @permissionScopeId SCOPE.RENTALS.MANAGE
2003
2094
  * @permissionScope Manage Orders
2004
2095
  * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
2005
2096
  * @permissionScope Read Orders
@@ -2025,6 +2116,8 @@ interface OrderPurchasedEnvelope {
2025
2116
  * + At least 1 order cycle payment is paid for.
2026
2117
  * + Offline order is created, even if not yet marked as paid.
2027
2118
  * + Free order is created.
2119
+ * @permissionScope Manage_Wix_Rentals_App_Forms_submissions
2120
+ * @permissionScopeId SCOPE.RENTALS.MANAGE
2028
2121
  * @permissionScope Manage Orders
2029
2122
  * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
2030
2123
  * @permissionScope Read Orders
@@ -2046,6 +2139,8 @@ interface OrderResumedEnvelope {
2046
2139
  }
2047
2140
  /**
2048
2141
  * Triggered when a paused order is resumed.
2142
+ * @permissionScope Manage_Wix_Rentals_App_Forms_submissions
2143
+ * @permissionScopeId SCOPE.RENTALS.MANAGE
2049
2144
  * @permissionScope Manage Orders
2050
2145
  * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
2051
2146
  * @permissionScope Read Orders
@@ -2067,6 +2162,8 @@ interface OrderStartedEnvelope {
2067
2162
  }
2068
2163
  /**
2069
2164
  * Triggered when an order reaches its `startDate`. Applies to both purchased and free orders.
2165
+ * @permissionScope Manage_Wix_Rentals_App_Forms_submissions
2166
+ * @permissionScopeId SCOPE.RENTALS.MANAGE
2070
2167
  * @permissionScope Manage Orders
2071
2168
  * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
2072
2169
  * @permissionScope Read Orders
@@ -2082,89 +2179,19 @@ interface OrderStartedEnvelope {
2082
2179
  * @slug started
2083
2180
  */
2084
2181
  declare function onOrderStarted(handler: (event: OrderStartedEnvelope) => void | Promise<void>): void;
2085
- interface OrderUpdatedEnvelope {
2086
- entity: Order;
2087
- metadata: EventMetadata;
2088
- }
2089
2182
  /**
2090
- * Triggered for any of the following update events:
2091
- *
2092
- * + Order is paid for. Order Purchased is also triggered.
2093
- * + Order reaches its start date or end date. Order Started and Order Ended, respectively, are also triggered.
2094
- * + New payment cycle of an order starts. Order Cycle Started is also triggered.
2095
- * + Offline order is marked as paid. Order Marked As Paid is also triggered.
2096
- * + End date of the order is postponed. Order End Date Postponed is also triggered
2097
- * + Order is paused, or a paused order is resumed. Order Paused and Order Resumed, respectively, are also triggered.
2098
- * + Order is canceled, either immediately or at the end of the payment cycle. Order Canceled and Order Auto Renew Canceled, respectively, are also triggered.
2099
- * @permissionScope Manage Orders
2100
- * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
2101
- * @permissionScope Read Orders
2102
- * @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS
2103
- * @permissionScope Manage plans and orders of Pricing Plans
2104
- * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS-AND-ORDERS
2105
- * @permissionScope Manage Events
2106
- * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
2107
- * @permissionId PRICING_PLANS.READ_ORDERS
2108
- * @webhook
2109
- * @eventType wix.pricing_plans.v2.order_updated
2110
- * @serviceIdentifier com.wixpress.membership.v2.orders.OrderManagementService
2111
- * @slug updated
2112
- */
2113
- declare function onOrderUpdated(handler: (event: OrderUpdatedEnvelope) => void | Promise<void>): void;
2114
- interface OrderCreatedEnvelope {
2115
- entity: Order;
2116
- metadata: EventMetadata;
2117
- }
2118
- /**
2119
- * Triggered when an order is created.
2120
- * @permissionScope Manage Orders
2121
- * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
2122
- * @permissionScope Read Orders
2123
- * @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS
2124
- * @permissionScope Manage plans and orders of Pricing Plans
2125
- * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS-AND-ORDERS
2126
- * @permissionScope Manage Events
2127
- * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
2128
- * @permissionId PRICING_PLANS.READ_ORDERS
2129
- * @webhook
2130
- * @eventType wix.pricing_plans.v2.order_created
2131
- * @serviceIdentifier com.wixpress.membership.v2.orders.CheckoutService
2132
- * @slug created
2133
- */
2134
- declare function onOrderCreated(handler: (event: OrderCreatedEnvelope) => void | Promise<void>): void;
2135
- interface OrderStartDateChangedEnvelope {
2136
- data: OrderStartDateChanged;
2137
- metadata: EventMetadata;
2138
- }
2139
- /**
2140
- * Triggered when an order's `startDate` is changed.
2141
- * @permissionScope Manage Orders
2142
- * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
2143
- * @permissionScope Read Orders
2144
- * @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS
2145
- * @permissionScope Manage plans and orders of Pricing Plans
2146
- * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS-AND-ORDERS
2147
- * @permissionScope Manage Events
2148
- * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
2149
- * @permissionId PRICING_PLANS.READ_ORDERS
2150
- * @webhook
2151
- * @eventType wix.pricing_plans.v2.order_start_date_changed
2152
- * @serviceIdentifier com.wixpress.membership.v2.orders.CheckoutService
2153
- * @slug start_date_changed
2154
- */
2155
- declare function onOrderStartDateChanged(handler: (event: OrderStartDateChangedEnvelope) => void | Promise<void>): void;
2156
- /**
2157
- * Retrieves an order by ID.
2183
+ * Retrieves an order for the currently logged-in member by ID.
2158
2184
  * @param _id - Order ID.
2159
2185
  * @public
2160
2186
  * @requiredField _id
2161
- * @param options - Options to use when getting an order.
2162
- * @permissionId PRICING_PLANS.READ_ORDERS
2187
+ * @param options - Options for getting a logged-in member's order.
2188
+ * @permissionId PRICING_PLANS.READ_OWN_ORDERS
2163
2189
  * @applicableIdentity APP
2164
- * @fqn com.wixpress.membership.v2.orders.OrderManagementService.GetOrder
2190
+ * @applicableIdentity MEMBER
2191
+ * @fqn com.wixpress.membership.v2.orders.member.MemberOrdersService.GetOrder
2165
2192
  */
2166
- declare function managementGetOrder(_id: string, options?: ManagementGetOrderOptions): Promise<NonNullablePaths<GetOrderResponse, `order._id` | `order.planId` | `order.subscriptionId` | `order.buyer.memberId` | `order.buyer.contactId` | `order.priceDetails.subscription.cycleDuration.unit` | `order.priceDetails.subtotal` | `order.priceDetails.discount` | `order.priceDetails.tax.name` | `order.priceDetails.tax.includedInPrice` | `order.priceDetails.tax.rate` | `order.priceDetails.tax.amount` | `order.priceDetails.total` | `order.priceDetails.planPrice` | `order.priceDetails.currency` | `order.priceDetails.coupon.code` | `order.priceDetails.coupon.amount` | `order.priceDetails.coupon._id` | `order.pricing.prices` | `order.pricing.prices.${number}.duration.cycleFrom` | `order.pricing.prices.${number}.price.subtotal` | `order.pricing.prices.${number}.price.discount` | `order.pricing.prices.${number}.price.total` | `order.pricing.prices.${number}.price.currency` | `order.pricing.prices.${number}.price.proration` | `order.type` | `order.status` | `order.cancellation.cause` | `order.cancellation.effectiveAt` | `order.lastPaymentStatus` | `order.pausePeriods` | `order.pausePeriods.${number}.status` | `order.currentCycle.index` | `order.planName` | `order.planDescription` | `order.planPrice`, 7>>;
2167
- interface ManagementGetOrderOptions {
2193
+ declare function memberGetOrder(_id: string, options?: MemberGetOrderOptions): Promise<NonNullablePaths<MemberGetOrderResponse, `order._id` | `order.planId` | `order.subscriptionId` | `order.buyer.memberId` | `order.buyer.contactId` | `order.priceDetails.subscription.cycleDuration.unit` | `order.priceDetails.subtotal` | `order.priceDetails.discount` | `order.priceDetails.tax.name` | `order.priceDetails.tax.includedInPrice` | `order.priceDetails.tax.rate` | `order.priceDetails.tax.amount` | `order.priceDetails.total` | `order.priceDetails.planPrice` | `order.priceDetails.currency` | `order.priceDetails.coupon.code` | `order.priceDetails.coupon.amount` | `order.priceDetails.coupon._id` | `order.pricing.prices` | `order.pricing.prices.${number}.duration.cycleFrom` | `order.pricing.prices.${number}.price.subtotal` | `order.pricing.prices.${number}.price.discount` | `order.pricing.prices.${number}.price.total` | `order.pricing.prices.${number}.price.currency` | `order.pricing.prices.${number}.price.proration` | `order.type` | `order.status` | `order.cancellation.cause` | `order.cancellation.effectiveAt` | `order.lastPaymentStatus` | `order.pausePeriods` | `order.pausePeriods.${number}.status` | `order.currentCycle.index` | `order.planName` | `order.planDescription` | `order.planPrice`, 7>>;
2194
+ interface MemberGetOrderOptions {
2168
2195
  /**
2169
2196
  * Predefined set of fields to return.
2170
2197
  *
@@ -2173,51 +2200,36 @@ interface ManagementGetOrderOptions {
2173
2200
  fieldSet?: SetWithLiterals;
2174
2201
  }
2175
2202
  /**
2176
- * Retrieves a list of up to 50 pricing plan orders and details, given the specified sorting and filtering.
2177
- *
2178
- * By default, this endpoint will retrieve all orders and return them sorted by `createdDate` in `DESC`, descending order.
2179
- * `sort.fieldName` supports `endDate` and `createdDate` fields and defaults to `ASC`, ascending order.
2203
+ * Retrieves a list of up to 100 pricing plan orders for currently logged-in member.
2180
2204
  * @public
2181
2205
  * @param options - Filtering, sorting, and pagination options.
2182
- * @permissionId PRICING_PLANS.READ_ORDERS
2206
+ * @permissionId PRICING_PLANS.READ_OWN_ORDERS
2183
2207
  * @applicableIdentity APP
2184
- * @fqn com.wixpress.membership.v2.orders.OrderManagementService.ListOrders
2208
+ * @applicableIdentity MEMBER
2209
+ * @fqn com.wixpress.membership.v2.orders.member.MemberOrdersService.ListOrders
2185
2210
  */
2186
- declare function managementListOrders(options?: ManagementListOrdersOptions): Promise<NonNullablePaths<ListOrdersResponse, `orders` | `orders.${number}._id` | `orders.${number}.planId` | `orders.${number}.subscriptionId` | `orders.${number}.buyer.memberId` | `orders.${number}.buyer.contactId` | `orders.${number}.priceDetails.singlePaymentForDuration.unit` | `orders.${number}.priceDetails.subtotal` | `orders.${number}.priceDetails.discount` | `orders.${number}.priceDetails.tax.name` | `orders.${number}.priceDetails.tax.includedInPrice` | `orders.${number}.priceDetails.tax.rate` | `orders.${number}.priceDetails.tax.amount` | `orders.${number}.priceDetails.total` | `orders.${number}.priceDetails.planPrice` | `orders.${number}.priceDetails.currency` | `orders.${number}.priceDetails.coupon.code` | `orders.${number}.priceDetails.coupon.amount` | `orders.${number}.priceDetails.coupon._id` | `orders.${number}.type` | `orders.${number}.status` | `orders.${number}.cancellation.cause` | `orders.${number}.cancellation.effectiveAt` | `orders.${number}.lastPaymentStatus` | `orders.${number}.currentCycle.index` | `orders.${number}.planName` | `orders.${number}.planDescription` | `orders.${number}.planPrice`, 6>>;
2187
- interface ManagementListOrdersOptions {
2188
- /**
2189
- * Filter by a buyer's member ID, from the Members API.
2190
- * @format GUID
2191
- */
2192
- buyerIds?: string[];
2211
+ declare function memberListOrders(options?: MemberListOrdersOptions): Promise<NonNullablePaths<MemberListOrdersResponse, `orders` | `orders.${number}._id` | `orders.${number}.planId` | `orders.${number}.subscriptionId` | `orders.${number}.buyer.memberId` | `orders.${number}.buyer.contactId` | `orders.${number}.priceDetails.singlePaymentForDuration.unit` | `orders.${number}.priceDetails.subtotal` | `orders.${number}.priceDetails.discount` | `orders.${number}.priceDetails.tax.name` | `orders.${number}.priceDetails.tax.includedInPrice` | `orders.${number}.priceDetails.tax.rate` | `orders.${number}.priceDetails.tax.amount` | `orders.${number}.priceDetails.total` | `orders.${number}.priceDetails.planPrice` | `orders.${number}.priceDetails.currency` | `orders.${number}.priceDetails.coupon.code` | `orders.${number}.priceDetails.coupon.amount` | `orders.${number}.priceDetails.coupon._id` | `orders.${number}.type` | `orders.${number}.status` | `orders.${number}.cancellation.cause` | `orders.${number}.cancellation.effectiveAt` | `orders.${number}.lastPaymentStatus` | `orders.${number}.currentCycle.index` | `orders.${number}.planName` | `orders.${number}.planDescription` | `orders.${number}.planPrice`, 6>>;
2212
+ interface MemberListOrdersOptions {
2193
2213
  /**
2194
- * Filter by plan IDs, from the Plans API.
2214
+ * Filter by plan IDs.
2195
2215
  * @format GUID
2196
2216
  */
2197
2217
  planIds?: string[];
2198
- /** Filter by whether or not the auto-renewal of recurring orders was canceled. */
2218
+ /** Filter for orders where auto renewal was canceled. */
2199
2219
  autoRenewCanceled?: boolean | null;
2200
2220
  /** Filter by order status. */
2201
2221
  orderStatuses?: OrderStatusWithLiterals[];
2202
2222
  /** Filter by payment status. */
2203
2223
  paymentStatuses?: PaymentStatusWithLiterals[];
2204
2224
  /**
2205
- * Number of orders to return. See Sorting and Paging for more information.
2206
- *
2207
- * Max: `50`
2225
+ * Limit the number of pricing plans returned. Default limit is 50.
2208
2226
  * @min 1
2209
2227
  * @max 50
2210
2228
  */
2211
2229
  limit?: number | null;
2212
- /** Number of orders to skip in the current sort order. */
2230
+ /** Number of entries to offset. */
2213
2231
  offset?: number | null;
2214
- /**
2215
- * Sort order.
2216
- *
2217
- * Use `ASC` for ascending order or `DESC` for descending order.
2218
- *
2219
- * Default: `DESC`.
2220
- */
2232
+ /** Sorting direction (defaults to ASC) and field to sort by. */
2221
2233
  sorting?: Sorting;
2222
2234
  /**
2223
2235
  * Predefined set of fields to return.
@@ -2227,106 +2239,26 @@ interface ManagementListOrdersOptions {
2227
2239
  fieldSet?: SetWithLiterals;
2228
2240
  }
2229
2241
  /**
2230
- * 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.
2231
- *
2232
- * New `endDate` must be later than the order's current `endDate`. Can't postpone orders that are unlimited.
2233
- * Can't postpone an order with `status`: `PAUSED`.
2234
- * @param _id - Order ID.
2235
- * @param endDate - New end date and time.
2236
- *
2237
- * Must be later than the current end date and time.
2238
- * @public
2239
- * @requiredField _id
2240
- * @requiredField endDate
2241
- * @param options - Options for postponing the end date of an order.
2242
- * @permissionId PRICING_PLANS.MANAGE_ORDERS
2243
- * @applicableIdentity APP
2244
- * @fqn com.wixpress.membership.v2.orders.OrderManagementService.PostponeEndDate
2245
- */
2246
- declare function postponeEndDate(_id: string, endDate: Date): Promise<void>;
2247
- /**
2248
- * Cancels an existing order.
2249
- *
2250
- * For orders with recurring payments, a cancellation can be set to occur either `IMMEDIATELY` or at the `NEXT_PAYMENT_DATE`.
2251
- * For orders with one-time payments, a cancellation can only be set for `IMMEDIATELY`.
2242
+ * Cancels an order. Recurring orders can be canceled either immediately or at the next payment date. One time orders can only be canceled immediately.
2252
2243
  *
2253
- * #### Canceling during the free trial period.
2244
+ * There may be some operations that continue to be processed before the status of the order is changed to `"CANCELED"`. For example, payments might need to be refunded before the order is fully canceled.
2254
2245
  *
2255
- * When a buyer cancels their order during the free trial period, the buyer's subscription expires at the end
2256
- * of the free trial period and they will not be billed. The buyer may continue using the benefits until the end
2257
- * of the free trial period.
2246
+ * Canceling during the free trial period: When a buyer cancels their order during the free trial period, the buyer's subscription expires at the end of the free trial period and they won't be billed. The buyer may continue using the benefits until the end of the free trial period.
2258
2247
  *
2259
- * When a Wix user cancels an ordered plan during the free trial period, they choose whether to apply the cancellation
2260
- * `IMMEDIATELY` or at the `NEXT_PAYMENT_DATE`. Canceling `IMMEDIATELY` will end the subscription for the buyer
2261
- * immediately, even during the free trial period and the buyer won't be billed. Canceling at the
2262
- * `NEXT_PAYMENT_DATE` allows the buyer to continue using the benefits of the subscription until the end of the free trial period.
2263
- * Then, the subscription ends and the buyer is not billed.
2248
+ * >**Note:**
2249
+ * >This method requires [visitor or member authentication](https://dev.wix.com/docs/rest/articles/getting-started/access-types-and-permissions).
2264
2250
  * @param _id - Order ID.
2265
- * @param effectiveAt - __Required.__ When the order will be canceled. One-time orders can only be canceled `IMMEDIATELY`.
2251
+ * @param effectiveAt - Required. Whether to cancel the order effective immediately or at the next payment date. One-time orders can only be canceled immediately.
2266
2252
  * @public
2267
2253
  * @requiredField _id
2268
2254
  * @requiredField effectiveAt
2269
- * @param options - Options for canceling orders.
2270
- * @permissionId PRICING_PLANS.MANAGE_ORDERS
2271
- * @applicableIdentity APP
2272
- * @fqn com.wixpress.membership.v2.orders.OrderManagementService.CancelOrder
2273
- */
2274
- declare function cancelOrder(_id: string, effectiveAt: CancellationEffectiveAtWithLiterals): Promise<void>;
2275
- /**
2276
- * Marks an offline order as paid.
2277
- * > __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.
2278
- *
2279
- * Marking an offline order as paid causes the following changes:
2280
- * - The order's `lastPaymentStatus` changes to `"PAID"`.
2281
- * - The order's status changes to either `"PENDING"` or `"ACTIVE"`, depending on the order's `startDate`.
2282
- *
2283
- * An error occurs if you attempt to:
2284
- * - Mark an already-paid, offline order as paid. You cannot mark an offline order as paid twice.
2285
- * - Mark an online order as paid. The Mark as Paid method is supported for offline orders only.
2286
- * @param _id - Order ID.
2287
- * @public
2288
- * @requiredField _id
2289
- * @permissionId PRICING_PLANS.MANAGE_ORDERS
2290
- * @applicableIdentity APP
2291
- * @fqn com.wixpress.membership.v2.orders.OrderManagementService.MarkAsPaid
2292
- */
2293
- declare function markAsPaid(_id: string): Promise<void>;
2294
- /**
2295
- * Pauses an order. Calling this method changes the order status to `"PAUSED"` and updates the `pausePeriods` array.
2296
- *
2297
- * Only orders with `status`: `ACTIVE` can be paused.
2298
- * For orders with recurring payments, it also pauses the payment schedule. Buyers are not charged when an order is paused.
2299
- * Pausing an order affects the end date of the order by adding the time the order is paused to the `endDate`.
2300
- * The `endDate` and the `earliestEndDate` for the order are adjusted to include the pause period when the order is resumed.
2301
- *
2302
- * To resume a paused order, call Resume Order.
2303
- * @param _id - Order ID.
2304
- * @public
2305
- * @requiredField _id
2306
- * @permissionId PRICING_PLANS.MANAGE_ORDERS
2307
- * @applicableIdentity APP
2308
- * @fqn com.wixpress.membership.v2.orders.OrderManagementService.PauseOrder
2309
- */
2310
- declare function pauseOrder(_id: string): Promise<void>;
2311
- /**
2312
- * Resumes a paused order. For orders with recurring payments, it also restarts the payment schedule.
2313
- *
2314
- * Resuming an order causes the following changes:
2315
- * - The order status changes to `"ACTIVE"`.
2316
- * - The `pausePeriods` array is updated.
2317
- * - The `endDate` for the order is adjusted to include the pause period.
2318
- * - For orders with recurring payments, the payment schedule is restarted.
2319
- * - The `earliestEndDate` is adjusted to include the pause period. (This property is reserved for future use).
2320
- *
2321
- * To pause an order, call Pause Order.
2322
- * @param _id - Order ID.
2323
- * @public
2324
- * @requiredField _id
2325
- * @permissionId PRICING_PLANS.MANAGE_ORDERS
2255
+ * @param options - Options for requesting a cancellation.
2256
+ * @permissionId PRICING_PLANS.MANAGE_OWN_ORDERS
2326
2257
  * @applicableIdentity APP
2327
- * @fqn com.wixpress.membership.v2.orders.OrderManagementService.ResumeOrder
2258
+ * @applicableIdentity MEMBER
2259
+ * @fqn com.wixpress.membership.v2.orders.member.MemberOrdersService.RequestCancellation
2328
2260
  */
2329
- declare function resumeOrder(_id: string): Promise<void>;
2261
+ declare function requestCancellation(_id: string, effectiveAt: CancellationEffectiveAtWithLiterals): Promise<void>;
2330
2262
  /**
2331
2263
  * Creates an online order for a site member.
2332
2264
  *
@@ -2522,19 +2454,18 @@ interface GetPricePreviewOptions {
2522
2454
  couponCode?: string | null;
2523
2455
  }
2524
2456
  /**
2525
- * Retrieves an order for the currently logged-in member by ID.
2457
+ * Retrieves an order by ID.
2526
2458
  * @param _id - Order ID.
2527
2459
  * @public
2528
2460
  * @requiredField _id
2529
- * @param options - Options for getting a logged-in member's order.
2530
- * @permissionId PRICING_PLANS.READ_OWN_ORDERS
2461
+ * @param options - Options to use when getting an order.
2462
+ * @permissionId PRICING_PLANS.READ_ORDERS
2531
2463
  * @applicableIdentity APP
2532
- * @applicableIdentity MEMBER
2533
- * @returns Requested order.
2534
- * @fqn com.wixpress.membership.v2.orders.member.MemberOrdersService.GetOrder
2464
+ * @returns Order.
2465
+ * @fqn com.wixpress.membership.v2.orders.OrderManagementService.GetOrder
2535
2466
  */
2536
- declare function memberGetOrder(_id: string, options?: MemberGetOrderOptions): Promise<NonNullablePaths<Order, `_id` | `planId` | `subscriptionId` | `buyer.memberId` | `buyer.contactId` | `priceDetails.subscription.cycleDuration.unit` | `priceDetails.subtotal` | `priceDetails.discount` | `priceDetails.tax.name` | `priceDetails.tax.includedInPrice` | `priceDetails.tax.rate` | `priceDetails.tax.amount` | `priceDetails.total` | `priceDetails.planPrice` | `priceDetails.currency` | `priceDetails.coupon.code` | `priceDetails.coupon.amount` | `priceDetails.coupon._id` | `pricing.prices` | `pricing.prices.${number}.duration.cycleFrom` | `pricing.prices.${number}.price.subtotal` | `pricing.prices.${number}.price.discount` | `pricing.prices.${number}.price.total` | `pricing.prices.${number}.price.currency` | `pricing.prices.${number}.price.proration` | `type` | `status` | `cancellation.cause` | `cancellation.effectiveAt` | `lastPaymentStatus` | `pausePeriods` | `pausePeriods.${number}.status` | `currentCycle.index` | `planName` | `planDescription` | `planPrice`, 6>>;
2537
- interface MemberGetOrderOptions {
2467
+ declare function managementGetOrder(_id: string, options?: ManagementGetOrderOptions): Promise<NonNullablePaths<Order, `_id` | `planId` | `subscriptionId` | `buyer.memberId` | `buyer.contactId` | `priceDetails.subscription.cycleDuration.unit` | `priceDetails.subtotal` | `priceDetails.discount` | `priceDetails.tax.name` | `priceDetails.tax.includedInPrice` | `priceDetails.tax.rate` | `priceDetails.tax.amount` | `priceDetails.total` | `priceDetails.planPrice` | `priceDetails.currency` | `priceDetails.coupon.code` | `priceDetails.coupon.amount` | `priceDetails.coupon._id` | `pricing.prices` | `pricing.prices.${number}.duration.cycleFrom` | `pricing.prices.${number}.price.subtotal` | `pricing.prices.${number}.price.discount` | `pricing.prices.${number}.price.total` | `pricing.prices.${number}.price.currency` | `pricing.prices.${number}.price.proration` | `type` | `status` | `cancellation.cause` | `cancellation.effectiveAt` | `lastPaymentStatus` | `pausePeriods` | `pausePeriods.${number}.status` | `currentCycle.index` | `planName` | `planDescription` | `planPrice`, 6>>;
2468
+ interface ManagementGetOrderOptions {
2538
2469
  /**
2539
2470
  * Predefined set of fields to return.
2540
2471
  *
@@ -2543,36 +2474,51 @@ interface MemberGetOrderOptions {
2543
2474
  fieldSet?: SetWithLiterals;
2544
2475
  }
2545
2476
  /**
2546
- * Retrieves a list of up to 100 pricing plan orders for currently logged-in member.
2477
+ * Retrieves a list of up to 50 pricing plan orders and details, given the specified sorting and filtering.
2478
+ *
2479
+ * By default, this endpoint will retrieve all orders and return them sorted by `createdDate` in `DESC`, descending order.
2480
+ * `sort.fieldName` supports `endDate` and `createdDate` fields and defaults to `ASC`, ascending order.
2547
2481
  * @public
2548
2482
  * @param options - Filtering, sorting, and pagination options.
2549
- * @permissionId PRICING_PLANS.READ_OWN_ORDERS
2483
+ * @permissionId PRICING_PLANS.READ_ORDERS
2550
2484
  * @applicableIdentity APP
2551
- * @applicableIdentity MEMBER
2552
- * @fqn com.wixpress.membership.v2.orders.member.MemberOrdersService.ListOrders
2485
+ * @fqn com.wixpress.membership.v2.orders.OrderManagementService.ListOrders
2553
2486
  */
2554
- declare function memberListOrders(options?: MemberListOrdersOptions): Promise<NonNullablePaths<MemberListOrdersResponse, `orders` | `orders.${number}._id` | `orders.${number}.planId` | `orders.${number}.subscriptionId` | `orders.${number}.buyer.memberId` | `orders.${number}.buyer.contactId` | `orders.${number}.priceDetails.singlePaymentForDuration.unit` | `orders.${number}.priceDetails.subtotal` | `orders.${number}.priceDetails.discount` | `orders.${number}.priceDetails.tax.name` | `orders.${number}.priceDetails.tax.includedInPrice` | `orders.${number}.priceDetails.tax.rate` | `orders.${number}.priceDetails.tax.amount` | `orders.${number}.priceDetails.total` | `orders.${number}.priceDetails.planPrice` | `orders.${number}.priceDetails.currency` | `orders.${number}.priceDetails.coupon.code` | `orders.${number}.priceDetails.coupon.amount` | `orders.${number}.priceDetails.coupon._id` | `orders.${number}.type` | `orders.${number}.status` | `orders.${number}.cancellation.cause` | `orders.${number}.cancellation.effectiveAt` | `orders.${number}.lastPaymentStatus` | `orders.${number}.currentCycle.index` | `orders.${number}.planName` | `orders.${number}.planDescription` | `orders.${number}.planPrice`, 6>>;
2555
- interface MemberListOrdersOptions {
2487
+ declare function managementListOrders(options?: ManagementListOrdersOptions): Promise<NonNullablePaths<ListOrdersResponse, `orders` | `orders.${number}._id` | `orders.${number}.planId` | `orders.${number}.subscriptionId` | `orders.${number}.buyer.memberId` | `orders.${number}.buyer.contactId` | `orders.${number}.priceDetails.singlePaymentForDuration.unit` | `orders.${number}.priceDetails.subtotal` | `orders.${number}.priceDetails.discount` | `orders.${number}.priceDetails.tax.name` | `orders.${number}.priceDetails.tax.includedInPrice` | `orders.${number}.priceDetails.tax.rate` | `orders.${number}.priceDetails.tax.amount` | `orders.${number}.priceDetails.total` | `orders.${number}.priceDetails.planPrice` | `orders.${number}.priceDetails.currency` | `orders.${number}.priceDetails.coupon.code` | `orders.${number}.priceDetails.coupon.amount` | `orders.${number}.priceDetails.coupon._id` | `orders.${number}.type` | `orders.${number}.status` | `orders.${number}.cancellation.cause` | `orders.${number}.cancellation.effectiveAt` | `orders.${number}.lastPaymentStatus` | `orders.${number}.currentCycle.index` | `orders.${number}.planName` | `orders.${number}.planDescription` | `orders.${number}.planPrice`, 6>>;
2488
+ interface ManagementListOrdersOptions {
2556
2489
  /**
2557
- * Filter by plan IDs.
2490
+ * Filter by a buyer's member ID, from the Members API.
2491
+ * @format GUID
2492
+ */
2493
+ buyerIds?: string[];
2494
+ /**
2495
+ * Filter by plan IDs, from the Plans API.
2558
2496
  * @format GUID
2559
2497
  */
2560
2498
  planIds?: string[];
2561
- /** Filter for orders where auto renewal was canceled. */
2499
+ /** Filter by whether or not the auto-renewal of recurring orders was canceled. */
2562
2500
  autoRenewCanceled?: boolean | null;
2563
2501
  /** Filter by order status. */
2564
2502
  orderStatuses?: OrderStatusWithLiterals[];
2565
2503
  /** Filter by payment status. */
2566
2504
  paymentStatuses?: PaymentStatusWithLiterals[];
2567
2505
  /**
2568
- * Limit the number of pricing plans returned. Default limit is 50.
2506
+ * Number of orders to return. See Sorting and Paging for more information.
2507
+ *
2508
+ * Max: `50`
2569
2509
  * @min 1
2570
2510
  * @max 50
2571
2511
  */
2572
2512
  limit?: number | null;
2573
- /** Number of entries to offset. */
2513
+ /** Number of orders to skip in the current sort order. */
2574
2514
  offset?: number | null;
2575
- /** Sorting direction (defaults to ASC) and field to sort by. */
2515
+ /**
2516
+ * Sort order.
2517
+ *
2518
+ * Use `ASC` for ascending order or `DESC` for descending order.
2519
+ *
2520
+ * Default: `DESC`.
2521
+ */
2576
2522
  sorting?: Sorting;
2577
2523
  /**
2578
2524
  * Predefined set of fields to return.
@@ -2582,25 +2528,105 @@ interface MemberListOrdersOptions {
2582
2528
  fieldSet?: SetWithLiterals;
2583
2529
  }
2584
2530
  /**
2585
- * Cancels an order. Recurring orders can be canceled either immediately or at the next payment date. One time orders can only be canceled immediately.
2531
+ * 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.
2586
2532
  *
2587
- * There may be some operations that continue to be processed before the status of the order is changed to `"CANCELED"`. For example, payments might need to be refunded before the order is fully canceled.
2533
+ * New `endDate` must be later than the order's current `endDate`. Can't postpone orders that are unlimited.
2534
+ * Can't postpone an order with `status`: `PAUSED`.
2535
+ * @param _id - Order ID.
2536
+ * @param endDate - New end date and time.
2588
2537
  *
2589
- * Canceling during the free trial period: When a buyer cancels their order during the free trial period, the buyer's subscription expires at the end of the free trial period and they won't be billed. The buyer may continue using the benefits until the end of the free trial period.
2538
+ * Must be later than the current end date and time.
2539
+ * @public
2540
+ * @requiredField _id
2541
+ * @requiredField endDate
2542
+ * @param options - Options for postponing the end date of an order.
2543
+ * @permissionId PRICING_PLANS.MANAGE_ORDERS
2544
+ * @applicableIdentity APP
2545
+ * @fqn com.wixpress.membership.v2.orders.OrderManagementService.PostponeEndDate
2546
+ */
2547
+ declare function postponeEndDate(_id: string, endDate: Date): Promise<void>;
2548
+ /**
2549
+ * Cancels an existing order.
2590
2550
  *
2591
- * >**Note:**
2592
- * >This method requires [visitor or member authentication](https://dev.wix.com/docs/rest/articles/getting-started/access-types-and-permissions).
2551
+ * For orders with recurring payments, a cancellation can be set to occur either `IMMEDIATELY` or at the `NEXT_PAYMENT_DATE`.
2552
+ * For orders with one-time payments, a cancellation can only be set for `IMMEDIATELY`.
2553
+ *
2554
+ * #### Canceling during the free trial period.
2555
+ *
2556
+ * When a buyer cancels their order during the free trial period, the buyer's subscription expires at the end
2557
+ * of the free trial period and they will not be billed. The buyer may continue using the benefits until the end
2558
+ * of the free trial period.
2559
+ *
2560
+ * When a Wix user cancels an ordered plan during the free trial period, they choose whether to apply the cancellation
2561
+ * `IMMEDIATELY` or at the `NEXT_PAYMENT_DATE`. Canceling `IMMEDIATELY` will end the subscription for the buyer
2562
+ * immediately, even during the free trial period and the buyer won't be billed. Canceling at the
2563
+ * `NEXT_PAYMENT_DATE` allows the buyer to continue using the benefits of the subscription until the end of the free trial period.
2564
+ * Then, the subscription ends and the buyer is not billed.
2593
2565
  * @param _id - Order ID.
2594
- * @param effectiveAt - Required. Whether to cancel the order effective immediately or at the next payment date. One-time orders can only be canceled immediately.
2566
+ * @param effectiveAt - __Required.__ When the order will be canceled. One-time orders can only be canceled `IMMEDIATELY`.
2595
2567
  * @public
2596
2568
  * @requiredField _id
2597
2569
  * @requiredField effectiveAt
2598
- * @param options - Options for requesting a cancellation.
2599
- * @permissionId PRICING_PLANS.MANAGE_OWN_ORDERS
2570
+ * @param options - Options for canceling orders.
2571
+ * @permissionId PRICING_PLANS.MANAGE_ORDERS
2600
2572
  * @applicableIdentity APP
2601
- * @applicableIdentity MEMBER
2602
- * @fqn com.wixpress.membership.v2.orders.member.MemberOrdersService.RequestCancellation
2573
+ * @fqn com.wixpress.membership.v2.orders.OrderManagementService.CancelOrder
2603
2574
  */
2604
- declare function requestCancellation(_id: string, effectiveAt: CancellationEffectiveAtWithLiterals): Promise<void>;
2575
+ declare function cancelOrder(_id: string, effectiveAt: CancellationEffectiveAtWithLiterals): Promise<void>;
2576
+ /**
2577
+ * Marks an offline order as paid.
2578
+ * > __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.
2579
+ *
2580
+ * Marking an offline order as paid causes the following changes:
2581
+ * - The order's `lastPaymentStatus` changes to `"PAID"`.
2582
+ * - The order's status changes to either `"PENDING"` or `"ACTIVE"`, depending on the order's `startDate`.
2583
+ *
2584
+ * An error occurs if you attempt to:
2585
+ * - Mark an already-paid, offline order as paid. You cannot mark an offline order as paid twice.
2586
+ * - Mark an online order as paid. The Mark as Paid method is supported for offline orders only.
2587
+ * @param _id - Order ID.
2588
+ * @public
2589
+ * @requiredField _id
2590
+ * @permissionId PRICING_PLANS.MANAGE_ORDERS
2591
+ * @applicableIdentity APP
2592
+ * @fqn com.wixpress.membership.v2.orders.OrderManagementService.MarkAsPaid
2593
+ */
2594
+ declare function markAsPaid(_id: string): Promise<void>;
2595
+ /**
2596
+ * Pauses an order. Calling this method changes the order status to `"PAUSED"` and updates the `pausePeriods` array.
2597
+ *
2598
+ * Only orders with `status`: `ACTIVE` can be paused.
2599
+ * For orders with recurring payments, it also pauses the payment schedule. Buyers are not charged when an order is paused.
2600
+ * Pausing an order affects the end date of the order by adding the time the order is paused to the `endDate`.
2601
+ * The `endDate` and the `earliestEndDate` for the order are adjusted to include the pause period when the order is resumed.
2602
+ *
2603
+ * To resume a paused order, call Resume Order.
2604
+ * @param _id - Order ID.
2605
+ * @public
2606
+ * @requiredField _id
2607
+ * @permissionId PRICING_PLANS.MANAGE_ORDERS
2608
+ * @applicableIdentity APP
2609
+ * @fqn com.wixpress.membership.v2.orders.OrderManagementService.PauseOrder
2610
+ */
2611
+ declare function pauseOrder(_id: string): Promise<void>;
2612
+ /**
2613
+ * Resumes a paused order. For orders with recurring payments, it also restarts the payment schedule.
2614
+ *
2615
+ * Resuming an order causes the following changes:
2616
+ * - The order status changes to `"ACTIVE"`.
2617
+ * - The `pausePeriods` array is updated.
2618
+ * - The `endDate` for the order is adjusted to include the pause period.
2619
+ * - For orders with recurring payments, the payment schedule is restarted.
2620
+ * - The `earliestEndDate` is adjusted to include the pause period. (This property is reserved for future use).
2621
+ *
2622
+ * To pause an order, call Pause Order.
2623
+ * @param _id - Order ID.
2624
+ * @public
2625
+ * @requiredField _id
2626
+ * @permissionId PRICING_PLANS.MANAGE_ORDERS
2627
+ * @applicableIdentity APP
2628
+ * @fqn com.wixpress.membership.v2.orders.OrderManagementService.ResumeOrder
2629
+ */
2630
+ declare function resumeOrder(_id: string): Promise<void>;
2605
2631
 
2606
2632
  export { type AccountInfo, type AccountInfoMetadata, type ActionEvent, type ApplicationError, type ApplyCouponRequest, type ApplyCouponResponse, type BaseEventMetadata, type BulkActionMetadata, type BulkOrderResult, type BulkPauseOrderRequest, type BulkPauseOrderResponse, type BulkResumeOrderRequest, type BulkResumeOrderResponse, type Buyer, type CancelOrderRequest, type CancelOrderResponse, type Cancellation, CancellationCause, type CancellationCauseWithLiterals, CancellationEffectiveAt, type CancellationEffectiveAtWithLiterals, type Captcha, type ChangeStartDateRequest, type ChangeStartDateResponse, type Coupon, type CouponsError, type CreateExternalOrderRequest, type CreateExternalOrderResponse, type CreateGuestOnlineOrderRequest, type CreateGuestOnlineOrderResponse, type CreateOfflineOrderApplicationErrors, type CreateOfflineOrderOptions, type CreateOfflineOrderRequest, type CreateOfflineOrderResponse, type CreateOfflineOrderValidationErrors, type CreateOnlineOrderApplicationErrors, type CreateOnlineOrderOptions, type CreateOnlineOrderRequest, type CreateOnlineOrderResponse, type CreateOnlineOrderValidationErrors, type CurrentCycle, type CursorPaging, type Cursors, type DomainEvent, type DomainEventBodyOneOf, type Duration, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type Fee, type FormData, type GetAvailableOrderActionsRequest, type GetAvailableOrderActionsResponse, type GetGuestOnlineOrderPreviewRequest, type GetGuestOnlineOrderPreviewResponse, type GetOfflineOrderPreviewApplicationErrors, type GetOfflineOrderPreviewOptions, type GetOfflineOrderPreviewRequest, type GetOfflineOrderPreviewResponse, type GetOfflineOrderPreviewValidationErrors, type GetOnlineOrderPreviewApplicationErrors, type GetOnlineOrderPreviewOptions, type GetOnlineOrderPreviewRequest, type GetOnlineOrderPreviewResponse, type GetOnlineOrderPreviewValidationErrors, type GetOrderRequest, type GetOrderResponse, type GetOrdersStatsRequest, type GetOrdersStatsResponse, type GetPricePreviewApplicationErrors, type GetPricePreviewOptions, type GetPricePreviewRequest, type GetPricePreviewResponse, type Guest, type IdentificationData, type IdentificationDataIdOneOf, type ItemMetadata, type ListOrdersRequest, type ListOrdersResponse, type ManagementGetOrderOptions, type ManagementListOrdersOptions, type MarkAsPaidRequest, type MarkAsPaidResponse, type MemberGetOrderOptions, type MemberGetOrderRequest, type MemberGetOrderResponse, type MemberListOrdersOptions, type MemberListOrdersRequest, type MemberListOrdersResponse, type MessageEnvelope, type OnBehalf, type Order, type OrderAutoRenewCanceled, type OrderAutoRenewCanceledEnvelope, type OrderCanceled, type OrderCanceledEnvelope, type OrderCreatedEnvelope, type OrderCycle, type OrderCycleStarted, type OrderCycleStartedEnvelope, type OrderEndDatePostponed, type OrderEndDatePostponedEnvelope, type OrderEnded, type OrderEndedEnvelope, type OrderMarkedAsPaid, type OrderMarkedAsPaidEnvelope, OrderMethod, type OrderMethodWithLiterals, type OrderPaused, type OrderPausedEnvelope, type OrderPurchased, type OrderPurchasedEnvelope, type OrderResumed, type OrderResumedEnvelope, type OrderStartDateChanged, type OrderStartDateChangedEnvelope, type OrderStarted, type OrderStartedEnvelope, OrderStatus, type OrderStatusWithLiterals, OrderType, type OrderTypeWithLiterals, type OrderUpdatedEnvelope, type OrdersQueryOrdersRequest, type OrdersQueryOrdersResponse, type Paging, type PagingMetadataV2, type PauseOrderRequest, type PauseOrderResponse, type PausePeriod, PaymentStatus, type PaymentStatusWithLiterals, PeriodUnit, type PeriodUnitWithLiterals, type PostponeEndDateRequest, type PostponeEndDateResponse, type Price, type PriceDetails, type PriceDetailsPricingModelOneOf, type PriceDuration, type PricingDetails, type PricingDetailsPricingModelOneOf, type QueryOrdersRequest, type QueryOrdersResponse, type QueryV2, type QueryV2PagingMethodOneOf, ReasonNotSuspendable, type ReasonNotSuspendableWithLiterals, type Recurrence, type RequestCancellationRequest, type RequestCancellationResponse, type RestoreInfo, type ResumeOrderRequest, type ResumeOrderResponse, Set, type SetSubmissionRequest, type SetSubmissionResponse, type SetWithLiterals, SortOrder, type SortOrderWithLiterals, type Sorting, type SpannedPrice, Status, type StatusWithLiterals, type Tax, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, cancelOrder, createOfflineOrder, createOnlineOrder, getOfflineOrderPreview, getOnlineOrderPreview, getPricePreview, managementGetOrder, managementListOrders, markAsPaid, memberGetOrder, memberListOrders, onOrderAutoRenewCanceled, onOrderCanceled, onOrderCreated, onOrderCycleStarted, onOrderEndDatePostponed, onOrderEnded, onOrderMarkedAsPaid, onOrderPaused, onOrderPurchased, onOrderResumed, onOrderStartDateChanged, onOrderStarted, onOrderUpdated, pauseOrder, postponeEndDate, requestCancellation, resumeOrder };