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