@wix/auto_sdk_pricing-plans_orders 1.0.143 → 1.0.144
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 +507 -507
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +772 -772
- package/build/cjs/index.typings.js +405 -405
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +487 -487
- package/build/cjs/meta.js +329 -329
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +129 -129
- package/build/es/index.mjs +507 -507
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +772 -772
- package/build/es/index.typings.mjs +405 -405
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +487 -487
- package/build/es/meta.mjs +329 -329
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +129 -129
- package/build/internal/cjs/index.typings.d.ts +797 -797
- package/build/internal/cjs/meta.d.ts +504 -504
- package/build/internal/es/index.d.mts +129 -129
- package/build/internal/es/index.typings.d.mts +797 -797
- package/build/internal/es/meta.d.mts +504 -504
- package/package.json +2 -2
|
@@ -626,314 +626,345 @@ interface ActionEvent {
|
|
|
626
626
|
}
|
|
627
627
|
interface Empty {
|
|
628
628
|
}
|
|
629
|
-
interface
|
|
630
|
-
/**
|
|
631
|
-
|
|
632
|
-
* @format GUID
|
|
633
|
-
*/
|
|
634
|
-
planId: string;
|
|
635
|
-
/**
|
|
636
|
-
* Start date and time for the plan of the online order in a `YYYY-MM-DDThh:mm[:ss][.sss]Z` format.
|
|
637
|
-
*
|
|
638
|
-
* Default: Current date and time.
|
|
639
|
-
*/
|
|
640
|
-
startDate?: Date | null;
|
|
641
|
-
/**
|
|
642
|
-
* Coupon code to apply.
|
|
643
|
-
* @minLength 1
|
|
644
|
-
* @maxLength 20
|
|
645
|
-
*/
|
|
646
|
-
couponCode?: string | null;
|
|
647
|
-
/** Provided if checkout is initiated on buyer's behalf. */
|
|
648
|
-
onBehalf?: OnBehalf;
|
|
649
|
-
/**
|
|
650
|
-
* Submission ID of the form submitted with this order.
|
|
651
|
-
*
|
|
652
|
-
* The submission must belong to the form attached to the plan, and that form must belong to the Pricing Plans namespace.
|
|
653
|
-
* An invalid submission ID is dropped and the order is created without a submission.
|
|
654
|
-
* @format GUID
|
|
655
|
-
*/
|
|
656
|
-
submissionId?: string | null;
|
|
629
|
+
interface OrderPurchased {
|
|
630
|
+
/** Order that was paid for. If a free or an offline order, the order that was created. */
|
|
631
|
+
order?: Order;
|
|
657
632
|
}
|
|
658
|
-
interface
|
|
659
|
-
/**
|
|
660
|
-
|
|
661
|
-
* @format GUID
|
|
662
|
-
*/
|
|
663
|
-
memberId?: string;
|
|
664
|
-
/** Method by which checkout is initiated. */
|
|
665
|
-
orderMethod?: OrderMethodWithLiterals;
|
|
633
|
+
interface OrderStarted {
|
|
634
|
+
/** Order that reached its `startDate`. */
|
|
635
|
+
order?: Order;
|
|
666
636
|
}
|
|
667
|
-
|
|
668
|
-
|
|
637
|
+
/**
|
|
638
|
+
* Triggered at the start of a new payment cycle for an existing order.
|
|
639
|
+
*
|
|
640
|
+
* This webhook does not trigger at the initial start of an offline order.
|
|
641
|
+
*/
|
|
642
|
+
interface OrderCycleStarted {
|
|
643
|
+
/** Order whose new cycle started. */
|
|
669
644
|
order?: Order;
|
|
645
|
+
/** Number of the payment cycle will be 0 when the order is in the free trial period. In other cases, the cycle number starts from 1. */
|
|
646
|
+
cycleNumber?: number;
|
|
670
647
|
}
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
planId?: string;
|
|
648
|
+
/** Emitted when a recurring order is canceled for the next payment cycle */
|
|
649
|
+
interface OrderAutoRenewCanceled {
|
|
650
|
+
/** Order that is canceled, effective at the end of the current payment cycle. */
|
|
651
|
+
order?: Order;
|
|
676
652
|
}
|
|
677
|
-
interface
|
|
653
|
+
interface OrderEnded {
|
|
654
|
+
/** Order that ended. */
|
|
655
|
+
order?: Order;
|
|
656
|
+
}
|
|
657
|
+
interface GetOrderRequest {
|
|
678
658
|
/**
|
|
679
|
-
*
|
|
659
|
+
* Order ID.
|
|
680
660
|
* @format GUID
|
|
681
661
|
*/
|
|
682
|
-
|
|
662
|
+
_id: string;
|
|
683
663
|
/**
|
|
684
|
-
*
|
|
664
|
+
* Predefined set of fields to return.
|
|
685
665
|
*
|
|
686
|
-
* Default:
|
|
687
|
-
*/
|
|
688
|
-
startDate?: Date | null;
|
|
689
|
-
/**
|
|
690
|
-
* Coupon code to apply.
|
|
691
|
-
* @minLength 1
|
|
692
|
-
* @maxLength 20
|
|
693
|
-
*/
|
|
694
|
-
couponCode?: string | null;
|
|
695
|
-
/** Captcha data to prove you are not a robot */
|
|
696
|
-
captcha?: Captcha;
|
|
697
|
-
/** Visitor info */
|
|
698
|
-
guest?: Guest;
|
|
699
|
-
/**
|
|
700
|
-
* Form submission id that was submitted together with the order
|
|
701
|
-
* @format GUID
|
|
666
|
+
* Default: If `fieldSet` is omitted, no order form submission data is returned.
|
|
702
667
|
*/
|
|
703
|
-
|
|
704
|
-
}
|
|
705
|
-
interface Captcha {
|
|
706
|
-
/** Token from captcha */
|
|
707
|
-
token?: string;
|
|
668
|
+
fieldSet?: SetWithLiterals;
|
|
708
669
|
}
|
|
709
|
-
|
|
710
|
-
/**
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
670
|
+
declare enum Set {
|
|
671
|
+
/** Same behavior as `BASIC`.` */
|
|
672
|
+
UNKNOWN_SET = "UNKNOWN_SET",
|
|
673
|
+
/** Doesn't return any order form submission data. */
|
|
674
|
+
BASIC = "BASIC",
|
|
675
|
+
/** Returns all order form submission data. */
|
|
676
|
+
FULL = "FULL"
|
|
715
677
|
}
|
|
716
|
-
|
|
678
|
+
/** @enumType */
|
|
679
|
+
type SetWithLiterals = Set | 'UNKNOWN_SET' | 'BASIC' | 'FULL';
|
|
680
|
+
interface GetOrderResponse {
|
|
717
681
|
/** Order. */
|
|
718
682
|
order?: Order;
|
|
719
683
|
}
|
|
720
|
-
interface
|
|
684
|
+
interface ListOrdersRequest {
|
|
721
685
|
/**
|
|
722
|
-
*
|
|
686
|
+
* Filter by a buyer's member ID, from the Members API.
|
|
723
687
|
* @format GUID
|
|
724
688
|
*/
|
|
725
|
-
|
|
689
|
+
buyerIds?: string[];
|
|
726
690
|
/**
|
|
727
|
-
*
|
|
691
|
+
* Filter by plan IDs, from the Plans API.
|
|
728
692
|
* @format GUID
|
|
729
693
|
*/
|
|
730
|
-
|
|
694
|
+
planIds?: string[];
|
|
695
|
+
/** Filter by whether or not the auto-renewal of recurring orders was canceled. */
|
|
696
|
+
autoRenewCanceled?: boolean | null;
|
|
697
|
+
/** Filter by order status. */
|
|
698
|
+
orderStatuses?: OrderStatusWithLiterals[];
|
|
699
|
+
/** Filter by payment status. */
|
|
700
|
+
paymentStatuses?: PaymentStatusWithLiterals[];
|
|
731
701
|
/**
|
|
732
|
-
*
|
|
702
|
+
* Number of orders to return. See Sorting and Paging for more information.
|
|
733
703
|
*
|
|
734
|
-
*
|
|
704
|
+
* Max: `50`
|
|
705
|
+
* @min 1
|
|
706
|
+
* @max 50
|
|
735
707
|
*/
|
|
736
|
-
|
|
708
|
+
limit?: number | null;
|
|
709
|
+
/** Number of orders to skip in the current sort order. */
|
|
710
|
+
offset?: number | null;
|
|
737
711
|
/**
|
|
738
|
-
*
|
|
712
|
+
* Sort order.
|
|
739
713
|
*
|
|
740
|
-
*
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
/**
|
|
744
|
-
* Coupon code to apply, from the Coupons API.
|
|
745
|
-
* @minLength 1
|
|
746
|
-
* @maxLength 20
|
|
714
|
+
* Use `ASC` for ascending order or `DESC` for descending order.
|
|
715
|
+
*
|
|
716
|
+
* Default: `DESC`.
|
|
747
717
|
*/
|
|
748
|
-
|
|
718
|
+
sorting?: Sorting;
|
|
749
719
|
/**
|
|
750
|
-
*
|
|
720
|
+
* Predefined set of fields to return.
|
|
751
721
|
*
|
|
752
|
-
*
|
|
753
|
-
* An invalid submission ID is dropped and the order is created without a submission.
|
|
754
|
-
* @format GUID
|
|
722
|
+
* Default: If `fieldSet` is omitted, no order form submission data is returned.
|
|
755
723
|
*/
|
|
756
|
-
|
|
757
|
-
}
|
|
758
|
-
interface CreateOfflineOrderResponse {
|
|
759
|
-
/** Order. */
|
|
760
|
-
order?: Order;
|
|
724
|
+
fieldSet?: SetWithLiterals;
|
|
761
725
|
}
|
|
762
|
-
interface
|
|
726
|
+
interface Sorting {
|
|
763
727
|
/**
|
|
764
|
-
*
|
|
765
|
-
* @
|
|
728
|
+
* Name of the field to sort by.
|
|
729
|
+
* @maxLength 512
|
|
766
730
|
*/
|
|
767
|
-
|
|
731
|
+
fieldName?: string;
|
|
732
|
+
/** Sort order. */
|
|
733
|
+
order?: SortOrderWithLiterals;
|
|
768
734
|
/**
|
|
769
|
-
*
|
|
770
|
-
*
|
|
735
|
+
* Origin point for geo-distance sorting on a GEO field
|
|
736
|
+
* results are ordered by distance from this point (ASC = nearest first, DESC = farthest first).
|
|
771
737
|
*/
|
|
772
|
-
|
|
738
|
+
origin?: AddressLocation;
|
|
773
739
|
}
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
740
|
+
declare enum SortOrder {
|
|
741
|
+
ASC = "ASC",
|
|
742
|
+
DESC = "DESC"
|
|
777
743
|
}
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
* Start date and time for the plan of the order preview in a `YYYY-MM-DDThh:mm[:ss][.sss]Z` format.
|
|
786
|
-
*
|
|
787
|
-
* Default: Current date and time.
|
|
788
|
-
*/
|
|
789
|
-
startDate?: Date | null;
|
|
790
|
-
/**
|
|
791
|
-
* Coupon code to apply.
|
|
792
|
-
* @minLength 1
|
|
793
|
-
* @maxLength 20
|
|
794
|
-
*/
|
|
795
|
-
couponCode?: string | null;
|
|
744
|
+
/** @enumType */
|
|
745
|
+
type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
|
|
746
|
+
interface AddressLocation {
|
|
747
|
+
/** Address latitude. */
|
|
748
|
+
latitude?: number | null;
|
|
749
|
+
/** Address longitude. */
|
|
750
|
+
longitude?: number | null;
|
|
796
751
|
}
|
|
797
|
-
interface
|
|
798
|
-
/**
|
|
799
|
-
|
|
800
|
-
/**
|
|
801
|
-
|
|
752
|
+
interface ListOrdersResponse {
|
|
753
|
+
/** List of orders. */
|
|
754
|
+
orders?: Order[];
|
|
755
|
+
/** Object containing paging-related data (number of orders returned, offset). */
|
|
756
|
+
pagingMetadata?: PagingMetadataV2;
|
|
802
757
|
}
|
|
803
|
-
interface
|
|
804
|
-
/**
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
* Coupon code to apply.
|
|
817
|
-
* @minLength 1
|
|
818
|
-
* @maxLength 20
|
|
819
|
-
*/
|
|
820
|
-
couponCode?: string | null;
|
|
758
|
+
interface PagingMetadataV2 {
|
|
759
|
+
/** Number of items returned in the response. */
|
|
760
|
+
count?: number | null;
|
|
761
|
+
/** Offset that was requested. */
|
|
762
|
+
offset?: number | null;
|
|
763
|
+
/** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
|
|
764
|
+
total?: number | null;
|
|
765
|
+
/** Flag that indicates the server failed to calculate the `total` field. */
|
|
766
|
+
tooManyToCount?: boolean | null;
|
|
767
|
+
/** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
|
|
768
|
+
cursors?: Cursors;
|
|
769
|
+
}
|
|
770
|
+
interface Cursors {
|
|
821
771
|
/**
|
|
822
|
-
*
|
|
823
|
-
* @
|
|
772
|
+
* Cursor string pointing to the next page in the list of results.
|
|
773
|
+
* @maxLength 16000
|
|
824
774
|
*/
|
|
825
|
-
|
|
826
|
-
}
|
|
827
|
-
interface GetGuestOnlineOrderPreviewResponse {
|
|
828
|
-
/** Will be missing if limit is exceeded */
|
|
829
|
-
order?: Order;
|
|
775
|
+
next?: string | null;
|
|
830
776
|
/**
|
|
831
|
-
*
|
|
832
|
-
*
|
|
777
|
+
* Cursor pointing to the previous page in the list of results.
|
|
778
|
+
* @maxLength 16000
|
|
833
779
|
*/
|
|
834
|
-
|
|
780
|
+
prev?: string | null;
|
|
835
781
|
}
|
|
836
|
-
interface
|
|
782
|
+
interface GetOrdersStatsRequest {
|
|
783
|
+
}
|
|
784
|
+
interface GetOrdersStatsResponse {
|
|
785
|
+
/** Total number of orders. */
|
|
786
|
+
totalOrderCount?: number;
|
|
787
|
+
/** Number of active orders. */
|
|
788
|
+
activeOrderCount?: number;
|
|
789
|
+
}
|
|
790
|
+
interface GetAvailableOrderActionsRequest {
|
|
837
791
|
/**
|
|
838
|
-
* ID
|
|
792
|
+
* Order ID.
|
|
839
793
|
* @format GUID
|
|
840
794
|
*/
|
|
841
|
-
|
|
795
|
+
_id?: string;
|
|
796
|
+
}
|
|
797
|
+
interface GetAvailableOrderActionsResponse {
|
|
798
|
+
/** Whether the order can be suspended. */
|
|
799
|
+
suspendable?: boolean;
|
|
800
|
+
/** If the order cannot be suspended, a reason is returned here. */
|
|
801
|
+
notSuspendableReason?: ReasonNotSuspendableWithLiterals;
|
|
802
|
+
/** Whether the order can be canceled by the buyer. */
|
|
803
|
+
cancelableByBuyer?: boolean;
|
|
804
|
+
}
|
|
805
|
+
declare enum ReasonNotSuspendable {
|
|
806
|
+
/** Undefined reason. */
|
|
807
|
+
UNDEFINED = "UNDEFINED",
|
|
808
|
+
/** Saved in the database but is awaiting payment. Non-active orders can't be suspended. */
|
|
809
|
+
PENDING = "PENDING",
|
|
810
|
+
/** Trial orders can't be suspended. */
|
|
811
|
+
TRIAL = "TRIAL",
|
|
812
|
+
/** Canceled orders can't be suspended. */
|
|
813
|
+
CANCELED = "CANCELED",
|
|
814
|
+
/** Ended orders can't be suspended. */
|
|
815
|
+
ENDED = "ENDED",
|
|
816
|
+
/** Paid for orders with future start dates can't be suspended. */
|
|
817
|
+
NOT_STARTED = "NOT_STARTED",
|
|
818
|
+
/** Order is already suspended. */
|
|
819
|
+
ALREADY_SUSPENDED = "ALREADY_SUSPENDED",
|
|
820
|
+
/** Orders based on recurring payments using older stripe versions can't be suspended. */
|
|
821
|
+
OLD_STRIPE = "OLD_STRIPE"
|
|
822
|
+
}
|
|
823
|
+
/** @enumType */
|
|
824
|
+
type ReasonNotSuspendableWithLiterals = ReasonNotSuspendable | 'UNDEFINED' | 'PENDING' | 'TRIAL' | 'CANCELED' | 'ENDED' | 'NOT_STARTED' | 'ALREADY_SUSPENDED' | 'OLD_STRIPE';
|
|
825
|
+
interface PostponeEndDateRequest {
|
|
842
826
|
/**
|
|
843
|
-
*
|
|
827
|
+
* Order ID.
|
|
844
828
|
* @format GUID
|
|
845
829
|
*/
|
|
846
|
-
|
|
830
|
+
_id: string;
|
|
847
831
|
/**
|
|
848
|
-
*
|
|
832
|
+
* New end date and time.
|
|
849
833
|
*
|
|
850
|
-
*
|
|
851
|
-
*/
|
|
852
|
-
startDate?: Date | null;
|
|
853
|
-
/**
|
|
854
|
-
* Coupon code to apply, from the Coupons API.
|
|
855
|
-
* @minLength 1
|
|
856
|
-
* @maxLength 20
|
|
834
|
+
* Must be later than the current end date and time.
|
|
857
835
|
*/
|
|
858
|
-
|
|
836
|
+
endDate: Date | null;
|
|
859
837
|
}
|
|
860
|
-
interface
|
|
861
|
-
|
|
838
|
+
interface PostponeEndDateResponse {
|
|
839
|
+
}
|
|
840
|
+
interface OrderEndDatePostponed {
|
|
841
|
+
/** Order whose `endDate` was postponed. */
|
|
862
842
|
order?: Order;
|
|
863
|
-
/**
|
|
864
|
-
* Whether this previewed order would exceed the permitted amount of purchases available
|
|
865
|
-
* for this plan for this buyer.
|
|
866
|
-
*
|
|
867
|
-
* Always `false` for plans that do not have purchase limits.
|
|
868
|
-
*/
|
|
869
|
-
purchaseLimitExceeded?: boolean;
|
|
870
843
|
}
|
|
871
|
-
interface
|
|
844
|
+
interface CancelOrderRequest {
|
|
872
845
|
/**
|
|
873
|
-
* ID
|
|
846
|
+
* Order ID.
|
|
874
847
|
* @format GUID
|
|
875
848
|
*/
|
|
876
|
-
|
|
877
|
-
/**
|
|
878
|
-
|
|
879
|
-
* @minLength 1
|
|
880
|
-
* @maxLength 20
|
|
881
|
-
*/
|
|
882
|
-
couponCode?: string | null;
|
|
849
|
+
_id: string;
|
|
850
|
+
/** __Required.__ When the order will be canceled. One-time orders can only be canceled `IMMEDIATELY`. */
|
|
851
|
+
effectiveAt: CancellationEffectiveAtWithLiterals;
|
|
883
852
|
}
|
|
884
|
-
interface
|
|
885
|
-
/** Pricing details. */
|
|
886
|
-
prices?: SpannedPrice[];
|
|
853
|
+
interface CancelOrderResponse {
|
|
887
854
|
}
|
|
888
|
-
|
|
855
|
+
/**
|
|
856
|
+
* Emitted when an order is canceled immediately or when cycle ends for an order with canceled auto renewal
|
|
857
|
+
*
|
|
858
|
+
* To determine the specific reason of the cancellation check `order.cancellation.cause` field.
|
|
859
|
+
*/
|
|
860
|
+
interface OrderCanceled {
|
|
861
|
+
/** Canceled order. */
|
|
862
|
+
order?: Order;
|
|
863
|
+
}
|
|
864
|
+
interface MarkAsPaidRequest {
|
|
889
865
|
/**
|
|
890
|
-
*
|
|
866
|
+
* Order ID.
|
|
891
867
|
* @format GUID
|
|
892
868
|
*/
|
|
893
|
-
|
|
894
|
-
/** New valid from date (timestamp). */
|
|
895
|
-
startDate?: Date | null;
|
|
869
|
+
_id: string;
|
|
896
870
|
}
|
|
897
|
-
interface
|
|
898
|
-
/** Updated draft order. */
|
|
899
|
-
order?: Order;
|
|
871
|
+
interface MarkAsPaidResponse {
|
|
900
872
|
}
|
|
901
|
-
interface
|
|
902
|
-
/** Order
|
|
873
|
+
interface OrderMarkedAsPaid {
|
|
874
|
+
/** Order that was marked as paid. */
|
|
903
875
|
order?: Order;
|
|
904
876
|
}
|
|
905
|
-
interface
|
|
877
|
+
interface PauseOrderRequest {
|
|
906
878
|
/**
|
|
907
|
-
*
|
|
879
|
+
* Order ID.
|
|
908
880
|
* @format GUID
|
|
909
881
|
*/
|
|
910
|
-
|
|
882
|
+
_id: string;
|
|
883
|
+
}
|
|
884
|
+
interface PauseOrderResponse {
|
|
885
|
+
}
|
|
886
|
+
interface OrderPaused {
|
|
887
|
+
/** Paused order. */
|
|
888
|
+
order?: Order;
|
|
889
|
+
}
|
|
890
|
+
interface BulkPauseOrderRequest {
|
|
911
891
|
/**
|
|
912
|
-
*
|
|
913
|
-
* @
|
|
914
|
-
* @
|
|
892
|
+
* List of Order IDs.
|
|
893
|
+
* @format GUID
|
|
894
|
+
* @minSize 1
|
|
895
|
+
* @maxSize 100
|
|
915
896
|
*/
|
|
916
|
-
|
|
897
|
+
ids?: string[];
|
|
898
|
+
/** Set to true to return Order entity in response. */
|
|
899
|
+
returnFullEntity?: boolean;
|
|
917
900
|
}
|
|
918
|
-
interface
|
|
919
|
-
/**
|
|
901
|
+
interface BulkPauseOrderResponse {
|
|
902
|
+
/** Orders that were paused. */
|
|
903
|
+
results?: BulkOrderResult[];
|
|
904
|
+
/** Bulk action metadata. */
|
|
905
|
+
bulkActionMetadata?: BulkActionMetadata;
|
|
906
|
+
}
|
|
907
|
+
interface BulkOrderResult {
|
|
908
|
+
/** Item metadata */
|
|
909
|
+
itemMetadata?: ItemMetadata;
|
|
910
|
+
/** The order. */
|
|
920
911
|
order?: Order;
|
|
921
912
|
}
|
|
922
|
-
interface
|
|
913
|
+
interface ItemMetadata {
|
|
914
|
+
/** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
|
|
915
|
+
_id?: string | null;
|
|
916
|
+
/** Index of the item within the request array. Allows for correlation between request and response items. */
|
|
917
|
+
originalIndex?: number;
|
|
918
|
+
/** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
|
|
919
|
+
success?: boolean;
|
|
920
|
+
/** Details about the error in case of failure. */
|
|
921
|
+
error?: ApplicationError;
|
|
922
|
+
}
|
|
923
|
+
interface ApplicationError {
|
|
924
|
+
/** Error code. */
|
|
925
|
+
code?: string;
|
|
926
|
+
/** Description of the error. */
|
|
927
|
+
description?: string;
|
|
928
|
+
/** Data related to the error. */
|
|
929
|
+
data?: Record<string, any> | null;
|
|
930
|
+
}
|
|
931
|
+
interface BulkActionMetadata {
|
|
932
|
+
/** Number of items that were successfully processed. */
|
|
933
|
+
totalSuccesses?: number;
|
|
934
|
+
/** Number of items that couldn't be processed. */
|
|
935
|
+
totalFailures?: number;
|
|
936
|
+
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
937
|
+
undetailedFailures?: number;
|
|
938
|
+
}
|
|
939
|
+
interface ResumeOrderRequest {
|
|
923
940
|
/**
|
|
924
941
|
* Order ID.
|
|
925
942
|
* @format GUID
|
|
926
943
|
*/
|
|
927
|
-
|
|
944
|
+
_id: string;
|
|
945
|
+
}
|
|
946
|
+
interface ResumeOrderResponse {
|
|
947
|
+
}
|
|
948
|
+
interface OrderResumed {
|
|
949
|
+
/** Resumed order. */
|
|
950
|
+
order?: Order;
|
|
951
|
+
}
|
|
952
|
+
interface BulkResumeOrderRequest {
|
|
928
953
|
/**
|
|
929
|
-
*
|
|
954
|
+
* List of Order IDs.
|
|
930
955
|
* @format GUID
|
|
956
|
+
* @minSize 1
|
|
957
|
+
* @maxSize 100
|
|
931
958
|
*/
|
|
932
|
-
|
|
959
|
+
ids?: string[];
|
|
960
|
+
/** Set to true to return Order entity in response. */
|
|
961
|
+
returnFullEntity?: boolean;
|
|
933
962
|
}
|
|
934
|
-
interface
|
|
935
|
-
/**
|
|
936
|
-
|
|
963
|
+
interface BulkResumeOrderResponse {
|
|
964
|
+
/** Orders that were resumed. */
|
|
965
|
+
results?: BulkOrderResult[];
|
|
966
|
+
/** Bulk action metadata. */
|
|
967
|
+
bulkActionMetadata?: BulkActionMetadata;
|
|
937
968
|
}
|
|
938
969
|
interface MessageEnvelope {
|
|
939
970
|
/**
|
|
@@ -1026,345 +1057,314 @@ interface AccountInfo {
|
|
|
1026
1057
|
*/
|
|
1027
1058
|
siteId?: string | null;
|
|
1028
1059
|
}
|
|
1029
|
-
interface
|
|
1030
|
-
/**
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1060
|
+
interface CreateOnlineOrderRequest {
|
|
1061
|
+
/**
|
|
1062
|
+
* Plan ID.
|
|
1063
|
+
* @format GUID
|
|
1064
|
+
*/
|
|
1065
|
+
planId: string;
|
|
1066
|
+
/**
|
|
1067
|
+
* Start date and time for the plan of the online order in a `YYYY-MM-DDThh:mm[:ss][.sss]Z` format.
|
|
1068
|
+
*
|
|
1069
|
+
* Default: Current date and time.
|
|
1070
|
+
*/
|
|
1071
|
+
startDate?: Date | null;
|
|
1072
|
+
/**
|
|
1073
|
+
* Coupon code to apply.
|
|
1074
|
+
* @minLength 1
|
|
1075
|
+
* @maxLength 20
|
|
1076
|
+
*/
|
|
1077
|
+
couponCode?: string | null;
|
|
1078
|
+
/** Provided if checkout is initiated on buyer's behalf. */
|
|
1079
|
+
onBehalf?: OnBehalf;
|
|
1080
|
+
/**
|
|
1081
|
+
* Submission ID of the form submitted with this order.
|
|
1082
|
+
*
|
|
1083
|
+
* The submission must belong to the form attached to the plan, and that form must belong to the Pricing Plans namespace.
|
|
1084
|
+
* An invalid submission ID is dropped and the order is created without a submission.
|
|
1085
|
+
* @format GUID
|
|
1086
|
+
*/
|
|
1087
|
+
submissionId?: string | null;
|
|
1047
1088
|
}
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1089
|
+
interface OnBehalf {
|
|
1090
|
+
/**
|
|
1091
|
+
* Member ID.
|
|
1092
|
+
* @format GUID
|
|
1093
|
+
*/
|
|
1094
|
+
memberId?: string;
|
|
1095
|
+
/** Method by which checkout is initiated. */
|
|
1096
|
+
orderMethod?: OrderMethodWithLiterals;
|
|
1052
1097
|
}
|
|
1053
|
-
interface
|
|
1054
|
-
/**
|
|
1098
|
+
interface CreateOnlineOrderResponse {
|
|
1099
|
+
/** Created online order. */
|
|
1055
1100
|
order?: Order;
|
|
1056
1101
|
}
|
|
1057
|
-
interface
|
|
1102
|
+
interface CouponsError {
|
|
1103
|
+
/** Coupon code. */
|
|
1104
|
+
couponCode?: string;
|
|
1105
|
+
/** Plan ID. */
|
|
1106
|
+
planId?: string;
|
|
1107
|
+
}
|
|
1108
|
+
interface CreateGuestOnlineOrderRequest {
|
|
1058
1109
|
/**
|
|
1059
|
-
*
|
|
1110
|
+
* Plan ID.
|
|
1060
1111
|
* @format GUID
|
|
1061
1112
|
*/
|
|
1062
|
-
|
|
1113
|
+
planId?: string;
|
|
1063
1114
|
/**
|
|
1064
|
-
*
|
|
1115
|
+
* Start date for the ordered plan.
|
|
1065
1116
|
*
|
|
1066
|
-
* Default:
|
|
1117
|
+
* Default: Current date
|
|
1067
1118
|
*/
|
|
1068
|
-
|
|
1119
|
+
startDate?: Date | null;
|
|
1120
|
+
/**
|
|
1121
|
+
* Coupon code to apply.
|
|
1122
|
+
* @minLength 1
|
|
1123
|
+
* @maxLength 20
|
|
1124
|
+
*/
|
|
1125
|
+
couponCode?: string | null;
|
|
1126
|
+
/** Captcha data to prove you are not a robot */
|
|
1127
|
+
captcha?: Captcha;
|
|
1128
|
+
/** Visitor info */
|
|
1129
|
+
guest?: Guest;
|
|
1130
|
+
/**
|
|
1131
|
+
* Form submission id that was submitted together with the order
|
|
1132
|
+
* @format GUID
|
|
1133
|
+
*/
|
|
1134
|
+
submissionId?: string | null;
|
|
1069
1135
|
}
|
|
1070
|
-
|
|
1071
|
-
/**
|
|
1072
|
-
|
|
1073
|
-
/** Doesn't return any order form submission data. */
|
|
1074
|
-
BASIC = "BASIC",
|
|
1075
|
-
/** Returns all order form submission data. */
|
|
1076
|
-
FULL = "FULL"
|
|
1136
|
+
interface Captcha {
|
|
1137
|
+
/** Token from captcha */
|
|
1138
|
+
token?: string;
|
|
1077
1139
|
}
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1140
|
+
interface Guest {
|
|
1141
|
+
/**
|
|
1142
|
+
* Email for checkout
|
|
1143
|
+
* @format EMAIL
|
|
1144
|
+
*/
|
|
1145
|
+
email?: string;
|
|
1146
|
+
}
|
|
1147
|
+
interface CreateGuestOnlineOrderResponse {
|
|
1081
1148
|
/** Order. */
|
|
1082
1149
|
order?: Order;
|
|
1083
1150
|
}
|
|
1084
|
-
interface
|
|
1151
|
+
interface CreateOfflineOrderRequest {
|
|
1085
1152
|
/**
|
|
1086
|
-
*
|
|
1153
|
+
* ID of the plan being ordered, from the Plans API.
|
|
1087
1154
|
* @format GUID
|
|
1088
1155
|
*/
|
|
1089
|
-
|
|
1156
|
+
planId: string;
|
|
1090
1157
|
/**
|
|
1091
|
-
*
|
|
1158
|
+
* ID of the member ordering the plan, from the Members API.
|
|
1092
1159
|
* @format GUID
|
|
1093
1160
|
*/
|
|
1094
|
-
|
|
1095
|
-
/** Filter by whether or not the auto-renewal of recurring orders was canceled. */
|
|
1096
|
-
autoRenewCanceled?: boolean | null;
|
|
1097
|
-
/** Filter by order status. */
|
|
1098
|
-
orderStatuses?: OrderStatusWithLiterals[];
|
|
1099
|
-
/** Filter by payment status. */
|
|
1100
|
-
paymentStatuses?: PaymentStatusWithLiterals[];
|
|
1161
|
+
memberId: string;
|
|
1101
1162
|
/**
|
|
1102
|
-
*
|
|
1163
|
+
* Start date and time for the ordered plan in a `YYYY-MM-DDThh:mm[:ss][.sss]Z` format.
|
|
1103
1164
|
*
|
|
1104
|
-
*
|
|
1105
|
-
* @min 1
|
|
1106
|
-
* @max 50
|
|
1165
|
+
* Default: Current date and time.
|
|
1107
1166
|
*/
|
|
1108
|
-
|
|
1109
|
-
/** Number of orders to skip in the current sort order. */
|
|
1110
|
-
offset?: number | null;
|
|
1167
|
+
startDate?: Date | null;
|
|
1111
1168
|
/**
|
|
1112
|
-
*
|
|
1113
|
-
*
|
|
1114
|
-
* Use `ASC` for ascending order or `DESC` for descending order.
|
|
1169
|
+
* Whether the order is paid.
|
|
1115
1170
|
*
|
|
1116
|
-
* Default: `
|
|
1171
|
+
* Default: `false`
|
|
1117
1172
|
*/
|
|
1118
|
-
|
|
1173
|
+
paid?: boolean | null;
|
|
1119
1174
|
/**
|
|
1120
|
-
*
|
|
1175
|
+
* Coupon code to apply, from the Coupons API.
|
|
1176
|
+
* @minLength 1
|
|
1177
|
+
* @maxLength 20
|
|
1178
|
+
*/
|
|
1179
|
+
couponCode?: string | null;
|
|
1180
|
+
/**
|
|
1181
|
+
* Form submission ID that was submitted with the order.
|
|
1121
1182
|
*
|
|
1122
|
-
*
|
|
1183
|
+
* The submission must belong to the form attached to the plan, and that form must belong to the Pricing Plans namespace.
|
|
1184
|
+
* An invalid submission ID is dropped and the order is created without a submission.
|
|
1185
|
+
* @format GUID
|
|
1123
1186
|
*/
|
|
1124
|
-
|
|
1187
|
+
submissionId?: string | null;
|
|
1125
1188
|
}
|
|
1126
|
-
interface
|
|
1189
|
+
interface CreateOfflineOrderResponse {
|
|
1190
|
+
/** Order. */
|
|
1191
|
+
order?: Order;
|
|
1192
|
+
}
|
|
1193
|
+
interface CreateExternalOrderRequest {
|
|
1127
1194
|
/**
|
|
1128
|
-
*
|
|
1129
|
-
* @
|
|
1195
|
+
* Plan ID.
|
|
1196
|
+
* @format GUID
|
|
1130
1197
|
*/
|
|
1131
|
-
|
|
1132
|
-
/** Sort order. */
|
|
1133
|
-
order?: SortOrderWithLiterals;
|
|
1198
|
+
planId?: string;
|
|
1134
1199
|
/**
|
|
1135
|
-
*
|
|
1136
|
-
*
|
|
1200
|
+
* Form submission id that was submitted together with the order
|
|
1201
|
+
* @format GUID
|
|
1137
1202
|
*/
|
|
1138
|
-
|
|
1139
|
-
}
|
|
1140
|
-
declare enum SortOrder {
|
|
1141
|
-
ASC = "ASC",
|
|
1142
|
-
DESC = "DESC"
|
|
1143
|
-
}
|
|
1144
|
-
/** @enumType */
|
|
1145
|
-
type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
|
|
1146
|
-
interface AddressLocation {
|
|
1147
|
-
/** Address latitude. */
|
|
1148
|
-
latitude?: number | null;
|
|
1149
|
-
/** Address longitude. */
|
|
1150
|
-
longitude?: number | null;
|
|
1151
|
-
}
|
|
1152
|
-
interface ListOrdersResponse {
|
|
1153
|
-
/** List of orders. */
|
|
1154
|
-
orders?: Order[];
|
|
1155
|
-
/** Object containing paging-related data (number of orders returned, offset). */
|
|
1156
|
-
pagingMetadata?: PagingMetadataV2;
|
|
1203
|
+
submissionId?: string | null;
|
|
1157
1204
|
}
|
|
1158
|
-
interface
|
|
1159
|
-
/**
|
|
1160
|
-
|
|
1161
|
-
/** Offset that was requested. */
|
|
1162
|
-
offset?: number | null;
|
|
1163
|
-
/** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
|
|
1164
|
-
total?: number | null;
|
|
1165
|
-
/** Flag that indicates the server failed to calculate the `total` field. */
|
|
1166
|
-
tooManyToCount?: boolean | null;
|
|
1167
|
-
/** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
|
|
1168
|
-
cursors?: Cursors;
|
|
1205
|
+
interface CreateExternalOrderResponse {
|
|
1206
|
+
/** Created order */
|
|
1207
|
+
order?: Order;
|
|
1169
1208
|
}
|
|
1170
|
-
interface
|
|
1209
|
+
interface GetOnlineOrderPreviewRequest {
|
|
1171
1210
|
/**
|
|
1172
|
-
*
|
|
1173
|
-
* @
|
|
1211
|
+
* Plan ID.
|
|
1212
|
+
* @format GUID
|
|
1174
1213
|
*/
|
|
1175
|
-
|
|
1214
|
+
planId: string;
|
|
1176
1215
|
/**
|
|
1177
|
-
*
|
|
1178
|
-
*
|
|
1216
|
+
* Start date and time for the plan of the order preview in a `YYYY-MM-DDThh:mm[:ss][.sss]Z` format.
|
|
1217
|
+
*
|
|
1218
|
+
* Default: Current date and time.
|
|
1179
1219
|
*/
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1220
|
+
startDate?: Date | null;
|
|
1221
|
+
/**
|
|
1222
|
+
* Coupon code to apply.
|
|
1223
|
+
* @minLength 1
|
|
1224
|
+
* @maxLength 20
|
|
1225
|
+
*/
|
|
1226
|
+
couponCode?: string | null;
|
|
1183
1227
|
}
|
|
1184
|
-
interface
|
|
1185
|
-
/**
|
|
1186
|
-
|
|
1187
|
-
/**
|
|
1188
|
-
|
|
1228
|
+
interface GetOnlineOrderPreviewResponse {
|
|
1229
|
+
/** Order preview. This field is undefined if the member has already reached the purchase limit for the order's plan. */
|
|
1230
|
+
order?: Order;
|
|
1231
|
+
/** Whether the member has already reached purchase limit for the order's plan. */
|
|
1232
|
+
purchaseLimitExceeded?: boolean;
|
|
1189
1233
|
}
|
|
1190
|
-
interface
|
|
1234
|
+
interface GetGuestOnlineOrderPreviewRequest {
|
|
1191
1235
|
/**
|
|
1192
|
-
*
|
|
1236
|
+
* Plan ID.
|
|
1193
1237
|
* @format GUID
|
|
1194
1238
|
*/
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
/**
|
|
1203
|
-
|
|
1239
|
+
planId?: string;
|
|
1240
|
+
/**
|
|
1241
|
+
* Start date for the ordered plan.
|
|
1242
|
+
*
|
|
1243
|
+
* Default: Current date
|
|
1244
|
+
*/
|
|
1245
|
+
startDate?: Date | null;
|
|
1246
|
+
/**
|
|
1247
|
+
* Coupon code to apply.
|
|
1248
|
+
* @minLength 1
|
|
1249
|
+
* @maxLength 20
|
|
1250
|
+
*/
|
|
1251
|
+
couponCode?: string | null;
|
|
1252
|
+
/**
|
|
1253
|
+
* Email for checkout
|
|
1254
|
+
* @format EMAIL
|
|
1255
|
+
*/
|
|
1256
|
+
email?: string;
|
|
1204
1257
|
}
|
|
1205
|
-
|
|
1206
|
-
/**
|
|
1207
|
-
|
|
1208
|
-
/**
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
CANCELED = "CANCELED",
|
|
1214
|
-
/** Ended orders can't be suspended. */
|
|
1215
|
-
ENDED = "ENDED",
|
|
1216
|
-
/** Paid for orders with future start dates can't be suspended. */
|
|
1217
|
-
NOT_STARTED = "NOT_STARTED",
|
|
1218
|
-
/** Order is already suspended. */
|
|
1219
|
-
ALREADY_SUSPENDED = "ALREADY_SUSPENDED",
|
|
1220
|
-
/** Orders based on recurring payments using older stripe versions can't be suspended. */
|
|
1221
|
-
OLD_STRIPE = "OLD_STRIPE"
|
|
1258
|
+
interface GetGuestOnlineOrderPreviewResponse {
|
|
1259
|
+
/** Will be missing if limit is exceeded */
|
|
1260
|
+
order?: Order;
|
|
1261
|
+
/**
|
|
1262
|
+
* Whether the purchase limit has already been reached for this plan by this email.
|
|
1263
|
+
* Always false for plans without purchase limits.
|
|
1264
|
+
*/
|
|
1265
|
+
purchaseLimitExceeded?: boolean;
|
|
1222
1266
|
}
|
|
1223
|
-
|
|
1224
|
-
type ReasonNotSuspendableWithLiterals = ReasonNotSuspendable | 'UNDEFINED' | 'PENDING' | 'TRIAL' | 'CANCELED' | 'ENDED' | 'NOT_STARTED' | 'ALREADY_SUSPENDED' | 'OLD_STRIPE';
|
|
1225
|
-
interface PostponeEndDateRequest {
|
|
1267
|
+
interface GetOfflineOrderPreviewRequest {
|
|
1226
1268
|
/**
|
|
1227
|
-
*
|
|
1269
|
+
* ID of the plan of the previewed order, from the Plans API.
|
|
1228
1270
|
* @format GUID
|
|
1229
1271
|
*/
|
|
1230
|
-
|
|
1272
|
+
planId: string;
|
|
1231
1273
|
/**
|
|
1232
|
-
*
|
|
1274
|
+
* Member ID of the buyer the previewed order is for, from the Members API.
|
|
1275
|
+
* @format GUID
|
|
1276
|
+
*/
|
|
1277
|
+
memberId: string;
|
|
1278
|
+
/**
|
|
1279
|
+
* Start date and time for plan of the previewed order in a `YYYY-MM-DDThh:mm[:ss][.sss]Z` format.
|
|
1233
1280
|
*
|
|
1234
|
-
*
|
|
1281
|
+
* Default: Current date and time.
|
|
1235
1282
|
*/
|
|
1236
|
-
|
|
1237
|
-
}
|
|
1238
|
-
interface PostponeEndDateResponse {
|
|
1239
|
-
}
|
|
1240
|
-
interface OrderEndDatePostponed {
|
|
1241
|
-
/** Order whose `endDate` was postponed. */
|
|
1242
|
-
order?: Order;
|
|
1243
|
-
}
|
|
1244
|
-
interface CancelOrderRequest {
|
|
1283
|
+
startDate?: Date | null;
|
|
1245
1284
|
/**
|
|
1246
|
-
*
|
|
1247
|
-
* @
|
|
1285
|
+
* Coupon code to apply, from the Coupons API.
|
|
1286
|
+
* @minLength 1
|
|
1287
|
+
* @maxLength 20
|
|
1248
1288
|
*/
|
|
1249
|
-
|
|
1250
|
-
/** __Required.__ When the order will be canceled. One-time orders can only be canceled `IMMEDIATELY`. */
|
|
1251
|
-
effectiveAt: CancellationEffectiveAtWithLiterals;
|
|
1252
|
-
}
|
|
1253
|
-
interface CancelOrderResponse {
|
|
1289
|
+
couponCode?: string | null;
|
|
1254
1290
|
}
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
*
|
|
1258
|
-
* To determine the specific reason of the cancellation check `order.cancellation.cause` field.
|
|
1259
|
-
*/
|
|
1260
|
-
interface OrderCanceled {
|
|
1261
|
-
/** Canceled order. */
|
|
1291
|
+
interface GetOfflineOrderPreviewResponse {
|
|
1292
|
+
/** The previewed order, as if the plan had been ordered. */
|
|
1262
1293
|
order?: Order;
|
|
1294
|
+
/**
|
|
1295
|
+
* Whether this previewed order would exceed the permitted amount of purchases available
|
|
1296
|
+
* for this plan for this buyer.
|
|
1297
|
+
*
|
|
1298
|
+
* Always `false` for plans that do not have purchase limits.
|
|
1299
|
+
*/
|
|
1300
|
+
purchaseLimitExceeded?: boolean;
|
|
1263
1301
|
}
|
|
1264
|
-
interface
|
|
1302
|
+
interface GetPricePreviewRequest {
|
|
1265
1303
|
/**
|
|
1266
|
-
*
|
|
1304
|
+
* ID of plan to preview.
|
|
1267
1305
|
* @format GUID
|
|
1268
1306
|
*/
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1307
|
+
planId: string;
|
|
1308
|
+
/**
|
|
1309
|
+
* Coupon code to apply, from the Coupons API.
|
|
1310
|
+
* @minLength 1
|
|
1311
|
+
* @maxLength 20
|
|
1312
|
+
*/
|
|
1313
|
+
couponCode?: string | null;
|
|
1272
1314
|
}
|
|
1273
|
-
interface
|
|
1274
|
-
/**
|
|
1275
|
-
|
|
1315
|
+
interface GetPricePreviewResponse {
|
|
1316
|
+
/** Pricing details. */
|
|
1317
|
+
prices?: SpannedPrice[];
|
|
1276
1318
|
}
|
|
1277
|
-
interface
|
|
1319
|
+
interface ChangeStartDateRequest {
|
|
1278
1320
|
/**
|
|
1279
|
-
*
|
|
1321
|
+
* Draft order ID.
|
|
1280
1322
|
* @format GUID
|
|
1281
1323
|
*/
|
|
1282
|
-
|
|
1324
|
+
orderId?: string;
|
|
1325
|
+
/** New valid from date (timestamp). */
|
|
1326
|
+
startDate?: Date | null;
|
|
1283
1327
|
}
|
|
1284
|
-
interface
|
|
1328
|
+
interface ChangeStartDateResponse {
|
|
1329
|
+
/** Updated draft order. */
|
|
1330
|
+
order?: Order;
|
|
1285
1331
|
}
|
|
1286
|
-
interface
|
|
1287
|
-
/**
|
|
1332
|
+
interface OrderStartDateChanged {
|
|
1333
|
+
/** Order whose `startDate` changed. */
|
|
1288
1334
|
order?: Order;
|
|
1289
1335
|
}
|
|
1290
|
-
interface
|
|
1336
|
+
interface ApplyCouponRequest {
|
|
1291
1337
|
/**
|
|
1292
|
-
*
|
|
1338
|
+
* Draft order ID.
|
|
1293
1339
|
* @format GUID
|
|
1294
|
-
* @minSize 1
|
|
1295
|
-
* @maxSize 100
|
|
1296
1340
|
*/
|
|
1297
|
-
|
|
1298
|
-
/**
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
/** Bulk action metadata. */
|
|
1305
|
-
bulkActionMetadata?: BulkActionMetadata;
|
|
1341
|
+
orderId?: string;
|
|
1342
|
+
/**
|
|
1343
|
+
* Coupon code to apply.
|
|
1344
|
+
* @minLength 1
|
|
1345
|
+
* @maxLength 20
|
|
1346
|
+
*/
|
|
1347
|
+
couponCode?: string;
|
|
1306
1348
|
}
|
|
1307
|
-
interface
|
|
1308
|
-
/**
|
|
1309
|
-
itemMetadata?: ItemMetadata;
|
|
1310
|
-
/** The order. */
|
|
1349
|
+
interface ApplyCouponResponse {
|
|
1350
|
+
/** Order with applied coupon and recalculated tax. */
|
|
1311
1351
|
order?: Order;
|
|
1312
1352
|
}
|
|
1313
|
-
interface
|
|
1314
|
-
/** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
|
|
1315
|
-
_id?: string | null;
|
|
1316
|
-
/** Index of the item within the request array. Allows for correlation between request and response items. */
|
|
1317
|
-
originalIndex?: number;
|
|
1318
|
-
/** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
|
|
1319
|
-
success?: boolean;
|
|
1320
|
-
/** Details about the error in case of failure. */
|
|
1321
|
-
error?: ApplicationError;
|
|
1322
|
-
}
|
|
1323
|
-
interface ApplicationError {
|
|
1324
|
-
/** Error code. */
|
|
1325
|
-
code?: string;
|
|
1326
|
-
/** Description of the error. */
|
|
1327
|
-
description?: string;
|
|
1328
|
-
/** Data related to the error. */
|
|
1329
|
-
data?: Record<string, any> | null;
|
|
1330
|
-
}
|
|
1331
|
-
interface BulkActionMetadata {
|
|
1332
|
-
/** Number of items that were successfully processed. */
|
|
1333
|
-
totalSuccesses?: number;
|
|
1334
|
-
/** Number of items that couldn't be processed. */
|
|
1335
|
-
totalFailures?: number;
|
|
1336
|
-
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
1337
|
-
undetailedFailures?: number;
|
|
1338
|
-
}
|
|
1339
|
-
interface ResumeOrderRequest {
|
|
1353
|
+
interface SetSubmissionRequest {
|
|
1340
1354
|
/**
|
|
1341
1355
|
* Order ID.
|
|
1342
1356
|
* @format GUID
|
|
1343
1357
|
*/
|
|
1344
|
-
|
|
1345
|
-
}
|
|
1346
|
-
interface ResumeOrderResponse {
|
|
1347
|
-
}
|
|
1348
|
-
interface OrderResumed {
|
|
1349
|
-
/** Resumed order. */
|
|
1350
|
-
order?: Order;
|
|
1351
|
-
}
|
|
1352
|
-
interface BulkResumeOrderRequest {
|
|
1358
|
+
orderId?: string;
|
|
1353
1359
|
/**
|
|
1354
|
-
*
|
|
1360
|
+
* Submission ID.
|
|
1355
1361
|
* @format GUID
|
|
1356
|
-
* @minSize 1
|
|
1357
|
-
* @maxSize 100
|
|
1358
1362
|
*/
|
|
1359
|
-
|
|
1360
|
-
/** Set to true to return Order entity in response. */
|
|
1361
|
-
returnFullEntity?: boolean;
|
|
1363
|
+
submissionId?: string;
|
|
1362
1364
|
}
|
|
1363
|
-
interface
|
|
1364
|
-
/**
|
|
1365
|
-
|
|
1366
|
-
/** Bulk action metadata. */
|
|
1367
|
-
bulkActionMetadata?: BulkActionMetadata;
|
|
1365
|
+
interface SetSubmissionResponse {
|
|
1366
|
+
/** Order with submission id */
|
|
1367
|
+
order?: Order;
|
|
1368
1368
|
}
|
|
1369
1369
|
interface MemberGetOrderRequest {
|
|
1370
1370
|
/**
|
|
@@ -1779,84 +1779,7 @@ interface AccountInfoMetadata {
|
|
|
1779
1779
|
siteId?: string;
|
|
1780
1780
|
/** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */
|
|
1781
1781
|
parentAccountId?: string;
|
|
1782
|
-
}
|
|
1783
|
-
interface OrderCreatedEnvelope {
|
|
1784
|
-
entity: Order;
|
|
1785
|
-
metadata: EventMetadata;
|
|
1786
|
-
}
|
|
1787
|
-
/**
|
|
1788
|
-
* Triggered when an order is created.
|
|
1789
|
-
* @permissionScope Manage_Wix_Rentals_App_Forms_submissions
|
|
1790
|
-
* @permissionScopeId SCOPE.RENTALS.MANAGE
|
|
1791
|
-
* @permissionScope Manage Orders
|
|
1792
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
1793
|
-
* @permissionScope Read Orders
|
|
1794
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS
|
|
1795
|
-
* @permissionScope Manage plans and orders of Pricing Plans
|
|
1796
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS-AND-ORDERS
|
|
1797
|
-
* @permissionScope Manage Events
|
|
1798
|
-
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
1799
|
-
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
1800
|
-
* @webhook
|
|
1801
|
-
* @eventType wix.pricing_plans.v2.order_created
|
|
1802
|
-
* @serviceIdentifier com.wixpress.membership.v2.orders.CheckoutService
|
|
1803
|
-
* @slug created
|
|
1804
|
-
*/
|
|
1805
|
-
declare function onOrderCreated(handler: (event: OrderCreatedEnvelope) => void | Promise<void>): void;
|
|
1806
|
-
interface OrderStartDateChangedEnvelope {
|
|
1807
|
-
data: OrderStartDateChanged;
|
|
1808
|
-
metadata: EventMetadata;
|
|
1809
|
-
}
|
|
1810
|
-
/**
|
|
1811
|
-
* Triggered when an order's `startDate` is changed.
|
|
1812
|
-
* @permissionScope Manage_Wix_Rentals_App_Forms_submissions
|
|
1813
|
-
* @permissionScopeId SCOPE.RENTALS.MANAGE
|
|
1814
|
-
* @permissionScope Manage Orders
|
|
1815
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
1816
|
-
* @permissionScope Read Orders
|
|
1817
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS
|
|
1818
|
-
* @permissionScope Manage plans and orders of Pricing Plans
|
|
1819
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS-AND-ORDERS
|
|
1820
|
-
* @permissionScope Manage Events
|
|
1821
|
-
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
1822
|
-
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
1823
|
-
* @webhook
|
|
1824
|
-
* @eventType wix.pricing_plans.v2.order_start_date_changed
|
|
1825
|
-
* @serviceIdentifier com.wixpress.membership.v2.orders.CheckoutService
|
|
1826
|
-
* @slug start_date_changed
|
|
1827
|
-
*/
|
|
1828
|
-
declare function onOrderStartDateChanged(handler: (event: OrderStartDateChangedEnvelope) => void | Promise<void>): void;
|
|
1829
|
-
interface OrderUpdatedEnvelope {
|
|
1830
|
-
entity: Order;
|
|
1831
|
-
metadata: EventMetadata;
|
|
1832
|
-
}
|
|
1833
|
-
/**
|
|
1834
|
-
* Triggered for any of the following update events:
|
|
1835
|
-
*
|
|
1836
|
-
* + Order is paid for. Order Purchased is also triggered.
|
|
1837
|
-
* + Order reaches its start date or end date. Order Started and Order Ended, respectively, are also triggered.
|
|
1838
|
-
* + New payment cycle of an order starts. Order Cycle Started is also triggered.
|
|
1839
|
-
* + Offline order is marked as paid. Order Marked As Paid is also triggered.
|
|
1840
|
-
* + End date of the order is postponed. Order End Date Postponed is also triggered
|
|
1841
|
-
* + Order is paused, or a paused order is resumed. Order Paused and Order Resumed, respectively, are also triggered.
|
|
1842
|
-
* + Order is canceled, either immediately or at the end of the payment cycle. Order Canceled and Order Auto Renew Canceled, respectively, are also triggered.
|
|
1843
|
-
* @permissionScope Manage_Wix_Rentals_App_Forms_submissions
|
|
1844
|
-
* @permissionScopeId SCOPE.RENTALS.MANAGE
|
|
1845
|
-
* @permissionScope Manage Orders
|
|
1846
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
1847
|
-
* @permissionScope Read Orders
|
|
1848
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS
|
|
1849
|
-
* @permissionScope Manage plans and orders of Pricing Plans
|
|
1850
|
-
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS-AND-ORDERS
|
|
1851
|
-
* @permissionScope Manage Events
|
|
1852
|
-
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
1853
|
-
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
1854
|
-
* @webhook
|
|
1855
|
-
* @eventType wix.pricing_plans.v2.order_updated
|
|
1856
|
-
* @serviceIdentifier com.wixpress.membership.v2.orders.CheckoutService
|
|
1857
|
-
* @slug updated
|
|
1858
|
-
*/
|
|
1859
|
-
declare function onOrderUpdated(handler: (event: OrderUpdatedEnvelope) => void | Promise<void>): void;
|
|
1782
|
+
}
|
|
1860
1783
|
interface OrderAutoRenewCanceledEnvelope {
|
|
1861
1784
|
data: OrderAutoRenewCanceled;
|
|
1862
1785
|
metadata: EventMetadata;
|
|
@@ -2058,53 +1981,304 @@ interface OrderPurchasedEnvelope {
|
|
|
2058
1981
|
* @serviceIdentifier com.wixpress.membership.v2.orders.OrderManagementService
|
|
2059
1982
|
* @slug purchased
|
|
2060
1983
|
*/
|
|
2061
|
-
declare function onOrderPurchased(handler: (event: OrderPurchasedEnvelope) => void | Promise<void>): void;
|
|
2062
|
-
interface OrderResumedEnvelope {
|
|
2063
|
-
data: OrderResumed;
|
|
2064
|
-
metadata: EventMetadata;
|
|
2065
|
-
}
|
|
1984
|
+
declare function onOrderPurchased(handler: (event: OrderPurchasedEnvelope) => void | Promise<void>): void;
|
|
1985
|
+
interface OrderResumedEnvelope {
|
|
1986
|
+
data: OrderResumed;
|
|
1987
|
+
metadata: EventMetadata;
|
|
1988
|
+
}
|
|
1989
|
+
/**
|
|
1990
|
+
* Triggered when a paused order is resumed.
|
|
1991
|
+
* @permissionScope Manage_Wix_Rentals_App_Forms_submissions
|
|
1992
|
+
* @permissionScopeId SCOPE.RENTALS.MANAGE
|
|
1993
|
+
* @permissionScope Manage Orders
|
|
1994
|
+
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
1995
|
+
* @permissionScope Read Orders
|
|
1996
|
+
* @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS
|
|
1997
|
+
* @permissionScope Manage plans and orders of Pricing Plans
|
|
1998
|
+
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS-AND-ORDERS
|
|
1999
|
+
* @permissionScope Manage Events
|
|
2000
|
+
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
2001
|
+
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
2002
|
+
* @webhook
|
|
2003
|
+
* @eventType wix.pricing_plans.v2.order_resumed
|
|
2004
|
+
* @serviceIdentifier com.wixpress.membership.v2.orders.OrderManagementService
|
|
2005
|
+
* @slug resumed
|
|
2006
|
+
*/
|
|
2007
|
+
declare function onOrderResumed(handler: (event: OrderResumedEnvelope) => void | Promise<void>): void;
|
|
2008
|
+
interface OrderStartedEnvelope {
|
|
2009
|
+
data: OrderStarted;
|
|
2010
|
+
metadata: EventMetadata;
|
|
2011
|
+
}
|
|
2012
|
+
/**
|
|
2013
|
+
* Triggered when an order reaches its `startDate`. Applies to both purchased and free orders.
|
|
2014
|
+
* @permissionScope Manage_Wix_Rentals_App_Forms_submissions
|
|
2015
|
+
* @permissionScopeId SCOPE.RENTALS.MANAGE
|
|
2016
|
+
* @permissionScope Manage Orders
|
|
2017
|
+
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
2018
|
+
* @permissionScope Read Orders
|
|
2019
|
+
* @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS
|
|
2020
|
+
* @permissionScope Manage plans and orders of Pricing Plans
|
|
2021
|
+
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS-AND-ORDERS
|
|
2022
|
+
* @permissionScope Manage Events
|
|
2023
|
+
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
2024
|
+
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
2025
|
+
* @webhook
|
|
2026
|
+
* @eventType wix.pricing_plans.v2.order_started
|
|
2027
|
+
* @serviceIdentifier com.wixpress.membership.v2.orders.OrderManagementService
|
|
2028
|
+
* @slug started
|
|
2029
|
+
*/
|
|
2030
|
+
declare function onOrderStarted(handler: (event: OrderStartedEnvelope) => void | Promise<void>): void;
|
|
2031
|
+
interface OrderUpdatedEnvelope {
|
|
2032
|
+
entity: Order;
|
|
2033
|
+
metadata: EventMetadata;
|
|
2034
|
+
}
|
|
2035
|
+
/**
|
|
2036
|
+
* Triggered for any of the following update events:
|
|
2037
|
+
*
|
|
2038
|
+
* + Order is paid for. Order Purchased is also triggered.
|
|
2039
|
+
* + Order reaches its start date or end date. Order Started and Order Ended, respectively, are also triggered.
|
|
2040
|
+
* + New payment cycle of an order starts. Order Cycle Started is also triggered.
|
|
2041
|
+
* + Offline order is marked as paid. Order Marked As Paid is also triggered.
|
|
2042
|
+
* + End date of the order is postponed. Order End Date Postponed is also triggered
|
|
2043
|
+
* + Order is paused, or a paused order is resumed. Order Paused and Order Resumed, respectively, are also triggered.
|
|
2044
|
+
* + Order is canceled, either immediately or at the end of the payment cycle. Order Canceled and Order Auto Renew Canceled, respectively, are also triggered.
|
|
2045
|
+
* @permissionScope Manage_Wix_Rentals_App_Forms_submissions
|
|
2046
|
+
* @permissionScopeId SCOPE.RENTALS.MANAGE
|
|
2047
|
+
* @permissionScope Manage Orders
|
|
2048
|
+
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
2049
|
+
* @permissionScope Read Orders
|
|
2050
|
+
* @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS
|
|
2051
|
+
* @permissionScope Manage plans and orders of Pricing Plans
|
|
2052
|
+
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS-AND-ORDERS
|
|
2053
|
+
* @permissionScope Manage Events
|
|
2054
|
+
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
2055
|
+
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
2056
|
+
* @webhook
|
|
2057
|
+
* @eventType wix.pricing_plans.v2.order_updated
|
|
2058
|
+
* @serviceIdentifier com.wixpress.membership.v2.orders.OrderManagementService
|
|
2059
|
+
* @slug updated
|
|
2060
|
+
*/
|
|
2061
|
+
declare function onOrderUpdated(handler: (event: OrderUpdatedEnvelope) => void | Promise<void>): void;
|
|
2062
|
+
interface OrderCreatedEnvelope {
|
|
2063
|
+
entity: Order;
|
|
2064
|
+
metadata: EventMetadata;
|
|
2065
|
+
}
|
|
2066
|
+
/**
|
|
2067
|
+
* Triggered when an order is created.
|
|
2068
|
+
* @permissionScope Manage_Wix_Rentals_App_Forms_submissions
|
|
2069
|
+
* @permissionScopeId SCOPE.RENTALS.MANAGE
|
|
2070
|
+
* @permissionScope Manage Orders
|
|
2071
|
+
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
2072
|
+
* @permissionScope Read Orders
|
|
2073
|
+
* @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS
|
|
2074
|
+
* @permissionScope Manage plans and orders of Pricing Plans
|
|
2075
|
+
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS-AND-ORDERS
|
|
2076
|
+
* @permissionScope Manage Events
|
|
2077
|
+
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
2078
|
+
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
2079
|
+
* @webhook
|
|
2080
|
+
* @eventType wix.pricing_plans.v2.order_created
|
|
2081
|
+
* @serviceIdentifier com.wixpress.membership.v2.orders.CheckoutService
|
|
2082
|
+
* @slug created
|
|
2083
|
+
*/
|
|
2084
|
+
declare function onOrderCreated(handler: (event: OrderCreatedEnvelope) => void | Promise<void>): void;
|
|
2085
|
+
interface OrderStartDateChangedEnvelope {
|
|
2086
|
+
data: OrderStartDateChanged;
|
|
2087
|
+
metadata: EventMetadata;
|
|
2088
|
+
}
|
|
2089
|
+
/**
|
|
2090
|
+
* Triggered when an order's `startDate` is changed.
|
|
2091
|
+
* @permissionScope Manage_Wix_Rentals_App_Forms_submissions
|
|
2092
|
+
* @permissionScopeId SCOPE.RENTALS.MANAGE
|
|
2093
|
+
* @permissionScope Manage Orders
|
|
2094
|
+
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
|
|
2095
|
+
* @permissionScope Read Orders
|
|
2096
|
+
* @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS
|
|
2097
|
+
* @permissionScope Manage plans and orders of Pricing Plans
|
|
2098
|
+
* @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS-AND-ORDERS
|
|
2099
|
+
* @permissionScope Manage Events
|
|
2100
|
+
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
2101
|
+
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
2102
|
+
* @webhook
|
|
2103
|
+
* @eventType wix.pricing_plans.v2.order_start_date_changed
|
|
2104
|
+
* @serviceIdentifier com.wixpress.membership.v2.orders.CheckoutService
|
|
2105
|
+
* @slug start_date_changed
|
|
2106
|
+
*/
|
|
2107
|
+
declare function onOrderStartDateChanged(handler: (event: OrderStartDateChangedEnvelope) => void | Promise<void>): void;
|
|
2108
|
+
/**
|
|
2109
|
+
* Retrieves an order by ID.
|
|
2110
|
+
* @param _id - Order ID.
|
|
2111
|
+
* @public
|
|
2112
|
+
* @requiredField _id
|
|
2113
|
+
* @param options - Options to use when getting an order.
|
|
2114
|
+
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
2115
|
+
* @applicableIdentity APP
|
|
2116
|
+
* @fqn com.wixpress.membership.v2.orders.OrderManagementService.GetOrder
|
|
2117
|
+
*/
|
|
2118
|
+
declare function managementGetOrder(_id: string, options?: ManagementGetOrderOptions): Promise<NonNullablePaths<GetOrderResponse, `order._id` | `order.planId` | `order.subscriptionId` | `order.buyer.memberId` | `order.buyer.contactId` | `order.priceDetails.subscription.cycleDuration.unit` | `order.priceDetails.subtotal` | `order.priceDetails.discount` | `order.priceDetails.tax.name` | `order.priceDetails.tax.includedInPrice` | `order.priceDetails.tax.rate` | `order.priceDetails.tax.amount` | `order.priceDetails.total` | `order.priceDetails.planPrice` | `order.priceDetails.currency` | `order.priceDetails.coupon.code` | `order.priceDetails.coupon.amount` | `order.priceDetails.coupon._id` | `order.pricing.prices` | `order.pricing.prices.${number}.duration.cycleFrom` | `order.pricing.prices.${number}.price.subtotal` | `order.pricing.prices.${number}.price.discount` | `order.pricing.prices.${number}.price.total` | `order.pricing.prices.${number}.price.currency` | `order.pricing.prices.${number}.price.proration` | `order.type` | `order.status` | `order.cancellation.cause` | `order.cancellation.effectiveAt` | `order.lastPaymentStatus` | `order.pausePeriods` | `order.pausePeriods.${number}.status` | `order.currentCycle.index` | `order.planName` | `order.planDescription` | `order.planPrice`, 5>>;
|
|
2119
|
+
interface ManagementGetOrderOptions {
|
|
2120
|
+
/**
|
|
2121
|
+
* Predefined set of fields to return.
|
|
2122
|
+
*
|
|
2123
|
+
* Default: If `fieldSet` is omitted, no order form submission data is returned.
|
|
2124
|
+
*/
|
|
2125
|
+
fieldSet?: SetWithLiterals;
|
|
2126
|
+
}
|
|
2127
|
+
/**
|
|
2128
|
+
* Retrieves a list of up to 50 pricing plan orders and details, given the specified sorting and filtering.
|
|
2129
|
+
*
|
|
2130
|
+
* By default, this endpoint will retrieve all orders and return them sorted by `createdDate` in `DESC`, descending order.
|
|
2131
|
+
* `sort.fieldName` supports `endDate` and `createdDate` fields and defaults to `ASC`, ascending order.
|
|
2132
|
+
* @public
|
|
2133
|
+
* @param options - Filtering, sorting, and pagination options.
|
|
2134
|
+
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
2135
|
+
* @applicableIdentity APP
|
|
2136
|
+
* @fqn com.wixpress.membership.v2.orders.OrderManagementService.ListOrders
|
|
2137
|
+
*/
|
|
2138
|
+
declare function managementListOrders(options?: ManagementListOrdersOptions): Promise<NonNullablePaths<ListOrdersResponse, `orders` | `orders.${number}._id` | `orders.${number}.planId` | `orders.${number}.subscriptionId` | `orders.${number}.buyer.memberId` | `orders.${number}.buyer.contactId` | `orders.${number}.priceDetails.singlePaymentForDuration.unit` | `orders.${number}.priceDetails.subtotal` | `orders.${number}.priceDetails.discount` | `orders.${number}.priceDetails.tax.name` | `orders.${number}.priceDetails.tax.includedInPrice` | `orders.${number}.priceDetails.tax.rate` | `orders.${number}.priceDetails.tax.amount` | `orders.${number}.priceDetails.total` | `orders.${number}.priceDetails.planPrice` | `orders.${number}.priceDetails.currency` | `orders.${number}.priceDetails.coupon.code` | `orders.${number}.priceDetails.coupon.amount` | `orders.${number}.priceDetails.coupon._id` | `orders.${number}.type` | `orders.${number}.status` | `orders.${number}.cancellation.cause` | `orders.${number}.cancellation.effectiveAt` | `orders.${number}.lastPaymentStatus` | `orders.${number}.currentCycle.index` | `orders.${number}.planName` | `orders.${number}.planDescription` | `orders.${number}.planPrice`, 4>>;
|
|
2139
|
+
interface ManagementListOrdersOptions {
|
|
2140
|
+
/**
|
|
2141
|
+
* Filter by a buyer's member ID, from the Members API.
|
|
2142
|
+
* @format GUID
|
|
2143
|
+
*/
|
|
2144
|
+
buyerIds?: string[];
|
|
2145
|
+
/**
|
|
2146
|
+
* Filter by plan IDs, from the Plans API.
|
|
2147
|
+
* @format GUID
|
|
2148
|
+
*/
|
|
2149
|
+
planIds?: string[];
|
|
2150
|
+
/** Filter by whether or not the auto-renewal of recurring orders was canceled. */
|
|
2151
|
+
autoRenewCanceled?: boolean | null;
|
|
2152
|
+
/** Filter by order status. */
|
|
2153
|
+
orderStatuses?: OrderStatusWithLiterals[];
|
|
2154
|
+
/** Filter by payment status. */
|
|
2155
|
+
paymentStatuses?: PaymentStatusWithLiterals[];
|
|
2156
|
+
/**
|
|
2157
|
+
* Number of orders to return. See Sorting and Paging for more information.
|
|
2158
|
+
*
|
|
2159
|
+
* Max: `50`
|
|
2160
|
+
* @min 1
|
|
2161
|
+
* @max 50
|
|
2162
|
+
*/
|
|
2163
|
+
limit?: number | null;
|
|
2164
|
+
/** Number of orders to skip in the current sort order. */
|
|
2165
|
+
offset?: number | null;
|
|
2166
|
+
/**
|
|
2167
|
+
* Sort order.
|
|
2168
|
+
*
|
|
2169
|
+
* Use `ASC` for ascending order or `DESC` for descending order.
|
|
2170
|
+
*
|
|
2171
|
+
* Default: `DESC`.
|
|
2172
|
+
*/
|
|
2173
|
+
sorting?: Sorting;
|
|
2174
|
+
/**
|
|
2175
|
+
* Predefined set of fields to return.
|
|
2176
|
+
*
|
|
2177
|
+
* Default: If `fieldSet` is omitted, no order form submission data is returned.
|
|
2178
|
+
*/
|
|
2179
|
+
fieldSet?: SetWithLiterals;
|
|
2180
|
+
}
|
|
2181
|
+
/**
|
|
2182
|
+
* Extends the duration of a pricing plan order by postponing the order's `endDate`. Postponing the end date of an order does not impact payments.
|
|
2183
|
+
*
|
|
2184
|
+
* New `endDate` must be later than the order's current `endDate`. Can't postpone orders that are unlimited.
|
|
2185
|
+
* Can't postpone an order with `status`: `PAUSED`.
|
|
2186
|
+
* @param _id - Order ID.
|
|
2187
|
+
* @param endDate - New end date and time.
|
|
2188
|
+
*
|
|
2189
|
+
* Must be later than the current end date and time.
|
|
2190
|
+
* @public
|
|
2191
|
+
* @requiredField _id
|
|
2192
|
+
* @requiredField endDate
|
|
2193
|
+
* @param options - Options for postponing the end date of an order.
|
|
2194
|
+
* @permissionId PRICING_PLANS.MANAGE_ORDERS
|
|
2195
|
+
* @applicableIdentity APP
|
|
2196
|
+
* @fqn com.wixpress.membership.v2.orders.OrderManagementService.PostponeEndDate
|
|
2197
|
+
*/
|
|
2198
|
+
declare function postponeEndDate(_id: string, endDate: Date): Promise<void>;
|
|
2199
|
+
/**
|
|
2200
|
+
* Cancels an existing order.
|
|
2201
|
+
*
|
|
2202
|
+
* For orders with recurring payments, a cancellation can be set to occur either `IMMEDIATELY` or at the `NEXT_PAYMENT_DATE`.
|
|
2203
|
+
* For orders with one-time payments, a cancellation can only be set for `IMMEDIATELY`.
|
|
2204
|
+
*
|
|
2205
|
+
* #### Canceling during the free trial period.
|
|
2206
|
+
*
|
|
2207
|
+
* When a buyer cancels their order during the free trial period, the buyer's subscription expires at the end
|
|
2208
|
+
* of the free trial period and they will not be billed. The buyer may continue using the benefits until the end
|
|
2209
|
+
* of the free trial period.
|
|
2210
|
+
*
|
|
2211
|
+
* When a Wix user cancels an ordered plan during the free trial period, they choose whether to apply the cancellation
|
|
2212
|
+
* `IMMEDIATELY` or at the `NEXT_PAYMENT_DATE`. Canceling `IMMEDIATELY` will end the subscription for the buyer
|
|
2213
|
+
* immediately, even during the free trial period and the buyer won't be billed. Canceling at the
|
|
2214
|
+
* `NEXT_PAYMENT_DATE` allows the buyer to continue using the benefits of the subscription until the end of the free trial period.
|
|
2215
|
+
* Then, the subscription ends and the buyer is not billed.
|
|
2216
|
+
* @param _id - Order ID.
|
|
2217
|
+
* @param effectiveAt - __Required.__ When the order will be canceled. One-time orders can only be canceled `IMMEDIATELY`.
|
|
2218
|
+
* @public
|
|
2219
|
+
* @requiredField _id
|
|
2220
|
+
* @requiredField effectiveAt
|
|
2221
|
+
* @param options - Options for canceling orders.
|
|
2222
|
+
* @permissionId PRICING_PLANS.MANAGE_ORDERS
|
|
2223
|
+
* @applicableIdentity APP
|
|
2224
|
+
* @fqn com.wixpress.membership.v2.orders.OrderManagementService.CancelOrder
|
|
2225
|
+
*/
|
|
2226
|
+
declare function cancelOrder(_id: string, effectiveAt: CancellationEffectiveAtWithLiterals): Promise<void>;
|
|
2227
|
+
/**
|
|
2228
|
+
* Marks an offline order as paid.
|
|
2229
|
+
* > __Note__: Marking separate payment cycles as paid is not yet supported. The entire order will be marked as paid. Subsequent offline payments do trigger events and emails, but are not registered as additional offline payments.
|
|
2230
|
+
*
|
|
2231
|
+
* Marking an offline order as paid causes the following changes:
|
|
2232
|
+
* - The order's `lastPaymentStatus` changes to `"PAID"`.
|
|
2233
|
+
* - The order's status changes to either `"PENDING"` or `"ACTIVE"`, depending on the order's `startDate`.
|
|
2234
|
+
*
|
|
2235
|
+
* An error occurs if you attempt to:
|
|
2236
|
+
* - Mark an already-paid, offline order as paid. You cannot mark an offline order as paid twice.
|
|
2237
|
+
* - Mark an online order as paid. The Mark as Paid method is supported for offline orders only.
|
|
2238
|
+
* @param _id - Order ID.
|
|
2239
|
+
* @public
|
|
2240
|
+
* @requiredField _id
|
|
2241
|
+
* @permissionId PRICING_PLANS.MANAGE_ORDERS
|
|
2242
|
+
* @applicableIdentity APP
|
|
2243
|
+
* @fqn com.wixpress.membership.v2.orders.OrderManagementService.MarkAsPaid
|
|
2244
|
+
*/
|
|
2245
|
+
declare function markAsPaid(_id: string): Promise<void>;
|
|
2066
2246
|
/**
|
|
2067
|
-
*
|
|
2068
|
-
*
|
|
2069
|
-
*
|
|
2070
|
-
*
|
|
2071
|
-
*
|
|
2072
|
-
*
|
|
2073
|
-
*
|
|
2074
|
-
*
|
|
2075
|
-
* @
|
|
2076
|
-
* @
|
|
2077
|
-
* @
|
|
2078
|
-
* @permissionId PRICING_PLANS.
|
|
2079
|
-
* @
|
|
2080
|
-
* @
|
|
2081
|
-
* @serviceIdentifier com.wixpress.membership.v2.orders.OrderManagementService
|
|
2082
|
-
* @slug resumed
|
|
2247
|
+
* Pauses an order. Calling this method changes the order status to `"PAUSED"` and updates the `pausePeriods` array.
|
|
2248
|
+
*
|
|
2249
|
+
* Only orders with `status`: `ACTIVE` can be paused.
|
|
2250
|
+
* For orders with recurring payments, it also pauses the payment schedule. Buyers are not charged when an order is paused.
|
|
2251
|
+
* Pausing an order affects the end date of the order by adding the time the order is paused to the `endDate`.
|
|
2252
|
+
* The `endDate` and the `earliestEndDate` for the order are adjusted to include the pause period when the order is resumed.
|
|
2253
|
+
*
|
|
2254
|
+
* To resume a paused order, call Resume Order.
|
|
2255
|
+
* @param _id - Order ID.
|
|
2256
|
+
* @public
|
|
2257
|
+
* @requiredField _id
|
|
2258
|
+
* @permissionId PRICING_PLANS.MANAGE_ORDERS
|
|
2259
|
+
* @applicableIdentity APP
|
|
2260
|
+
* @fqn com.wixpress.membership.v2.orders.OrderManagementService.PauseOrder
|
|
2083
2261
|
*/
|
|
2084
|
-
declare function
|
|
2085
|
-
interface OrderStartedEnvelope {
|
|
2086
|
-
data: OrderStarted;
|
|
2087
|
-
metadata: EventMetadata;
|
|
2088
|
-
}
|
|
2262
|
+
declare function pauseOrder(_id: string): Promise<void>;
|
|
2089
2263
|
/**
|
|
2090
|
-
*
|
|
2091
|
-
*
|
|
2092
|
-
*
|
|
2093
|
-
*
|
|
2094
|
-
*
|
|
2095
|
-
*
|
|
2096
|
-
*
|
|
2097
|
-
*
|
|
2098
|
-
*
|
|
2099
|
-
*
|
|
2100
|
-
* @
|
|
2101
|
-
* @
|
|
2102
|
-
* @
|
|
2103
|
-
* @
|
|
2104
|
-
* @
|
|
2105
|
-
* @
|
|
2264
|
+
* Resumes a paused order. For orders with recurring payments, it also restarts the payment schedule.
|
|
2265
|
+
*
|
|
2266
|
+
* Resuming an order causes the following changes:
|
|
2267
|
+
* - The order status changes to `"ACTIVE"`.
|
|
2268
|
+
* - The `pausePeriods` array is updated.
|
|
2269
|
+
* - The `endDate` for the order is adjusted to include the pause period.
|
|
2270
|
+
* - For orders with recurring payments, the payment schedule is restarted.
|
|
2271
|
+
* - The `earliestEndDate` is adjusted to include the pause period. (This property is reserved for future use).
|
|
2272
|
+
*
|
|
2273
|
+
* To pause an order, call Pause Order.
|
|
2274
|
+
* @param _id - Order ID.
|
|
2275
|
+
* @public
|
|
2276
|
+
* @requiredField _id
|
|
2277
|
+
* @permissionId PRICING_PLANS.MANAGE_ORDERS
|
|
2278
|
+
* @applicableIdentity APP
|
|
2279
|
+
* @fqn com.wixpress.membership.v2.orders.OrderManagementService.ResumeOrder
|
|
2106
2280
|
*/
|
|
2107
|
-
declare function
|
|
2281
|
+
declare function resumeOrder(_id: string): Promise<void>;
|
|
2108
2282
|
/**
|
|
2109
2283
|
* Creates an online order for a site member.
|
|
2110
2284
|
*
|
|
@@ -2305,180 +2479,6 @@ interface GetPricePreviewOptions {
|
|
|
2305
2479
|
*/
|
|
2306
2480
|
couponCode?: string | null;
|
|
2307
2481
|
}
|
|
2308
|
-
/**
|
|
2309
|
-
* Retrieves an order by ID.
|
|
2310
|
-
* @param _id - Order ID.
|
|
2311
|
-
* @public
|
|
2312
|
-
* @requiredField _id
|
|
2313
|
-
* @param options - Options to use when getting an order.
|
|
2314
|
-
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
2315
|
-
* @applicableIdentity APP
|
|
2316
|
-
* @fqn com.wixpress.membership.v2.orders.OrderManagementService.GetOrder
|
|
2317
|
-
*/
|
|
2318
|
-
declare function managementGetOrder(_id: string, options?: ManagementGetOrderOptions): Promise<NonNullablePaths<GetOrderResponse, `order._id` | `order.planId` | `order.subscriptionId` | `order.buyer.memberId` | `order.buyer.contactId` | `order.priceDetails.subscription.cycleDuration.unit` | `order.priceDetails.subtotal` | `order.priceDetails.discount` | `order.priceDetails.tax.name` | `order.priceDetails.tax.includedInPrice` | `order.priceDetails.tax.rate` | `order.priceDetails.tax.amount` | `order.priceDetails.total` | `order.priceDetails.planPrice` | `order.priceDetails.currency` | `order.priceDetails.coupon.code` | `order.priceDetails.coupon.amount` | `order.priceDetails.coupon._id` | `order.pricing.prices` | `order.pricing.prices.${number}.duration.cycleFrom` | `order.pricing.prices.${number}.price.subtotal` | `order.pricing.prices.${number}.price.discount` | `order.pricing.prices.${number}.price.total` | `order.pricing.prices.${number}.price.currency` | `order.pricing.prices.${number}.price.proration` | `order.type` | `order.status` | `order.cancellation.cause` | `order.cancellation.effectiveAt` | `order.lastPaymentStatus` | `order.pausePeriods` | `order.pausePeriods.${number}.status` | `order.currentCycle.index` | `order.planName` | `order.planDescription` | `order.planPrice`, 5>>;
|
|
2319
|
-
interface ManagementGetOrderOptions {
|
|
2320
|
-
/**
|
|
2321
|
-
* Predefined set of fields to return.
|
|
2322
|
-
*
|
|
2323
|
-
* Default: If `fieldSet` is omitted, no order form submission data is returned.
|
|
2324
|
-
*/
|
|
2325
|
-
fieldSet?: SetWithLiterals;
|
|
2326
|
-
}
|
|
2327
|
-
/**
|
|
2328
|
-
* Retrieves a list of up to 50 pricing plan orders and details, given the specified sorting and filtering.
|
|
2329
|
-
*
|
|
2330
|
-
* By default, this endpoint will retrieve all orders and return them sorted by `createdDate` in `DESC`, descending order.
|
|
2331
|
-
* `sort.fieldName` supports `endDate` and `createdDate` fields and defaults to `ASC`, ascending order.
|
|
2332
|
-
* @public
|
|
2333
|
-
* @param options - Filtering, sorting, and pagination options.
|
|
2334
|
-
* @permissionId PRICING_PLANS.READ_ORDERS
|
|
2335
|
-
* @applicableIdentity APP
|
|
2336
|
-
* @fqn com.wixpress.membership.v2.orders.OrderManagementService.ListOrders
|
|
2337
|
-
*/
|
|
2338
|
-
declare function managementListOrders(options?: ManagementListOrdersOptions): Promise<NonNullablePaths<ListOrdersResponse, `orders` | `orders.${number}._id` | `orders.${number}.planId` | `orders.${number}.subscriptionId` | `orders.${number}.buyer.memberId` | `orders.${number}.buyer.contactId` | `orders.${number}.priceDetails.singlePaymentForDuration.unit` | `orders.${number}.priceDetails.subtotal` | `orders.${number}.priceDetails.discount` | `orders.${number}.priceDetails.tax.name` | `orders.${number}.priceDetails.tax.includedInPrice` | `orders.${number}.priceDetails.tax.rate` | `orders.${number}.priceDetails.tax.amount` | `orders.${number}.priceDetails.total` | `orders.${number}.priceDetails.planPrice` | `orders.${number}.priceDetails.currency` | `orders.${number}.priceDetails.coupon.code` | `orders.${number}.priceDetails.coupon.amount` | `orders.${number}.priceDetails.coupon._id` | `orders.${number}.type` | `orders.${number}.status` | `orders.${number}.cancellation.cause` | `orders.${number}.cancellation.effectiveAt` | `orders.${number}.lastPaymentStatus` | `orders.${number}.currentCycle.index` | `orders.${number}.planName` | `orders.${number}.planDescription` | `orders.${number}.planPrice`, 4>>;
|
|
2339
|
-
interface ManagementListOrdersOptions {
|
|
2340
|
-
/**
|
|
2341
|
-
* Filter by a buyer's member ID, from the Members API.
|
|
2342
|
-
* @format GUID
|
|
2343
|
-
*/
|
|
2344
|
-
buyerIds?: string[];
|
|
2345
|
-
/**
|
|
2346
|
-
* Filter by plan IDs, from the Plans API.
|
|
2347
|
-
* @format GUID
|
|
2348
|
-
*/
|
|
2349
|
-
planIds?: string[];
|
|
2350
|
-
/** Filter by whether or not the auto-renewal of recurring orders was canceled. */
|
|
2351
|
-
autoRenewCanceled?: boolean | null;
|
|
2352
|
-
/** Filter by order status. */
|
|
2353
|
-
orderStatuses?: OrderStatusWithLiterals[];
|
|
2354
|
-
/** Filter by payment status. */
|
|
2355
|
-
paymentStatuses?: PaymentStatusWithLiterals[];
|
|
2356
|
-
/**
|
|
2357
|
-
* Number of orders to return. See Sorting and Paging for more information.
|
|
2358
|
-
*
|
|
2359
|
-
* Max: `50`
|
|
2360
|
-
* @min 1
|
|
2361
|
-
* @max 50
|
|
2362
|
-
*/
|
|
2363
|
-
limit?: number | null;
|
|
2364
|
-
/** Number of orders to skip in the current sort order. */
|
|
2365
|
-
offset?: number | null;
|
|
2366
|
-
/**
|
|
2367
|
-
* Sort order.
|
|
2368
|
-
*
|
|
2369
|
-
* Use `ASC` for ascending order or `DESC` for descending order.
|
|
2370
|
-
*
|
|
2371
|
-
* Default: `DESC`.
|
|
2372
|
-
*/
|
|
2373
|
-
sorting?: Sorting;
|
|
2374
|
-
/**
|
|
2375
|
-
* Predefined set of fields to return.
|
|
2376
|
-
*
|
|
2377
|
-
* Default: If `fieldSet` is omitted, no order form submission data is returned.
|
|
2378
|
-
*/
|
|
2379
|
-
fieldSet?: SetWithLiterals;
|
|
2380
|
-
}
|
|
2381
|
-
/**
|
|
2382
|
-
* Extends the duration of a pricing plan order by postponing the order's `endDate`. Postponing the end date of an order does not impact payments.
|
|
2383
|
-
*
|
|
2384
|
-
* New `endDate` must be later than the order's current `endDate`. Can't postpone orders that are unlimited.
|
|
2385
|
-
* Can't postpone an order with `status`: `PAUSED`.
|
|
2386
|
-
* @param _id - Order ID.
|
|
2387
|
-
* @param endDate - New end date and time.
|
|
2388
|
-
*
|
|
2389
|
-
* Must be later than the current end date and time.
|
|
2390
|
-
* @public
|
|
2391
|
-
* @requiredField _id
|
|
2392
|
-
* @requiredField endDate
|
|
2393
|
-
* @param options - Options for postponing the end date of an order.
|
|
2394
|
-
* @permissionId PRICING_PLANS.MANAGE_ORDERS
|
|
2395
|
-
* @applicableIdentity APP
|
|
2396
|
-
* @fqn com.wixpress.membership.v2.orders.OrderManagementService.PostponeEndDate
|
|
2397
|
-
*/
|
|
2398
|
-
declare function postponeEndDate(_id: string, endDate: Date): Promise<void>;
|
|
2399
|
-
/**
|
|
2400
|
-
* Cancels an existing order.
|
|
2401
|
-
*
|
|
2402
|
-
* For orders with recurring payments, a cancellation can be set to occur either `IMMEDIATELY` or at the `NEXT_PAYMENT_DATE`.
|
|
2403
|
-
* For orders with one-time payments, a cancellation can only be set for `IMMEDIATELY`.
|
|
2404
|
-
*
|
|
2405
|
-
* #### Canceling during the free trial period.
|
|
2406
|
-
*
|
|
2407
|
-
* When a buyer cancels their order during the free trial period, the buyer's subscription expires at the end
|
|
2408
|
-
* of the free trial period and they will not be billed. The buyer may continue using the benefits until the end
|
|
2409
|
-
* of the free trial period.
|
|
2410
|
-
*
|
|
2411
|
-
* When a Wix user cancels an ordered plan during the free trial period, they choose whether to apply the cancellation
|
|
2412
|
-
* `IMMEDIATELY` or at the `NEXT_PAYMENT_DATE`. Canceling `IMMEDIATELY` will end the subscription for the buyer
|
|
2413
|
-
* immediately, even during the free trial period and the buyer won't be billed. Canceling at the
|
|
2414
|
-
* `NEXT_PAYMENT_DATE` allows the buyer to continue using the benefits of the subscription until the end of the free trial period.
|
|
2415
|
-
* Then, the subscription ends and the buyer is not billed.
|
|
2416
|
-
* @param _id - Order ID.
|
|
2417
|
-
* @param effectiveAt - __Required.__ When the order will be canceled. One-time orders can only be canceled `IMMEDIATELY`.
|
|
2418
|
-
* @public
|
|
2419
|
-
* @requiredField _id
|
|
2420
|
-
* @requiredField effectiveAt
|
|
2421
|
-
* @param options - Options for canceling orders.
|
|
2422
|
-
* @permissionId PRICING_PLANS.MANAGE_ORDERS
|
|
2423
|
-
* @applicableIdentity APP
|
|
2424
|
-
* @fqn com.wixpress.membership.v2.orders.OrderManagementService.CancelOrder
|
|
2425
|
-
*/
|
|
2426
|
-
declare function cancelOrder(_id: string, effectiveAt: CancellationEffectiveAtWithLiterals): Promise<void>;
|
|
2427
|
-
/**
|
|
2428
|
-
* Marks an offline order as paid.
|
|
2429
|
-
* > __Note__: Marking separate payment cycles as paid is not yet supported. The entire order will be marked as paid. Subsequent offline payments do trigger events and emails, but are not registered as additional offline payments.
|
|
2430
|
-
*
|
|
2431
|
-
* Marking an offline order as paid causes the following changes:
|
|
2432
|
-
* - The order's `lastPaymentStatus` changes to `"PAID"`.
|
|
2433
|
-
* - The order's status changes to either `"PENDING"` or `"ACTIVE"`, depending on the order's `startDate`.
|
|
2434
|
-
*
|
|
2435
|
-
* An error occurs if you attempt to:
|
|
2436
|
-
* - Mark an already-paid, offline order as paid. You cannot mark an offline order as paid twice.
|
|
2437
|
-
* - Mark an online order as paid. The Mark as Paid method is supported for offline orders only.
|
|
2438
|
-
* @param _id - Order ID.
|
|
2439
|
-
* @public
|
|
2440
|
-
* @requiredField _id
|
|
2441
|
-
* @permissionId PRICING_PLANS.MANAGE_ORDERS
|
|
2442
|
-
* @applicableIdentity APP
|
|
2443
|
-
* @fqn com.wixpress.membership.v2.orders.OrderManagementService.MarkAsPaid
|
|
2444
|
-
*/
|
|
2445
|
-
declare function markAsPaid(_id: string): Promise<void>;
|
|
2446
|
-
/**
|
|
2447
|
-
* Pauses an order. Calling this method changes the order status to `"PAUSED"` and updates the `pausePeriods` array.
|
|
2448
|
-
*
|
|
2449
|
-
* Only orders with `status`: `ACTIVE` can be paused.
|
|
2450
|
-
* For orders with recurring payments, it also pauses the payment schedule. Buyers are not charged when an order is paused.
|
|
2451
|
-
* Pausing an order affects the end date of the order by adding the time the order is paused to the `endDate`.
|
|
2452
|
-
* The `endDate` and the `earliestEndDate` for the order are adjusted to include the pause period when the order is resumed.
|
|
2453
|
-
*
|
|
2454
|
-
* To resume a paused order, call Resume Order.
|
|
2455
|
-
* @param _id - Order ID.
|
|
2456
|
-
* @public
|
|
2457
|
-
* @requiredField _id
|
|
2458
|
-
* @permissionId PRICING_PLANS.MANAGE_ORDERS
|
|
2459
|
-
* @applicableIdentity APP
|
|
2460
|
-
* @fqn com.wixpress.membership.v2.orders.OrderManagementService.PauseOrder
|
|
2461
|
-
*/
|
|
2462
|
-
declare function pauseOrder(_id: string): Promise<void>;
|
|
2463
|
-
/**
|
|
2464
|
-
* Resumes a paused order. For orders with recurring payments, it also restarts the payment schedule.
|
|
2465
|
-
*
|
|
2466
|
-
* Resuming an order causes the following changes:
|
|
2467
|
-
* - The order status changes to `"ACTIVE"`.
|
|
2468
|
-
* - The `pausePeriods` array is updated.
|
|
2469
|
-
* - The `endDate` for the order is adjusted to include the pause period.
|
|
2470
|
-
* - For orders with recurring payments, the payment schedule is restarted.
|
|
2471
|
-
* - The `earliestEndDate` is adjusted to include the pause period. (This property is reserved for future use).
|
|
2472
|
-
*
|
|
2473
|
-
* To pause an order, call Pause Order.
|
|
2474
|
-
* @param _id - Order ID.
|
|
2475
|
-
* @public
|
|
2476
|
-
* @requiredField _id
|
|
2477
|
-
* @permissionId PRICING_PLANS.MANAGE_ORDERS
|
|
2478
|
-
* @applicableIdentity APP
|
|
2479
|
-
* @fqn com.wixpress.membership.v2.orders.OrderManagementService.ResumeOrder
|
|
2480
|
-
*/
|
|
2481
|
-
declare function resumeOrder(_id: string): Promise<void>;
|
|
2482
2482
|
/**
|
|
2483
2483
|
* Retrieves an order for the currently logged-in member by ID.
|
|
2484
2484
|
* @param _id - Order ID.
|