@wix/auto_sdk_pricing-plans_orders 1.0.99 → 1.0.101
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 +153 -153
- package/build/cjs/index.js +642 -642
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +607 -607
- package/build/cjs/index.typings.js +507 -507
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +459 -459
- package/build/cjs/meta.js +403 -403
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +153 -153
- package/build/es/index.mjs +642 -642
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +607 -607
- package/build/es/index.typings.mjs +507 -507
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +459 -459
- package/build/es/meta.mjs +403 -403
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +153 -153
- package/build/internal/cjs/index.js +642 -642
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +607 -607
- package/build/internal/cjs/index.typings.js +507 -507
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +459 -459
- package/build/internal/cjs/meta.js +403 -403
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +153 -153
- package/build/internal/es/index.mjs +642 -642
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +607 -607
- package/build/internal/es/index.typings.mjs +507 -507
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +459 -459
- package/build/internal/es/meta.mjs +403 -403
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +4 -4
package/build/cjs/index.d.ts
CHANGED
|
@@ -1,15 +1,125 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
|
|
2
|
-
import { MemberGetOrderOptions,
|
|
3
|
-
export { AccountInfo, AccountInfoMetadata, ActionEvent, ApplicationError, ApplyCouponRequest, ApplyCouponResponse, BaseEventMetadata, BulkActionMetadata, BulkOrderResult, BulkPauseOrderRequest, BulkPauseOrderResponse, BulkResumeOrderRequest, BulkResumeOrderResponse, Buyer, CancelOrderRequest, CancelOrderResponse, Cancellation, CancellationCause, CancellationCauseWithLiterals, CancellationEffectiveAt, Captcha, ChangeStartDateRequest, ChangeStartDateResponse, Coupon, CouponsError, CreateExternalOrderRequest, CreateExternalOrderResponse, CreateGuestOnlineOrderRequest, CreateGuestOnlineOrderResponse, CreateOfflineOrderRequest, CreateOnlineOrderRequest, CurrentCycle, CursorPaging, Cursors, DomainEvent, DomainEventBodyOneOf, Duration, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, Fee, FormData, GetAvailableOrderActionsRequest, GetAvailableOrderActionsResponse, GetGuestOnlineOrderPreviewRequest, GetGuestOnlineOrderPreviewResponse, GetOfflineOrderPreviewRequest, GetOnlineOrderPreviewRequest, GetOrderRequest,
|
|
2
|
+
import { ManagementGetOrderOptions, GetOrderResponse, ManagementListOrdersOptions, ListOrdersResponse, CancellationEffectiveAtWithLiterals, MemberGetOrderOptions, Order, MemberListOrdersOptions, MemberListOrdersResponse, CreateOnlineOrderOptions, CreateOnlineOrderResponse, CreateOnlineOrderApplicationErrors, CreateOnlineOrderValidationErrors, CreateOfflineOrderOptions, CreateOfflineOrderResponse, CreateOfflineOrderApplicationErrors, CreateOfflineOrderValidationErrors, GetOnlineOrderPreviewOptions, GetOnlineOrderPreviewResponse, GetOnlineOrderPreviewApplicationErrors, GetOnlineOrderPreviewValidationErrors, GetOfflineOrderPreviewOptions, GetOfflineOrderPreviewResponse, GetOfflineOrderPreviewApplicationErrors, GetOfflineOrderPreviewValidationErrors, GetPricePreviewOptions, GetPricePreviewResponse, GetPricePreviewApplicationErrors, OrderAutoRenewCanceledEnvelope, OrderCanceledEnvelope, OrderCycleStartedEnvelope, OrderEndDatePostponedEnvelope, OrderEndedEnvelope, OrderMarkedAsPaidEnvelope, OrderPausedEnvelope, OrderPurchasedEnvelope, OrderResumedEnvelope, OrderStartedEnvelope, OrderUpdatedEnvelope, OrderCreatedEnvelope, OrderStartDateChangedEnvelope } from './index.typings.js';
|
|
3
|
+
export { AccountInfo, AccountInfoMetadata, ActionEvent, ApplicationError, ApplyCouponRequest, ApplyCouponResponse, BaseEventMetadata, BulkActionMetadata, BulkOrderResult, BulkPauseOrderRequest, BulkPauseOrderResponse, BulkResumeOrderRequest, BulkResumeOrderResponse, Buyer, CancelOrderRequest, CancelOrderResponse, Cancellation, CancellationCause, CancellationCauseWithLiterals, CancellationEffectiveAt, Captcha, ChangeStartDateRequest, ChangeStartDateResponse, Coupon, CouponsError, CreateExternalOrderRequest, CreateExternalOrderResponse, CreateGuestOnlineOrderRequest, CreateGuestOnlineOrderResponse, CreateOfflineOrderRequest, CreateOnlineOrderRequest, CurrentCycle, CursorPaging, Cursors, DomainEvent, DomainEventBodyOneOf, Duration, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, Fee, FormData, GetAvailableOrderActionsRequest, GetAvailableOrderActionsResponse, GetGuestOnlineOrderPreviewRequest, GetGuestOnlineOrderPreviewResponse, GetOfflineOrderPreviewRequest, GetOnlineOrderPreviewRequest, GetOrderRequest, GetOrdersStatsRequest, GetOrdersStatsResponse, GetPricePreviewRequest, Guest, IdentificationData, IdentificationDataIdOneOf, ItemMetadata, ListOrdersRequest, MarkAsPaidRequest, MarkAsPaidResponse, MemberGetOrderRequest, MemberGetOrderResponse, MemberListOrdersRequest, MessageEnvelope, OnBehalf, OrderAutoRenewCanceled, OrderCanceled, OrderCycle, OrderCycleStarted, OrderEndDatePostponed, OrderEnded, OrderMarkedAsPaid, OrderMethod, OrderMethodWithLiterals, OrderPaused, OrderPurchased, OrderResumed, OrderStartDateChanged, OrderStarted, OrderStatus, OrderStatusWithLiterals, OrderType, OrderTypeWithLiterals, OrdersQueryOrdersRequest, OrdersQueryOrdersResponse, Paging, PagingMetadataV2, PauseOrderRequest, PauseOrderResponse, PausePeriod, PaymentStatus, PaymentStatusWithLiterals, PeriodUnit, PeriodUnitWithLiterals, PostponeEndDateRequest, PostponeEndDateResponse, Price, PriceDetails, PriceDetailsPricingModelOneOf, PriceDuration, PricingDetails, PricingDetailsPricingModelOneOf, QueryOrdersRequest, QueryOrdersResponse, QueryV2, QueryV2PagingMethodOneOf, ReasonNotSuspendable, ReasonNotSuspendableWithLiterals, Recurrence, RequestCancellationRequest, RequestCancellationResponse, RestoreInfo, ResumeOrderRequest, ResumeOrderResponse, Set, SetSubmissionRequest, SetSubmissionResponse, SetWithLiterals, SortOrder, SortOrderWithLiterals, Sorting, SpannedPrice, Status, StatusWithLiterals, Tax, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.js';
|
|
4
4
|
|
|
5
|
+
declare function managementGetOrder$1(httpClient: HttpClient): ManagementGetOrderSignature;
|
|
6
|
+
interface ManagementGetOrderSignature {
|
|
7
|
+
/**
|
|
8
|
+
* Retrieves an order by ID.
|
|
9
|
+
* @param - Order ID.
|
|
10
|
+
* @param - Options to use when getting an order.
|
|
11
|
+
*/
|
|
12
|
+
(_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>>;
|
|
13
|
+
}
|
|
14
|
+
declare function managementListOrders$1(httpClient: HttpClient): ManagementListOrdersSignature;
|
|
15
|
+
interface ManagementListOrdersSignature {
|
|
16
|
+
/**
|
|
17
|
+
* Retrieves a list of up to 50 pricing plan orders and details, given the specified sorting and filtering.
|
|
18
|
+
*
|
|
19
|
+
* By default, this endpoint will retrieve all orders and return them sorted by `createdDate` in `DESC`, descending order.
|
|
20
|
+
* `sort.fieldName` supports `endDate` and `createdDate` fields and defaults to `ASC`, ascending order.
|
|
21
|
+
* @param - Filtering, sorting, and pagination options.
|
|
22
|
+
*/
|
|
23
|
+
(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>>;
|
|
24
|
+
}
|
|
25
|
+
declare function postponeEndDate$1(httpClient: HttpClient): PostponeEndDateSignature;
|
|
26
|
+
interface PostponeEndDateSignature {
|
|
27
|
+
/**
|
|
28
|
+
* 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.
|
|
29
|
+
*
|
|
30
|
+
* New `endDate` must be later than the order's current `endDate`. Can't postpone orders that are unlimited.
|
|
31
|
+
* Can't postpone an order with `status`: `PAUSED`.
|
|
32
|
+
* @param - Order ID.
|
|
33
|
+
* @param - New end date and time.
|
|
34
|
+
*
|
|
35
|
+
* Must be later than the current end date and time.
|
|
36
|
+
* @param - Options for postponing the end date of an order.
|
|
37
|
+
*/
|
|
38
|
+
(_id: string, endDate: Date): Promise<void>;
|
|
39
|
+
}
|
|
40
|
+
declare function cancelOrder$1(httpClient: HttpClient): CancelOrderSignature;
|
|
41
|
+
interface CancelOrderSignature {
|
|
42
|
+
/**
|
|
43
|
+
* Cancels an existing order.
|
|
44
|
+
*
|
|
45
|
+
* For orders with recurring payments, a cancellation can be set to occur either `IMMEDIATELY` or at the `NEXT_PAYMENT_DATE`.
|
|
46
|
+
* For orders with one-time payments, a cancellation can only be set for `IMMEDIATELY`.
|
|
47
|
+
*
|
|
48
|
+
* #### Canceling during the free trial period.
|
|
49
|
+
*
|
|
50
|
+
* When a buyer cancels their order during the free trial period, the buyer's subscription expires at the end
|
|
51
|
+
* of the free trial period and they will not be billed. The buyer may continue using the benefits until the end
|
|
52
|
+
* of the free trial period.
|
|
53
|
+
*
|
|
54
|
+
* When a Wix user cancels an ordered plan during the free trial period, they choose whether to apply the cancellation
|
|
55
|
+
* `IMMEDIATELY` or at the `NEXT_PAYMENT_DATE`. Canceling `IMMEDIATELY` will end the subscription for the buyer
|
|
56
|
+
* immediately, even during the free trial period and the buyer won't be billed. Canceling at the
|
|
57
|
+
* `NEXT_PAYMENT_DATE` allows the buyer to continue using the benefits of the subscription until the end of the free trial period.
|
|
58
|
+
* Then, the subscription ends and the buyer is not billed.
|
|
59
|
+
* @param - Order ID.
|
|
60
|
+
* @param - __Required.__ When the order will be canceled. One-time orders can only be canceled `IMMEDIATELY`.
|
|
61
|
+
* @param - Options for canceling orders.
|
|
62
|
+
*/
|
|
63
|
+
(_id: string, effectiveAt: CancellationEffectiveAtWithLiterals): Promise<void>;
|
|
64
|
+
}
|
|
65
|
+
declare function markAsPaid$1(httpClient: HttpClient): MarkAsPaidSignature;
|
|
66
|
+
interface MarkAsPaidSignature {
|
|
67
|
+
/**
|
|
68
|
+
* Marks an offline order as paid.
|
|
69
|
+
* > __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.
|
|
70
|
+
*
|
|
71
|
+
* Marking an offline order as paid causes the following changes:
|
|
72
|
+
* - The order's `lastPaymentStatus` changes to `"PAID"`.
|
|
73
|
+
* - The order's status changes to either `"PENDING"` or `"ACTIVE"`, depending on the order's `startDate`.
|
|
74
|
+
*
|
|
75
|
+
* An error occurs if you attempt to:
|
|
76
|
+
* - Mark an already-paid, offline order as paid. You cannot mark an offline order as paid twice.
|
|
77
|
+
* - Mark an online order as paid. The Mark as Paid method is supported for offline orders only.
|
|
78
|
+
* @param - Order ID.
|
|
79
|
+
*/
|
|
80
|
+
(_id: string): Promise<void>;
|
|
81
|
+
}
|
|
82
|
+
declare function pauseOrder$1(httpClient: HttpClient): PauseOrderSignature;
|
|
83
|
+
interface PauseOrderSignature {
|
|
84
|
+
/**
|
|
85
|
+
* Pauses an order. Calling this method changes the order status to `"PAUSED"` and updates the `pausePeriods` array.
|
|
86
|
+
*
|
|
87
|
+
* Only orders with `status`: `ACTIVE` can be paused.
|
|
88
|
+
* For orders with recurring payments, it also pauses the payment schedule. Buyers are not charged when an order is paused.
|
|
89
|
+
* Pausing an order affects the end date of the order by adding the time the order is paused to the `endDate`.
|
|
90
|
+
* The `endDate` and the `earliestEndDate` for the order are adjusted to include the pause period when the order is resumed.
|
|
91
|
+
*
|
|
92
|
+
* To resume a paused order, call Resume Order.
|
|
93
|
+
* @param - Order ID.
|
|
94
|
+
*/
|
|
95
|
+
(_id: string): Promise<void>;
|
|
96
|
+
}
|
|
97
|
+
declare function resumeOrder$1(httpClient: HttpClient): ResumeOrderSignature;
|
|
98
|
+
interface ResumeOrderSignature {
|
|
99
|
+
/**
|
|
100
|
+
* Resumes a paused order. For orders with recurring payments, it also restarts the payment schedule.
|
|
101
|
+
*
|
|
102
|
+
* Resuming an order causes the following changes:
|
|
103
|
+
* - The order status changes to `"ACTIVE"`.
|
|
104
|
+
* - The `pausePeriods` array is updated.
|
|
105
|
+
* - The `endDate` for the order is adjusted to include the pause period.
|
|
106
|
+
* - For orders with recurring payments, the payment schedule is restarted.
|
|
107
|
+
* - The `earliestEndDate` is adjusted to include the pause period. (This property is reserved for future use).
|
|
108
|
+
*
|
|
109
|
+
* To pause an order, call Pause Order.
|
|
110
|
+
* @param - Order ID.
|
|
111
|
+
*/
|
|
112
|
+
(_id: string): Promise<void>;
|
|
113
|
+
}
|
|
5
114
|
declare function memberGetOrder$1(httpClient: HttpClient): MemberGetOrderSignature;
|
|
6
115
|
interface MemberGetOrderSignature {
|
|
7
116
|
/**
|
|
8
117
|
* Retrieves an order for the currently logged-in member by ID.
|
|
9
118
|
* @param - Order ID.
|
|
10
119
|
* @param - Options for getting a logged-in member's order.
|
|
120
|
+
* @returns Requested order.
|
|
11
121
|
*/
|
|
12
|
-
(_id: string, options?: MemberGetOrderOptions): Promise<NonNullablePaths<
|
|
122
|
+
(_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`, 6>>;
|
|
13
123
|
}
|
|
14
124
|
declare function memberListOrders$1(httpClient: HttpClient): MemberListOrdersSignature;
|
|
15
125
|
interface MemberListOrdersSignature {
|
|
@@ -136,121 +246,8 @@ interface GetPricePreviewSignature {
|
|
|
136
246
|
__applicationErrorsType?: GetPricePreviewApplicationErrors;
|
|
137
247
|
}>;
|
|
138
248
|
}
|
|
139
|
-
declare function managementGetOrder$1(httpClient: HttpClient): ManagementGetOrderSignature;
|
|
140
|
-
interface ManagementGetOrderSignature {
|
|
141
|
-
/**
|
|
142
|
-
* Retrieves an order by ID.
|
|
143
|
-
* @param - Order ID.
|
|
144
|
-
* @param - Options to use when getting an order.
|
|
145
|
-
* @returns Order.
|
|
146
|
-
*/
|
|
147
|
-
(_id: string, options?: ManagementGetOrderOptions): 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`, 6>>;
|
|
148
|
-
}
|
|
149
|
-
declare function managementListOrders$1(httpClient: HttpClient): ManagementListOrdersSignature;
|
|
150
|
-
interface ManagementListOrdersSignature {
|
|
151
|
-
/**
|
|
152
|
-
* Retrieves a list of up to 50 pricing plan orders and details, given the specified sorting and filtering.
|
|
153
|
-
*
|
|
154
|
-
* By default, this endpoint will retrieve all orders and return them sorted by `createdDate` in `DESC`, descending order.
|
|
155
|
-
* `sort.fieldName` supports `endDate` and `createdDate` fields and defaults to `ASC`, ascending order.
|
|
156
|
-
* @param - Filtering, sorting, and pagination options.
|
|
157
|
-
*/
|
|
158
|
-
(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>>;
|
|
159
|
-
}
|
|
160
|
-
declare function postponeEndDate$1(httpClient: HttpClient): PostponeEndDateSignature;
|
|
161
|
-
interface PostponeEndDateSignature {
|
|
162
|
-
/**
|
|
163
|
-
* 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.
|
|
164
|
-
*
|
|
165
|
-
* New `endDate` must be later than the order's current `endDate`. Can't postpone orders that are unlimited.
|
|
166
|
-
* Can't postpone an order with `status`: `PAUSED`.
|
|
167
|
-
* @param - Order ID.
|
|
168
|
-
* @param - New end date and time.
|
|
169
|
-
*
|
|
170
|
-
* Must be later than the current end date and time.
|
|
171
|
-
* @param - Options for postponing the end date of an order.
|
|
172
|
-
*/
|
|
173
|
-
(_id: string, endDate: Date): Promise<void>;
|
|
174
|
-
}
|
|
175
|
-
declare function cancelOrder$1(httpClient: HttpClient): CancelOrderSignature;
|
|
176
|
-
interface CancelOrderSignature {
|
|
177
|
-
/**
|
|
178
|
-
* Cancels an existing order.
|
|
179
|
-
*
|
|
180
|
-
* For orders with recurring payments, a cancellation can be set to occur either `IMMEDIATELY` or at the `NEXT_PAYMENT_DATE`.
|
|
181
|
-
* For orders with one-time payments, a cancellation can only be set for `IMMEDIATELY`.
|
|
182
|
-
*
|
|
183
|
-
* #### Canceling during the free trial period.
|
|
184
|
-
*
|
|
185
|
-
* When a buyer cancels their order during the free trial period, the buyer's subscription expires at the end
|
|
186
|
-
* of the free trial period and they will not be billed. The buyer may continue using the benefits until the end
|
|
187
|
-
* of the free trial period.
|
|
188
|
-
*
|
|
189
|
-
* When a Wix user cancels an ordered plan during the free trial period, they choose whether to apply the cancellation
|
|
190
|
-
* `IMMEDIATELY` or at the `NEXT_PAYMENT_DATE`. Canceling `IMMEDIATELY` will end the subscription for the buyer
|
|
191
|
-
* immediately, even during the free trial period and the buyer won't be billed. Canceling at the
|
|
192
|
-
* `NEXT_PAYMENT_DATE` allows the buyer to continue using the benefits of the subscription until the end of the free trial period.
|
|
193
|
-
* Then, the subscription ends and the buyer is not billed.
|
|
194
|
-
* @param - Order ID.
|
|
195
|
-
* @param - __Required.__ When the order will be canceled. One-time orders can only be canceled `IMMEDIATELY`.
|
|
196
|
-
* @param - Options for canceling orders.
|
|
197
|
-
*/
|
|
198
|
-
(_id: string, effectiveAt: CancellationEffectiveAtWithLiterals): Promise<void>;
|
|
199
|
-
}
|
|
200
|
-
declare function markAsPaid$1(httpClient: HttpClient): MarkAsPaidSignature;
|
|
201
|
-
interface MarkAsPaidSignature {
|
|
202
|
-
/**
|
|
203
|
-
* Marks an offline order as paid.
|
|
204
|
-
* > __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.
|
|
205
|
-
*
|
|
206
|
-
* Marking an offline order as paid causes the following changes:
|
|
207
|
-
* - The order's `lastPaymentStatus` changes to `"PAID"`.
|
|
208
|
-
* - The order's status changes to either `"PENDING"` or `"ACTIVE"`, depending on the order's `startDate`.
|
|
209
|
-
*
|
|
210
|
-
* An error occurs if you attempt to:
|
|
211
|
-
* - Mark an already-paid, offline order as paid. You cannot mark an offline order as paid twice.
|
|
212
|
-
* - Mark an online order as paid. The Mark as Paid method is supported for offline orders only.
|
|
213
|
-
* @param - Order ID.
|
|
214
|
-
*/
|
|
215
|
-
(_id: string): Promise<void>;
|
|
216
|
-
}
|
|
217
|
-
declare function pauseOrder$1(httpClient: HttpClient): PauseOrderSignature;
|
|
218
|
-
interface PauseOrderSignature {
|
|
219
|
-
/**
|
|
220
|
-
* Pauses an order. Calling this method changes the order status to `"PAUSED"` and updates the `pausePeriods` array.
|
|
221
|
-
*
|
|
222
|
-
* Only orders with `status`: `ACTIVE` can be paused.
|
|
223
|
-
* For orders with recurring payments, it also pauses the payment schedule. Buyers are not charged when an order is paused.
|
|
224
|
-
* Pausing an order affects the end date of the order by adding the time the order is paused to the `endDate`.
|
|
225
|
-
* The `endDate` and the `earliestEndDate` for the order are adjusted to include the pause period when the order is resumed.
|
|
226
|
-
*
|
|
227
|
-
* To resume a paused order, call Resume Order.
|
|
228
|
-
* @param - Order ID.
|
|
229
|
-
*/
|
|
230
|
-
(_id: string): Promise<void>;
|
|
231
|
-
}
|
|
232
|
-
declare function resumeOrder$1(httpClient: HttpClient): ResumeOrderSignature;
|
|
233
|
-
interface ResumeOrderSignature {
|
|
234
|
-
/**
|
|
235
|
-
* Resumes a paused order. For orders with recurring payments, it also restarts the payment schedule.
|
|
236
|
-
*
|
|
237
|
-
* Resuming an order causes the following changes:
|
|
238
|
-
* - The order status changes to `"ACTIVE"`.
|
|
239
|
-
* - The `pausePeriods` array is updated.
|
|
240
|
-
* - The `endDate` for the order is adjusted to include the pause period.
|
|
241
|
-
* - For orders with recurring payments, the payment schedule is restarted.
|
|
242
|
-
* - The `earliestEndDate` is adjusted to include the pause period. (This property is reserved for future use).
|
|
243
|
-
*
|
|
244
|
-
* To pause an order, call Pause Order.
|
|
245
|
-
* @param - Order ID.
|
|
246
|
-
*/
|
|
247
|
-
(_id: string): Promise<void>;
|
|
248
|
-
}
|
|
249
|
-
declare const onOrderCanceled$1: EventDefinition<OrderCanceledEnvelope, "wix.pricing_plans.v2.order_canceled">;
|
|
250
|
-
declare const onOrderCreated$1: EventDefinition<OrderCreatedEnvelope, "wix.pricing_plans.v2.order_created">;
|
|
251
|
-
declare const onOrderStartDateChanged$1: EventDefinition<OrderStartDateChangedEnvelope, "wix.pricing_plans.v2.order_start_date_changed">;
|
|
252
|
-
declare const onOrderUpdated$1: EventDefinition<OrderUpdatedEnvelope, "wix.pricing_plans.v2.order_updated">;
|
|
253
249
|
declare const onOrderAutoRenewCanceled$1: EventDefinition<OrderAutoRenewCanceledEnvelope, "wix.pricing_plans.v2.order_auto_renew_canceled">;
|
|
250
|
+
declare const onOrderCanceled$1: EventDefinition<OrderCanceledEnvelope, "wix.pricing_plans.v2.order_canceled">;
|
|
254
251
|
declare const onOrderCycleStarted$1: EventDefinition<OrderCycleStartedEnvelope, "wix.pricing_plans.v2.order_cycle_started">;
|
|
255
252
|
declare const onOrderEndDatePostponed$1: EventDefinition<OrderEndDatePostponedEnvelope, "wix.pricing_plans.v2.order_end_date_postponed">;
|
|
256
253
|
declare const onOrderEnded$1: EventDefinition<OrderEndedEnvelope, "wix.pricing_plans.v2.order_ended">;
|
|
@@ -259,7 +256,17 @@ declare const onOrderPaused$1: EventDefinition<OrderPausedEnvelope, "wix.pricing
|
|
|
259
256
|
declare const onOrderPurchased$1: EventDefinition<OrderPurchasedEnvelope, "wix.pricing_plans.v2.order_purchased">;
|
|
260
257
|
declare const onOrderResumed$1: EventDefinition<OrderResumedEnvelope, "wix.pricing_plans.v2.order_resumed">;
|
|
261
258
|
declare const onOrderStarted$1: EventDefinition<OrderStartedEnvelope, "wix.pricing_plans.v2.order_started">;
|
|
259
|
+
declare const onOrderUpdated$1: EventDefinition<OrderUpdatedEnvelope, "wix.pricing_plans.v2.order_updated">;
|
|
260
|
+
declare const onOrderCreated$1: EventDefinition<OrderCreatedEnvelope, "wix.pricing_plans.v2.order_created">;
|
|
261
|
+
declare const onOrderStartDateChanged$1: EventDefinition<OrderStartDateChangedEnvelope, "wix.pricing_plans.v2.order_start_date_changed">;
|
|
262
262
|
|
|
263
|
+
declare const managementGetOrder: MaybeContext<BuildRESTFunction<typeof managementGetOrder$1> & typeof managementGetOrder$1>;
|
|
264
|
+
declare const managementListOrders: MaybeContext<BuildRESTFunction<typeof managementListOrders$1> & typeof managementListOrders$1>;
|
|
265
|
+
declare const postponeEndDate: MaybeContext<BuildRESTFunction<typeof postponeEndDate$1> & typeof postponeEndDate$1>;
|
|
266
|
+
declare const cancelOrder: MaybeContext<BuildRESTFunction<typeof cancelOrder$1> & typeof cancelOrder$1>;
|
|
267
|
+
declare const markAsPaid: MaybeContext<BuildRESTFunction<typeof markAsPaid$1> & typeof markAsPaid$1>;
|
|
268
|
+
declare const pauseOrder: MaybeContext<BuildRESTFunction<typeof pauseOrder$1> & typeof pauseOrder$1>;
|
|
269
|
+
declare const resumeOrder: MaybeContext<BuildRESTFunction<typeof resumeOrder$1> & typeof resumeOrder$1>;
|
|
263
270
|
declare const memberGetOrder: MaybeContext<BuildRESTFunction<typeof memberGetOrder$1> & typeof memberGetOrder$1>;
|
|
264
271
|
declare const memberListOrders: MaybeContext<BuildRESTFunction<typeof memberListOrders$1> & typeof memberListOrders$1>;
|
|
265
272
|
declare const requestCancellation: MaybeContext<BuildRESTFunction<typeof requestCancellation$1> & typeof requestCancellation$1>;
|
|
@@ -268,41 +275,6 @@ declare const createOfflineOrder: MaybeContext<BuildRESTFunction<typeof createOf
|
|
|
268
275
|
declare const getOnlineOrderPreview: MaybeContext<BuildRESTFunction<typeof getOnlineOrderPreview$1> & typeof getOnlineOrderPreview$1>;
|
|
269
276
|
declare const getOfflineOrderPreview: MaybeContext<BuildRESTFunction<typeof getOfflineOrderPreview$1> & typeof getOfflineOrderPreview$1>;
|
|
270
277
|
declare const getPricePreview: MaybeContext<BuildRESTFunction<typeof getPricePreview$1> & typeof getPricePreview$1>;
|
|
271
|
-
declare const managementGetOrder: MaybeContext<BuildRESTFunction<typeof managementGetOrder$1> & typeof managementGetOrder$1>;
|
|
272
|
-
declare const managementListOrders: MaybeContext<BuildRESTFunction<typeof managementListOrders$1> & typeof managementListOrders$1>;
|
|
273
|
-
declare const postponeEndDate: MaybeContext<BuildRESTFunction<typeof postponeEndDate$1> & typeof postponeEndDate$1>;
|
|
274
|
-
declare const cancelOrder: MaybeContext<BuildRESTFunction<typeof cancelOrder$1> & typeof cancelOrder$1>;
|
|
275
|
-
declare const markAsPaid: MaybeContext<BuildRESTFunction<typeof markAsPaid$1> & typeof markAsPaid$1>;
|
|
276
|
-
declare const pauseOrder: MaybeContext<BuildRESTFunction<typeof pauseOrder$1> & typeof pauseOrder$1>;
|
|
277
|
-
declare const resumeOrder: MaybeContext<BuildRESTFunction<typeof resumeOrder$1> & typeof resumeOrder$1>;
|
|
278
|
-
/**
|
|
279
|
-
* Triggered when an order is canceled.
|
|
280
|
-
*
|
|
281
|
-
* This webhook is triggered either immediately or at the end of the current payment cycle, as follows:
|
|
282
|
-
* + If the order is canceled and `effectiveAt` is set to `IMMEDIATELY`, the webhook is triggered immediately when canceled.
|
|
283
|
-
* + If the order is canceled and `effectiveAt` is set to `NEXT_PAYMENT_DATE`, the webhook is triggered at the end of the current payment cycle. In this case, the Order Auto Renew Canceled Webhook is triggered immediately.
|
|
284
|
-
*/
|
|
285
|
-
declare const onOrderCanceled: BuildEventDefinition<typeof onOrderCanceled$1> & typeof onOrderCanceled$1;
|
|
286
|
-
/**
|
|
287
|
-
* Triggered when an order is created.
|
|
288
|
-
*/
|
|
289
|
-
declare const onOrderCreated: BuildEventDefinition<typeof onOrderCreated$1> & typeof onOrderCreated$1;
|
|
290
|
-
/**
|
|
291
|
-
* Triggered when an order's `startDate` is changed.
|
|
292
|
-
*/
|
|
293
|
-
declare const onOrderStartDateChanged: BuildEventDefinition<typeof onOrderStartDateChanged$1> & typeof onOrderStartDateChanged$1;
|
|
294
|
-
/**
|
|
295
|
-
* Triggered for any of the following update events:
|
|
296
|
-
*
|
|
297
|
-
* + Order is paid for. Order Purchased is also triggered.
|
|
298
|
-
* + Order reaches its start date or end date. Order Started and Order Ended, respectively, are also triggered.
|
|
299
|
-
* + New payment cycle of an order starts. Order Cycle Started is also triggered.
|
|
300
|
-
* + Offline order is marked as paid. Order Marked As Paid is also triggered.
|
|
301
|
-
* + End date of the order is postponed. Order End Date Postponed is also triggered
|
|
302
|
-
* + Order is paused, or a paused order is resumed. Order Paused and Order Resumed, respectively, are also triggered.
|
|
303
|
-
* + Order is canceled, either immediately or at the end of the payment cycle. Order Canceled and Order Auto Renew Canceled, respectively, are also triggered.
|
|
304
|
-
*/
|
|
305
|
-
declare const onOrderUpdated: BuildEventDefinition<typeof onOrderUpdated$1> & typeof onOrderUpdated$1;
|
|
306
278
|
/**
|
|
307
279
|
* Triggered when an order is canceled and `effectiveAt` is set to `NEXT_PAYMENT_DATE`.
|
|
308
280
|
*
|
|
@@ -311,6 +283,14 @@ declare const onOrderUpdated: BuildEventDefinition<typeof onOrderUpdated$1> & ty
|
|
|
311
283
|
* + When an order expires at the end of the current payment cycle because it was canceled and `effectiveAt` was set to `NEXT_PAYMENT_DATE`. Instead, at the time of expiration, Order Canceled and Order Ended are triggered.
|
|
312
284
|
*/
|
|
313
285
|
declare const onOrderAutoRenewCanceled: BuildEventDefinition<typeof onOrderAutoRenewCanceled$1> & typeof onOrderAutoRenewCanceled$1;
|
|
286
|
+
/**
|
|
287
|
+
* Triggered when an order is canceled.
|
|
288
|
+
*
|
|
289
|
+
* This webhook is triggered either immediately or at the end of the current payment cycle, as follows:
|
|
290
|
+
* + If the order is canceled and `effectiveAt` is set to `IMMEDIATELY`, the webhook is triggered immediately when canceled.
|
|
291
|
+
* + If the order is canceled and `effectiveAt` is set to `NEXT_PAYMENT_DATE`, the webhook is triggered at the end of the current payment cycle. In this case, the Order Auto Renew Canceled Webhook is triggered immediately.
|
|
292
|
+
*/
|
|
293
|
+
declare const onOrderCanceled: BuildEventDefinition<typeof onOrderCanceled$1> & typeof onOrderCanceled$1;
|
|
314
294
|
/**
|
|
315
295
|
* Triggered at the start of a new payment cycle for an existing order.
|
|
316
296
|
*
|
|
@@ -353,5 +333,25 @@ declare const onOrderResumed: BuildEventDefinition<typeof onOrderResumed$1> & ty
|
|
|
353
333
|
* Triggered when an order reaches its `startDate`. Applies to both purchased and free orders.
|
|
354
334
|
*/
|
|
355
335
|
declare const onOrderStarted: BuildEventDefinition<typeof onOrderStarted$1> & typeof onOrderStarted$1;
|
|
336
|
+
/**
|
|
337
|
+
* Triggered for any of the following update events:
|
|
338
|
+
*
|
|
339
|
+
* + Order is paid for. Order Purchased is also triggered.
|
|
340
|
+
* + Order reaches its start date or end date. Order Started and Order Ended, respectively, are also triggered.
|
|
341
|
+
* + New payment cycle of an order starts. Order Cycle Started is also triggered.
|
|
342
|
+
* + Offline order is marked as paid. Order Marked As Paid is also triggered.
|
|
343
|
+
* + End date of the order is postponed. Order End Date Postponed is also triggered
|
|
344
|
+
* + Order is paused, or a paused order is resumed. Order Paused and Order Resumed, respectively, are also triggered.
|
|
345
|
+
* + Order is canceled, either immediately or at the end of the payment cycle. Order Canceled and Order Auto Renew Canceled, respectively, are also triggered.
|
|
346
|
+
*/
|
|
347
|
+
declare const onOrderUpdated: BuildEventDefinition<typeof onOrderUpdated$1> & typeof onOrderUpdated$1;
|
|
348
|
+
/**
|
|
349
|
+
* Triggered when an order is created.
|
|
350
|
+
*/
|
|
351
|
+
declare const onOrderCreated: BuildEventDefinition<typeof onOrderCreated$1> & typeof onOrderCreated$1;
|
|
352
|
+
/**
|
|
353
|
+
* Triggered when an order's `startDate` is changed.
|
|
354
|
+
*/
|
|
355
|
+
declare const onOrderStartDateChanged: BuildEventDefinition<typeof onOrderStartDateChanged$1> & typeof onOrderStartDateChanged$1;
|
|
356
356
|
|
|
357
|
-
export { CancellationEffectiveAtWithLiterals, CreateOfflineOrderApplicationErrors, CreateOfflineOrderOptions, CreateOfflineOrderResponse, CreateOfflineOrderValidationErrors, CreateOnlineOrderApplicationErrors, CreateOnlineOrderOptions, CreateOnlineOrderResponse, CreateOnlineOrderValidationErrors, GetOfflineOrderPreviewApplicationErrors, GetOfflineOrderPreviewOptions, GetOfflineOrderPreviewResponse, GetOfflineOrderPreviewValidationErrors, GetOnlineOrderPreviewApplicationErrors, GetOnlineOrderPreviewOptions, GetOnlineOrderPreviewResponse, GetOnlineOrderPreviewValidationErrors, GetPricePreviewApplicationErrors, GetPricePreviewOptions, GetPricePreviewResponse, ListOrdersResponse, ManagementGetOrderOptions, ManagementListOrdersOptions, MemberGetOrderOptions,
|
|
357
|
+
export { CancellationEffectiveAtWithLiterals, CreateOfflineOrderApplicationErrors, CreateOfflineOrderOptions, CreateOfflineOrderResponse, CreateOfflineOrderValidationErrors, CreateOnlineOrderApplicationErrors, CreateOnlineOrderOptions, CreateOnlineOrderResponse, CreateOnlineOrderValidationErrors, GetOfflineOrderPreviewApplicationErrors, GetOfflineOrderPreviewOptions, GetOfflineOrderPreviewResponse, GetOfflineOrderPreviewValidationErrors, GetOnlineOrderPreviewApplicationErrors, GetOnlineOrderPreviewOptions, GetOnlineOrderPreviewResponse, GetOnlineOrderPreviewValidationErrors, GetOrderResponse, GetPricePreviewApplicationErrors, GetPricePreviewOptions, GetPricePreviewResponse, ListOrdersResponse, ManagementGetOrderOptions, ManagementListOrdersOptions, MemberGetOrderOptions, MemberListOrdersOptions, MemberListOrdersResponse, Order, OrderAutoRenewCanceledEnvelope, OrderCanceledEnvelope, OrderCreatedEnvelope, OrderCycleStartedEnvelope, OrderEndDatePostponedEnvelope, OrderEndedEnvelope, OrderMarkedAsPaidEnvelope, OrderPausedEnvelope, OrderPurchasedEnvelope, OrderResumedEnvelope, OrderStartDateChangedEnvelope, OrderStartedEnvelope, OrderUpdatedEnvelope, cancelOrder, createOfflineOrder, createOnlineOrder, getOfflineOrderPreview, getOnlineOrderPreview, getPricePreview, managementGetOrder, managementListOrders, markAsPaid, memberGetOrder, memberListOrders, onOrderAutoRenewCanceled, onOrderCanceled, onOrderCreated, onOrderCycleStarted, onOrderEndDatePostponed, onOrderEnded, onOrderMarkedAsPaid, onOrderPaused, onOrderPurchased, onOrderResumed, onOrderStartDateChanged, onOrderStarted, onOrderUpdated, pauseOrder, postponeEndDate, requestCancellation, resumeOrder };
|