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