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