@wix/pricing-plans 1.0.11 → 1.0.12

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.
@@ -18,7 +18,7 @@ export interface Order {
18
18
  */
19
19
  _id?: string;
20
20
  /**
21
- * ID of the plan purchased with the order. See [Plans for more information about pricing plans](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/plans/introduction).
21
+ * ID of the plan purchased with the order. See [Plans for more information about pricing plans](pricing-plans/plans)
22
22
  * @readonly
23
23
  */
24
24
  planId?: string;
@@ -51,9 +51,9 @@ export interface Order {
51
51
  */
52
52
  priceDetails?: PriceDetails;
53
53
  /**
54
- * Order pricing model, price, and payment schedule.
54
+ * Pricing model, price, and payment schedule for the order.
55
55
  *
56
- * [Learn more about pricing models](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/introduction#wix-pricing-plans_pricing-plans_introduction_pricing-models).
56
+ * [Learn more about pricing models](pricing-plans/plans)
57
57
  * @readonly
58
58
  */
59
59
  pricing?: PricingDetails;
@@ -69,9 +69,9 @@ export interface Order {
69
69
  * + `DRAFT`: Order has been initiated but payment hasn't been processed yet. The plan isn't yet available for use to the buyer.
70
70
  * + `PENDING`: Order has been purchased and its start date is set in the future.
71
71
  * + `ACTIVE`: Order has been processed. The plan is available for use.
72
- * + `PAUSED`: Order, and use of the plan, is [paused](https://www.wix.com/velo/reference/wix-pricing-plans-v2/orders/pauseorder). The order, and use of the plan, can be [resumed](https://www.wix.com/velo/reference/wix-pricing-plans-v2/orders/resumeorder).
72
+ * + `PAUSED`: Order, and use of the plan, is [paused](#pauseorder). The order, and use of the plan, can be [resumed](#resumeorder).
73
73
  * + `ENDED`: Order has completed its duration and is no longer available for use.
74
- * + `CANCELED`: Order has been [canceled](https://www.wix.com/velo/reference/wix-pricing-plans-v2/orders/cancelorder).
74
+ * + `CANCELED`: Order has been [canceled](#cancelorder).
75
75
  * @readonly
76
76
  */
77
77
  status?: OrderStatus;
@@ -111,8 +111,8 @@ export interface Order {
111
111
  /**
112
112
  * Current end date and time for the ordered plan.
113
113
  *
114
- * `endDate` may be updated over the course of an order. If the order is [paused](https://www.wix.com/velo/reference/wix-pricing-plans-v2/orders/pauseorder),
115
- * it will have a later `endDate` once it [resumes](https://www.wix.com/velo/reference/wix-pricing-plans-v2/orders/resumeorder). `endDate` may also be [postponed](https://www.wix.com/velo/reference/wix-pricing-plans-v2/orders/postponeenddate).
114
+ * `endDate` may be updated over the course of an order. If the order is [paused](#pauseorder),
115
+ * it will have a later `endDate` once it [resumes](#resumeorder). `endDate` may also be [postponed](#postponeenddate).
116
116
  *
117
117
  * Omitted if the order is valid until canceled and still `ACTIVE`.
118
118
  * @readonly
@@ -172,12 +172,12 @@ export interface Order {
172
172
  }
173
173
  export interface Buyer {
174
174
  /**
175
- * Member ID for a buyer. Learn more about [`wix-members-backend`](https://www.wix.com/velo/reference/wix-members-backend/introduction).
175
+ * Member ID for a buyer.
176
176
  * @readonly
177
177
  */
178
178
  memberId?: string;
179
179
  /**
180
- * Contact ID for a buyer. Learn more about [Contacts in `wix-crm-backend`](https://www.wix.com/velo/reference/wix-crm-backend/contacts/introduction).
180
+ * Contact ID for a buyer.
181
181
  * @readonly
182
182
  */
183
183
  contactId?: string;
@@ -435,8 +435,8 @@ export declare enum PaymentStatus {
435
435
  export interface PausePeriod {
436
436
  /**
437
437
  * Status of the pause period. Supported values:
438
- * + `ACTIVE`: Status while the order is [paused](https://www.wix.com/velo/reference/wix-pricing-plans-v2/orders/pauseorder).
439
- * + `ENDED`: Status when the order is [resumed](https://www.wix.com/velo/reference/wix-pricing-plans-v2/orders/resumeorder).
438
+ * + `ACTIVE`: Status while the order is [paused](#pauseorder).
439
+ * + `ENDED`: Status when the order is [resumed](#resumeorder).
440
440
  */
441
441
  status?: Status;
442
442
  /** Start date and time of the pause period. */
@@ -716,7 +716,7 @@ export interface CreateGuestOnlineOrderResponse {
716
716
  order?: Order;
717
717
  }
718
718
  export interface CreateOfflineOrderRequest {
719
- /** ID of the plan being ordered. See [Plans for more information about plan IDs](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/plans). */
719
+ /** ID of the plan being ordered. See [Plans for more information about plan IDs](pricing-plans/plans). */
720
720
  planId: string;
721
721
  /** ID of the member ordering the plan. */
722
722
  memberId: string;
@@ -1001,7 +1001,13 @@ export interface OrderEndDatePostponed {
1001
1001
  export interface CancelOrderRequest {
1002
1002
  /** Order ID. */
1003
1003
  _id: string;
1004
- /** __Required.__ When the order will be canceled. One-time orders can only be canceled `IMMEDIATELY`. */
1004
+ /**
1005
+ * When the order is canceled.
1006
+ *
1007
+ * One time orders can only be canceled immediately. Supported values:
1008
+ * - `"IMMEDIATELY"`: The order is canceled immediately.
1009
+ * - `"NEXT_PAYMENT_DATE"`: The order is canceled at the next payment date.
1010
+ */
1005
1011
  effectiveAt: CancellationEffectiveAt;
1006
1012
  }
1007
1013
  export interface CancelOrderResponse {
@@ -1089,10 +1095,9 @@ export interface BulkResumeOrderResponse {
1089
1095
  /**
1090
1096
  * Gets an order by ID for the currently logged-in member.
1091
1097
  *
1092
- * The `getCurrentMemberOrder()` function returns a Promise that resolves to information about a specified order for the currently logged-in member.
1098
+ * The `memberGetOrder()` function returns a Promise that resolves to information about a specified order for the currently logged-in member.
1093
1099
  * @param _id - Order ID.
1094
1100
  * @public
1095
- * @documentationMaturity preview
1096
1101
  * @requiredField _id
1097
1102
  * @param options - Options for getting a logged-in member's order.
1098
1103
  */
@@ -1105,7 +1110,6 @@ export interface MemberGetOrderOptions {
1105
1110
  *
1106
1111
  * The `memberListOrders()` function returns a Promise that resolves to a list of up to 100 pricing plan orders.
1107
1112
  * @public
1108
- * @documentationMaturity preview
1109
1113
  * @param options - Filtering, sorting, and pagination options.
1110
1114
  */
1111
1115
  export declare function memberListOrders(options?: MemberListOrdersOptions): Promise<MemberListOrdersResponse>;
@@ -1119,9 +1123,9 @@ export interface MemberListOrdersOptions {
1119
1123
  * + `DRAFT`: Order has been initiated but payment hasn't been processed yet. The plan isn't yet available for use to the buyer.
1120
1124
  * + `PENDING`: Order has been purchased and its start date is set in the future.
1121
1125
  * + `ACTIVE`: Order has been processed. The plan is available for use.
1122
- * + `PAUSED`: Order, and use of the plan, is [paused](https://www.wix.com/velo/reference/wix-pricing-plans-v2/orders/pauseorder). The order, and use of the plan, can be [resumed](https://www.wix.com/velo/reference/wix-pricing-plans-v2/orders/resumeorder).
1126
+ * + `PAUSED`: Order, and use of the plan, is [paused](#pauseorder). The order, and use of the plan, can be [resumed](#resumeorder).
1123
1127
  * + `ENDED`: Order has completed its duration and is no longer available for use.
1124
- * + `CANCELED`: Order has been [canceled](https://www.wix.com/velo/reference/wix-pricing-plans-v2/orders/cancelorder).
1128
+ * + `CANCELED`: Order has been [canceled](#cancelorder).
1125
1129
  */
1126
1130
  orderStatuses?: OrderStatus[];
1127
1131
  /**
@@ -1177,9 +1181,8 @@ export interface MemberListOrdersOptions {
1177
1181
  *
1178
1182
  * For orders with recurring payments, a cancellation can be set to occur either immediately or at the next payment date. For orders with one-time payments, a cancellation occurs immediately after the request is processed.
1179
1183
  *
1180
- * Requesting an order cancellation starts the cancellation process. The event is triggered immediately and the function's promise is fulfilled. However, there may be some operations that continue to be processed before the status of the order is changed to `"CANCELED"`. For example, payments might need to be refunded before the order is fully canceled.
1184
+ * Requesting an order cancellation starts the cancellation process. There may be some operations that continue to be processed before the status of the order is changed to `"CANCELED"`. For example, payments might need to be refunded before the order is fully canceled.
1181
1185
  *
1182
- * The [`onOrderUpdated()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/events/onorderupdated) event handler runs when a cancellation is requested. The [`onOrderCanceled()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/events/onordercanceled) event handler runs when the cancellation is completed.
1183
1186
  * @param _id - Order ID.
1184
1187
  * @param effectiveAt - Whether to cancel the order immediately or at the next payment date.
1185
1188
  * One-time payment orders can only be canceled immediately.
@@ -1188,7 +1191,6 @@ export interface MemberListOrdersOptions {
1188
1191
  * - `"IMMEDIATELY"`: Indicates that the order should be canceled immediately.
1189
1192
  * - `"NEXT_PAYMENT_DATE"`: Indicates that the order be canceled at the next payment date.
1190
1193
  * @public
1191
- * @documentationMaturity preview
1192
1194
  * @requiredField _id
1193
1195
  * @requiredField effectiveAt
1194
1196
  * @param options - Options for requesting a cancellation.
@@ -1202,7 +1204,7 @@ export declare function requestCancellation(_id: string, effectiveAt: Cancellati
1202
1204
  *
1203
1205
  * Payment of an offline order is handled in 1 of 2 ways.
1204
1206
  * - When creating the order, select `true` in the `paid` request parameter.
1205
- * - After creation, with the [`markAsPaid()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/orders/markaspaid) function.
1207
+ * - After creation, with the [`markAsPaid()`](#markaspaid) function.
1206
1208
  *
1207
1209
  * When creating a non-free offline order:
1208
1210
  * - The order's status is set to `"PENDING"` if the start date is in the future. Otherwise, the status is set to `"ACTIVE"`.
@@ -1211,22 +1213,21 @@ export declare function requestCancellation(_id: string, effectiveAt: Cancellati
1211
1213
  * When creating a free offline order:
1212
1214
  * - The order's status is set to `"PENDING"` if the start date is in the future. Otherwise, the status is set to `"ACTIVE"`.
1213
1215
  * - The order's last payment status is set to `"NOT_APPLICABLE"`.
1214
- *
1215
- * The [`onOrderCreated()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/events/onordercreated) event handler runs when an offline order is created.
1216
- *
1217
- * >**Note:** This function is restricted and only runs if you elevate permissions using the [`wix-auth.elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function. If `wix-auth.elevate()` is not used, only those with the "Manage Pricing Plans" and "Manage Subscriptions" permissions can create offline orders.
1218
- * @param planId - ID of the plan being ordered. See [Plans for more information about plan IDs](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/plans).
1219
1216
  * @public
1220
- * @documentationMaturity preview
1221
1217
  * @requiredField options
1222
1218
  * @requiredField options.memberId
1223
1219
  * @requiredField planId
1224
1220
  * @param options - Options for creating an offline order.
1221
+ * @param planId - ID of the plan being ordered. See [Plans for more information about plan IDs](pricing-plans/plans)
1225
1222
  * @returns Fulfilled - The order of the plan.
1226
1223
  */
1227
1224
  export declare function createOfflineOrder(planId: string, options: CreateOfflineOrderOptions): Promise<CreateOfflineOrderResponse>;
1228
1225
  export interface CreateOfflineOrderOptions {
1229
- /** ID of the member ordering the plan. */
1226
+ /**
1227
+ * ID of the member ordering the plan.
1228
+ * This field is required when creating an offline order.
1229
+ *
1230
+ */
1230
1231
  memberId: string;
1231
1232
  /**
1232
1233
  * Start date and time for the ordered plan.
@@ -1254,21 +1255,21 @@ export interface CreateOfflineOrderOptions {
1254
1255
  *
1255
1256
  * If [taxes are configured](https://support.wix.com/en/article/pricing-plans-setting-up-tax-collection) for the site, taxes are applied to the preview. If not, `tax` previews as `null`.
1256
1257
  *
1257
- * You can preview the order to check purchase limitations, but the limitations are not enforced for the preview. If a pricing plan has a limit on the amount of purchases per buyer, that limit is not considered for generating the preview. But, if that limit has been reached and this order would then exceed the amount of purchases permitted for this buyer, then `purchaseLimitExceeded` will return as `true`. Thus function is not available to the buyer. You specify the member ID for the buyer whose order should be previewed. To get a general price preview for a plan that's not buyer-specific, use the [`getPricePreview()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/orders/getpricepreview) function.
1258
- *
1259
- * >**Note:** This function is restricted and only runs if you elevate permissions using the [`wix-auth.elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function. If `wix-auth.elevate()` is not used, only those with the "Manage Pricing Plans" and "Manage Subscriptions" permissions can get offline order previews.
1260
- * @param planId - ID of the plan of the previewed order. See [Plans for more information about plan IDs](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/plans).
1258
+ * You can preview the order to check purchase limitations, but the limitations are not enforced for the preview. If a pricing plan has a limit on the amount of purchases per buyer, that limit is not considered for generating the preview. But, if that limit has been reached and this order would then exceed the amount of purchases permitted for this buyer, then `purchaseLimitExceeded` will return as `true`. Thus function is not available to the buyer. You specify the member ID for the buyer whose order should be previewed. To get a general price preview for a plan that's not buyer-specific, use the [`getPricePreview()`](#getpricepreview) function.
1261
1259
  * @public
1262
- * @documentationMaturity preview
1263
1260
  * @requiredField options
1264
1261
  * @requiredField options.memberId
1265
1262
  * @requiredField planId
1266
1263
  * @param options - Options for previewing the offline order.
1264
+ * @param planId - ID of the plan of the previewed order. See [Plans for more information about plan IDs](pricing-plans/plans)
1267
1265
  * @returns Fulfilled - A preview of the order.
1268
1266
  */
1269
1267
  export declare function getOfflineOrderPreview(planId: string, options: GetOfflineOrderPreviewOptions): Promise<GetOfflineOrderPreviewResponse>;
1270
1268
  export interface GetOfflineOrderPreviewOptions {
1271
- /** Member ID for the buyer who might order the plan offline. */
1269
+ /**
1270
+ * Member ID for the buyer who might order the plan offline.
1271
+ * This field is required to get an offline order preview.
1272
+ */
1272
1273
  memberId: string;
1273
1274
  /**
1274
1275
  * Start date and time for plan of the previewed order.
@@ -1284,12 +1285,11 @@ export interface GetOfflineOrderPreviewOptions {
1284
1285
  *
1285
1286
  * The `getPricePreview()` function returns a Promise that resolves to a temporary preview of the order's price.
1286
1287
  *
1287
- * The price preview uses the same logic for calculating prices as used when purchasing a plan, but the preview is not saved. If [taxes are configured](https://support.wix.com/en/article/pricing-plans-setting-up-tax-collection for the site, taxes are applied to the preview. If not, the `tax` previews as `null`.
1288
+ * The price preview uses the same logic for calculating prices as used when purchasing a plan, but the preview is not saved. If [taxes are configured](https://support.wix.com/en/article/pricing-plans-setting-up-tax-collection) for the site, taxes are applied to the preview. If not, the `tax` previews as `null`.
1288
1289
  *
1289
- * Buyers do not have to be logged in to preview the price, as such, the details returned by this function are not buyer-specific. To generate a preview of a purchase for a specific-buyer, use the [`getOfflineOrderPreview()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/orders/getofflineorderpreview).
1290
+ * Buyers do not have to be logged in to preview the price, as such, the details returned by this function are not buyer-specific. To generate a preview of a purchase for a specific-buyer, use the [`getOfflineOrderPreview()`](#getofflineorderpreview).
1290
1291
  * @param planId - ID of plan to preview.
1291
1292
  * @public
1292
- * @documentationMaturity preview
1293
1293
  * @requiredField planId
1294
1294
  * @param options - Options for getting a price preview.
1295
1295
  * @returns Fulfilled - A preview of the pricing for the order.
@@ -1303,11 +1303,8 @@ export interface GetPricePreviewOptions {
1303
1303
  * Retrieves an order by ID.
1304
1304
  *
1305
1305
  * The `managementGetOrder()` function returns a Promise that resolves to information about the specified order.
1306
- *
1307
- * >**Note:** Only users with the "Manage Pricing Plans" and "Manage Subscriptions" permissions can get orders.
1308
1306
  * @param _id - Order ID.
1309
1307
  * @public
1310
- * @documentationMaturity preview
1311
1308
  * @requiredField _id
1312
1309
  * @param options - Options to use when getting an order.
1313
1310
  * @returns Order.
@@ -1321,11 +1318,8 @@ export interface ManagementGetOrderOptions {
1321
1318
  *
1322
1319
  * The `managementListOrders()` function returns a Promise that resolves to a list of up to 50 pricing plan orders. You can specify options for filtering, sorting, and paginating the results.
1323
1320
  *
1324
- * This function returns the orders on the site. To list orders for the currently logged-in member, use [`listMemberOrders()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/orders/memberlistorders).
1325
- *
1326
- * >**Note:** This function is restricted and only runs if you elevate permissions using the [`wix-auth.elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function. If `wix-auth.elevate()` is not used, only those with the “Manage Pricing Plans” and “Manage Subscriptions” permissions can list orders.
1321
+ * This function returns the orders on the site. To list orders for the currently logged-in member, use [`memberListOrders()`](#memberlistorders).
1327
1322
  * @public
1328
- * @documentationMaturity preview
1329
1323
  * @param options - Filtering, sorting, and pagination options.
1330
1324
  */
1331
1325
  export declare function managementListOrders(options?: ManagementListOrdersOptions): Promise<ListOrdersResponse>;
@@ -1341,9 +1335,9 @@ export interface ManagementListOrdersOptions {
1341
1335
  * + `DRAFT`: Order has been initiated but payment hasn't been processed yet. The plan isn't yet available for use to the buyer.
1342
1336
  * + `PENDING`: Order has been purchased and its start date is set in the future.
1343
1337
  * + `ACTIVE`: Order has been processed. The plan is available for use.
1344
- * + `PAUSED`: Order, and use of the plan, is [paused](https://www.wix.com/velo/reference/wix-pricing-plans-v2/orders/pauseorder). The order, and use of the plan, can be [resumed](https://www.wix.com/velo/reference/wix-pricing-plans-v2/orders/resumeorder).
1338
+ * + `PAUSED`: Order, and use of the plan, is [paused](#pauseorder). The order, and use of the plan, can be [resumed](#resumeorder).
1345
1339
  * + `ENDED`: Order has completed its duration and is no longer available for use.
1346
- * + `CANCELED`: Order has been [canceled](https://www.wix.com/velo/reference/wix-pricing-plans-v2/orders/cancelorder).
1340
+ * + `CANCELED`: Order has been [canceled](#cancelorder).
1347
1341
  */
1348
1342
  orderStatuses?: OrderStatus[];
1349
1343
  /**
@@ -1386,16 +1380,11 @@ export interface ManagementListOrdersOptions {
1386
1380
  *
1387
1381
  * Postponing an order causes the following changes:
1388
1382
  * - The `endDate` for the order is adjusted to the new end date.
1389
- * The `onOrderEndDatePostponed()` and `onOrderUpdated()` event handlers run when an order's end date is postponed or made earlier.
1390
- *
1391
- * >**Note:** This function is restricted and only runs if you elevate permissions using the [`wix-auth.elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function. If `wix-auth.elevate()` is not used, only those with the “Manage Pricing Plans” and “Manage Subscriptions” permissions can postpone the end date of an order.
1392
- *
1393
1383
  * @param _id - Order ID.
1394
1384
  * @param endDate - New end date and time.
1395
1385
  *
1396
1386
  * Must be later than the current end date and time.
1397
1387
  * @public
1398
- * @documentationMaturity preview
1399
1388
  * @requiredField _id
1400
1389
  * @requiredField endDate
1401
1390
  * @param options - Options for postponing the end date of an order.
@@ -1413,7 +1402,6 @@ export declare function postponeEndDate(_id: string, endDate: Date): Promise<voi
1413
1402
  * For orders with one-time payments, a cancellation occurs `IMMEDIATELY`.
1414
1403
  *
1415
1404
  * Canceling an order changes the order status to `"CANCELED"`.
1416
- * The [`onOrderCanceled()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/events/onordercanceled) event handler runs when an order is canceled.
1417
1405
  *
1418
1406
  * #### Canceling during the free trial period.
1419
1407
  *
@@ -1424,16 +1412,13 @@ export declare function postponeEndDate(_id: string, endDate: Date): Promise<voi
1424
1412
  * Canceling `IMMEDIATELY` will end the subscription for the buyer
1425
1413
  * immediately, even during the free trial period and the buyer won't be billed.
1426
1414
  * Canceling at the `NEXT_PAYMENT_DATE` allows the buyer to continue using the benefits of the subscription until the end of the free trial period. Then, the subscription ends and the buyer is not billed.
1427
- *
1428
- * >**Note:** This function is restricted and only runs if you elevate permissions using the [`wix-auth.elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function. If `wix-auth.elevate()` is not used, only users with the "Manage Pricing Plans" and "Manage Subscription" permissions can cancel orders.
1429
- *
1430
- *
1431
- *
1432
- *
1433
1415
  * @param _id - Order ID.
1434
- * @param effectiveAt - __Required.__ When the order will be canceled. One-time orders can only be canceled `IMMEDIATELY`.
1416
+ * @param effectiveAt - When the order is canceled.
1417
+ *
1418
+ * One time orders can only be canceled immediately. Supported values:
1419
+ * - `"IMMEDIATELY"`: The order is canceled immediately.
1420
+ * - `"NEXT_PAYMENT_DATE"`: The order is canceled at the next payment date.
1435
1421
  * @public
1436
- * @documentationMaturity preview
1437
1422
  * @requiredField _id
1438
1423
  * @requiredField effectiveAt
1439
1424
  * @param options - Options for canceling orders.
@@ -1456,13 +1441,8 @@ export declare function cancelOrder(_id: string, effectiveAt: CancellationEffect
1456
1441
  * An error occurs if you attempt to:
1457
1442
  * - Mark an already-paid, offline order as paid. You cannot make an offline order as paid twice.
1458
1443
  * - Mark an online order as paid. The `markAsPaid()` function is supported for offline orders only.
1459
- *
1460
- * The [`onOrderMarkedAsPaid()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/events/onordermarkedaspaid) and [`onOrderUpdated()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/events/onorderupdated) event handlers run when an offline order is marked as paid.
1461
- *
1462
- * >**Note:** This function is restricted and only runs if you elevate permissions using the [`wix-auth.elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function. If `wix-auth.elevate()` is not used, only those with the “Manage Pricing Plans” and “Manage Subscriptions” permissions can mark offline orders as paid.
1463
1444
  * @param _id - Order ID.
1464
1445
  * @public
1465
- * @documentationMaturity preview
1466
1446
  * @requiredField _id
1467
1447
  * @returns Fulfilled - When the order is marked as paid.
1468
1448
  */
@@ -1480,14 +1460,9 @@ export declare function markAsPaid(_id: string): Promise<void>;
1480
1460
  *
1481
1461
  * The `endDate` and the `earliestEndDate` for the order are adjusted to include the pause period when the order is resumed.
1482
1462
  *
1483
- * The [`onOrderPaused()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/events/onorderpaused) and [`onOrderUpdated()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/events/onorderupdated) event handlers run when an order is paused.
1484
- *
1485
- * Paused orders can be continued with the [`resumeOrder()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/orders/resumeorder) function.
1486
- *
1487
- * >**Note:** This function is restricted and only runs if you elevate permissions using the [`wix-auth.elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function. If `wix-auth.elevate()` is not used, only those with the “Manage Pricing Plans” and “Manage Subscriptions” permissions can pause orders.
1463
+ * Paused orders can be continued with the [`resumeOrder()`](#resumeorder) function.
1488
1464
  * @param _id - Order ID.
1489
1465
  * @public
1490
- * @documentationMaturity preview
1491
1466
  * @requiredField _id
1492
1467
  * @returns Fulfilled - When the order is paused.
1493
1468
  */
@@ -1503,14 +1478,9 @@ export declare function pauseOrder(_id: string): Promise<void>;
1503
1478
  * - The order status changes to `"ACTIVE"`.
1504
1479
  * - The `pausePeriods` array is updated.
1505
1480
  * - The `endDate` for the order is adjusted to include the pause period.
1506
- * - The `earliestEndDate` is adjusted to include the pause period. (This property is reserved for future use.)
1507
- *
1508
- * The [`onOrderResumed()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/events/onorderresumed) and [`onOrderUpdated()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/events/onorderupdated) event handlers run when an order is resumed.
1509
- *
1510
- * >**Note:** This function is restricted and only runs if you elevate permissions using the [`wix-auth.elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function. If `wix-auth.elevate()` is not used, only those with the “Manage Pricing Plans” and “Manage Subscriptions” permissions can resume orders.
1481
+ * - The `earliestEndDate` is adjusted to include the pause period. (This property is reserved for future use).
1511
1482
  * @param _id - Order ID.
1512
1483
  * @public
1513
- * @documentationMaturity preview
1514
1484
  * @requiredField _id
1515
1485
  * @returns Fulfilled - When the order is resumed.
1516
1486
  */
@@ -182,10 +182,9 @@ const _resumeOrderResponse = {};
182
182
  /**
183
183
  * Gets an order by ID for the currently logged-in member.
184
184
  *
185
- * The `getCurrentMemberOrder()` function returns a Promise that resolves to information about a specified order for the currently logged-in member.
185
+ * The `memberGetOrder()` function returns a Promise that resolves to information about a specified order for the currently logged-in member.
186
186
  * @param _id - Order ID.
187
187
  * @public
188
- * @documentationMaturity preview
189
188
  * @requiredField _id
190
189
  * @param options - Options for getting a logged-in member's order.
191
190
  */
@@ -238,7 +237,6 @@ export function memberGetOrder(_id, options) {
238
237
  *
239
238
  * The `memberListOrders()` function returns a Promise that resolves to a list of up to 100 pricing plan orders.
240
239
  * @public
241
- * @documentationMaturity preview
242
240
  * @param options - Filtering, sorting, and pagination options.
243
241
  */
244
242
  export function memberListOrders(options) {
@@ -300,9 +298,8 @@ export function memberListOrders(options) {
300
298
  *
301
299
  * For orders with recurring payments, a cancellation can be set to occur either immediately or at the next payment date. For orders with one-time payments, a cancellation occurs immediately after the request is processed.
302
300
  *
303
- * Requesting an order cancellation starts the cancellation process. The event is triggered immediately and the function's promise is fulfilled. However, there may be some operations that continue to be processed before the status of the order is changed to `"CANCELED"`. For example, payments might need to be refunded before the order is fully canceled.
301
+ * Requesting an order cancellation starts the cancellation process. There may be some operations that continue to be processed before the status of the order is changed to `"CANCELED"`. For example, payments might need to be refunded before the order is fully canceled.
304
302
  *
305
- * The [`onOrderUpdated()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/events/onorderupdated) event handler runs when a cancellation is requested. The [`onOrderCanceled()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/events/onordercanceled) event handler runs when the cancellation is completed.
306
303
  * @param _id - Order ID.
307
304
  * @param effectiveAt - Whether to cancel the order immediately or at the next payment date.
308
305
  * One-time payment orders can only be canceled immediately.
@@ -311,7 +308,6 @@ export function memberListOrders(options) {
311
308
  * - `"IMMEDIATELY"`: Indicates that the order should be canceled immediately.
312
309
  * - `"NEXT_PAYMENT_DATE"`: Indicates that the order be canceled at the next payment date.
313
310
  * @public
314
- * @documentationMaturity preview
315
311
  * @requiredField _id
316
312
  * @requiredField effectiveAt
317
313
  * @param options - Options for requesting a cancellation.
@@ -368,7 +364,7 @@ export function requestCancellation(_id, effectiveAt) {
368
364
  *
369
365
  * Payment of an offline order is handled in 1 of 2 ways.
370
366
  * - When creating the order, select `true` in the `paid` request parameter.
371
- * - After creation, with the [`markAsPaid()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/orders/markaspaid) function.
367
+ * - After creation, with the [`markAsPaid()`](#markaspaid) function.
372
368
  *
373
369
  * When creating a non-free offline order:
374
370
  * - The order's status is set to `"PENDING"` if the start date is in the future. Otherwise, the status is set to `"ACTIVE"`.
@@ -377,17 +373,12 @@ export function requestCancellation(_id, effectiveAt) {
377
373
  * When creating a free offline order:
378
374
  * - The order's status is set to `"PENDING"` if the start date is in the future. Otherwise, the status is set to `"ACTIVE"`.
379
375
  * - The order's last payment status is set to `"NOT_APPLICABLE"`.
380
- *
381
- * The [`onOrderCreated()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/events/onordercreated) event handler runs when an offline order is created.
382
- *
383
- * >**Note:** This function is restricted and only runs if you elevate permissions using the [`wix-auth.elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function. If `wix-auth.elevate()` is not used, only those with the "Manage Pricing Plans" and "Manage Subscriptions" permissions can create offline orders.
384
- * @param planId - ID of the plan being ordered. See [Plans for more information about plan IDs](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/plans).
385
376
  * @public
386
- * @documentationMaturity preview
387
377
  * @requiredField options
388
378
  * @requiredField options.memberId
389
379
  * @requiredField planId
390
380
  * @param options - Options for creating an offline order.
381
+ * @param planId - ID of the plan being ordered. See [Plans for more information about plan IDs](pricing-plans/plans)
391
382
  * @returns Fulfilled - The order of the plan.
392
383
  */
393
384
  export function createOfflineOrder(planId, options) {
@@ -450,16 +441,13 @@ export function createOfflineOrder(planId, options) {
450
441
  *
451
442
  * If [taxes are configured](https://support.wix.com/en/article/pricing-plans-setting-up-tax-collection) for the site, taxes are applied to the preview. If not, `tax` previews as `null`.
452
443
  *
453
- * You can preview the order to check purchase limitations, but the limitations are not enforced for the preview. If a pricing plan has a limit on the amount of purchases per buyer, that limit is not considered for generating the preview. But, if that limit has been reached and this order would then exceed the amount of purchases permitted for this buyer, then `purchaseLimitExceeded` will return as `true`. Thus function is not available to the buyer. You specify the member ID for the buyer whose order should be previewed. To get a general price preview for a plan that's not buyer-specific, use the [`getPricePreview()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/orders/getpricepreview) function.
454
- *
455
- * >**Note:** This function is restricted and only runs if you elevate permissions using the [`wix-auth.elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function. If `wix-auth.elevate()` is not used, only those with the "Manage Pricing Plans" and "Manage Subscriptions" permissions can get offline order previews.
456
- * @param planId - ID of the plan of the previewed order. See [Plans for more information about plan IDs](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/plans).
444
+ * You can preview the order to check purchase limitations, but the limitations are not enforced for the preview. If a pricing plan has a limit on the amount of purchases per buyer, that limit is not considered for generating the preview. But, if that limit has been reached and this order would then exceed the amount of purchases permitted for this buyer, then `purchaseLimitExceeded` will return as `true`. Thus function is not available to the buyer. You specify the member ID for the buyer whose order should be previewed. To get a general price preview for a plan that's not buyer-specific, use the [`getPricePreview()`](#getpricepreview) function.
457
445
  * @public
458
- * @documentationMaturity preview
459
446
  * @requiredField options
460
447
  * @requiredField options.memberId
461
448
  * @requiredField planId
462
449
  * @param options - Options for previewing the offline order.
450
+ * @param planId - ID of the plan of the previewed order. See [Plans for more information about plan IDs](pricing-plans/plans)
463
451
  * @returns Fulfilled - A preview of the order.
464
452
  */
465
453
  export function getOfflineOrderPreview(planId, options) {
@@ -516,12 +504,11 @@ export function getOfflineOrderPreview(planId, options) {
516
504
  *
517
505
  * The `getPricePreview()` function returns a Promise that resolves to a temporary preview of the order's price.
518
506
  *
519
- * The price preview uses the same logic for calculating prices as used when purchasing a plan, but the preview is not saved. If [taxes are configured](https://support.wix.com/en/article/pricing-plans-setting-up-tax-collection for the site, taxes are applied to the preview. If not, the `tax` previews as `null`.
507
+ * The price preview uses the same logic for calculating prices as used when purchasing a plan, but the preview is not saved. If [taxes are configured](https://support.wix.com/en/article/pricing-plans-setting-up-tax-collection) for the site, taxes are applied to the preview. If not, the `tax` previews as `null`.
520
508
  *
521
- * Buyers do not have to be logged in to preview the price, as such, the details returned by this function are not buyer-specific. To generate a preview of a purchase for a specific-buyer, use the [`getOfflineOrderPreview()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/orders/getofflineorderpreview).
509
+ * Buyers do not have to be logged in to preview the price, as such, the details returned by this function are not buyer-specific. To generate a preview of a purchase for a specific-buyer, use the [`getOfflineOrderPreview()`](#getofflineorderpreview).
522
510
  * @param planId - ID of plan to preview.
523
511
  * @public
524
- * @documentationMaturity preview
525
512
  * @requiredField planId
526
513
  * @param options - Options for getting a price preview.
527
514
  * @returns Fulfilled - A preview of the pricing for the order.
@@ -577,11 +564,8 @@ export function getPricePreview(planId, options) {
577
564
  * Retrieves an order by ID.
578
565
  *
579
566
  * The `managementGetOrder()` function returns a Promise that resolves to information about the specified order.
580
- *
581
- * >**Note:** Only users with the "Manage Pricing Plans" and "Manage Subscriptions" permissions can get orders.
582
567
  * @param _id - Order ID.
583
568
  * @public
584
- * @documentationMaturity preview
585
569
  * @requiredField _id
586
570
  * @param options - Options to use when getting an order.
587
571
  * @returns Order.
@@ -635,11 +619,8 @@ export function managementGetOrder(_id, options) {
635
619
  *
636
620
  * The `managementListOrders()` function returns a Promise that resolves to a list of up to 50 pricing plan orders. You can specify options for filtering, sorting, and paginating the results.
637
621
  *
638
- * This function returns the orders on the site. To list orders for the currently logged-in member, use [`listMemberOrders()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/orders/memberlistorders).
639
- *
640
- * >**Note:** This function is restricted and only runs if you elevate permissions using the [`wix-auth.elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function. If `wix-auth.elevate()` is not used, only those with the “Manage Pricing Plans” and “Manage Subscriptions” permissions can list orders.
622
+ * This function returns the orders on the site. To list orders for the currently logged-in member, use [`memberListOrders()`](#memberlistorders).
641
623
  * @public
642
- * @documentationMaturity preview
643
624
  * @param options - Filtering, sorting, and pagination options.
644
625
  */
645
626
  export function managementListOrders(options) {
@@ -705,16 +686,11 @@ export function managementListOrders(options) {
705
686
  *
706
687
  * Postponing an order causes the following changes:
707
688
  * - The `endDate` for the order is adjusted to the new end date.
708
- * The `onOrderEndDatePostponed()` and `onOrderUpdated()` event handlers run when an order's end date is postponed or made earlier.
709
- *
710
- * >**Note:** This function is restricted and only runs if you elevate permissions using the [`wix-auth.elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function. If `wix-auth.elevate()` is not used, only those with the “Manage Pricing Plans” and “Manage Subscriptions” permissions can postpone the end date of an order.
711
- *
712
689
  * @param _id - Order ID.
713
690
  * @param endDate - New end date and time.
714
691
  *
715
692
  * Must be later than the current end date and time.
716
693
  * @public
717
- * @documentationMaturity preview
718
694
  * @requiredField _id
719
695
  * @requiredField endDate
720
696
  * @param options - Options for postponing the end date of an order.
@@ -775,7 +751,6 @@ export function postponeEndDate(_id, endDate) {
775
751
  * For orders with one-time payments, a cancellation occurs `IMMEDIATELY`.
776
752
  *
777
753
  * Canceling an order changes the order status to `"CANCELED"`.
778
- * The [`onOrderCanceled()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/events/onordercanceled) event handler runs when an order is canceled.
779
754
  *
780
755
  * #### Canceling during the free trial period.
781
756
  *
@@ -786,16 +761,13 @@ export function postponeEndDate(_id, endDate) {
786
761
  * Canceling `IMMEDIATELY` will end the subscription for the buyer
787
762
  * immediately, even during the free trial period and the buyer won't be billed.
788
763
  * Canceling at the `NEXT_PAYMENT_DATE` allows the buyer to continue using the benefits of the subscription until the end of the free trial period. Then, the subscription ends and the buyer is not billed.
789
- *
790
- * >**Note:** This function is restricted and only runs if you elevate permissions using the [`wix-auth.elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function. If `wix-auth.elevate()` is not used, only users with the "Manage Pricing Plans" and "Manage Subscription" permissions can cancel orders.
791
- *
792
- *
793
- *
794
- *
795
764
  * @param _id - Order ID.
796
- * @param effectiveAt - __Required.__ When the order will be canceled. One-time orders can only be canceled `IMMEDIATELY`.
765
+ * @param effectiveAt - When the order is canceled.
766
+ *
767
+ * One time orders can only be canceled immediately. Supported values:
768
+ * - `"IMMEDIATELY"`: The order is canceled immediately.
769
+ * - `"NEXT_PAYMENT_DATE"`: The order is canceled at the next payment date.
797
770
  * @public
798
- * @documentationMaturity preview
799
771
  * @requiredField _id
800
772
  * @requiredField effectiveAt
801
773
  * @param options - Options for canceling orders.
@@ -861,13 +833,8 @@ export function cancelOrder(_id, effectiveAt) {
861
833
  * An error occurs if you attempt to:
862
834
  * - Mark an already-paid, offline order as paid. You cannot make an offline order as paid twice.
863
835
  * - Mark an online order as paid. The `markAsPaid()` function is supported for offline orders only.
864
- *
865
- * The [`onOrderMarkedAsPaid()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/events/onordermarkedaspaid) and [`onOrderUpdated()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/events/onorderupdated) event handlers run when an offline order is marked as paid.
866
- *
867
- * >**Note:** This function is restricted and only runs if you elevate permissions using the [`wix-auth.elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function. If `wix-auth.elevate()` is not used, only those with the “Manage Pricing Plans” and “Manage Subscriptions” permissions can mark offline orders as paid.
868
836
  * @param _id - Order ID.
869
837
  * @public
870
- * @documentationMaturity preview
871
838
  * @requiredField _id
872
839
  * @returns Fulfilled - When the order is marked as paid.
873
840
  */
@@ -927,14 +894,9 @@ export function markAsPaid(_id) {
927
894
  *
928
895
  * The `endDate` and the `earliestEndDate` for the order are adjusted to include the pause period when the order is resumed.
929
896
  *
930
- * The [`onOrderPaused()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/events/onorderpaused) and [`onOrderUpdated()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/events/onorderupdated) event handlers run when an order is paused.
931
- *
932
- * Paused orders can be continued with the [`resumeOrder()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/orders/resumeorder) function.
933
- *
934
- * >**Note:** This function is restricted and only runs if you elevate permissions using the [`wix-auth.elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function. If `wix-auth.elevate()` is not used, only those with the “Manage Pricing Plans” and “Manage Subscriptions” permissions can pause orders.
897
+ * Paused orders can be continued with the [`resumeOrder()`](#resumeorder) function.
935
898
  * @param _id - Order ID.
936
899
  * @public
937
- * @documentationMaturity preview
938
900
  * @requiredField _id
939
901
  * @returns Fulfilled - When the order is paused.
940
902
  */
@@ -992,14 +954,9 @@ export function pauseOrder(_id) {
992
954
  * - The order status changes to `"ACTIVE"`.
993
955
  * - The `pausePeriods` array is updated.
994
956
  * - The `endDate` for the order is adjusted to include the pause period.
995
- * - The `earliestEndDate` is adjusted to include the pause period. (This property is reserved for future use.)
996
- *
997
- * The [`onOrderResumed()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/events/onorderresumed) and [`onOrderUpdated()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/events/onorderupdated) event handlers run when an order is resumed.
998
- *
999
- * >**Note:** This function is restricted and only runs if you elevate permissions using the [`wix-auth.elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function. If `wix-auth.elevate()` is not used, only those with the “Manage Pricing Plans” and “Manage Subscriptions” permissions can resume orders.
957
+ * - The `earliestEndDate` is adjusted to include the pause period. (This property is reserved for future use).
1000
958
  * @param _id - Order ID.
1001
959
  * @public
1002
- * @documentationMaturity preview
1003
960
  * @requiredField _id
1004
961
  * @returns Fulfilled - When the order is resumed.
1005
962
  */