@wix/auto_sdk_pricing-plans_orders 1.0.95 → 1.0.96
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 +153 -153
- package/build/cjs/index.js +711 -711
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +799 -799
- package/build/cjs/index.typings.js +577 -577
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +459 -459
- package/build/cjs/meta.js +403 -403
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +153 -153
- package/build/es/index.mjs +711 -711
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +799 -799
- package/build/es/index.typings.mjs +577 -577
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +459 -459
- package/build/es/meta.mjs +403 -403
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +153 -153
- package/build/internal/cjs/index.js +711 -711
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +799 -799
- package/build/internal/cjs/index.typings.js +577 -577
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +459 -459
- package/build/internal/cjs/meta.js +403 -403
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +153 -153
- package/build/internal/es/index.mjs +711 -711
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +799 -799
- package/build/internal/es/index.typings.mjs +577 -577
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +459 -459
- package/build/internal/es/meta.mjs +403 -403
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -626,35 +626,7 @@ interface ActionEvent {
|
|
|
626
626
|
}
|
|
627
627
|
interface Empty {
|
|
628
628
|
}
|
|
629
|
-
interface
|
|
630
|
-
/** Order that was paid for. If a free or an offline order, the order that was created. */
|
|
631
|
-
order?: Order;
|
|
632
|
-
}
|
|
633
|
-
interface OrderStarted {
|
|
634
|
-
/** Order that reached its `startDate`. */
|
|
635
|
-
order?: Order;
|
|
636
|
-
}
|
|
637
|
-
/**
|
|
638
|
-
* Triggered at the start of a new payment cycle for an existing order.
|
|
639
|
-
*
|
|
640
|
-
* This webhook does not trigger at the initial start of an offline order.
|
|
641
|
-
*/
|
|
642
|
-
interface OrderCycleStarted {
|
|
643
|
-
/** Order whose new cycle started. */
|
|
644
|
-
order?: Order;
|
|
645
|
-
/** Number of the payment cycle will be 0 when the order is in the free trial period. In other cases, the cycle number starts from 1. */
|
|
646
|
-
cycleNumber?: number;
|
|
647
|
-
}
|
|
648
|
-
/** Emitted when a recurring order is canceled for the next payment cycle */
|
|
649
|
-
interface OrderAutoRenewCanceled {
|
|
650
|
-
/** Order that is canceled, effective at the end of the current payment cycle. */
|
|
651
|
-
order?: Order;
|
|
652
|
-
}
|
|
653
|
-
interface OrderEnded {
|
|
654
|
-
/** Order that ended. */
|
|
655
|
-
order?: Order;
|
|
656
|
-
}
|
|
657
|
-
interface GetOrderRequest {
|
|
629
|
+
interface MemberGetOrderRequest {
|
|
658
630
|
/**
|
|
659
631
|
* Order ID.
|
|
660
632
|
* @format GUID
|
|
@@ -677,44 +649,31 @@ declare enum Set {
|
|
|
677
649
|
}
|
|
678
650
|
/** @enumType */
|
|
679
651
|
type SetWithLiterals = Set | 'UNKNOWN_SET' | 'BASIC' | 'FULL';
|
|
680
|
-
interface
|
|
681
|
-
/**
|
|
652
|
+
interface MemberGetOrderResponse {
|
|
653
|
+
/** Requested order. */
|
|
682
654
|
order?: Order;
|
|
683
655
|
}
|
|
684
|
-
interface
|
|
685
|
-
/**
|
|
686
|
-
* Filter by a buyer's member ID, from the Members API.
|
|
687
|
-
* @format GUID
|
|
688
|
-
*/
|
|
689
|
-
buyerIds?: string[];
|
|
656
|
+
interface MemberListOrdersRequest {
|
|
690
657
|
/**
|
|
691
|
-
* Filter by plan IDs
|
|
658
|
+
* Filter by plan IDs.
|
|
692
659
|
* @format GUID
|
|
693
660
|
*/
|
|
694
661
|
planIds?: string[];
|
|
695
|
-
/** Filter
|
|
662
|
+
/** Filter for orders where auto renewal was canceled. */
|
|
696
663
|
autoRenewCanceled?: boolean | null;
|
|
697
664
|
/** Filter by order status. */
|
|
698
665
|
orderStatuses?: OrderStatusWithLiterals[];
|
|
699
666
|
/** Filter by payment status. */
|
|
700
667
|
paymentStatuses?: PaymentStatusWithLiterals[];
|
|
701
668
|
/**
|
|
702
|
-
*
|
|
703
|
-
*
|
|
704
|
-
* Max: `50`
|
|
669
|
+
* Limit the number of pricing plans returned. Default limit is 50.
|
|
705
670
|
* @min 1
|
|
706
671
|
* @max 50
|
|
707
672
|
*/
|
|
708
673
|
limit?: number | null;
|
|
709
|
-
/** Number of
|
|
674
|
+
/** Number of entries to offset. */
|
|
710
675
|
offset?: number | null;
|
|
711
|
-
/**
|
|
712
|
-
* Sort order.
|
|
713
|
-
*
|
|
714
|
-
* Use `ASC` for ascending order or `DESC` for descending order.
|
|
715
|
-
*
|
|
716
|
-
* Default: `DESC`.
|
|
717
|
-
*/
|
|
676
|
+
/** Sorting direction (defaults to ASC) and field to sort by. */
|
|
718
677
|
sorting?: Sorting;
|
|
719
678
|
/**
|
|
720
679
|
* Predefined set of fields to return.
|
|
@@ -738,8 +697,8 @@ declare enum SortOrder {
|
|
|
738
697
|
}
|
|
739
698
|
/** @enumType */
|
|
740
699
|
type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
|
|
741
|
-
interface
|
|
742
|
-
/**
|
|
700
|
+
interface MemberListOrdersResponse {
|
|
701
|
+
/** Requested orders. */
|
|
743
702
|
orders?: Order[];
|
|
744
703
|
/** Object containing paging-related data (number of orders returned, offset). */
|
|
745
704
|
pagingMetadata?: PagingMetadataV2;
|
|
@@ -768,7 +727,11 @@ interface Cursors {
|
|
|
768
727
|
*/
|
|
769
728
|
prev?: string | null;
|
|
770
729
|
}
|
|
771
|
-
|
|
730
|
+
/**
|
|
731
|
+
* TODO: Write orders filter and sort docs page
|
|
732
|
+
* Retrieves a list of up to 1,000 orders, based on the provided paging, sorting, and filtering.
|
|
733
|
+
*/
|
|
734
|
+
interface QueryOrdersRequest {
|
|
772
735
|
/** Query filter. */
|
|
773
736
|
query?: QueryV2;
|
|
774
737
|
}
|
|
@@ -822,84 +785,22 @@ interface CursorPaging {
|
|
|
822
785
|
*/
|
|
823
786
|
cursor?: string | null;
|
|
824
787
|
}
|
|
825
|
-
interface
|
|
826
|
-
/**
|
|
788
|
+
interface QueryOrdersResponse {
|
|
789
|
+
/** Order data. */
|
|
827
790
|
plans?: Order[];
|
|
828
791
|
/** Paging-related data (number of orders returned, offset). */
|
|
829
792
|
pagingMetadata?: PagingMetadataV2;
|
|
830
793
|
}
|
|
831
|
-
interface
|
|
832
|
-
}
|
|
833
|
-
interface GetOrdersStatsResponse {
|
|
834
|
-
/** Total number of orders. */
|
|
835
|
-
totalOrderCount?: number;
|
|
836
|
-
/** Number of active orders. */
|
|
837
|
-
activeOrderCount?: number;
|
|
838
|
-
}
|
|
839
|
-
interface GetAvailableOrderActionsRequest {
|
|
840
|
-
/**
|
|
841
|
-
* Order ID.
|
|
842
|
-
* @format GUID
|
|
843
|
-
*/
|
|
844
|
-
_id?: string;
|
|
845
|
-
}
|
|
846
|
-
interface GetAvailableOrderActionsResponse {
|
|
847
|
-
/** Whether the order can be suspended. */
|
|
848
|
-
suspendable?: boolean;
|
|
849
|
-
/** If the order cannot be suspended, a reason is returned here. */
|
|
850
|
-
notSuspendableReason?: ReasonNotSuspendableWithLiterals;
|
|
851
|
-
/** Whether the order can be canceled by the buyer. */
|
|
852
|
-
cancelableByBuyer?: boolean;
|
|
853
|
-
}
|
|
854
|
-
declare enum ReasonNotSuspendable {
|
|
855
|
-
/** Undefined reason. */
|
|
856
|
-
UNDEFINED = "UNDEFINED",
|
|
857
|
-
/** Saved in the database but is awaiting payment. Non-active orders can't be suspended. */
|
|
858
|
-
PENDING = "PENDING",
|
|
859
|
-
/** Trial orders can't be suspended. */
|
|
860
|
-
TRIAL = "TRIAL",
|
|
861
|
-
/** Canceled orders can't be suspended. */
|
|
862
|
-
CANCELED = "CANCELED",
|
|
863
|
-
/** Ended orders can't be suspended. */
|
|
864
|
-
ENDED = "ENDED",
|
|
865
|
-
/** Paid for orders with future start dates can't be suspended. */
|
|
866
|
-
NOT_STARTED = "NOT_STARTED",
|
|
867
|
-
/** Order is already suspended. */
|
|
868
|
-
ALREADY_SUSPENDED = "ALREADY_SUSPENDED",
|
|
869
|
-
/** Orders based on recurring payments using older stripe versions can't be suspended. */
|
|
870
|
-
OLD_STRIPE = "OLD_STRIPE"
|
|
871
|
-
}
|
|
872
|
-
/** @enumType */
|
|
873
|
-
type ReasonNotSuspendableWithLiterals = ReasonNotSuspendable | 'UNDEFINED' | 'PENDING' | 'TRIAL' | 'CANCELED' | 'ENDED' | 'NOT_STARTED' | 'ALREADY_SUSPENDED' | 'OLD_STRIPE';
|
|
874
|
-
interface PostponeEndDateRequest {
|
|
875
|
-
/**
|
|
876
|
-
* Order ID.
|
|
877
|
-
* @format GUID
|
|
878
|
-
*/
|
|
879
|
-
_id: string;
|
|
880
|
-
/**
|
|
881
|
-
* New end date and time.
|
|
882
|
-
*
|
|
883
|
-
* Must be later than the current end date and time.
|
|
884
|
-
*/
|
|
885
|
-
endDate: Date | null;
|
|
886
|
-
}
|
|
887
|
-
interface PostponeEndDateResponse {
|
|
888
|
-
}
|
|
889
|
-
interface OrderEndDatePostponed {
|
|
890
|
-
/** Order whose `endDate` was postponed. */
|
|
891
|
-
order?: Order;
|
|
892
|
-
}
|
|
893
|
-
interface CancelOrderRequest {
|
|
794
|
+
interface RequestCancellationRequest {
|
|
894
795
|
/**
|
|
895
796
|
* Order ID.
|
|
896
797
|
* @format GUID
|
|
897
798
|
*/
|
|
898
799
|
_id: string;
|
|
899
|
-
/**
|
|
800
|
+
/** Required. Whether to cancel the order effective immediately or at the next payment date. One-time orders can only be canceled immediately. */
|
|
900
801
|
effectiveAt: CancellationEffectiveAtWithLiterals;
|
|
901
802
|
}
|
|
902
|
-
interface
|
|
803
|
+
interface RequestCancellationResponse {
|
|
903
804
|
}
|
|
904
805
|
/**
|
|
905
806
|
* Emitted when an order is canceled immediately or when cycle ends for an order with canceled auto renewal
|
|
@@ -910,111 +811,6 @@ interface OrderCanceled {
|
|
|
910
811
|
/** Canceled order. */
|
|
911
812
|
order?: Order;
|
|
912
813
|
}
|
|
913
|
-
interface MarkAsPaidRequest {
|
|
914
|
-
/**
|
|
915
|
-
* Order ID.
|
|
916
|
-
* @format GUID
|
|
917
|
-
*/
|
|
918
|
-
_id: string;
|
|
919
|
-
}
|
|
920
|
-
interface MarkAsPaidResponse {
|
|
921
|
-
}
|
|
922
|
-
interface OrderMarkedAsPaid {
|
|
923
|
-
/** Order that was marked as paid. */
|
|
924
|
-
order?: Order;
|
|
925
|
-
}
|
|
926
|
-
interface PauseOrderRequest {
|
|
927
|
-
/**
|
|
928
|
-
* Order ID.
|
|
929
|
-
* @format GUID
|
|
930
|
-
*/
|
|
931
|
-
_id: string;
|
|
932
|
-
}
|
|
933
|
-
interface PauseOrderResponse {
|
|
934
|
-
}
|
|
935
|
-
interface OrderPaused {
|
|
936
|
-
/** Paused order. */
|
|
937
|
-
order?: Order;
|
|
938
|
-
}
|
|
939
|
-
interface BulkPauseOrderRequest {
|
|
940
|
-
/**
|
|
941
|
-
* List of Order IDs.
|
|
942
|
-
* @format GUID
|
|
943
|
-
* @minSize 1
|
|
944
|
-
* @maxSize 100
|
|
945
|
-
*/
|
|
946
|
-
ids?: string[];
|
|
947
|
-
/** Set to true to return Order entity in response. */
|
|
948
|
-
returnFullEntity?: boolean;
|
|
949
|
-
}
|
|
950
|
-
interface BulkPauseOrderResponse {
|
|
951
|
-
/** Orders that were paused. */
|
|
952
|
-
results?: BulkOrderResult[];
|
|
953
|
-
/** Bulk action metadata. */
|
|
954
|
-
bulkActionMetadata?: BulkActionMetadata;
|
|
955
|
-
}
|
|
956
|
-
interface BulkOrderResult {
|
|
957
|
-
/** Item metadata */
|
|
958
|
-
itemMetadata?: ItemMetadata;
|
|
959
|
-
/** The order. */
|
|
960
|
-
order?: Order;
|
|
961
|
-
}
|
|
962
|
-
interface ItemMetadata {
|
|
963
|
-
/** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
|
|
964
|
-
_id?: string | null;
|
|
965
|
-
/** Index of the item within the request array. Allows for correlation between request and response items. */
|
|
966
|
-
originalIndex?: number;
|
|
967
|
-
/** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
|
|
968
|
-
success?: boolean;
|
|
969
|
-
/** Details about the error in case of failure. */
|
|
970
|
-
error?: ApplicationError;
|
|
971
|
-
}
|
|
972
|
-
interface ApplicationError {
|
|
973
|
-
/** Error code. */
|
|
974
|
-
code?: string;
|
|
975
|
-
/** Description of the error. */
|
|
976
|
-
description?: string;
|
|
977
|
-
/** Data related to the error. */
|
|
978
|
-
data?: Record<string, any> | null;
|
|
979
|
-
}
|
|
980
|
-
interface BulkActionMetadata {
|
|
981
|
-
/** Number of items that were successfully processed. */
|
|
982
|
-
totalSuccesses?: number;
|
|
983
|
-
/** Number of items that couldn't be processed. */
|
|
984
|
-
totalFailures?: number;
|
|
985
|
-
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
986
|
-
undetailedFailures?: number;
|
|
987
|
-
}
|
|
988
|
-
interface ResumeOrderRequest {
|
|
989
|
-
/**
|
|
990
|
-
* Order ID.
|
|
991
|
-
* @format GUID
|
|
992
|
-
*/
|
|
993
|
-
_id: string;
|
|
994
|
-
}
|
|
995
|
-
interface ResumeOrderResponse {
|
|
996
|
-
}
|
|
997
|
-
interface OrderResumed {
|
|
998
|
-
/** Resumed order. */
|
|
999
|
-
order?: Order;
|
|
1000
|
-
}
|
|
1001
|
-
interface BulkResumeOrderRequest {
|
|
1002
|
-
/**
|
|
1003
|
-
* List of Order IDs.
|
|
1004
|
-
* @format GUID
|
|
1005
|
-
* @minSize 1
|
|
1006
|
-
* @maxSize 100
|
|
1007
|
-
*/
|
|
1008
|
-
ids?: string[];
|
|
1009
|
-
/** Set to true to return Order entity in response. */
|
|
1010
|
-
returnFullEntity?: boolean;
|
|
1011
|
-
}
|
|
1012
|
-
interface BulkResumeOrderResponse {
|
|
1013
|
-
/** Orders that were resumed. */
|
|
1014
|
-
results?: BulkOrderResult[];
|
|
1015
|
-
/** Bulk action metadata. */
|
|
1016
|
-
bulkActionMetadata?: BulkActionMetadata;
|
|
1017
|
-
}
|
|
1018
814
|
interface MessageEnvelope {
|
|
1019
815
|
/**
|
|
1020
816
|
* App instance ID.
|
|
@@ -1104,93 +900,16 @@ interface AccountInfo {
|
|
|
1104
900
|
*/
|
|
1105
901
|
siteId?: string | null;
|
|
1106
902
|
}
|
|
1107
|
-
interface
|
|
903
|
+
interface CreateOnlineOrderRequest {
|
|
1108
904
|
/**
|
|
1109
|
-
*
|
|
905
|
+
* Plan ID.
|
|
1110
906
|
* @format GUID
|
|
1111
907
|
*/
|
|
1112
|
-
|
|
908
|
+
planId: string;
|
|
1113
909
|
/**
|
|
1114
|
-
*
|
|
910
|
+
* Start date and time for the plan of the online order in a `YYYY-MM-DDThh:mm[:ss][.sss]Z` format.
|
|
1115
911
|
*
|
|
1116
|
-
* Default:
|
|
1117
|
-
*/
|
|
1118
|
-
fieldSet?: SetWithLiterals;
|
|
1119
|
-
}
|
|
1120
|
-
interface MemberGetOrderResponse {
|
|
1121
|
-
/** Requested order. */
|
|
1122
|
-
order?: Order;
|
|
1123
|
-
}
|
|
1124
|
-
interface MemberListOrdersRequest {
|
|
1125
|
-
/**
|
|
1126
|
-
* Filter by plan IDs.
|
|
1127
|
-
* @format GUID
|
|
1128
|
-
*/
|
|
1129
|
-
planIds?: string[];
|
|
1130
|
-
/** Filter for orders where auto renewal was canceled. */
|
|
1131
|
-
autoRenewCanceled?: boolean | null;
|
|
1132
|
-
/** Filter by order status. */
|
|
1133
|
-
orderStatuses?: OrderStatusWithLiterals[];
|
|
1134
|
-
/** Filter by payment status. */
|
|
1135
|
-
paymentStatuses?: PaymentStatusWithLiterals[];
|
|
1136
|
-
/**
|
|
1137
|
-
* Limit the number of pricing plans returned. Default limit is 50.
|
|
1138
|
-
* @min 1
|
|
1139
|
-
* @max 50
|
|
1140
|
-
*/
|
|
1141
|
-
limit?: number | null;
|
|
1142
|
-
/** Number of entries to offset. */
|
|
1143
|
-
offset?: number | null;
|
|
1144
|
-
/** Sorting direction (defaults to ASC) and field to sort by. */
|
|
1145
|
-
sorting?: Sorting;
|
|
1146
|
-
/**
|
|
1147
|
-
* Predefined set of fields to return.
|
|
1148
|
-
*
|
|
1149
|
-
* Default: If `fieldSet` is omitted, no order form submission data is returned.
|
|
1150
|
-
*/
|
|
1151
|
-
fieldSet?: SetWithLiterals;
|
|
1152
|
-
}
|
|
1153
|
-
interface MemberListOrdersResponse {
|
|
1154
|
-
/** Requested orders. */
|
|
1155
|
-
orders?: Order[];
|
|
1156
|
-
/** Object containing paging-related data (number of orders returned, offset). */
|
|
1157
|
-
pagingMetadata?: PagingMetadataV2;
|
|
1158
|
-
}
|
|
1159
|
-
/**
|
|
1160
|
-
* TODO: Write orders filter and sort docs page
|
|
1161
|
-
* Retrieves a list of up to 1,000 orders, based on the provided paging, sorting, and filtering.
|
|
1162
|
-
*/
|
|
1163
|
-
interface QueryOrdersRequest {
|
|
1164
|
-
/** Query filter. */
|
|
1165
|
-
query?: QueryV2;
|
|
1166
|
-
}
|
|
1167
|
-
interface QueryOrdersResponse {
|
|
1168
|
-
/** Order data. */
|
|
1169
|
-
plans?: Order[];
|
|
1170
|
-
/** Paging-related data (number of orders returned, offset). */
|
|
1171
|
-
pagingMetadata?: PagingMetadataV2;
|
|
1172
|
-
}
|
|
1173
|
-
interface RequestCancellationRequest {
|
|
1174
|
-
/**
|
|
1175
|
-
* Order ID.
|
|
1176
|
-
* @format GUID
|
|
1177
|
-
*/
|
|
1178
|
-
_id: string;
|
|
1179
|
-
/** Required. Whether to cancel the order effective immediately or at the next payment date. One-time orders can only be canceled immediately. */
|
|
1180
|
-
effectiveAt: CancellationEffectiveAtWithLiterals;
|
|
1181
|
-
}
|
|
1182
|
-
interface RequestCancellationResponse {
|
|
1183
|
-
}
|
|
1184
|
-
interface CreateOnlineOrderRequest {
|
|
1185
|
-
/**
|
|
1186
|
-
* Plan ID.
|
|
1187
|
-
* @format GUID
|
|
1188
|
-
*/
|
|
1189
|
-
planId: string;
|
|
1190
|
-
/**
|
|
1191
|
-
* Start date and time for the plan of the online order in a `YYYY-MM-DDThh:mm[:ss][.sss]Z` format.
|
|
1192
|
-
*
|
|
1193
|
-
* Default: Current date and time.
|
|
912
|
+
* Default: Current date and time.
|
|
1194
913
|
*/
|
|
1195
914
|
startDate?: Date | null;
|
|
1196
915
|
/**
|
|
@@ -1484,185 +1203,466 @@ interface SetSubmissionResponse {
|
|
|
1484
1203
|
/** Order with submission id */
|
|
1485
1204
|
order?: Order;
|
|
1486
1205
|
}
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
data
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
}
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
}
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1206
|
+
interface OrderPurchased {
|
|
1207
|
+
/** Order that was paid for. If a free or an offline order, the order that was created. */
|
|
1208
|
+
order?: Order;
|
|
1209
|
+
}
|
|
1210
|
+
interface OrderStarted {
|
|
1211
|
+
/** Order that reached its `startDate`. */
|
|
1212
|
+
order?: Order;
|
|
1213
|
+
}
|
|
1214
|
+
/**
|
|
1215
|
+
* Triggered at the start of a new payment cycle for an existing order.
|
|
1216
|
+
*
|
|
1217
|
+
* This webhook does not trigger at the initial start of an offline order.
|
|
1218
|
+
*/
|
|
1219
|
+
interface OrderCycleStarted {
|
|
1220
|
+
/** Order whose new cycle started. */
|
|
1221
|
+
order?: Order;
|
|
1222
|
+
/** 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. */
|
|
1223
|
+
cycleNumber?: number;
|
|
1224
|
+
}
|
|
1225
|
+
/** Emitted when a recurring order is canceled for the next payment cycle */
|
|
1226
|
+
interface OrderAutoRenewCanceled {
|
|
1227
|
+
/** Order that is canceled, effective at the end of the current payment cycle. */
|
|
1228
|
+
order?: Order;
|
|
1229
|
+
}
|
|
1230
|
+
interface OrderEnded {
|
|
1231
|
+
/** Order that ended. */
|
|
1232
|
+
order?: Order;
|
|
1233
|
+
}
|
|
1234
|
+
interface GetOrderRequest {
|
|
1235
|
+
/**
|
|
1236
|
+
* Order ID.
|
|
1237
|
+
* @format GUID
|
|
1238
|
+
*/
|
|
1239
|
+
_id: string;
|
|
1240
|
+
/**
|
|
1241
|
+
* Predefined set of fields to return.
|
|
1242
|
+
*
|
|
1243
|
+
* Default: If `fieldSet` is omitted, no order form submission data is returned.
|
|
1244
|
+
*/
|
|
1245
|
+
fieldSet?: SetWithLiterals;
|
|
1246
|
+
}
|
|
1247
|
+
interface GetOrderResponse {
|
|
1248
|
+
/** Order. */
|
|
1249
|
+
order?: Order;
|
|
1250
|
+
}
|
|
1251
|
+
interface ListOrdersRequest {
|
|
1252
|
+
/**
|
|
1253
|
+
* Filter by a buyer's member ID, from the Members API.
|
|
1254
|
+
* @format GUID
|
|
1255
|
+
*/
|
|
1256
|
+
buyerIds?: string[];
|
|
1257
|
+
/**
|
|
1258
|
+
* Filter by plan IDs, from the Plans API.
|
|
1259
|
+
* @format GUID
|
|
1260
|
+
*/
|
|
1261
|
+
planIds?: string[];
|
|
1262
|
+
/** Filter by whether or not the auto-renewal of recurring orders was canceled. */
|
|
1263
|
+
autoRenewCanceled?: boolean | null;
|
|
1264
|
+
/** Filter by order status. */
|
|
1265
|
+
orderStatuses?: OrderStatusWithLiterals[];
|
|
1266
|
+
/** Filter by payment status. */
|
|
1267
|
+
paymentStatuses?: PaymentStatusWithLiterals[];
|
|
1268
|
+
/**
|
|
1269
|
+
* Number of orders to return. See Sorting and Paging for more information.
|
|
1270
|
+
*
|
|
1271
|
+
* Max: `50`
|
|
1272
|
+
* @min 1
|
|
1273
|
+
* @max 50
|
|
1274
|
+
*/
|
|
1275
|
+
limit?: number | null;
|
|
1276
|
+
/** Number of orders to skip in the current sort order. */
|
|
1277
|
+
offset?: number | null;
|
|
1278
|
+
/**
|
|
1279
|
+
* Sort order.
|
|
1280
|
+
*
|
|
1281
|
+
* Use `ASC` for ascending order or `DESC` for descending order.
|
|
1282
|
+
*
|
|
1283
|
+
* Default: `DESC`.
|
|
1284
|
+
*/
|
|
1285
|
+
sorting?: Sorting;
|
|
1286
|
+
/**
|
|
1287
|
+
* Predefined set of fields to return.
|
|
1288
|
+
*
|
|
1289
|
+
* Default: If `fieldSet` is omitted, no order form submission data is returned.
|
|
1290
|
+
*/
|
|
1291
|
+
fieldSet?: SetWithLiterals;
|
|
1292
|
+
}
|
|
1293
|
+
interface ListOrdersResponse {
|
|
1294
|
+
/** List of orders. */
|
|
1295
|
+
orders?: Order[];
|
|
1296
|
+
/** Object containing paging-related data (number of orders returned, offset). */
|
|
1297
|
+
pagingMetadata?: PagingMetadataV2;
|
|
1298
|
+
}
|
|
1299
|
+
interface OrdersQueryOrdersRequest {
|
|
1300
|
+
/** Query filter. */
|
|
1301
|
+
query?: QueryV2;
|
|
1302
|
+
}
|
|
1303
|
+
interface OrdersQueryOrdersResponse {
|
|
1304
|
+
/** Retrieved orders. */
|
|
1305
|
+
plans?: Order[];
|
|
1306
|
+
/** Paging-related data (number of orders returned, offset). */
|
|
1307
|
+
pagingMetadata?: PagingMetadataV2;
|
|
1308
|
+
}
|
|
1309
|
+
interface GetOrdersStatsRequest {
|
|
1310
|
+
}
|
|
1311
|
+
interface GetOrdersStatsResponse {
|
|
1312
|
+
/** Total number of orders. */
|
|
1313
|
+
totalOrderCount?: number;
|
|
1314
|
+
/** Number of active orders. */
|
|
1315
|
+
activeOrderCount?: number;
|
|
1316
|
+
}
|
|
1317
|
+
interface GetAvailableOrderActionsRequest {
|
|
1318
|
+
/**
|
|
1319
|
+
* Order ID.
|
|
1320
|
+
* @format GUID
|
|
1321
|
+
*/
|
|
1322
|
+
_id?: string;
|
|
1323
|
+
}
|
|
1324
|
+
interface GetAvailableOrderActionsResponse {
|
|
1325
|
+
/** Whether the order can be suspended. */
|
|
1326
|
+
suspendable?: boolean;
|
|
1327
|
+
/** If the order cannot be suspended, a reason is returned here. */
|
|
1328
|
+
notSuspendableReason?: ReasonNotSuspendableWithLiterals;
|
|
1329
|
+
/** Whether the order can be canceled by the buyer. */
|
|
1330
|
+
cancelableByBuyer?: boolean;
|
|
1331
|
+
}
|
|
1332
|
+
declare enum ReasonNotSuspendable {
|
|
1333
|
+
/** Undefined reason. */
|
|
1334
|
+
UNDEFINED = "UNDEFINED",
|
|
1335
|
+
/** Saved in the database but is awaiting payment. Non-active orders can't be suspended. */
|
|
1336
|
+
PENDING = "PENDING",
|
|
1337
|
+
/** Trial orders can't be suspended. */
|
|
1338
|
+
TRIAL = "TRIAL",
|
|
1339
|
+
/** Canceled orders can't be suspended. */
|
|
1340
|
+
CANCELED = "CANCELED",
|
|
1341
|
+
/** Ended orders can't be suspended. */
|
|
1342
|
+
ENDED = "ENDED",
|
|
1343
|
+
/** Paid for orders with future start dates can't be suspended. */
|
|
1344
|
+
NOT_STARTED = "NOT_STARTED",
|
|
1345
|
+
/** Order is already suspended. */
|
|
1346
|
+
ALREADY_SUSPENDED = "ALREADY_SUSPENDED",
|
|
1347
|
+
/** Orders based on recurring payments using older stripe versions can't be suspended. */
|
|
1348
|
+
OLD_STRIPE = "OLD_STRIPE"
|
|
1349
|
+
}
|
|
1350
|
+
/** @enumType */
|
|
1351
|
+
type ReasonNotSuspendableWithLiterals = ReasonNotSuspendable | 'UNDEFINED' | 'PENDING' | 'TRIAL' | 'CANCELED' | 'ENDED' | 'NOT_STARTED' | 'ALREADY_SUSPENDED' | 'OLD_STRIPE';
|
|
1352
|
+
interface PostponeEndDateRequest {
|
|
1353
|
+
/**
|
|
1354
|
+
* Order ID.
|
|
1355
|
+
* @format GUID
|
|
1356
|
+
*/
|
|
1357
|
+
_id: string;
|
|
1358
|
+
/**
|
|
1359
|
+
* New end date and time.
|
|
1360
|
+
*
|
|
1361
|
+
* Must be later than the current end date and time.
|
|
1362
|
+
*/
|
|
1363
|
+
endDate: Date | null;
|
|
1364
|
+
}
|
|
1365
|
+
interface PostponeEndDateResponse {
|
|
1366
|
+
}
|
|
1367
|
+
interface OrderEndDatePostponed {
|
|
1368
|
+
/** Order whose `endDate` was postponed. */
|
|
1369
|
+
order?: Order;
|
|
1370
|
+
}
|
|
1371
|
+
interface CancelOrderRequest {
|
|
1372
|
+
/**
|
|
1373
|
+
* Order ID.
|
|
1374
|
+
* @format GUID
|
|
1375
|
+
*/
|
|
1376
|
+
_id: string;
|
|
1377
|
+
/** __Required.__ When the order will be canceled. One-time orders can only be canceled `IMMEDIATELY`. */
|
|
1378
|
+
effectiveAt: CancellationEffectiveAtWithLiterals;
|
|
1379
|
+
}
|
|
1380
|
+
interface CancelOrderResponse {
|
|
1381
|
+
}
|
|
1382
|
+
interface MarkAsPaidRequest {
|
|
1383
|
+
/**
|
|
1384
|
+
* Order ID.
|
|
1385
|
+
* @format GUID
|
|
1386
|
+
*/
|
|
1387
|
+
_id: string;
|
|
1388
|
+
}
|
|
1389
|
+
interface MarkAsPaidResponse {
|
|
1390
|
+
}
|
|
1391
|
+
interface OrderMarkedAsPaid {
|
|
1392
|
+
/** Order that was marked as paid. */
|
|
1393
|
+
order?: Order;
|
|
1394
|
+
}
|
|
1395
|
+
interface PauseOrderRequest {
|
|
1396
|
+
/**
|
|
1397
|
+
* Order ID.
|
|
1398
|
+
* @format GUID
|
|
1399
|
+
*/
|
|
1400
|
+
_id: string;
|
|
1401
|
+
}
|
|
1402
|
+
interface PauseOrderResponse {
|
|
1403
|
+
}
|
|
1404
|
+
interface OrderPaused {
|
|
1405
|
+
/** Paused order. */
|
|
1406
|
+
order?: Order;
|
|
1407
|
+
}
|
|
1408
|
+
interface BulkPauseOrderRequest {
|
|
1409
|
+
/**
|
|
1410
|
+
* List of Order IDs.
|
|
1411
|
+
* @format GUID
|
|
1412
|
+
* @minSize 1
|
|
1413
|
+
* @maxSize 100
|
|
1414
|
+
*/
|
|
1415
|
+
ids?: string[];
|
|
1416
|
+
/** Set to true to return Order entity in response. */
|
|
1417
|
+
returnFullEntity?: boolean;
|
|
1418
|
+
}
|
|
1419
|
+
interface BulkPauseOrderResponse {
|
|
1420
|
+
/** Orders that were paused. */
|
|
1421
|
+
results?: BulkOrderResult[];
|
|
1422
|
+
/** Bulk action metadata. */
|
|
1423
|
+
bulkActionMetadata?: BulkActionMetadata;
|
|
1424
|
+
}
|
|
1425
|
+
interface BulkOrderResult {
|
|
1426
|
+
/** Item metadata */
|
|
1427
|
+
itemMetadata?: ItemMetadata;
|
|
1428
|
+
/** The order. */
|
|
1429
|
+
order?: Order;
|
|
1430
|
+
}
|
|
1431
|
+
interface ItemMetadata {
|
|
1432
|
+
/** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
|
|
1433
|
+
_id?: string | null;
|
|
1434
|
+
/** Index of the item within the request array. Allows for correlation between request and response items. */
|
|
1435
|
+
originalIndex?: number;
|
|
1436
|
+
/** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
|
|
1437
|
+
success?: boolean;
|
|
1438
|
+
/** Details about the error in case of failure. */
|
|
1439
|
+
error?: ApplicationError;
|
|
1440
|
+
}
|
|
1441
|
+
interface ApplicationError {
|
|
1442
|
+
/** Error code. */
|
|
1443
|
+
code?: string;
|
|
1444
|
+
/** Description of the error. */
|
|
1445
|
+
description?: string;
|
|
1446
|
+
/** Data related to the error. */
|
|
1447
|
+
data?: Record<string, any> | null;
|
|
1448
|
+
}
|
|
1449
|
+
interface BulkActionMetadata {
|
|
1450
|
+
/** Number of items that were successfully processed. */
|
|
1451
|
+
totalSuccesses?: number;
|
|
1452
|
+
/** Number of items that couldn't be processed. */
|
|
1453
|
+
totalFailures?: number;
|
|
1454
|
+
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
1455
|
+
undetailedFailures?: number;
|
|
1456
|
+
}
|
|
1457
|
+
interface ResumeOrderRequest {
|
|
1458
|
+
/**
|
|
1459
|
+
* Order ID.
|
|
1460
|
+
* @format GUID
|
|
1461
|
+
*/
|
|
1462
|
+
_id: string;
|
|
1463
|
+
}
|
|
1464
|
+
interface ResumeOrderResponse {
|
|
1465
|
+
}
|
|
1466
|
+
interface OrderResumed {
|
|
1467
|
+
/** Resumed order. */
|
|
1468
|
+
order?: Order;
|
|
1469
|
+
}
|
|
1470
|
+
interface BulkResumeOrderRequest {
|
|
1471
|
+
/**
|
|
1472
|
+
* List of Order IDs.
|
|
1473
|
+
* @format GUID
|
|
1474
|
+
* @minSize 1
|
|
1475
|
+
* @maxSize 100
|
|
1476
|
+
*/
|
|
1477
|
+
ids?: string[];
|
|
1478
|
+
/** Set to true to return Order entity in response. */
|
|
1479
|
+
returnFullEntity?: boolean;
|
|
1480
|
+
}
|
|
1481
|
+
interface BulkResumeOrderResponse {
|
|
1482
|
+
/** Orders that were resumed. */
|
|
1483
|
+
results?: BulkOrderResult[];
|
|
1484
|
+
/** Bulk action metadata. */
|
|
1485
|
+
bulkActionMetadata?: BulkActionMetadata;
|
|
1486
|
+
}
|
|
1487
|
+
/** @docsIgnore */
|
|
1488
|
+
type CreateOnlineOrderApplicationErrors = {
|
|
1489
|
+
code?: 'MEMBER_REQUIRED';
|
|
1490
|
+
description?: string;
|
|
1491
|
+
data?: Record<string, any>;
|
|
1492
|
+
} | {
|
|
1493
|
+
code?: 'archived_plan';
|
|
1494
|
+
description?: string;
|
|
1495
|
+
data?: Record<string, any>;
|
|
1496
|
+
} | {
|
|
1497
|
+
code?: 'member_not_found';
|
|
1498
|
+
description?: string;
|
|
1499
|
+
data?: Record<string, any>;
|
|
1500
|
+
} | {
|
|
1501
|
+
code?: 'purchases_limit_reached';
|
|
1502
|
+
description?: string;
|
|
1503
|
+
data?: Record<string, any>;
|
|
1504
|
+
} | {
|
|
1505
|
+
code?: 'buyer_can_not_pick_future_start_date';
|
|
1506
|
+
description?: string;
|
|
1507
|
+
data?: Record<string, any>;
|
|
1508
|
+
} | {
|
|
1509
|
+
code?: 'invalid_start_date';
|
|
1510
|
+
description?: string;
|
|
1511
|
+
data?: Record<string, any>;
|
|
1512
|
+
} | {
|
|
1513
|
+
code?: 'accept_payment_feature_missing';
|
|
1514
|
+
description?: string;
|
|
1515
|
+
data?: Record<string, any>;
|
|
1516
|
+
} | {
|
|
1517
|
+
code?: 'meta_site_id_missing';
|
|
1518
|
+
description?: string;
|
|
1519
|
+
data?: Record<string, any>;
|
|
1520
|
+
} | {
|
|
1521
|
+
code?: 'ERROR_COUPON_IS_DISABLED';
|
|
1522
|
+
description?: string;
|
|
1523
|
+
data?: CouponsError;
|
|
1524
|
+
} | {
|
|
1525
|
+
code?: 'ERROR_COUPON_USAGE_EXCEEDED';
|
|
1526
|
+
description?: string;
|
|
1527
|
+
data?: CouponsError;
|
|
1528
|
+
} | {
|
|
1529
|
+
code?: 'ERROR_COUPON_LIMIT_PER_CUSTOMER_EXCEEDED';
|
|
1530
|
+
description?: string;
|
|
1531
|
+
data?: CouponsError;
|
|
1532
|
+
} | {
|
|
1533
|
+
code?: 'ERROR_COUPON_IS_NOT_ACTIVE_YET';
|
|
1534
|
+
description?: string;
|
|
1535
|
+
data?: CouponsError;
|
|
1536
|
+
} | {
|
|
1537
|
+
code?: 'ERROR_COUPON_HAS_EXPIRED';
|
|
1538
|
+
description?: string;
|
|
1539
|
+
data?: CouponsError;
|
|
1540
|
+
} | {
|
|
1541
|
+
code?: 'ERROR_COUPON_DOES_NOT_EXIST';
|
|
1542
|
+
description?: string;
|
|
1543
|
+
data?: CouponsError;
|
|
1544
|
+
} | {
|
|
1545
|
+
code?: 'ERROR_COUPON_NOT_APPLICABLE_FOR_PLAN';
|
|
1546
|
+
description?: string;
|
|
1547
|
+
data?: CouponsError;
|
|
1548
|
+
} | {
|
|
1549
|
+
code?: 'ERROR_INVALID_SUBTOTAL';
|
|
1550
|
+
description?: string;
|
|
1551
|
+
data?: CouponsError;
|
|
1552
|
+
} | {
|
|
1553
|
+
code?: 'undefined_not_allowed';
|
|
1554
|
+
description?: string;
|
|
1555
|
+
data?: Record<string, any>;
|
|
1556
|
+
} | {
|
|
1557
|
+
code?: 'MISSING_BUSINESS_ADDRESS_COUNTRY';
|
|
1558
|
+
description?: string;
|
|
1559
|
+
data?: Record<string, any>;
|
|
1560
|
+
} | {
|
|
1561
|
+
code?: 'MISSING_BUSINESS_ADDRESS_STATE';
|
|
1562
|
+
description?: string;
|
|
1563
|
+
data?: Record<string, any>;
|
|
1564
|
+
};
|
|
1565
|
+
/** @docsIgnore */
|
|
1566
|
+
type CreateOnlineOrderValidationErrors = {
|
|
1567
|
+
ruleName?: 'UNKNOWN_ORDER_METHOD';
|
|
1568
|
+
} | {
|
|
1569
|
+
ruleName?: 'RECURRING_POS_UNSUPPORTED';
|
|
1570
|
+
} | {
|
|
1571
|
+
ruleName?: 'invalid_sort_field';
|
|
1572
|
+
};
|
|
1573
|
+
/** @docsIgnore */
|
|
1574
|
+
type CreateOfflineOrderApplicationErrors = {
|
|
1575
|
+
code?: 'PRICING_PLANS_NOT_INSTALLED';
|
|
1576
|
+
description?: string;
|
|
1577
|
+
data?: Record<string, any>;
|
|
1578
|
+
} | {
|
|
1579
|
+
code?: 'meta_site_id_missing';
|
|
1580
|
+
description?: string;
|
|
1581
|
+
data?: Record<string, any>;
|
|
1582
|
+
} | {
|
|
1583
|
+
code?: 'ERROR_COUPON_IS_DISABLED';
|
|
1584
|
+
description?: string;
|
|
1585
|
+
data?: CouponsError;
|
|
1586
|
+
} | {
|
|
1587
|
+
code?: 'ERROR_COUPON_USAGE_EXCEEDED';
|
|
1588
|
+
description?: string;
|
|
1589
|
+
data?: CouponsError;
|
|
1590
|
+
} | {
|
|
1591
|
+
code?: 'ERROR_COUPON_LIMIT_PER_CUSTOMER_EXCEEDED';
|
|
1592
|
+
description?: string;
|
|
1593
|
+
data?: CouponsError;
|
|
1594
|
+
} | {
|
|
1595
|
+
code?: 'ERROR_COUPON_IS_NOT_ACTIVE_YET';
|
|
1596
|
+
description?: string;
|
|
1597
|
+
data?: CouponsError;
|
|
1598
|
+
} | {
|
|
1599
|
+
code?: 'ERROR_COUPON_HAS_EXPIRED';
|
|
1600
|
+
description?: string;
|
|
1601
|
+
data?: CouponsError;
|
|
1602
|
+
} | {
|
|
1603
|
+
code?: 'ERROR_COUPON_DOES_NOT_EXIST';
|
|
1604
|
+
description?: string;
|
|
1605
|
+
data?: CouponsError;
|
|
1606
|
+
} | {
|
|
1607
|
+
code?: 'ERROR_COUPON_NOT_APPLICABLE_FOR_PLAN';
|
|
1608
|
+
description?: string;
|
|
1609
|
+
data?: CouponsError;
|
|
1610
|
+
} | {
|
|
1611
|
+
code?: 'ERROR_INVALID_SUBTOTAL';
|
|
1612
|
+
description?: string;
|
|
1613
|
+
data?: CouponsError;
|
|
1614
|
+
} | {
|
|
1615
|
+
code?: 'undefined_not_allowed';
|
|
1616
|
+
description?: string;
|
|
1617
|
+
data?: Record<string, any>;
|
|
1618
|
+
} | {
|
|
1619
|
+
code?: 'MISSING_BUSINESS_ADDRESS_COUNTRY';
|
|
1620
|
+
description?: string;
|
|
1621
|
+
data?: Record<string, any>;
|
|
1622
|
+
} | {
|
|
1623
|
+
code?: 'MISSING_BUSINESS_ADDRESS_STATE';
|
|
1624
|
+
description?: string;
|
|
1625
|
+
data?: Record<string, any>;
|
|
1626
|
+
};
|
|
1627
|
+
/** @docsIgnore */
|
|
1628
|
+
type CreateOfflineOrderValidationErrors = {
|
|
1629
|
+
ruleName?: 'MEMBER_DOESNT_EXIST';
|
|
1630
|
+
} | {
|
|
1631
|
+
ruleName?: 'invalid_sort_field';
|
|
1632
|
+
};
|
|
1633
|
+
/** @docsIgnore */
|
|
1634
|
+
type GetOnlineOrderPreviewApplicationErrors = {
|
|
1635
|
+
code?: 'PRICING_PLANS_NOT_INSTALLED';
|
|
1636
|
+
description?: string;
|
|
1637
|
+
data?: Record<string, any>;
|
|
1638
|
+
} | {
|
|
1639
|
+
code?: 'ERROR_COUPON_IS_DISABLED';
|
|
1640
|
+
description?: string;
|
|
1641
|
+
data?: CouponsError;
|
|
1642
|
+
} | {
|
|
1643
|
+
code?: 'ERROR_COUPON_USAGE_EXCEEDED';
|
|
1644
|
+
description?: string;
|
|
1645
|
+
data?: CouponsError;
|
|
1646
|
+
} | {
|
|
1647
|
+
code?: 'ERROR_COUPON_LIMIT_PER_CUSTOMER_EXCEEDED';
|
|
1648
|
+
description?: string;
|
|
1649
|
+
data?: CouponsError;
|
|
1650
|
+
} | {
|
|
1651
|
+
code?: 'ERROR_COUPON_IS_NOT_ACTIVE_YET';
|
|
1652
|
+
description?: string;
|
|
1653
|
+
data?: CouponsError;
|
|
1654
|
+
} | {
|
|
1655
|
+
code?: 'ERROR_COUPON_HAS_EXPIRED';
|
|
1656
|
+
description?: string;
|
|
1657
|
+
data?: CouponsError;
|
|
1658
|
+
} | {
|
|
1659
|
+
code?: 'ERROR_COUPON_DOES_NOT_EXIST';
|
|
1660
|
+
description?: string;
|
|
1661
|
+
data?: CouponsError;
|
|
1662
|
+
} | {
|
|
1663
|
+
code?: 'ERROR_COUPON_NOT_APPLICABLE_FOR_PLAN';
|
|
1664
|
+
description?: string;
|
|
1665
|
+
data?: CouponsError;
|
|
1666
1666
|
} | {
|
|
1667
1667
|
code?: 'ERROR_INVALID_SUBTOTAL';
|
|
1668
1668
|
description?: string;
|
|
@@ -1833,31 +1833,6 @@ interface AccountInfoMetadata {
|
|
|
1833
1833
|
/** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */
|
|
1834
1834
|
parentAccountId?: string;
|
|
1835
1835
|
}
|
|
1836
|
-
interface OrderAutoRenewCanceledEnvelope {
|
|
1837
|
-
data: OrderAutoRenewCanceled;
|
|
1838
|
-
metadata: EventMetadata;
|
|
1839
|
-
}
|
|
1840
|
-
/**
|
|
1841
|
-
* Triggered when an order is canceled and `effectiveAt` is set to `NEXT_PAYMENT_DATE`.
|
|
1842
|
-
*
|
|
1843
|
-
* This webhook is *not* triggered in the following scenarios:
|
|
1844
|
-
* + When an order is canceled and `effectiveAt` is set to `IMMEDIATELY`. Instead, at the time of cancellation, Order Canceled is triggered.
|
|
1845
|
-
* + 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.
|
|
1846
|
-
* @permissionScope Manage Orders
|
|
1847
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
1848
|
-
* @permissionScope Read Orders
|
|
1849
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS
|
|
1850
|
-
* @permissionScope Manage plans and orders of Pricing Plans
|
|
1851
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS-AND-ORDERS
|
|
1852
|
-
* @permissionScope Manage Events
|
|
1853
|
-
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
1854
|
-
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
1855
|
-
* @webhook
|
|
1856
|
-
* @eventType wix.pricing_plans.v2.order_auto_renew_canceled
|
|
1857
|
-
* @serviceIdentifier com.wixpress.membership.v2.orders.OrderManagementService
|
|
1858
|
-
* @slug auto_renew_canceled
|
|
1859
|
-
*/
|
|
1860
|
-
declare function onOrderAutoRenewCanceled(handler: (event: OrderAutoRenewCanceledEnvelope) => void | Promise<void>): void;
|
|
1861
1836
|
interface OrderCanceledEnvelope {
|
|
1862
1837
|
data: OrderCanceled;
|
|
1863
1838
|
metadata: EventMetadata;
|
|
@@ -1879,64 +1854,16 @@ interface OrderCanceledEnvelope {
|
|
|
1879
1854
|
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
1880
1855
|
* @webhook
|
|
1881
1856
|
* @eventType wix.pricing_plans.v2.order_canceled
|
|
1882
|
-
* @serviceIdentifier com.wixpress.membership.v2.orders.
|
|
1857
|
+
* @serviceIdentifier com.wixpress.membership.v2.orders.member.MemberOrdersService
|
|
1883
1858
|
* @slug canceled
|
|
1884
1859
|
*/
|
|
1885
1860
|
declare function onOrderCanceled(handler: (event: OrderCanceledEnvelope) => void | Promise<void>): void;
|
|
1886
|
-
interface
|
|
1887
|
-
|
|
1888
|
-
metadata: EventMetadata;
|
|
1889
|
-
}
|
|
1890
|
-
/**
|
|
1891
|
-
* Triggered at the start of a new payment cycle for an existing order.
|
|
1892
|
-
*
|
|
1893
|
-
* Not triggered at the initial start of an offline order.
|
|
1894
|
-
* @permissionScope Manage Orders
|
|
1895
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
1896
|
-
* @permissionScope Read Orders
|
|
1897
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS
|
|
1898
|
-
* @permissionScope Manage plans and orders of Pricing Plans
|
|
1899
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS-AND-ORDERS
|
|
1900
|
-
* @permissionScope Manage Events
|
|
1901
|
-
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
1902
|
-
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
1903
|
-
* @webhook
|
|
1904
|
-
* @eventType wix.pricing_plans.v2.order_cycle_started
|
|
1905
|
-
* @serviceIdentifier com.wixpress.membership.v2.orders.OrderManagementService
|
|
1906
|
-
* @slug cycle_started
|
|
1907
|
-
*/
|
|
1908
|
-
declare function onOrderCycleStarted(handler: (event: OrderCycleStartedEnvelope) => void | Promise<void>): void;
|
|
1909
|
-
interface OrderEndDatePostponedEnvelope {
|
|
1910
|
-
data: OrderEndDatePostponed;
|
|
1911
|
-
metadata: EventMetadata;
|
|
1912
|
-
}
|
|
1913
|
-
/**
|
|
1914
|
-
* Triggered when an order's `endDate` is postponed.
|
|
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_end_date_postponed
|
|
1926
|
-
* @serviceIdentifier com.wixpress.membership.v2.orders.OrderManagementService
|
|
1927
|
-
* @slug end_date_postponed
|
|
1928
|
-
*/
|
|
1929
|
-
declare function onOrderEndDatePostponed(handler: (event: OrderEndDatePostponedEnvelope) => void | Promise<void>): void;
|
|
1930
|
-
interface OrderEndedEnvelope {
|
|
1931
|
-
data: OrderEnded;
|
|
1861
|
+
interface OrderCreatedEnvelope {
|
|
1862
|
+
entity: Order;
|
|
1932
1863
|
metadata: EventMetadata;
|
|
1933
1864
|
}
|
|
1934
1865
|
/**
|
|
1935
|
-
* Triggered when an order
|
|
1936
|
-
*
|
|
1937
|
-
* This webhook is triggered:
|
|
1938
|
-
* + When an order expires at the end of the current payment cycle.
|
|
1939
|
-
* + When an order is canceled and `effectiveAt` is set to `IMMEDIATELY`.
|
|
1866
|
+
* Triggered when an order is created.
|
|
1940
1867
|
* @permissionScope Manage Orders
|
|
1941
1868
|
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
1942
1869
|
* @permissionScope Read Orders
|
|
@@ -1947,17 +1874,17 @@ interface OrderEndedEnvelope {
|
|
|
1947
1874
|
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
1948
1875
|
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
1949
1876
|
* @webhook
|
|
1950
|
-
* @eventType wix.pricing_plans.v2.
|
|
1951
|
-
* @serviceIdentifier com.wixpress.membership.v2.orders.
|
|
1952
|
-
* @slug
|
|
1877
|
+
* @eventType wix.pricing_plans.v2.order_created
|
|
1878
|
+
* @serviceIdentifier com.wixpress.membership.v2.orders.CheckoutService
|
|
1879
|
+
* @slug created
|
|
1953
1880
|
*/
|
|
1954
|
-
declare function
|
|
1955
|
-
interface
|
|
1956
|
-
data:
|
|
1881
|
+
declare function onOrderCreated(handler: (event: OrderCreatedEnvelope) => void | Promise<void>): void;
|
|
1882
|
+
interface OrderStartDateChangedEnvelope {
|
|
1883
|
+
data: OrderStartDateChanged;
|
|
1957
1884
|
metadata: EventMetadata;
|
|
1958
1885
|
}
|
|
1959
1886
|
/**
|
|
1960
|
-
* Triggered when an
|
|
1887
|
+
* Triggered when an order's `startDate` is changed.
|
|
1961
1888
|
* @permissionScope Manage Orders
|
|
1962
1889
|
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
1963
1890
|
* @permissionScope Read Orders
|
|
@@ -1968,17 +1895,25 @@ interface OrderMarkedAsPaidEnvelope {
|
|
|
1968
1895
|
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
1969
1896
|
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
1970
1897
|
* @webhook
|
|
1971
|
-
* @eventType wix.pricing_plans.v2.
|
|
1972
|
-
* @serviceIdentifier com.wixpress.membership.v2.orders.
|
|
1973
|
-
* @slug
|
|
1898
|
+
* @eventType wix.pricing_plans.v2.order_start_date_changed
|
|
1899
|
+
* @serviceIdentifier com.wixpress.membership.v2.orders.CheckoutService
|
|
1900
|
+
* @slug start_date_changed
|
|
1974
1901
|
*/
|
|
1975
|
-
declare function
|
|
1976
|
-
interface
|
|
1977
|
-
|
|
1902
|
+
declare function onOrderStartDateChanged(handler: (event: OrderStartDateChangedEnvelope) => void | Promise<void>): void;
|
|
1903
|
+
interface OrderUpdatedEnvelope {
|
|
1904
|
+
entity: Order;
|
|
1978
1905
|
metadata: EventMetadata;
|
|
1979
1906
|
}
|
|
1980
1907
|
/**
|
|
1981
|
-
* Triggered
|
|
1908
|
+
* Triggered for any of the following update events:
|
|
1909
|
+
*
|
|
1910
|
+
* + Order is paid for. Order Purchased is also triggered.
|
|
1911
|
+
* + Order reaches its start date or end date. Order Started and Order Ended, respectively, are also triggered.
|
|
1912
|
+
* + New payment cycle of an order starts. Order Cycle Started is also triggered.
|
|
1913
|
+
* + Offline order is marked as paid. Order Marked As Paid is also triggered.
|
|
1914
|
+
* + End date of the order is postponed. Order End Date Postponed is also triggered
|
|
1915
|
+
* + Order is paused, or a paused order is resumed. Order Paused and Order Resumed, respectively, are also triggered.
|
|
1916
|
+
* + Order is canceled, either immediately or at the end of the payment cycle. Order Canceled and Order Auto Renew Canceled, respectively, are also triggered.
|
|
1982
1917
|
* @permissionScope Manage Orders
|
|
1983
1918
|
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
1984
1919
|
* @permissionScope Read Orders
|
|
@@ -1989,21 +1924,21 @@ interface OrderPausedEnvelope {
|
|
|
1989
1924
|
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
1990
1925
|
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
1991
1926
|
* @webhook
|
|
1992
|
-
* @eventType wix.pricing_plans.v2.
|
|
1993
|
-
* @serviceIdentifier com.wixpress.membership.v2.orders.
|
|
1994
|
-
* @slug
|
|
1927
|
+
* @eventType wix.pricing_plans.v2.order_updated
|
|
1928
|
+
* @serviceIdentifier com.wixpress.membership.v2.orders.CheckoutService
|
|
1929
|
+
* @slug updated
|
|
1995
1930
|
*/
|
|
1996
|
-
declare function
|
|
1997
|
-
interface
|
|
1998
|
-
data:
|
|
1931
|
+
declare function onOrderUpdated(handler: (event: OrderUpdatedEnvelope) => void | Promise<void>): void;
|
|
1932
|
+
interface OrderAutoRenewCanceledEnvelope {
|
|
1933
|
+
data: OrderAutoRenewCanceled;
|
|
1999
1934
|
metadata: EventMetadata;
|
|
2000
1935
|
}
|
|
2001
1936
|
/**
|
|
2002
|
-
* Triggered
|
|
2003
|
-
*
|
|
2004
|
-
*
|
|
2005
|
-
* +
|
|
2006
|
-
* +
|
|
1937
|
+
* Triggered when an order is canceled and `effectiveAt` is set to `NEXT_PAYMENT_DATE`.
|
|
1938
|
+
*
|
|
1939
|
+
* This webhook is *not* triggered in the following scenarios:
|
|
1940
|
+
* + When an order is canceled and `effectiveAt` is set to `IMMEDIATELY`. Instead, at the time of cancellation, Order Canceled is triggered.
|
|
1941
|
+
* + 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.
|
|
2007
1942
|
* @permissionScope Manage Orders
|
|
2008
1943
|
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
2009
1944
|
* @permissionScope Read Orders
|
|
@@ -2014,17 +1949,19 @@ interface OrderPurchasedEnvelope {
|
|
|
2014
1949
|
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
2015
1950
|
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
2016
1951
|
* @webhook
|
|
2017
|
-
* @eventType wix.pricing_plans.v2.
|
|
1952
|
+
* @eventType wix.pricing_plans.v2.order_auto_renew_canceled
|
|
2018
1953
|
* @serviceIdentifier com.wixpress.membership.v2.orders.OrderManagementService
|
|
2019
|
-
* @slug
|
|
1954
|
+
* @slug auto_renew_canceled
|
|
2020
1955
|
*/
|
|
2021
|
-
declare function
|
|
2022
|
-
interface
|
|
2023
|
-
data:
|
|
1956
|
+
declare function onOrderAutoRenewCanceled(handler: (event: OrderAutoRenewCanceledEnvelope) => void | Promise<void>): void;
|
|
1957
|
+
interface OrderCycleStartedEnvelope {
|
|
1958
|
+
data: OrderCycleStarted;
|
|
2024
1959
|
metadata: EventMetadata;
|
|
2025
1960
|
}
|
|
2026
1961
|
/**
|
|
2027
|
-
* Triggered
|
|
1962
|
+
* Triggered at the start of a new payment cycle for an existing order.
|
|
1963
|
+
*
|
|
1964
|
+
* Not triggered at the initial start of an offline order.
|
|
2028
1965
|
* @permissionScope Manage Orders
|
|
2029
1966
|
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
2030
1967
|
* @permissionScope Read Orders
|
|
@@ -2035,17 +1972,17 @@ interface OrderResumedEnvelope {
|
|
|
2035
1972
|
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
2036
1973
|
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
2037
1974
|
* @webhook
|
|
2038
|
-
* @eventType wix.pricing_plans.v2.
|
|
1975
|
+
* @eventType wix.pricing_plans.v2.order_cycle_started
|
|
2039
1976
|
* @serviceIdentifier com.wixpress.membership.v2.orders.OrderManagementService
|
|
2040
|
-
* @slug
|
|
1977
|
+
* @slug cycle_started
|
|
2041
1978
|
*/
|
|
2042
|
-
declare function
|
|
2043
|
-
interface
|
|
2044
|
-
data:
|
|
1979
|
+
declare function onOrderCycleStarted(handler: (event: OrderCycleStartedEnvelope) => void | Promise<void>): void;
|
|
1980
|
+
interface OrderEndDatePostponedEnvelope {
|
|
1981
|
+
data: OrderEndDatePostponed;
|
|
2045
1982
|
metadata: EventMetadata;
|
|
2046
1983
|
}
|
|
2047
1984
|
/**
|
|
2048
|
-
* Triggered when an order
|
|
1985
|
+
* Triggered when an order's `endDate` is postponed.
|
|
2049
1986
|
* @permissionScope Manage Orders
|
|
2050
1987
|
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
2051
1988
|
* @permissionScope Read Orders
|
|
@@ -2056,25 +1993,21 @@ interface OrderStartedEnvelope {
|
|
|
2056
1993
|
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
2057
1994
|
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
2058
1995
|
* @webhook
|
|
2059
|
-
* @eventType wix.pricing_plans.v2.
|
|
1996
|
+
* @eventType wix.pricing_plans.v2.order_end_date_postponed
|
|
2060
1997
|
* @serviceIdentifier com.wixpress.membership.v2.orders.OrderManagementService
|
|
2061
|
-
* @slug
|
|
1998
|
+
* @slug end_date_postponed
|
|
2062
1999
|
*/
|
|
2063
|
-
declare function
|
|
2064
|
-
interface
|
|
2065
|
-
|
|
2000
|
+
declare function onOrderEndDatePostponed(handler: (event: OrderEndDatePostponedEnvelope) => void | Promise<void>): void;
|
|
2001
|
+
interface OrderEndedEnvelope {
|
|
2002
|
+
data: OrderEnded;
|
|
2066
2003
|
metadata: EventMetadata;
|
|
2067
2004
|
}
|
|
2068
2005
|
/**
|
|
2069
|
-
* Triggered
|
|
2006
|
+
* Triggered when an order ends.
|
|
2070
2007
|
*
|
|
2071
|
-
*
|
|
2072
|
-
* +
|
|
2073
|
-
* +
|
|
2074
|
-
* + Offline order is marked as paid. Order Marked As Paid is also triggered.
|
|
2075
|
-
* + End date of the order is postponed. Order End Date Postponed is also triggered
|
|
2076
|
-
* + Order is paused, or a paused order is resumed. Order Paused and Order Resumed, respectively, are also triggered.
|
|
2077
|
-
* + Order is canceled, either immediately or at the end of the payment cycle. Order Canceled and Order Auto Renew Canceled, respectively, are also triggered.
|
|
2008
|
+
* This webhook is triggered:
|
|
2009
|
+
* + When an order expires at the end of the current payment cycle.
|
|
2010
|
+
* + When an order is canceled and `effectiveAt` is set to `IMMEDIATELY`.
|
|
2078
2011
|
* @permissionScope Manage Orders
|
|
2079
2012
|
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
2080
2013
|
* @permissionScope Read Orders
|
|
@@ -2085,17 +2018,17 @@ interface OrderUpdatedEnvelope {
|
|
|
2085
2018
|
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
2086
2019
|
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
2087
2020
|
* @webhook
|
|
2088
|
-
* @eventType wix.pricing_plans.v2.
|
|
2021
|
+
* @eventType wix.pricing_plans.v2.order_ended
|
|
2089
2022
|
* @serviceIdentifier com.wixpress.membership.v2.orders.OrderManagementService
|
|
2090
|
-
* @slug
|
|
2023
|
+
* @slug ended
|
|
2091
2024
|
*/
|
|
2092
|
-
declare function
|
|
2093
|
-
interface
|
|
2094
|
-
|
|
2025
|
+
declare function onOrderEnded(handler: (event: OrderEndedEnvelope) => void | Promise<void>): void;
|
|
2026
|
+
interface OrderMarkedAsPaidEnvelope {
|
|
2027
|
+
data: OrderMarkedAsPaid;
|
|
2095
2028
|
metadata: EventMetadata;
|
|
2096
2029
|
}
|
|
2097
2030
|
/**
|
|
2098
|
-
* Triggered when an order is
|
|
2031
|
+
* Triggered when an offline order is marked as paid.
|
|
2099
2032
|
* @permissionScope Manage Orders
|
|
2100
2033
|
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
2101
2034
|
* @permissionScope Read Orders
|
|
@@ -2106,17 +2039,17 @@ interface OrderCreatedEnvelope {
|
|
|
2106
2039
|
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
2107
2040
|
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
2108
2041
|
* @webhook
|
|
2109
|
-
* @eventType wix.pricing_plans.v2.
|
|
2110
|
-
* @serviceIdentifier com.wixpress.membership.v2.orders.
|
|
2111
|
-
* @slug
|
|
2042
|
+
* @eventType wix.pricing_plans.v2.order_marked_as_paid
|
|
2043
|
+
* @serviceIdentifier com.wixpress.membership.v2.orders.OrderManagementService
|
|
2044
|
+
* @slug marked_as_paid
|
|
2112
2045
|
*/
|
|
2113
|
-
declare function
|
|
2114
|
-
interface
|
|
2115
|
-
data:
|
|
2046
|
+
declare function onOrderMarkedAsPaid(handler: (event: OrderMarkedAsPaidEnvelope) => void | Promise<void>): void;
|
|
2047
|
+
interface OrderPausedEnvelope {
|
|
2048
|
+
data: OrderPaused;
|
|
2116
2049
|
metadata: EventMetadata;
|
|
2117
2050
|
}
|
|
2118
2051
|
/**
|
|
2119
|
-
* Triggered when an order
|
|
2052
|
+
* Triggered when an order is paused.
|
|
2120
2053
|
* @permissionScope Manage Orders
|
|
2121
2054
|
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
2122
2055
|
* @permissionScope Read Orders
|
|
@@ -2127,185 +2060,78 @@ interface OrderStartDateChangedEnvelope {
|
|
|
2127
2060
|
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
2128
2061
|
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
2129
2062
|
* @webhook
|
|
2130
|
-
* @eventType wix.pricing_plans.v2.
|
|
2131
|
-
* @serviceIdentifier com.wixpress.membership.v2.orders.
|
|
2132
|
-
* @slug
|
|
2133
|
-
*/
|
|
2134
|
-
declare function onOrderStartDateChanged(handler: (event: OrderStartDateChangedEnvelope) => void | Promise<void>): void;
|
|
2135
|
-
/**
|
|
2136
|
-
* Retrieves an order by ID.
|
|
2137
|
-
* @param _id - Order ID.
|
|
2138
|
-
* @public
|
|
2139
|
-
* @requiredField _id
|
|
2140
|
-
* @param options - Options to use when getting an order.
|
|
2141
|
-
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
2142
|
-
* @applicableIdentity APP
|
|
2143
|
-
* @fqn com.wixpress.membership.v2.orders.OrderManagementService.GetOrder
|
|
2144
|
-
*/
|
|
2145
|
-
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>>;
|
|
2146
|
-
interface ManagementGetOrderOptions {
|
|
2147
|
-
/**
|
|
2148
|
-
* Predefined set of fields to return.
|
|
2149
|
-
*
|
|
2150
|
-
* Default: If `fieldSet` is omitted, no order form submission data is returned.
|
|
2151
|
-
*/
|
|
2152
|
-
fieldSet?: SetWithLiterals;
|
|
2153
|
-
}
|
|
2154
|
-
/**
|
|
2155
|
-
* Retrieves a list of up to 50 pricing plan orders and details, given the specified sorting and filtering.
|
|
2156
|
-
*
|
|
2157
|
-
* By default, this endpoint will retrieve all orders and return them sorted by `createdDate` in `DESC`, descending order.
|
|
2158
|
-
* `sort.fieldName` supports `endDate` and `createdDate` fields and defaults to `ASC`, ascending order.
|
|
2159
|
-
* @public
|
|
2160
|
-
* @param options - Filtering, sorting, and pagination options.
|
|
2161
|
-
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
2162
|
-
* @applicableIdentity APP
|
|
2163
|
-
* @fqn com.wixpress.membership.v2.orders.OrderManagementService.ListOrders
|
|
2063
|
+
* @eventType wix.pricing_plans.v2.order_paused
|
|
2064
|
+
* @serviceIdentifier com.wixpress.membership.v2.orders.OrderManagementService
|
|
2065
|
+
* @slug paused
|
|
2164
2066
|
*/
|
|
2165
|
-
declare function
|
|
2166
|
-
interface
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
* @format GUID
|
|
2170
|
-
*/
|
|
2171
|
-
buyerIds?: string[];
|
|
2172
|
-
/**
|
|
2173
|
-
* Filter by plan IDs, from the Plans API.
|
|
2174
|
-
* @format GUID
|
|
2175
|
-
*/
|
|
2176
|
-
planIds?: string[];
|
|
2177
|
-
/** Filter by whether or not the auto-renewal of recurring orders was canceled. */
|
|
2178
|
-
autoRenewCanceled?: boolean | null;
|
|
2179
|
-
/** Filter by order status. */
|
|
2180
|
-
orderStatuses?: OrderStatusWithLiterals[];
|
|
2181
|
-
/** Filter by payment status. */
|
|
2182
|
-
paymentStatuses?: PaymentStatusWithLiterals[];
|
|
2183
|
-
/**
|
|
2184
|
-
* Number of orders to return. See Sorting and Paging for more information.
|
|
2185
|
-
*
|
|
2186
|
-
* Max: `50`
|
|
2187
|
-
* @min 1
|
|
2188
|
-
* @max 50
|
|
2189
|
-
*/
|
|
2190
|
-
limit?: number | null;
|
|
2191
|
-
/** Number of orders to skip in the current sort order. */
|
|
2192
|
-
offset?: number | null;
|
|
2193
|
-
/**
|
|
2194
|
-
* Sort order.
|
|
2195
|
-
*
|
|
2196
|
-
* Use `ASC` for ascending order or `DESC` for descending order.
|
|
2197
|
-
*
|
|
2198
|
-
* Default: `DESC`.
|
|
2199
|
-
*/
|
|
2200
|
-
sorting?: Sorting;
|
|
2201
|
-
/**
|
|
2202
|
-
* Predefined set of fields to return.
|
|
2203
|
-
*
|
|
2204
|
-
* Default: If `fieldSet` is omitted, no order form submission data is returned.
|
|
2205
|
-
*/
|
|
2206
|
-
fieldSet?: SetWithLiterals;
|
|
2067
|
+
declare function onOrderPaused(handler: (event: OrderPausedEnvelope) => void | Promise<void>): void;
|
|
2068
|
+
interface OrderPurchasedEnvelope {
|
|
2069
|
+
data: OrderPurchased;
|
|
2070
|
+
metadata: EventMetadata;
|
|
2207
2071
|
}
|
|
2208
2072
|
/**
|
|
2209
|
-
*
|
|
2210
|
-
*
|
|
2211
|
-
*
|
|
2212
|
-
*
|
|
2213
|
-
*
|
|
2214
|
-
* @
|
|
2215
|
-
*
|
|
2216
|
-
*
|
|
2217
|
-
* @
|
|
2218
|
-
* @
|
|
2219
|
-
* @
|
|
2220
|
-
* @
|
|
2221
|
-
* @
|
|
2222
|
-
* @
|
|
2223
|
-
* @
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
* Cancels an existing order.
|
|
2228
|
-
*
|
|
2229
|
-
* For orders with recurring payments, a cancellation can be set to occur either `IMMEDIATELY` or at the `NEXT_PAYMENT_DATE`.
|
|
2230
|
-
* For orders with one-time payments, a cancellation can only be set for `IMMEDIATELY`.
|
|
2231
|
-
*
|
|
2232
|
-
* #### Canceling during the free trial period.
|
|
2233
|
-
*
|
|
2234
|
-
* When a buyer cancels their order during the free trial period, the buyer's subscription expires at the end
|
|
2235
|
-
* of the free trial period and they will not be billed. The buyer may continue using the benefits until the end
|
|
2236
|
-
* of the free trial period.
|
|
2237
|
-
*
|
|
2238
|
-
* When a Wix user cancels an ordered plan during the free trial period, they choose whether to apply the cancellation
|
|
2239
|
-
* `IMMEDIATELY` or at the `NEXT_PAYMENT_DATE`. Canceling `IMMEDIATELY` will end the subscription for the buyer
|
|
2240
|
-
* immediately, even during the free trial period and the buyer won't be billed. Canceling at the
|
|
2241
|
-
* `NEXT_PAYMENT_DATE` allows the buyer to continue using the benefits of the subscription until the end of the free trial period.
|
|
2242
|
-
* Then, the subscription ends and the buyer is not billed.
|
|
2243
|
-
* @param _id - Order ID.
|
|
2244
|
-
* @param effectiveAt - __Required.__ When the order will be canceled. One-time orders can only be canceled `IMMEDIATELY`.
|
|
2245
|
-
* @public
|
|
2246
|
-
* @requiredField _id
|
|
2247
|
-
* @requiredField effectiveAt
|
|
2248
|
-
* @param options - Options for canceling orders.
|
|
2249
|
-
* @permissionId PRICING_PLANS.MANAGE_ORDERS
|
|
2250
|
-
* @applicableIdentity APP
|
|
2251
|
-
* @fqn com.wixpress.membership.v2.orders.OrderManagementService.CancelOrder
|
|
2252
|
-
*/
|
|
2253
|
-
declare function cancelOrder(_id: string, effectiveAt: CancellationEffectiveAtWithLiterals): Promise<void>;
|
|
2254
|
-
/**
|
|
2255
|
-
* Marks an offline order as paid.
|
|
2256
|
-
* > __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.
|
|
2257
|
-
*
|
|
2258
|
-
* Marking an offline order as paid causes the following changes:
|
|
2259
|
-
* - The order's `lastPaymentStatus` changes to `"PAID"`.
|
|
2260
|
-
* - The order's status changes to either `"PENDING"` or `"ACTIVE"`, depending on the order's `startDate`.
|
|
2261
|
-
*
|
|
2262
|
-
* An error occurs if you attempt to:
|
|
2263
|
-
* - Mark an already-paid, offline order as paid. You cannot mark an offline order as paid twice.
|
|
2264
|
-
* - Mark an online order as paid. The Mark as Paid method is supported for offline orders only.
|
|
2265
|
-
* @param _id - Order ID.
|
|
2266
|
-
* @public
|
|
2267
|
-
* @requiredField _id
|
|
2268
|
-
* @permissionId PRICING_PLANS.MANAGE_ORDERS
|
|
2269
|
-
* @applicableIdentity APP
|
|
2270
|
-
* @fqn com.wixpress.membership.v2.orders.OrderManagementService.MarkAsPaid
|
|
2073
|
+
* Triggered for any of the following purchase events:
|
|
2074
|
+
* + Order is paid in full.
|
|
2075
|
+
* + At least 1 order cycle payment is paid for.
|
|
2076
|
+
* + Offline order is created, even if not yet marked as paid.
|
|
2077
|
+
* + Free order is created.
|
|
2078
|
+
* @permissionScope Manage Orders
|
|
2079
|
+
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
2080
|
+
* @permissionScope Read Orders
|
|
2081
|
+
* @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS
|
|
2082
|
+
* @permissionScope Manage plans and orders of Pricing Plans
|
|
2083
|
+
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS-AND-ORDERS
|
|
2084
|
+
* @permissionScope Manage Events
|
|
2085
|
+
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
2086
|
+
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
2087
|
+
* @webhook
|
|
2088
|
+
* @eventType wix.pricing_plans.v2.order_purchased
|
|
2089
|
+
* @serviceIdentifier com.wixpress.membership.v2.orders.OrderManagementService
|
|
2090
|
+
* @slug purchased
|
|
2271
2091
|
*/
|
|
2272
|
-
declare function
|
|
2092
|
+
declare function onOrderPurchased(handler: (event: OrderPurchasedEnvelope) => void | Promise<void>): void;
|
|
2093
|
+
interface OrderResumedEnvelope {
|
|
2094
|
+
data: OrderResumed;
|
|
2095
|
+
metadata: EventMetadata;
|
|
2096
|
+
}
|
|
2273
2097
|
/**
|
|
2274
|
-
*
|
|
2275
|
-
*
|
|
2276
|
-
*
|
|
2277
|
-
*
|
|
2278
|
-
*
|
|
2279
|
-
*
|
|
2280
|
-
*
|
|
2281
|
-
*
|
|
2282
|
-
* @
|
|
2283
|
-
* @
|
|
2284
|
-
* @
|
|
2285
|
-
* @
|
|
2286
|
-
* @
|
|
2287
|
-
* @
|
|
2098
|
+
* Triggered when a paused order is resumed.
|
|
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_resumed
|
|
2110
|
+
* @serviceIdentifier com.wixpress.membership.v2.orders.OrderManagementService
|
|
2111
|
+
* @slug resumed
|
|
2288
2112
|
*/
|
|
2289
|
-
declare function
|
|
2113
|
+
declare function onOrderResumed(handler: (event: OrderResumedEnvelope) => void | Promise<void>): void;
|
|
2114
|
+
interface OrderStartedEnvelope {
|
|
2115
|
+
data: OrderStarted;
|
|
2116
|
+
metadata: EventMetadata;
|
|
2117
|
+
}
|
|
2290
2118
|
/**
|
|
2291
|
-
*
|
|
2292
|
-
*
|
|
2293
|
-
*
|
|
2294
|
-
*
|
|
2295
|
-
*
|
|
2296
|
-
*
|
|
2297
|
-
*
|
|
2298
|
-
*
|
|
2299
|
-
*
|
|
2300
|
-
*
|
|
2301
|
-
* @
|
|
2302
|
-
* @
|
|
2303
|
-
* @
|
|
2304
|
-
* @
|
|
2305
|
-
* @applicableIdentity APP
|
|
2306
|
-
* @fqn com.wixpress.membership.v2.orders.OrderManagementService.ResumeOrder
|
|
2119
|
+
* Triggered when an order reaches its `startDate`. Applies to both purchased and free orders.
|
|
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_started
|
|
2131
|
+
* @serviceIdentifier com.wixpress.membership.v2.orders.OrderManagementService
|
|
2132
|
+
* @slug started
|
|
2307
2133
|
*/
|
|
2308
|
-
declare function
|
|
2134
|
+
declare function onOrderStarted(handler: (event: OrderStartedEnvelope) => void | Promise<void>): void;
|
|
2309
2135
|
/**
|
|
2310
2136
|
* Retrieves an order for the currently logged-in member by ID.
|
|
2311
2137
|
* @param _id - Order ID.
|
|
@@ -2315,10 +2141,9 @@ declare function resumeOrder(_id: string): Promise<void>;
|
|
|
2315
2141
|
* @permissionId PRICING_PLANS.READ_OWN_ORDERS
|
|
2316
2142
|
* @applicableIdentity APP
|
|
2317
2143
|
* @applicableIdentity MEMBER
|
|
2318
|
-
* @returns Requested order.
|
|
2319
2144
|
* @fqn com.wixpress.membership.v2.orders.member.MemberOrdersService.GetOrder
|
|
2320
2145
|
*/
|
|
2321
|
-
declare function memberGetOrder(_id: string, options?: MemberGetOrderOptions): Promise<NonNullablePaths<
|
|
2146
|
+
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>>;
|
|
2322
2147
|
interface MemberGetOrderOptions {
|
|
2323
2148
|
/**
|
|
2324
2149
|
* Predefined set of fields to return.
|
|
@@ -2581,5 +2406,180 @@ interface GetPricePreviewOptions {
|
|
|
2581
2406
|
*/
|
|
2582
2407
|
couponCode?: string | null;
|
|
2583
2408
|
}
|
|
2409
|
+
/**
|
|
2410
|
+
* Retrieves an order by ID.
|
|
2411
|
+
* @param _id - Order ID.
|
|
2412
|
+
* @public
|
|
2413
|
+
* @requiredField _id
|
|
2414
|
+
* @param options - Options to use when getting an order.
|
|
2415
|
+
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
2416
|
+
* @applicableIdentity APP
|
|
2417
|
+
* @returns Order.
|
|
2418
|
+
* @fqn com.wixpress.membership.v2.orders.OrderManagementService.GetOrder
|
|
2419
|
+
*/
|
|
2420
|
+
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>>;
|
|
2421
|
+
interface ManagementGetOrderOptions {
|
|
2422
|
+
/**
|
|
2423
|
+
* Predefined set of fields to return.
|
|
2424
|
+
*
|
|
2425
|
+
* Default: If `fieldSet` is omitted, no order form submission data is returned.
|
|
2426
|
+
*/
|
|
2427
|
+
fieldSet?: SetWithLiterals;
|
|
2428
|
+
}
|
|
2429
|
+
/**
|
|
2430
|
+
* Retrieves a list of up to 50 pricing plan orders and details, given the specified sorting and filtering.
|
|
2431
|
+
*
|
|
2432
|
+
* By default, this endpoint will retrieve all orders and return them sorted by `createdDate` in `DESC`, descending order.
|
|
2433
|
+
* `sort.fieldName` supports `endDate` and `createdDate` fields and defaults to `ASC`, ascending order.
|
|
2434
|
+
* @public
|
|
2435
|
+
* @param options - Filtering, sorting, and pagination options.
|
|
2436
|
+
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
2437
|
+
* @applicableIdentity APP
|
|
2438
|
+
* @fqn com.wixpress.membership.v2.orders.OrderManagementService.ListOrders
|
|
2439
|
+
*/
|
|
2440
|
+
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>>;
|
|
2441
|
+
interface ManagementListOrdersOptions {
|
|
2442
|
+
/**
|
|
2443
|
+
* Filter by a buyer's member ID, from the Members API.
|
|
2444
|
+
* @format GUID
|
|
2445
|
+
*/
|
|
2446
|
+
buyerIds?: string[];
|
|
2447
|
+
/**
|
|
2448
|
+
* Filter by plan IDs, from the Plans API.
|
|
2449
|
+
* @format GUID
|
|
2450
|
+
*/
|
|
2451
|
+
planIds?: string[];
|
|
2452
|
+
/** Filter by whether or not the auto-renewal of recurring orders was canceled. */
|
|
2453
|
+
autoRenewCanceled?: boolean | null;
|
|
2454
|
+
/** Filter by order status. */
|
|
2455
|
+
orderStatuses?: OrderStatusWithLiterals[];
|
|
2456
|
+
/** Filter by payment status. */
|
|
2457
|
+
paymentStatuses?: PaymentStatusWithLiterals[];
|
|
2458
|
+
/**
|
|
2459
|
+
* Number of orders to return. See Sorting and Paging for more information.
|
|
2460
|
+
*
|
|
2461
|
+
* Max: `50`
|
|
2462
|
+
* @min 1
|
|
2463
|
+
* @max 50
|
|
2464
|
+
*/
|
|
2465
|
+
limit?: number | null;
|
|
2466
|
+
/** Number of orders to skip in the current sort order. */
|
|
2467
|
+
offset?: number | null;
|
|
2468
|
+
/**
|
|
2469
|
+
* Sort order.
|
|
2470
|
+
*
|
|
2471
|
+
* Use `ASC` for ascending order or `DESC` for descending order.
|
|
2472
|
+
*
|
|
2473
|
+
* Default: `DESC`.
|
|
2474
|
+
*/
|
|
2475
|
+
sorting?: Sorting;
|
|
2476
|
+
/**
|
|
2477
|
+
* Predefined set of fields to return.
|
|
2478
|
+
*
|
|
2479
|
+
* Default: If `fieldSet` is omitted, no order form submission data is returned.
|
|
2480
|
+
*/
|
|
2481
|
+
fieldSet?: SetWithLiterals;
|
|
2482
|
+
}
|
|
2483
|
+
/**
|
|
2484
|
+
* 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.
|
|
2485
|
+
*
|
|
2486
|
+
* New `endDate` must be later than the order's current `endDate`. Can't postpone orders that are unlimited.
|
|
2487
|
+
* Can't postpone an order with `status`: `PAUSED`.
|
|
2488
|
+
* @param _id - Order ID.
|
|
2489
|
+
* @param endDate - New end date and time.
|
|
2490
|
+
*
|
|
2491
|
+
* Must be later than the current end date and time.
|
|
2492
|
+
* @public
|
|
2493
|
+
* @requiredField _id
|
|
2494
|
+
* @requiredField endDate
|
|
2495
|
+
* @param options - Options for postponing the end date of an order.
|
|
2496
|
+
* @permissionId PRICING_PLANS.MANAGE_ORDERS
|
|
2497
|
+
* @applicableIdentity APP
|
|
2498
|
+
* @fqn com.wixpress.membership.v2.orders.OrderManagementService.PostponeEndDate
|
|
2499
|
+
*/
|
|
2500
|
+
declare function postponeEndDate(_id: string, endDate: Date): Promise<void>;
|
|
2501
|
+
/**
|
|
2502
|
+
* Cancels an existing order.
|
|
2503
|
+
*
|
|
2504
|
+
* For orders with recurring payments, a cancellation can be set to occur either `IMMEDIATELY` or at the `NEXT_PAYMENT_DATE`.
|
|
2505
|
+
* For orders with one-time payments, a cancellation can only be set for `IMMEDIATELY`.
|
|
2506
|
+
*
|
|
2507
|
+
* #### Canceling during the free trial period.
|
|
2508
|
+
*
|
|
2509
|
+
* When a buyer cancels their order during the free trial period, the buyer's subscription expires at the end
|
|
2510
|
+
* of the free trial period and they will not be billed. The buyer may continue using the benefits until the end
|
|
2511
|
+
* of the free trial period.
|
|
2512
|
+
*
|
|
2513
|
+
* When a Wix user cancels an ordered plan during the free trial period, they choose whether to apply the cancellation
|
|
2514
|
+
* `IMMEDIATELY` or at the `NEXT_PAYMENT_DATE`. Canceling `IMMEDIATELY` will end the subscription for the buyer
|
|
2515
|
+
* immediately, even during the free trial period and the buyer won't be billed. Canceling at the
|
|
2516
|
+
* `NEXT_PAYMENT_DATE` allows the buyer to continue using the benefits of the subscription until the end of the free trial period.
|
|
2517
|
+
* Then, the subscription ends and the buyer is not billed.
|
|
2518
|
+
* @param _id - Order ID.
|
|
2519
|
+
* @param effectiveAt - __Required.__ When the order will be canceled. One-time orders can only be canceled `IMMEDIATELY`.
|
|
2520
|
+
* @public
|
|
2521
|
+
* @requiredField _id
|
|
2522
|
+
* @requiredField effectiveAt
|
|
2523
|
+
* @param options - Options for canceling orders.
|
|
2524
|
+
* @permissionId PRICING_PLANS.MANAGE_ORDERS
|
|
2525
|
+
* @applicableIdentity APP
|
|
2526
|
+
* @fqn com.wixpress.membership.v2.orders.OrderManagementService.CancelOrder
|
|
2527
|
+
*/
|
|
2528
|
+
declare function cancelOrder(_id: string, effectiveAt: CancellationEffectiveAtWithLiterals): Promise<void>;
|
|
2529
|
+
/**
|
|
2530
|
+
* Marks an offline order as paid.
|
|
2531
|
+
* > __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.
|
|
2532
|
+
*
|
|
2533
|
+
* Marking an offline order as paid causes the following changes:
|
|
2534
|
+
* - The order's `lastPaymentStatus` changes to `"PAID"`.
|
|
2535
|
+
* - The order's status changes to either `"PENDING"` or `"ACTIVE"`, depending on the order's `startDate`.
|
|
2536
|
+
*
|
|
2537
|
+
* An error occurs if you attempt to:
|
|
2538
|
+
* - Mark an already-paid, offline order as paid. You cannot mark an offline order as paid twice.
|
|
2539
|
+
* - Mark an online order as paid. The Mark as Paid method is supported for offline orders only.
|
|
2540
|
+
* @param _id - Order ID.
|
|
2541
|
+
* @public
|
|
2542
|
+
* @requiredField _id
|
|
2543
|
+
* @permissionId PRICING_PLANS.MANAGE_ORDERS
|
|
2544
|
+
* @applicableIdentity APP
|
|
2545
|
+
* @fqn com.wixpress.membership.v2.orders.OrderManagementService.MarkAsPaid
|
|
2546
|
+
*/
|
|
2547
|
+
declare function markAsPaid(_id: string): Promise<void>;
|
|
2548
|
+
/**
|
|
2549
|
+
* Pauses an order. Calling this method changes the order status to `"PAUSED"` and updates the `pausePeriods` array.
|
|
2550
|
+
*
|
|
2551
|
+
* Only orders with `status`: `ACTIVE` can be paused.
|
|
2552
|
+
* For orders with recurring payments, it also pauses the payment schedule. Buyers are not charged when an order is paused.
|
|
2553
|
+
* Pausing an order affects the end date of the order by adding the time the order is paused to the `endDate`.
|
|
2554
|
+
* The `endDate` and the `earliestEndDate` for the order are adjusted to include the pause period when the order is resumed.
|
|
2555
|
+
*
|
|
2556
|
+
* To resume a paused order, call Resume Order.
|
|
2557
|
+
* @param _id - Order ID.
|
|
2558
|
+
* @public
|
|
2559
|
+
* @requiredField _id
|
|
2560
|
+
* @permissionId PRICING_PLANS.MANAGE_ORDERS
|
|
2561
|
+
* @applicableIdentity APP
|
|
2562
|
+
* @fqn com.wixpress.membership.v2.orders.OrderManagementService.PauseOrder
|
|
2563
|
+
*/
|
|
2564
|
+
declare function pauseOrder(_id: string): Promise<void>;
|
|
2565
|
+
/**
|
|
2566
|
+
* Resumes a paused order. For orders with recurring payments, it also restarts the payment schedule.
|
|
2567
|
+
*
|
|
2568
|
+
* Resuming an order causes the following changes:
|
|
2569
|
+
* - The order status changes to `"ACTIVE"`.
|
|
2570
|
+
* - The `pausePeriods` array is updated.
|
|
2571
|
+
* - The `endDate` for the order is adjusted to include the pause period.
|
|
2572
|
+
* - For orders with recurring payments, the payment schedule is restarted.
|
|
2573
|
+
* - The `earliestEndDate` is adjusted to include the pause period. (This property is reserved for future use).
|
|
2574
|
+
*
|
|
2575
|
+
* To pause an order, call Pause Order.
|
|
2576
|
+
* @param _id - Order ID.
|
|
2577
|
+
* @public
|
|
2578
|
+
* @requiredField _id
|
|
2579
|
+
* @permissionId PRICING_PLANS.MANAGE_ORDERS
|
|
2580
|
+
* @applicableIdentity APP
|
|
2581
|
+
* @fqn com.wixpress.membership.v2.orders.OrderManagementService.ResumeOrder
|
|
2582
|
+
*/
|
|
2583
|
+
declare function resumeOrder(_id: string): Promise<void>;
|
|
2584
2584
|
|
|
2585
2585
|
export { type AccountInfo, 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 };
|