@wix/auto_sdk_pricing-plans_orders 1.0.121 → 1.0.123
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 +129 -129
- package/build/cjs/index.js +706 -588
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +766 -766
- package/build/cjs/index.typings.js +548 -434
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +484 -484
- package/build/cjs/meta.js +483 -369
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/schemas.d.ts +199 -199
- package/build/cjs/schemas.js +891 -891
- package/build/cjs/schemas.js.map +1 -1
- package/build/es/index.d.mts +129 -129
- package/build/es/index.mjs +706 -588
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +766 -766
- package/build/es/index.typings.mjs +548 -434
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +484 -484
- package/build/es/meta.mjs +483 -369
- package/build/es/meta.mjs.map +1 -1
- package/build/es/schemas.d.mts +199 -199
- package/build/es/schemas.mjs +891 -891
- package/build/es/schemas.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +129 -129
- package/build/internal/cjs/index.js +706 -588
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +794 -794
- package/build/internal/cjs/index.typings.js +548 -434
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +500 -500
- package/build/internal/cjs/meta.js +483 -369
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/cjs/schemas.d.ts +199 -199
- package/build/internal/cjs/schemas.js +891 -891
- package/build/internal/cjs/schemas.js.map +1 -1
- package/build/internal/es/index.d.mts +129 -129
- package/build/internal/es/index.mjs +706 -588
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +794 -794
- package/build/internal/es/index.typings.mjs +548 -434
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +500 -500
- package/build/internal/es/meta.mjs +483 -369
- package/build/internal/es/meta.mjs.map +1 -1
- package/build/internal/es/schemas.d.mts +199 -199
- package/build/internal/es/schemas.mjs +891 -891
- package/build/internal/es/schemas.mjs.map +1 -1
- package/package.json +3 -3
|
@@ -666,316 +666,373 @@ interface ActionEvent {
|
|
|
666
666
|
}
|
|
667
667
|
interface Empty {
|
|
668
668
|
}
|
|
669
|
-
interface
|
|
670
|
-
/**
|
|
671
|
-
|
|
672
|
-
* @format GUID
|
|
673
|
-
*/
|
|
674
|
-
planId: string;
|
|
675
|
-
/**
|
|
676
|
-
* Start date and time for the plan of the online order in a `YYYY-MM-DDThh:mm[:ss][.sss]Z` format.
|
|
677
|
-
*
|
|
678
|
-
* Default: Current date and time.
|
|
679
|
-
*/
|
|
680
|
-
startDate?: Date | null;
|
|
681
|
-
/**
|
|
682
|
-
* Coupon code to apply.
|
|
683
|
-
* @minLength 1
|
|
684
|
-
* @maxLength 20
|
|
685
|
-
*/
|
|
686
|
-
couponCode?: string | null;
|
|
687
|
-
/** Provided if checkout is initiated on buyer's behalf. */
|
|
688
|
-
onBehalf?: OnBehalf;
|
|
689
|
-
/**
|
|
690
|
-
* Submission ID of the form submitted with this order.
|
|
691
|
-
* @format GUID
|
|
692
|
-
*/
|
|
693
|
-
submissionId?: string | null;
|
|
669
|
+
interface OrderPurchased {
|
|
670
|
+
/** Order that was paid for. If a free or an offline order, the order that was created. */
|
|
671
|
+
order?: Order;
|
|
694
672
|
}
|
|
695
|
-
interface
|
|
696
|
-
/**
|
|
697
|
-
|
|
698
|
-
* @format GUID
|
|
699
|
-
*/
|
|
700
|
-
memberId?: string;
|
|
701
|
-
/** Method by which checkout is initiated. */
|
|
702
|
-
orderMethod?: OrderMethodWithLiterals;
|
|
673
|
+
interface OrderStarted {
|
|
674
|
+
/** Order that reached its `startDate`. */
|
|
675
|
+
order?: Order;
|
|
703
676
|
}
|
|
704
|
-
|
|
705
|
-
|
|
677
|
+
/**
|
|
678
|
+
* Triggered at the start of a new payment cycle for an existing order.
|
|
679
|
+
*
|
|
680
|
+
* This webhook does not trigger at the initial start of an offline order.
|
|
681
|
+
*/
|
|
682
|
+
interface OrderCycleStarted {
|
|
683
|
+
/** Order whose new cycle started. */
|
|
706
684
|
order?: Order;
|
|
685
|
+
/** 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. */
|
|
686
|
+
cycleNumber?: number;
|
|
707
687
|
}
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
planId?: string;
|
|
688
|
+
/** Emitted when a recurring order is canceled for the next payment cycle */
|
|
689
|
+
interface OrderAutoRenewCanceled {
|
|
690
|
+
/** Order that is canceled, effective at the end of the current payment cycle. */
|
|
691
|
+
order?: Order;
|
|
713
692
|
}
|
|
714
|
-
interface
|
|
693
|
+
interface OrderEnded {
|
|
694
|
+
/** Order that ended. */
|
|
695
|
+
order?: Order;
|
|
696
|
+
}
|
|
697
|
+
interface GetOrderRequest {
|
|
715
698
|
/**
|
|
716
|
-
*
|
|
699
|
+
* Order ID.
|
|
717
700
|
* @format GUID
|
|
718
701
|
*/
|
|
719
|
-
|
|
702
|
+
_id: string;
|
|
720
703
|
/**
|
|
721
|
-
*
|
|
704
|
+
* Predefined set of fields to return.
|
|
722
705
|
*
|
|
723
|
-
* Default:
|
|
724
|
-
*/
|
|
725
|
-
startDate?: Date | null;
|
|
726
|
-
/**
|
|
727
|
-
* Coupon code to apply.
|
|
728
|
-
* @minLength 1
|
|
729
|
-
* @maxLength 20
|
|
730
|
-
*/
|
|
731
|
-
couponCode?: string | null;
|
|
732
|
-
/** Captcha data to prove you are not a robot */
|
|
733
|
-
captcha?: Captcha;
|
|
734
|
-
/** Visitor info */
|
|
735
|
-
guest?: Guest;
|
|
736
|
-
/**
|
|
737
|
-
* Form submission id that was submitted together with the order
|
|
738
|
-
* @format GUID
|
|
706
|
+
* Default: If `fieldSet` is omitted, no order form submission data is returned.
|
|
739
707
|
*/
|
|
740
|
-
|
|
741
|
-
}
|
|
742
|
-
interface Captcha {
|
|
743
|
-
/** Token from captcha */
|
|
744
|
-
token?: string;
|
|
708
|
+
fieldSet?: SetWithLiterals;
|
|
745
709
|
}
|
|
746
|
-
|
|
747
|
-
/**
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
710
|
+
declare enum Set {
|
|
711
|
+
/** Same behavior as `BASIC`.` */
|
|
712
|
+
UNKNOWN_SET = "UNKNOWN_SET",
|
|
713
|
+
/** Doesn't return any order form submission data. */
|
|
714
|
+
BASIC = "BASIC",
|
|
715
|
+
/** Returns all order form submission data. */
|
|
716
|
+
FULL = "FULL"
|
|
752
717
|
}
|
|
753
|
-
|
|
718
|
+
/** @enumType */
|
|
719
|
+
type SetWithLiterals = Set | 'UNKNOWN_SET' | 'BASIC' | 'FULL';
|
|
720
|
+
interface GetOrderResponse {
|
|
754
721
|
/** Order. */
|
|
755
722
|
order?: Order;
|
|
756
723
|
}
|
|
757
|
-
interface
|
|
724
|
+
interface ListOrdersRequest {
|
|
758
725
|
/**
|
|
759
|
-
*
|
|
726
|
+
* Filter by a buyer's member ID, from the Members API.
|
|
760
727
|
* @format GUID
|
|
761
728
|
*/
|
|
762
|
-
|
|
729
|
+
buyerIds?: string[];
|
|
763
730
|
/**
|
|
764
|
-
*
|
|
731
|
+
* Filter by plan IDs, from the Plans API.
|
|
765
732
|
* @format GUID
|
|
766
733
|
*/
|
|
767
|
-
|
|
734
|
+
planIds?: string[];
|
|
735
|
+
/** Filter by whether or not the auto-renewal of recurring orders was canceled. */
|
|
736
|
+
autoRenewCanceled?: boolean | null;
|
|
737
|
+
/** Filter by order status. */
|
|
738
|
+
orderStatuses?: OrderStatusWithLiterals[];
|
|
739
|
+
/** Filter by payment status. */
|
|
740
|
+
paymentStatuses?: PaymentStatusWithLiterals[];
|
|
768
741
|
/**
|
|
769
|
-
*
|
|
742
|
+
* Number of orders to return. See Sorting and Paging for more information.
|
|
770
743
|
*
|
|
771
|
-
*
|
|
744
|
+
* Max: `50`
|
|
745
|
+
* @min 1
|
|
746
|
+
* @max 50
|
|
772
747
|
*/
|
|
773
|
-
|
|
748
|
+
limit?: number | null;
|
|
749
|
+
/** Number of orders to skip in the current sort order. */
|
|
750
|
+
offset?: number | null;
|
|
774
751
|
/**
|
|
775
|
-
*
|
|
752
|
+
* Sort order.
|
|
776
753
|
*
|
|
777
|
-
*
|
|
754
|
+
* Use `ASC` for ascending order or `DESC` for descending order.
|
|
755
|
+
*
|
|
756
|
+
* Default: `DESC`.
|
|
778
757
|
*/
|
|
779
|
-
|
|
758
|
+
sorting?: Sorting;
|
|
780
759
|
/**
|
|
781
|
-
*
|
|
782
|
-
*
|
|
783
|
-
*
|
|
760
|
+
* Predefined set of fields to return.
|
|
761
|
+
*
|
|
762
|
+
* Default: If `fieldSet` is omitted, no order form submission data is returned.
|
|
784
763
|
*/
|
|
785
|
-
|
|
764
|
+
fieldSet?: SetWithLiterals;
|
|
786
765
|
/**
|
|
787
|
-
*
|
|
766
|
+
* Filter by order IDs.
|
|
767
|
+
* @internal
|
|
788
768
|
* @format GUID
|
|
769
|
+
* @maxSize 50
|
|
789
770
|
*/
|
|
790
|
-
|
|
791
|
-
}
|
|
792
|
-
interface CreateOfflineOrderResponse {
|
|
793
|
-
/** Order. */
|
|
794
|
-
order?: Order;
|
|
771
|
+
orderIds?: string[];
|
|
795
772
|
}
|
|
796
|
-
interface
|
|
773
|
+
interface Sorting {
|
|
797
774
|
/**
|
|
798
|
-
*
|
|
799
|
-
* @
|
|
775
|
+
* Name of the field to sort by.
|
|
776
|
+
* @maxLength 512
|
|
800
777
|
*/
|
|
801
|
-
|
|
778
|
+
fieldName?: string;
|
|
779
|
+
/** Sort order. */
|
|
780
|
+
order?: SortOrderWithLiterals;
|
|
802
781
|
/**
|
|
803
|
-
*
|
|
804
|
-
*
|
|
782
|
+
* When `field_name` is a property of repeated field that is marked as `MATCH_ITEMS` and sort should be done by
|
|
783
|
+
* a specific element from a collection, filter can/should be provided to ensure correct sort value is picked.
|
|
784
|
+
*
|
|
785
|
+
* If multiple filters are provided, they are combined with AND operator.
|
|
786
|
+
*
|
|
787
|
+
* Example:
|
|
788
|
+
* Given we have document like {"id": "1", "nestedField": [{"price": 10, "region": "EU"}, {"price": 20, "region": "US"}]}
|
|
789
|
+
* and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be
|
|
790
|
+
* { fieldName: "nestedField.price", "select_items_by": [{"nestedField.region": "US"}] }
|
|
791
|
+
* @internal
|
|
792
|
+
* @maxSize 10
|
|
805
793
|
*/
|
|
806
|
-
|
|
794
|
+
selectItemsBy?: Record<string, any>[] | null;
|
|
795
|
+
/**
|
|
796
|
+
* Origin point for geo-distance sorting on a GEO field
|
|
797
|
+
* results are ordered by distance from this point (ASC = nearest first, DESC = farthest first).
|
|
798
|
+
*/
|
|
799
|
+
origin?: AddressLocation;
|
|
807
800
|
}
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
801
|
+
declare enum SortOrder {
|
|
802
|
+
ASC = "ASC",
|
|
803
|
+
DESC = "DESC"
|
|
811
804
|
}
|
|
812
|
-
|
|
805
|
+
/** @enumType */
|
|
806
|
+
type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
|
|
807
|
+
interface AddressLocation {
|
|
808
|
+
/** Address latitude. */
|
|
809
|
+
latitude?: number | null;
|
|
810
|
+
/** Address longitude. */
|
|
811
|
+
longitude?: number | null;
|
|
812
|
+
}
|
|
813
|
+
interface ListOrdersResponse {
|
|
814
|
+
/** List of orders. */
|
|
815
|
+
orders?: Order[];
|
|
816
|
+
/** Object containing paging-related data (number of orders returned, offset). */
|
|
817
|
+
pagingMetadata?: PagingMetadataV2;
|
|
818
|
+
}
|
|
819
|
+
interface PagingMetadataV2 {
|
|
820
|
+
/** Number of items returned in the response. */
|
|
821
|
+
count?: number | null;
|
|
822
|
+
/** Offset that was requested. */
|
|
823
|
+
offset?: number | null;
|
|
824
|
+
/** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
|
|
825
|
+
total?: number | null;
|
|
826
|
+
/** Flag that indicates the server failed to calculate the `total` field. */
|
|
827
|
+
tooManyToCount?: boolean | null;
|
|
828
|
+
/** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
|
|
829
|
+
cursors?: Cursors;
|
|
813
830
|
/**
|
|
814
|
-
*
|
|
815
|
-
*
|
|
831
|
+
* Indicates if there are more results after the current page.
|
|
832
|
+
* If `true`, another page of results can be retrieved.
|
|
833
|
+
* If `false`, this is the last page.
|
|
834
|
+
* @internal
|
|
816
835
|
*/
|
|
817
|
-
|
|
836
|
+
hasNext?: boolean | null;
|
|
837
|
+
}
|
|
838
|
+
interface Cursors {
|
|
818
839
|
/**
|
|
819
|
-
*
|
|
820
|
-
*
|
|
821
|
-
* Default: Current date and time.
|
|
840
|
+
* Cursor string pointing to the next page in the list of results.
|
|
841
|
+
* @maxLength 16000
|
|
822
842
|
*/
|
|
823
|
-
|
|
843
|
+
next?: string | null;
|
|
824
844
|
/**
|
|
825
|
-
*
|
|
826
|
-
* @
|
|
827
|
-
* @maxLength 20
|
|
845
|
+
* Cursor pointing to the previous page in the list of results.
|
|
846
|
+
* @maxLength 16000
|
|
828
847
|
*/
|
|
829
|
-
|
|
848
|
+
prev?: string | null;
|
|
830
849
|
}
|
|
831
|
-
interface
|
|
832
|
-
/** Order preview. This field is undefined if the member has already reached the purchase limit for the order's plan. */
|
|
833
|
-
order?: Order;
|
|
834
|
-
/** Whether the member has already reached purchase limit for the order's plan. */
|
|
835
|
-
purchaseLimitExceeded?: boolean;
|
|
850
|
+
interface GetOrdersStatsRequest {
|
|
836
851
|
}
|
|
837
|
-
interface
|
|
852
|
+
interface GetOrdersStatsResponse {
|
|
853
|
+
/** Total number of orders. */
|
|
854
|
+
totalOrderCount?: number;
|
|
855
|
+
/** Number of active orders. */
|
|
856
|
+
activeOrderCount?: number;
|
|
857
|
+
}
|
|
858
|
+
interface GetAvailableOrderActionsRequest {
|
|
838
859
|
/**
|
|
839
|
-
*
|
|
860
|
+
* Order ID.
|
|
840
861
|
* @format GUID
|
|
841
862
|
*/
|
|
842
|
-
|
|
843
|
-
/**
|
|
844
|
-
* Start date for the ordered plan.
|
|
845
|
-
*
|
|
846
|
-
* Default: Current date
|
|
847
|
-
*/
|
|
848
|
-
startDate?: Date | null;
|
|
849
|
-
/**
|
|
850
|
-
* Coupon code to apply.
|
|
851
|
-
* @minLength 1
|
|
852
|
-
* @maxLength 20
|
|
853
|
-
*/
|
|
854
|
-
couponCode?: string | null;
|
|
855
|
-
/**
|
|
856
|
-
* Email for checkout
|
|
857
|
-
* @format EMAIL
|
|
858
|
-
*/
|
|
859
|
-
email?: string;
|
|
863
|
+
_id?: string;
|
|
860
864
|
}
|
|
861
|
-
interface
|
|
862
|
-
/**
|
|
863
|
-
|
|
864
|
-
/**
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
purchaseLimitExceeded?: boolean;
|
|
865
|
+
interface GetAvailableOrderActionsResponse {
|
|
866
|
+
/** Whether the order can be suspended. */
|
|
867
|
+
suspendable?: boolean;
|
|
868
|
+
/** If the order cannot be suspended, a reason is returned here. */
|
|
869
|
+
notSuspendableReason?: ReasonNotSuspendableWithLiterals;
|
|
870
|
+
/** Whether the order can be canceled by the buyer. */
|
|
871
|
+
cancelableByBuyer?: boolean;
|
|
869
872
|
}
|
|
870
|
-
|
|
871
|
-
/**
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
873
|
+
declare enum ReasonNotSuspendable {
|
|
874
|
+
/** Undefined reason. */
|
|
875
|
+
UNDEFINED = "UNDEFINED",
|
|
876
|
+
/** Saved in the database but is awaiting payment. Non-active orders can't be suspended. */
|
|
877
|
+
PENDING = "PENDING",
|
|
878
|
+
/** Trial orders can't be suspended. */
|
|
879
|
+
TRIAL = "TRIAL",
|
|
880
|
+
/** Canceled orders can't be suspended. */
|
|
881
|
+
CANCELED = "CANCELED",
|
|
882
|
+
/** Ended orders can't be suspended. */
|
|
883
|
+
ENDED = "ENDED",
|
|
884
|
+
/** Paid for orders with future start dates can't be suspended. */
|
|
885
|
+
NOT_STARTED = "NOT_STARTED",
|
|
886
|
+
/** Order is already suspended. */
|
|
887
|
+
ALREADY_SUSPENDED = "ALREADY_SUSPENDED",
|
|
888
|
+
/** Orders based on recurring payments using older stripe versions can't be suspended. */
|
|
889
|
+
OLD_STRIPE = "OLD_STRIPE"
|
|
890
|
+
}
|
|
891
|
+
/** @enumType */
|
|
892
|
+
type ReasonNotSuspendableWithLiterals = ReasonNotSuspendable | 'UNDEFINED' | 'PENDING' | 'TRIAL' | 'CANCELED' | 'ENDED' | 'NOT_STARTED' | 'ALREADY_SUSPENDED' | 'OLD_STRIPE';
|
|
893
|
+
interface PostponeEndDateRequest {
|
|
876
894
|
/**
|
|
877
|
-
*
|
|
895
|
+
* Order ID.
|
|
878
896
|
* @format GUID
|
|
879
897
|
*/
|
|
880
|
-
|
|
898
|
+
_id: string;
|
|
881
899
|
/**
|
|
882
|
-
*
|
|
900
|
+
* New end date and time.
|
|
883
901
|
*
|
|
884
|
-
*
|
|
885
|
-
*/
|
|
886
|
-
startDate?: Date | null;
|
|
887
|
-
/**
|
|
888
|
-
* Coupon code to apply, from the Coupons API.
|
|
889
|
-
* @minLength 1
|
|
890
|
-
* @maxLength 20
|
|
902
|
+
* Must be later than the current end date and time.
|
|
891
903
|
*/
|
|
892
|
-
|
|
904
|
+
endDate: Date | null;
|
|
893
905
|
}
|
|
894
|
-
interface
|
|
895
|
-
|
|
906
|
+
interface PostponeEndDateResponse {
|
|
907
|
+
}
|
|
908
|
+
interface OrderEndDatePostponed {
|
|
909
|
+
/** Order whose `endDate` was postponed. */
|
|
896
910
|
order?: Order;
|
|
897
|
-
/**
|
|
898
|
-
* Whether this previewed order would exceed the permitted amount of purchases available
|
|
899
|
-
* for this plan for this buyer.
|
|
900
|
-
*
|
|
901
|
-
* Always `false` for plans that do not have purchase limits.
|
|
902
|
-
*/
|
|
903
|
-
purchaseLimitExceeded?: boolean;
|
|
904
911
|
}
|
|
905
|
-
interface
|
|
912
|
+
interface CancelOrderRequest {
|
|
906
913
|
/**
|
|
907
|
-
* ID
|
|
914
|
+
* Order ID.
|
|
908
915
|
* @format GUID
|
|
909
916
|
*/
|
|
910
|
-
|
|
911
|
-
/**
|
|
912
|
-
|
|
913
|
-
* @minLength 1
|
|
914
|
-
* @maxLength 20
|
|
915
|
-
*/
|
|
916
|
-
couponCode?: string | null;
|
|
917
|
+
_id: string;
|
|
918
|
+
/** __Required.__ When the order will be canceled. One-time orders can only be canceled `IMMEDIATELY`. */
|
|
919
|
+
effectiveAt: CancellationEffectiveAtWithLiterals;
|
|
917
920
|
}
|
|
918
|
-
interface
|
|
919
|
-
/**
|
|
920
|
-
* @internal
|
|
921
|
-
* @internal
|
|
922
|
-
* @deprecated __Deprecated.__ Use `prices` instead. This property will be removed on September 30, 2022.
|
|
923
|
-
* @replacedBy prices
|
|
924
|
-
* @targetRemovalDate 2022-10-01
|
|
925
|
-
*/
|
|
926
|
-
price?: PriceDetails;
|
|
927
|
-
/** Pricing details. */
|
|
928
|
-
prices?: SpannedPrice[];
|
|
921
|
+
interface CancelOrderResponse {
|
|
929
922
|
}
|
|
930
|
-
|
|
923
|
+
/**
|
|
924
|
+
* Emitted when an order is canceled immediately or when cycle ends for an order with canceled auto renewal
|
|
925
|
+
*
|
|
926
|
+
* To determine the specific reason of the cancellation check `order.cancellation.cause` field.
|
|
927
|
+
*/
|
|
928
|
+
interface OrderCanceled {
|
|
929
|
+
/** Canceled order. */
|
|
930
|
+
order?: Order;
|
|
931
|
+
}
|
|
932
|
+
interface MarkAsPaidRequest {
|
|
931
933
|
/**
|
|
932
|
-
*
|
|
934
|
+
* Order ID.
|
|
933
935
|
* @format GUID
|
|
934
936
|
*/
|
|
935
|
-
|
|
936
|
-
/** New valid from date (timestamp). */
|
|
937
|
-
startDate?: Date | null;
|
|
937
|
+
_id: string;
|
|
938
938
|
}
|
|
939
|
-
interface
|
|
940
|
-
/** Updated draft order. */
|
|
941
|
-
order?: Order;
|
|
939
|
+
interface MarkAsPaidResponse {
|
|
942
940
|
}
|
|
943
|
-
interface
|
|
944
|
-
/** Order
|
|
941
|
+
interface OrderMarkedAsPaid {
|
|
942
|
+
/** Order that was marked as paid. */
|
|
945
943
|
order?: Order;
|
|
946
944
|
}
|
|
947
|
-
interface
|
|
945
|
+
interface PauseOrderRequest {
|
|
948
946
|
/**
|
|
949
|
-
*
|
|
947
|
+
* Order ID.
|
|
950
948
|
* @format GUID
|
|
951
949
|
*/
|
|
952
|
-
|
|
950
|
+
_id: string;
|
|
951
|
+
}
|
|
952
|
+
interface PauseOrderResponse {
|
|
953
|
+
}
|
|
954
|
+
interface OrderPaused {
|
|
955
|
+
/** Paused order. */
|
|
956
|
+
order?: Order;
|
|
957
|
+
}
|
|
958
|
+
interface BulkPauseOrderRequest {
|
|
953
959
|
/**
|
|
954
|
-
*
|
|
955
|
-
* @
|
|
956
|
-
* @
|
|
960
|
+
* List of Order IDs.
|
|
961
|
+
* @format GUID
|
|
962
|
+
* @minSize 1
|
|
963
|
+
* @maxSize 100
|
|
957
964
|
*/
|
|
958
|
-
|
|
965
|
+
ids?: string[];
|
|
966
|
+
/** Set to true to return Order entity in response. */
|
|
967
|
+
returnFullEntity?: boolean;
|
|
959
968
|
}
|
|
960
|
-
interface
|
|
961
|
-
/**
|
|
969
|
+
interface BulkPauseOrderResponse {
|
|
970
|
+
/** Orders that were paused. */
|
|
971
|
+
results?: BulkOrderResult[];
|
|
972
|
+
/** Bulk action metadata. */
|
|
973
|
+
bulkActionMetadata?: BulkActionMetadata;
|
|
974
|
+
}
|
|
975
|
+
interface BulkOrderResult {
|
|
976
|
+
/** Item metadata */
|
|
977
|
+
itemMetadata?: ItemMetadata;
|
|
978
|
+
/** The order. */
|
|
962
979
|
order?: Order;
|
|
963
980
|
}
|
|
964
|
-
interface
|
|
981
|
+
interface ItemMetadata {
|
|
982
|
+
/** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
|
|
983
|
+
_id?: string | null;
|
|
984
|
+
/** Index of the item within the request array. Allows for correlation between request and response items. */
|
|
985
|
+
originalIndex?: number;
|
|
986
|
+
/** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
|
|
987
|
+
success?: boolean;
|
|
988
|
+
/** Details about the error in case of failure. */
|
|
989
|
+
error?: ApplicationError;
|
|
990
|
+
}
|
|
991
|
+
interface ApplicationError {
|
|
992
|
+
/** Error code. */
|
|
993
|
+
code?: string;
|
|
994
|
+
/** Description of the error. */
|
|
995
|
+
description?: string;
|
|
996
|
+
/** Data related to the error. */
|
|
997
|
+
data?: Record<string, any> | null;
|
|
998
|
+
}
|
|
999
|
+
interface BulkActionMetadata {
|
|
1000
|
+
/** Number of items that were successfully processed. */
|
|
1001
|
+
totalSuccesses?: number;
|
|
1002
|
+
/** Number of items that couldn't be processed. */
|
|
1003
|
+
totalFailures?: number;
|
|
1004
|
+
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
1005
|
+
undetailedFailures?: number;
|
|
1006
|
+
}
|
|
1007
|
+
interface ResumeOrderRequest {
|
|
965
1008
|
/**
|
|
966
1009
|
* Order ID.
|
|
967
1010
|
* @format GUID
|
|
968
1011
|
*/
|
|
969
|
-
|
|
1012
|
+
_id: string;
|
|
1013
|
+
}
|
|
1014
|
+
interface ResumeOrderResponse {
|
|
1015
|
+
}
|
|
1016
|
+
interface OrderResumed {
|
|
1017
|
+
/** Resumed order. */
|
|
1018
|
+
order?: Order;
|
|
1019
|
+
}
|
|
1020
|
+
interface BulkResumeOrderRequest {
|
|
970
1021
|
/**
|
|
971
|
-
*
|
|
1022
|
+
* List of Order IDs.
|
|
972
1023
|
* @format GUID
|
|
1024
|
+
* @minSize 1
|
|
1025
|
+
* @maxSize 100
|
|
973
1026
|
*/
|
|
974
|
-
|
|
1027
|
+
ids?: string[];
|
|
1028
|
+
/** Set to true to return Order entity in response. */
|
|
1029
|
+
returnFullEntity?: boolean;
|
|
975
1030
|
}
|
|
976
|
-
interface
|
|
977
|
-
/**
|
|
978
|
-
|
|
1031
|
+
interface BulkResumeOrderResponse {
|
|
1032
|
+
/** Orders that were resumed. */
|
|
1033
|
+
results?: BulkOrderResult[];
|
|
1034
|
+
/** Bulk action metadata. */
|
|
1035
|
+
bulkActionMetadata?: BulkActionMetadata;
|
|
979
1036
|
}
|
|
980
1037
|
interface MessageEnvelope {
|
|
981
1038
|
/**
|
|
@@ -1068,373 +1125,316 @@ interface AccountInfo {
|
|
|
1068
1125
|
*/
|
|
1069
1126
|
siteId?: string | null;
|
|
1070
1127
|
}
|
|
1071
|
-
interface
|
|
1072
|
-
/**
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1128
|
+
interface CreateOnlineOrderRequest {
|
|
1129
|
+
/**
|
|
1130
|
+
* Plan ID.
|
|
1131
|
+
* @format GUID
|
|
1132
|
+
*/
|
|
1133
|
+
planId: string;
|
|
1134
|
+
/**
|
|
1135
|
+
* Start date and time for the plan of the online order in a `YYYY-MM-DDThh:mm[:ss][.sss]Z` format.
|
|
1136
|
+
*
|
|
1137
|
+
* Default: Current date and time.
|
|
1138
|
+
*/
|
|
1139
|
+
startDate?: Date | null;
|
|
1140
|
+
/**
|
|
1141
|
+
* Coupon code to apply.
|
|
1142
|
+
* @minLength 1
|
|
1143
|
+
* @maxLength 20
|
|
1144
|
+
*/
|
|
1145
|
+
couponCode?: string | null;
|
|
1146
|
+
/** Provided if checkout is initiated on buyer's behalf. */
|
|
1147
|
+
onBehalf?: OnBehalf;
|
|
1148
|
+
/**
|
|
1149
|
+
* Submission ID of the form submitted with this order.
|
|
1150
|
+
* @format GUID
|
|
1151
|
+
*/
|
|
1152
|
+
submissionId?: string | null;
|
|
1089
1153
|
}
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1154
|
+
interface OnBehalf {
|
|
1155
|
+
/**
|
|
1156
|
+
* Member ID.
|
|
1157
|
+
* @format GUID
|
|
1158
|
+
*/
|
|
1159
|
+
memberId?: string;
|
|
1160
|
+
/** Method by which checkout is initiated. */
|
|
1161
|
+
orderMethod?: OrderMethodWithLiterals;
|
|
1094
1162
|
}
|
|
1095
|
-
interface
|
|
1096
|
-
/**
|
|
1163
|
+
interface CreateOnlineOrderResponse {
|
|
1164
|
+
/** Created online order. */
|
|
1097
1165
|
order?: Order;
|
|
1098
1166
|
}
|
|
1099
|
-
interface
|
|
1167
|
+
interface CouponsError {
|
|
1168
|
+
/** Coupon code. */
|
|
1169
|
+
couponCode?: string;
|
|
1170
|
+
/** Plan ID. */
|
|
1171
|
+
planId?: string;
|
|
1172
|
+
}
|
|
1173
|
+
interface CreateGuestOnlineOrderRequest {
|
|
1100
1174
|
/**
|
|
1101
|
-
*
|
|
1175
|
+
* Plan ID.
|
|
1102
1176
|
* @format GUID
|
|
1103
1177
|
*/
|
|
1104
|
-
|
|
1178
|
+
planId?: string;
|
|
1105
1179
|
/**
|
|
1106
|
-
*
|
|
1180
|
+
* Start date for the ordered plan.
|
|
1107
1181
|
*
|
|
1108
|
-
* Default:
|
|
1182
|
+
* Default: Current date
|
|
1109
1183
|
*/
|
|
1110
|
-
|
|
1184
|
+
startDate?: Date | null;
|
|
1185
|
+
/**
|
|
1186
|
+
* Coupon code to apply.
|
|
1187
|
+
* @minLength 1
|
|
1188
|
+
* @maxLength 20
|
|
1189
|
+
*/
|
|
1190
|
+
couponCode?: string | null;
|
|
1191
|
+
/** Captcha data to prove you are not a robot */
|
|
1192
|
+
captcha?: Captcha;
|
|
1193
|
+
/** Visitor info */
|
|
1194
|
+
guest?: Guest;
|
|
1195
|
+
/**
|
|
1196
|
+
* Form submission id that was submitted together with the order
|
|
1197
|
+
* @format GUID
|
|
1198
|
+
*/
|
|
1199
|
+
submissionId?: string | null;
|
|
1111
1200
|
}
|
|
1112
|
-
|
|
1113
|
-
/**
|
|
1114
|
-
|
|
1115
|
-
/** Doesn't return any order form submission data. */
|
|
1116
|
-
BASIC = "BASIC",
|
|
1117
|
-
/** Returns all order form submission data. */
|
|
1118
|
-
FULL = "FULL"
|
|
1201
|
+
interface Captcha {
|
|
1202
|
+
/** Token from captcha */
|
|
1203
|
+
token?: string;
|
|
1119
1204
|
}
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1205
|
+
interface Guest {
|
|
1206
|
+
/**
|
|
1207
|
+
* Email for checkout
|
|
1208
|
+
* @format EMAIL
|
|
1209
|
+
*/
|
|
1210
|
+
email?: string;
|
|
1211
|
+
}
|
|
1212
|
+
interface CreateGuestOnlineOrderResponse {
|
|
1123
1213
|
/** Order. */
|
|
1124
1214
|
order?: Order;
|
|
1125
1215
|
}
|
|
1126
|
-
interface
|
|
1216
|
+
interface CreateOfflineOrderRequest {
|
|
1127
1217
|
/**
|
|
1128
|
-
*
|
|
1218
|
+
* ID of the plan being ordered, from the Plans API.
|
|
1129
1219
|
* @format GUID
|
|
1130
1220
|
*/
|
|
1131
|
-
|
|
1221
|
+
planId: string;
|
|
1132
1222
|
/**
|
|
1133
|
-
*
|
|
1223
|
+
* ID of the member ordering the plan, from the Members API.
|
|
1134
1224
|
* @format GUID
|
|
1135
1225
|
*/
|
|
1136
|
-
|
|
1137
|
-
/** Filter by whether or not the auto-renewal of recurring orders was canceled. */
|
|
1138
|
-
autoRenewCanceled?: boolean | null;
|
|
1139
|
-
/** Filter by order status. */
|
|
1140
|
-
orderStatuses?: OrderStatusWithLiterals[];
|
|
1141
|
-
/** Filter by payment status. */
|
|
1142
|
-
paymentStatuses?: PaymentStatusWithLiterals[];
|
|
1226
|
+
memberId: string;
|
|
1143
1227
|
/**
|
|
1144
|
-
*
|
|
1228
|
+
* Start date and time for the ordered plan in a `YYYY-MM-DDThh:mm[:ss][.sss]Z` format.
|
|
1145
1229
|
*
|
|
1146
|
-
*
|
|
1147
|
-
* @min 1
|
|
1148
|
-
* @max 50
|
|
1230
|
+
* Default: Current date and time.
|
|
1149
1231
|
*/
|
|
1150
|
-
|
|
1151
|
-
/** Number of orders to skip in the current sort order. */
|
|
1152
|
-
offset?: number | null;
|
|
1232
|
+
startDate?: Date | null;
|
|
1153
1233
|
/**
|
|
1154
|
-
*
|
|
1155
|
-
*
|
|
1156
|
-
* Use `ASC` for ascending order or `DESC` for descending order.
|
|
1234
|
+
* Whether the order is paid.
|
|
1157
1235
|
*
|
|
1158
|
-
* Default: `
|
|
1236
|
+
* Default: `false`
|
|
1159
1237
|
*/
|
|
1160
|
-
|
|
1238
|
+
paid?: boolean | null;
|
|
1161
1239
|
/**
|
|
1162
|
-
*
|
|
1163
|
-
*
|
|
1164
|
-
*
|
|
1240
|
+
* Coupon code to apply, from the Coupons API.
|
|
1241
|
+
* @minLength 1
|
|
1242
|
+
* @maxLength 20
|
|
1165
1243
|
*/
|
|
1166
|
-
|
|
1244
|
+
couponCode?: string | null;
|
|
1167
1245
|
/**
|
|
1168
|
-
*
|
|
1169
|
-
* @internal
|
|
1246
|
+
* Form submission ID that was submitted with the order.
|
|
1170
1247
|
* @format GUID
|
|
1171
|
-
* @maxSize 50
|
|
1172
1248
|
*/
|
|
1173
|
-
|
|
1249
|
+
submissionId?: string | null;
|
|
1174
1250
|
}
|
|
1175
|
-
interface
|
|
1176
|
-
/**
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
fieldName?: string;
|
|
1181
|
-
/** Sort order. */
|
|
1182
|
-
order?: SortOrderWithLiterals;
|
|
1251
|
+
interface CreateOfflineOrderResponse {
|
|
1252
|
+
/** Order. */
|
|
1253
|
+
order?: Order;
|
|
1254
|
+
}
|
|
1255
|
+
interface CreateExternalOrderRequest {
|
|
1183
1256
|
/**
|
|
1184
|
-
*
|
|
1185
|
-
*
|
|
1186
|
-
*
|
|
1187
|
-
* If multiple filters are provided, they are combined with AND operator.
|
|
1188
|
-
*
|
|
1189
|
-
* Example:
|
|
1190
|
-
* Given we have document like {"id": "1", "nestedField": [{"price": 10, "region": "EU"}, {"price": 20, "region": "US"}]}
|
|
1191
|
-
* and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be
|
|
1192
|
-
* { fieldName: "nestedField.price", "select_items_by": [{"nestedField.region": "US"}] }
|
|
1193
|
-
* @internal
|
|
1194
|
-
* @maxSize 10
|
|
1257
|
+
* Plan ID.
|
|
1258
|
+
* @format GUID
|
|
1195
1259
|
*/
|
|
1196
|
-
|
|
1260
|
+
planId?: string;
|
|
1197
1261
|
/**
|
|
1198
|
-
*
|
|
1199
|
-
*
|
|
1262
|
+
* Form submission id that was submitted together with the order
|
|
1263
|
+
* @format GUID
|
|
1200
1264
|
*/
|
|
1201
|
-
|
|
1202
|
-
}
|
|
1203
|
-
declare enum SortOrder {
|
|
1204
|
-
ASC = "ASC",
|
|
1205
|
-
DESC = "DESC"
|
|
1206
|
-
}
|
|
1207
|
-
/** @enumType */
|
|
1208
|
-
type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
|
|
1209
|
-
interface AddressLocation {
|
|
1210
|
-
/** Address latitude. */
|
|
1211
|
-
latitude?: number | null;
|
|
1212
|
-
/** Address longitude. */
|
|
1213
|
-
longitude?: number | null;
|
|
1265
|
+
submissionId?: string | null;
|
|
1214
1266
|
}
|
|
1215
|
-
interface
|
|
1216
|
-
/**
|
|
1217
|
-
|
|
1218
|
-
/** Object containing paging-related data (number of orders returned, offset). */
|
|
1219
|
-
pagingMetadata?: PagingMetadataV2;
|
|
1267
|
+
interface CreateExternalOrderResponse {
|
|
1268
|
+
/** Created order */
|
|
1269
|
+
order?: Order;
|
|
1220
1270
|
}
|
|
1221
|
-
interface
|
|
1222
|
-
/** Number of items returned in the response. */
|
|
1223
|
-
count?: number | null;
|
|
1224
|
-
/** Offset that was requested. */
|
|
1225
|
-
offset?: number | null;
|
|
1226
|
-
/** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
|
|
1227
|
-
total?: number | null;
|
|
1228
|
-
/** Flag that indicates the server failed to calculate the `total` field. */
|
|
1229
|
-
tooManyToCount?: boolean | null;
|
|
1230
|
-
/** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
|
|
1231
|
-
cursors?: Cursors;
|
|
1271
|
+
interface GetOnlineOrderPreviewRequest {
|
|
1232
1272
|
/**
|
|
1233
|
-
*
|
|
1234
|
-
*
|
|
1235
|
-
* If `false`, this is the last page.
|
|
1236
|
-
* @internal
|
|
1273
|
+
* Plan ID.
|
|
1274
|
+
* @format GUID
|
|
1237
1275
|
*/
|
|
1238
|
-
|
|
1239
|
-
}
|
|
1240
|
-
interface Cursors {
|
|
1276
|
+
planId: string;
|
|
1241
1277
|
/**
|
|
1242
|
-
*
|
|
1243
|
-
*
|
|
1278
|
+
* Start date and time for the plan of the order preview in a `YYYY-MM-DDThh:mm[:ss][.sss]Z` format.
|
|
1279
|
+
*
|
|
1280
|
+
* Default: Current date and time.
|
|
1244
1281
|
*/
|
|
1245
|
-
|
|
1282
|
+
startDate?: Date | null;
|
|
1246
1283
|
/**
|
|
1247
|
-
*
|
|
1248
|
-
* @
|
|
1284
|
+
* Coupon code to apply.
|
|
1285
|
+
* @minLength 1
|
|
1286
|
+
* @maxLength 20
|
|
1249
1287
|
*/
|
|
1250
|
-
|
|
1251
|
-
}
|
|
1252
|
-
interface GetOrdersStatsRequest {
|
|
1288
|
+
couponCode?: string | null;
|
|
1253
1289
|
}
|
|
1254
|
-
interface
|
|
1255
|
-
/**
|
|
1256
|
-
|
|
1257
|
-
/**
|
|
1258
|
-
|
|
1290
|
+
interface GetOnlineOrderPreviewResponse {
|
|
1291
|
+
/** Order preview. This field is undefined if the member has already reached the purchase limit for the order's plan. */
|
|
1292
|
+
order?: Order;
|
|
1293
|
+
/** Whether the member has already reached purchase limit for the order's plan. */
|
|
1294
|
+
purchaseLimitExceeded?: boolean;
|
|
1259
1295
|
}
|
|
1260
|
-
interface
|
|
1296
|
+
interface GetGuestOnlineOrderPreviewRequest {
|
|
1261
1297
|
/**
|
|
1262
|
-
*
|
|
1298
|
+
* Plan ID.
|
|
1263
1299
|
* @format GUID
|
|
1264
1300
|
*/
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
/**
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
/**
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
CANCELED = "CANCELED",
|
|
1284
|
-
/** Ended orders can't be suspended. */
|
|
1285
|
-
ENDED = "ENDED",
|
|
1286
|
-
/** Paid for orders with future start dates can't be suspended. */
|
|
1287
|
-
NOT_STARTED = "NOT_STARTED",
|
|
1288
|
-
/** Order is already suspended. */
|
|
1289
|
-
ALREADY_SUSPENDED = "ALREADY_SUSPENDED",
|
|
1290
|
-
/** Orders based on recurring payments using older stripe versions can't be suspended. */
|
|
1291
|
-
OLD_STRIPE = "OLD_STRIPE"
|
|
1301
|
+
planId?: string;
|
|
1302
|
+
/**
|
|
1303
|
+
* Start date for the ordered plan.
|
|
1304
|
+
*
|
|
1305
|
+
* Default: Current date
|
|
1306
|
+
*/
|
|
1307
|
+
startDate?: Date | null;
|
|
1308
|
+
/**
|
|
1309
|
+
* Coupon code to apply.
|
|
1310
|
+
* @minLength 1
|
|
1311
|
+
* @maxLength 20
|
|
1312
|
+
*/
|
|
1313
|
+
couponCode?: string | null;
|
|
1314
|
+
/**
|
|
1315
|
+
* Email for checkout
|
|
1316
|
+
* @format EMAIL
|
|
1317
|
+
*/
|
|
1318
|
+
email?: string;
|
|
1292
1319
|
}
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1320
|
+
interface GetGuestOnlineOrderPreviewResponse {
|
|
1321
|
+
/** Will be missing if limit is exceeded */
|
|
1322
|
+
order?: Order;
|
|
1323
|
+
/**
|
|
1324
|
+
* Whether the purchase limit has already been reached for this plan by this email.
|
|
1325
|
+
* Always false for plans without purchase limits.
|
|
1326
|
+
*/
|
|
1327
|
+
purchaseLimitExceeded?: boolean;
|
|
1328
|
+
}
|
|
1329
|
+
interface GetOfflineOrderPreviewRequest {
|
|
1296
1330
|
/**
|
|
1297
|
-
*
|
|
1331
|
+
* ID of the plan of the previewed order, from the Plans API.
|
|
1298
1332
|
* @format GUID
|
|
1299
1333
|
*/
|
|
1300
|
-
|
|
1334
|
+
planId: string;
|
|
1301
1335
|
/**
|
|
1302
|
-
*
|
|
1336
|
+
* Member ID of the buyer the previewed order is for, from the Members API.
|
|
1337
|
+
* @format GUID
|
|
1338
|
+
*/
|
|
1339
|
+
memberId: string;
|
|
1340
|
+
/**
|
|
1341
|
+
* Start date and time for plan of the previewed order in a `YYYY-MM-DDThh:mm[:ss][.sss]Z` format.
|
|
1303
1342
|
*
|
|
1304
|
-
*
|
|
1343
|
+
* Default: Current date and time.
|
|
1305
1344
|
*/
|
|
1306
|
-
|
|
1307
|
-
}
|
|
1308
|
-
interface PostponeEndDateResponse {
|
|
1309
|
-
}
|
|
1310
|
-
interface OrderEndDatePostponed {
|
|
1311
|
-
/** Order whose `endDate` was postponed. */
|
|
1312
|
-
order?: Order;
|
|
1313
|
-
}
|
|
1314
|
-
interface CancelOrderRequest {
|
|
1345
|
+
startDate?: Date | null;
|
|
1315
1346
|
/**
|
|
1316
|
-
*
|
|
1317
|
-
* @
|
|
1347
|
+
* Coupon code to apply, from the Coupons API.
|
|
1348
|
+
* @minLength 1
|
|
1349
|
+
* @maxLength 20
|
|
1318
1350
|
*/
|
|
1319
|
-
|
|
1320
|
-
/** __Required.__ When the order will be canceled. One-time orders can only be canceled `IMMEDIATELY`. */
|
|
1321
|
-
effectiveAt: CancellationEffectiveAtWithLiterals;
|
|
1322
|
-
}
|
|
1323
|
-
interface CancelOrderResponse {
|
|
1351
|
+
couponCode?: string | null;
|
|
1324
1352
|
}
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
*
|
|
1328
|
-
* To determine the specific reason of the cancellation check `order.cancellation.cause` field.
|
|
1329
|
-
*/
|
|
1330
|
-
interface OrderCanceled {
|
|
1331
|
-
/** Canceled order. */
|
|
1353
|
+
interface GetOfflineOrderPreviewResponse {
|
|
1354
|
+
/** The previewed order, as if the plan had been ordered. */
|
|
1332
1355
|
order?: Order;
|
|
1356
|
+
/**
|
|
1357
|
+
* Whether this previewed order would exceed the permitted amount of purchases available
|
|
1358
|
+
* for this plan for this buyer.
|
|
1359
|
+
*
|
|
1360
|
+
* Always `false` for plans that do not have purchase limits.
|
|
1361
|
+
*/
|
|
1362
|
+
purchaseLimitExceeded?: boolean;
|
|
1333
1363
|
}
|
|
1334
|
-
interface
|
|
1364
|
+
interface GetPricePreviewRequest {
|
|
1335
1365
|
/**
|
|
1336
|
-
*
|
|
1366
|
+
* ID of plan to preview.
|
|
1337
1367
|
* @format GUID
|
|
1338
1368
|
*/
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1369
|
+
planId: string;
|
|
1370
|
+
/**
|
|
1371
|
+
* Coupon code to apply, from the Coupons API.
|
|
1372
|
+
* @minLength 1
|
|
1373
|
+
* @maxLength 20
|
|
1374
|
+
*/
|
|
1375
|
+
couponCode?: string | null;
|
|
1342
1376
|
}
|
|
1343
|
-
interface
|
|
1344
|
-
/**
|
|
1345
|
-
|
|
1377
|
+
interface GetPricePreviewResponse {
|
|
1378
|
+
/**
|
|
1379
|
+
* @internal
|
|
1380
|
+
* @internal
|
|
1381
|
+
* @deprecated __Deprecated.__ Use `prices` instead. This property will be removed on September 30, 2022.
|
|
1382
|
+
* @replacedBy prices
|
|
1383
|
+
* @targetRemovalDate 2022-10-01
|
|
1384
|
+
*/
|
|
1385
|
+
price?: PriceDetails;
|
|
1386
|
+
/** Pricing details. */
|
|
1387
|
+
prices?: SpannedPrice[];
|
|
1346
1388
|
}
|
|
1347
|
-
interface
|
|
1389
|
+
interface ChangeStartDateRequest {
|
|
1348
1390
|
/**
|
|
1349
|
-
*
|
|
1391
|
+
* Draft order ID.
|
|
1350
1392
|
* @format GUID
|
|
1351
1393
|
*/
|
|
1352
|
-
|
|
1394
|
+
orderId?: string;
|
|
1395
|
+
/** New valid from date (timestamp). */
|
|
1396
|
+
startDate?: Date | null;
|
|
1353
1397
|
}
|
|
1354
|
-
interface
|
|
1398
|
+
interface ChangeStartDateResponse {
|
|
1399
|
+
/** Updated draft order. */
|
|
1400
|
+
order?: Order;
|
|
1355
1401
|
}
|
|
1356
|
-
interface
|
|
1357
|
-
/**
|
|
1402
|
+
interface OrderStartDateChanged {
|
|
1403
|
+
/** Order whose `startDate` changed. */
|
|
1358
1404
|
order?: Order;
|
|
1359
1405
|
}
|
|
1360
|
-
interface
|
|
1406
|
+
interface ApplyCouponRequest {
|
|
1361
1407
|
/**
|
|
1362
|
-
*
|
|
1408
|
+
* Draft order ID.
|
|
1363
1409
|
* @format GUID
|
|
1364
|
-
* @minSize 1
|
|
1365
|
-
* @maxSize 100
|
|
1366
1410
|
*/
|
|
1367
|
-
|
|
1368
|
-
/**
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
/** Bulk action metadata. */
|
|
1375
|
-
bulkActionMetadata?: BulkActionMetadata;
|
|
1411
|
+
orderId?: string;
|
|
1412
|
+
/**
|
|
1413
|
+
* Coupon code to apply.
|
|
1414
|
+
* @minLength 1
|
|
1415
|
+
* @maxLength 20
|
|
1416
|
+
*/
|
|
1417
|
+
couponCode?: string;
|
|
1376
1418
|
}
|
|
1377
|
-
interface
|
|
1378
|
-
/**
|
|
1379
|
-
itemMetadata?: ItemMetadata;
|
|
1380
|
-
/** The order. */
|
|
1419
|
+
interface ApplyCouponResponse {
|
|
1420
|
+
/** Order with applied coupon and recalculated tax. */
|
|
1381
1421
|
order?: Order;
|
|
1382
1422
|
}
|
|
1383
|
-
interface
|
|
1384
|
-
/** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
|
|
1385
|
-
_id?: string | null;
|
|
1386
|
-
/** Index of the item within the request array. Allows for correlation between request and response items. */
|
|
1387
|
-
originalIndex?: number;
|
|
1388
|
-
/** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
|
|
1389
|
-
success?: boolean;
|
|
1390
|
-
/** Details about the error in case of failure. */
|
|
1391
|
-
error?: ApplicationError;
|
|
1392
|
-
}
|
|
1393
|
-
interface ApplicationError {
|
|
1394
|
-
/** Error code. */
|
|
1395
|
-
code?: string;
|
|
1396
|
-
/** Description of the error. */
|
|
1397
|
-
description?: string;
|
|
1398
|
-
/** Data related to the error. */
|
|
1399
|
-
data?: Record<string, any> | null;
|
|
1400
|
-
}
|
|
1401
|
-
interface BulkActionMetadata {
|
|
1402
|
-
/** Number of items that were successfully processed. */
|
|
1403
|
-
totalSuccesses?: number;
|
|
1404
|
-
/** Number of items that couldn't be processed. */
|
|
1405
|
-
totalFailures?: number;
|
|
1406
|
-
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
1407
|
-
undetailedFailures?: number;
|
|
1408
|
-
}
|
|
1409
|
-
interface ResumeOrderRequest {
|
|
1423
|
+
interface SetSubmissionRequest {
|
|
1410
1424
|
/**
|
|
1411
1425
|
* Order ID.
|
|
1412
1426
|
* @format GUID
|
|
1413
1427
|
*/
|
|
1414
|
-
|
|
1415
|
-
}
|
|
1416
|
-
interface ResumeOrderResponse {
|
|
1417
|
-
}
|
|
1418
|
-
interface OrderResumed {
|
|
1419
|
-
/** Resumed order. */
|
|
1420
|
-
order?: Order;
|
|
1421
|
-
}
|
|
1422
|
-
interface BulkResumeOrderRequest {
|
|
1428
|
+
orderId?: string;
|
|
1423
1429
|
/**
|
|
1424
|
-
*
|
|
1430
|
+
* Submission ID.
|
|
1425
1431
|
* @format GUID
|
|
1426
|
-
* @minSize 1
|
|
1427
|
-
* @maxSize 100
|
|
1428
1432
|
*/
|
|
1429
|
-
|
|
1430
|
-
/** Set to true to return Order entity in response. */
|
|
1431
|
-
returnFullEntity?: boolean;
|
|
1433
|
+
submissionId?: string;
|
|
1432
1434
|
}
|
|
1433
|
-
interface
|
|
1434
|
-
/**
|
|
1435
|
-
|
|
1436
|
-
/** Bulk action metadata. */
|
|
1437
|
-
bulkActionMetadata?: BulkActionMetadata;
|
|
1435
|
+
interface SetSubmissionResponse {
|
|
1436
|
+
/** Order with submission id */
|
|
1437
|
+
order?: Order;
|
|
1438
1438
|
}
|
|
1439
1439
|
interface MemberGetOrderRequest {
|
|
1440
1440
|
/**
|
|
@@ -1849,84 +1849,7 @@ interface AccountInfoMetadata {
|
|
|
1849
1849
|
siteId?: string;
|
|
1850
1850
|
/** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */
|
|
1851
1851
|
parentAccountId?: string;
|
|
1852
|
-
}
|
|
1853
|
-
interface OrderCreatedEnvelope {
|
|
1854
|
-
entity: Order;
|
|
1855
|
-
metadata: EventMetadata;
|
|
1856
|
-
}
|
|
1857
|
-
/**
|
|
1858
|
-
* Triggered when an order is created.
|
|
1859
|
-
* @permissionScope Manage_Wix_Rentals_App_Forms_submissions
|
|
1860
|
-
* @permissionScopeId SCOPE.RENTALS.MANAGE
|
|
1861
|
-
* @permissionScope Manage Orders
|
|
1862
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
1863
|
-
* @permissionScope Read Orders
|
|
1864
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS
|
|
1865
|
-
* @permissionScope Manage plans and orders of Pricing Plans
|
|
1866
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS-AND-ORDERS
|
|
1867
|
-
* @permissionScope Manage Events
|
|
1868
|
-
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
1869
|
-
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
1870
|
-
* @webhook
|
|
1871
|
-
* @eventType wix.pricing_plans.v2.order_created
|
|
1872
|
-
* @serviceIdentifier com.wixpress.membership.v2.orders.CheckoutService
|
|
1873
|
-
* @slug created
|
|
1874
|
-
*/
|
|
1875
|
-
declare function onOrderCreated(handler: (event: OrderCreatedEnvelope) => void | Promise<void>): void;
|
|
1876
|
-
interface OrderStartDateChangedEnvelope {
|
|
1877
|
-
data: OrderStartDateChanged;
|
|
1878
|
-
metadata: EventMetadata;
|
|
1879
|
-
}
|
|
1880
|
-
/**
|
|
1881
|
-
* Triggered when an order's `startDate` is changed.
|
|
1882
|
-
* @permissionScope Manage_Wix_Rentals_App_Forms_submissions
|
|
1883
|
-
* @permissionScopeId SCOPE.RENTALS.MANAGE
|
|
1884
|
-
* @permissionScope Manage Orders
|
|
1885
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
1886
|
-
* @permissionScope Read Orders
|
|
1887
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS
|
|
1888
|
-
* @permissionScope Manage plans and orders of Pricing Plans
|
|
1889
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS-AND-ORDERS
|
|
1890
|
-
* @permissionScope Manage Events
|
|
1891
|
-
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
1892
|
-
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
1893
|
-
* @webhook
|
|
1894
|
-
* @eventType wix.pricing_plans.v2.order_start_date_changed
|
|
1895
|
-
* @serviceIdentifier com.wixpress.membership.v2.orders.CheckoutService
|
|
1896
|
-
* @slug start_date_changed
|
|
1897
|
-
*/
|
|
1898
|
-
declare function onOrderStartDateChanged(handler: (event: OrderStartDateChangedEnvelope) => void | Promise<void>): void;
|
|
1899
|
-
interface OrderUpdatedEnvelope {
|
|
1900
|
-
entity: Order;
|
|
1901
|
-
metadata: EventMetadata;
|
|
1902
|
-
}
|
|
1903
|
-
/**
|
|
1904
|
-
* Triggered for any of the following update events:
|
|
1905
|
-
*
|
|
1906
|
-
* + Order is paid for. Order Purchased is also triggered.
|
|
1907
|
-
* + Order reaches its start date or end date. Order Started and Order Ended, respectively, are also triggered.
|
|
1908
|
-
* + New payment cycle of an order starts. Order Cycle Started is also triggered.
|
|
1909
|
-
* + Offline order is marked as paid. Order Marked As Paid is also triggered.
|
|
1910
|
-
* + End date of the order is postponed. Order End Date Postponed is also triggered
|
|
1911
|
-
* + Order is paused, or a paused order is resumed. Order Paused and Order Resumed, respectively, are also triggered.
|
|
1912
|
-
* + Order is canceled, either immediately or at the end of the payment cycle. Order Canceled and Order Auto Renew Canceled, respectively, are also triggered.
|
|
1913
|
-
* @permissionScope Manage_Wix_Rentals_App_Forms_submissions
|
|
1914
|
-
* @permissionScopeId SCOPE.RENTALS.MANAGE
|
|
1915
|
-
* @permissionScope Manage Orders
|
|
1916
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
1917
|
-
* @permissionScope Read Orders
|
|
1918
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS
|
|
1919
|
-
* @permissionScope Manage plans and orders of Pricing Plans
|
|
1920
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS-AND-ORDERS
|
|
1921
|
-
* @permissionScope Manage Events
|
|
1922
|
-
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
1923
|
-
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
1924
|
-
* @webhook
|
|
1925
|
-
* @eventType wix.pricing_plans.v2.order_updated
|
|
1926
|
-
* @serviceIdentifier com.wixpress.membership.v2.orders.CheckoutService
|
|
1927
|
-
* @slug updated
|
|
1928
|
-
*/
|
|
1929
|
-
declare function onOrderUpdated(handler: (event: OrderUpdatedEnvelope) => void | Promise<void>): void;
|
|
1852
|
+
}
|
|
1930
1853
|
interface OrderAutoRenewCanceledEnvelope {
|
|
1931
1854
|
data: OrderAutoRenewCanceled;
|
|
1932
1855
|
metadata: EventMetadata;
|
|
@@ -2128,53 +2051,304 @@ interface OrderPurchasedEnvelope {
|
|
|
2128
2051
|
* @serviceIdentifier com.wixpress.membership.v2.orders.OrderManagementService
|
|
2129
2052
|
* @slug purchased
|
|
2130
2053
|
*/
|
|
2131
|
-
declare function onOrderPurchased(handler: (event: OrderPurchasedEnvelope) => void | Promise<void>): void;
|
|
2132
|
-
interface OrderResumedEnvelope {
|
|
2133
|
-
data: OrderResumed;
|
|
2134
|
-
metadata: EventMetadata;
|
|
2135
|
-
}
|
|
2054
|
+
declare function onOrderPurchased(handler: (event: OrderPurchasedEnvelope) => void | Promise<void>): void;
|
|
2055
|
+
interface OrderResumedEnvelope {
|
|
2056
|
+
data: OrderResumed;
|
|
2057
|
+
metadata: EventMetadata;
|
|
2058
|
+
}
|
|
2059
|
+
/**
|
|
2060
|
+
* Triggered when a paused order is resumed.
|
|
2061
|
+
* @permissionScope Manage_Wix_Rentals_App_Forms_submissions
|
|
2062
|
+
* @permissionScopeId SCOPE.RENTALS.MANAGE
|
|
2063
|
+
* @permissionScope Manage Orders
|
|
2064
|
+
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
2065
|
+
* @permissionScope Read Orders
|
|
2066
|
+
* @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS
|
|
2067
|
+
* @permissionScope Manage plans and orders of Pricing Plans
|
|
2068
|
+
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS-AND-ORDERS
|
|
2069
|
+
* @permissionScope Manage Events
|
|
2070
|
+
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
2071
|
+
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
2072
|
+
* @webhook
|
|
2073
|
+
* @eventType wix.pricing_plans.v2.order_resumed
|
|
2074
|
+
* @serviceIdentifier com.wixpress.membership.v2.orders.OrderManagementService
|
|
2075
|
+
* @slug resumed
|
|
2076
|
+
*/
|
|
2077
|
+
declare function onOrderResumed(handler: (event: OrderResumedEnvelope) => void | Promise<void>): void;
|
|
2078
|
+
interface OrderStartedEnvelope {
|
|
2079
|
+
data: OrderStarted;
|
|
2080
|
+
metadata: EventMetadata;
|
|
2081
|
+
}
|
|
2082
|
+
/**
|
|
2083
|
+
* Triggered when an order reaches its `startDate`. Applies to both purchased and free orders.
|
|
2084
|
+
* @permissionScope Manage_Wix_Rentals_App_Forms_submissions
|
|
2085
|
+
* @permissionScopeId SCOPE.RENTALS.MANAGE
|
|
2086
|
+
* @permissionScope Manage Orders
|
|
2087
|
+
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
2088
|
+
* @permissionScope Read Orders
|
|
2089
|
+
* @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS
|
|
2090
|
+
* @permissionScope Manage plans and orders of Pricing Plans
|
|
2091
|
+
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS-AND-ORDERS
|
|
2092
|
+
* @permissionScope Manage Events
|
|
2093
|
+
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
2094
|
+
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
2095
|
+
* @webhook
|
|
2096
|
+
* @eventType wix.pricing_plans.v2.order_started
|
|
2097
|
+
* @serviceIdentifier com.wixpress.membership.v2.orders.OrderManagementService
|
|
2098
|
+
* @slug started
|
|
2099
|
+
*/
|
|
2100
|
+
declare function onOrderStarted(handler: (event: OrderStartedEnvelope) => void | Promise<void>): void;
|
|
2101
|
+
interface OrderUpdatedEnvelope {
|
|
2102
|
+
entity: Order;
|
|
2103
|
+
metadata: EventMetadata;
|
|
2104
|
+
}
|
|
2105
|
+
/**
|
|
2106
|
+
* Triggered for any of the following update events:
|
|
2107
|
+
*
|
|
2108
|
+
* + Order is paid for. Order Purchased is also triggered.
|
|
2109
|
+
* + Order reaches its start date or end date. Order Started and Order Ended, respectively, are also triggered.
|
|
2110
|
+
* + New payment cycle of an order starts. Order Cycle Started is also triggered.
|
|
2111
|
+
* + Offline order is marked as paid. Order Marked As Paid is also triggered.
|
|
2112
|
+
* + End date of the order is postponed. Order End Date Postponed is also triggered
|
|
2113
|
+
* + Order is paused, or a paused order is resumed. Order Paused and Order Resumed, respectively, are also triggered.
|
|
2114
|
+
* + Order is canceled, either immediately or at the end of the payment cycle. Order Canceled and Order Auto Renew Canceled, respectively, are also triggered.
|
|
2115
|
+
* @permissionScope Manage_Wix_Rentals_App_Forms_submissions
|
|
2116
|
+
* @permissionScopeId SCOPE.RENTALS.MANAGE
|
|
2117
|
+
* @permissionScope Manage Orders
|
|
2118
|
+
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
2119
|
+
* @permissionScope Read Orders
|
|
2120
|
+
* @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS
|
|
2121
|
+
* @permissionScope Manage plans and orders of Pricing Plans
|
|
2122
|
+
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS-AND-ORDERS
|
|
2123
|
+
* @permissionScope Manage Events
|
|
2124
|
+
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
2125
|
+
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
2126
|
+
* @webhook
|
|
2127
|
+
* @eventType wix.pricing_plans.v2.order_updated
|
|
2128
|
+
* @serviceIdentifier com.wixpress.membership.v2.orders.OrderManagementService
|
|
2129
|
+
* @slug updated
|
|
2130
|
+
*/
|
|
2131
|
+
declare function onOrderUpdated(handler: (event: OrderUpdatedEnvelope) => void | Promise<void>): void;
|
|
2132
|
+
interface OrderCreatedEnvelope {
|
|
2133
|
+
entity: Order;
|
|
2134
|
+
metadata: EventMetadata;
|
|
2135
|
+
}
|
|
2136
|
+
/**
|
|
2137
|
+
* Triggered when an order is created.
|
|
2138
|
+
* @permissionScope Manage_Wix_Rentals_App_Forms_submissions
|
|
2139
|
+
* @permissionScopeId SCOPE.RENTALS.MANAGE
|
|
2140
|
+
* @permissionScope Manage Orders
|
|
2141
|
+
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
2142
|
+
* @permissionScope Read Orders
|
|
2143
|
+
* @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS
|
|
2144
|
+
* @permissionScope Manage plans and orders of Pricing Plans
|
|
2145
|
+
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS-AND-ORDERS
|
|
2146
|
+
* @permissionScope Manage Events
|
|
2147
|
+
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
2148
|
+
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
2149
|
+
* @webhook
|
|
2150
|
+
* @eventType wix.pricing_plans.v2.order_created
|
|
2151
|
+
* @serviceIdentifier com.wixpress.membership.v2.orders.CheckoutService
|
|
2152
|
+
* @slug created
|
|
2153
|
+
*/
|
|
2154
|
+
declare function onOrderCreated(handler: (event: OrderCreatedEnvelope) => void | Promise<void>): void;
|
|
2155
|
+
interface OrderStartDateChangedEnvelope {
|
|
2156
|
+
data: OrderStartDateChanged;
|
|
2157
|
+
metadata: EventMetadata;
|
|
2158
|
+
}
|
|
2159
|
+
/**
|
|
2160
|
+
* Triggered when an order's `startDate` is changed.
|
|
2161
|
+
* @permissionScope Manage_Wix_Rentals_App_Forms_submissions
|
|
2162
|
+
* @permissionScopeId SCOPE.RENTALS.MANAGE
|
|
2163
|
+
* @permissionScope Manage Orders
|
|
2164
|
+
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
2165
|
+
* @permissionScope Read Orders
|
|
2166
|
+
* @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS
|
|
2167
|
+
* @permissionScope Manage plans and orders of Pricing Plans
|
|
2168
|
+
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS-AND-ORDERS
|
|
2169
|
+
* @permissionScope Manage Events
|
|
2170
|
+
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
2171
|
+
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
2172
|
+
* @webhook
|
|
2173
|
+
* @eventType wix.pricing_plans.v2.order_start_date_changed
|
|
2174
|
+
* @serviceIdentifier com.wixpress.membership.v2.orders.CheckoutService
|
|
2175
|
+
* @slug start_date_changed
|
|
2176
|
+
*/
|
|
2177
|
+
declare function onOrderStartDateChanged(handler: (event: OrderStartDateChangedEnvelope) => void | Promise<void>): void;
|
|
2178
|
+
/**
|
|
2179
|
+
* Retrieves an order by ID.
|
|
2180
|
+
* @param _id - Order ID.
|
|
2181
|
+
* @public
|
|
2182
|
+
* @requiredField _id
|
|
2183
|
+
* @param options - Options to use when getting an order.
|
|
2184
|
+
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
2185
|
+
* @applicableIdentity APP
|
|
2186
|
+
* @fqn com.wixpress.membership.v2.orders.OrderManagementService.GetOrder
|
|
2187
|
+
*/
|
|
2188
|
+
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>>;
|
|
2189
|
+
interface ManagementGetOrderOptions {
|
|
2190
|
+
/**
|
|
2191
|
+
* Predefined set of fields to return.
|
|
2192
|
+
*
|
|
2193
|
+
* Default: If `fieldSet` is omitted, no order form submission data is returned.
|
|
2194
|
+
*/
|
|
2195
|
+
fieldSet?: SetWithLiterals;
|
|
2196
|
+
}
|
|
2197
|
+
/**
|
|
2198
|
+
* Retrieves a list of up to 50 pricing plan orders and details, given the specified sorting and filtering.
|
|
2199
|
+
*
|
|
2200
|
+
* By default, this endpoint will retrieve all orders and return them sorted by `createdDate` in `DESC`, descending order.
|
|
2201
|
+
* `sort.fieldName` supports `endDate` and `createdDate` fields and defaults to `ASC`, ascending order.
|
|
2202
|
+
* @public
|
|
2203
|
+
* @param options - Filtering, sorting, and pagination options.
|
|
2204
|
+
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
2205
|
+
* @applicableIdentity APP
|
|
2206
|
+
* @fqn com.wixpress.membership.v2.orders.OrderManagementService.ListOrders
|
|
2207
|
+
*/
|
|
2208
|
+
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>>;
|
|
2209
|
+
interface ManagementListOrdersOptions {
|
|
2210
|
+
/**
|
|
2211
|
+
* Filter by a buyer's member ID, from the Members API.
|
|
2212
|
+
* @format GUID
|
|
2213
|
+
*/
|
|
2214
|
+
buyerIds?: string[];
|
|
2215
|
+
/**
|
|
2216
|
+
* Filter by plan IDs, from the Plans API.
|
|
2217
|
+
* @format GUID
|
|
2218
|
+
*/
|
|
2219
|
+
planIds?: string[];
|
|
2220
|
+
/** Filter by whether or not the auto-renewal of recurring orders was canceled. */
|
|
2221
|
+
autoRenewCanceled?: boolean | null;
|
|
2222
|
+
/** Filter by order status. */
|
|
2223
|
+
orderStatuses?: OrderStatusWithLiterals[];
|
|
2224
|
+
/** Filter by payment status. */
|
|
2225
|
+
paymentStatuses?: PaymentStatusWithLiterals[];
|
|
2226
|
+
/**
|
|
2227
|
+
* Number of orders to return. See Sorting and Paging for more information.
|
|
2228
|
+
*
|
|
2229
|
+
* Max: `50`
|
|
2230
|
+
* @min 1
|
|
2231
|
+
* @max 50
|
|
2232
|
+
*/
|
|
2233
|
+
limit?: number | null;
|
|
2234
|
+
/** Number of orders to skip in the current sort order. */
|
|
2235
|
+
offset?: number | null;
|
|
2236
|
+
/**
|
|
2237
|
+
* Sort order.
|
|
2238
|
+
*
|
|
2239
|
+
* Use `ASC` for ascending order or `DESC` for descending order.
|
|
2240
|
+
*
|
|
2241
|
+
* Default: `DESC`.
|
|
2242
|
+
*/
|
|
2243
|
+
sorting?: Sorting;
|
|
2244
|
+
/**
|
|
2245
|
+
* Predefined set of fields to return.
|
|
2246
|
+
*
|
|
2247
|
+
* Default: If `fieldSet` is omitted, no order form submission data is returned.
|
|
2248
|
+
*/
|
|
2249
|
+
fieldSet?: SetWithLiterals;
|
|
2250
|
+
}
|
|
2251
|
+
/**
|
|
2252
|
+
* 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.
|
|
2253
|
+
*
|
|
2254
|
+
* New `endDate` must be later than the order's current `endDate`. Can't postpone orders that are unlimited.
|
|
2255
|
+
* Can't postpone an order with `status`: `PAUSED`.
|
|
2256
|
+
* @param _id - Order ID.
|
|
2257
|
+
* @param endDate - New end date and time.
|
|
2258
|
+
*
|
|
2259
|
+
* Must be later than the current end date and time.
|
|
2260
|
+
* @public
|
|
2261
|
+
* @requiredField _id
|
|
2262
|
+
* @requiredField endDate
|
|
2263
|
+
* @param options - Options for postponing the end date of an order.
|
|
2264
|
+
* @permissionId PRICING_PLANS.MANAGE_ORDERS
|
|
2265
|
+
* @applicableIdentity APP
|
|
2266
|
+
* @fqn com.wixpress.membership.v2.orders.OrderManagementService.PostponeEndDate
|
|
2267
|
+
*/
|
|
2268
|
+
declare function postponeEndDate(_id: string, endDate: Date): Promise<void>;
|
|
2269
|
+
/**
|
|
2270
|
+
* Cancels an existing order.
|
|
2271
|
+
*
|
|
2272
|
+
* For orders with recurring payments, a cancellation can be set to occur either `IMMEDIATELY` or at the `NEXT_PAYMENT_DATE`.
|
|
2273
|
+
* For orders with one-time payments, a cancellation can only be set for `IMMEDIATELY`.
|
|
2274
|
+
*
|
|
2275
|
+
* #### Canceling during the free trial period.
|
|
2276
|
+
*
|
|
2277
|
+
* When a buyer cancels their order during the free trial period, the buyer's subscription expires at the end
|
|
2278
|
+
* of the free trial period and they will not be billed. The buyer may continue using the benefits until the end
|
|
2279
|
+
* of the free trial period.
|
|
2280
|
+
*
|
|
2281
|
+
* When a Wix user cancels an ordered plan during the free trial period, they choose whether to apply the cancellation
|
|
2282
|
+
* `IMMEDIATELY` or at the `NEXT_PAYMENT_DATE`. Canceling `IMMEDIATELY` will end the subscription for the buyer
|
|
2283
|
+
* immediately, even during the free trial period and the buyer won't be billed. Canceling at the
|
|
2284
|
+
* `NEXT_PAYMENT_DATE` allows the buyer to continue using the benefits of the subscription until the end of the free trial period.
|
|
2285
|
+
* Then, the subscription ends and the buyer is not billed.
|
|
2286
|
+
* @param _id - Order ID.
|
|
2287
|
+
* @param effectiveAt - __Required.__ When the order will be canceled. One-time orders can only be canceled `IMMEDIATELY`.
|
|
2288
|
+
* @public
|
|
2289
|
+
* @requiredField _id
|
|
2290
|
+
* @requiredField effectiveAt
|
|
2291
|
+
* @param options - Options for canceling orders.
|
|
2292
|
+
* @permissionId PRICING_PLANS.MANAGE_ORDERS
|
|
2293
|
+
* @applicableIdentity APP
|
|
2294
|
+
* @fqn com.wixpress.membership.v2.orders.OrderManagementService.CancelOrder
|
|
2295
|
+
*/
|
|
2296
|
+
declare function cancelOrder(_id: string, effectiveAt: CancellationEffectiveAtWithLiterals): Promise<void>;
|
|
2297
|
+
/**
|
|
2298
|
+
* Marks an offline order as paid.
|
|
2299
|
+
* > __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.
|
|
2300
|
+
*
|
|
2301
|
+
* Marking an offline order as paid causes the following changes:
|
|
2302
|
+
* - The order's `lastPaymentStatus` changes to `"PAID"`.
|
|
2303
|
+
* - The order's status changes to either `"PENDING"` or `"ACTIVE"`, depending on the order's `startDate`.
|
|
2304
|
+
*
|
|
2305
|
+
* An error occurs if you attempt to:
|
|
2306
|
+
* - Mark an already-paid, offline order as paid. You cannot mark an offline order as paid twice.
|
|
2307
|
+
* - Mark an online order as paid. The Mark as Paid method is supported for offline orders only.
|
|
2308
|
+
* @param _id - Order ID.
|
|
2309
|
+
* @public
|
|
2310
|
+
* @requiredField _id
|
|
2311
|
+
* @permissionId PRICING_PLANS.MANAGE_ORDERS
|
|
2312
|
+
* @applicableIdentity APP
|
|
2313
|
+
* @fqn com.wixpress.membership.v2.orders.OrderManagementService.MarkAsPaid
|
|
2314
|
+
*/
|
|
2315
|
+
declare function markAsPaid(_id: string): Promise<void>;
|
|
2136
2316
|
/**
|
|
2137
|
-
*
|
|
2138
|
-
*
|
|
2139
|
-
*
|
|
2140
|
-
*
|
|
2141
|
-
*
|
|
2142
|
-
*
|
|
2143
|
-
*
|
|
2144
|
-
*
|
|
2145
|
-
* @
|
|
2146
|
-
* @
|
|
2147
|
-
* @
|
|
2148
|
-
* @permissionId PRICING_PLANS.
|
|
2149
|
-
* @
|
|
2150
|
-
* @
|
|
2151
|
-
* @serviceIdentifier com.wixpress.membership.v2.orders.OrderManagementService
|
|
2152
|
-
* @slug resumed
|
|
2317
|
+
* Pauses an order. Calling this method changes the order status to `"PAUSED"` and updates the `pausePeriods` array.
|
|
2318
|
+
*
|
|
2319
|
+
* Only orders with `status`: `ACTIVE` can be paused.
|
|
2320
|
+
* For orders with recurring payments, it also pauses the payment schedule. Buyers are not charged when an order is paused.
|
|
2321
|
+
* Pausing an order affects the end date of the order by adding the time the order is paused to the `endDate`.
|
|
2322
|
+
* The `endDate` and the `earliestEndDate` for the order are adjusted to include the pause period when the order is resumed.
|
|
2323
|
+
*
|
|
2324
|
+
* To resume a paused order, call Resume Order.
|
|
2325
|
+
* @param _id - Order ID.
|
|
2326
|
+
* @public
|
|
2327
|
+
* @requiredField _id
|
|
2328
|
+
* @permissionId PRICING_PLANS.MANAGE_ORDERS
|
|
2329
|
+
* @applicableIdentity APP
|
|
2330
|
+
* @fqn com.wixpress.membership.v2.orders.OrderManagementService.PauseOrder
|
|
2153
2331
|
*/
|
|
2154
|
-
declare function
|
|
2155
|
-
interface OrderStartedEnvelope {
|
|
2156
|
-
data: OrderStarted;
|
|
2157
|
-
metadata: EventMetadata;
|
|
2158
|
-
}
|
|
2332
|
+
declare function pauseOrder(_id: string): Promise<void>;
|
|
2159
2333
|
/**
|
|
2160
|
-
*
|
|
2161
|
-
*
|
|
2162
|
-
*
|
|
2163
|
-
*
|
|
2164
|
-
*
|
|
2165
|
-
*
|
|
2166
|
-
*
|
|
2167
|
-
*
|
|
2168
|
-
*
|
|
2169
|
-
*
|
|
2170
|
-
* @
|
|
2171
|
-
* @
|
|
2172
|
-
* @
|
|
2173
|
-
* @
|
|
2174
|
-
* @
|
|
2175
|
-
* @
|
|
2334
|
+
* Resumes a paused order. For orders with recurring payments, it also restarts the payment schedule.
|
|
2335
|
+
*
|
|
2336
|
+
* Resuming an order causes the following changes:
|
|
2337
|
+
* - The order status changes to `"ACTIVE"`.
|
|
2338
|
+
* - The `pausePeriods` array is updated.
|
|
2339
|
+
* - The `endDate` for the order is adjusted to include the pause period.
|
|
2340
|
+
* - For orders with recurring payments, the payment schedule is restarted.
|
|
2341
|
+
* - The `earliestEndDate` is adjusted to include the pause period. (This property is reserved for future use).
|
|
2342
|
+
*
|
|
2343
|
+
* To pause an order, call Pause Order.
|
|
2344
|
+
* @param _id - Order ID.
|
|
2345
|
+
* @public
|
|
2346
|
+
* @requiredField _id
|
|
2347
|
+
* @permissionId PRICING_PLANS.MANAGE_ORDERS
|
|
2348
|
+
* @applicableIdentity APP
|
|
2349
|
+
* @fqn com.wixpress.membership.v2.orders.OrderManagementService.ResumeOrder
|
|
2176
2350
|
*/
|
|
2177
|
-
declare function
|
|
2351
|
+
declare function resumeOrder(_id: string): Promise<void>;
|
|
2178
2352
|
/**
|
|
2179
2353
|
* Creates an online order for a site member.
|
|
2180
2354
|
*
|
|
@@ -2369,180 +2543,6 @@ interface GetPricePreviewOptions {
|
|
|
2369
2543
|
*/
|
|
2370
2544
|
couponCode?: string | null;
|
|
2371
2545
|
}
|
|
2372
|
-
/**
|
|
2373
|
-
* Retrieves an order by ID.
|
|
2374
|
-
* @param _id - Order ID.
|
|
2375
|
-
* @public
|
|
2376
|
-
* @requiredField _id
|
|
2377
|
-
* @param options - Options to use when getting an order.
|
|
2378
|
-
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
2379
|
-
* @applicableIdentity APP
|
|
2380
|
-
* @fqn com.wixpress.membership.v2.orders.OrderManagementService.GetOrder
|
|
2381
|
-
*/
|
|
2382
|
-
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>>;
|
|
2383
|
-
interface ManagementGetOrderOptions {
|
|
2384
|
-
/**
|
|
2385
|
-
* Predefined set of fields to return.
|
|
2386
|
-
*
|
|
2387
|
-
* Default: If `fieldSet` is omitted, no order form submission data is returned.
|
|
2388
|
-
*/
|
|
2389
|
-
fieldSet?: SetWithLiterals;
|
|
2390
|
-
}
|
|
2391
|
-
/**
|
|
2392
|
-
* Retrieves a list of up to 50 pricing plan orders and details, given the specified sorting and filtering.
|
|
2393
|
-
*
|
|
2394
|
-
* By default, this endpoint will retrieve all orders and return them sorted by `createdDate` in `DESC`, descending order.
|
|
2395
|
-
* `sort.fieldName` supports `endDate` and `createdDate` fields and defaults to `ASC`, ascending order.
|
|
2396
|
-
* @public
|
|
2397
|
-
* @param options - Filtering, sorting, and pagination options.
|
|
2398
|
-
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
2399
|
-
* @applicableIdentity APP
|
|
2400
|
-
* @fqn com.wixpress.membership.v2.orders.OrderManagementService.ListOrders
|
|
2401
|
-
*/
|
|
2402
|
-
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>>;
|
|
2403
|
-
interface ManagementListOrdersOptions {
|
|
2404
|
-
/**
|
|
2405
|
-
* Filter by a buyer's member ID, from the Members API.
|
|
2406
|
-
* @format GUID
|
|
2407
|
-
*/
|
|
2408
|
-
buyerIds?: string[];
|
|
2409
|
-
/**
|
|
2410
|
-
* Filter by plan IDs, from the Plans API.
|
|
2411
|
-
* @format GUID
|
|
2412
|
-
*/
|
|
2413
|
-
planIds?: string[];
|
|
2414
|
-
/** Filter by whether or not the auto-renewal of recurring orders was canceled. */
|
|
2415
|
-
autoRenewCanceled?: boolean | null;
|
|
2416
|
-
/** Filter by order status. */
|
|
2417
|
-
orderStatuses?: OrderStatusWithLiterals[];
|
|
2418
|
-
/** Filter by payment status. */
|
|
2419
|
-
paymentStatuses?: PaymentStatusWithLiterals[];
|
|
2420
|
-
/**
|
|
2421
|
-
* Number of orders to return. See Sorting and Paging for more information.
|
|
2422
|
-
*
|
|
2423
|
-
* Max: `50`
|
|
2424
|
-
* @min 1
|
|
2425
|
-
* @max 50
|
|
2426
|
-
*/
|
|
2427
|
-
limit?: number | null;
|
|
2428
|
-
/** Number of orders to skip in the current sort order. */
|
|
2429
|
-
offset?: number | null;
|
|
2430
|
-
/**
|
|
2431
|
-
* Sort order.
|
|
2432
|
-
*
|
|
2433
|
-
* Use `ASC` for ascending order or `DESC` for descending order.
|
|
2434
|
-
*
|
|
2435
|
-
* Default: `DESC`.
|
|
2436
|
-
*/
|
|
2437
|
-
sorting?: Sorting;
|
|
2438
|
-
/**
|
|
2439
|
-
* Predefined set of fields to return.
|
|
2440
|
-
*
|
|
2441
|
-
* Default: If `fieldSet` is omitted, no order form submission data is returned.
|
|
2442
|
-
*/
|
|
2443
|
-
fieldSet?: SetWithLiterals;
|
|
2444
|
-
}
|
|
2445
|
-
/**
|
|
2446
|
-
* 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.
|
|
2447
|
-
*
|
|
2448
|
-
* New `endDate` must be later than the order's current `endDate`. Can't postpone orders that are unlimited.
|
|
2449
|
-
* Can't postpone an order with `status`: `PAUSED`.
|
|
2450
|
-
* @param _id - Order ID.
|
|
2451
|
-
* @param endDate - New end date and time.
|
|
2452
|
-
*
|
|
2453
|
-
* Must be later than the current end date and time.
|
|
2454
|
-
* @public
|
|
2455
|
-
* @requiredField _id
|
|
2456
|
-
* @requiredField endDate
|
|
2457
|
-
* @param options - Options for postponing the end date of an order.
|
|
2458
|
-
* @permissionId PRICING_PLANS.MANAGE_ORDERS
|
|
2459
|
-
* @applicableIdentity APP
|
|
2460
|
-
* @fqn com.wixpress.membership.v2.orders.OrderManagementService.PostponeEndDate
|
|
2461
|
-
*/
|
|
2462
|
-
declare function postponeEndDate(_id: string, endDate: Date): Promise<void>;
|
|
2463
|
-
/**
|
|
2464
|
-
* Cancels an existing order.
|
|
2465
|
-
*
|
|
2466
|
-
* For orders with recurring payments, a cancellation can be set to occur either `IMMEDIATELY` or at the `NEXT_PAYMENT_DATE`.
|
|
2467
|
-
* For orders with one-time payments, a cancellation can only be set for `IMMEDIATELY`.
|
|
2468
|
-
*
|
|
2469
|
-
* #### Canceling during the free trial period.
|
|
2470
|
-
*
|
|
2471
|
-
* When a buyer cancels their order during the free trial period, the buyer's subscription expires at the end
|
|
2472
|
-
* of the free trial period and they will not be billed. The buyer may continue using the benefits until the end
|
|
2473
|
-
* of the free trial period.
|
|
2474
|
-
*
|
|
2475
|
-
* When a Wix user cancels an ordered plan during the free trial period, they choose whether to apply the cancellation
|
|
2476
|
-
* `IMMEDIATELY` or at the `NEXT_PAYMENT_DATE`. Canceling `IMMEDIATELY` will end the subscription for the buyer
|
|
2477
|
-
* immediately, even during the free trial period and the buyer won't be billed. Canceling at the
|
|
2478
|
-
* `NEXT_PAYMENT_DATE` allows the buyer to continue using the benefits of the subscription until the end of the free trial period.
|
|
2479
|
-
* Then, the subscription ends and the buyer is not billed.
|
|
2480
|
-
* @param _id - Order ID.
|
|
2481
|
-
* @param effectiveAt - __Required.__ When the order will be canceled. One-time orders can only be canceled `IMMEDIATELY`.
|
|
2482
|
-
* @public
|
|
2483
|
-
* @requiredField _id
|
|
2484
|
-
* @requiredField effectiveAt
|
|
2485
|
-
* @param options - Options for canceling orders.
|
|
2486
|
-
* @permissionId PRICING_PLANS.MANAGE_ORDERS
|
|
2487
|
-
* @applicableIdentity APP
|
|
2488
|
-
* @fqn com.wixpress.membership.v2.orders.OrderManagementService.CancelOrder
|
|
2489
|
-
*/
|
|
2490
|
-
declare function cancelOrder(_id: string, effectiveAt: CancellationEffectiveAtWithLiterals): Promise<void>;
|
|
2491
|
-
/**
|
|
2492
|
-
* Marks an offline order as paid.
|
|
2493
|
-
* > __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.
|
|
2494
|
-
*
|
|
2495
|
-
* Marking an offline order as paid causes the following changes:
|
|
2496
|
-
* - The order's `lastPaymentStatus` changes to `"PAID"`.
|
|
2497
|
-
* - The order's status changes to either `"PENDING"` or `"ACTIVE"`, depending on the order's `startDate`.
|
|
2498
|
-
*
|
|
2499
|
-
* An error occurs if you attempt to:
|
|
2500
|
-
* - Mark an already-paid, offline order as paid. You cannot mark an offline order as paid twice.
|
|
2501
|
-
* - Mark an online order as paid. The Mark as Paid method is supported for offline orders only.
|
|
2502
|
-
* @param _id - Order ID.
|
|
2503
|
-
* @public
|
|
2504
|
-
* @requiredField _id
|
|
2505
|
-
* @permissionId PRICING_PLANS.MANAGE_ORDERS
|
|
2506
|
-
* @applicableIdentity APP
|
|
2507
|
-
* @fqn com.wixpress.membership.v2.orders.OrderManagementService.MarkAsPaid
|
|
2508
|
-
*/
|
|
2509
|
-
declare function markAsPaid(_id: string): Promise<void>;
|
|
2510
|
-
/**
|
|
2511
|
-
* Pauses an order. Calling this method changes the order status to `"PAUSED"` and updates the `pausePeriods` array.
|
|
2512
|
-
*
|
|
2513
|
-
* Only orders with `status`: `ACTIVE` can be paused.
|
|
2514
|
-
* For orders with recurring payments, it also pauses the payment schedule. Buyers are not charged when an order is paused.
|
|
2515
|
-
* Pausing an order affects the end date of the order by adding the time the order is paused to the `endDate`.
|
|
2516
|
-
* The `endDate` and the `earliestEndDate` for the order are adjusted to include the pause period when the order is resumed.
|
|
2517
|
-
*
|
|
2518
|
-
* To resume a paused order, call Resume Order.
|
|
2519
|
-
* @param _id - Order ID.
|
|
2520
|
-
* @public
|
|
2521
|
-
* @requiredField _id
|
|
2522
|
-
* @permissionId PRICING_PLANS.MANAGE_ORDERS
|
|
2523
|
-
* @applicableIdentity APP
|
|
2524
|
-
* @fqn com.wixpress.membership.v2.orders.OrderManagementService.PauseOrder
|
|
2525
|
-
*/
|
|
2526
|
-
declare function pauseOrder(_id: string): Promise<void>;
|
|
2527
|
-
/**
|
|
2528
|
-
* Resumes a paused order. For orders with recurring payments, it also restarts the payment schedule.
|
|
2529
|
-
*
|
|
2530
|
-
* Resuming an order causes the following changes:
|
|
2531
|
-
* - The order status changes to `"ACTIVE"`.
|
|
2532
|
-
* - The `pausePeriods` array is updated.
|
|
2533
|
-
* - The `endDate` for the order is adjusted to include the pause period.
|
|
2534
|
-
* - For orders with recurring payments, the payment schedule is restarted.
|
|
2535
|
-
* - The `earliestEndDate` is adjusted to include the pause period. (This property is reserved for future use).
|
|
2536
|
-
*
|
|
2537
|
-
* To pause an order, call Pause Order.
|
|
2538
|
-
* @param _id - Order ID.
|
|
2539
|
-
* @public
|
|
2540
|
-
* @requiredField _id
|
|
2541
|
-
* @permissionId PRICING_PLANS.MANAGE_ORDERS
|
|
2542
|
-
* @applicableIdentity APP
|
|
2543
|
-
* @fqn com.wixpress.membership.v2.orders.OrderManagementService.ResumeOrder
|
|
2544
|
-
*/
|
|
2545
|
-
declare function resumeOrder(_id: string): Promise<void>;
|
|
2546
2546
|
/**
|
|
2547
2547
|
* Retrieves an order for the currently logged-in member by ID.
|
|
2548
2548
|
* @param _id - Order ID.
|