@wix/auto_sdk_pricing-plans_orders 1.0.142 → 1.0.143
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 +508 -508
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +791 -791
- package/build/cjs/index.typings.js +405 -405
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +488 -488
- package/build/cjs/meta.js +329 -329
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +129 -129
- package/build/es/index.mjs +508 -508
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +791 -791
- package/build/es/index.typings.mjs +405 -405
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +488 -488
- package/build/es/meta.mjs +329 -329
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +129 -129
- package/build/internal/cjs/index.typings.d.ts +817 -817
- package/build/internal/cjs/meta.d.ts +505 -505
- package/build/internal/es/index.d.mts +129 -129
- package/build/internal/es/index.typings.d.mts +817 -817
- package/build/internal/es/meta.d.mts +505 -505
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CreateOnlineOrderRequest as CreateOnlineOrderRequest$1, CreateOnlineOrderResponse as CreateOnlineOrderResponse$1, CreateOfflineOrderRequest as CreateOfflineOrderRequest$1, CreateOfflineOrderResponse as CreateOfflineOrderResponse$1, GetOnlineOrderPreviewRequest as GetOnlineOrderPreviewRequest$1, GetOnlineOrderPreviewResponse as GetOnlineOrderPreviewResponse$1, GetOfflineOrderPreviewRequest as GetOfflineOrderPreviewRequest$1, GetOfflineOrderPreviewResponse as GetOfflineOrderPreviewResponse$1, GetPricePreviewRequest as GetPricePreviewRequest$1, GetPricePreviewResponse as GetPricePreviewResponse$1, GetOrderRequest as GetOrderRequest$1, GetOrderResponse as GetOrderResponse$1, ListOrdersRequest as ListOrdersRequest$1, ListOrdersResponse as ListOrdersResponse$1, PostponeEndDateRequest as PostponeEndDateRequest$1, PostponeEndDateResponse as PostponeEndDateResponse$1, CancelOrderRequest as CancelOrderRequest$1, CancelOrderResponse as CancelOrderResponse$1, MarkAsPaidRequest as MarkAsPaidRequest$1, MarkAsPaidResponse as MarkAsPaidResponse$1, PauseOrderRequest as PauseOrderRequest$1, PauseOrderResponse as PauseOrderResponse$1, ResumeOrderRequest as ResumeOrderRequest$1, ResumeOrderResponse as ResumeOrderResponse$1, MemberGetOrderRequest as MemberGetOrderRequest$1, MemberGetOrderResponse as MemberGetOrderResponse$1, MemberListOrdersRequest as MemberListOrdersRequest$1, MemberListOrdersResponse as MemberListOrdersResponse$1, RequestCancellationRequest as RequestCancellationRequest$1, RequestCancellationResponse as RequestCancellationResponse$1 } from './index.typings.js';
|
|
2
2
|
import '@wix/sdk-types';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -710,373 +710,321 @@ interface ActionEvent {
|
|
|
710
710
|
}
|
|
711
711
|
interface Empty {
|
|
712
712
|
}
|
|
713
|
-
interface
|
|
714
|
-
/**
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
713
|
+
interface CreateOnlineOrderRequest {
|
|
714
|
+
/**
|
|
715
|
+
* Plan ID.
|
|
716
|
+
* @format GUID
|
|
717
|
+
*/
|
|
718
|
+
planId: string;
|
|
719
|
+
/**
|
|
720
|
+
* Start date and time for the plan of the online order in a `YYYY-MM-DDThh:mm[:ss][.sss]Z` format.
|
|
721
|
+
*
|
|
722
|
+
* Default: Current date and time.
|
|
723
|
+
*/
|
|
724
|
+
startDate?: Date | null;
|
|
725
|
+
/**
|
|
726
|
+
* Coupon code to apply.
|
|
727
|
+
* @minLength 1
|
|
728
|
+
* @maxLength 20
|
|
729
|
+
*/
|
|
730
|
+
couponCode?: string | null;
|
|
731
|
+
/** Provided if checkout is initiated on buyer's behalf. */
|
|
732
|
+
onBehalf?: OnBehalf;
|
|
733
|
+
/**
|
|
734
|
+
* Submission ID of the form submitted with this order.
|
|
735
|
+
*
|
|
736
|
+
* The submission must belong to the form attached to the plan, and that form must belong to the Pricing Plans namespace.
|
|
737
|
+
* An invalid submission ID is dropped and the order is created without a submission.
|
|
738
|
+
* @format GUID
|
|
739
|
+
*/
|
|
740
|
+
submissionId?: string | null;
|
|
720
741
|
}
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
/**
|
|
728
|
-
|
|
729
|
-
/** 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. */
|
|
730
|
-
cycleNumber?: number;
|
|
742
|
+
interface OnBehalf {
|
|
743
|
+
/**
|
|
744
|
+
* Member ID.
|
|
745
|
+
* @format GUID
|
|
746
|
+
*/
|
|
747
|
+
memberId?: string;
|
|
748
|
+
/** Method by which checkout is initiated. */
|
|
749
|
+
orderMethod?: OrderMethodWithLiterals;
|
|
731
750
|
}
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
/** Order that is canceled, effective at the end of the current payment cycle. */
|
|
751
|
+
interface CreateOnlineOrderResponse {
|
|
752
|
+
/** Created online order. */
|
|
735
753
|
order?: Order;
|
|
736
754
|
}
|
|
737
|
-
interface
|
|
738
|
-
/**
|
|
739
|
-
|
|
755
|
+
interface CouponsError {
|
|
756
|
+
/** Coupon code. */
|
|
757
|
+
couponCode?: string;
|
|
758
|
+
/** Plan ID. */
|
|
759
|
+
planId?: string;
|
|
740
760
|
}
|
|
741
|
-
interface
|
|
761
|
+
interface CreateGuestOnlineOrderRequest {
|
|
742
762
|
/**
|
|
743
|
-
*
|
|
763
|
+
* Plan ID.
|
|
744
764
|
* @format GUID
|
|
745
765
|
*/
|
|
746
|
-
|
|
766
|
+
planId?: string;
|
|
747
767
|
/**
|
|
748
|
-
*
|
|
768
|
+
* Start date for the ordered plan.
|
|
749
769
|
*
|
|
750
|
-
* Default:
|
|
770
|
+
* Default: Current date
|
|
751
771
|
*/
|
|
752
|
-
|
|
772
|
+
startDate?: Date | null;
|
|
773
|
+
/**
|
|
774
|
+
* Coupon code to apply.
|
|
775
|
+
* @minLength 1
|
|
776
|
+
* @maxLength 20
|
|
777
|
+
*/
|
|
778
|
+
couponCode?: string | null;
|
|
779
|
+
/** Captcha data to prove you are not a robot */
|
|
780
|
+
captcha?: Captcha;
|
|
781
|
+
/** Visitor info */
|
|
782
|
+
guest?: Guest;
|
|
783
|
+
/**
|
|
784
|
+
* Form submission id that was submitted together with the order
|
|
785
|
+
* @format GUID
|
|
786
|
+
*/
|
|
787
|
+
submissionId?: string | null;
|
|
753
788
|
}
|
|
754
|
-
|
|
755
|
-
/**
|
|
756
|
-
|
|
757
|
-
/** Doesn't return any order form submission data. */
|
|
758
|
-
BASIC = "BASIC",
|
|
759
|
-
/** Returns all order form submission data. */
|
|
760
|
-
FULL = "FULL"
|
|
789
|
+
interface Captcha {
|
|
790
|
+
/** Token from captcha */
|
|
791
|
+
token?: string;
|
|
761
792
|
}
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
793
|
+
interface Guest {
|
|
794
|
+
/**
|
|
795
|
+
* Email for checkout
|
|
796
|
+
* @format EMAIL
|
|
797
|
+
*/
|
|
798
|
+
email?: string;
|
|
799
|
+
}
|
|
800
|
+
interface CreateGuestOnlineOrderResponse {
|
|
765
801
|
/** Order. */
|
|
766
802
|
order?: Order;
|
|
767
803
|
}
|
|
768
|
-
interface
|
|
804
|
+
interface CreateOfflineOrderRequest {
|
|
769
805
|
/**
|
|
770
|
-
*
|
|
806
|
+
* ID of the plan being ordered, from the Plans API.
|
|
771
807
|
* @format GUID
|
|
772
808
|
*/
|
|
773
|
-
|
|
809
|
+
planId: string;
|
|
774
810
|
/**
|
|
775
|
-
*
|
|
811
|
+
* ID of the member ordering the plan, from the Members API.
|
|
776
812
|
* @format GUID
|
|
777
813
|
*/
|
|
778
|
-
|
|
779
|
-
/** Filter by whether or not the auto-renewal of recurring orders was canceled. */
|
|
780
|
-
autoRenewCanceled?: boolean | null;
|
|
781
|
-
/** Filter by order status. */
|
|
782
|
-
orderStatuses?: OrderStatusWithLiterals[];
|
|
783
|
-
/** Filter by payment status. */
|
|
784
|
-
paymentStatuses?: PaymentStatusWithLiterals[];
|
|
814
|
+
memberId: string;
|
|
785
815
|
/**
|
|
786
|
-
*
|
|
816
|
+
* Start date and time for the ordered plan in a `YYYY-MM-DDThh:mm[:ss][.sss]Z` format.
|
|
787
817
|
*
|
|
788
|
-
*
|
|
789
|
-
* @min 1
|
|
790
|
-
* @max 50
|
|
818
|
+
* Default: Current date and time.
|
|
791
819
|
*/
|
|
792
|
-
|
|
793
|
-
/** Number of orders to skip in the current sort order. */
|
|
794
|
-
offset?: number | null;
|
|
820
|
+
startDate?: Date | null;
|
|
795
821
|
/**
|
|
796
|
-
*
|
|
797
|
-
*
|
|
798
|
-
* Use `ASC` for ascending order or `DESC` for descending order.
|
|
822
|
+
* Whether the order is paid.
|
|
799
823
|
*
|
|
800
|
-
* Default: `
|
|
824
|
+
* Default: `false`
|
|
801
825
|
*/
|
|
802
|
-
|
|
826
|
+
paid?: boolean | null;
|
|
803
827
|
/**
|
|
804
|
-
*
|
|
828
|
+
* Coupon code to apply, from the Coupons API.
|
|
829
|
+
* @minLength 1
|
|
830
|
+
* @maxLength 20
|
|
831
|
+
*/
|
|
832
|
+
couponCode?: string | null;
|
|
833
|
+
/**
|
|
834
|
+
* Form submission ID that was submitted with the order.
|
|
805
835
|
*
|
|
806
|
-
*
|
|
836
|
+
* The submission must belong to the form attached to the plan, and that form must belong to the Pricing Plans namespace.
|
|
837
|
+
* An invalid submission ID is dropped and the order is created without a submission.
|
|
838
|
+
* @format GUID
|
|
807
839
|
*/
|
|
808
|
-
|
|
840
|
+
submissionId?: string | null;
|
|
841
|
+
}
|
|
842
|
+
interface CreateOfflineOrderResponse {
|
|
843
|
+
/** Order. */
|
|
844
|
+
order?: Order;
|
|
845
|
+
}
|
|
846
|
+
interface CreateExternalOrderRequest {
|
|
809
847
|
/**
|
|
810
|
-
*
|
|
811
|
-
* @internal
|
|
848
|
+
* Plan ID.
|
|
812
849
|
* @format GUID
|
|
813
|
-
* @maxSize 50
|
|
814
850
|
*/
|
|
815
|
-
|
|
851
|
+
planId?: string;
|
|
852
|
+
/**
|
|
853
|
+
* Form submission id that was submitted together with the order
|
|
854
|
+
* @format GUID
|
|
855
|
+
*/
|
|
856
|
+
submissionId?: string | null;
|
|
816
857
|
}
|
|
817
|
-
interface
|
|
858
|
+
interface CreateExternalOrderResponse {
|
|
859
|
+
/** Created order */
|
|
860
|
+
order?: Order;
|
|
861
|
+
}
|
|
862
|
+
interface GetOnlineOrderPreviewRequest {
|
|
818
863
|
/**
|
|
819
|
-
*
|
|
820
|
-
* @
|
|
864
|
+
* Plan ID.
|
|
865
|
+
* @format GUID
|
|
821
866
|
*/
|
|
822
|
-
|
|
823
|
-
/** Sort order. */
|
|
824
|
-
order?: SortOrderWithLiterals;
|
|
867
|
+
planId: string;
|
|
825
868
|
/**
|
|
826
|
-
*
|
|
827
|
-
* a specific element from a collection, filter can/should be provided to ensure correct sort value is picked.
|
|
828
|
-
*
|
|
829
|
-
* If multiple filters are provided, they are combined with AND operator.
|
|
869
|
+
* Start date and time for the plan of the order preview in a `YYYY-MM-DDThh:mm[:ss][.sss]Z` format.
|
|
830
870
|
*
|
|
831
|
-
*
|
|
832
|
-
* Given we have document like {"id": "1", "nestedField": [{"price": 10, "region": "EU"}, {"price": 20, "region": "US"}]}
|
|
833
|
-
* and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be
|
|
834
|
-
* { fieldName: "nestedField.price", "select_items_by": [{"nestedField.region": "US"}] }
|
|
835
|
-
* @internal
|
|
836
|
-
* @maxSize 10
|
|
871
|
+
* Default: Current date and time.
|
|
837
872
|
*/
|
|
838
|
-
|
|
873
|
+
startDate?: Date | null;
|
|
839
874
|
/**
|
|
840
|
-
*
|
|
841
|
-
*
|
|
875
|
+
* Coupon code to apply.
|
|
876
|
+
* @minLength 1
|
|
877
|
+
* @maxLength 20
|
|
842
878
|
*/
|
|
843
|
-
|
|
844
|
-
}
|
|
845
|
-
declare enum SortOrder {
|
|
846
|
-
ASC = "ASC",
|
|
847
|
-
DESC = "DESC"
|
|
848
|
-
}
|
|
849
|
-
/** @enumType */
|
|
850
|
-
type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
|
|
851
|
-
interface AddressLocation {
|
|
852
|
-
/** Address latitude. */
|
|
853
|
-
latitude?: number | null;
|
|
854
|
-
/** Address longitude. */
|
|
855
|
-
longitude?: number | null;
|
|
879
|
+
couponCode?: string | null;
|
|
856
880
|
}
|
|
857
|
-
interface
|
|
858
|
-
/**
|
|
859
|
-
|
|
860
|
-
/**
|
|
861
|
-
|
|
881
|
+
interface GetOnlineOrderPreviewResponse {
|
|
882
|
+
/** Order preview. This field is undefined if the member has already reached the purchase limit for the order's plan. */
|
|
883
|
+
order?: Order;
|
|
884
|
+
/** Whether the member has already reached purchase limit for the order's plan. */
|
|
885
|
+
purchaseLimitExceeded?: boolean;
|
|
862
886
|
}
|
|
863
|
-
interface
|
|
864
|
-
/** Number of items returned in the response. */
|
|
865
|
-
count?: number | null;
|
|
866
|
-
/** Offset that was requested. */
|
|
867
|
-
offset?: number | null;
|
|
868
|
-
/** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
|
|
869
|
-
total?: number | null;
|
|
870
|
-
/** Flag that indicates the server failed to calculate the `total` field. */
|
|
871
|
-
tooManyToCount?: boolean | null;
|
|
872
|
-
/** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
|
|
873
|
-
cursors?: Cursors;
|
|
887
|
+
interface GetGuestOnlineOrderPreviewRequest {
|
|
874
888
|
/**
|
|
875
|
-
*
|
|
876
|
-
*
|
|
877
|
-
* If `false`, this is the last page.
|
|
878
|
-
* @internal
|
|
889
|
+
* Plan ID.
|
|
890
|
+
* @format GUID
|
|
879
891
|
*/
|
|
880
|
-
|
|
881
|
-
}
|
|
882
|
-
interface Cursors {
|
|
892
|
+
planId?: string;
|
|
883
893
|
/**
|
|
884
|
-
*
|
|
885
|
-
*
|
|
894
|
+
* Start date for the ordered plan.
|
|
895
|
+
*
|
|
896
|
+
* Default: Current date
|
|
886
897
|
*/
|
|
887
|
-
|
|
898
|
+
startDate?: Date | null;
|
|
888
899
|
/**
|
|
889
|
-
*
|
|
890
|
-
* @
|
|
900
|
+
* Coupon code to apply.
|
|
901
|
+
* @minLength 1
|
|
902
|
+
* @maxLength 20
|
|
891
903
|
*/
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
904
|
+
couponCode?: string | null;
|
|
905
|
+
/**
|
|
906
|
+
* Email for checkout
|
|
907
|
+
* @format EMAIL
|
|
908
|
+
*/
|
|
909
|
+
email?: string;
|
|
895
910
|
}
|
|
896
|
-
interface
|
|
897
|
-
/**
|
|
898
|
-
|
|
899
|
-
/**
|
|
900
|
-
|
|
911
|
+
interface GetGuestOnlineOrderPreviewResponse {
|
|
912
|
+
/** Will be missing if limit is exceeded */
|
|
913
|
+
order?: Order;
|
|
914
|
+
/**
|
|
915
|
+
* Whether the purchase limit has already been reached for this plan by this email.
|
|
916
|
+
* Always false for plans without purchase limits.
|
|
917
|
+
*/
|
|
918
|
+
purchaseLimitExceeded?: boolean;
|
|
901
919
|
}
|
|
902
|
-
interface
|
|
920
|
+
interface GetOfflineOrderPreviewRequest {
|
|
903
921
|
/**
|
|
904
|
-
*
|
|
922
|
+
* ID of the plan of the previewed order, from the Plans API.
|
|
905
923
|
* @format GUID
|
|
906
924
|
*/
|
|
907
|
-
|
|
908
|
-
}
|
|
909
|
-
interface GetAvailableOrderActionsResponse {
|
|
910
|
-
/** Whether the order can be suspended. */
|
|
911
|
-
suspendable?: boolean;
|
|
912
|
-
/** If the order cannot be suspended, a reason is returned here. */
|
|
913
|
-
notSuspendableReason?: ReasonNotSuspendableWithLiterals;
|
|
914
|
-
/** Whether the order can be canceled by the buyer. */
|
|
915
|
-
cancelableByBuyer?: boolean;
|
|
916
|
-
}
|
|
917
|
-
declare enum ReasonNotSuspendable {
|
|
918
|
-
/** Undefined reason. */
|
|
919
|
-
UNDEFINED = "UNDEFINED",
|
|
920
|
-
/** Saved in the database but is awaiting payment. Non-active orders can't be suspended. */
|
|
921
|
-
PENDING = "PENDING",
|
|
922
|
-
/** Trial orders can't be suspended. */
|
|
923
|
-
TRIAL = "TRIAL",
|
|
924
|
-
/** Canceled orders can't be suspended. */
|
|
925
|
-
CANCELED = "CANCELED",
|
|
926
|
-
/** Ended orders can't be suspended. */
|
|
927
|
-
ENDED = "ENDED",
|
|
928
|
-
/** Paid for orders with future start dates can't be suspended. */
|
|
929
|
-
NOT_STARTED = "NOT_STARTED",
|
|
930
|
-
/** Order is already suspended. */
|
|
931
|
-
ALREADY_SUSPENDED = "ALREADY_SUSPENDED",
|
|
932
|
-
/** Orders based on recurring payments using older stripe versions can't be suspended. */
|
|
933
|
-
OLD_STRIPE = "OLD_STRIPE"
|
|
934
|
-
}
|
|
935
|
-
/** @enumType */
|
|
936
|
-
type ReasonNotSuspendableWithLiterals = ReasonNotSuspendable | 'UNDEFINED' | 'PENDING' | 'TRIAL' | 'CANCELED' | 'ENDED' | 'NOT_STARTED' | 'ALREADY_SUSPENDED' | 'OLD_STRIPE';
|
|
937
|
-
interface PostponeEndDateRequest {
|
|
925
|
+
planId: string;
|
|
938
926
|
/**
|
|
939
|
-
*
|
|
927
|
+
* Member ID of the buyer the previewed order is for, from the Members API.
|
|
940
928
|
* @format GUID
|
|
941
929
|
*/
|
|
942
|
-
|
|
930
|
+
memberId: string;
|
|
943
931
|
/**
|
|
944
|
-
*
|
|
932
|
+
* Start date and time for plan of the previewed order in a `YYYY-MM-DDThh:mm[:ss][.sss]Z` format.
|
|
945
933
|
*
|
|
946
|
-
*
|
|
934
|
+
* Default: Current date and time.
|
|
947
935
|
*/
|
|
948
|
-
|
|
949
|
-
}
|
|
950
|
-
interface PostponeEndDateResponse {
|
|
951
|
-
}
|
|
952
|
-
interface OrderEndDatePostponed {
|
|
953
|
-
/** Order whose `endDate` was postponed. */
|
|
954
|
-
order?: Order;
|
|
955
|
-
}
|
|
956
|
-
interface CancelOrderRequest {
|
|
936
|
+
startDate?: Date | null;
|
|
957
937
|
/**
|
|
958
|
-
*
|
|
959
|
-
* @
|
|
938
|
+
* Coupon code to apply, from the Coupons API.
|
|
939
|
+
* @minLength 1
|
|
940
|
+
* @maxLength 20
|
|
960
941
|
*/
|
|
961
|
-
|
|
962
|
-
/** __Required.__ When the order will be canceled. One-time orders can only be canceled `IMMEDIATELY`. */
|
|
963
|
-
effectiveAt: CancellationEffectiveAtWithLiterals;
|
|
964
|
-
}
|
|
965
|
-
interface CancelOrderResponse {
|
|
942
|
+
couponCode?: string | null;
|
|
966
943
|
}
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
*
|
|
970
|
-
* To determine the specific reason of the cancellation check `order.cancellation.cause` field.
|
|
971
|
-
*/
|
|
972
|
-
interface OrderCanceled {
|
|
973
|
-
/** Canceled order. */
|
|
944
|
+
interface GetOfflineOrderPreviewResponse {
|
|
945
|
+
/** The previewed order, as if the plan had been ordered. */
|
|
974
946
|
order?: Order;
|
|
947
|
+
/**
|
|
948
|
+
* Whether this previewed order would exceed the permitted amount of purchases available
|
|
949
|
+
* for this plan for this buyer.
|
|
950
|
+
*
|
|
951
|
+
* Always `false` for plans that do not have purchase limits.
|
|
952
|
+
*/
|
|
953
|
+
purchaseLimitExceeded?: boolean;
|
|
975
954
|
}
|
|
976
|
-
interface
|
|
955
|
+
interface GetPricePreviewRequest {
|
|
977
956
|
/**
|
|
978
|
-
*
|
|
957
|
+
* ID of plan to preview.
|
|
979
958
|
* @format GUID
|
|
980
959
|
*/
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
960
|
+
planId: string;
|
|
961
|
+
/**
|
|
962
|
+
* Coupon code to apply, from the Coupons API.
|
|
963
|
+
* @minLength 1
|
|
964
|
+
* @maxLength 20
|
|
965
|
+
*/
|
|
966
|
+
couponCode?: string | null;
|
|
984
967
|
}
|
|
985
|
-
interface
|
|
986
|
-
/**
|
|
987
|
-
|
|
968
|
+
interface GetPricePreviewResponse {
|
|
969
|
+
/**
|
|
970
|
+
* __Deprecated.__ Use `prices` instead. This property will be removed on September 30, 2022.
|
|
971
|
+
* @deprecated __Deprecated.__ Use `prices` instead. This property will be removed on September 30, 2022.
|
|
972
|
+
* @replacedBy prices
|
|
973
|
+
* @targetRemovalDate 2022-10-01
|
|
974
|
+
*/
|
|
975
|
+
price?: PriceDetails;
|
|
976
|
+
/** Pricing details. */
|
|
977
|
+
prices?: SpannedPrice[];
|
|
988
978
|
}
|
|
989
|
-
interface
|
|
979
|
+
interface ChangeStartDateRequest {
|
|
990
980
|
/**
|
|
991
|
-
*
|
|
981
|
+
* Draft order ID.
|
|
992
982
|
* @format GUID
|
|
993
983
|
*/
|
|
994
|
-
|
|
984
|
+
orderId?: string;
|
|
985
|
+
/** New valid from date (timestamp). */
|
|
986
|
+
startDate?: Date | null;
|
|
995
987
|
}
|
|
996
|
-
interface
|
|
988
|
+
interface ChangeStartDateResponse {
|
|
989
|
+
/** Updated draft order. */
|
|
990
|
+
order?: Order;
|
|
997
991
|
}
|
|
998
|
-
interface
|
|
999
|
-
/**
|
|
992
|
+
interface OrderStartDateChanged {
|
|
993
|
+
/** Order whose `startDate` changed. */
|
|
1000
994
|
order?: Order;
|
|
1001
995
|
}
|
|
1002
|
-
interface
|
|
996
|
+
interface ApplyCouponRequest {
|
|
1003
997
|
/**
|
|
1004
|
-
*
|
|
998
|
+
* Draft order ID.
|
|
1005
999
|
* @format GUID
|
|
1006
|
-
* @minSize 1
|
|
1007
|
-
* @maxSize 100
|
|
1008
1000
|
*/
|
|
1009
|
-
|
|
1010
|
-
/**
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
/** Bulk action metadata. */
|
|
1017
|
-
bulkActionMetadata?: BulkActionMetadata;
|
|
1001
|
+
orderId?: string;
|
|
1002
|
+
/**
|
|
1003
|
+
* Coupon code to apply.
|
|
1004
|
+
* @minLength 1
|
|
1005
|
+
* @maxLength 20
|
|
1006
|
+
*/
|
|
1007
|
+
couponCode?: string;
|
|
1018
1008
|
}
|
|
1019
|
-
interface
|
|
1020
|
-
/**
|
|
1021
|
-
itemMetadata?: ItemMetadata;
|
|
1022
|
-
/** The order. */
|
|
1009
|
+
interface ApplyCouponResponse {
|
|
1010
|
+
/** Order with applied coupon and recalculated tax. */
|
|
1023
1011
|
order?: Order;
|
|
1024
1012
|
}
|
|
1025
|
-
interface
|
|
1026
|
-
/** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
|
|
1027
|
-
id?: string | null;
|
|
1028
|
-
/** Index of the item within the request array. Allows for correlation between request and response items. */
|
|
1029
|
-
originalIndex?: number;
|
|
1030
|
-
/** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
|
|
1031
|
-
success?: boolean;
|
|
1032
|
-
/** Details about the error in case of failure. */
|
|
1033
|
-
error?: ApplicationError;
|
|
1034
|
-
}
|
|
1035
|
-
interface ApplicationError {
|
|
1036
|
-
/** Error code. */
|
|
1037
|
-
code?: string;
|
|
1038
|
-
/** Description of the error. */
|
|
1039
|
-
description?: string;
|
|
1040
|
-
/** Data related to the error. */
|
|
1041
|
-
data?: Record<string, any> | null;
|
|
1042
|
-
}
|
|
1043
|
-
interface BulkActionMetadata {
|
|
1044
|
-
/** Number of items that were successfully processed. */
|
|
1045
|
-
totalSuccesses?: number;
|
|
1046
|
-
/** Number of items that couldn't be processed. */
|
|
1047
|
-
totalFailures?: number;
|
|
1048
|
-
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
1049
|
-
undetailedFailures?: number;
|
|
1050
|
-
}
|
|
1051
|
-
interface ResumeOrderRequest {
|
|
1013
|
+
interface SetSubmissionRequest {
|
|
1052
1014
|
/**
|
|
1053
1015
|
* Order ID.
|
|
1054
1016
|
* @format GUID
|
|
1055
1017
|
*/
|
|
1056
|
-
|
|
1057
|
-
}
|
|
1058
|
-
interface ResumeOrderResponse {
|
|
1059
|
-
}
|
|
1060
|
-
interface OrderResumed {
|
|
1061
|
-
/** Resumed order. */
|
|
1062
|
-
order?: Order;
|
|
1063
|
-
}
|
|
1064
|
-
interface BulkResumeOrderRequest {
|
|
1018
|
+
orderId?: string;
|
|
1065
1019
|
/**
|
|
1066
|
-
*
|
|
1020
|
+
* Submission ID.
|
|
1067
1021
|
* @format GUID
|
|
1068
|
-
* @minSize 1
|
|
1069
|
-
* @maxSize 100
|
|
1070
1022
|
*/
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
/** Orders that were resumed. */
|
|
1077
|
-
results?: BulkOrderResult[];
|
|
1078
|
-
/** Bulk action metadata. */
|
|
1079
|
-
bulkActionMetadata?: BulkActionMetadata;
|
|
1023
|
+
submissionId?: string;
|
|
1024
|
+
}
|
|
1025
|
+
interface SetSubmissionResponse {
|
|
1026
|
+
/** Order with submission id */
|
|
1027
|
+
order?: Order;
|
|
1080
1028
|
}
|
|
1081
1029
|
interface MessageEnvelope {
|
|
1082
1030
|
/**
|
|
@@ -1169,321 +1117,373 @@ interface AccountInfo {
|
|
|
1169
1117
|
*/
|
|
1170
1118
|
siteId?: string | null;
|
|
1171
1119
|
}
|
|
1172
|
-
interface
|
|
1173
|
-
/**
|
|
1174
|
-
|
|
1175
|
-
* @format GUID
|
|
1176
|
-
*/
|
|
1177
|
-
planId: string;
|
|
1178
|
-
/**
|
|
1179
|
-
* Start date and time for the plan of the online order in a `YYYY-MM-DDThh:mm[:ss][.sss]Z` format.
|
|
1180
|
-
*
|
|
1181
|
-
* Default: Current date and time.
|
|
1182
|
-
*/
|
|
1183
|
-
startDate?: Date | null;
|
|
1184
|
-
/**
|
|
1185
|
-
* Coupon code to apply.
|
|
1186
|
-
* @minLength 1
|
|
1187
|
-
* @maxLength 20
|
|
1188
|
-
*/
|
|
1189
|
-
couponCode?: string | null;
|
|
1190
|
-
/** Provided if checkout is initiated on buyer's behalf. */
|
|
1191
|
-
onBehalf?: OnBehalf;
|
|
1192
|
-
/**
|
|
1193
|
-
* Submission ID of the form submitted with this order.
|
|
1194
|
-
*
|
|
1195
|
-
* The submission must belong to the form attached to the plan, and that form must belong to the Pricing Plans namespace.
|
|
1196
|
-
* An invalid submission ID is dropped and the order is created without a submission.
|
|
1197
|
-
* @format GUID
|
|
1198
|
-
*/
|
|
1199
|
-
submissionId?: string | null;
|
|
1120
|
+
interface OrderPurchased {
|
|
1121
|
+
/** Order that was paid for. If a free or an offline order, the order that was created. */
|
|
1122
|
+
order?: Order;
|
|
1200
1123
|
}
|
|
1201
|
-
interface
|
|
1202
|
-
/**
|
|
1203
|
-
|
|
1204
|
-
* @format GUID
|
|
1205
|
-
*/
|
|
1206
|
-
memberId?: string;
|
|
1207
|
-
/** Method by which checkout is initiated. */
|
|
1208
|
-
orderMethod?: OrderMethodWithLiterals;
|
|
1124
|
+
interface OrderStarted {
|
|
1125
|
+
/** Order that reached its `startDate`. */
|
|
1126
|
+
order?: Order;
|
|
1209
1127
|
}
|
|
1210
|
-
|
|
1211
|
-
|
|
1128
|
+
/**
|
|
1129
|
+
* Triggered at the start of a new payment cycle for an existing order.
|
|
1130
|
+
*
|
|
1131
|
+
* This webhook does not trigger at the initial start of an offline order.
|
|
1132
|
+
*/
|
|
1133
|
+
interface OrderCycleStarted {
|
|
1134
|
+
/** Order whose new cycle started. */
|
|
1212
1135
|
order?: Order;
|
|
1136
|
+
/** 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. */
|
|
1137
|
+
cycleNumber?: number;
|
|
1213
1138
|
}
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
planId?: string;
|
|
1139
|
+
/** Emitted when a recurring order is canceled for the next payment cycle */
|
|
1140
|
+
interface OrderAutoRenewCanceled {
|
|
1141
|
+
/** Order that is canceled, effective at the end of the current payment cycle. */
|
|
1142
|
+
order?: Order;
|
|
1219
1143
|
}
|
|
1220
|
-
interface
|
|
1144
|
+
interface OrderEnded {
|
|
1145
|
+
/** Order that ended. */
|
|
1146
|
+
order?: Order;
|
|
1147
|
+
}
|
|
1148
|
+
interface GetOrderRequest {
|
|
1221
1149
|
/**
|
|
1222
|
-
*
|
|
1150
|
+
* Order ID.
|
|
1223
1151
|
* @format GUID
|
|
1224
1152
|
*/
|
|
1225
|
-
|
|
1153
|
+
id: string;
|
|
1226
1154
|
/**
|
|
1227
|
-
*
|
|
1155
|
+
* Predefined set of fields to return.
|
|
1228
1156
|
*
|
|
1229
|
-
* Default:
|
|
1230
|
-
*/
|
|
1231
|
-
startDate?: Date | null;
|
|
1232
|
-
/**
|
|
1233
|
-
* Coupon code to apply.
|
|
1234
|
-
* @minLength 1
|
|
1235
|
-
* @maxLength 20
|
|
1236
|
-
*/
|
|
1237
|
-
couponCode?: string | null;
|
|
1238
|
-
/** Captcha data to prove you are not a robot */
|
|
1239
|
-
captcha?: Captcha;
|
|
1240
|
-
/** Visitor info */
|
|
1241
|
-
guest?: Guest;
|
|
1242
|
-
/**
|
|
1243
|
-
* Form submission id that was submitted together with the order
|
|
1244
|
-
* @format GUID
|
|
1157
|
+
* Default: If `fieldSet` is omitted, no order form submission data is returned.
|
|
1245
1158
|
*/
|
|
1246
|
-
|
|
1247
|
-
}
|
|
1248
|
-
interface Captcha {
|
|
1249
|
-
/** Token from captcha */
|
|
1250
|
-
token?: string;
|
|
1159
|
+
fieldSet?: SetWithLiterals;
|
|
1251
1160
|
}
|
|
1252
|
-
|
|
1253
|
-
/**
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1161
|
+
declare enum Set {
|
|
1162
|
+
/** Same behavior as `BASIC`.` */
|
|
1163
|
+
UNKNOWN_SET = "UNKNOWN_SET",
|
|
1164
|
+
/** Doesn't return any order form submission data. */
|
|
1165
|
+
BASIC = "BASIC",
|
|
1166
|
+
/** Returns all order form submission data. */
|
|
1167
|
+
FULL = "FULL"
|
|
1258
1168
|
}
|
|
1259
|
-
|
|
1169
|
+
/** @enumType */
|
|
1170
|
+
type SetWithLiterals = Set | 'UNKNOWN_SET' | 'BASIC' | 'FULL';
|
|
1171
|
+
interface GetOrderResponse {
|
|
1260
1172
|
/** Order. */
|
|
1261
1173
|
order?: Order;
|
|
1262
1174
|
}
|
|
1263
|
-
interface
|
|
1175
|
+
interface ListOrdersRequest {
|
|
1264
1176
|
/**
|
|
1265
|
-
*
|
|
1177
|
+
* Filter by a buyer's member ID, from the Members API.
|
|
1266
1178
|
* @format GUID
|
|
1267
1179
|
*/
|
|
1268
|
-
|
|
1180
|
+
buyerIds?: string[];
|
|
1269
1181
|
/**
|
|
1270
|
-
*
|
|
1182
|
+
* Filter by plan IDs, from the Plans API.
|
|
1271
1183
|
* @format GUID
|
|
1272
1184
|
*/
|
|
1273
|
-
|
|
1185
|
+
planIds?: string[];
|
|
1186
|
+
/** Filter by whether or not the auto-renewal of recurring orders was canceled. */
|
|
1187
|
+
autoRenewCanceled?: boolean | null;
|
|
1188
|
+
/** Filter by order status. */
|
|
1189
|
+
orderStatuses?: OrderStatusWithLiterals[];
|
|
1190
|
+
/** Filter by payment status. */
|
|
1191
|
+
paymentStatuses?: PaymentStatusWithLiterals[];
|
|
1274
1192
|
/**
|
|
1275
|
-
*
|
|
1193
|
+
* Number of orders to return. See Sorting and Paging for more information.
|
|
1276
1194
|
*
|
|
1277
|
-
*
|
|
1195
|
+
* Max: `50`
|
|
1196
|
+
* @min 1
|
|
1197
|
+
* @max 50
|
|
1278
1198
|
*/
|
|
1279
|
-
|
|
1199
|
+
limit?: number | null;
|
|
1200
|
+
/** Number of orders to skip in the current sort order. */
|
|
1201
|
+
offset?: number | null;
|
|
1280
1202
|
/**
|
|
1281
|
-
*
|
|
1203
|
+
* Sort order.
|
|
1282
1204
|
*
|
|
1283
|
-
*
|
|
1284
|
-
*/
|
|
1285
|
-
paid?: boolean | null;
|
|
1286
|
-
/**
|
|
1287
|
-
* Coupon code to apply, from the Coupons API.
|
|
1288
|
-
* @minLength 1
|
|
1289
|
-
* @maxLength 20
|
|
1290
|
-
*/
|
|
1291
|
-
couponCode?: string | null;
|
|
1292
|
-
/**
|
|
1293
|
-
* Form submission ID that was submitted with the order.
|
|
1205
|
+
* Use `ASC` for ascending order or `DESC` for descending order.
|
|
1294
1206
|
*
|
|
1295
|
-
*
|
|
1296
|
-
* An invalid submission ID is dropped and the order is created without a submission.
|
|
1297
|
-
* @format GUID
|
|
1207
|
+
* Default: `DESC`.
|
|
1298
1208
|
*/
|
|
1299
|
-
|
|
1300
|
-
}
|
|
1301
|
-
interface CreateOfflineOrderResponse {
|
|
1302
|
-
/** Order. */
|
|
1303
|
-
order?: Order;
|
|
1304
|
-
}
|
|
1305
|
-
interface CreateExternalOrderRequest {
|
|
1209
|
+
sorting?: Sorting;
|
|
1306
1210
|
/**
|
|
1307
|
-
*
|
|
1308
|
-
*
|
|
1211
|
+
* Predefined set of fields to return.
|
|
1212
|
+
*
|
|
1213
|
+
* Default: If `fieldSet` is omitted, no order form submission data is returned.
|
|
1309
1214
|
*/
|
|
1310
|
-
|
|
1215
|
+
fieldSet?: SetWithLiterals;
|
|
1311
1216
|
/**
|
|
1312
|
-
*
|
|
1217
|
+
* Filter by order IDs.
|
|
1218
|
+
* @internal
|
|
1313
1219
|
* @format GUID
|
|
1220
|
+
* @maxSize 50
|
|
1314
1221
|
*/
|
|
1315
|
-
|
|
1316
|
-
}
|
|
1317
|
-
interface CreateExternalOrderResponse {
|
|
1318
|
-
/** Created order */
|
|
1319
|
-
order?: Order;
|
|
1222
|
+
orderIds?: string[];
|
|
1320
1223
|
}
|
|
1321
|
-
interface
|
|
1224
|
+
interface Sorting {
|
|
1322
1225
|
/**
|
|
1323
|
-
*
|
|
1324
|
-
* @
|
|
1226
|
+
* Name of the field to sort by.
|
|
1227
|
+
* @maxLength 512
|
|
1325
1228
|
*/
|
|
1326
|
-
|
|
1229
|
+
fieldName?: string;
|
|
1230
|
+
/** Sort order. */
|
|
1231
|
+
order?: SortOrderWithLiterals;
|
|
1327
1232
|
/**
|
|
1328
|
-
*
|
|
1233
|
+
* When `field_name` is a property of repeated field that is marked as `MATCH_ITEMS` and sort should be done by
|
|
1234
|
+
* a specific element from a collection, filter can/should be provided to ensure correct sort value is picked.
|
|
1329
1235
|
*
|
|
1330
|
-
*
|
|
1236
|
+
* If multiple filters are provided, they are combined with AND operator.
|
|
1237
|
+
*
|
|
1238
|
+
* Example:
|
|
1239
|
+
* Given we have document like {"id": "1", "nestedField": [{"price": 10, "region": "EU"}, {"price": 20, "region": "US"}]}
|
|
1240
|
+
* and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be
|
|
1241
|
+
* { fieldName: "nestedField.price", "select_items_by": [{"nestedField.region": "US"}] }
|
|
1242
|
+
* @internal
|
|
1243
|
+
* @maxSize 10
|
|
1331
1244
|
*/
|
|
1332
|
-
|
|
1245
|
+
selectItemsBy?: Record<string, any>[] | null;
|
|
1333
1246
|
/**
|
|
1334
|
-
*
|
|
1335
|
-
*
|
|
1336
|
-
* @maxLength 20
|
|
1247
|
+
* Origin point for geo-distance sorting on a GEO field
|
|
1248
|
+
* results are ordered by distance from this point (ASC = nearest first, DESC = farthest first).
|
|
1337
1249
|
*/
|
|
1338
|
-
|
|
1250
|
+
origin?: AddressLocation;
|
|
1339
1251
|
}
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
/** Whether the member has already reached purchase limit for the order's plan. */
|
|
1344
|
-
purchaseLimitExceeded?: boolean;
|
|
1252
|
+
declare enum SortOrder {
|
|
1253
|
+
ASC = "ASC",
|
|
1254
|
+
DESC = "DESC"
|
|
1345
1255
|
}
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1256
|
+
/** @enumType */
|
|
1257
|
+
type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
|
|
1258
|
+
interface AddressLocation {
|
|
1259
|
+
/** Address latitude. */
|
|
1260
|
+
latitude?: number | null;
|
|
1261
|
+
/** Address longitude. */
|
|
1262
|
+
longitude?: number | null;
|
|
1263
|
+
}
|
|
1264
|
+
interface ListOrdersResponse {
|
|
1265
|
+
/** List of orders. */
|
|
1266
|
+
orders?: Order[];
|
|
1267
|
+
/** Object containing paging-related data (number of orders returned, offset). */
|
|
1268
|
+
pagingMetadata?: PagingMetadataV2;
|
|
1269
|
+
}
|
|
1270
|
+
interface PagingMetadataV2 {
|
|
1271
|
+
/** Number of items returned in the response. */
|
|
1272
|
+
count?: number | null;
|
|
1273
|
+
/** Offset that was requested. */
|
|
1274
|
+
offset?: number | null;
|
|
1275
|
+
/** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
|
|
1276
|
+
total?: number | null;
|
|
1277
|
+
/** Flag that indicates the server failed to calculate the `total` field. */
|
|
1278
|
+
tooManyToCount?: boolean | null;
|
|
1279
|
+
/** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
|
|
1280
|
+
cursors?: Cursors;
|
|
1352
1281
|
/**
|
|
1353
|
-
*
|
|
1354
|
-
*
|
|
1355
|
-
*
|
|
1282
|
+
* Indicates if there are more results after the current page.
|
|
1283
|
+
* If `true`, another page of results can be retrieved.
|
|
1284
|
+
* If `false`, this is the last page.
|
|
1285
|
+
* @internal
|
|
1356
1286
|
*/
|
|
1357
|
-
|
|
1287
|
+
hasNext?: boolean | null;
|
|
1288
|
+
}
|
|
1289
|
+
interface Cursors {
|
|
1358
1290
|
/**
|
|
1359
|
-
*
|
|
1360
|
-
* @
|
|
1361
|
-
* @maxLength 20
|
|
1291
|
+
* Cursor string pointing to the next page in the list of results.
|
|
1292
|
+
* @maxLength 16000
|
|
1362
1293
|
*/
|
|
1363
|
-
|
|
1294
|
+
next?: string | null;
|
|
1364
1295
|
/**
|
|
1365
|
-
*
|
|
1366
|
-
* @
|
|
1296
|
+
* Cursor pointing to the previous page in the list of results.
|
|
1297
|
+
* @maxLength 16000
|
|
1367
1298
|
*/
|
|
1368
|
-
|
|
1299
|
+
prev?: string | null;
|
|
1369
1300
|
}
|
|
1370
|
-
interface
|
|
1371
|
-
/** Will be missing if limit is exceeded */
|
|
1372
|
-
order?: Order;
|
|
1373
|
-
/**
|
|
1374
|
-
* Whether the purchase limit has already been reached for this plan by this email.
|
|
1375
|
-
* Always false for plans without purchase limits.
|
|
1376
|
-
*/
|
|
1377
|
-
purchaseLimitExceeded?: boolean;
|
|
1301
|
+
interface GetOrdersStatsRequest {
|
|
1378
1302
|
}
|
|
1379
|
-
interface
|
|
1303
|
+
interface GetOrdersStatsResponse {
|
|
1304
|
+
/** Total number of orders. */
|
|
1305
|
+
totalOrderCount?: number;
|
|
1306
|
+
/** Number of active orders. */
|
|
1307
|
+
activeOrderCount?: number;
|
|
1308
|
+
}
|
|
1309
|
+
interface GetAvailableOrderActionsRequest {
|
|
1380
1310
|
/**
|
|
1381
|
-
* ID
|
|
1311
|
+
* Order ID.
|
|
1382
1312
|
* @format GUID
|
|
1383
1313
|
*/
|
|
1384
|
-
|
|
1314
|
+
id?: string;
|
|
1315
|
+
}
|
|
1316
|
+
interface GetAvailableOrderActionsResponse {
|
|
1317
|
+
/** Whether the order can be suspended. */
|
|
1318
|
+
suspendable?: boolean;
|
|
1319
|
+
/** If the order cannot be suspended, a reason is returned here. */
|
|
1320
|
+
notSuspendableReason?: ReasonNotSuspendableWithLiterals;
|
|
1321
|
+
/** Whether the order can be canceled by the buyer. */
|
|
1322
|
+
cancelableByBuyer?: boolean;
|
|
1323
|
+
}
|
|
1324
|
+
declare enum ReasonNotSuspendable {
|
|
1325
|
+
/** Undefined reason. */
|
|
1326
|
+
UNDEFINED = "UNDEFINED",
|
|
1327
|
+
/** Saved in the database but is awaiting payment. Non-active orders can't be suspended. */
|
|
1328
|
+
PENDING = "PENDING",
|
|
1329
|
+
/** Trial orders can't be suspended. */
|
|
1330
|
+
TRIAL = "TRIAL",
|
|
1331
|
+
/** Canceled orders can't be suspended. */
|
|
1332
|
+
CANCELED = "CANCELED",
|
|
1333
|
+
/** Ended orders can't be suspended. */
|
|
1334
|
+
ENDED = "ENDED",
|
|
1335
|
+
/** Paid for orders with future start dates can't be suspended. */
|
|
1336
|
+
NOT_STARTED = "NOT_STARTED",
|
|
1337
|
+
/** Order is already suspended. */
|
|
1338
|
+
ALREADY_SUSPENDED = "ALREADY_SUSPENDED",
|
|
1339
|
+
/** Orders based on recurring payments using older stripe versions can't be suspended. */
|
|
1340
|
+
OLD_STRIPE = "OLD_STRIPE"
|
|
1341
|
+
}
|
|
1342
|
+
/** @enumType */
|
|
1343
|
+
type ReasonNotSuspendableWithLiterals = ReasonNotSuspendable | 'UNDEFINED' | 'PENDING' | 'TRIAL' | 'CANCELED' | 'ENDED' | 'NOT_STARTED' | 'ALREADY_SUSPENDED' | 'OLD_STRIPE';
|
|
1344
|
+
interface PostponeEndDateRequest {
|
|
1385
1345
|
/**
|
|
1386
|
-
*
|
|
1346
|
+
* Order ID.
|
|
1387
1347
|
* @format GUID
|
|
1388
1348
|
*/
|
|
1389
|
-
|
|
1349
|
+
id: string;
|
|
1390
1350
|
/**
|
|
1391
|
-
*
|
|
1351
|
+
* New end date and time.
|
|
1392
1352
|
*
|
|
1393
|
-
*
|
|
1394
|
-
*/
|
|
1395
|
-
startDate?: Date | null;
|
|
1396
|
-
/**
|
|
1397
|
-
* Coupon code to apply, from the Coupons API.
|
|
1398
|
-
* @minLength 1
|
|
1399
|
-
* @maxLength 20
|
|
1353
|
+
* Must be later than the current end date and time.
|
|
1400
1354
|
*/
|
|
1401
|
-
|
|
1355
|
+
endDate: Date | null;
|
|
1402
1356
|
}
|
|
1403
|
-
interface
|
|
1404
|
-
|
|
1357
|
+
interface PostponeEndDateResponse {
|
|
1358
|
+
}
|
|
1359
|
+
interface OrderEndDatePostponed {
|
|
1360
|
+
/** Order whose `endDate` was postponed. */
|
|
1405
1361
|
order?: Order;
|
|
1406
|
-
/**
|
|
1407
|
-
* Whether this previewed order would exceed the permitted amount of purchases available
|
|
1408
|
-
* for this plan for this buyer.
|
|
1409
|
-
*
|
|
1410
|
-
* Always `false` for plans that do not have purchase limits.
|
|
1411
|
-
*/
|
|
1412
|
-
purchaseLimitExceeded?: boolean;
|
|
1413
1362
|
}
|
|
1414
|
-
interface
|
|
1363
|
+
interface CancelOrderRequest {
|
|
1415
1364
|
/**
|
|
1416
|
-
* ID
|
|
1365
|
+
* Order ID.
|
|
1417
1366
|
* @format GUID
|
|
1418
1367
|
*/
|
|
1419
|
-
|
|
1420
|
-
/**
|
|
1421
|
-
|
|
1422
|
-
* @minLength 1
|
|
1423
|
-
* @maxLength 20
|
|
1424
|
-
*/
|
|
1425
|
-
couponCode?: string | null;
|
|
1368
|
+
id: string;
|
|
1369
|
+
/** __Required.__ When the order will be canceled. One-time orders can only be canceled `IMMEDIATELY`. */
|
|
1370
|
+
effectiveAt: CancellationEffectiveAtWithLiterals;
|
|
1426
1371
|
}
|
|
1427
|
-
interface
|
|
1428
|
-
/**
|
|
1429
|
-
* __Deprecated.__ Use `prices` instead. This property will be removed on September 30, 2022.
|
|
1430
|
-
* @deprecated __Deprecated.__ Use `prices` instead. This property will be removed on September 30, 2022.
|
|
1431
|
-
* @replacedBy prices
|
|
1432
|
-
* @targetRemovalDate 2022-10-01
|
|
1433
|
-
*/
|
|
1434
|
-
price?: PriceDetails;
|
|
1435
|
-
/** Pricing details. */
|
|
1436
|
-
prices?: SpannedPrice[];
|
|
1372
|
+
interface CancelOrderResponse {
|
|
1437
1373
|
}
|
|
1438
|
-
|
|
1374
|
+
/**
|
|
1375
|
+
* Emitted when an order is canceled immediately or when cycle ends for an order with canceled auto renewal
|
|
1376
|
+
*
|
|
1377
|
+
* To determine the specific reason of the cancellation check `order.cancellation.cause` field.
|
|
1378
|
+
*/
|
|
1379
|
+
interface OrderCanceled {
|
|
1380
|
+
/** Canceled order. */
|
|
1381
|
+
order?: Order;
|
|
1382
|
+
}
|
|
1383
|
+
interface MarkAsPaidRequest {
|
|
1439
1384
|
/**
|
|
1440
|
-
*
|
|
1385
|
+
* Order ID.
|
|
1441
1386
|
* @format GUID
|
|
1442
1387
|
*/
|
|
1443
|
-
|
|
1444
|
-
/** New valid from date (timestamp). */
|
|
1445
|
-
startDate?: Date | null;
|
|
1388
|
+
id: string;
|
|
1446
1389
|
}
|
|
1447
|
-
interface
|
|
1448
|
-
/** Updated draft order. */
|
|
1449
|
-
order?: Order;
|
|
1390
|
+
interface MarkAsPaidResponse {
|
|
1450
1391
|
}
|
|
1451
|
-
interface
|
|
1452
|
-
/** Order
|
|
1392
|
+
interface OrderMarkedAsPaid {
|
|
1393
|
+
/** Order that was marked as paid. */
|
|
1453
1394
|
order?: Order;
|
|
1454
1395
|
}
|
|
1455
|
-
interface
|
|
1396
|
+
interface PauseOrderRequest {
|
|
1456
1397
|
/**
|
|
1457
|
-
*
|
|
1398
|
+
* Order ID.
|
|
1458
1399
|
* @format GUID
|
|
1459
1400
|
*/
|
|
1460
|
-
|
|
1401
|
+
id: string;
|
|
1402
|
+
}
|
|
1403
|
+
interface PauseOrderResponse {
|
|
1404
|
+
}
|
|
1405
|
+
interface OrderPaused {
|
|
1406
|
+
/** Paused order. */
|
|
1407
|
+
order?: Order;
|
|
1408
|
+
}
|
|
1409
|
+
interface BulkPauseOrderRequest {
|
|
1461
1410
|
/**
|
|
1462
|
-
*
|
|
1463
|
-
* @
|
|
1464
|
-
* @
|
|
1411
|
+
* List of Order IDs.
|
|
1412
|
+
* @format GUID
|
|
1413
|
+
* @minSize 1
|
|
1414
|
+
* @maxSize 100
|
|
1465
1415
|
*/
|
|
1466
|
-
|
|
1416
|
+
ids?: string[];
|
|
1417
|
+
/** Set to true to return Order entity in response. */
|
|
1418
|
+
returnFullEntity?: boolean;
|
|
1467
1419
|
}
|
|
1468
|
-
interface
|
|
1469
|
-
/**
|
|
1420
|
+
interface BulkPauseOrderResponse {
|
|
1421
|
+
/** Orders that were paused. */
|
|
1422
|
+
results?: BulkOrderResult[];
|
|
1423
|
+
/** Bulk action metadata. */
|
|
1424
|
+
bulkActionMetadata?: BulkActionMetadata;
|
|
1425
|
+
}
|
|
1426
|
+
interface BulkOrderResult {
|
|
1427
|
+
/** Item metadata */
|
|
1428
|
+
itemMetadata?: ItemMetadata;
|
|
1429
|
+
/** The order. */
|
|
1470
1430
|
order?: Order;
|
|
1471
1431
|
}
|
|
1472
|
-
interface
|
|
1432
|
+
interface ItemMetadata {
|
|
1433
|
+
/** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
|
|
1434
|
+
id?: string | null;
|
|
1435
|
+
/** Index of the item within the request array. Allows for correlation between request and response items. */
|
|
1436
|
+
originalIndex?: number;
|
|
1437
|
+
/** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
|
|
1438
|
+
success?: boolean;
|
|
1439
|
+
/** Details about the error in case of failure. */
|
|
1440
|
+
error?: ApplicationError;
|
|
1441
|
+
}
|
|
1442
|
+
interface ApplicationError {
|
|
1443
|
+
/** Error code. */
|
|
1444
|
+
code?: string;
|
|
1445
|
+
/** Description of the error. */
|
|
1446
|
+
description?: string;
|
|
1447
|
+
/** Data related to the error. */
|
|
1448
|
+
data?: Record<string, any> | null;
|
|
1449
|
+
}
|
|
1450
|
+
interface BulkActionMetadata {
|
|
1451
|
+
/** Number of items that were successfully processed. */
|
|
1452
|
+
totalSuccesses?: number;
|
|
1453
|
+
/** Number of items that couldn't be processed. */
|
|
1454
|
+
totalFailures?: number;
|
|
1455
|
+
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
1456
|
+
undetailedFailures?: number;
|
|
1457
|
+
}
|
|
1458
|
+
interface ResumeOrderRequest {
|
|
1473
1459
|
/**
|
|
1474
1460
|
* Order ID.
|
|
1475
1461
|
* @format GUID
|
|
1476
1462
|
*/
|
|
1477
|
-
|
|
1463
|
+
id: string;
|
|
1464
|
+
}
|
|
1465
|
+
interface ResumeOrderResponse {
|
|
1466
|
+
}
|
|
1467
|
+
interface OrderResumed {
|
|
1468
|
+
/** Resumed order. */
|
|
1469
|
+
order?: Order;
|
|
1470
|
+
}
|
|
1471
|
+
interface BulkResumeOrderRequest {
|
|
1478
1472
|
/**
|
|
1479
|
-
*
|
|
1473
|
+
* List of Order IDs.
|
|
1480
1474
|
* @format GUID
|
|
1475
|
+
* @minSize 1
|
|
1476
|
+
* @maxSize 100
|
|
1481
1477
|
*/
|
|
1482
|
-
|
|
1478
|
+
ids?: string[];
|
|
1479
|
+
/** Set to true to return Order entity in response. */
|
|
1480
|
+
returnFullEntity?: boolean;
|
|
1483
1481
|
}
|
|
1484
|
-
interface
|
|
1485
|
-
/**
|
|
1486
|
-
|
|
1482
|
+
interface BulkResumeOrderResponse {
|
|
1483
|
+
/** Orders that were resumed. */
|
|
1484
|
+
results?: BulkOrderResult[];
|
|
1485
|
+
/** Bulk action metadata. */
|
|
1486
|
+
bulkActionMetadata?: BulkActionMetadata;
|
|
1487
1487
|
}
|
|
1488
1488
|
interface MemberGetOrderRequest {
|
|
1489
1489
|
/**
|
|
@@ -1855,6 +1855,11 @@ type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q
|
|
|
1855
1855
|
__responseType: Q;
|
|
1856
1856
|
__originalResponseType: R;
|
|
1857
1857
|
};
|
|
1858
|
+
declare function createOnlineOrder(): __PublicMethodMetaInfo<'POST', {}, CreateOnlineOrderRequest$1, CreateOnlineOrderRequest, CreateOnlineOrderResponse$1, CreateOnlineOrderResponse>;
|
|
1859
|
+
declare function createOfflineOrder(): __PublicMethodMetaInfo<'POST', {}, CreateOfflineOrderRequest$1, CreateOfflineOrderRequest, CreateOfflineOrderResponse$1, CreateOfflineOrderResponse>;
|
|
1860
|
+
declare function getOnlineOrderPreview(): __PublicMethodMetaInfo<'POST', {}, GetOnlineOrderPreviewRequest$1, GetOnlineOrderPreviewRequest, GetOnlineOrderPreviewResponse$1, GetOnlineOrderPreviewResponse>;
|
|
1861
|
+
declare function getOfflineOrderPreview(): __PublicMethodMetaInfo<'POST', {}, GetOfflineOrderPreviewRequest$1, GetOfflineOrderPreviewRequest, GetOfflineOrderPreviewResponse$1, GetOfflineOrderPreviewResponse>;
|
|
1862
|
+
declare function getPricePreview(): __PublicMethodMetaInfo<'POST', {}, GetPricePreviewRequest$1, GetPricePreviewRequest, GetPricePreviewResponse$1, GetPricePreviewResponse>;
|
|
1858
1863
|
declare function managementGetOrder(): __PublicMethodMetaInfo<'GET', {
|
|
1859
1864
|
id: string;
|
|
1860
1865
|
}, GetOrderRequest$1, GetOrderRequest, GetOrderResponse$1, GetOrderResponse>;
|
|
@@ -1874,11 +1879,6 @@ declare function pauseOrder(): __PublicMethodMetaInfo<'POST', {
|
|
|
1874
1879
|
declare function resumeOrder(): __PublicMethodMetaInfo<'POST', {
|
|
1875
1880
|
id: string;
|
|
1876
1881
|
}, ResumeOrderRequest$1, ResumeOrderRequest, ResumeOrderResponse$1, ResumeOrderResponse>;
|
|
1877
|
-
declare function createOnlineOrder(): __PublicMethodMetaInfo<'POST', {}, CreateOnlineOrderRequest$1, CreateOnlineOrderRequest, CreateOnlineOrderResponse$1, CreateOnlineOrderResponse>;
|
|
1878
|
-
declare function createOfflineOrder(): __PublicMethodMetaInfo<'POST', {}, CreateOfflineOrderRequest$1, CreateOfflineOrderRequest, CreateOfflineOrderResponse$1, CreateOfflineOrderResponse>;
|
|
1879
|
-
declare function getOnlineOrderPreview(): __PublicMethodMetaInfo<'POST', {}, GetOnlineOrderPreviewRequest$1, GetOnlineOrderPreviewRequest, GetOnlineOrderPreviewResponse$1, GetOnlineOrderPreviewResponse>;
|
|
1880
|
-
declare function getOfflineOrderPreview(): __PublicMethodMetaInfo<'POST', {}, GetOfflineOrderPreviewRequest$1, GetOfflineOrderPreviewRequest, GetOfflineOrderPreviewResponse$1, GetOfflineOrderPreviewResponse>;
|
|
1881
|
-
declare function getPricePreview(): __PublicMethodMetaInfo<'POST', {}, GetPricePreviewRequest$1, GetPricePreviewRequest, GetPricePreviewResponse$1, GetPricePreviewResponse>;
|
|
1882
1882
|
declare function memberGetOrder(): __PublicMethodMetaInfo<'GET', {
|
|
1883
1883
|
id: string;
|
|
1884
1884
|
}, MemberGetOrderRequest$1, MemberGetOrderRequest, MemberGetOrderResponse$1, MemberGetOrderResponse>;
|