@wix/auto_sdk_pricing-plans_orders 1.0.119 → 1.0.120
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +155 -155
- package/build/cjs/index.js +489 -470
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +509 -498
- package/build/cjs/index.typings.js +361 -342
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +261 -250
- package/build/cjs/meta.js +361 -342
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/schemas.d.ts +38 -30
- package/build/cjs/schemas.js +73 -61
- package/build/cjs/schemas.js.map +1 -1
- package/build/es/index.d.mts +155 -155
- package/build/es/index.mjs +489 -470
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +509 -498
- package/build/es/index.typings.mjs +361 -342
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +261 -250
- package/build/es/meta.mjs +361 -342
- package/build/es/meta.mjs.map +1 -1
- package/build/es/schemas.d.mts +38 -30
- package/build/es/schemas.mjs +73 -61
- package/build/es/schemas.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +155 -155
- package/build/internal/cjs/index.js +489 -470
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +509 -498
- package/build/internal/cjs/index.typings.js +361 -342
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +261 -250
- package/build/internal/cjs/meta.js +361 -342
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/cjs/schemas.d.ts +38 -30
- package/build/internal/cjs/schemas.js +73 -61
- package/build/internal/cjs/schemas.js.map +1 -1
- package/build/internal/es/index.d.mts +155 -155
- package/build/internal/es/index.mjs +489 -470
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +509 -498
- package/build/internal/es/index.typings.mjs +361 -342
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +261 -250
- package/build/internal/es/meta.mjs +361 -342
- package/build/internal/es/meta.mjs.map +1 -1
- package/build/internal/es/schemas.d.mts +38 -30
- package/build/internal/es/schemas.mjs +73 -61
- package/build/internal/es/schemas.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -635,7 +635,35 @@ interface ActionEvent {
|
|
|
635
635
|
}
|
|
636
636
|
interface Empty {
|
|
637
637
|
}
|
|
638
|
-
interface
|
|
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 {
|
|
639
667
|
/**
|
|
640
668
|
* Order ID.
|
|
641
669
|
* @format GUID
|
|
@@ -658,31 +686,44 @@ declare enum Set {
|
|
|
658
686
|
}
|
|
659
687
|
/** @enumType */
|
|
660
688
|
type SetWithLiterals = Set | 'UNKNOWN_SET' | 'BASIC' | 'FULL';
|
|
661
|
-
interface
|
|
662
|
-
/**
|
|
689
|
+
interface GetOrderResponse {
|
|
690
|
+
/** Order. */
|
|
663
691
|
order?: Order;
|
|
664
692
|
}
|
|
665
|
-
interface
|
|
693
|
+
interface ListOrdersRequest {
|
|
666
694
|
/**
|
|
667
|
-
* Filter by
|
|
695
|
+
* Filter by a buyer's member ID, from the Members API.
|
|
696
|
+
* @format GUID
|
|
697
|
+
*/
|
|
698
|
+
buyerIds?: string[];
|
|
699
|
+
/**
|
|
700
|
+
* Filter by plan IDs, from the Plans API.
|
|
668
701
|
* @format GUID
|
|
669
702
|
*/
|
|
670
703
|
planIds?: string[];
|
|
671
|
-
/** Filter
|
|
704
|
+
/** Filter by whether or not the auto-renewal of recurring orders was canceled. */
|
|
672
705
|
autoRenewCanceled?: boolean | null;
|
|
673
706
|
/** Filter by order status. */
|
|
674
707
|
orderStatuses?: OrderStatusWithLiterals[];
|
|
675
708
|
/** Filter by payment status. */
|
|
676
709
|
paymentStatuses?: PaymentStatusWithLiterals[];
|
|
677
710
|
/**
|
|
678
|
-
*
|
|
711
|
+
* Number of orders to return. See Sorting and Paging for more information.
|
|
712
|
+
*
|
|
713
|
+
* Max: `50`
|
|
679
714
|
* @min 1
|
|
680
715
|
* @max 50
|
|
681
716
|
*/
|
|
682
717
|
limit?: number | null;
|
|
683
|
-
/** Number of
|
|
718
|
+
/** Number of orders to skip in the current sort order. */
|
|
684
719
|
offset?: number | null;
|
|
685
|
-
/**
|
|
720
|
+
/**
|
|
721
|
+
* Sort order.
|
|
722
|
+
*
|
|
723
|
+
* Use `ASC` for ascending order or `DESC` for descending order.
|
|
724
|
+
*
|
|
725
|
+
* Default: `DESC`.
|
|
726
|
+
*/
|
|
686
727
|
sorting?: Sorting;
|
|
687
728
|
/**
|
|
688
729
|
* Predefined set of fields to return.
|
|
@@ -699,6 +740,11 @@ interface Sorting {
|
|
|
699
740
|
fieldName?: string;
|
|
700
741
|
/** Sort order. */
|
|
701
742
|
order?: SortOrderWithLiterals;
|
|
743
|
+
/**
|
|
744
|
+
* Origin point for geo-distance sorting on a GEO field
|
|
745
|
+
* results are ordered by distance from this point (ASC = nearest first, DESC = farthest first).
|
|
746
|
+
*/
|
|
747
|
+
origin?: AddressLocation;
|
|
702
748
|
}
|
|
703
749
|
declare enum SortOrder {
|
|
704
750
|
ASC = "ASC",
|
|
@@ -706,8 +752,14 @@ declare enum SortOrder {
|
|
|
706
752
|
}
|
|
707
753
|
/** @enumType */
|
|
708
754
|
type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
|
|
709
|
-
interface
|
|
710
|
-
/**
|
|
755
|
+
interface AddressLocation {
|
|
756
|
+
/** Address latitude. */
|
|
757
|
+
latitude?: number | null;
|
|
758
|
+
/** Address longitude. */
|
|
759
|
+
longitude?: number | null;
|
|
760
|
+
}
|
|
761
|
+
interface ListOrdersResponse {
|
|
762
|
+
/** List of orders. */
|
|
711
763
|
orders?: Order[];
|
|
712
764
|
/** Object containing paging-related data (number of orders returned, offset). */
|
|
713
765
|
pagingMetadata?: PagingMetadataV2;
|
|
@@ -736,16 +788,78 @@ interface Cursors {
|
|
|
736
788
|
*/
|
|
737
789
|
prev?: string | null;
|
|
738
790
|
}
|
|
739
|
-
interface
|
|
791
|
+
interface GetOrdersStatsRequest {
|
|
792
|
+
}
|
|
793
|
+
interface GetOrdersStatsResponse {
|
|
794
|
+
/** Total number of orders. */
|
|
795
|
+
totalOrderCount?: number;
|
|
796
|
+
/** Number of active orders. */
|
|
797
|
+
activeOrderCount?: number;
|
|
798
|
+
}
|
|
799
|
+
interface GetAvailableOrderActionsRequest {
|
|
800
|
+
/**
|
|
801
|
+
* Order ID.
|
|
802
|
+
* @format GUID
|
|
803
|
+
*/
|
|
804
|
+
_id?: string;
|
|
805
|
+
}
|
|
806
|
+
interface GetAvailableOrderActionsResponse {
|
|
807
|
+
/** Whether the order can be suspended. */
|
|
808
|
+
suspendable?: boolean;
|
|
809
|
+
/** If the order cannot be suspended, a reason is returned here. */
|
|
810
|
+
notSuspendableReason?: ReasonNotSuspendableWithLiterals;
|
|
811
|
+
/** Whether the order can be canceled by the buyer. */
|
|
812
|
+
cancelableByBuyer?: boolean;
|
|
813
|
+
}
|
|
814
|
+
declare enum ReasonNotSuspendable {
|
|
815
|
+
/** Undefined reason. */
|
|
816
|
+
UNDEFINED = "UNDEFINED",
|
|
817
|
+
/** Saved in the database but is awaiting payment. Non-active orders can't be suspended. */
|
|
818
|
+
PENDING = "PENDING",
|
|
819
|
+
/** Trial orders can't be suspended. */
|
|
820
|
+
TRIAL = "TRIAL",
|
|
821
|
+
/** Canceled orders can't be suspended. */
|
|
822
|
+
CANCELED = "CANCELED",
|
|
823
|
+
/** Ended orders can't be suspended. */
|
|
824
|
+
ENDED = "ENDED",
|
|
825
|
+
/** Paid for orders with future start dates can't be suspended. */
|
|
826
|
+
NOT_STARTED = "NOT_STARTED",
|
|
827
|
+
/** Order is already suspended. */
|
|
828
|
+
ALREADY_SUSPENDED = "ALREADY_SUSPENDED",
|
|
829
|
+
/** Orders based on recurring payments using older stripe versions can't be suspended. */
|
|
830
|
+
OLD_STRIPE = "OLD_STRIPE"
|
|
831
|
+
}
|
|
832
|
+
/** @enumType */
|
|
833
|
+
type ReasonNotSuspendableWithLiterals = ReasonNotSuspendable | 'UNDEFINED' | 'PENDING' | 'TRIAL' | 'CANCELED' | 'ENDED' | 'NOT_STARTED' | 'ALREADY_SUSPENDED' | 'OLD_STRIPE';
|
|
834
|
+
interface PostponeEndDateRequest {
|
|
740
835
|
/**
|
|
741
836
|
* Order ID.
|
|
742
837
|
* @format GUID
|
|
743
838
|
*/
|
|
744
839
|
_id: string;
|
|
745
|
-
/**
|
|
840
|
+
/**
|
|
841
|
+
* New end date and time.
|
|
842
|
+
*
|
|
843
|
+
* Must be later than the current end date and time.
|
|
844
|
+
*/
|
|
845
|
+
endDate: Date | null;
|
|
846
|
+
}
|
|
847
|
+
interface PostponeEndDateResponse {
|
|
848
|
+
}
|
|
849
|
+
interface OrderEndDatePostponed {
|
|
850
|
+
/** Order whose `endDate` was postponed. */
|
|
851
|
+
order?: Order;
|
|
852
|
+
}
|
|
853
|
+
interface CancelOrderRequest {
|
|
854
|
+
/**
|
|
855
|
+
* Order ID.
|
|
856
|
+
* @format GUID
|
|
857
|
+
*/
|
|
858
|
+
_id: string;
|
|
859
|
+
/** __Required.__ When the order will be canceled. One-time orders can only be canceled `IMMEDIATELY`. */
|
|
746
860
|
effectiveAt: CancellationEffectiveAtWithLiterals;
|
|
747
861
|
}
|
|
748
|
-
interface
|
|
862
|
+
interface CancelOrderResponse {
|
|
749
863
|
}
|
|
750
864
|
/**
|
|
751
865
|
* Emitted when an order is canceled immediately or when cycle ends for an order with canceled auto renewal
|
|
@@ -756,6 +870,111 @@ interface OrderCanceled {
|
|
|
756
870
|
/** Canceled order. */
|
|
757
871
|
order?: Order;
|
|
758
872
|
}
|
|
873
|
+
interface MarkAsPaidRequest {
|
|
874
|
+
/**
|
|
875
|
+
* Order ID.
|
|
876
|
+
* @format GUID
|
|
877
|
+
*/
|
|
878
|
+
_id: string;
|
|
879
|
+
}
|
|
880
|
+
interface MarkAsPaidResponse {
|
|
881
|
+
}
|
|
882
|
+
interface OrderMarkedAsPaid {
|
|
883
|
+
/** Order that was marked as paid. */
|
|
884
|
+
order?: Order;
|
|
885
|
+
}
|
|
886
|
+
interface PauseOrderRequest {
|
|
887
|
+
/**
|
|
888
|
+
* Order ID.
|
|
889
|
+
* @format GUID
|
|
890
|
+
*/
|
|
891
|
+
_id: string;
|
|
892
|
+
}
|
|
893
|
+
interface PauseOrderResponse {
|
|
894
|
+
}
|
|
895
|
+
interface OrderPaused {
|
|
896
|
+
/** Paused order. */
|
|
897
|
+
order?: Order;
|
|
898
|
+
}
|
|
899
|
+
interface BulkPauseOrderRequest {
|
|
900
|
+
/**
|
|
901
|
+
* List of Order IDs.
|
|
902
|
+
* @format GUID
|
|
903
|
+
* @minSize 1
|
|
904
|
+
* @maxSize 100
|
|
905
|
+
*/
|
|
906
|
+
ids?: string[];
|
|
907
|
+
/** Set to true to return Order entity in response. */
|
|
908
|
+
returnFullEntity?: boolean;
|
|
909
|
+
}
|
|
910
|
+
interface BulkPauseOrderResponse {
|
|
911
|
+
/** Orders that were paused. */
|
|
912
|
+
results?: BulkOrderResult[];
|
|
913
|
+
/** Bulk action metadata. */
|
|
914
|
+
bulkActionMetadata?: BulkActionMetadata;
|
|
915
|
+
}
|
|
916
|
+
interface BulkOrderResult {
|
|
917
|
+
/** Item metadata */
|
|
918
|
+
itemMetadata?: ItemMetadata;
|
|
919
|
+
/** The order. */
|
|
920
|
+
order?: Order;
|
|
921
|
+
}
|
|
922
|
+
interface ItemMetadata {
|
|
923
|
+
/** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
|
|
924
|
+
_id?: string | null;
|
|
925
|
+
/** Index of the item within the request array. Allows for correlation between request and response items. */
|
|
926
|
+
originalIndex?: number;
|
|
927
|
+
/** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
|
|
928
|
+
success?: boolean;
|
|
929
|
+
/** Details about the error in case of failure. */
|
|
930
|
+
error?: ApplicationError;
|
|
931
|
+
}
|
|
932
|
+
interface ApplicationError {
|
|
933
|
+
/** Error code. */
|
|
934
|
+
code?: string;
|
|
935
|
+
/** Description of the error. */
|
|
936
|
+
description?: string;
|
|
937
|
+
/** Data related to the error. */
|
|
938
|
+
data?: Record<string, any> | null;
|
|
939
|
+
}
|
|
940
|
+
interface BulkActionMetadata {
|
|
941
|
+
/** Number of items that were successfully processed. */
|
|
942
|
+
totalSuccesses?: number;
|
|
943
|
+
/** Number of items that couldn't be processed. */
|
|
944
|
+
totalFailures?: number;
|
|
945
|
+
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
946
|
+
undetailedFailures?: number;
|
|
947
|
+
}
|
|
948
|
+
interface ResumeOrderRequest {
|
|
949
|
+
/**
|
|
950
|
+
* Order ID.
|
|
951
|
+
* @format GUID
|
|
952
|
+
*/
|
|
953
|
+
_id: string;
|
|
954
|
+
}
|
|
955
|
+
interface ResumeOrderResponse {
|
|
956
|
+
}
|
|
957
|
+
interface OrderResumed {
|
|
958
|
+
/** Resumed order. */
|
|
959
|
+
order?: Order;
|
|
960
|
+
}
|
|
961
|
+
interface BulkResumeOrderRequest {
|
|
962
|
+
/**
|
|
963
|
+
* List of Order IDs.
|
|
964
|
+
* @format GUID
|
|
965
|
+
* @minSize 1
|
|
966
|
+
* @maxSize 100
|
|
967
|
+
*/
|
|
968
|
+
ids?: string[];
|
|
969
|
+
/** Set to true to return Order entity in response. */
|
|
970
|
+
returnFullEntity?: boolean;
|
|
971
|
+
}
|
|
972
|
+
interface BulkResumeOrderResponse {
|
|
973
|
+
/** Orders that were resumed. */
|
|
974
|
+
results?: BulkOrderResult[];
|
|
975
|
+
/** Bulk action metadata. */
|
|
976
|
+
bulkActionMetadata?: BulkActionMetadata;
|
|
977
|
+
}
|
|
759
978
|
interface MessageEnvelope {
|
|
760
979
|
/**
|
|
761
980
|
* App instance ID.
|
|
@@ -1158,85 +1377,44 @@ interface SetSubmissionResponse {
|
|
|
1158
1377
|
/** Order with submission id */
|
|
1159
1378
|
order?: Order;
|
|
1160
1379
|
}
|
|
1161
|
-
interface
|
|
1162
|
-
/**
|
|
1380
|
+
interface MemberGetOrderRequest {
|
|
1381
|
+
/**
|
|
1382
|
+
* Order ID.
|
|
1383
|
+
* @format GUID
|
|
1384
|
+
*/
|
|
1385
|
+
_id: string;
|
|
1386
|
+
/**
|
|
1387
|
+
* Predefined set of fields to return.
|
|
1388
|
+
*
|
|
1389
|
+
* Default: If `fieldSet` is omitted, no order form submission data is returned.
|
|
1390
|
+
*/
|
|
1391
|
+
fieldSet?: SetWithLiterals;
|
|
1392
|
+
}
|
|
1393
|
+
interface MemberGetOrderResponse {
|
|
1394
|
+
/** Requested order. */
|
|
1163
1395
|
order?: Order;
|
|
1164
1396
|
}
|
|
1165
|
-
interface
|
|
1166
|
-
/** Order that reached its `startDate`. */
|
|
1167
|
-
order?: Order;
|
|
1168
|
-
}
|
|
1169
|
-
/**
|
|
1170
|
-
* Triggered at the start of a new payment cycle for an existing order.
|
|
1171
|
-
*
|
|
1172
|
-
* This webhook does not trigger at the initial start of an offline order.
|
|
1173
|
-
*/
|
|
1174
|
-
interface OrderCycleStarted {
|
|
1175
|
-
/** Order whose new cycle started. */
|
|
1176
|
-
order?: Order;
|
|
1177
|
-
/** 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. */
|
|
1178
|
-
cycleNumber?: number;
|
|
1179
|
-
}
|
|
1180
|
-
/** Emitted when a recurring order is canceled for the next payment cycle */
|
|
1181
|
-
interface OrderAutoRenewCanceled {
|
|
1182
|
-
/** Order that is canceled, effective at the end of the current payment cycle. */
|
|
1183
|
-
order?: Order;
|
|
1184
|
-
}
|
|
1185
|
-
interface OrderEnded {
|
|
1186
|
-
/** Order that ended. */
|
|
1187
|
-
order?: Order;
|
|
1188
|
-
}
|
|
1189
|
-
interface GetOrderRequest {
|
|
1190
|
-
/**
|
|
1191
|
-
* Order ID.
|
|
1192
|
-
* @format GUID
|
|
1193
|
-
*/
|
|
1194
|
-
_id: string;
|
|
1195
|
-
/**
|
|
1196
|
-
* Predefined set of fields to return.
|
|
1197
|
-
*
|
|
1198
|
-
* Default: If `fieldSet` is omitted, no order form submission data is returned.
|
|
1199
|
-
*/
|
|
1200
|
-
fieldSet?: SetWithLiterals;
|
|
1201
|
-
}
|
|
1202
|
-
interface GetOrderResponse {
|
|
1203
|
-
/** Order. */
|
|
1204
|
-
order?: Order;
|
|
1205
|
-
}
|
|
1206
|
-
interface ListOrdersRequest {
|
|
1207
|
-
/**
|
|
1208
|
-
* Filter by a buyer's member ID, from the Members API.
|
|
1209
|
-
* @format GUID
|
|
1210
|
-
*/
|
|
1211
|
-
buyerIds?: string[];
|
|
1397
|
+
interface MemberListOrdersRequest {
|
|
1212
1398
|
/**
|
|
1213
|
-
* Filter by plan IDs
|
|
1399
|
+
* Filter by plan IDs.
|
|
1214
1400
|
* @format GUID
|
|
1215
1401
|
*/
|
|
1216
1402
|
planIds?: string[];
|
|
1217
|
-
/** Filter
|
|
1403
|
+
/** Filter for orders where auto renewal was canceled. */
|
|
1218
1404
|
autoRenewCanceled?: boolean | null;
|
|
1219
1405
|
/** Filter by order status. */
|
|
1220
1406
|
orderStatuses?: OrderStatusWithLiterals[];
|
|
1221
1407
|
/** Filter by payment status. */
|
|
1222
1408
|
paymentStatuses?: PaymentStatusWithLiterals[];
|
|
1223
1409
|
/**
|
|
1224
|
-
*
|
|
1225
|
-
*
|
|
1226
|
-
* Max: `50`
|
|
1410
|
+
* Limit the number of pricing plans returned. Default limit is 50.
|
|
1227
1411
|
* @min 1
|
|
1228
1412
|
* @max 50
|
|
1229
1413
|
*/
|
|
1230
1414
|
limit?: number | null;
|
|
1231
|
-
/** Number of
|
|
1415
|
+
/** Number of entries to offset. */
|
|
1232
1416
|
offset?: number | null;
|
|
1233
|
-
/**
|
|
1234
|
-
* Sort order.
|
|
1235
|
-
*
|
|
1236
|
-
* Use `ASC` for ascending order or `DESC` for descending order.
|
|
1237
|
-
*
|
|
1238
|
-
* Default: `DESC`.
|
|
1239
|
-
*/
|
|
1417
|
+
/** Sorting direction (defaults to ASC) and field to sort by. */
|
|
1240
1418
|
sorting?: Sorting;
|
|
1241
1419
|
/**
|
|
1242
1420
|
* Predefined set of fields to return.
|
|
@@ -1245,189 +1423,22 @@ interface ListOrdersRequest {
|
|
|
1245
1423
|
*/
|
|
1246
1424
|
fieldSet?: SetWithLiterals;
|
|
1247
1425
|
}
|
|
1248
|
-
interface
|
|
1249
|
-
/**
|
|
1426
|
+
interface MemberListOrdersResponse {
|
|
1427
|
+
/** Requested orders. */
|
|
1250
1428
|
orders?: Order[];
|
|
1251
1429
|
/** Object containing paging-related data (number of orders returned, offset). */
|
|
1252
1430
|
pagingMetadata?: PagingMetadataV2;
|
|
1253
1431
|
}
|
|
1254
|
-
interface
|
|
1255
|
-
}
|
|
1256
|
-
interface GetOrdersStatsResponse {
|
|
1257
|
-
/** Total number of orders. */
|
|
1258
|
-
totalOrderCount?: number;
|
|
1259
|
-
/** Number of active orders. */
|
|
1260
|
-
activeOrderCount?: number;
|
|
1261
|
-
}
|
|
1262
|
-
interface GetAvailableOrderActionsRequest {
|
|
1263
|
-
/**
|
|
1264
|
-
* Order ID.
|
|
1265
|
-
* @format GUID
|
|
1266
|
-
*/
|
|
1267
|
-
_id?: string;
|
|
1268
|
-
}
|
|
1269
|
-
interface GetAvailableOrderActionsResponse {
|
|
1270
|
-
/** Whether the order can be suspended. */
|
|
1271
|
-
suspendable?: boolean;
|
|
1272
|
-
/** If the order cannot be suspended, a reason is returned here. */
|
|
1273
|
-
notSuspendableReason?: ReasonNotSuspendableWithLiterals;
|
|
1274
|
-
/** Whether the order can be canceled by the buyer. */
|
|
1275
|
-
cancelableByBuyer?: boolean;
|
|
1276
|
-
}
|
|
1277
|
-
declare enum ReasonNotSuspendable {
|
|
1278
|
-
/** Undefined reason. */
|
|
1279
|
-
UNDEFINED = "UNDEFINED",
|
|
1280
|
-
/** Saved in the database but is awaiting payment. Non-active orders can't be suspended. */
|
|
1281
|
-
PENDING = "PENDING",
|
|
1282
|
-
/** Trial orders can't be suspended. */
|
|
1283
|
-
TRIAL = "TRIAL",
|
|
1284
|
-
/** Canceled orders can't be suspended. */
|
|
1285
|
-
CANCELED = "CANCELED",
|
|
1286
|
-
/** Ended orders can't be suspended. */
|
|
1287
|
-
ENDED = "ENDED",
|
|
1288
|
-
/** Paid for orders with future start dates can't be suspended. */
|
|
1289
|
-
NOT_STARTED = "NOT_STARTED",
|
|
1290
|
-
/** Order is already suspended. */
|
|
1291
|
-
ALREADY_SUSPENDED = "ALREADY_SUSPENDED",
|
|
1292
|
-
/** Orders based on recurring payments using older stripe versions can't be suspended. */
|
|
1293
|
-
OLD_STRIPE = "OLD_STRIPE"
|
|
1294
|
-
}
|
|
1295
|
-
/** @enumType */
|
|
1296
|
-
type ReasonNotSuspendableWithLiterals = ReasonNotSuspendable | 'UNDEFINED' | 'PENDING' | 'TRIAL' | 'CANCELED' | 'ENDED' | 'NOT_STARTED' | 'ALREADY_SUSPENDED' | 'OLD_STRIPE';
|
|
1297
|
-
interface PostponeEndDateRequest {
|
|
1298
|
-
/**
|
|
1299
|
-
* Order ID.
|
|
1300
|
-
* @format GUID
|
|
1301
|
-
*/
|
|
1302
|
-
_id: string;
|
|
1303
|
-
/**
|
|
1304
|
-
* New end date and time.
|
|
1305
|
-
*
|
|
1306
|
-
* Must be later than the current end date and time.
|
|
1307
|
-
*/
|
|
1308
|
-
endDate: Date | null;
|
|
1309
|
-
}
|
|
1310
|
-
interface PostponeEndDateResponse {
|
|
1311
|
-
}
|
|
1312
|
-
interface OrderEndDatePostponed {
|
|
1313
|
-
/** Order whose `endDate` was postponed. */
|
|
1314
|
-
order?: Order;
|
|
1315
|
-
}
|
|
1316
|
-
interface CancelOrderRequest {
|
|
1432
|
+
interface RequestCancellationRequest {
|
|
1317
1433
|
/**
|
|
1318
1434
|
* Order ID.
|
|
1319
1435
|
* @format GUID
|
|
1320
1436
|
*/
|
|
1321
1437
|
_id: string;
|
|
1322
|
-
/**
|
|
1438
|
+
/** Required. Whether to cancel the order effective immediately or at the next payment date. One-time orders can only be canceled immediately. */
|
|
1323
1439
|
effectiveAt: CancellationEffectiveAtWithLiterals;
|
|
1324
1440
|
}
|
|
1325
|
-
interface
|
|
1326
|
-
}
|
|
1327
|
-
interface MarkAsPaidRequest {
|
|
1328
|
-
/**
|
|
1329
|
-
* Order ID.
|
|
1330
|
-
* @format GUID
|
|
1331
|
-
*/
|
|
1332
|
-
_id: string;
|
|
1333
|
-
}
|
|
1334
|
-
interface MarkAsPaidResponse {
|
|
1335
|
-
}
|
|
1336
|
-
interface OrderMarkedAsPaid {
|
|
1337
|
-
/** Order that was marked as paid. */
|
|
1338
|
-
order?: Order;
|
|
1339
|
-
}
|
|
1340
|
-
interface PauseOrderRequest {
|
|
1341
|
-
/**
|
|
1342
|
-
* Order ID.
|
|
1343
|
-
* @format GUID
|
|
1344
|
-
*/
|
|
1345
|
-
_id: string;
|
|
1346
|
-
}
|
|
1347
|
-
interface PauseOrderResponse {
|
|
1348
|
-
}
|
|
1349
|
-
interface OrderPaused {
|
|
1350
|
-
/** Paused order. */
|
|
1351
|
-
order?: Order;
|
|
1352
|
-
}
|
|
1353
|
-
interface BulkPauseOrderRequest {
|
|
1354
|
-
/**
|
|
1355
|
-
* List of Order IDs.
|
|
1356
|
-
* @format GUID
|
|
1357
|
-
* @minSize 1
|
|
1358
|
-
* @maxSize 100
|
|
1359
|
-
*/
|
|
1360
|
-
ids?: string[];
|
|
1361
|
-
/** Set to true to return Order entity in response. */
|
|
1362
|
-
returnFullEntity?: boolean;
|
|
1363
|
-
}
|
|
1364
|
-
interface BulkPauseOrderResponse {
|
|
1365
|
-
/** Orders that were paused. */
|
|
1366
|
-
results?: BulkOrderResult[];
|
|
1367
|
-
/** Bulk action metadata. */
|
|
1368
|
-
bulkActionMetadata?: BulkActionMetadata;
|
|
1369
|
-
}
|
|
1370
|
-
interface BulkOrderResult {
|
|
1371
|
-
/** Item metadata */
|
|
1372
|
-
itemMetadata?: ItemMetadata;
|
|
1373
|
-
/** The order. */
|
|
1374
|
-
order?: Order;
|
|
1375
|
-
}
|
|
1376
|
-
interface ItemMetadata {
|
|
1377
|
-
/** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
|
|
1378
|
-
_id?: string | null;
|
|
1379
|
-
/** Index of the item within the request array. Allows for correlation between request and response items. */
|
|
1380
|
-
originalIndex?: number;
|
|
1381
|
-
/** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
|
|
1382
|
-
success?: boolean;
|
|
1383
|
-
/** Details about the error in case of failure. */
|
|
1384
|
-
error?: ApplicationError;
|
|
1385
|
-
}
|
|
1386
|
-
interface ApplicationError {
|
|
1387
|
-
/** Error code. */
|
|
1388
|
-
code?: string;
|
|
1389
|
-
/** Description of the error. */
|
|
1390
|
-
description?: string;
|
|
1391
|
-
/** Data related to the error. */
|
|
1392
|
-
data?: Record<string, any> | null;
|
|
1393
|
-
}
|
|
1394
|
-
interface BulkActionMetadata {
|
|
1395
|
-
/** Number of items that were successfully processed. */
|
|
1396
|
-
totalSuccesses?: number;
|
|
1397
|
-
/** Number of items that couldn't be processed. */
|
|
1398
|
-
totalFailures?: number;
|
|
1399
|
-
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
1400
|
-
undetailedFailures?: number;
|
|
1401
|
-
}
|
|
1402
|
-
interface ResumeOrderRequest {
|
|
1403
|
-
/**
|
|
1404
|
-
* Order ID.
|
|
1405
|
-
* @format GUID
|
|
1406
|
-
*/
|
|
1407
|
-
_id: string;
|
|
1408
|
-
}
|
|
1409
|
-
interface ResumeOrderResponse {
|
|
1410
|
-
}
|
|
1411
|
-
interface OrderResumed {
|
|
1412
|
-
/** Resumed order. */
|
|
1413
|
-
order?: Order;
|
|
1414
|
-
}
|
|
1415
|
-
interface BulkResumeOrderRequest {
|
|
1416
|
-
/**
|
|
1417
|
-
* List of Order IDs.
|
|
1418
|
-
* @format GUID
|
|
1419
|
-
* @minSize 1
|
|
1420
|
-
* @maxSize 100
|
|
1421
|
-
*/
|
|
1422
|
-
ids?: string[];
|
|
1423
|
-
/** Set to true to return Order entity in response. */
|
|
1424
|
-
returnFullEntity?: boolean;
|
|
1425
|
-
}
|
|
1426
|
-
interface BulkResumeOrderResponse {
|
|
1427
|
-
/** Orders that were resumed. */
|
|
1428
|
-
results?: BulkOrderResult[];
|
|
1429
|
-
/** Bulk action metadata. */
|
|
1430
|
-
bulkActionMetadata?: BulkActionMetadata;
|
|
1441
|
+
interface RequestCancellationResponse {
|
|
1431
1442
|
}
|
|
1432
1443
|
/** @docsIgnore */
|
|
1433
1444
|
type CreateOnlineOrderApplicationErrors = {
|
|
@@ -1780,16 +1791,16 @@ interface AccountInfoMetadata {
|
|
|
1780
1791
|
/** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */
|
|
1781
1792
|
parentAccountId?: string;
|
|
1782
1793
|
}
|
|
1783
|
-
interface
|
|
1784
|
-
data:
|
|
1794
|
+
interface OrderAutoRenewCanceledEnvelope {
|
|
1795
|
+
data: OrderAutoRenewCanceled;
|
|
1785
1796
|
metadata: EventMetadata;
|
|
1786
1797
|
}
|
|
1787
1798
|
/**
|
|
1788
|
-
* Triggered when an order is canceled
|
|
1799
|
+
* Triggered when an order is canceled and `effectiveAt` is set to `NEXT_PAYMENT_DATE`.
|
|
1789
1800
|
*
|
|
1790
|
-
* This webhook is triggered
|
|
1791
|
-
* +
|
|
1792
|
-
* +
|
|
1801
|
+
* This webhook is *not* triggered in the following scenarios:
|
|
1802
|
+
* + When an order is canceled and `effectiveAt` is set to `IMMEDIATELY`. Instead, at the time of cancellation, Order Canceled is triggered.
|
|
1803
|
+
* + 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.
|
|
1793
1804
|
* @permissionScope Manage_Wix_Rentals_App_Forms_submissions
|
|
1794
1805
|
* @permissionScopeId SCOPE.RENTALS.MANAGE
|
|
1795
1806
|
* @permissionScope Manage Orders
|
|
@@ -1802,98 +1813,21 @@ interface OrderCanceledEnvelope {
|
|
|
1802
1813
|
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
1803
1814
|
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
1804
1815
|
* @webhook
|
|
1805
|
-
* @eventType wix.pricing_plans.v2.
|
|
1806
|
-
* @serviceIdentifier com.wixpress.membership.v2.orders.
|
|
1807
|
-
* @slug
|
|
1808
|
-
*/
|
|
1809
|
-
declare function onOrderCanceled(handler: (event: OrderCanceledEnvelope) => void | Promise<void>): void;
|
|
1810
|
-
interface OrderCreatedEnvelope {
|
|
1811
|
-
entity: Order;
|
|
1812
|
-
metadata: EventMetadata;
|
|
1813
|
-
}
|
|
1814
|
-
/**
|
|
1815
|
-
* Triggered when an order is created.
|
|
1816
|
-
* @permissionScope Manage_Wix_Rentals_App_Forms_submissions
|
|
1817
|
-
* @permissionScopeId SCOPE.RENTALS.MANAGE
|
|
1818
|
-
* @permissionScope Manage Orders
|
|
1819
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
1820
|
-
* @permissionScope Read Orders
|
|
1821
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS
|
|
1822
|
-
* @permissionScope Manage plans and orders of Pricing Plans
|
|
1823
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS-AND-ORDERS
|
|
1824
|
-
* @permissionScope Manage Events
|
|
1825
|
-
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
1826
|
-
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
1827
|
-
* @webhook
|
|
1828
|
-
* @eventType wix.pricing_plans.v2.order_created
|
|
1829
|
-
* @serviceIdentifier com.wixpress.membership.v2.orders.CheckoutService
|
|
1830
|
-
* @slug created
|
|
1831
|
-
*/
|
|
1832
|
-
declare function onOrderCreated(handler: (event: OrderCreatedEnvelope) => void | Promise<void>): void;
|
|
1833
|
-
interface OrderStartDateChangedEnvelope {
|
|
1834
|
-
data: OrderStartDateChanged;
|
|
1835
|
-
metadata: EventMetadata;
|
|
1836
|
-
}
|
|
1837
|
-
/**
|
|
1838
|
-
* Triggered when an order's `startDate` is changed.
|
|
1839
|
-
* @permissionScope Manage_Wix_Rentals_App_Forms_submissions
|
|
1840
|
-
* @permissionScopeId SCOPE.RENTALS.MANAGE
|
|
1841
|
-
* @permissionScope Manage Orders
|
|
1842
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
1843
|
-
* @permissionScope Read Orders
|
|
1844
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS
|
|
1845
|
-
* @permissionScope Manage plans and orders of Pricing Plans
|
|
1846
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS-AND-ORDERS
|
|
1847
|
-
* @permissionScope Manage Events
|
|
1848
|
-
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
1849
|
-
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
1850
|
-
* @webhook
|
|
1851
|
-
* @eventType wix.pricing_plans.v2.order_start_date_changed
|
|
1852
|
-
* @serviceIdentifier com.wixpress.membership.v2.orders.CheckoutService
|
|
1853
|
-
* @slug start_date_changed
|
|
1854
|
-
*/
|
|
1855
|
-
declare function onOrderStartDateChanged(handler: (event: OrderStartDateChangedEnvelope) => void | Promise<void>): void;
|
|
1856
|
-
interface OrderUpdatedEnvelope {
|
|
1857
|
-
entity: Order;
|
|
1858
|
-
metadata: EventMetadata;
|
|
1859
|
-
}
|
|
1860
|
-
/**
|
|
1861
|
-
* Triggered for any of the following update events:
|
|
1862
|
-
*
|
|
1863
|
-
* + Order is paid for. Order Purchased is also triggered.
|
|
1864
|
-
* + Order reaches its start date or end date. Order Started and Order Ended, respectively, are also triggered.
|
|
1865
|
-
* + New payment cycle of an order starts. Order Cycle Started is also triggered.
|
|
1866
|
-
* + Offline order is marked as paid. Order Marked As Paid is also triggered.
|
|
1867
|
-
* + End date of the order is postponed. Order End Date Postponed is also triggered
|
|
1868
|
-
* + Order is paused, or a paused order is resumed. Order Paused and Order Resumed, respectively, are also triggered.
|
|
1869
|
-
* + Order is canceled, either immediately or at the end of the payment cycle. Order Canceled and Order Auto Renew Canceled, respectively, are also triggered.
|
|
1870
|
-
* @permissionScope Manage_Wix_Rentals_App_Forms_submissions
|
|
1871
|
-
* @permissionScopeId SCOPE.RENTALS.MANAGE
|
|
1872
|
-
* @permissionScope Manage Orders
|
|
1873
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
1874
|
-
* @permissionScope Read Orders
|
|
1875
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS
|
|
1876
|
-
* @permissionScope Manage plans and orders of Pricing Plans
|
|
1877
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS-AND-ORDERS
|
|
1878
|
-
* @permissionScope Manage Events
|
|
1879
|
-
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
1880
|
-
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
1881
|
-
* @webhook
|
|
1882
|
-
* @eventType wix.pricing_plans.v2.order_updated
|
|
1883
|
-
* @serviceIdentifier com.wixpress.membership.v2.orders.CheckoutService
|
|
1884
|
-
* @slug updated
|
|
1816
|
+
* @eventType wix.pricing_plans.v2.order_auto_renew_canceled
|
|
1817
|
+
* @serviceIdentifier com.wixpress.membership.v2.orders.OrderManagementService
|
|
1818
|
+
* @slug auto_renew_canceled
|
|
1885
1819
|
*/
|
|
1886
|
-
declare function
|
|
1887
|
-
interface
|
|
1888
|
-
data:
|
|
1820
|
+
declare function onOrderAutoRenewCanceled(handler: (event: OrderAutoRenewCanceledEnvelope) => void | Promise<void>): void;
|
|
1821
|
+
interface OrderCanceledEnvelope {
|
|
1822
|
+
data: OrderCanceled;
|
|
1889
1823
|
metadata: EventMetadata;
|
|
1890
1824
|
}
|
|
1891
1825
|
/**
|
|
1892
|
-
* Triggered when an order is canceled
|
|
1826
|
+
* Triggered when an order is canceled.
|
|
1893
1827
|
*
|
|
1894
|
-
* This webhook is
|
|
1895
|
-
* +
|
|
1896
|
-
* +
|
|
1828
|
+
* This webhook is triggered either immediately or at the end of the current payment cycle, as follows:
|
|
1829
|
+
* + If the order is canceled and `effectiveAt` is set to `IMMEDIATELY`, the webhook is triggered immediately when canceled.
|
|
1830
|
+
* + 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.
|
|
1897
1831
|
* @permissionScope Manage_Wix_Rentals_App_Forms_submissions
|
|
1898
1832
|
* @permissionScopeId SCOPE.RENTALS.MANAGE
|
|
1899
1833
|
* @permissionScope Manage Orders
|
|
@@ -1906,11 +1840,11 @@ interface OrderAutoRenewCanceledEnvelope {
|
|
|
1906
1840
|
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
1907
1841
|
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
1908
1842
|
* @webhook
|
|
1909
|
-
* @eventType wix.pricing_plans.v2.
|
|
1843
|
+
* @eventType wix.pricing_plans.v2.order_canceled
|
|
1910
1844
|
* @serviceIdentifier com.wixpress.membership.v2.orders.OrderManagementService
|
|
1911
|
-
* @slug
|
|
1845
|
+
* @slug canceled
|
|
1912
1846
|
*/
|
|
1913
|
-
declare function
|
|
1847
|
+
declare function onOrderCanceled(handler: (event: OrderCanceledEnvelope) => void | Promise<void>): void;
|
|
1914
1848
|
interface OrderCycleStartedEnvelope {
|
|
1915
1849
|
data: OrderCycleStarted;
|
|
1916
1850
|
metadata: EventMetadata;
|
|
@@ -2105,19 +2039,95 @@ interface OrderStartedEnvelope {
|
|
|
2105
2039
|
* @slug started
|
|
2106
2040
|
*/
|
|
2107
2041
|
declare function onOrderStarted(handler: (event: OrderStartedEnvelope) => void | Promise<void>): void;
|
|
2042
|
+
interface OrderUpdatedEnvelope {
|
|
2043
|
+
entity: Order;
|
|
2044
|
+
metadata: EventMetadata;
|
|
2045
|
+
}
|
|
2108
2046
|
/**
|
|
2109
|
-
*
|
|
2047
|
+
* Triggered for any of the following update events:
|
|
2048
|
+
*
|
|
2049
|
+
* + Order is paid for. Order Purchased is also triggered.
|
|
2050
|
+
* + Order reaches its start date or end date. Order Started and Order Ended, respectively, are also triggered.
|
|
2051
|
+
* + New payment cycle of an order starts. Order Cycle Started is also triggered.
|
|
2052
|
+
* + Offline order is marked as paid. Order Marked As Paid is also triggered.
|
|
2053
|
+
* + End date of the order is postponed. Order End Date Postponed is also triggered
|
|
2054
|
+
* + Order is paused, or a paused order is resumed. Order Paused and Order Resumed, respectively, are also triggered.
|
|
2055
|
+
* + Order is canceled, either immediately or at the end of the payment cycle. Order Canceled and Order Auto Renew Canceled, respectively, are also triggered.
|
|
2056
|
+
* @permissionScope Manage_Wix_Rentals_App_Forms_submissions
|
|
2057
|
+
* @permissionScopeId SCOPE.RENTALS.MANAGE
|
|
2058
|
+
* @permissionScope Manage Orders
|
|
2059
|
+
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
2060
|
+
* @permissionScope Read Orders
|
|
2061
|
+
* @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS
|
|
2062
|
+
* @permissionScope Manage plans and orders of Pricing Plans
|
|
2063
|
+
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS-AND-ORDERS
|
|
2064
|
+
* @permissionScope Manage Events
|
|
2065
|
+
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
2066
|
+
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
2067
|
+
* @webhook
|
|
2068
|
+
* @eventType wix.pricing_plans.v2.order_updated
|
|
2069
|
+
* @serviceIdentifier com.wixpress.membership.v2.orders.OrderManagementService
|
|
2070
|
+
* @slug updated
|
|
2071
|
+
*/
|
|
2072
|
+
declare function onOrderUpdated(handler: (event: OrderUpdatedEnvelope) => void | Promise<void>): void;
|
|
2073
|
+
interface OrderCreatedEnvelope {
|
|
2074
|
+
entity: Order;
|
|
2075
|
+
metadata: EventMetadata;
|
|
2076
|
+
}
|
|
2077
|
+
/**
|
|
2078
|
+
* Triggered when an order is created.
|
|
2079
|
+
* @permissionScope Manage_Wix_Rentals_App_Forms_submissions
|
|
2080
|
+
* @permissionScopeId SCOPE.RENTALS.MANAGE
|
|
2081
|
+
* @permissionScope Manage Orders
|
|
2082
|
+
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
2083
|
+
* @permissionScope Read Orders
|
|
2084
|
+
* @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS
|
|
2085
|
+
* @permissionScope Manage plans and orders of Pricing Plans
|
|
2086
|
+
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS-AND-ORDERS
|
|
2087
|
+
* @permissionScope Manage Events
|
|
2088
|
+
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
2089
|
+
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
2090
|
+
* @webhook
|
|
2091
|
+
* @eventType wix.pricing_plans.v2.order_created
|
|
2092
|
+
* @serviceIdentifier com.wixpress.membership.v2.orders.CheckoutService
|
|
2093
|
+
* @slug created
|
|
2094
|
+
*/
|
|
2095
|
+
declare function onOrderCreated(handler: (event: OrderCreatedEnvelope) => void | Promise<void>): void;
|
|
2096
|
+
interface OrderStartDateChangedEnvelope {
|
|
2097
|
+
data: OrderStartDateChanged;
|
|
2098
|
+
metadata: EventMetadata;
|
|
2099
|
+
}
|
|
2100
|
+
/**
|
|
2101
|
+
* Triggered when an order's `startDate` is changed.
|
|
2102
|
+
* @permissionScope Manage_Wix_Rentals_App_Forms_submissions
|
|
2103
|
+
* @permissionScopeId SCOPE.RENTALS.MANAGE
|
|
2104
|
+
* @permissionScope Manage Orders
|
|
2105
|
+
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
2106
|
+
* @permissionScope Read Orders
|
|
2107
|
+
* @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS
|
|
2108
|
+
* @permissionScope Manage plans and orders of Pricing Plans
|
|
2109
|
+
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS-AND-ORDERS
|
|
2110
|
+
* @permissionScope Manage Events
|
|
2111
|
+
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
2112
|
+
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
2113
|
+
* @webhook
|
|
2114
|
+
* @eventType wix.pricing_plans.v2.order_start_date_changed
|
|
2115
|
+
* @serviceIdentifier com.wixpress.membership.v2.orders.CheckoutService
|
|
2116
|
+
* @slug start_date_changed
|
|
2117
|
+
*/
|
|
2118
|
+
declare function onOrderStartDateChanged(handler: (event: OrderStartDateChangedEnvelope) => void | Promise<void>): void;
|
|
2119
|
+
/**
|
|
2120
|
+
* Retrieves an order by ID.
|
|
2110
2121
|
* @param _id - Order ID.
|
|
2111
2122
|
* @public
|
|
2112
2123
|
* @requiredField _id
|
|
2113
|
-
* @param options - Options
|
|
2114
|
-
* @permissionId PRICING_PLANS.
|
|
2124
|
+
* @param options - Options to use when getting an order.
|
|
2125
|
+
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
2115
2126
|
* @applicableIdentity APP
|
|
2116
|
-
* @
|
|
2117
|
-
* @fqn com.wixpress.membership.v2.orders.member.MemberOrdersService.GetOrder
|
|
2127
|
+
* @fqn com.wixpress.membership.v2.orders.OrderManagementService.GetOrder
|
|
2118
2128
|
*/
|
|
2119
|
-
declare function
|
|
2120
|
-
interface
|
|
2129
|
+
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>>;
|
|
2130
|
+
interface ManagementGetOrderOptions {
|
|
2121
2131
|
/**
|
|
2122
2132
|
* Predefined set of fields to return.
|
|
2123
2133
|
*
|
|
@@ -2126,36 +2136,51 @@ interface MemberGetOrderOptions {
|
|
|
2126
2136
|
fieldSet?: SetWithLiterals;
|
|
2127
2137
|
}
|
|
2128
2138
|
/**
|
|
2129
|
-
* Retrieves a list of up to
|
|
2139
|
+
* Retrieves a list of up to 50 pricing plan orders and details, given the specified sorting and filtering.
|
|
2140
|
+
*
|
|
2141
|
+
* By default, this endpoint will retrieve all orders and return them sorted by `createdDate` in `DESC`, descending order.
|
|
2142
|
+
* `sort.fieldName` supports `endDate` and `createdDate` fields and defaults to `ASC`, ascending order.
|
|
2130
2143
|
* @public
|
|
2131
2144
|
* @param options - Filtering, sorting, and pagination options.
|
|
2132
|
-
* @permissionId PRICING_PLANS.
|
|
2145
|
+
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
2133
2146
|
* @applicableIdentity APP
|
|
2134
|
-
* @
|
|
2135
|
-
* @fqn com.wixpress.membership.v2.orders.member.MemberOrdersService.ListOrders
|
|
2147
|
+
* @fqn com.wixpress.membership.v2.orders.OrderManagementService.ListOrders
|
|
2136
2148
|
*/
|
|
2137
|
-
declare function
|
|
2138
|
-
interface
|
|
2149
|
+
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>>;
|
|
2150
|
+
interface ManagementListOrdersOptions {
|
|
2139
2151
|
/**
|
|
2140
|
-
* Filter by
|
|
2152
|
+
* Filter by a buyer's member ID, from the Members API.
|
|
2153
|
+
* @format GUID
|
|
2154
|
+
*/
|
|
2155
|
+
buyerIds?: string[];
|
|
2156
|
+
/**
|
|
2157
|
+
* Filter by plan IDs, from the Plans API.
|
|
2141
2158
|
* @format GUID
|
|
2142
2159
|
*/
|
|
2143
2160
|
planIds?: string[];
|
|
2144
|
-
/** Filter
|
|
2161
|
+
/** Filter by whether or not the auto-renewal of recurring orders was canceled. */
|
|
2145
2162
|
autoRenewCanceled?: boolean | null;
|
|
2146
2163
|
/** Filter by order status. */
|
|
2147
2164
|
orderStatuses?: OrderStatusWithLiterals[];
|
|
2148
2165
|
/** Filter by payment status. */
|
|
2149
2166
|
paymentStatuses?: PaymentStatusWithLiterals[];
|
|
2150
2167
|
/**
|
|
2151
|
-
*
|
|
2168
|
+
* Number of orders to return. See Sorting and Paging for more information.
|
|
2169
|
+
*
|
|
2170
|
+
* Max: `50`
|
|
2152
2171
|
* @min 1
|
|
2153
2172
|
* @max 50
|
|
2154
2173
|
*/
|
|
2155
2174
|
limit?: number | null;
|
|
2156
|
-
/** Number of
|
|
2175
|
+
/** Number of orders to skip in the current sort order. */
|
|
2157
2176
|
offset?: number | null;
|
|
2158
|
-
/**
|
|
2177
|
+
/**
|
|
2178
|
+
* Sort order.
|
|
2179
|
+
*
|
|
2180
|
+
* Use `ASC` for ascending order or `DESC` for descending order.
|
|
2181
|
+
*
|
|
2182
|
+
* Default: `DESC`.
|
|
2183
|
+
*/
|
|
2159
2184
|
sorting?: Sorting;
|
|
2160
2185
|
/**
|
|
2161
2186
|
* Predefined set of fields to return.
|
|
@@ -2165,26 +2190,106 @@ interface MemberListOrdersOptions {
|
|
|
2165
2190
|
fieldSet?: SetWithLiterals;
|
|
2166
2191
|
}
|
|
2167
2192
|
/**
|
|
2168
|
-
*
|
|
2193
|
+
* 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.
|
|
2169
2194
|
*
|
|
2170
|
-
*
|
|
2195
|
+
* New `endDate` must be later than the order's current `endDate`. Can't postpone orders that are unlimited.
|
|
2196
|
+
* Can't postpone an order with `status`: `PAUSED`.
|
|
2197
|
+
* @param _id - Order ID.
|
|
2198
|
+
* @param endDate - New end date and time.
|
|
2171
2199
|
*
|
|
2172
|
-
*
|
|
2200
|
+
* Must be later than the current end date and time.
|
|
2201
|
+
* @public
|
|
2202
|
+
* @requiredField _id
|
|
2203
|
+
* @requiredField endDate
|
|
2204
|
+
* @param options - Options for postponing the end date of an order.
|
|
2205
|
+
* @permissionId PRICING_PLANS.MANAGE_ORDERS
|
|
2206
|
+
* @applicableIdentity APP
|
|
2207
|
+
* @fqn com.wixpress.membership.v2.orders.OrderManagementService.PostponeEndDate
|
|
2208
|
+
*/
|
|
2209
|
+
declare function postponeEndDate(_id: string, endDate: Date): Promise<void>;
|
|
2210
|
+
/**
|
|
2211
|
+
* Cancels an existing order.
|
|
2173
2212
|
*
|
|
2174
|
-
*
|
|
2175
|
-
*
|
|
2213
|
+
* For orders with recurring payments, a cancellation can be set to occur either `IMMEDIATELY` or at the `NEXT_PAYMENT_DATE`.
|
|
2214
|
+
* For orders with one-time payments, a cancellation can only be set for `IMMEDIATELY`.
|
|
2215
|
+
*
|
|
2216
|
+
* #### Canceling during the free trial period.
|
|
2217
|
+
*
|
|
2218
|
+
* When a buyer cancels their order during the free trial period, the buyer's subscription expires at the end
|
|
2219
|
+
* of the free trial period and they will not be billed. The buyer may continue using the benefits until the end
|
|
2220
|
+
* of the free trial period.
|
|
2221
|
+
*
|
|
2222
|
+
* When a Wix user cancels an ordered plan during the free trial period, they choose whether to apply the cancellation
|
|
2223
|
+
* `IMMEDIATELY` or at the `NEXT_PAYMENT_DATE`. Canceling `IMMEDIATELY` will end the subscription for the buyer
|
|
2224
|
+
* immediately, even during the free trial period and the buyer won't be billed. Canceling at the
|
|
2225
|
+
* `NEXT_PAYMENT_DATE` allows the buyer to continue using the benefits of the subscription until the end of the free trial period.
|
|
2226
|
+
* Then, the subscription ends and the buyer is not billed.
|
|
2176
2227
|
* @param _id - Order ID.
|
|
2177
|
-
* @param effectiveAt -
|
|
2228
|
+
* @param effectiveAt - __Required.__ When the order will be canceled. One-time orders can only be canceled `IMMEDIATELY`.
|
|
2178
2229
|
* @public
|
|
2179
2230
|
* @requiredField _id
|
|
2180
2231
|
* @requiredField effectiveAt
|
|
2181
|
-
* @param options - Options for
|
|
2182
|
-
* @permissionId PRICING_PLANS.
|
|
2232
|
+
* @param options - Options for canceling orders.
|
|
2233
|
+
* @permissionId PRICING_PLANS.MANAGE_ORDERS
|
|
2183
2234
|
* @applicableIdentity APP
|
|
2184
|
-
* @
|
|
2185
|
-
* @fqn com.wixpress.membership.v2.orders.member.MemberOrdersService.RequestCancellation
|
|
2235
|
+
* @fqn com.wixpress.membership.v2.orders.OrderManagementService.CancelOrder
|
|
2186
2236
|
*/
|
|
2187
|
-
declare function
|
|
2237
|
+
declare function cancelOrder(_id: string, effectiveAt: CancellationEffectiveAtWithLiterals): Promise<void>;
|
|
2238
|
+
/**
|
|
2239
|
+
* Marks an offline order as paid.
|
|
2240
|
+
* > __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.
|
|
2241
|
+
*
|
|
2242
|
+
* Marking an offline order as paid causes the following changes:
|
|
2243
|
+
* - The order's `lastPaymentStatus` changes to `"PAID"`.
|
|
2244
|
+
* - The order's status changes to either `"PENDING"` or `"ACTIVE"`, depending on the order's `startDate`.
|
|
2245
|
+
*
|
|
2246
|
+
* An error occurs if you attempt to:
|
|
2247
|
+
* - Mark an already-paid, offline order as paid. You cannot mark an offline order as paid twice.
|
|
2248
|
+
* - Mark an online order as paid. The Mark as Paid method is supported for offline orders only.
|
|
2249
|
+
* @param _id - Order ID.
|
|
2250
|
+
* @public
|
|
2251
|
+
* @requiredField _id
|
|
2252
|
+
* @permissionId PRICING_PLANS.MANAGE_ORDERS
|
|
2253
|
+
* @applicableIdentity APP
|
|
2254
|
+
* @fqn com.wixpress.membership.v2.orders.OrderManagementService.MarkAsPaid
|
|
2255
|
+
*/
|
|
2256
|
+
declare function markAsPaid(_id: string): Promise<void>;
|
|
2257
|
+
/**
|
|
2258
|
+
* Pauses an order. Calling this method changes the order status to `"PAUSED"` and updates the `pausePeriods` array.
|
|
2259
|
+
*
|
|
2260
|
+
* Only orders with `status`: `ACTIVE` can be paused.
|
|
2261
|
+
* For orders with recurring payments, it also pauses the payment schedule. Buyers are not charged when an order is paused.
|
|
2262
|
+
* Pausing an order affects the end date of the order by adding the time the order is paused to the `endDate`.
|
|
2263
|
+
* The `endDate` and the `earliestEndDate` for the order are adjusted to include the pause period when the order is resumed.
|
|
2264
|
+
*
|
|
2265
|
+
* To resume a paused order, call Resume Order.
|
|
2266
|
+
* @param _id - Order ID.
|
|
2267
|
+
* @public
|
|
2268
|
+
* @requiredField _id
|
|
2269
|
+
* @permissionId PRICING_PLANS.MANAGE_ORDERS
|
|
2270
|
+
* @applicableIdentity APP
|
|
2271
|
+
* @fqn com.wixpress.membership.v2.orders.OrderManagementService.PauseOrder
|
|
2272
|
+
*/
|
|
2273
|
+
declare function pauseOrder(_id: string): Promise<void>;
|
|
2274
|
+
/**
|
|
2275
|
+
* Resumes a paused order. For orders with recurring payments, it also restarts the payment schedule.
|
|
2276
|
+
*
|
|
2277
|
+
* Resuming an order causes the following changes:
|
|
2278
|
+
* - The order status changes to `"ACTIVE"`.
|
|
2279
|
+
* - The `pausePeriods` array is updated.
|
|
2280
|
+
* - The `endDate` for the order is adjusted to include the pause period.
|
|
2281
|
+
* - For orders with recurring payments, the payment schedule is restarted.
|
|
2282
|
+
* - The `earliestEndDate` is adjusted to include the pause period. (This property is reserved for future use).
|
|
2283
|
+
*
|
|
2284
|
+
* To pause an order, call Pause Order.
|
|
2285
|
+
* @param _id - Order ID.
|
|
2286
|
+
* @public
|
|
2287
|
+
* @requiredField _id
|
|
2288
|
+
* @permissionId PRICING_PLANS.MANAGE_ORDERS
|
|
2289
|
+
* @applicableIdentity APP
|
|
2290
|
+
* @fqn com.wixpress.membership.v2.orders.OrderManagementService.ResumeOrder
|
|
2291
|
+
*/
|
|
2292
|
+
declare function resumeOrder(_id: string): Promise<void>;
|
|
2188
2293
|
/**
|
|
2189
2294
|
* Creates an online order for a site member.
|
|
2190
2295
|
*
|
|
@@ -2380,18 +2485,19 @@ interface GetPricePreviewOptions {
|
|
|
2380
2485
|
couponCode?: string | null;
|
|
2381
2486
|
}
|
|
2382
2487
|
/**
|
|
2383
|
-
* Retrieves an order by ID.
|
|
2488
|
+
* Retrieves an order for the currently logged-in member by ID.
|
|
2384
2489
|
* @param _id - Order ID.
|
|
2385
2490
|
* @public
|
|
2386
2491
|
* @requiredField _id
|
|
2387
|
-
* @param options - Options
|
|
2388
|
-
* @permissionId PRICING_PLANS.
|
|
2492
|
+
* @param options - Options for getting a logged-in member's order.
|
|
2493
|
+
* @permissionId PRICING_PLANS.READ_OWN_ORDERS
|
|
2389
2494
|
* @applicableIdentity APP
|
|
2390
|
-
* @
|
|
2391
|
-
* @
|
|
2495
|
+
* @applicableIdentity MEMBER
|
|
2496
|
+
* @returns Requested order.
|
|
2497
|
+
* @fqn com.wixpress.membership.v2.orders.member.MemberOrdersService.GetOrder
|
|
2392
2498
|
*/
|
|
2393
|
-
declare function
|
|
2394
|
-
interface
|
|
2499
|
+
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>>;
|
|
2500
|
+
interface MemberGetOrderOptions {
|
|
2395
2501
|
/**
|
|
2396
2502
|
* Predefined set of fields to return.
|
|
2397
2503
|
*
|
|
@@ -2400,51 +2506,36 @@ interface ManagementGetOrderOptions {
|
|
|
2400
2506
|
fieldSet?: SetWithLiterals;
|
|
2401
2507
|
}
|
|
2402
2508
|
/**
|
|
2403
|
-
* Retrieves a list of up to
|
|
2404
|
-
*
|
|
2405
|
-
* By default, this endpoint will retrieve all orders and return them sorted by `createdDate` in `DESC`, descending order.
|
|
2406
|
-
* `sort.fieldName` supports `endDate` and `createdDate` fields and defaults to `ASC`, ascending order.
|
|
2509
|
+
* Retrieves a list of up to 100 pricing plan orders for currently logged-in member.
|
|
2407
2510
|
* @public
|
|
2408
2511
|
* @param options - Filtering, sorting, and pagination options.
|
|
2409
|
-
* @permissionId PRICING_PLANS.
|
|
2512
|
+
* @permissionId PRICING_PLANS.READ_OWN_ORDERS
|
|
2410
2513
|
* @applicableIdentity APP
|
|
2411
|
-
* @
|
|
2514
|
+
* @applicableIdentity MEMBER
|
|
2515
|
+
* @fqn com.wixpress.membership.v2.orders.member.MemberOrdersService.ListOrders
|
|
2412
2516
|
*/
|
|
2413
|
-
declare function
|
|
2414
|
-
interface
|
|
2415
|
-
/**
|
|
2416
|
-
* Filter by a buyer's member ID, from the Members API.
|
|
2417
|
-
* @format GUID
|
|
2418
|
-
*/
|
|
2419
|
-
buyerIds?: string[];
|
|
2517
|
+
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>>;
|
|
2518
|
+
interface MemberListOrdersOptions {
|
|
2420
2519
|
/**
|
|
2421
|
-
* Filter by plan IDs
|
|
2520
|
+
* Filter by plan IDs.
|
|
2422
2521
|
* @format GUID
|
|
2423
2522
|
*/
|
|
2424
2523
|
planIds?: string[];
|
|
2425
|
-
/** Filter
|
|
2524
|
+
/** Filter for orders where auto renewal was canceled. */
|
|
2426
2525
|
autoRenewCanceled?: boolean | null;
|
|
2427
2526
|
/** Filter by order status. */
|
|
2428
2527
|
orderStatuses?: OrderStatusWithLiterals[];
|
|
2429
2528
|
/** Filter by payment status. */
|
|
2430
2529
|
paymentStatuses?: PaymentStatusWithLiterals[];
|
|
2431
2530
|
/**
|
|
2432
|
-
*
|
|
2433
|
-
*
|
|
2434
|
-
* Max: `50`
|
|
2531
|
+
* Limit the number of pricing plans returned. Default limit is 50.
|
|
2435
2532
|
* @min 1
|
|
2436
2533
|
* @max 50
|
|
2437
2534
|
*/
|
|
2438
2535
|
limit?: number | null;
|
|
2439
|
-
/** Number of
|
|
2536
|
+
/** Number of entries to offset. */
|
|
2440
2537
|
offset?: number | null;
|
|
2441
|
-
/**
|
|
2442
|
-
* Sort order.
|
|
2443
|
-
*
|
|
2444
|
-
* Use `ASC` for ascending order or `DESC` for descending order.
|
|
2445
|
-
*
|
|
2446
|
-
* Default: `DESC`.
|
|
2447
|
-
*/
|
|
2538
|
+
/** Sorting direction (defaults to ASC) and field to sort by. */
|
|
2448
2539
|
sorting?: Sorting;
|
|
2449
2540
|
/**
|
|
2450
2541
|
* Predefined set of fields to return.
|
|
@@ -2454,105 +2545,25 @@ interface ManagementListOrdersOptions {
|
|
|
2454
2545
|
fieldSet?: SetWithLiterals;
|
|
2455
2546
|
}
|
|
2456
2547
|
/**
|
|
2457
|
-
*
|
|
2458
|
-
*
|
|
2459
|
-
* New `endDate` must be later than the order's current `endDate`. Can't postpone orders that are unlimited.
|
|
2460
|
-
* Can't postpone an order with `status`: `PAUSED`.
|
|
2461
|
-
* @param _id - Order ID.
|
|
2462
|
-
* @param endDate - New end date and time.
|
|
2463
|
-
*
|
|
2464
|
-
* Must be later than the current end date and time.
|
|
2465
|
-
* @public
|
|
2466
|
-
* @requiredField _id
|
|
2467
|
-
* @requiredField endDate
|
|
2468
|
-
* @param options - Options for postponing the end date of an order.
|
|
2469
|
-
* @permissionId PRICING_PLANS.MANAGE_ORDERS
|
|
2470
|
-
* @applicableIdentity APP
|
|
2471
|
-
* @fqn com.wixpress.membership.v2.orders.OrderManagementService.PostponeEndDate
|
|
2472
|
-
*/
|
|
2473
|
-
declare function postponeEndDate(_id: string, endDate: Date): Promise<void>;
|
|
2474
|
-
/**
|
|
2475
|
-
* Cancels an existing order.
|
|
2476
|
-
*
|
|
2477
|
-
* For orders with recurring payments, a cancellation can be set to occur either `IMMEDIATELY` or at the `NEXT_PAYMENT_DATE`.
|
|
2478
|
-
* For orders with one-time payments, a cancellation can only be set for `IMMEDIATELY`.
|
|
2548
|
+
* Cancels an order. Recurring orders can be canceled either immediately or at the next payment date. One time orders can only be canceled immediately.
|
|
2479
2549
|
*
|
|
2480
|
-
*
|
|
2550
|
+
* 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.
|
|
2481
2551
|
*
|
|
2482
|
-
* When a buyer cancels their order during the free trial period, the buyer's subscription expires at the end
|
|
2483
|
-
* of the free trial period and they will not be billed. The buyer may continue using the benefits until the end
|
|
2484
|
-
* of the free trial period.
|
|
2552
|
+
* 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.
|
|
2485
2553
|
*
|
|
2486
|
-
*
|
|
2487
|
-
*
|
|
2488
|
-
* immediately, even during the free trial period and the buyer won't be billed. Canceling at the
|
|
2489
|
-
* `NEXT_PAYMENT_DATE` allows the buyer to continue using the benefits of the subscription until the end of the free trial period.
|
|
2490
|
-
* Then, the subscription ends and the buyer is not billed.
|
|
2554
|
+
* >**Note:**
|
|
2555
|
+
* >This method requires [visitor or member authentication](https://dev.wix.com/docs/rest/articles/getting-started/access-types-and-permissions).
|
|
2491
2556
|
* @param _id - Order ID.
|
|
2492
|
-
* @param effectiveAt -
|
|
2557
|
+
* @param effectiveAt - Required. Whether to cancel the order effective immediately or at the next payment date. One-time orders can only be canceled immediately.
|
|
2493
2558
|
* @public
|
|
2494
2559
|
* @requiredField _id
|
|
2495
2560
|
* @requiredField effectiveAt
|
|
2496
|
-
* @param options - Options for
|
|
2497
|
-
* @permissionId PRICING_PLANS.
|
|
2498
|
-
* @applicableIdentity APP
|
|
2499
|
-
* @fqn com.wixpress.membership.v2.orders.OrderManagementService.CancelOrder
|
|
2500
|
-
*/
|
|
2501
|
-
declare function cancelOrder(_id: string, effectiveAt: CancellationEffectiveAtWithLiterals): Promise<void>;
|
|
2502
|
-
/**
|
|
2503
|
-
* Marks an offline order as paid.
|
|
2504
|
-
* > __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.
|
|
2505
|
-
*
|
|
2506
|
-
* Marking an offline order as paid causes the following changes:
|
|
2507
|
-
* - The order's `lastPaymentStatus` changes to `"PAID"`.
|
|
2508
|
-
* - The order's status changes to either `"PENDING"` or `"ACTIVE"`, depending on the order's `startDate`.
|
|
2509
|
-
*
|
|
2510
|
-
* An error occurs if you attempt to:
|
|
2511
|
-
* - Mark an already-paid, offline order as paid. You cannot mark an offline order as paid twice.
|
|
2512
|
-
* - Mark an online order as paid. The Mark as Paid method is supported for offline orders only.
|
|
2513
|
-
* @param _id - Order ID.
|
|
2514
|
-
* @public
|
|
2515
|
-
* @requiredField _id
|
|
2516
|
-
* @permissionId PRICING_PLANS.MANAGE_ORDERS
|
|
2517
|
-
* @applicableIdentity APP
|
|
2518
|
-
* @fqn com.wixpress.membership.v2.orders.OrderManagementService.MarkAsPaid
|
|
2519
|
-
*/
|
|
2520
|
-
declare function markAsPaid(_id: string): Promise<void>;
|
|
2521
|
-
/**
|
|
2522
|
-
* Pauses an order. Calling this method changes the order status to `"PAUSED"` and updates the `pausePeriods` array.
|
|
2523
|
-
*
|
|
2524
|
-
* Only orders with `status`: `ACTIVE` can be paused.
|
|
2525
|
-
* For orders with recurring payments, it also pauses the payment schedule. Buyers are not charged when an order is paused.
|
|
2526
|
-
* Pausing an order affects the end date of the order by adding the time the order is paused to the `endDate`.
|
|
2527
|
-
* The `endDate` and the `earliestEndDate` for the order are adjusted to include the pause period when the order is resumed.
|
|
2528
|
-
*
|
|
2529
|
-
* To resume a paused order, call Resume Order.
|
|
2530
|
-
* @param _id - Order ID.
|
|
2531
|
-
* @public
|
|
2532
|
-
* @requiredField _id
|
|
2533
|
-
* @permissionId PRICING_PLANS.MANAGE_ORDERS
|
|
2534
|
-
* @applicableIdentity APP
|
|
2535
|
-
* @fqn com.wixpress.membership.v2.orders.OrderManagementService.PauseOrder
|
|
2536
|
-
*/
|
|
2537
|
-
declare function pauseOrder(_id: string): Promise<void>;
|
|
2538
|
-
/**
|
|
2539
|
-
* Resumes a paused order. For orders with recurring payments, it also restarts the payment schedule.
|
|
2540
|
-
*
|
|
2541
|
-
* Resuming an order causes the following changes:
|
|
2542
|
-
* - The order status changes to `"ACTIVE"`.
|
|
2543
|
-
* - The `pausePeriods` array is updated.
|
|
2544
|
-
* - The `endDate` for the order is adjusted to include the pause period.
|
|
2545
|
-
* - For orders with recurring payments, the payment schedule is restarted.
|
|
2546
|
-
* - The `earliestEndDate` is adjusted to include the pause period. (This property is reserved for future use).
|
|
2547
|
-
*
|
|
2548
|
-
* To pause an order, call Pause Order.
|
|
2549
|
-
* @param _id - Order ID.
|
|
2550
|
-
* @public
|
|
2551
|
-
* @requiredField _id
|
|
2552
|
-
* @permissionId PRICING_PLANS.MANAGE_ORDERS
|
|
2561
|
+
* @param options - Options for requesting a cancellation.
|
|
2562
|
+
* @permissionId PRICING_PLANS.MANAGE_OWN_ORDERS
|
|
2553
2563
|
* @applicableIdentity APP
|
|
2554
|
-
* @
|
|
2564
|
+
* @applicableIdentity MEMBER
|
|
2565
|
+
* @fqn com.wixpress.membership.v2.orders.member.MemberOrdersService.RequestCancellation
|
|
2555
2566
|
*/
|
|
2556
|
-
declare function
|
|
2567
|
+
declare function requestCancellation(_id: string, effectiveAt: CancellationEffectiveAtWithLiterals): Promise<void>;
|
|
2557
2568
|
|
|
2558
|
-
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 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 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, 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 };
|
|
2569
|
+
export { type AccountInfo, type AccountInfoMetadata, type ActionEvent, type AddressLocation, 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 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 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, 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 };
|