{"version":3,"sources":["../../src/pricing-plans-v2-order-orders.public.ts","../../src/pricing-plans-v2-order-orders.universal.ts","../../src/pricing-plans-v2-order-orders.http.ts","../../src/pricing-plans-v2-order-orders.context.ts"],"sourcesContent":["import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { EventDefinition, HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n  CancellationEffectiveAtWithLiterals,\n  CreateOfflineOrderApplicationErrors,\n  CreateOfflineOrderOptions,\n  CreateOfflineOrderResponse,\n  CreateOfflineOrderValidationErrors,\n  CreateOnlineOrderApplicationErrors,\n  CreateOnlineOrderOptions,\n  CreateOnlineOrderResponse,\n  CreateOnlineOrderValidationErrors,\n  GetOfflineOrderPreviewApplicationErrors,\n  GetOfflineOrderPreviewOptions,\n  GetOfflineOrderPreviewResponse,\n  GetOfflineOrderPreviewValidationErrors,\n  GetOnlineOrderPreviewApplicationErrors,\n  GetOnlineOrderPreviewOptions,\n  GetOnlineOrderPreviewResponse,\n  GetOnlineOrderPreviewValidationErrors,\n  GetPricePreviewApplicationErrors,\n  GetPricePreviewOptions,\n  GetPricePreviewResponse,\n  ListOrdersResponse,\n  ManagementGetOrderOptions,\n  ManagementListOrdersOptions,\n  MemberGetOrderOptions,\n  MemberGetOrderResponse,\n  MemberListOrdersOptions,\n  MemberListOrdersResponse,\n  Order,\n  OrderAutoRenewCanceledEnvelope,\n  OrderCanceledEnvelope,\n  OrderCreatedEnvelope,\n  OrderCycleStartedEnvelope,\n  OrderEndDatePostponedEnvelope,\n  OrderEndedEnvelope,\n  OrderMarkedAsPaidEnvelope,\n  OrderPausedEnvelope,\n  OrderPurchasedEnvelope,\n  OrderResumedEnvelope,\n  OrderStartDateChangedEnvelope,\n  OrderStartedEnvelope,\n  OrderUpdatedEnvelope,\n  cancelOrder as universalCancelOrder,\n  createOfflineOrder as universalCreateOfflineOrder,\n  createOnlineOrder as universalCreateOnlineOrder,\n  getOfflineOrderPreview as universalGetOfflineOrderPreview,\n  getOnlineOrderPreview as universalGetOnlineOrderPreview,\n  getPricePreview as universalGetPricePreview,\n  managementGetOrder as universalManagementGetOrder,\n  managementListOrders as universalManagementListOrders,\n  markAsPaid as universalMarkAsPaid,\n  memberGetOrder as universalMemberGetOrder,\n  memberListOrders as universalMemberListOrders,\n  pauseOrder as universalPauseOrder,\n  postponeEndDate as universalPostponeEndDate,\n  requestCancellation as universalRequestCancellation,\n  resumeOrder as universalResumeOrder,\n} from './pricing-plans-v2-order-orders.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/pricing-plans' };\n\nexport function memberGetOrder(\n  httpClient: HttpClient\n): MemberGetOrderSignature {\n  return (_id: string, options?: MemberGetOrderOptions) =>\n    universalMemberGetOrder(\n      _id,\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface MemberGetOrderSignature {\n  /**\n   * Retrieves an order for the currently logged-in member by ID.\n   * @param - Order ID.\n   * @param - Options for getting a logged-in member's order.\n   */\n  (_id: string, options?: MemberGetOrderOptions): Promise<\n    NonNullablePaths<\n      MemberGetOrderResponse,\n      | `order._id`\n      | `order.planId`\n      | `order.subscriptionId`\n      | `order.buyer.memberId`\n      | `order.buyer.contactId`\n      | `order.priceDetails.subscription.cycleDuration.unit`\n      | `order.priceDetails.subtotal`\n      | `order.priceDetails.discount`\n      | `order.priceDetails.tax.name`\n      | `order.priceDetails.tax.includedInPrice`\n      | `order.priceDetails.tax.rate`\n      | `order.priceDetails.tax.amount`\n      | `order.priceDetails.total`\n      | `order.priceDetails.planPrice`\n      | `order.priceDetails.currency`\n      | `order.priceDetails.coupon.code`\n      | `order.priceDetails.coupon.amount`\n      | `order.priceDetails.coupon._id`\n      | `order.pricing.prices`\n      | `order.pricing.prices.${number}.duration.cycleFrom`\n      | `order.pricing.prices.${number}.price.subtotal`\n      | `order.pricing.prices.${number}.price.discount`\n      | `order.pricing.prices.${number}.price.total`\n      | `order.pricing.prices.${number}.price.currency`\n      | `order.pricing.prices.${number}.price.proration`\n      | `order.type`\n      | `order.status`\n      | `order.cancellation.cause`\n      | `order.cancellation.effectiveAt`\n      | `order.lastPaymentStatus`\n      | `order.pausePeriods`\n      | `order.pausePeriods.${number}.status`\n      | `order.currentCycle.index`\n      | `order.planName`\n      | `order.planDescription`\n      | `order.planPrice`,\n      7\n    >\n  >;\n}\n\nexport function memberListOrders(\n  httpClient: HttpClient\n): MemberListOrdersSignature {\n  return (options?: MemberListOrdersOptions) =>\n    universalMemberListOrders(\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface MemberListOrdersSignature {\n  /**\n   * Retrieves a list of up to 100 pricing plan orders for currently logged-in member.\n   * @param - Filtering, sorting, and pagination options.\n   */\n  (options?: MemberListOrdersOptions): Promise<\n    NonNullablePaths<\n      MemberListOrdersResponse,\n      | `orders`\n      | `orders.${number}._id`\n      | `orders.${number}.planId`\n      | `orders.${number}.subscriptionId`\n      | `orders.${number}.buyer.memberId`\n      | `orders.${number}.buyer.contactId`\n      | `orders.${number}.priceDetails.singlePaymentForDuration.unit`\n      | `orders.${number}.priceDetails.subtotal`\n      | `orders.${number}.priceDetails.discount`\n      | `orders.${number}.priceDetails.tax.name`\n      | `orders.${number}.priceDetails.tax.includedInPrice`\n      | `orders.${number}.priceDetails.tax.rate`\n      | `orders.${number}.priceDetails.tax.amount`\n      | `orders.${number}.priceDetails.total`\n      | `orders.${number}.priceDetails.planPrice`\n      | `orders.${number}.priceDetails.currency`\n      | `orders.${number}.priceDetails.coupon.code`\n      | `orders.${number}.priceDetails.coupon.amount`\n      | `orders.${number}.priceDetails.coupon._id`\n      | `orders.${number}.type`\n      | `orders.${number}.status`\n      | `orders.${number}.cancellation.cause`\n      | `orders.${number}.cancellation.effectiveAt`\n      | `orders.${number}.lastPaymentStatus`\n      | `orders.${number}.currentCycle.index`\n      | `orders.${number}.planName`\n      | `orders.${number}.planDescription`\n      | `orders.${number}.planPrice`,\n      6\n    >\n  >;\n}\n\nexport function requestCancellation(\n  httpClient: HttpClient\n): RequestCancellationSignature {\n  return (_id: string, effectiveAt: CancellationEffectiveAtWithLiterals) =>\n    universalRequestCancellation(\n      _id,\n      effectiveAt,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface RequestCancellationSignature {\n  /**\n   * Cancels an order. Recurring orders can be canceled either immediately or at the next payment date. One time orders can only be canceled immediately.\n   *\n   * 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.\n   *\n   * Canceling during the free trial period: When a buyer cancels their order during the free trial period, the buyer's subscription expires at the end of the free trial period and they won't be billed. The buyer may continue using the benefits until the end of the free trial period.\n   *\n   * >**Note:**\n   * >This method requires [visitor or member authentication](https://dev.wix.com/docs/rest/articles/getting-started/access-types-and-permissions).\n   * @param - Order ID.\n   * @param - Required. Whether to cancel the order effective immediately or at the next payment date. One-time orders can only be canceled immediately.\n   * @param - Options for requesting a cancellation.\n   */\n  (\n    _id: string,\n    effectiveAt: CancellationEffectiveAtWithLiterals\n  ): Promise<void>;\n}\n\nexport function createOnlineOrder(\n  httpClient: HttpClient\n): CreateOnlineOrderSignature {\n  return (\n    planId: string,\n    options?: NonNullablePaths<CreateOnlineOrderOptions, `onBehalf.memberId`, 3>\n  ) =>\n    universalCreateOnlineOrder(\n      planId,\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface CreateOnlineOrderSignature {\n  /**\n   * Creates an online order for a site member.\n   *\n   * If this method is called by a [site member](https://dev.wix.com/docs/rest/articles/getting-started/about-identities#site-member), the plan is automatically ordered on behalf of that site member. Otherwise, you must specify `onBehalf.memberId` in your call.\n   *\n   * When an online order is created, but payment hasn't been processed, its status is set to `DRAFT`. After the payment has been processed, if the start date is in the future the order's status is set to `PENDING`. Otherwise, it's set to `ACTIVE`.\n   * @param - Plan ID.\n   */\n  (\n    planId: string,\n    options?: NonNullablePaths<CreateOnlineOrderOptions, `onBehalf.memberId`, 3>\n  ): Promise<\n    NonNullablePaths<\n      CreateOnlineOrderResponse,\n      | `order._id`\n      | `order.planId`\n      | `order.subscriptionId`\n      | `order.buyer.memberId`\n      | `order.buyer.contactId`\n      | `order.priceDetails.subscription.cycleDuration.unit`\n      | `order.priceDetails.subtotal`\n      | `order.priceDetails.discount`\n      | `order.priceDetails.tax.name`\n      | `order.priceDetails.tax.includedInPrice`\n      | `order.priceDetails.tax.rate`\n      | `order.priceDetails.tax.amount`\n      | `order.priceDetails.total`\n      | `order.priceDetails.planPrice`\n      | `order.priceDetails.currency`\n      | `order.priceDetails.coupon.code`\n      | `order.priceDetails.coupon.amount`\n      | `order.priceDetails.coupon._id`\n      | `order.pricing.prices`\n      | `order.pricing.prices.${number}.duration.cycleFrom`\n      | `order.pricing.prices.${number}.price.subtotal`\n      | `order.pricing.prices.${number}.price.discount`\n      | `order.pricing.prices.${number}.price.total`\n      | `order.pricing.prices.${number}.price.currency`\n      | `order.pricing.prices.${number}.price.proration`\n      | `order.type`\n      | `order.status`\n      | `order.cancellation.cause`\n      | `order.cancellation.effectiveAt`\n      | `order.lastPaymentStatus`\n      | `order.pausePeriods`\n      | `order.pausePeriods.${number}.status`\n      | `order.currentCycle.index`\n      | `order.planName`\n      | `order.planDescription`\n      | `order.planPrice`,\n      7\n    > & {\n      __applicationErrorsType?: CreateOnlineOrderApplicationErrors;\n      __validationErrorsType?: CreateOnlineOrderValidationErrors;\n    }\n  >;\n}\n\nexport function createOfflineOrder(\n  httpClient: HttpClient\n): CreateOfflineOrderSignature {\n  return (\n    planId: string,\n    memberId: string,\n    options?: CreateOfflineOrderOptions\n  ) =>\n    universalCreateOfflineOrder(\n      planId,\n      memberId,\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface CreateOfflineOrderSignature {\n  /**\n   * Creates an order for a buyer who purchased the plan with an offline transaction.\n   *\n   * An offline order is handled off of the Wix site and is marked as `type`: `offline`. If a pricing plan\n   * has a limit on the amount of purchases per buyer, that limit is ignored for offline orders.\n   * Tax is only applied if the site [has it configured](https://support.wix.com/en/article/pricing-plans-setting-up-tax-collection).\n   *\n   * When creating a free offline order:\n   * The order's status is set to `\"PENDING\"` if the start date is in the future. Otherwise, the status is set to `\"ACTIVE\"`.\n   * The order's last payment status is set to `\"NOT_APPLICABLE\"`. \"\n   *\n   * When creating a non-free offline order:\n   * The order's status is set to `\"PENDING\"` if the start date is in the future. Otherwise, the status is set to `\"ACTIVE\"`.\n   * The order's last payment status is set to `\"UNPAID\"` or `\"PAID\"` based on the data passed in the `paid` boolean in the request.\n   *\n   * Payment for an offline order can be set in 1 of 2 ways:\n   * + During order creation, set `paid`: `true`.\n   * + After creation, call Mark As Paid.\n   * @param - ID of the plan being ordered, from the Plans API.\n   * @param - ID of the member ordering the plan, from the Members API.\n   * @param - Options for creating an offline order.\n   */\n  (\n    planId: string,\n    memberId: string,\n    options?: CreateOfflineOrderOptions\n  ): Promise<\n    NonNullablePaths<\n      CreateOfflineOrderResponse,\n      | `order._id`\n      | `order.planId`\n      | `order.subscriptionId`\n      | `order.buyer.memberId`\n      | `order.buyer.contactId`\n      | `order.priceDetails.subscription.cycleDuration.unit`\n      | `order.priceDetails.subtotal`\n      | `order.priceDetails.discount`\n      | `order.priceDetails.tax.name`\n      | `order.priceDetails.tax.includedInPrice`\n      | `order.priceDetails.tax.rate`\n      | `order.priceDetails.tax.amount`\n      | `order.priceDetails.total`\n      | `order.priceDetails.planPrice`\n      | `order.priceDetails.currency`\n      | `order.priceDetails.coupon.code`\n      | `order.priceDetails.coupon.amount`\n      | `order.priceDetails.coupon._id`\n      | `order.pricing.prices`\n      | `order.pricing.prices.${number}.duration.cycleFrom`\n      | `order.pricing.prices.${number}.price.subtotal`\n      | `order.pricing.prices.${number}.price.discount`\n      | `order.pricing.prices.${number}.price.total`\n      | `order.pricing.prices.${number}.price.currency`\n      | `order.pricing.prices.${number}.price.proration`\n      | `order.type`\n      | `order.status`\n      | `order.cancellation.cause`\n      | `order.cancellation.effectiveAt`\n      | `order.lastPaymentStatus`\n      | `order.pausePeriods`\n      | `order.pausePeriods.${number}.status`\n      | `order.currentCycle.index`\n      | `order.planName`\n      | `order.planDescription`\n      | `order.planPrice`,\n      7\n    > & {\n      __applicationErrorsType?: CreateOfflineOrderApplicationErrors;\n      __validationErrorsType?: CreateOfflineOrderValidationErrors;\n    }\n  >;\n}\n\nexport function getOnlineOrderPreview(\n  httpClient: HttpClient\n): GetOnlineOrderPreviewSignature {\n  return (planId: string, options?: GetOnlineOrderPreviewOptions) =>\n    universalGetOnlineOrderPreview(\n      planId,\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface GetOnlineOrderPreviewSignature {\n  /**\n   * Returns an `order` object that represents a potential online order for a site member.\n   *\n   * You can use this method to show a site member a preview of an online order before [creating](https://dev.wix.com/docs/rest/business-solutions/pricing-plans/pricing-plans/orders/create-online-order) it.\n   *\n   * This method must be called using the [site member identity](https://dev.wix.com/docs/rest/articles/getting-started/about-identities#site-member). Therefore, [Wix apps](https://dev.wix.com/docs/build-apps) can't currently call this method using REST.\n   * @param - Plan ID.\n   */\n  (planId: string, options?: GetOnlineOrderPreviewOptions): Promise<\n    NonNullablePaths<\n      GetOnlineOrderPreviewResponse,\n      | `order._id`\n      | `order.planId`\n      | `order.subscriptionId`\n      | `order.buyer.memberId`\n      | `order.buyer.contactId`\n      | `order.priceDetails.subscription.cycleDuration.unit`\n      | `order.priceDetails.subtotal`\n      | `order.priceDetails.discount`\n      | `order.priceDetails.tax.name`\n      | `order.priceDetails.tax.includedInPrice`\n      | `order.priceDetails.tax.rate`\n      | `order.priceDetails.tax.amount`\n      | `order.priceDetails.total`\n      | `order.priceDetails.planPrice`\n      | `order.priceDetails.currency`\n      | `order.priceDetails.coupon.code`\n      | `order.priceDetails.coupon.amount`\n      | `order.priceDetails.coupon._id`\n      | `order.pricing.prices`\n      | `order.pricing.prices.${number}.duration.cycleFrom`\n      | `order.pricing.prices.${number}.price.subtotal`\n      | `order.pricing.prices.${number}.price.discount`\n      | `order.pricing.prices.${number}.price.total`\n      | `order.pricing.prices.${number}.price.currency`\n      | `order.pricing.prices.${number}.price.proration`\n      | `order.type`\n      | `order.status`\n      | `order.cancellation.cause`\n      | `order.cancellation.effectiveAt`\n      | `order.lastPaymentStatus`\n      | `order.pausePeriods`\n      | `order.pausePeriods.${number}.status`\n      | `order.currentCycle.index`\n      | `order.planName`\n      | `order.planDescription`\n      | `order.planPrice`\n      | `purchaseLimitExceeded`,\n      7\n    > & {\n      __applicationErrorsType?: GetOnlineOrderPreviewApplicationErrors;\n      __validationErrorsType?: GetOnlineOrderPreviewValidationErrors;\n    }\n  >;\n}\n\nexport function getOfflineOrderPreview(\n  httpClient: HttpClient\n): GetOfflineOrderPreviewSignature {\n  return (\n    planId: string,\n    memberId: string,\n    options?: GetOfflineOrderPreviewOptions\n  ) =>\n    universalGetOfflineOrderPreview(\n      planId,\n      memberId,\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface GetOfflineOrderPreviewSignature {\n  /**\n   * Performs a dry run of a purchase and provides an order preview.\n   *\n   * The preview uses the same logic as purchasing a plan, but the preview is not saved. Because an order is not actually\n   * created, the preview order's `orderId` and `subscriptionId` are displayed as a string of multiple zero characters\n   * (`000000-0000`). Tax is only calculated if the site [has it configured](https://support.wix.com/en/article/pricing-plans-setting-up-tax-collection).\n   * <br>\n   * If a pricing plan has a limit on the amount of purchases per buyer, that limit is not considered for generating the preview.\n   * But, if that limit has been reached and this order would then exceed the amount of purchases permitted for this buyer, then\n   * `purchaseLimitExceeded` will return as `true`.\n   *\n   * To get a general price preview for a plan that's not buyer-specific, call Get Price Preview.\n   * @param - Member ID of the buyer the previewed order is for, from the Members API.\n   * @param - Options for previewing the offline order.\n   * @param - ID of the plan of the previewed order.\n   */\n  (\n    planId: string,\n    memberId: string,\n    options?: GetOfflineOrderPreviewOptions\n  ): Promise<\n    NonNullablePaths<\n      GetOfflineOrderPreviewResponse,\n      | `order._id`\n      | `order.planId`\n      | `order.subscriptionId`\n      | `order.buyer.memberId`\n      | `order.buyer.contactId`\n      | `order.priceDetails.subscription.cycleDuration.unit`\n      | `order.priceDetails.subtotal`\n      | `order.priceDetails.discount`\n      | `order.priceDetails.tax.name`\n      | `order.priceDetails.tax.includedInPrice`\n      | `order.priceDetails.tax.rate`\n      | `order.priceDetails.tax.amount`\n      | `order.priceDetails.total`\n      | `order.priceDetails.planPrice`\n      | `order.priceDetails.currency`\n      | `order.priceDetails.coupon.code`\n      | `order.priceDetails.coupon.amount`\n      | `order.priceDetails.coupon._id`\n      | `order.pricing.prices`\n      | `order.pricing.prices.${number}.duration.cycleFrom`\n      | `order.pricing.prices.${number}.price.subtotal`\n      | `order.pricing.prices.${number}.price.discount`\n      | `order.pricing.prices.${number}.price.total`\n      | `order.pricing.prices.${number}.price.currency`\n      | `order.pricing.prices.${number}.price.proration`\n      | `order.type`\n      | `order.status`\n      | `order.cancellation.cause`\n      | `order.cancellation.effectiveAt`\n      | `order.lastPaymentStatus`\n      | `order.pausePeriods`\n      | `order.pausePeriods.${number}.status`\n      | `order.currentCycle.index`\n      | `order.planName`\n      | `order.planDescription`\n      | `order.planPrice`\n      | `purchaseLimitExceeded`,\n      7\n    > & {\n      __applicationErrorsType?: GetOfflineOrderPreviewApplicationErrors;\n      __validationErrorsType?: GetOfflineOrderPreviewValidationErrors;\n    }\n  >;\n}\n\nexport function getPricePreview(\n  httpClient: HttpClient\n): GetPricePreviewSignature {\n  return (planId: string, options?: GetPricePreviewOptions) =>\n    universalGetPricePreview(\n      planId,\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface GetPricePreviewSignature {\n  /**\n   * Retrieves a plan's pricing.\n   *\n   * The price preview uses the same logic as purchasing a plan, but the preview is not saved. Tax is only applied if\n   * the site [has it configured](https://support.wix.com/en/article/pricing-plans-setting-up-tax-collection). The price is returned\n   * in the pricing model format used for orders. 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).\n   *\n   * Buyers do not have to be logged in to preview the price, and as such, the details returned are not buyer-specific. To\n   * generate a preview of a purchase for a specific buyer, call Get Offline Order Preview.\n   * @param - ID of plan to preview.\n   * @param - Options for getting a price preview.\n   */\n  (planId: string, options?: GetPricePreviewOptions): Promise<\n    NonNullablePaths<\n      GetPricePreviewResponse,\n      | `price.subscription.cycleDuration.unit`\n      | `price.subtotal`\n      | `price.discount`\n      | `price.tax.name`\n      | `price.tax.includedInPrice`\n      | `price.tax.rate`\n      | `price.tax.amount`\n      | `price.total`\n      | `price.planPrice`\n      | `price.currency`\n      | `price.coupon.code`\n      | `price.coupon.amount`\n      | `price.coupon._id`\n      | `prices`\n      | `prices.${number}.duration.cycleFrom`\n      | `prices.${number}.price.subtotal`\n      | `prices.${number}.price.coupon.code`\n      | `prices.${number}.price.coupon.amount`\n      | `prices.${number}.price.coupon._id`\n      | `prices.${number}.price.discount`\n      | `prices.${number}.price.tax.name`\n      | `prices.${number}.price.tax.includedInPrice`\n      | `prices.${number}.price.tax.rate`\n      | `prices.${number}.price.tax.amount`\n      | `prices.${number}.price.total`\n      | `prices.${number}.price.currency`\n      | `prices.${number}.price.proration`,\n      6\n    > & {\n      __applicationErrorsType?: GetPricePreviewApplicationErrors;\n    }\n  >;\n}\n\nexport function managementGetOrder(\n  httpClient: HttpClient\n): ManagementGetOrderSignature {\n  return (_id: string, options?: ManagementGetOrderOptions) =>\n    universalManagementGetOrder(\n      _id,\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface ManagementGetOrderSignature {\n  /**\n   * Retrieves an order by ID.\n   * @param - Order ID.\n   * @param - Options to use when getting an order.\n   * @returns Order.\n   */\n  (_id: string, options?: ManagementGetOrderOptions): Promise<\n    NonNullablePaths<\n      Order,\n      | `_id`\n      | `planId`\n      | `subscriptionId`\n      | `buyer.memberId`\n      | `buyer.contactId`\n      | `priceDetails.subscription.cycleDuration.unit`\n      | `priceDetails.subtotal`\n      | `priceDetails.discount`\n      | `priceDetails.tax.name`\n      | `priceDetails.tax.includedInPrice`\n      | `priceDetails.tax.rate`\n      | `priceDetails.tax.amount`\n      | `priceDetails.total`\n      | `priceDetails.planPrice`\n      | `priceDetails.currency`\n      | `priceDetails.coupon.code`\n      | `priceDetails.coupon.amount`\n      | `priceDetails.coupon._id`\n      | `pricing.prices`\n      | `pricing.prices.${number}.duration.cycleFrom`\n      | `pricing.prices.${number}.price.subtotal`\n      | `pricing.prices.${number}.price.discount`\n      | `pricing.prices.${number}.price.total`\n      | `pricing.prices.${number}.price.currency`\n      | `pricing.prices.${number}.price.proration`\n      | `type`\n      | `status`\n      | `cancellation.cause`\n      | `cancellation.effectiveAt`\n      | `lastPaymentStatus`\n      | `pausePeriods`\n      | `pausePeriods.${number}.status`\n      | `currentCycle.index`\n      | `planName`\n      | `planDescription`\n      | `planPrice`,\n      6\n    >\n  >;\n}\n\nexport function managementListOrders(\n  httpClient: HttpClient\n): ManagementListOrdersSignature {\n  return (options?: ManagementListOrdersOptions) =>\n    universalManagementListOrders(\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface ManagementListOrdersSignature {\n  /**\n   * Retrieves a list of up to 50 pricing plan orders and details, given the specified sorting and filtering.\n   *\n   * By default, this endpoint will retrieve all orders and return them sorted by `createdDate` in `DESC`, descending order.\n   * `sort.fieldName` supports `endDate` and `createdDate` fields and defaults to `ASC`, ascending order.\n   * @param - Filtering, sorting, and pagination options.\n   */\n  (options?: ManagementListOrdersOptions): Promise<\n    NonNullablePaths<\n      ListOrdersResponse,\n      | `orders`\n      | `orders.${number}._id`\n      | `orders.${number}.planId`\n      | `orders.${number}.subscriptionId`\n      | `orders.${number}.buyer.memberId`\n      | `orders.${number}.buyer.contactId`\n      | `orders.${number}.priceDetails.singlePaymentForDuration.unit`\n      | `orders.${number}.priceDetails.subtotal`\n      | `orders.${number}.priceDetails.discount`\n      | `orders.${number}.priceDetails.tax.name`\n      | `orders.${number}.priceDetails.tax.includedInPrice`\n      | `orders.${number}.priceDetails.tax.rate`\n      | `orders.${number}.priceDetails.tax.amount`\n      | `orders.${number}.priceDetails.total`\n      | `orders.${number}.priceDetails.planPrice`\n      | `orders.${number}.priceDetails.currency`\n      | `orders.${number}.priceDetails.coupon.code`\n      | `orders.${number}.priceDetails.coupon.amount`\n      | `orders.${number}.priceDetails.coupon._id`\n      | `orders.${number}.type`\n      | `orders.${number}.status`\n      | `orders.${number}.cancellation.cause`\n      | `orders.${number}.cancellation.effectiveAt`\n      | `orders.${number}.lastPaymentStatus`\n      | `orders.${number}.currentCycle.index`\n      | `orders.${number}.planName`\n      | `orders.${number}.planDescription`\n      | `orders.${number}.planPrice`,\n      6\n    >\n  >;\n}\n\nexport function postponeEndDate(\n  httpClient: HttpClient\n): PostponeEndDateSignature {\n  return (_id: string, endDate: Date) =>\n    universalPostponeEndDate(\n      _id,\n      endDate,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface PostponeEndDateSignature {\n  /**\n   * 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.\n   *\n   * New `endDate` must be later than the order's current `endDate`. Can't postpone orders that are unlimited.\n   * Can't postpone an order with `status`: `PAUSED`.\n   * @param - Order ID.\n   * @param - New end date and time.\n   *\n   * Must be later than the current end date and time.\n   * @param - Options for postponing the end date of an order.\n   */\n  (_id: string, endDate: Date): Promise<void>;\n}\n\nexport function cancelOrder(httpClient: HttpClient): CancelOrderSignature {\n  return (_id: string, effectiveAt: CancellationEffectiveAtWithLiterals) =>\n    universalCancelOrder(\n      _id,\n      effectiveAt,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface CancelOrderSignature {\n  /**\n   * Cancels an existing order.\n   *\n   * For orders with recurring payments, a cancellation can be set to occur either `IMMEDIATELY` or at the `NEXT_PAYMENT_DATE`.\n   * For orders with one-time payments, a cancellation can only be set for `IMMEDIATELY`.\n   *\n   * #### Canceling during the free trial period.\n   *\n   * When a buyer cancels their order during the free trial period, the buyer's subscription expires at the end\n   * of the free trial period and they will not be billed. The buyer may continue using the benefits until the end\n   * of the free trial period.\n   *\n   * When a Wix user cancels an ordered plan during the free trial period, they choose whether to apply the cancellation\n   * `IMMEDIATELY` or at the `NEXT_PAYMENT_DATE`. Canceling `IMMEDIATELY` will end the subscription for the buyer\n   * immediately, even during the free trial period and the buyer won't be billed. Canceling at the\n   * `NEXT_PAYMENT_DATE` allows the buyer to continue using the benefits of the subscription until the end of the free trial period.\n   * Then, the subscription ends and the buyer is not billed.\n   * @param - Order ID.\n   * @param - __Required.__ When the order will be canceled. One-time orders can only be canceled `IMMEDIATELY`.\n   * @param - Options for canceling orders.\n   */\n  (\n    _id: string,\n    effectiveAt: CancellationEffectiveAtWithLiterals\n  ): Promise<void>;\n}\n\nexport function markAsPaid(httpClient: HttpClient): MarkAsPaidSignature {\n  return (_id: string) =>\n    universalMarkAsPaid(\n      _id,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface MarkAsPaidSignature {\n  /**\n   * Marks an offline order as paid.\n   * > __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.\n   *\n   * Marking an offline order as paid causes the following changes:\n   * - The order's `lastPaymentStatus` changes to `\"PAID\"`.\n   * - The order's status changes to either `\"PENDING\"` or `\"ACTIVE\"`, depending on the order's `startDate`.\n   *\n   * An error occurs if you attempt to:\n   * - Mark an already-paid, offline order as paid. You cannot mark an offline order as paid twice.\n   * - Mark an online order as paid. The Mark as Paid method is supported for offline orders only.\n   * @param - Order ID.\n   */\n  (_id: string): Promise<void>;\n}\n\nexport function pauseOrder(httpClient: HttpClient): PauseOrderSignature {\n  return (_id: string) =>\n    universalPauseOrder(\n      _id,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface PauseOrderSignature {\n  /**\n   * Pauses an order. Calling this method changes the order status to `\"PAUSED\"` and updates the `pausePeriods` array.\n   *\n   * Only orders with `status`: `ACTIVE` can be paused.\n   * For orders with recurring payments, it also pauses the payment schedule. Buyers are not charged when an order is paused.\n   * Pausing an order affects the end date of the order by adding the time the order is paused to the `endDate`.\n   * The `endDate` and the `earliestEndDate` for the order are adjusted to include the pause period when the order is resumed.\n   *\n   * To resume a paused order, call Resume Order.\n   * @param - Order ID.\n   */\n  (_id: string): Promise<void>;\n}\n\nexport function resumeOrder(httpClient: HttpClient): ResumeOrderSignature {\n  return (_id: string) =>\n    universalResumeOrder(\n      _id,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface ResumeOrderSignature {\n  /**\n   * Resumes a paused order. For orders with recurring payments, it also restarts the payment schedule.\n   *\n   * Resuming an order causes the following changes:\n   * - The order status changes to `\"ACTIVE\"`.\n   * - The `pausePeriods` array is updated.\n   * - The `endDate` for the order is adjusted to include the pause period.\n   * - For orders with recurring payments, the payment schedule is restarted.\n   * - The `earliestEndDate` is adjusted to include the pause period. (This property is reserved for future use).\n   *\n   * To pause an order, call Pause Order.\n   * @param - Order ID.\n   */\n  (_id: string): Promise<void>;\n}\n\nexport const onOrderCanceled = EventDefinition(\n  'wix.pricing_plans.v2.order_canceled',\n  true,\n  (event: OrderCanceledEnvelope) =>\n    renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(event, [\n        {\n          transformFn: transformRESTTimestampToSDKTimestamp,\n          paths: [\n            { path: 'data.order.startDate' },\n            { path: 'data.order.endDate' },\n            { path: 'data.order.earliestEndDate' },\n            { path: 'data.order.createdDate' },\n            { path: 'data.order.updatedDate' },\n            { path: 'data.order.cancellation.requestedDate' },\n            { path: 'data.order.pausePeriods.pauseDate' },\n            { path: 'data.order.pausePeriods.resumeDate' },\n            { path: 'data.order.currentCycle.startedDate' },\n            { path: 'data.order.currentCycle.endedDate' },\n            { path: 'data.order.cycles.startedDate' },\n            { path: 'data.order.cycles.endedDate' },\n            { path: 'metadata.eventTime' },\n          ],\n        },\n      ])\n    )\n)<OrderCanceledEnvelope>();\nexport const onOrderCreated = EventDefinition(\n  'wix.pricing_plans.v2.order_created',\n  true,\n  (event: OrderCreatedEnvelope) =>\n    renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(event, [\n        {\n          transformFn: transformRESTTimestampToSDKTimestamp,\n          paths: [\n            { path: 'entity.startDate' },\n            { path: 'entity.endDate' },\n            { path: 'entity.earliestEndDate' },\n            { path: 'entity.createdDate' },\n            { path: 'entity.updatedDate' },\n            { path: 'entity.cancellation.requestedDate' },\n            { path: 'entity.pausePeriods.pauseDate' },\n            { path: 'entity.pausePeriods.resumeDate' },\n            { path: 'entity.currentCycle.startedDate' },\n            { path: 'entity.currentCycle.endedDate' },\n            { path: 'entity.cycles.startedDate' },\n            { path: 'entity.cycles.endedDate' },\n            { path: 'metadata.eventTime' },\n          ],\n        },\n      ])\n    )\n)<OrderCreatedEnvelope>();\nexport const onOrderStartDateChanged = EventDefinition(\n  'wix.pricing_plans.v2.order_start_date_changed',\n  true,\n  (event: OrderStartDateChangedEnvelope) =>\n    renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(event, [\n        {\n          transformFn: transformRESTTimestampToSDKTimestamp,\n          paths: [\n            { path: 'data.order.startDate' },\n            { path: 'data.order.endDate' },\n            { path: 'data.order.earliestEndDate' },\n            { path: 'data.order.createdDate' },\n            { path: 'data.order.updatedDate' },\n            { path: 'data.order.cancellation.requestedDate' },\n            { path: 'data.order.pausePeriods.pauseDate' },\n            { path: 'data.order.pausePeriods.resumeDate' },\n            { path: 'data.order.currentCycle.startedDate' },\n            { path: 'data.order.currentCycle.endedDate' },\n            { path: 'data.order.cycles.startedDate' },\n            { path: 'data.order.cycles.endedDate' },\n            { path: 'metadata.eventTime' },\n          ],\n        },\n      ])\n    )\n)<OrderStartDateChangedEnvelope>();\nexport const onOrderUpdated = EventDefinition(\n  'wix.pricing_plans.v2.order_updated',\n  true,\n  (event: OrderUpdatedEnvelope) =>\n    renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(event, [\n        {\n          transformFn: transformRESTTimestampToSDKTimestamp,\n          paths: [\n            { path: 'entity.startDate' },\n            { path: 'entity.endDate' },\n            { path: 'entity.earliestEndDate' },\n            { path: 'entity.createdDate' },\n            { path: 'entity.updatedDate' },\n            { path: 'entity.cancellation.requestedDate' },\n            { path: 'entity.pausePeriods.pauseDate' },\n            { path: 'entity.pausePeriods.resumeDate' },\n            { path: 'entity.currentCycle.startedDate' },\n            { path: 'entity.currentCycle.endedDate' },\n            { path: 'entity.cycles.startedDate' },\n            { path: 'entity.cycles.endedDate' },\n            { path: 'metadata.eventTime' },\n          ],\n        },\n      ])\n    )\n)<OrderUpdatedEnvelope>();\nexport const onOrderAutoRenewCanceled = EventDefinition(\n  'wix.pricing_plans.v2.order_auto_renew_canceled',\n  true,\n  (event: OrderAutoRenewCanceledEnvelope) =>\n    renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(event, [\n        {\n          transformFn: transformRESTTimestampToSDKTimestamp,\n          paths: [\n            { path: 'data.order.startDate' },\n            { path: 'data.order.endDate' },\n            { path: 'data.order.earliestEndDate' },\n            { path: 'data.order.createdDate' },\n            { path: 'data.order.updatedDate' },\n            { path: 'data.order.cancellation.requestedDate' },\n            { path: 'data.order.pausePeriods.pauseDate' },\n            { path: 'data.order.pausePeriods.resumeDate' },\n            { path: 'data.order.currentCycle.startedDate' },\n            { path: 'data.order.currentCycle.endedDate' },\n            { path: 'data.order.cycles.startedDate' },\n            { path: 'data.order.cycles.endedDate' },\n            { path: 'metadata.eventTime' },\n          ],\n        },\n      ])\n    )\n)<OrderAutoRenewCanceledEnvelope>();\nexport const onOrderCycleStarted = EventDefinition(\n  'wix.pricing_plans.v2.order_cycle_started',\n  true,\n  (event: OrderCycleStartedEnvelope) =>\n    renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(event, [\n        {\n          transformFn: transformRESTTimestampToSDKTimestamp,\n          paths: [\n            { path: 'data.order.startDate' },\n            { path: 'data.order.endDate' },\n            { path: 'data.order.earliestEndDate' },\n            { path: 'data.order.createdDate' },\n            { path: 'data.order.updatedDate' },\n            { path: 'data.order.cancellation.requestedDate' },\n            { path: 'data.order.pausePeriods.pauseDate' },\n            { path: 'data.order.pausePeriods.resumeDate' },\n            { path: 'data.order.currentCycle.startedDate' },\n            { path: 'data.order.currentCycle.endedDate' },\n            { path: 'data.order.cycles.startedDate' },\n            { path: 'data.order.cycles.endedDate' },\n            { path: 'metadata.eventTime' },\n          ],\n        },\n      ])\n    )\n)<OrderCycleStartedEnvelope>();\nexport const onOrderEndDatePostponed = EventDefinition(\n  'wix.pricing_plans.v2.order_end_date_postponed',\n  true,\n  (event: OrderEndDatePostponedEnvelope) =>\n    renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(event, [\n        {\n          transformFn: transformRESTTimestampToSDKTimestamp,\n          paths: [\n            { path: 'data.order.startDate' },\n            { path: 'data.order.endDate' },\n            { path: 'data.order.earliestEndDate' },\n            { path: 'data.order.createdDate' },\n            { path: 'data.order.updatedDate' },\n            { path: 'data.order.cancellation.requestedDate' },\n            { path: 'data.order.pausePeriods.pauseDate' },\n            { path: 'data.order.pausePeriods.resumeDate' },\n            { path: 'data.order.currentCycle.startedDate' },\n            { path: 'data.order.currentCycle.endedDate' },\n            { path: 'data.order.cycles.startedDate' },\n            { path: 'data.order.cycles.endedDate' },\n            { path: 'metadata.eventTime' },\n          ],\n        },\n      ])\n    )\n)<OrderEndDatePostponedEnvelope>();\nexport const onOrderEnded = EventDefinition(\n  'wix.pricing_plans.v2.order_ended',\n  true,\n  (event: OrderEndedEnvelope) =>\n    renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(event, [\n        {\n          transformFn: transformRESTTimestampToSDKTimestamp,\n          paths: [\n            { path: 'data.order.startDate' },\n            { path: 'data.order.endDate' },\n            { path: 'data.order.earliestEndDate' },\n            { path: 'data.order.createdDate' },\n            { path: 'data.order.updatedDate' },\n            { path: 'data.order.cancellation.requestedDate' },\n            { path: 'data.order.pausePeriods.pauseDate' },\n            { path: 'data.order.pausePeriods.resumeDate' },\n            { path: 'data.order.currentCycle.startedDate' },\n            { path: 'data.order.currentCycle.endedDate' },\n            { path: 'data.order.cycles.startedDate' },\n            { path: 'data.order.cycles.endedDate' },\n            { path: 'metadata.eventTime' },\n          ],\n        },\n      ])\n    )\n)<OrderEndedEnvelope>();\nexport const onOrderMarkedAsPaid = EventDefinition(\n  'wix.pricing_plans.v2.order_marked_as_paid',\n  true,\n  (event: OrderMarkedAsPaidEnvelope) =>\n    renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(event, [\n        {\n          transformFn: transformRESTTimestampToSDKTimestamp,\n          paths: [\n            { path: 'data.order.startDate' },\n            { path: 'data.order.endDate' },\n            { path: 'data.order.earliestEndDate' },\n            { path: 'data.order.createdDate' },\n            { path: 'data.order.updatedDate' },\n            { path: 'data.order.cancellation.requestedDate' },\n            { path: 'data.order.pausePeriods.pauseDate' },\n            { path: 'data.order.pausePeriods.resumeDate' },\n            { path: 'data.order.currentCycle.startedDate' },\n            { path: 'data.order.currentCycle.endedDate' },\n            { path: 'data.order.cycles.startedDate' },\n            { path: 'data.order.cycles.endedDate' },\n            { path: 'metadata.eventTime' },\n          ],\n        },\n      ])\n    )\n)<OrderMarkedAsPaidEnvelope>();\nexport const onOrderPaused = EventDefinition(\n  'wix.pricing_plans.v2.order_paused',\n  true,\n  (event: OrderPausedEnvelope) =>\n    renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(event, [\n        {\n          transformFn: transformRESTTimestampToSDKTimestamp,\n          paths: [\n            { path: 'data.order.startDate' },\n            { path: 'data.order.endDate' },\n            { path: 'data.order.earliestEndDate' },\n            { path: 'data.order.createdDate' },\n            { path: 'data.order.updatedDate' },\n            { path: 'data.order.cancellation.requestedDate' },\n            { path: 'data.order.pausePeriods.pauseDate' },\n            { path: 'data.order.pausePeriods.resumeDate' },\n            { path: 'data.order.currentCycle.startedDate' },\n            { path: 'data.order.currentCycle.endedDate' },\n            { path: 'data.order.cycles.startedDate' },\n            { path: 'data.order.cycles.endedDate' },\n            { path: 'metadata.eventTime' },\n          ],\n        },\n      ])\n    )\n)<OrderPausedEnvelope>();\nexport const onOrderPurchased = EventDefinition(\n  'wix.pricing_plans.v2.order_purchased',\n  true,\n  (event: OrderPurchasedEnvelope) =>\n    renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(event, [\n        {\n          transformFn: transformRESTTimestampToSDKTimestamp,\n          paths: [\n            { path: 'data.order.startDate' },\n            { path: 'data.order.endDate' },\n            { path: 'data.order.earliestEndDate' },\n            { path: 'data.order.createdDate' },\n            { path: 'data.order.updatedDate' },\n            { path: 'data.order.cancellation.requestedDate' },\n            { path: 'data.order.pausePeriods.pauseDate' },\n            { path: 'data.order.pausePeriods.resumeDate' },\n            { path: 'data.order.currentCycle.startedDate' },\n            { path: 'data.order.currentCycle.endedDate' },\n            { path: 'data.order.cycles.startedDate' },\n            { path: 'data.order.cycles.endedDate' },\n            { path: 'metadata.eventTime' },\n          ],\n        },\n      ])\n    )\n)<OrderPurchasedEnvelope>();\nexport const onOrderResumed = EventDefinition(\n  'wix.pricing_plans.v2.order_resumed',\n  true,\n  (event: OrderResumedEnvelope) =>\n    renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(event, [\n        {\n          transformFn: transformRESTTimestampToSDKTimestamp,\n          paths: [\n            { path: 'data.order.startDate' },\n            { path: 'data.order.endDate' },\n            { path: 'data.order.earliestEndDate' },\n            { path: 'data.order.createdDate' },\n            { path: 'data.order.updatedDate' },\n            { path: 'data.order.cancellation.requestedDate' },\n            { path: 'data.order.pausePeriods.pauseDate' },\n            { path: 'data.order.pausePeriods.resumeDate' },\n            { path: 'data.order.currentCycle.startedDate' },\n            { path: 'data.order.currentCycle.endedDate' },\n            { path: 'data.order.cycles.startedDate' },\n            { path: 'data.order.cycles.endedDate' },\n            { path: 'metadata.eventTime' },\n          ],\n        },\n      ])\n    )\n)<OrderResumedEnvelope>();\nexport const onOrderStarted = EventDefinition(\n  'wix.pricing_plans.v2.order_started',\n  true,\n  (event: OrderStartedEnvelope) =>\n    renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(event, [\n        {\n          transformFn: transformRESTTimestampToSDKTimestamp,\n          paths: [\n            { path: 'data.order.startDate' },\n            { path: 'data.order.endDate' },\n            { path: 'data.order.earliestEndDate' },\n            { path: 'data.order.createdDate' },\n            { path: 'data.order.updatedDate' },\n            { path: 'data.order.cancellation.requestedDate' },\n            { path: 'data.order.pausePeriods.pauseDate' },\n            { path: 'data.order.pausePeriods.resumeDate' },\n            { path: 'data.order.currentCycle.startedDate' },\n            { path: 'data.order.currentCycle.endedDate' },\n            { path: 'data.order.cycles.startedDate' },\n            { path: 'data.order.cycles.endedDate' },\n            { path: 'metadata.eventTime' },\n          ],\n        },\n      ])\n    )\n)<OrderStartedEnvelope>();\n\nexport {\n  AccountInfo,\n  AccountInfoMetadata,\n  ActionEvent,\n  ApplicationError,\n  ApplyCouponRequest,\n  ApplyCouponResponse,\n  BaseEventMetadata,\n  BulkActionMetadata,\n  BulkOrderResult,\n  BulkPauseOrderRequest,\n  BulkPauseOrderResponse,\n  BulkResumeOrderRequest,\n  BulkResumeOrderResponse,\n  Buyer,\n  CancelOrderRequest,\n  CancelOrderResponse,\n  Cancellation,\n  CancellationCause,\n  CancellationEffectiveAt,\n  Captcha,\n  ChangeStartDateRequest,\n  ChangeStartDateResponse,\n  Coupon,\n  CouponsError,\n  CreateExternalOrderRequest,\n  CreateExternalOrderResponse,\n  CreateGuestOnlineOrderRequest,\n  CreateGuestOnlineOrderResponse,\n  CreateOfflineOrderOptions,\n  CreateOfflineOrderRequest,\n  CreateOfflineOrderResponse,\n  CreateOnlineOrderOptions,\n  CreateOnlineOrderRequest,\n  CreateOnlineOrderResponse,\n  CurrentCycle,\n  CursorPaging,\n  Cursors,\n  DomainEvent,\n  DomainEventBodyOneOf,\n  Duration,\n  Empty,\n  EntityCreatedEvent,\n  EntityDeletedEvent,\n  EntityUpdatedEvent,\n  EventMetadata,\n  Fee,\n  FormData,\n  GetAvailableOrderActionsRequest,\n  GetAvailableOrderActionsResponse,\n  GetGuestOnlineOrderPreviewRequest,\n  GetGuestOnlineOrderPreviewResponse,\n  GetOfflineOrderPreviewOptions,\n  GetOfflineOrderPreviewRequest,\n  GetOfflineOrderPreviewResponse,\n  GetOnlineOrderPreviewOptions,\n  GetOnlineOrderPreviewRequest,\n  GetOnlineOrderPreviewResponse,\n  GetOrderRequest,\n  GetOrderResponse,\n  GetOrdersStatsRequest,\n  GetOrdersStatsResponse,\n  GetPricePreviewOptions,\n  GetPricePreviewRequest,\n  GetPricePreviewResponse,\n  Guest,\n  IdentificationData,\n  IdentificationDataIdOneOf,\n  ItemMetadata,\n  ListOrdersRequest,\n  ListOrdersResponse,\n  ManagementGetOrderOptions,\n  ManagementListOrdersOptions,\n  MarkAsPaidRequest,\n  MarkAsPaidResponse,\n  MemberGetOrderOptions,\n  MemberGetOrderRequest,\n  MemberGetOrderResponse,\n  MemberListOrdersOptions,\n  MemberListOrdersRequest,\n  MemberListOrdersResponse,\n  MessageEnvelope,\n  OnBehalf,\n  Order,\n  OrderAutoRenewCanceled,\n  OrderAutoRenewCanceledEnvelope,\n  OrderCanceled,\n  OrderCanceledEnvelope,\n  OrderCreatedEnvelope,\n  OrderCycle,\n  OrderCycleStarted,\n  OrderCycleStartedEnvelope,\n  OrderEndDatePostponed,\n  OrderEndDatePostponedEnvelope,\n  OrderEnded,\n  OrderEndedEnvelope,\n  OrderMarkedAsPaid,\n  OrderMarkedAsPaidEnvelope,\n  OrderMethod,\n  OrderPaused,\n  OrderPausedEnvelope,\n  OrderPurchased,\n  OrderPurchasedEnvelope,\n  OrderResumed,\n  OrderResumedEnvelope,\n  OrderStartDateChanged,\n  OrderStartDateChangedEnvelope,\n  OrderStarted,\n  OrderStartedEnvelope,\n  OrderStatus,\n  OrderType,\n  OrderUpdatedEnvelope,\n  OrdersQueryOrdersRequest,\n  OrdersQueryOrdersResponse,\n  Paging,\n  PagingMetadataV2,\n  PauseOrderRequest,\n  PauseOrderResponse,\n  PausePeriod,\n  PaymentStatus,\n  PeriodUnit,\n  PostponeEndDateRequest,\n  PostponeEndDateResponse,\n  Price,\n  PriceDetails,\n  PriceDetailsPricingModelOneOf,\n  PriceDuration,\n  PricingDetails,\n  PricingDetailsPricingModelOneOf,\n  QueryOrdersRequest,\n  QueryOrdersResponse,\n  QueryV2,\n  QueryV2PagingMethodOneOf,\n  ReasonNotSuspendable,\n  Recurrence,\n  RequestCancellationRequest,\n  RequestCancellationResponse,\n  RestoreInfo,\n  ResumeOrderRequest,\n  ResumeOrderResponse,\n  Set,\n  SetSubmissionRequest,\n  SetSubmissionResponse,\n  SortOrder,\n  Sorting,\n  SpannedPrice,\n  Status,\n  Tax,\n  WebhookIdentityType,\n} from './pricing-plans-v2-order-orders.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n  renameKeysFromSDKRequestToRESTRequest,\n  renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixPricingPlansV2Order from './pricing-plans-v2-order-orders.http.js';\n// @ts-ignore\n\n/**\n * An order object includes all of the details related to the purchase of a Pricing Plan.\n * You can manage existing orders, create offline orders, and preview orders not yet purchased.\n *\n * Orders are based on pricing models based on the payment and duration cycles for each plan.\n * 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).\n */\nexport interface Order {\n  /**\n   * Order ID.\n   * @format GUID\n   * @readonly\n   */\n  _id?: string;\n  /**\n   * ID of the plan purchased with the order, from the Plans API.\n   * @format GUID\n   * @readonly\n   */\n  planId?: string;\n  /**\n   * ID of the related Wix subscription.\n   *\n   * Every pricing plan order corresponds to a Wix subscription, including orders for single payment plans. Learn more in\n   * a [Pricing Plans overview](https://support.wix.com/en/article/pricing-plans-an-overview#create-plans-to-suit-your-business).\n   * @format GUID\n   * @readonly\n   */\n  subscriptionId?: string;\n  /**\n   * Wix Pay order ID.\n   *\n   * Provided by Wix whether the order is created online or offline. The field is omitted when the order is free.\n   * @format GUID\n   * @readonly\n   */\n  wixPayOrderId?: string | null;\n  /**\n   * The buyer's IDs. Includes `memberId` and `contactId`.\n   *\n   * Currently, Pricing Plan purchases are limited to members only. `contactId` is returned,\n   * but a buyer will not be able to purchase a plan without a `memberId`.\n   * @readonly\n   */\n  buyer?: Buyer;\n  /**\n   * @internal\n   * @internal\n   * @readonly\n   * @deprecated __Deprecated.__ Use `pricing` instead. This property will be removed on September 30, 2022.\n   * @replacedBy pricing\n   * @targetRemovalDate 2022-10-01\n   */\n  priceDetails?: PriceDetails;\n  /**\n   * Order pricing model, price, and payment schedule.\n   *\n   * 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).\n   * @readonly\n   */\n  pricing?: PricingDetails;\n  /**\n   * How the order was processed.\n   * @readonly\n   */\n  type?: OrderTypeWithLiterals;\n  /**\n   * Status of the order.\n   * @readonly\n   */\n  status?: OrderStatusWithLiterals;\n  /**\n   * Whether the order will be canceled at the next payment date.\n   *\n   * If `true`, the order status will be `CANCELED` and the next payment won't be charged. Omitted for single payment orders.\n   * @readonly\n   */\n  autoRenewCanceled?: boolean | null;\n  /**\n   * Details about the cancellation of an order.\n   *\n   * Only present if the status is `CANCELED`.\n   * @readonly\n   */\n  cancellation?: Cancellation;\n  /**\n   * Status of the last payment for the order.\n   * Updated automatically for online orders. Updated manually by the Wix user for offline orders.\n   * @readonly\n   */\n  lastPaymentStatus?: PaymentStatusWithLiterals;\n  /**\n   * Start date and time for the ordered plan.\n   * @readonly\n   */\n  startDate?: Date | null;\n  /**\n   * Current end date and time for the ordered plan.\n   *\n   * `endDate` may be updated over the course of an order.\n   * If the order is paused, it will have a later `endDate` once it is resumed.\n   * `endDate` may also be postponed.\n   *\n   * Omitted if the order is valid until canceled and still `ACTIVE`.\n   * @readonly\n   */\n  endDate?: Date | null;\n  /**\n   * List of periods during which the order is paused.\n   * @readonly\n   */\n  pausePeriods?: PausePeriod[];\n  /**\n   * Free trial period for the order, in days.\n   *\n   * Only available for recurring plans.\n   * @readonly\n   * @min 1\n   * @max 999\n   */\n  freeTrialDays?: number | null;\n  /**\n   * Earliest end date and time that the plan for the order can expire.\n   *\n   * Calculated by using the original end date plus any pause periods. Omitted if the order is active until canceled. Reserved for future use.\n   * @readonly\n   */\n  earliestEndDate?: Date | null;\n  /**\n   * Current payment cycle for the order.\n   *\n   * `currentCycle` will be omitted if the order's status is `CANCELED` or `ENDED`, or if the `startDate` hasn't passed yet.\n   * @readonly\n   */\n  currentCycle?: CurrentCycle;\n  /**\n   * Plan name at the time of purchase.\n   * @readonly\n   */\n  planName?: string;\n  /**\n   * Plan description at the time of purchase\n   * @readonly\n   */\n  planDescription?: string;\n  /**\n   * Plan price as it was at the moment of order creation.\n   * @format DECIMAL_VALUE\n   * @readonly\n   */\n  planPrice?: string;\n  /**\n   * Date and time the order was created.\n   * @readonly\n   */\n  _createdDate?: Date | null;\n  /**\n   * Date and time the order was updated.\n   * @readonly\n   */\n  _updatedDate?: Date | null;\n  /**\n   * Information about the form submitted during the plan's checkout.\n   * @readonly\n   */\n  formData?: FormData;\n}\n\nexport interface Buyer {\n  /**\n   * Member ID for a Wix site member, from the Members API.\n   * @format GUID\n   * @readonly\n   */\n  memberId?: string;\n  /**\n   * Contact ID for a Wix site contact, from the Contacts API.\n   * @format GUID\n   * @readonly\n   */\n  contactId?: string;\n}\n\nexport interface PriceDetails extends PriceDetailsPricingModelOneOf {\n  /** Order has recurring payments. */\n  subscription?: Recurrence;\n  /** One-time payment. Order is valid for a specified duration. */\n  singlePaymentForDuration?: Duration;\n  /** One-time payment. Order is valid until it is canceled. */\n  singlePaymentUnlimited?: boolean | null;\n  /**\n   * Price of the order excluding tax, specified as a monetary amount. for example, `\"9.99\"`.\n   * @format DECIMAL_VALUE\n   */\n  subtotal?: string;\n  /**\n   * Total discount applied.\n   * @format DECIMAL_VALUE\n   */\n  discount?: string;\n  /** Tax applied. */\n  tax?: Tax;\n  /**\n   * Price after tax and discount is applied, specified as a monetary amount. For example, `\"13.98\"`.\n   *\n   * If no tax is applied, the amount is the same as `subtotal`.\n   * @format DECIMAL_VALUE\n   */\n  total?: string;\n  /**\n   * Plan price as it was at the moment of order creation.\n   * @format DECIMAL_VALUE\n   */\n  planPrice?: string;\n  /**\n   * Currency code. Must be valid ISO 4217 currency code (e.g., USD).\n   * @format CURRENCY\n   */\n  currency?: string;\n  /**\n   * Free trial period for the order in days. Only available for recurring plans.\n   * @min 1\n   * @max 999\n   */\n  freeTrialDays?: number | null;\n  /** Coupon applied to the order. Empty means no coupon was applied. */\n  coupon?: Coupon;\n}\n\n/** @oneof */\nexport interface PriceDetailsPricingModelOneOf {\n  /** Order has recurring payments. */\n  subscription?: Recurrence;\n  /** One-time payment. Order is valid for a specified duration. */\n  singlePaymentForDuration?: Duration;\n  /** One-time payment. Order is valid until it is canceled. */\n  singlePaymentUnlimited?: boolean | null;\n}\n\nexport interface Tax {\n  /** Name of the tax. For example, VAT. */\n  name?: string;\n  /** Whether tax is included in the original price. When `false`, tax is added at checkout. */\n  includedInPrice?: boolean;\n  /**\n   * Tax rate percentage, as a number between 0 and 100. For example, a 7% tax rate is `\"7.00\"`.\n   * @format DECIMAL_VALUE\n   */\n  rate?: string;\n  /**\n   * Total tax, specified as a monetary amount. For example, `\"3.99\"`.\n   * @format DECIMAL_VALUE\n   */\n  amount?: string;\n}\n\n/** An object specifying how often and for how long payments recur (may be forever). */\nexport interface Recurrence {\n  /**\n   * Number of payment cycles the subscription is valid for.\n   * `0` for unlimited plans or for plans that are valid until canceled.\n   */\n  cycleDuration?: Duration;\n  /**\n   * Length of a payment cycle. For example, 1 month to have monthly payments.\n   * Multiply `cycleDuration`'s `count` by `cycleCount` to get the subscription duration.\n   * Currently, only a value of `1` is supported.\n   * @max 2000\n   */\n  cycleCount?: number | null;\n}\n\n/** A duration expressed in number of time units. */\nexport interface Duration {\n  /**\n   * Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`.\n   * @min 1\n   */\n  count?: number | null;\n  /** Unit of time for the cycle duration. */\n  unit?: PeriodUnitWithLiterals;\n}\n\nexport enum PeriodUnit {\n  /** Not defined. */\n  UNDEFINED = 'UNDEFINED',\n  /** Time unit is a day. */\n  DAY = 'DAY',\n  /** Time unit is a week. */\n  WEEK = 'WEEK',\n  /** Time unit is a month. */\n  MONTH = 'MONTH',\n  /** Time unit is a year. */\n  YEAR = 'YEAR',\n}\n\n/** @enumType */\nexport type PeriodUnitWithLiterals =\n  | PeriodUnit\n  | 'UNDEFINED'\n  | 'DAY'\n  | 'WEEK'\n  | 'MONTH'\n  | 'YEAR';\n\nexport interface Coupon {\n  /**\n   * Code of the applied coupon.\n   * @minLength 1\n   * @maxLength 20\n   */\n  code?: string;\n  /**\n   * Total discount of the coupon, as a monetary amount.\n   * @format DECIMAL_VALUE\n   */\n  amount?: string;\n  /**\n   * Coupon ID.\n   * @format GUID\n   * @readonly\n   */\n  _id?: string;\n}\n\nexport interface PricingDetails extends PricingDetailsPricingModelOneOf {\n  /** Pricing model for an order with recurring payment cycles. */\n  subscription?: Recurrence;\n  /** Pricing model for an order with a one-time payment and the order is valid for a specific amount of time. */\n  singlePaymentForDuration?: Duration;\n  /** Pricing model for an order with a one-time payment and the order is valid until canceled. */\n  singlePaymentUnlimited?: boolean | null;\n  /**\n   * Pricing details for all pricing models.\n   * @readonly\n   */\n  prices?: SpannedPrice[];\n}\n\n/** @oneof */\nexport interface PricingDetailsPricingModelOneOf {\n  /** Pricing model for an order with recurring payment cycles. */\n  subscription?: Recurrence;\n  /** Pricing model for an order with a one-time payment and the order is valid for a specific amount of time. */\n  singlePaymentForDuration?: Duration;\n  /** Pricing model for an order with a one-time payment and the order is valid until canceled. */\n  singlePaymentUnlimited?: boolean | null;\n}\n\nexport interface SpannedPrice {\n  /**\n   * Cycle duration to apply `price` for.\n   *\n   * Use with all pricing models.\n   * Can apply the same price to multiple payment cycles.\n   */\n  duration?: PriceDuration;\n  /** Order price. */\n  price?: Price;\n}\n\nexport interface PriceDuration {\n  /**\n   * Price starts to apply with this cycle.\n   *\n   * `1` is the first payment cycle for all pricing models.\n   */\n  cycleFrom?: number;\n  /**\n   * Amount of cycles to apply price for.\n   *\n   * For `subscription` pricing models with a finite number of cycles, the `numberOfCycles` is the same as `pricing.subscription.cycleCount`.\n   *\n   * For `subscription` pricing models that are unlimited or until-canceled, the `numberOfCycles` is not returned.\n   *\n   * For `singlePaymentForDuration` and `singlePaymentUnlimited` pricing models, the `numberOfCycles` is `1`.\n   */\n  numberOfCycles?: number | null;\n}\n\nexport interface Price {\n  /**\n   * Price of the order excluding tax, specified as a monetary amount. For example, `\"9.99\"`.\n   * @format DECIMAL_VALUE\n   */\n  subtotal?: string;\n  /** Coupon applied to the order, from the Coupons API. */\n  coupon?: Coupon;\n  /**\n   * Total discount applied to the order.\n   * @format DECIMAL_VALUE\n   */\n  discount?: string;\n  /**\n   * Tax applied to the order.\n   *\n   * Tax is only applied if the site [has it configured](https://support.wix.com/en/article/pricing-plans-setting-up-tax-collection).\n   */\n  tax?: Tax;\n  /**\n   * Price after tax and discount is applied. Specified as a monetary amount, for example, `\"13.98\"`.\n   *\n   * If no tax is applied, the amount is the same as `subtotal`.\n   * @format DECIMAL_VALUE\n   */\n  total?: string;\n  /**\n   * Three-letter currency code in\n   * [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.\n   * @format CURRENCY\n   */\n  currency?: string;\n  /**\n   * Price change after billing date was change and price was adjusted. Could be positive and negative values.\n   * @format DECIMAL_VALUE\n   */\n  proration?: string;\n}\n\nexport interface Fee {\n  /**\n   * Fee name\n   * @minLength 1\n   * @maxLength 40\n   */\n  name?: string;\n  /**\n   * Amount of fee to be charged\n   * @decimalValue options { lt:1000000000000, gt:0.000, maxScale:3 }\n   */\n  amount?: string;\n}\n\nexport enum OrderType {\n  /** Undefined order type. */\n  UNDEFINED = 'UNDEFINED',\n  /** The buyer purchased the plan using the site. */\n  ONLINE = 'ONLINE',\n  /** The buyer made a manual, offline purchase without using the site. */\n  OFFLINE = 'OFFLINE',\n  /** The buyer made a purchase through an external payment provider. */\n  EXTERNAL = 'EXTERNAL',\n}\n\n/** @enumType */\nexport type OrderTypeWithLiterals =\n  | OrderType\n  | 'UNDEFINED'\n  | 'ONLINE'\n  | 'OFFLINE'\n  | 'EXTERNAL';\n\nexport enum OrderMethod {\n  /** Unknown order method. */\n  UNKNOWN = 'UNKNOWN',\n  /** Mail Order / Telephone Order transaction. */\n  MOTO = 'MOTO',\n  /** Point of Sale transaction. */\n  POS = 'POS',\n}\n\n/** @enumType */\nexport type OrderMethodWithLiterals = OrderMethod | 'UNKNOWN' | 'MOTO' | 'POS';\n\nexport enum OrderStatus {\n  /** Undefined order status. */\n  UNDEFINED = 'UNDEFINED',\n  /** Order has been initiated but payment hasn't been processed yet. The plan isn't yet available for use to the buyer. */\n  DRAFT = 'DRAFT',\n  /** Order has been purchased and its start date is set in the future. */\n  PENDING = 'PENDING',\n  /** Order has been processed. The plan is available for use. */\n  ACTIVE = 'ACTIVE',\n  /** Order, and use of the plan, is paused. The order, and use of the plan, can be resumed. */\n  PAUSED = 'PAUSED',\n  /** Order has completed its duration and is no longer available for use. */\n  ENDED = 'ENDED',\n  /** Order has been canceled. */\n  CANCELED = 'CANCELED',\n}\n\n/** @enumType */\nexport type OrderStatusWithLiterals =\n  | OrderStatus\n  | 'UNDEFINED'\n  | 'DRAFT'\n  | 'PENDING'\n  | 'ACTIVE'\n  | 'PAUSED'\n  | 'ENDED'\n  | 'CANCELED';\n\nexport interface Cancellation {\n  /** Date and time the cancellation was requested. */\n  requestedDate?: Date | null;\n  /** Reason for the cancellation. */\n  cause?: CancellationCauseWithLiterals;\n  /** When the cancellation takes effect. Set when cancelling the order. */\n  effectiveAt?: CancellationEffectiveAtWithLiterals;\n}\n\nexport enum CancellationCause {\n  /** Undefined cancellation cause. */\n  UNDEFINED = 'UNDEFINED',\n  /** Wix user canceled the order. */\n  OWNER_ACTION = 'OWNER_ACTION',\n  /** Buyer initiated the cancellation. */\n  MEMBER_ACTION = 'MEMBER_ACTION',\n  /** Payment transaction failed. */\n  PAYMENT_FAILURE = 'PAYMENT_FAILURE',\n  /** Buyer's payment details weren't set up correctly. */\n  PAYMENT_SETUP_FAILURE = 'PAYMENT_SETUP_FAILURE',\n  /** Reason for the cancellation is unknown. */\n  UNKNOWN = 'UNKNOWN',\n}\n\n/** @enumType */\nexport type CancellationCauseWithLiterals =\n  | CancellationCause\n  | 'UNDEFINED'\n  | 'OWNER_ACTION'\n  | 'MEMBER_ACTION'\n  | 'PAYMENT_FAILURE'\n  | 'PAYMENT_SETUP_FAILURE'\n  | 'UNKNOWN';\n\nexport enum CancellationEffectiveAt {\n  /** Undefined cancellation time. */\n  UNDEFINED = 'UNDEFINED',\n  /** Cancellation occurs immediately and the buyer can no longer use the plan. */\n  IMMEDIATELY = 'IMMEDIATELY',\n  /** Cancellation occurs at the next payment date and time. Buyer can continue to use the plan until that date and time. */\n  NEXT_PAYMENT_DATE = 'NEXT_PAYMENT_DATE',\n}\n\n/** @enumType */\nexport type CancellationEffectiveAtWithLiterals =\n  | CancellationEffectiveAt\n  | 'UNDEFINED'\n  | 'IMMEDIATELY'\n  | 'NEXT_PAYMENT_DATE';\n\nexport enum PaymentStatus {\n  /** Undefined payment status. */\n  UNDEFINED = 'UNDEFINED',\n  /** Payment has been paid. */\n  PAID = 'PAID',\n  /** Payment has been refunded. */\n  REFUNDED = 'REFUNDED',\n  /** Payment transaction didn't complete. */\n  FAILED = 'FAILED',\n  /** Payment has not been paid. */\n  UNPAID = 'UNPAID',\n  /** Billing has been initialized, but actual charge is yet to be made. This can happen for free trials and payments made with PayPal. */\n  PENDING = 'PENDING',\n  /** No payment was necessary. For example, for free plans or free trials. */\n  NOT_APPLICABLE = 'NOT_APPLICABLE',\n}\n\n/** @enumType */\nexport type PaymentStatusWithLiterals =\n  | PaymentStatus\n  | 'UNDEFINED'\n  | 'PAID'\n  | 'REFUNDED'\n  | 'FAILED'\n  | 'UNPAID'\n  | 'PENDING'\n  | 'NOT_APPLICABLE';\n\nexport interface PausePeriod {\n  /** Status of the pause period. */\n  status?: StatusWithLiterals;\n  /** Start date and time of the pause period. */\n  pauseDate?: Date | null;\n  /**\n   * End date and time of the pause period.\n   *\n   * Omitted while the pause period remains `ACTIVE`.\n   */\n  resumeDate?: Date | null;\n}\n\nexport enum Status {\n  /** Undefined status. */\n  UNDEFINED = 'UNDEFINED',\n  /** Status while the order is paused. */\n  ACTIVE = 'ACTIVE',\n  /** Status when the order is resumed. */\n  ENDED = 'ENDED',\n}\n\n/** @enumType */\nexport type StatusWithLiterals = Status | 'UNDEFINED' | 'ACTIVE' | 'ENDED';\n\n/**\n * Current cycle will be empty when order is cancelled, expired or order start date is in the future\n * Current cycle start and end dates take into account free trial days and suspensions\n */\nexport interface CurrentCycle {\n  /**\n   * Index of the current payment cycle in the order.\n   *\n   * `0` when order is in a free trial period. In all other cases, the index starts with `1`.\n   */\n  index?: number;\n  /** Start date and time for the current payment cycle. */\n  startedDate?: Date | null;\n  /** End date and time for the current payment cycle. */\n  endedDate?: Date | null;\n}\n\n/** Order cycle start and end dates take into account free trial days and suspensions */\nexport interface OrderCycle {\n  /**\n   * Index of this cycle in the order.\n   *\n   * `0` when order is in a free trial period. In all other cases, the index starts with `1`.\n   */\n  index?: number;\n  /** Start date and time for this order cycle. */\n  startedDate?: Date | null;\n  /** End date and time for this order cycle. */\n  endedDate?: Date | null;\n}\n\nexport interface FormData {\n  /**\n   * ID of the [order form](https://dev.wix.com/docs/rest/api-reference/wix-forms/form-submissions/introduction) associated with the plan at checkout.\n   * @format GUID\n   */\n  formId?: string | null;\n  /**\n   * ID of a submission to the plan's order form at checkout. Every time a visitor completes the checkout process for a plan, a new submission is created.\n   * @format GUID\n   */\n  submissionId?: string | null;\n  /**\n   * Data submitted to the plan's order form at checkout.\n   * @readonly\n   */\n  submissionData?: Record<string, any>;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n  createdEvent?: EntityCreatedEvent;\n  updatedEvent?: EntityUpdatedEvent;\n  deletedEvent?: EntityDeletedEvent;\n  actionEvent?: ActionEvent;\n  /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n  _id?: string;\n  /**\n   * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n   * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n   */\n  entityFqdn?: string;\n  /**\n   * Event action name, placed at the top level to make it easier for users to dispatch messages.\n   * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n   */\n  slug?: string;\n  /** ID of the entity associated with the event. */\n  entityId?: string;\n  /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n  eventTime?: Date | null;\n  /**\n   * Whether the event was triggered as a result of a privacy regulation application\n   * (for example, GDPR).\n   */\n  triggeredByAnonymizeRequest?: boolean | null;\n  /** If present, indicates the action that triggered the event. */\n  originatedFrom?: string | null;\n  /**\n   * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n   * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n   */\n  entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n  createdEvent?: EntityCreatedEvent;\n  updatedEvent?: EntityUpdatedEvent;\n  deletedEvent?: EntityDeletedEvent;\n  actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n  entity?: string;\n}\n\nexport interface RestoreInfo {\n  deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n  /**\n   * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n   * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n   * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n   */\n  currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n  /** Entity that was deleted. */\n  deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n  body?: string;\n}\n\nexport interface Empty {}\n\nexport interface MemberGetOrderRequest {\n  /**\n   * Order ID.\n   * @format GUID\n   */\n  _id: string;\n  /**\n   * Predefined set of fields to return.\n   *\n   * Default: If `fieldSet` is omitted, no order form submission data is returned.\n   */\n  fieldSet?: SetWithLiterals;\n}\n\nexport enum Set {\n  /** Same behavior as `BASIC`.` */\n  UNKNOWN_SET = 'UNKNOWN_SET',\n  /** Doesn't return any order form submission data. */\n  BASIC = 'BASIC',\n  /** Returns all order form submission data. */\n  FULL = 'FULL',\n}\n\n/** @enumType */\nexport type SetWithLiterals = Set | 'UNKNOWN_SET' | 'BASIC' | 'FULL';\n\nexport interface MemberGetOrderResponse {\n  /** Requested order. */\n  order?: Order;\n}\n\nexport interface MemberListOrdersRequest {\n  /**\n   * Filter by plan IDs.\n   * @format GUID\n   */\n  planIds?: string[];\n  /** Filter for orders where auto renewal was canceled. */\n  autoRenewCanceled?: boolean | null;\n  /** Filter by order status. */\n  orderStatuses?: OrderStatusWithLiterals[];\n  /** Filter by payment status. */\n  paymentStatuses?: PaymentStatusWithLiterals[];\n  /**\n   * Limit the number of pricing plans returned. Default limit is 50.\n   * @min 1\n   * @max 50\n   */\n  limit?: number | null;\n  /** Number of entries to offset. */\n  offset?: number | null;\n  /** Sorting direction (defaults to ASC) and field to sort by. */\n  sorting?: Sorting;\n  /**\n   * Predefined set of fields to return.\n   *\n   * Default: If `fieldSet` is omitted, no order form submission data is returned.\n   */\n  fieldSet?: SetWithLiterals;\n}\n\nexport interface Sorting {\n  /**\n   * Name of the field to sort by.\n   * @maxLength 512\n   */\n  fieldName?: string;\n  /** Sort order. */\n  order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n  ASC = 'ASC',\n  DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface MemberListOrdersResponse {\n  /** Requested orders. */\n  orders?: Order[];\n  /** Object containing paging-related data (number of orders returned, offset). */\n  pagingMetadata?: PagingMetadataV2;\n}\n\nexport interface PagingMetadataV2 {\n  /** Number of items returned in the response. */\n  count?: number | null;\n  /** Offset that was requested. */\n  offset?: number | null;\n  /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */\n  total?: number | null;\n  /** Flag that indicates the server failed to calculate the `total` field. */\n  tooManyToCount?: boolean | null;\n  /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */\n  cursors?: Cursors;\n}\n\nexport interface Cursors {\n  /**\n   * Cursor string pointing to the next page in the list of results.\n   * @maxLength 16000\n   */\n  next?: string | null;\n  /**\n   * Cursor pointing to the previous page in the list of results.\n   * @maxLength 16000\n   */\n  prev?: string | null;\n}\n\n/**\n * TODO: Write orders filter and sort docs page\n * Retrieves a list of up to 1,000 orders, based on the provided paging, sorting, and filtering.\n */\nexport interface QueryOrdersRequest {\n  /** Query filter. */\n  query?: QueryV2;\n}\n\nexport interface QueryV2 extends QueryV2PagingMethodOneOf {\n  /** Paging options to limit and offset the number of items. */\n  paging?: Paging;\n  /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n  cursorPaging?: CursorPaging;\n  /**\n   * Filter object.\n   *\n   * Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters).\n   */\n  filter?: Record<string, any> | null;\n  /**\n   * Sort object.\n   *\n   * Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting).\n   */\n  sort?: Sorting[];\n  /** Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned. */\n  fields?: string[];\n  /** Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned. */\n  fieldsets?: string[];\n}\n\n/** @oneof */\nexport interface QueryV2PagingMethodOneOf {\n  /** Paging options to limit and offset the number of items. */\n  paging?: Paging;\n  /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n  cursorPaging?: CursorPaging;\n}\n\nexport interface Paging {\n  /** Number of items to load. */\n  limit?: number | null;\n  /** Number of items to skip in the current sort order. */\n  offset?: number | null;\n}\n\nexport interface CursorPaging {\n  /**\n   * Maximum number of items to return in the results.\n   * @max 100\n   */\n  limit?: number | null;\n  /**\n   * Pointer to the next or previous page in the list of results.\n   *\n   * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n   * Not relevant for the first request.\n   * @maxLength 16000\n   */\n  cursor?: string | null;\n}\n\nexport interface QueryOrdersResponse {\n  /** Order data. */\n  plans?: Order[];\n  /** Paging-related data (number of orders returned, offset). */\n  pagingMetadata?: PagingMetadataV2;\n}\n\nexport interface RequestCancellationRequest {\n  /**\n   * Order ID.\n   * @format GUID\n   */\n  _id: string;\n  /** Required. Whether to cancel the order effective immediately or at the next payment date. One-time orders can only be canceled immediately. */\n  effectiveAt: CancellationEffectiveAtWithLiterals;\n}\n\nexport interface RequestCancellationResponse {}\n\n/**\n * Emitted when an order is canceled immediately or when cycle ends for an order with canceled auto renewal\n *\n * To determine the specific reason of the cancellation check `order.cancellation.cause` field.\n */\nexport interface OrderCanceled {\n  /** Canceled order. */\n  order?: Order;\n}\n\nexport interface MessageEnvelope {\n  /**\n   * App instance ID.\n   * @format GUID\n   */\n  instanceId?: string | null;\n  /**\n   * Event type.\n   * @maxLength 150\n   */\n  eventType?: string;\n  /** The identification type and identity data. */\n  identity?: IdentificationData;\n  /** Stringify payload. */\n  data?: string;\n  /** Details related to the account */\n  accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n  /**\n   * ID of a site visitor that has not logged in to the site.\n   * @format GUID\n   */\n  anonymousVisitorId?: string;\n  /**\n   * ID of a site visitor that has logged in to the site.\n   * @format GUID\n   */\n  memberId?: string;\n  /**\n   * ID of a Wix user (site owner, contributor, etc.).\n   * @format GUID\n   */\n  wixUserId?: string;\n  /**\n   * ID of an app.\n   * @format GUID\n   */\n  appId?: string;\n  /** @readonly */\n  identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n  /**\n   * ID of a site visitor that has not logged in to the site.\n   * @format GUID\n   */\n  anonymousVisitorId?: string;\n  /**\n   * ID of a site visitor that has logged in to the site.\n   * @format GUID\n   */\n  memberId?: string;\n  /**\n   * ID of a Wix user (site owner, contributor, etc.).\n   * @format GUID\n   */\n  wixUserId?: string;\n  /**\n   * ID of an app.\n   * @format GUID\n   */\n  appId?: string;\n}\n\nexport enum WebhookIdentityType {\n  UNKNOWN = 'UNKNOWN',\n  ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n  MEMBER = 'MEMBER',\n  WIX_USER = 'WIX_USER',\n  APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n  | WebhookIdentityType\n  | 'UNKNOWN'\n  | 'ANONYMOUS_VISITOR'\n  | 'MEMBER'\n  | 'WIX_USER'\n  | 'APP';\n\nexport interface AccountInfo {\n  /**\n   * ID of the Wix account associated with the event.\n   * @format GUID\n   */\n  accountId?: string | null;\n  /**\n   * ID of the parent Wix account. Only included when accountId belongs to a child account.\n   * @format GUID\n   */\n  parentAccountId?: string | null;\n  /**\n   * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n   * @format GUID\n   */\n  siteId?: string | null;\n}\n\nexport interface CreateOnlineOrderRequest {\n  /**\n   * Plan ID.\n   * @format GUID\n   */\n  planId: string;\n  /**\n   * Start date and time for the plan of the online order in a `YYYY-MM-DDThh:mm[:ss][.sss]Z` format.\n   *\n   * Default: Current date and time.\n   */\n  startDate?: Date | null;\n  /**\n   * Coupon code to apply.\n   * @minLength 1\n   * @maxLength 20\n   */\n  couponCode?: string | null;\n  /** Provided if checkout is initiated on buyer's behalf. */\n  onBehalf?: OnBehalf;\n  /**\n   * Submission ID of the form submitted with this order.\n   * @format GUID\n   */\n  submissionId?: string | null;\n}\n\nexport interface OnBehalf {\n  /**\n   * Member ID.\n   * @format GUID\n   */\n  memberId?: string;\n  /** Method by which checkout is initiated. */\n  orderMethod?: OrderMethodWithLiterals;\n}\n\nexport interface CreateOnlineOrderResponse {\n  /** Created online order. */\n  order?: Order;\n}\n\nexport interface CouponsError {\n  /** Coupon code. */\n  couponCode?: string;\n  /** Plan ID. */\n  planId?: string;\n}\n\nexport interface CreateGuestOnlineOrderRequest {\n  /**\n   * Plan ID.\n   * @format GUID\n   */\n  planId?: string;\n  /**\n   * Start date for the ordered plan.\n   *\n   * Default: Current date\n   */\n  startDate?: Date | null;\n  /**\n   * Coupon code to apply.\n   * @minLength 1\n   * @maxLength 20\n   */\n  couponCode?: string | null;\n  /** Captcha data to prove you are not a robot */\n  captcha?: Captcha;\n  /** Visitor info */\n  guest?: Guest;\n  /**\n   * Form submission id that was submitted together with the order\n   * @format GUID\n   */\n  submissionId?: string | null;\n}\n\nexport interface Captcha {\n  /** Token from captcha */\n  token?: string;\n}\n\nexport interface Guest {\n  /**\n   * Email for checkout\n   * @format EMAIL\n   */\n  email?: string;\n}\n\nexport interface CreateGuestOnlineOrderResponse {\n  /** Order. */\n  order?: Order;\n}\n\nexport interface CreateOfflineOrderRequest {\n  /**\n   * ID of the plan being ordered, from the Plans API.\n   * @format GUID\n   */\n  planId: string;\n  /**\n   * ID of the member ordering the plan, from the Members API.\n   * @format GUID\n   */\n  memberId: string;\n  /**\n   * Start date and time for the ordered plan in a `YYYY-MM-DDThh:mm[:ss][.sss]Z` format.\n   *\n   * Default: Current date and time.\n   */\n  startDate?: Date | null;\n  /**\n   * Whether the order is paid.\n   *\n   * Default: `false`\n   */\n  paid?: boolean | null;\n  /**\n   * Coupon code to apply, from the Coupons API.\n   * @minLength 1\n   * @maxLength 20\n   */\n  couponCode?: string | null;\n  /**\n   * Form submission ID that was submitted with the order.\n   * @format GUID\n   */\n  submissionId?: string | null;\n}\n\nexport interface CreateOfflineOrderResponse {\n  /** Order. */\n  order?: Order;\n}\n\nexport interface CreateExternalOrderRequest {\n  /**\n   * Plan ID.\n   * @format GUID\n   */\n  planId?: string;\n  /**\n   * Form submission id that was submitted together with the order\n   * @format GUID\n   */\n  submissionId?: string | null;\n}\n\nexport interface CreateExternalOrderResponse {\n  /** Created order */\n  order?: Order;\n}\n\nexport interface GetOnlineOrderPreviewRequest {\n  /**\n   * Plan ID.\n   * @format GUID\n   */\n  planId: string;\n  /**\n   * Start date and time for the plan of the order preview in a `YYYY-MM-DDThh:mm[:ss][.sss]Z` format.\n   *\n   * Default: Current date and time.\n   */\n  startDate?: Date | null;\n  /**\n   * Coupon code to apply.\n   * @minLength 1\n   * @maxLength 20\n   */\n  couponCode?: string | null;\n}\n\nexport interface GetOnlineOrderPreviewResponse {\n  /** Order preview. This field is undefined if the member has already reached the purchase limit for the order's plan. */\n  order?: Order;\n  /** Whether the member has already reached purchase limit for the order's plan. */\n  purchaseLimitExceeded?: boolean;\n}\n\nexport interface GetGuestOnlineOrderPreviewRequest {\n  /**\n   * Plan ID.\n   * @format GUID\n   */\n  planId?: string;\n  /**\n   * Start date for the ordered plan.\n   *\n   * Default: Current date\n   */\n  startDate?: Date | null;\n  /**\n   * Coupon code to apply.\n   * @minLength 1\n   * @maxLength 20\n   */\n  couponCode?: string | null;\n  /**\n   * Email for checkout\n   * @format EMAIL\n   */\n  email?: string;\n}\n\nexport interface GetGuestOnlineOrderPreviewResponse {\n  /** Will be missing if limit is exceeded */\n  order?: Order;\n  /**\n   * Whether the purchase limit has already been reached for this plan by this email.\n   * Always false for plans without purchase limits.\n   */\n  purchaseLimitExceeded?: boolean;\n}\n\nexport interface GetOfflineOrderPreviewRequest {\n  /**\n   * ID of the plan of the previewed order, from the Plans API.\n   * @format GUID\n   */\n  planId: string;\n  /**\n   * Member ID of the buyer the previewed order is for, from the Members API.\n   * @format GUID\n   */\n  memberId: string;\n  /**\n   * Start date and time for plan of the previewed order in a `YYYY-MM-DDThh:mm[:ss][.sss]Z` format.\n   *\n   * Default: Current date and time.\n   */\n  startDate?: Date | null;\n  /**\n   * Coupon code to apply, from the Coupons API.\n   * @minLength 1\n   * @maxLength 20\n   */\n  couponCode?: string | null;\n}\n\nexport interface GetOfflineOrderPreviewResponse {\n  /** The previewed order, as if the plan had been ordered. */\n  order?: Order;\n  /**\n   * Whether this previewed order would exceed the permitted amount of purchases available\n   * for this plan for this buyer.\n   *\n   * Always `false` for plans that do not have purchase limits.\n   */\n  purchaseLimitExceeded?: boolean;\n}\n\nexport interface GetPricePreviewRequest {\n  /**\n   * ID of plan to preview.\n   * @format GUID\n   */\n  planId: string;\n  /**\n   * Coupon code to apply, from the Coupons API.\n   * @minLength 1\n   * @maxLength 20\n   */\n  couponCode?: string | null;\n}\n\nexport interface GetPricePreviewResponse {\n  /**\n   * @internal\n   * @internal\n   * @deprecated __Deprecated.__ Use `prices` instead. This property will be removed on September 30, 2022.\n   * @replacedBy prices\n   * @targetRemovalDate 2022-10-01\n   */\n  price?: PriceDetails;\n  /** Pricing details. */\n  prices?: SpannedPrice[];\n}\n\nexport interface ChangeStartDateRequest {\n  /**\n   * Draft order ID.\n   * @format GUID\n   */\n  orderId?: string;\n  /** New valid from date (timestamp). */\n  startDate?: Date | null;\n}\n\nexport interface ChangeStartDateResponse {\n  /** Updated draft order. */\n  order?: Order;\n}\n\nexport interface OrderStartDateChanged {\n  /** Order whose `startDate` changed. */\n  order?: Order;\n}\n\nexport interface ApplyCouponRequest {\n  /**\n   * Draft order ID.\n   * @format GUID\n   */\n  orderId?: string;\n  /**\n   * Coupon code to apply.\n   * @minLength 1\n   * @maxLength 20\n   */\n  couponCode?: string;\n}\n\nexport interface ApplyCouponResponse {\n  /** Order with applied coupon and recalculated tax. */\n  order?: Order;\n}\n\nexport interface SetSubmissionRequest {\n  /**\n   * Order ID.\n   * @format GUID\n   */\n  orderId?: string;\n  /**\n   * Submission ID.\n   * @format GUID\n   */\n  submissionId?: string;\n}\n\nexport interface SetSubmissionResponse {\n  /** Order with submission id */\n  order?: Order;\n}\n\nexport interface OrderPurchased {\n  /** Order that was paid for. If a free or an offline order, the order that was created. */\n  order?: Order;\n}\n\nexport interface OrderStarted {\n  /** Order that reached its `startDate`. */\n  order?: Order;\n}\n\n/**\n * Triggered at the start of a new payment cycle for an existing order.\n *\n * This webhook does not trigger at the initial start of an offline order.\n */\nexport interface OrderCycleStarted {\n  /** Order whose new cycle started. */\n  order?: Order;\n  /** 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. */\n  cycleNumber?: number;\n}\n\n/** Emitted when a recurring order is canceled for the next payment cycle */\nexport interface OrderAutoRenewCanceled {\n  /** Order that is canceled, effective at the end of the current payment cycle. */\n  order?: Order;\n}\n\nexport interface OrderEnded {\n  /** Order that ended. */\n  order?: Order;\n}\n\nexport interface GetOrderRequest {\n  /**\n   * Order ID.\n   * @format GUID\n   */\n  _id: string;\n  /**\n   * Predefined set of fields to return.\n   *\n   * Default: If `fieldSet` is omitted, no order form submission data is returned.\n   */\n  fieldSet?: SetWithLiterals;\n}\n\nexport interface GetOrderResponse {\n  /** Order. */\n  order?: Order;\n}\n\nexport interface ListOrdersRequest {\n  /**\n   * Filter by a buyer's member ID, from the Members API.\n   * @format GUID\n   */\n  buyerIds?: string[];\n  /**\n   * Filter by plan IDs, from the Plans API.\n   * @format GUID\n   */\n  planIds?: string[];\n  /** Filter by whether or not the auto-renewal of recurring orders was canceled. */\n  autoRenewCanceled?: boolean | null;\n  /** Filter by order status. */\n  orderStatuses?: OrderStatusWithLiterals[];\n  /** Filter by payment status. */\n  paymentStatuses?: PaymentStatusWithLiterals[];\n  /**\n   * Number of orders to return. See Sorting and Paging for more information.\n   *\n   * Max: `50`\n   * @min 1\n   * @max 50\n   */\n  limit?: number | null;\n  /** Number of orders to skip in the current sort order. */\n  offset?: number | null;\n  /**\n   * Sort order.\n   *\n   * Use `ASC` for ascending order or `DESC` for descending order.\n   *\n   * Default: `DESC`.\n   */\n  sorting?: Sorting;\n  /**\n   * Predefined set of fields to return.\n   *\n   * Default: If `fieldSet` is omitted, no order form submission data is returned.\n   */\n  fieldSet?: SetWithLiterals;\n}\n\nexport interface ListOrdersResponse {\n  /** List of orders. */\n  orders?: Order[];\n  /** Object containing paging-related data (number of orders returned, offset). */\n  pagingMetadata?: PagingMetadataV2;\n}\n\nexport interface OrdersQueryOrdersRequest {\n  /** Query filter. */\n  query?: QueryV2;\n}\n\nexport interface OrdersQueryOrdersResponse {\n  /** Retrieved orders. */\n  plans?: Order[];\n  /** Paging-related data (number of orders returned, offset). */\n  pagingMetadata?: PagingMetadataV2;\n}\n\nexport interface GetOrdersStatsRequest {}\n\nexport interface GetOrdersStatsResponse {\n  /** Total number of orders. */\n  totalOrderCount?: number;\n  /** Number of active orders. */\n  activeOrderCount?: number;\n}\n\nexport interface GetAvailableOrderActionsRequest {\n  /**\n   * Order ID.\n   * @format GUID\n   */\n  _id?: string;\n}\n\nexport interface GetAvailableOrderActionsResponse {\n  /** Whether the order can be suspended. */\n  suspendable?: boolean;\n  /** If the order cannot be suspended, a reason is returned here. */\n  notSuspendableReason?: ReasonNotSuspendableWithLiterals;\n  /** Whether the order can be canceled by the buyer. */\n  cancelableByBuyer?: boolean;\n}\n\nexport enum ReasonNotSuspendable {\n  /** Undefined reason. */\n  UNDEFINED = 'UNDEFINED',\n  /** Saved in the database but is awaiting payment. Non-active orders can't be suspended. */\n  PENDING = 'PENDING',\n  /** Trial orders can't be suspended. */\n  TRIAL = 'TRIAL',\n  /** Canceled orders can't be suspended. */\n  CANCELED = 'CANCELED',\n  /** Ended orders can't be suspended. */\n  ENDED = 'ENDED',\n  /** Paid for orders with future start dates can't be suspended. */\n  NOT_STARTED = 'NOT_STARTED',\n  /** Order is already suspended. */\n  ALREADY_SUSPENDED = 'ALREADY_SUSPENDED',\n  /** Orders based on recurring payments using older stripe versions can't be suspended. */\n  OLD_STRIPE = 'OLD_STRIPE',\n}\n\n/** @enumType */\nexport type ReasonNotSuspendableWithLiterals =\n  | ReasonNotSuspendable\n  | 'UNDEFINED'\n  | 'PENDING'\n  | 'TRIAL'\n  | 'CANCELED'\n  | 'ENDED'\n  | 'NOT_STARTED'\n  | 'ALREADY_SUSPENDED'\n  | 'OLD_STRIPE';\n\nexport interface PostponeEndDateRequest {\n  /**\n   * Order ID.\n   * @format GUID\n   */\n  _id: string;\n  /**\n   * New end date and time.\n   *\n   * Must be later than the current end date and time.\n   */\n  endDate: Date | null;\n}\n\nexport interface PostponeEndDateResponse {}\n\nexport interface OrderEndDatePostponed {\n  /** Order whose `endDate` was postponed. */\n  order?: Order;\n}\n\nexport interface CancelOrderRequest {\n  /**\n   * Order ID.\n   * @format GUID\n   */\n  _id: string;\n  /** __Required.__ When the order will be canceled. One-time orders can only be canceled `IMMEDIATELY`. */\n  effectiveAt: CancellationEffectiveAtWithLiterals;\n}\n\nexport interface CancelOrderResponse {}\n\nexport interface MarkAsPaidRequest {\n  /**\n   * Order ID.\n   * @format GUID\n   */\n  _id: string;\n}\n\nexport interface MarkAsPaidResponse {}\n\nexport interface OrderMarkedAsPaid {\n  /** Order that was marked as paid. */\n  order?: Order;\n}\n\nexport interface PauseOrderRequest {\n  /**\n   * Order ID.\n   * @format GUID\n   */\n  _id: string;\n}\n\nexport interface PauseOrderResponse {}\n\nexport interface OrderPaused {\n  /** Paused order. */\n  order?: Order;\n}\n\nexport interface BulkPauseOrderRequest {\n  /**\n   * List of Order IDs.\n   * @format GUID\n   * @minSize 1\n   * @maxSize 100\n   */\n  ids?: string[];\n  /** Set to true to return Order entity in response. */\n  returnFullEntity?: boolean;\n}\n\nexport interface BulkPauseOrderResponse {\n  /** Orders that were paused. */\n  results?: BulkOrderResult[];\n  /** Bulk action metadata. */\n  bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkOrderResult {\n  /** Item metadata */\n  itemMetadata?: ItemMetadata;\n  /** The order. */\n  order?: Order;\n}\n\nexport interface ItemMetadata {\n  /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */\n  _id?: string | null;\n  /** Index of the item within the request array. Allows for correlation between request and response items. */\n  originalIndex?: number;\n  /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */\n  success?: boolean;\n  /** Details about the error in case of failure. */\n  error?: ApplicationError;\n}\n\nexport interface ApplicationError {\n  /** Error code. */\n  code?: string;\n  /** Description of the error. */\n  description?: string;\n  /** Data related to the error. */\n  data?: Record<string, any> | null;\n}\n\nexport interface BulkActionMetadata {\n  /** Number of items that were successfully processed. */\n  totalSuccesses?: number;\n  /** Number of items that couldn't be processed. */\n  totalFailures?: number;\n  /** Number of failures without details because detailed failure threshold was exceeded. */\n  undetailedFailures?: number;\n}\n\nexport interface ResumeOrderRequest {\n  /**\n   * Order ID.\n   * @format GUID\n   */\n  _id: string;\n}\n\nexport interface ResumeOrderResponse {}\n\nexport interface OrderResumed {\n  /** Resumed order. */\n  order?: Order;\n}\n\nexport interface BulkResumeOrderRequest {\n  /**\n   * List of Order IDs.\n   * @format GUID\n   * @minSize 1\n   * @maxSize 100\n   */\n  ids?: string[];\n  /** Set to true to return Order entity in response. */\n  returnFullEntity?: boolean;\n}\n\nexport interface BulkResumeOrderResponse {\n  /** Orders that were resumed. */\n  results?: BulkOrderResult[];\n  /** Bulk action metadata. */\n  bulkActionMetadata?: BulkActionMetadata;\n}\n\n/** @docsIgnore */\nexport type CreateOnlineOrderApplicationErrors =\n  | {\n      code?: 'MEMBER_REQUIRED';\n      description?: string;\n      data?: Record<string, any>;\n    }\n  | {\n      code?: 'archived_plan';\n      description?: string;\n      data?: Record<string, any>;\n    }\n  | {\n      code?: 'member_not_found';\n      description?: string;\n      data?: Record<string, any>;\n    }\n  | {\n      code?: 'purchases_limit_reached';\n      description?: string;\n      data?: Record<string, any>;\n    }\n  | {\n      code?: 'buyer_can_not_pick_future_start_date';\n      description?: string;\n      data?: Record<string, any>;\n    }\n  | {\n      code?: 'invalid_start_date';\n      description?: string;\n      data?: Record<string, any>;\n    }\n  | {\n      code?: 'accept_payment_feature_missing';\n      description?: string;\n      data?: Record<string, any>;\n    }\n  | {\n      code?: 'meta_site_id_missing';\n      description?: string;\n      data?: Record<string, any>;\n    }\n  | {\n      code?: 'ERROR_COUPON_IS_DISABLED';\n      description?: string;\n      data?: CouponsError;\n    }\n  | {\n      code?: 'ERROR_COUPON_USAGE_EXCEEDED';\n      description?: string;\n      data?: CouponsError;\n    }\n  | {\n      code?: 'ERROR_COUPON_LIMIT_PER_CUSTOMER_EXCEEDED';\n      description?: string;\n      data?: CouponsError;\n    }\n  | {\n      code?: 'ERROR_COUPON_IS_NOT_ACTIVE_YET';\n      description?: string;\n      data?: CouponsError;\n    }\n  | {\n      code?: 'ERROR_COUPON_HAS_EXPIRED';\n      description?: string;\n      data?: CouponsError;\n    }\n  | {\n      code?: 'ERROR_COUPON_DOES_NOT_EXIST';\n      description?: string;\n      data?: CouponsError;\n    }\n  | {\n      code?: 'ERROR_COUPON_NOT_APPLICABLE_FOR_PLAN';\n      description?: string;\n      data?: CouponsError;\n    }\n  | {\n      code?: 'ERROR_INVALID_SUBTOTAL';\n      description?: string;\n      data?: CouponsError;\n    }\n  | {\n      code?: 'undefined_not_allowed';\n      description?: string;\n      data?: Record<string, any>;\n    }\n  | {\n      code?: 'MISSING_BUSINESS_ADDRESS_COUNTRY';\n      description?: string;\n      data?: Record<string, any>;\n    }\n  | {\n      code?: 'MISSING_BUSINESS_ADDRESS_STATE';\n      description?: string;\n      data?: Record<string, any>;\n    };\n/** @docsIgnore */\nexport type CreateOnlineOrderValidationErrors =\n  | {\n      ruleName?: 'UNKNOWN_ORDER_METHOD';\n    }\n  | {\n      ruleName?: 'RECURRING_POS_UNSUPPORTED';\n    }\n  | {\n      ruleName?: 'invalid_sort_field';\n    };\n/** @docsIgnore */\nexport type CreateOfflineOrderApplicationErrors =\n  | {\n      code?: 'PRICING_PLANS_NOT_INSTALLED';\n      description?: string;\n      data?: Record<string, any>;\n    }\n  | {\n      code?: 'meta_site_id_missing';\n      description?: string;\n      data?: Record<string, any>;\n    }\n  | {\n      code?: 'ERROR_COUPON_IS_DISABLED';\n      description?: string;\n      data?: CouponsError;\n    }\n  | {\n      code?: 'ERROR_COUPON_USAGE_EXCEEDED';\n      description?: string;\n      data?: CouponsError;\n    }\n  | {\n      code?: 'ERROR_COUPON_LIMIT_PER_CUSTOMER_EXCEEDED';\n      description?: string;\n      data?: CouponsError;\n    }\n  | {\n      code?: 'ERROR_COUPON_IS_NOT_ACTIVE_YET';\n      description?: string;\n      data?: CouponsError;\n    }\n  | {\n      code?: 'ERROR_COUPON_HAS_EXPIRED';\n      description?: string;\n      data?: CouponsError;\n    }\n  | {\n      code?: 'ERROR_COUPON_DOES_NOT_EXIST';\n      description?: string;\n      data?: CouponsError;\n    }\n  | {\n      code?: 'ERROR_COUPON_NOT_APPLICABLE_FOR_PLAN';\n      description?: string;\n      data?: CouponsError;\n    }\n  | {\n      code?: 'ERROR_INVALID_SUBTOTAL';\n      description?: string;\n      data?: CouponsError;\n    }\n  | {\n      code?: 'undefined_not_allowed';\n      description?: string;\n      data?: Record<string, any>;\n    }\n  | {\n      code?: 'MISSING_BUSINESS_ADDRESS_COUNTRY';\n      description?: string;\n      data?: Record<string, any>;\n    }\n  | {\n      code?: 'MISSING_BUSINESS_ADDRESS_STATE';\n      description?: string;\n      data?: Record<string, any>;\n    };\n/** @docsIgnore */\nexport type CreateOfflineOrderValidationErrors =\n  | {\n      ruleName?: 'MEMBER_DOESNT_EXIST';\n    }\n  | {\n      ruleName?: 'invalid_sort_field';\n    };\n/** @docsIgnore */\nexport type GetOnlineOrderPreviewApplicationErrors =\n  | {\n      code?: 'PRICING_PLANS_NOT_INSTALLED';\n      description?: string;\n      data?: Record<string, any>;\n    }\n  | {\n      code?: 'ERROR_COUPON_IS_DISABLED';\n      description?: string;\n      data?: CouponsError;\n    }\n  | {\n      code?: 'ERROR_COUPON_USAGE_EXCEEDED';\n      description?: string;\n      data?: CouponsError;\n    }\n  | {\n      code?: 'ERROR_COUPON_LIMIT_PER_CUSTOMER_EXCEEDED';\n      description?: string;\n      data?: CouponsError;\n    }\n  | {\n      code?: 'ERROR_COUPON_IS_NOT_ACTIVE_YET';\n      description?: string;\n      data?: CouponsError;\n    }\n  | {\n      code?: 'ERROR_COUPON_HAS_EXPIRED';\n      description?: string;\n      data?: CouponsError;\n    }\n  | {\n      code?: 'ERROR_COUPON_DOES_NOT_EXIST';\n      description?: string;\n      data?: CouponsError;\n    }\n  | {\n      code?: 'ERROR_COUPON_NOT_APPLICABLE_FOR_PLAN';\n      description?: string;\n      data?: CouponsError;\n    }\n  | {\n      code?: 'ERROR_INVALID_SUBTOTAL';\n      description?: string;\n      data?: CouponsError;\n    }\n  | {\n      code?: 'undefined_not_allowed';\n      description?: string;\n      data?: Record<string, any>;\n    }\n  | {\n      code?: 'MISSING_BUSINESS_ADDRESS_COUNTRY';\n      description?: string;\n      data?: Record<string, any>;\n    }\n  | {\n      code?: 'MISSING_BUSINESS_ADDRESS_STATE';\n      description?: string;\n      data?: Record<string, any>;\n    };\n/** @docsIgnore */\nexport type GetOnlineOrderPreviewValidationErrors = {\n  ruleName?: 'invalid_sort_field';\n};\n/** @docsIgnore */\nexport type GetOfflineOrderPreviewApplicationErrors =\n  | {\n      code?: 'PRICING_PLANS_NOT_INSTALLED';\n      description?: string;\n      data?: Record<string, any>;\n    }\n  | {\n      code?: 'ERROR_COUPON_IS_DISABLED';\n      description?: string;\n      data?: CouponsError;\n    }\n  | {\n      code?: 'ERROR_COUPON_USAGE_EXCEEDED';\n      description?: string;\n      data?: CouponsError;\n    }\n  | {\n      code?: 'ERROR_COUPON_LIMIT_PER_CUSTOMER_EXCEEDED';\n      description?: string;\n      data?: CouponsError;\n    }\n  | {\n      code?: 'ERROR_COUPON_IS_NOT_ACTIVE_YET';\n      description?: string;\n      data?: CouponsError;\n    }\n  | {\n      code?: 'ERROR_COUPON_HAS_EXPIRED';\n      description?: string;\n      data?: CouponsError;\n    }\n  | {\n      code?: 'ERROR_COUPON_DOES_NOT_EXIST';\n      description?: string;\n      data?: CouponsError;\n    }\n  | {\n      code?: 'ERROR_COUPON_NOT_APPLICABLE_FOR_PLAN';\n      description?: string;\n      data?: CouponsError;\n    }\n  | {\n      code?: 'ERROR_INVALID_SUBTOTAL';\n      description?: string;\n      data?: CouponsError;\n    }\n  | {\n      code?: 'undefined_not_allowed';\n      description?: string;\n      data?: Record<string, any>;\n    }\n  | {\n      code?: 'MISSING_BUSINESS_ADDRESS_COUNTRY';\n      description?: string;\n      data?: Record<string, any>;\n    }\n  | {\n      code?: 'MISSING_BUSINESS_ADDRESS_STATE';\n      description?: string;\n      data?: Record<string, any>;\n    };\n/** @docsIgnore */\nexport type GetOfflineOrderPreviewValidationErrors = {\n  ruleName?: 'invalid_sort_field';\n};\n/** @docsIgnore */\nexport type GetPricePreviewApplicationErrors =\n  | {\n      code?: 'ERROR_COUPON_IS_DISABLED';\n      description?: string;\n      data?: CouponsError;\n    }\n  | {\n      code?: 'ERROR_COUPON_USAGE_EXCEEDED';\n      description?: string;\n      data?: CouponsError;\n    }\n  | {\n      code?: 'ERROR_COUPON_LIMIT_PER_CUSTOMER_EXCEEDED';\n      description?: string;\n      data?: CouponsError;\n    }\n  | {\n      code?: 'ERROR_COUPON_IS_NOT_ACTIVE_YET';\n      description?: string;\n      data?: CouponsError;\n    }\n  | {\n      code?: 'ERROR_COUPON_HAS_EXPIRED';\n      description?: string;\n      data?: CouponsError;\n    }\n  | {\n      code?: 'ERROR_COUPON_DOES_NOT_EXIST';\n      description?: string;\n      data?: CouponsError;\n    }\n  | {\n      code?: 'ERROR_COUPON_NOT_APPLICABLE_FOR_PLAN';\n      description?: string;\n      data?: CouponsError;\n    }\n  | {\n      code?: 'ERROR_INVALID_SUBTOTAL';\n      description?: string;\n      data?: CouponsError;\n    }\n  | {\n      code?: 'MISSING_BUSINESS_ADDRESS_COUNTRY';\n      description?: string;\n      data?: Record<string, any>;\n    }\n  | {\n      code?: 'MISSING_BUSINESS_ADDRESS_STATE';\n      description?: string;\n      data?: Record<string, any>;\n    };\n\nexport interface BaseEventMetadata {\n  /**\n   * App instance ID.\n   * @format GUID\n   */\n  instanceId?: string | null;\n  /**\n   * Event type.\n   * @maxLength 150\n   */\n  eventType?: string;\n  /** The identification type and identity data. */\n  identity?: IdentificationData;\n  /** Details related to the account */\n  accountInfo?: AccountInfo;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n  /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n  _id?: string;\n  /**\n   * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n   * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n   */\n  entityFqdn?: string;\n  /**\n   * Event action name, placed at the top level to make it easier for users to dispatch messages.\n   * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n   */\n  slug?: string;\n  /** ID of the entity associated with the event. */\n  entityId?: string;\n  /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n  eventTime?: Date | null;\n  /**\n   * Whether the event was triggered as a result of a privacy regulation application\n   * (for example, GDPR).\n   */\n  triggeredByAnonymizeRequest?: boolean | null;\n  /** If present, indicates the action that triggered the event. */\n  originatedFrom?: string | null;\n  /**\n   * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n   * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n   */\n  entityEventSequence?: string | null;\n  accountInfo?: AccountInfoMetadata;\n}\n\nexport interface AccountInfoMetadata {\n  /** ID of the Wix account associated with the event */\n  accountId: string;\n  /** ID of the Wix site associated with the event. Only included when the event is tied to a specific site. */\n  siteId?: string;\n  /** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */\n  parentAccountId?: string;\n}\n\nexport interface OrderCanceledEnvelope {\n  data: OrderCanceled;\n  metadata: EventMetadata;\n}\n\n/**\n * Triggered when an order is canceled.\n *\n * This webhook is triggered either immediately or at the end of the current payment cycle, as follows:\n * + If the order is canceled and `effectiveAt` is set to `IMMEDIATELY`, the webhook is triggered immediately when canceled.\n * + 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.\n * @permissionScope Manage Orders\n * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS\n * @permissionScope Read Orders\n * @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS\n * @permissionScope Manage plans and orders of Pricing Plans\n * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS-AND-ORDERS\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionId PRICING_PLANS.READ_ORDERS\n * @webhook\n * @eventType wix.pricing_plans.v2.order_canceled\n * @serviceIdentifier com.wixpress.membership.v2.orders.member.MemberOrdersService\n * @slug canceled\n */\nexport declare function onOrderCanceled(\n  handler: (event: OrderCanceledEnvelope) => void | Promise<void>\n): void;\n\nexport interface OrderCreatedEnvelope {\n  entity: Order;\n  metadata: EventMetadata;\n}\n\n/**\n * Triggered when an order is created.\n * @permissionScope Manage Orders\n * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS\n * @permissionScope Read Orders\n * @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS\n * @permissionScope Manage plans and orders of Pricing Plans\n * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS-AND-ORDERS\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionId PRICING_PLANS.READ_ORDERS\n * @webhook\n * @eventType wix.pricing_plans.v2.order_created\n * @serviceIdentifier com.wixpress.membership.v2.orders.CheckoutService\n * @slug created\n */\nexport declare function onOrderCreated(\n  handler: (event: OrderCreatedEnvelope) => void | Promise<void>\n): void;\n\nexport interface OrderStartDateChangedEnvelope {\n  data: OrderStartDateChanged;\n  metadata: EventMetadata;\n}\n\n/**\n * Triggered when an order's `startDate` is changed.\n * @permissionScope Manage Orders\n * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS\n * @permissionScope Read Orders\n * @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS\n * @permissionScope Manage plans and orders of Pricing Plans\n * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS-AND-ORDERS\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionId PRICING_PLANS.READ_ORDERS\n * @webhook\n * @eventType wix.pricing_plans.v2.order_start_date_changed\n * @serviceIdentifier com.wixpress.membership.v2.orders.CheckoutService\n * @slug start_date_changed\n */\nexport declare function onOrderStartDateChanged(\n  handler: (event: OrderStartDateChangedEnvelope) => void | Promise<void>\n): void;\n\nexport interface OrderUpdatedEnvelope {\n  entity: Order;\n  metadata: EventMetadata;\n}\n\n/**\n * Triggered for any of the following update events:\n *\n * + Order is paid for. Order Purchased is also triggered.\n * + Order reaches its start date or end date. Order Started and Order Ended, respectively, are also triggered.\n * + New payment cycle of an order starts. Order Cycle Started is also triggered.\n * + Offline order is marked as paid. Order Marked As Paid is also triggered.\n * + End date of the order is postponed. Order End Date Postponed is also triggered\n * + Order is paused, or a paused order is resumed. Order Paused and Order Resumed, respectively, are also triggered.\n * + Order is canceled, either immediately or at the end of the payment cycle. Order Canceled and Order Auto Renew Canceled, respectively, are also triggered.\n * @permissionScope Manage Orders\n * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS\n * @permissionScope Read Orders\n * @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS\n * @permissionScope Manage plans and orders of Pricing Plans\n * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS-AND-ORDERS\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionId PRICING_PLANS.READ_ORDERS\n * @webhook\n * @eventType wix.pricing_plans.v2.order_updated\n * @serviceIdentifier com.wixpress.membership.v2.orders.CheckoutService\n * @slug updated\n */\nexport declare function onOrderUpdated(\n  handler: (event: OrderUpdatedEnvelope) => void | Promise<void>\n): void;\n\nexport interface OrderAutoRenewCanceledEnvelope {\n  data: OrderAutoRenewCanceled;\n  metadata: EventMetadata;\n}\n\n/**\n * Triggered when an order is canceled and `effectiveAt` is set to `NEXT_PAYMENT_DATE`.\n *\n * This webhook is *not* triggered in the following scenarios:\n * + When an order is canceled and `effectiveAt` is set to `IMMEDIATELY`. Instead, at the time of cancellation, Order Canceled is triggered.\n * + 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.\n * @permissionScope Manage Orders\n * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS\n * @permissionScope Read Orders\n * @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS\n * @permissionScope Manage plans and orders of Pricing Plans\n * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS-AND-ORDERS\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionId PRICING_PLANS.READ_ORDERS\n * @webhook\n * @eventType wix.pricing_plans.v2.order_auto_renew_canceled\n * @serviceIdentifier com.wixpress.membership.v2.orders.OrderManagementService\n * @slug auto_renew_canceled\n */\nexport declare function onOrderAutoRenewCanceled(\n  handler: (event: OrderAutoRenewCanceledEnvelope) => void | Promise<void>\n): void;\n\nexport interface OrderCycleStartedEnvelope {\n  data: OrderCycleStarted;\n  metadata: EventMetadata;\n}\n\n/**\n * Triggered at the start of a new payment cycle for an existing order.\n *\n * Not triggered at the initial start of an offline order.\n * @permissionScope Manage Orders\n * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS\n * @permissionScope Read Orders\n * @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS\n * @permissionScope Manage plans and orders of Pricing Plans\n * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS-AND-ORDERS\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionId PRICING_PLANS.READ_ORDERS\n * @webhook\n * @eventType wix.pricing_plans.v2.order_cycle_started\n * @serviceIdentifier com.wixpress.membership.v2.orders.OrderManagementService\n * @slug cycle_started\n */\nexport declare function onOrderCycleStarted(\n  handler: (event: OrderCycleStartedEnvelope) => void | Promise<void>\n): void;\n\nexport interface OrderEndDatePostponedEnvelope {\n  data: OrderEndDatePostponed;\n  metadata: EventMetadata;\n}\n\n/**\n * Triggered when an order's `endDate` is postponed.\n * @permissionScope Manage Orders\n * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS\n * @permissionScope Read Orders\n * @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS\n * @permissionScope Manage plans and orders of Pricing Plans\n * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS-AND-ORDERS\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionId PRICING_PLANS.READ_ORDERS\n * @webhook\n * @eventType wix.pricing_plans.v2.order_end_date_postponed\n * @serviceIdentifier com.wixpress.membership.v2.orders.OrderManagementService\n * @slug end_date_postponed\n */\nexport declare function onOrderEndDatePostponed(\n  handler: (event: OrderEndDatePostponedEnvelope) => void | Promise<void>\n): void;\n\nexport interface OrderEndedEnvelope {\n  data: OrderEnded;\n  metadata: EventMetadata;\n}\n\n/**\n * Triggered when an order ends.\n *\n * This webhook is triggered:\n * + When an order expires at the end of the current payment cycle.\n * + When an order is canceled and `effectiveAt` is set to `IMMEDIATELY`.\n * @permissionScope Manage Orders\n * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS\n * @permissionScope Read Orders\n * @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS\n * @permissionScope Manage plans and orders of Pricing Plans\n * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS-AND-ORDERS\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionId PRICING_PLANS.READ_ORDERS\n * @webhook\n * @eventType wix.pricing_plans.v2.order_ended\n * @serviceIdentifier com.wixpress.membership.v2.orders.OrderManagementService\n * @slug ended\n */\nexport declare function onOrderEnded(\n  handler: (event: OrderEndedEnvelope) => void | Promise<void>\n): void;\n\nexport interface OrderMarkedAsPaidEnvelope {\n  data: OrderMarkedAsPaid;\n  metadata: EventMetadata;\n}\n\n/**\n * Triggered when an offline order is marked as paid.\n * @permissionScope Manage Orders\n * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS\n * @permissionScope Read Orders\n * @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS\n * @permissionScope Manage plans and orders of Pricing Plans\n * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS-AND-ORDERS\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionId PRICING_PLANS.READ_ORDERS\n * @webhook\n * @eventType wix.pricing_plans.v2.order_marked_as_paid\n * @serviceIdentifier com.wixpress.membership.v2.orders.OrderManagementService\n * @slug marked_as_paid\n */\nexport declare function onOrderMarkedAsPaid(\n  handler: (event: OrderMarkedAsPaidEnvelope) => void | Promise<void>\n): void;\n\nexport interface OrderPausedEnvelope {\n  data: OrderPaused;\n  metadata: EventMetadata;\n}\n\n/**\n * Triggered when an order is paused.\n * @permissionScope Manage Orders\n * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS\n * @permissionScope Read Orders\n * @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS\n * @permissionScope Manage plans and orders of Pricing Plans\n * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS-AND-ORDERS\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionId PRICING_PLANS.READ_ORDERS\n * @webhook\n * @eventType wix.pricing_plans.v2.order_paused\n * @serviceIdentifier com.wixpress.membership.v2.orders.OrderManagementService\n * @slug paused\n */\nexport declare function onOrderPaused(\n  handler: (event: OrderPausedEnvelope) => void | Promise<void>\n): void;\n\nexport interface OrderPurchasedEnvelope {\n  data: OrderPurchased;\n  metadata: EventMetadata;\n}\n\n/**\n * Triggered for any of the following purchase events:\n * + Order is paid in full.\n * + At least 1 order cycle payment is paid for.\n * + Offline order is created, even if not yet marked as paid.\n * + Free order is created.\n * @permissionScope Manage Orders\n * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS\n * @permissionScope Read Orders\n * @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS\n * @permissionScope Manage plans and orders of Pricing Plans\n * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS-AND-ORDERS\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionId PRICING_PLANS.READ_ORDERS\n * @webhook\n * @eventType wix.pricing_plans.v2.order_purchased\n * @serviceIdentifier com.wixpress.membership.v2.orders.OrderManagementService\n * @slug purchased\n */\nexport declare function onOrderPurchased(\n  handler: (event: OrderPurchasedEnvelope) => void | Promise<void>\n): void;\n\nexport interface OrderResumedEnvelope {\n  data: OrderResumed;\n  metadata: EventMetadata;\n}\n\n/**\n * Triggered when a paused order is resumed.\n * @permissionScope Manage Orders\n * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS\n * @permissionScope Read Orders\n * @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS\n * @permissionScope Manage plans and orders of Pricing Plans\n * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS-AND-ORDERS\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionId PRICING_PLANS.READ_ORDERS\n * @webhook\n * @eventType wix.pricing_plans.v2.order_resumed\n * @serviceIdentifier com.wixpress.membership.v2.orders.OrderManagementService\n * @slug resumed\n */\nexport declare function onOrderResumed(\n  handler: (event: OrderResumedEnvelope) => void | Promise<void>\n): void;\n\nexport interface OrderStartedEnvelope {\n  data: OrderStarted;\n  metadata: EventMetadata;\n}\n\n/**\n * Triggered when an order reaches its `startDate`. Applies to both purchased and free orders.\n * @permissionScope Manage Orders\n * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS\n * @permissionScope Read Orders\n * @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS\n * @permissionScope Manage plans and orders of Pricing Plans\n * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-PLANS-AND-ORDERS\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionId PRICING_PLANS.READ_ORDERS\n * @webhook\n * @eventType wix.pricing_plans.v2.order_started\n * @serviceIdentifier com.wixpress.membership.v2.orders.OrderManagementService\n * @slug started\n */\nexport declare function onOrderStarted(\n  handler: (event: OrderStartedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Retrieves an order for the currently logged-in member by ID.\n * @param _id - Order ID.\n * @public\n * @requiredField _id\n * @param options - Options for getting a logged-in member's order.\n * @permissionId PRICING_PLANS.READ_OWN_ORDERS\n * @applicableIdentity APP\n * @applicableIdentity MEMBER\n * @fqn com.wixpress.membership.v2.orders.member.MemberOrdersService.GetOrder\n */\nexport async function memberGetOrder(\n  _id: string,\n  options?: MemberGetOrderOptions\n): Promise<\n  NonNullablePaths<\n    MemberGetOrderResponse,\n    | `order._id`\n    | `order.planId`\n    | `order.subscriptionId`\n    | `order.buyer.memberId`\n    | `order.buyer.contactId`\n    | `order.priceDetails.subscription.cycleDuration.unit`\n    | `order.priceDetails.subtotal`\n    | `order.priceDetails.discount`\n    | `order.priceDetails.tax.name`\n    | `order.priceDetails.tax.includedInPrice`\n    | `order.priceDetails.tax.rate`\n    | `order.priceDetails.tax.amount`\n    | `order.priceDetails.total`\n    | `order.priceDetails.planPrice`\n    | `order.priceDetails.currency`\n    | `order.priceDetails.coupon.code`\n    | `order.priceDetails.coupon.amount`\n    | `order.priceDetails.coupon._id`\n    | `order.pricing.prices`\n    | `order.pricing.prices.${number}.duration.cycleFrom`\n    | `order.pricing.prices.${number}.price.subtotal`\n    | `order.pricing.prices.${number}.price.discount`\n    | `order.pricing.prices.${number}.price.total`\n    | `order.pricing.prices.${number}.price.currency`\n    | `order.pricing.prices.${number}.price.proration`\n    | `order.type`\n    | `order.status`\n    | `order.cancellation.cause`\n    | `order.cancellation.effectiveAt`\n    | `order.lastPaymentStatus`\n    | `order.pausePeriods`\n    | `order.pausePeriods.${number}.status`\n    | `order.currentCycle.index`\n    | `order.planName`\n    | `order.planDescription`\n    | `order.planPrice`,\n    7\n  >\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[2] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    id: _id,\n    fieldSet: options?.fieldSet,\n  });\n\n  const reqOpts = ambassadorWixPricingPlansV2Order.memberGetOrder(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { id: '$[0]', fieldSet: '$[1].fieldSet' },\n        singleArgumentUnchanged: false,\n      },\n      ['_id', 'options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface MemberGetOrderOptions {\n  /**\n   * Predefined set of fields to return.\n   *\n   * Default: If `fieldSet` is omitted, no order form submission data is returned.\n   */\n  fieldSet?: SetWithLiterals;\n}\n\n/**\n * Retrieves a list of up to 100 pricing plan orders for currently logged-in member.\n * @public\n * @param options - Filtering, sorting, and pagination options.\n * @permissionId PRICING_PLANS.READ_OWN_ORDERS\n * @applicableIdentity APP\n * @applicableIdentity MEMBER\n * @fqn com.wixpress.membership.v2.orders.member.MemberOrdersService.ListOrders\n */\nexport async function memberListOrders(\n  options?: MemberListOrdersOptions\n): Promise<\n  NonNullablePaths<\n    MemberListOrdersResponse,\n    | `orders`\n    | `orders.${number}._id`\n    | `orders.${number}.planId`\n    | `orders.${number}.subscriptionId`\n    | `orders.${number}.buyer.memberId`\n    | `orders.${number}.buyer.contactId`\n    | `orders.${number}.priceDetails.singlePaymentForDuration.unit`\n    | `orders.${number}.priceDetails.subtotal`\n    | `orders.${number}.priceDetails.discount`\n    | `orders.${number}.priceDetails.tax.name`\n    | `orders.${number}.priceDetails.tax.includedInPrice`\n    | `orders.${number}.priceDetails.tax.rate`\n    | `orders.${number}.priceDetails.tax.amount`\n    | `orders.${number}.priceDetails.total`\n    | `orders.${number}.priceDetails.planPrice`\n    | `orders.${number}.priceDetails.currency`\n    | `orders.${number}.priceDetails.coupon.code`\n    | `orders.${number}.priceDetails.coupon.amount`\n    | `orders.${number}.priceDetails.coupon._id`\n    | `orders.${number}.type`\n    | `orders.${number}.status`\n    | `orders.${number}.cancellation.cause`\n    | `orders.${number}.cancellation.effectiveAt`\n    | `orders.${number}.lastPaymentStatus`\n    | `orders.${number}.currentCycle.index`\n    | `orders.${number}.planName`\n    | `orders.${number}.planDescription`\n    | `orders.${number}.planPrice`,\n    6\n  >\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    planIds: options?.planIds,\n    autoRenewCanceled: options?.autoRenewCanceled,\n    orderStatuses: options?.orderStatuses,\n    paymentStatuses: options?.paymentStatuses,\n    limit: options?.limit,\n    offset: options?.offset,\n    sorting: options?.sorting,\n    fieldSet: options?.fieldSet,\n  });\n\n  const reqOpts = ambassadorWixPricingPlansV2Order.memberListOrders(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: {\n          planIds: '$[0].planIds',\n          autoRenewCanceled: '$[0].autoRenewCanceled',\n          orderStatuses: '$[0].orderStatuses',\n          paymentStatuses: '$[0].paymentStatuses',\n          limit: '$[0].limit',\n          offset: '$[0].offset',\n          sorting: '$[0].sorting',\n          fieldSet: '$[0].fieldSet',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface MemberListOrdersOptions {\n  /**\n   * Filter by plan IDs.\n   * @format GUID\n   */\n  planIds?: string[];\n  /** Filter for orders where auto renewal was canceled. */\n  autoRenewCanceled?: boolean | null;\n  /** Filter by order status. */\n  orderStatuses?: OrderStatusWithLiterals[];\n  /** Filter by payment status. */\n  paymentStatuses?: PaymentStatusWithLiterals[];\n  /**\n   * Limit the number of pricing plans returned. Default limit is 50.\n   * @min 1\n   * @max 50\n   */\n  limit?: number | null;\n  /** Number of entries to offset. */\n  offset?: number | null;\n  /** Sorting direction (defaults to ASC) and field to sort by. */\n  sorting?: Sorting;\n  /**\n   * Predefined set of fields to return.\n   *\n   * Default: If `fieldSet` is omitted, no order form submission data is returned.\n   */\n  fieldSet?: SetWithLiterals;\n}\n\n/**\n * Cancels an order. Recurring orders can be canceled either immediately or at the next payment date. One time orders can only be canceled immediately.\n *\n * 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.\n *\n * Canceling during the free trial period: When a buyer cancels their order during the free trial period, the buyer's subscription expires at the end of the free trial period and they won't be billed. The buyer may continue using the benefits until the end of the free trial period.\n *\n * >**Note:**\n * >This method requires [visitor or member authentication](https://dev.wix.com/docs/rest/articles/getting-started/access-types-and-permissions).\n * @param _id - Order ID.\n * @param effectiveAt - Required. Whether to cancel the order effective immediately or at the next payment date. One-time orders can only be canceled immediately.\n * @public\n * @requiredField _id\n * @requiredField effectiveAt\n * @param options - Options for requesting a cancellation.\n * @permissionId PRICING_PLANS.MANAGE_OWN_ORDERS\n * @applicableIdentity APP\n * @applicableIdentity MEMBER\n * @fqn com.wixpress.membership.v2.orders.member.MemberOrdersService.RequestCancellation\n */\nexport async function requestCancellation(\n  _id: string,\n  effectiveAt: CancellationEffectiveAtWithLiterals\n): Promise<void> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[2] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    id: _id,\n    effectiveAt: effectiveAt,\n  });\n\n  const reqOpts = ambassadorWixPricingPlansV2Order.requestCancellation(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { id: '$[0]', effectiveAt: '$[1]' },\n        singleArgumentUnchanged: false,\n      },\n      ['_id', 'effectiveAt']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\n/**\n * Creates an online order for a site member.\n *\n * If this method is called by a [site member](https://dev.wix.com/docs/rest/articles/getting-started/about-identities#site-member), the plan is automatically ordered on behalf of that site member. Otherwise, you must specify `onBehalf.memberId` in your call.\n *\n * When an online order is created, but payment hasn't been processed, its status is set to `DRAFT`. After the payment has been processed, if the start date is in the future the order's status is set to `PENDING`. Otherwise, it's set to `ACTIVE`.\n * @param planId - Plan ID.\n * @public\n * @requiredField options.onBehalf.memberId\n * @requiredField planId\n * @fqn com.wixpress.membership.v2.orders.CheckoutService.CreateOnlineOrder\n */\nexport async function createOnlineOrder(\n  planId: string,\n  options?: NonNullablePaths<CreateOnlineOrderOptions, `onBehalf.memberId`, 3>\n): Promise<\n  NonNullablePaths<\n    CreateOnlineOrderResponse,\n    | `order._id`\n    | `order.planId`\n    | `order.subscriptionId`\n    | `order.buyer.memberId`\n    | `order.buyer.contactId`\n    | `order.priceDetails.subscription.cycleDuration.unit`\n    | `order.priceDetails.subtotal`\n    | `order.priceDetails.discount`\n    | `order.priceDetails.tax.name`\n    | `order.priceDetails.tax.includedInPrice`\n    | `order.priceDetails.tax.rate`\n    | `order.priceDetails.tax.amount`\n    | `order.priceDetails.total`\n    | `order.priceDetails.planPrice`\n    | `order.priceDetails.currency`\n    | `order.priceDetails.coupon.code`\n    | `order.priceDetails.coupon.amount`\n    | `order.priceDetails.coupon._id`\n    | `order.pricing.prices`\n    | `order.pricing.prices.${number}.duration.cycleFrom`\n    | `order.pricing.prices.${number}.price.subtotal`\n    | `order.pricing.prices.${number}.price.discount`\n    | `order.pricing.prices.${number}.price.total`\n    | `order.pricing.prices.${number}.price.currency`\n    | `order.pricing.prices.${number}.price.proration`\n    | `order.type`\n    | `order.status`\n    | `order.cancellation.cause`\n    | `order.cancellation.effectiveAt`\n    | `order.lastPaymentStatus`\n    | `order.pausePeriods`\n    | `order.pausePeriods.${number}.status`\n    | `order.currentCycle.index`\n    | `order.planName`\n    | `order.planDescription`\n    | `order.planPrice`,\n    7\n  > & {\n    __applicationErrorsType?: CreateOnlineOrderApplicationErrors;\n    __validationErrorsType?: CreateOnlineOrderValidationErrors;\n  }\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[2] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    planId: planId,\n    startDate: options?.startDate,\n    couponCode: options?.couponCode,\n    onBehalf: options?.onBehalf,\n    submissionId: options?.submissionId,\n  });\n\n  const reqOpts = ambassadorWixPricingPlansV2Order.createOnlineOrder(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: {\n          planId: '$[0]',\n          startDate: '$[1].startDate',\n          couponCode: '$[1].couponCode',\n          onBehalf: '$[1].onBehalf',\n          submissionId: '$[1].submissionId',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['planId', 'options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface CreateOnlineOrderOptions {\n  /**\n   * Start date and time for the plan of the online order in a `YYYY-MM-DDThh:mm[:ss][.sss]Z` format.\n   *\n   * Default: Current date and time.\n   */\n  startDate?: Date | null;\n  /**\n   * Coupon code to apply.\n   * @minLength 1\n   * @maxLength 20\n   */\n  couponCode?: string | null;\n  /** Provided if checkout is initiated on buyer's behalf. */\n  onBehalf?: OnBehalf;\n  /**\n   * Submission ID of the form submitted with this order.\n   * @format GUID\n   */\n  submissionId?: string | null;\n}\n\n/**\n * Creates an order for a buyer who purchased the plan with an offline transaction.\n *\n * An offline order is handled off of the Wix site and is marked as `type`: `offline`. If a pricing plan\n * has a limit on the amount of purchases per buyer, that limit is ignored for offline orders.\n * Tax is only applied if the site [has it configured](https://support.wix.com/en/article/pricing-plans-setting-up-tax-collection).\n *\n * When creating a free offline order:\n * The order's status is set to `\"PENDING\"` if the start date is in the future. Otherwise, the status is set to `\"ACTIVE\"`.\n * The order's last payment status is set to `\"NOT_APPLICABLE\"`. \"\n *\n * When creating a non-free offline order:\n * The order's status is set to `\"PENDING\"` if the start date is in the future. Otherwise, the status is set to `\"ACTIVE\"`.\n * The order's last payment status is set to `\"UNPAID\"` or `\"PAID\"` based on the data passed in the `paid` boolean in the request.\n *\n * Payment for an offline order can be set in 1 of 2 ways:\n * + During order creation, set `paid`: `true`.\n * + After creation, call Mark As Paid.\n * @param planId - ID of the plan being ordered, from the Plans API.\n * @param memberId - ID of the member ordering the plan, from the Members API.\n * @public\n * @requiredField memberId\n * @requiredField planId\n * @param options - Options for creating an offline order.\n * @permissionId PRICING_PLANS.REGISTER_OFFLINE_ORDERS\n * @applicableIdentity APP\n * @fqn com.wixpress.membership.v2.orders.CheckoutService.CreateOfflineOrder\n */\nexport async function createOfflineOrder(\n  planId: string,\n  memberId: string,\n  options?: CreateOfflineOrderOptions\n): Promise<\n  NonNullablePaths<\n    CreateOfflineOrderResponse,\n    | `order._id`\n    | `order.planId`\n    | `order.subscriptionId`\n    | `order.buyer.memberId`\n    | `order.buyer.contactId`\n    | `order.priceDetails.subscription.cycleDuration.unit`\n    | `order.priceDetails.subtotal`\n    | `order.priceDetails.discount`\n    | `order.priceDetails.tax.name`\n    | `order.priceDetails.tax.includedInPrice`\n    | `order.priceDetails.tax.rate`\n    | `order.priceDetails.tax.amount`\n    | `order.priceDetails.total`\n    | `order.priceDetails.planPrice`\n    | `order.priceDetails.currency`\n    | `order.priceDetails.coupon.code`\n    | `order.priceDetails.coupon.amount`\n    | `order.priceDetails.coupon._id`\n    | `order.pricing.prices`\n    | `order.pricing.prices.${number}.duration.cycleFrom`\n    | `order.pricing.prices.${number}.price.subtotal`\n    | `order.pricing.prices.${number}.price.discount`\n    | `order.pricing.prices.${number}.price.total`\n    | `order.pricing.prices.${number}.price.currency`\n    | `order.pricing.prices.${number}.price.proration`\n    | `order.type`\n    | `order.status`\n    | `order.cancellation.cause`\n    | `order.cancellation.effectiveAt`\n    | `order.lastPaymentStatus`\n    | `order.pausePeriods`\n    | `order.pausePeriods.${number}.status`\n    | `order.currentCycle.index`\n    | `order.planName`\n    | `order.planDescription`\n    | `order.planPrice`,\n    7\n  > & {\n    __applicationErrorsType?: CreateOfflineOrderApplicationErrors;\n    __validationErrorsType?: CreateOfflineOrderValidationErrors;\n  }\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[3] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    planId: planId,\n    memberId: memberId,\n    startDate: options?.startDate,\n    paid: options?.paid,\n    couponCode: options?.couponCode,\n    submissionId: options?.submissionId,\n  });\n\n  const reqOpts = ambassadorWixPricingPlansV2Order.createOfflineOrder(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: {\n          planId: '$[0]',\n          memberId: '$[1]',\n          startDate: '$[2].startDate',\n          paid: '$[2].paid',\n          couponCode: '$[2].couponCode',\n          submissionId: '$[2].submissionId',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['planId', 'memberId', 'options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface CreateOfflineOrderOptions {\n  /**\n   * Start date and time for the ordered plan in a `YYYY-MM-DDThh:mm[:ss][.sss]Z` format.\n   *\n   * Default: Current date and time.\n   */\n  startDate?: Date | null;\n  /**\n   * Whether the order is paid.\n   *\n   * Default: `false`\n   */\n  paid?: boolean | null;\n  /**\n   * Coupon code to apply, from the Coupons API.\n   * @minLength 1\n   * @maxLength 20\n   */\n  couponCode?: string | null;\n  /**\n   * Form submission ID that was submitted with the order.\n   * @format GUID\n   */\n  submissionId?: string | null;\n}\n\n/**\n * Returns an `order` object that represents a potential online order for a site member.\n *\n * You can use this method to show a site member a preview of an online order before [creating](https://dev.wix.com/docs/rest/business-solutions/pricing-plans/pricing-plans/orders/create-online-order) it.\n *\n * This method must be called using the [site member identity](https://dev.wix.com/docs/rest/articles/getting-started/about-identities#site-member). Therefore, [Wix apps](https://dev.wix.com/docs/build-apps) can't currently call this method using REST.\n * @param planId - Plan ID.\n * @public\n * @requiredField planId\n * @permissionId PRICING_PLANS.PURCHASE_PLANS\n * @applicableIdentity APP\n * @applicableIdentity MEMBER\n * @fqn com.wixpress.membership.v2.orders.CheckoutService.GetOnlineOrderPreview\n */\nexport async function getOnlineOrderPreview(\n  planId: string,\n  options?: GetOnlineOrderPreviewOptions\n): Promise<\n  NonNullablePaths<\n    GetOnlineOrderPreviewResponse,\n    | `order._id`\n    | `order.planId`\n    | `order.subscriptionId`\n    | `order.buyer.memberId`\n    | `order.buyer.contactId`\n    | `order.priceDetails.subscription.cycleDuration.unit`\n    | `order.priceDetails.subtotal`\n    | `order.priceDetails.discount`\n    | `order.priceDetails.tax.name`\n    | `order.priceDetails.tax.includedInPrice`\n    | `order.priceDetails.tax.rate`\n    | `order.priceDetails.tax.amount`\n    | `order.priceDetails.total`\n    | `order.priceDetails.planPrice`\n    | `order.priceDetails.currency`\n    | `order.priceDetails.coupon.code`\n    | `order.priceDetails.coupon.amount`\n    | `order.priceDetails.coupon._id`\n    | `order.pricing.prices`\n    | `order.pricing.prices.${number}.duration.cycleFrom`\n    | `order.pricing.prices.${number}.price.subtotal`\n    | `order.pricing.prices.${number}.price.discount`\n    | `order.pricing.prices.${number}.price.total`\n    | `order.pricing.prices.${number}.price.currency`\n    | `order.pricing.prices.${number}.price.proration`\n    | `order.type`\n    | `order.status`\n    | `order.cancellation.cause`\n    | `order.cancellation.effectiveAt`\n    | `order.lastPaymentStatus`\n    | `order.pausePeriods`\n    | `order.pausePeriods.${number}.status`\n    | `order.currentCycle.index`\n    | `order.planName`\n    | `order.planDescription`\n    | `order.planPrice`\n    | `purchaseLimitExceeded`,\n    7\n  > & {\n    __applicationErrorsType?: GetOnlineOrderPreviewApplicationErrors;\n    __validationErrorsType?: GetOnlineOrderPreviewValidationErrors;\n  }\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[2] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    planId: planId,\n    startDate: options?.startDate,\n    couponCode: options?.couponCode,\n  });\n\n  const reqOpts =\n    ambassadorWixPricingPlansV2Order.getOnlineOrderPreview(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: {\n          planId: '$[0]',\n          startDate: '$[1].startDate',\n          couponCode: '$[1].couponCode',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['planId', 'options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface GetOnlineOrderPreviewOptions {\n  /**\n   * Start date and time for the plan of the order preview in a `YYYY-MM-DDThh:mm[:ss][.sss]Z` format.\n   *\n   * Default: Current date and time.\n   */\n  startDate?: Date | null;\n  /**\n   * Coupon code to apply.\n   * @minLength 1\n   * @maxLength 20\n   */\n  couponCode?: string | null;\n}\n\n/**\n * Performs a dry run of a purchase and provides an order preview.\n *\n * The preview uses the same logic as purchasing a plan, but the preview is not saved. Because an order is not actually\n * created, the preview order's `orderId` and `subscriptionId` are displayed as a string of multiple zero characters\n * (`000000-0000`). Tax is only calculated if the site [has it configured](https://support.wix.com/en/article/pricing-plans-setting-up-tax-collection).\n * <br>\n * If a pricing plan has a limit on the amount of purchases per buyer, that limit is not considered for generating the preview.\n * But, if that limit has been reached and this order would then exceed the amount of purchases permitted for this buyer, then\n * `purchaseLimitExceeded` will return as `true`.\n *\n * To get a general price preview for a plan that's not buyer-specific, call Get Price Preview.\n * @param memberId - Member ID of the buyer the previewed order is for, from the Members API.\n * @public\n * @requiredField memberId\n * @requiredField planId\n * @param options - Options for previewing the offline order.\n * @param planId - ID of the plan of the previewed order.\n * @permissionId PRICING_PLANS.MANAGE_ORDERS\n * @applicableIdentity APP\n * @fqn com.wixpress.membership.v2.orders.CheckoutService.GetOfflineOrderPreview\n */\nexport async function getOfflineOrderPreview(\n  planId: string,\n  memberId: string,\n  options?: GetOfflineOrderPreviewOptions\n): Promise<\n  NonNullablePaths<\n    GetOfflineOrderPreviewResponse,\n    | `order._id`\n    | `order.planId`\n    | `order.subscriptionId`\n    | `order.buyer.memberId`\n    | `order.buyer.contactId`\n    | `order.priceDetails.subscription.cycleDuration.unit`\n    | `order.priceDetails.subtotal`\n    | `order.priceDetails.discount`\n    | `order.priceDetails.tax.name`\n    | `order.priceDetails.tax.includedInPrice`\n    | `order.priceDetails.tax.rate`\n    | `order.priceDetails.tax.amount`\n    | `order.priceDetails.total`\n    | `order.priceDetails.planPrice`\n    | `order.priceDetails.currency`\n    | `order.priceDetails.coupon.code`\n    | `order.priceDetails.coupon.amount`\n    | `order.priceDetails.coupon._id`\n    | `order.pricing.prices`\n    | `order.pricing.prices.${number}.duration.cycleFrom`\n    | `order.pricing.prices.${number}.price.subtotal`\n    | `order.pricing.prices.${number}.price.discount`\n    | `order.pricing.prices.${number}.price.total`\n    | `order.pricing.prices.${number}.price.currency`\n    | `order.pricing.prices.${number}.price.proration`\n    | `order.type`\n    | `order.status`\n    | `order.cancellation.cause`\n    | `order.cancellation.effectiveAt`\n    | `order.lastPaymentStatus`\n    | `order.pausePeriods`\n    | `order.pausePeriods.${number}.status`\n    | `order.currentCycle.index`\n    | `order.planName`\n    | `order.planDescription`\n    | `order.planPrice`\n    | `purchaseLimitExceeded`,\n    7\n  > & {\n    __applicationErrorsType?: GetOfflineOrderPreviewApplicationErrors;\n    __validationErrorsType?: GetOfflineOrderPreviewValidationErrors;\n  }\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[3] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    planId: planId,\n    memberId: memberId,\n    startDate: options?.startDate,\n    couponCode: options?.couponCode,\n  });\n\n  const reqOpts =\n    ambassadorWixPricingPlansV2Order.getOfflineOrderPreview(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: {\n          planId: '$[0]',\n          memberId: '$[1]',\n          startDate: '$[2].startDate',\n          couponCode: '$[2].couponCode',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['planId', 'memberId', 'options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface GetOfflineOrderPreviewOptions {\n  /**\n   * Start date and time for plan of the previewed order in a `YYYY-MM-DDThh:mm[:ss][.sss]Z` format.\n   *\n   * Default: Current date and time.\n   */\n  startDate?: Date | null;\n  /**\n   * Coupon code to apply, from the Coupons API.\n   * @minLength 1\n   * @maxLength 20\n   */\n  couponCode?: string | null;\n}\n\n/**\n * Retrieves a plan's pricing.\n *\n * The price preview uses the same logic as purchasing a plan, but the preview is not saved. Tax is only applied if\n * the site [has it configured](https://support.wix.com/en/article/pricing-plans-setting-up-tax-collection). The price is returned\n * in the pricing model format used for orders. 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).\n *\n * Buyers do not have to be logged in to preview the price, and as such, the details returned are not buyer-specific. To\n * generate a preview of a purchase for a specific buyer, call Get Offline Order Preview.\n * @param planId - ID of plan to preview.\n * @public\n * @requiredField planId\n * @param options - Options for getting a price preview.\n * @permissionId PRICING_PLANS.READ_PUBLIC_PLANS\n * @applicableIdentity APP\n * @fqn com.wixpress.membership.v2.orders.CheckoutService.GetPricePreview\n */\nexport async function getPricePreview(\n  planId: string,\n  options?: GetPricePreviewOptions\n): Promise<\n  NonNullablePaths<\n    GetPricePreviewResponse,\n    | `price.subscription.cycleDuration.unit`\n    | `price.subtotal`\n    | `price.discount`\n    | `price.tax.name`\n    | `price.tax.includedInPrice`\n    | `price.tax.rate`\n    | `price.tax.amount`\n    | `price.total`\n    | `price.planPrice`\n    | `price.currency`\n    | `price.coupon.code`\n    | `price.coupon.amount`\n    | `price.coupon._id`\n    | `prices`\n    | `prices.${number}.duration.cycleFrom`\n    | `prices.${number}.price.subtotal`\n    | `prices.${number}.price.coupon.code`\n    | `prices.${number}.price.coupon.amount`\n    | `prices.${number}.price.coupon._id`\n    | `prices.${number}.price.discount`\n    | `prices.${number}.price.tax.name`\n    | `prices.${number}.price.tax.includedInPrice`\n    | `prices.${number}.price.tax.rate`\n    | `prices.${number}.price.tax.amount`\n    | `prices.${number}.price.total`\n    | `prices.${number}.price.currency`\n    | `prices.${number}.price.proration`,\n    6\n  > & {\n    __applicationErrorsType?: GetPricePreviewApplicationErrors;\n  }\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[2] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    planId: planId,\n    couponCode: options?.couponCode,\n  });\n\n  const reqOpts = ambassadorWixPricingPlansV2Order.getPricePreview(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: {\n          planId: '$[0]',\n          couponCode: '$[1].couponCode',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['planId', 'options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface GetPricePreviewOptions {\n  /**\n   * Coupon code to apply, from the Coupons API.\n   * @minLength 1\n   * @maxLength 20\n   */\n  couponCode?: string | null;\n}\n\n/**\n * Retrieves an order by ID.\n * @param _id - Order ID.\n * @public\n * @requiredField _id\n * @param options - Options to use when getting an order.\n * @permissionId PRICING_PLANS.READ_ORDERS\n * @applicableIdentity APP\n * @returns Order.\n * @fqn com.wixpress.membership.v2.orders.OrderManagementService.GetOrder\n */\nexport async function managementGetOrder(\n  _id: string,\n  options?: ManagementGetOrderOptions\n): Promise<\n  NonNullablePaths<\n    Order,\n    | `_id`\n    | `planId`\n    | `subscriptionId`\n    | `buyer.memberId`\n    | `buyer.contactId`\n    | `priceDetails.subscription.cycleDuration.unit`\n    | `priceDetails.subtotal`\n    | `priceDetails.discount`\n    | `priceDetails.tax.name`\n    | `priceDetails.tax.includedInPrice`\n    | `priceDetails.tax.rate`\n    | `priceDetails.tax.amount`\n    | `priceDetails.total`\n    | `priceDetails.planPrice`\n    | `priceDetails.currency`\n    | `priceDetails.coupon.code`\n    | `priceDetails.coupon.amount`\n    | `priceDetails.coupon._id`\n    | `pricing.prices`\n    | `pricing.prices.${number}.duration.cycleFrom`\n    | `pricing.prices.${number}.price.subtotal`\n    | `pricing.prices.${number}.price.discount`\n    | `pricing.prices.${number}.price.total`\n    | `pricing.prices.${number}.price.currency`\n    | `pricing.prices.${number}.price.proration`\n    | `type`\n    | `status`\n    | `cancellation.cause`\n    | `cancellation.effectiveAt`\n    | `lastPaymentStatus`\n    | `pausePeriods`\n    | `pausePeriods.${number}.status`\n    | `currentCycle.index`\n    | `planName`\n    | `planDescription`\n    | `planPrice`,\n    6\n  >\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[2] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    id: _id,\n    fieldSet: options?.fieldSet,\n  });\n\n  const reqOpts = ambassadorWixPricingPlansV2Order.managementGetOrder(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)?.order!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { id: '$[0]', fieldSet: '$[1].fieldSet' },\n        singleArgumentUnchanged: false,\n      },\n      ['_id', 'options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface ManagementGetOrderOptions {\n  /**\n   * Predefined set of fields to return.\n   *\n   * Default: If `fieldSet` is omitted, no order form submission data is returned.\n   */\n  fieldSet?: SetWithLiterals;\n}\n\n/**\n * Retrieves a list of up to 50 pricing plan orders and details, given the specified sorting and filtering.\n *\n * By default, this endpoint will retrieve all orders and return them sorted by `createdDate` in `DESC`, descending order.\n * `sort.fieldName` supports `endDate` and `createdDate` fields and defaults to `ASC`, ascending order.\n * @public\n * @param options - Filtering, sorting, and pagination options.\n * @permissionId PRICING_PLANS.READ_ORDERS\n * @applicableIdentity APP\n * @fqn com.wixpress.membership.v2.orders.OrderManagementService.ListOrders\n */\nexport async function managementListOrders(\n  options?: ManagementListOrdersOptions\n): Promise<\n  NonNullablePaths<\n    ListOrdersResponse,\n    | `orders`\n    | `orders.${number}._id`\n    | `orders.${number}.planId`\n    | `orders.${number}.subscriptionId`\n    | `orders.${number}.buyer.memberId`\n    | `orders.${number}.buyer.contactId`\n    | `orders.${number}.priceDetails.singlePaymentForDuration.unit`\n    | `orders.${number}.priceDetails.subtotal`\n    | `orders.${number}.priceDetails.discount`\n    | `orders.${number}.priceDetails.tax.name`\n    | `orders.${number}.priceDetails.tax.includedInPrice`\n    | `orders.${number}.priceDetails.tax.rate`\n    | `orders.${number}.priceDetails.tax.amount`\n    | `orders.${number}.priceDetails.total`\n    | `orders.${number}.priceDetails.planPrice`\n    | `orders.${number}.priceDetails.currency`\n    | `orders.${number}.priceDetails.coupon.code`\n    | `orders.${number}.priceDetails.coupon.amount`\n    | `orders.${number}.priceDetails.coupon._id`\n    | `orders.${number}.type`\n    | `orders.${number}.status`\n    | `orders.${number}.cancellation.cause`\n    | `orders.${number}.cancellation.effectiveAt`\n    | `orders.${number}.lastPaymentStatus`\n    | `orders.${number}.currentCycle.index`\n    | `orders.${number}.planName`\n    | `orders.${number}.planDescription`\n    | `orders.${number}.planPrice`,\n    6\n  >\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    buyerIds: options?.buyerIds,\n    planIds: options?.planIds,\n    autoRenewCanceled: options?.autoRenewCanceled,\n    orderStatuses: options?.orderStatuses,\n    paymentStatuses: options?.paymentStatuses,\n    limit: options?.limit,\n    offset: options?.offset,\n    sorting: options?.sorting,\n    fieldSet: options?.fieldSet,\n  });\n\n  const reqOpts =\n    ambassadorWixPricingPlansV2Order.managementListOrders(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: {\n          buyerIds: '$[0].buyerIds',\n          planIds: '$[0].planIds',\n          autoRenewCanceled: '$[0].autoRenewCanceled',\n          orderStatuses: '$[0].orderStatuses',\n          paymentStatuses: '$[0].paymentStatuses',\n          limit: '$[0].limit',\n          offset: '$[0].offset',\n          sorting: '$[0].sorting',\n          fieldSet: '$[0].fieldSet',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface ManagementListOrdersOptions {\n  /**\n   * Filter by a buyer's member ID, from the Members API.\n   * @format GUID\n   */\n  buyerIds?: string[];\n  /**\n   * Filter by plan IDs, from the Plans API.\n   * @format GUID\n   */\n  planIds?: string[];\n  /** Filter by whether or not the auto-renewal of recurring orders was canceled. */\n  autoRenewCanceled?: boolean | null;\n  /** Filter by order status. */\n  orderStatuses?: OrderStatusWithLiterals[];\n  /** Filter by payment status. */\n  paymentStatuses?: PaymentStatusWithLiterals[];\n  /**\n   * Number of orders to return. See Sorting and Paging for more information.\n   *\n   * Max: `50`\n   * @min 1\n   * @max 50\n   */\n  limit?: number | null;\n  /** Number of orders to skip in the current sort order. */\n  offset?: number | null;\n  /**\n   * Sort order.\n   *\n   * Use `ASC` for ascending order or `DESC` for descending order.\n   *\n   * Default: `DESC`.\n   */\n  sorting?: Sorting;\n  /**\n   * Predefined set of fields to return.\n   *\n   * Default: If `fieldSet` is omitted, no order form submission data is returned.\n   */\n  fieldSet?: SetWithLiterals;\n}\n\n/**\n * 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.\n *\n * New `endDate` must be later than the order's current `endDate`. Can't postpone orders that are unlimited.\n * Can't postpone an order with `status`: `PAUSED`.\n * @param _id - Order ID.\n * @param endDate - New end date and time.\n *\n * Must be later than the current end date and time.\n * @public\n * @requiredField _id\n * @requiredField endDate\n * @param options - Options for postponing the end date of an order.\n * @permissionId PRICING_PLANS.MANAGE_ORDERS\n * @applicableIdentity APP\n * @fqn com.wixpress.membership.v2.orders.OrderManagementService.PostponeEndDate\n */\nexport async function postponeEndDate(\n  _id: string,\n  endDate: Date\n): Promise<void> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[2] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    id: _id,\n    endDate: endDate,\n  });\n\n  const reqOpts = ambassadorWixPricingPlansV2Order.postponeEndDate(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { id: '$[0]', endDate: '$[1]' },\n        singleArgumentUnchanged: false,\n      },\n      ['_id', 'endDate']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\n/**\n * Cancels an existing order.\n *\n * For orders with recurring payments, a cancellation can be set to occur either `IMMEDIATELY` or at the `NEXT_PAYMENT_DATE`.\n * For orders with one-time payments, a cancellation can only be set for `IMMEDIATELY`.\n *\n * #### Canceling during the free trial period.\n *\n * When a buyer cancels their order during the free trial period, the buyer's subscription expires at the end\n * of the free trial period and they will not be billed. The buyer may continue using the benefits until the end\n * of the free trial period.\n *\n * When a Wix user cancels an ordered plan during the free trial period, they choose whether to apply the cancellation\n * `IMMEDIATELY` or at the `NEXT_PAYMENT_DATE`. Canceling `IMMEDIATELY` will end the subscription for the buyer\n * immediately, even during the free trial period and the buyer won't be billed. Canceling at the\n * `NEXT_PAYMENT_DATE` allows the buyer to continue using the benefits of the subscription until the end of the free trial period.\n * Then, the subscription ends and the buyer is not billed.\n * @param _id - Order ID.\n * @param effectiveAt - __Required.__ When the order will be canceled. One-time orders can only be canceled `IMMEDIATELY`.\n * @public\n * @requiredField _id\n * @requiredField effectiveAt\n * @param options - Options for canceling orders.\n * @permissionId PRICING_PLANS.MANAGE_ORDERS\n * @applicableIdentity APP\n * @fqn com.wixpress.membership.v2.orders.OrderManagementService.CancelOrder\n */\nexport async function cancelOrder(\n  _id: string,\n  effectiveAt: CancellationEffectiveAtWithLiterals\n): Promise<void> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[2] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    id: _id,\n    effectiveAt: effectiveAt,\n  });\n\n  const reqOpts = ambassadorWixPricingPlansV2Order.cancelOrder(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { id: '$[0]', effectiveAt: '$[1]' },\n        singleArgumentUnchanged: false,\n      },\n      ['_id', 'effectiveAt']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\n/**\n * Marks an offline order as paid.\n * > __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.\n *\n * Marking an offline order as paid causes the following changes:\n * - The order's `lastPaymentStatus` changes to `\"PAID\"`.\n * - The order's status changes to either `\"PENDING\"` or `\"ACTIVE\"`, depending on the order's `startDate`.\n *\n * An error occurs if you attempt to:\n * - Mark an already-paid, offline order as paid. You cannot mark an offline order as paid twice.\n * - Mark an online order as paid. The Mark as Paid method is supported for offline orders only.\n * @param _id - Order ID.\n * @public\n * @requiredField _id\n * @permissionId PRICING_PLANS.MANAGE_ORDERS\n * @applicableIdentity APP\n * @fqn com.wixpress.membership.v2.orders.OrderManagementService.MarkAsPaid\n */\nexport async function markAsPaid(_id: string): Promise<void> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });\n\n  const reqOpts = ambassadorWixPricingPlansV2Order.markAsPaid(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { id: '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['_id']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\n/**\n * Pauses an order. Calling this method changes the order status to `\"PAUSED\"` and updates the `pausePeriods` array.\n *\n * Only orders with `status`: `ACTIVE` can be paused.\n * For orders with recurring payments, it also pauses the payment schedule. Buyers are not charged when an order is paused.\n * Pausing an order affects the end date of the order by adding the time the order is paused to the `endDate`.\n * The `endDate` and the `earliestEndDate` for the order are adjusted to include the pause period when the order is resumed.\n *\n * To resume a paused order, call Resume Order.\n * @param _id - Order ID.\n * @public\n * @requiredField _id\n * @permissionId PRICING_PLANS.MANAGE_ORDERS\n * @applicableIdentity APP\n * @fqn com.wixpress.membership.v2.orders.OrderManagementService.PauseOrder\n */\nexport async function pauseOrder(_id: string): Promise<void> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });\n\n  const reqOpts = ambassadorWixPricingPlansV2Order.pauseOrder(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { id: '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['_id']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\n/**\n * Resumes a paused order. For orders with recurring payments, it also restarts the payment schedule.\n *\n * Resuming an order causes the following changes:\n * - The order status changes to `\"ACTIVE\"`.\n * - The `pausePeriods` array is updated.\n * - The `endDate` for the order is adjusted to include the pause period.\n * - For orders with recurring payments, the payment schedule is restarted.\n * - The `earliestEndDate` is adjusted to include the pause period. (This property is reserved for future use).\n *\n * To pause an order, call Pause Order.\n * @param _id - Order ID.\n * @public\n * @requiredField _id\n * @permissionId PRICING_PLANS.MANAGE_ORDERS\n * @applicableIdentity APP\n * @fqn com.wixpress.membership.v2.orders.OrderManagementService.ResumeOrder\n */\nexport async function resumeOrder(_id: string): Promise<void> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });\n\n  const reqOpts = ambassadorWixPricingPlansV2Order.resumeOrder(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { id: '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['_id']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixpressMembershipV2OrdersOrderManagementServiceUrl(\n  opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n  const domainToMappings = {\n    'api._api_base_domain_': [\n      {\n        srcPath: '/order-management-service-proxy',\n        destPath: '',\n      },\n    ],\n    '*.dev.wix-code.com': [\n      {\n        srcPath: '/_api/paid-plans/v2/orders',\n        destPath: '/v2/orders',\n      },\n    ],\n    '*.pub.wix-code.com': [\n      {\n        srcPath: '/_api/paid-plans/v2/orders',\n        destPath: '/v2/orders',\n      },\n    ],\n    '*.wixapps.net': [\n      {\n        srcPath: '/_api/paid-plans/v2/orders',\n        destPath: '/v2/orders',\n      },\n    ],\n    _: [\n      {\n        srcPath: '/_api/paid-plans/v2/orders',\n        destPath: '/v2/orders',\n      },\n    ],\n    'editor-flow.wixapps.net': [\n      {\n        srcPath: '/_api/paid-plans/v2/orders',\n        destPath: '/v2/orders',\n      },\n    ],\n    'editor._base_domain_': [\n      {\n        srcPath: '/_api/paid-plans/v2/orders',\n        destPath: '/v2/orders',\n      },\n    ],\n    'blocks._base_domain_': [\n      {\n        srcPath: '/_api/paid-plans/v2/orders',\n        destPath: '/v2/orders',\n      },\n    ],\n    'create.editorx': [\n      {\n        srcPath: '/_api/paid-plans/v2/orders',\n        destPath: '/v2/orders',\n      },\n    ],\n    'editor.wixapps.net': [\n      {\n        srcPath: '/_api/paid-plans/v2/orders',\n        destPath: '/v2/orders',\n      },\n    ],\n    'forums._base_domain_': [\n      {\n        srcPath: '/_api/paid-plans/v2/orders',\n        destPath: '/v2/orders',\n      },\n    ],\n    'forums.wixapps.net': [\n      {\n        srcPath: '/_api/paid-plans/v2/orders',\n        destPath: '/v2/orders',\n      },\n    ],\n    'manage._base_domain_': [\n      {\n        srcPath: '/_api/pricing-plans/v2/orders',\n        destPath: '/v2/orders',\n      },\n      {\n        srcPath: '/_api/paid-plans/v2/orders',\n        destPath: '/v2/orders',\n      },\n    ],\n    'www._base_domain_': [\n      {\n        srcPath: '/_api/paid-plans/v2/orders',\n        destPath: '/v2/orders',\n      },\n    ],\n    'www.wixapis.com': [\n      {\n        srcPath: '/pricing-plans/v2/orders',\n        destPath: '/v2/orders',\n      },\n    ],\n  };\n\n  return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nfunction resolveComWixpressMembershipV2OrdersCheckoutServiceUrl(\n  opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n  const domainToMappings = {\n    'api._api_base_domain_': [\n      {\n        srcPath: '/pricing-plans-checkout-proxy',\n        destPath: '',\n      },\n    ],\n    '*.dev.wix-code.com': [\n      {\n        srcPath: '/_api/paid-plans/v2/checkout',\n        destPath: '/v2/checkout',\n      },\n    ],\n    '*.pub.wix-code.com': [\n      {\n        srcPath: '/_api/paid-plans/v2/checkout',\n        destPath: '/v2/checkout',\n      },\n    ],\n    '*.wixapps.net': [\n      {\n        srcPath: '/_api/paid-plans/v2/checkout',\n        destPath: '/v2/checkout',\n      },\n    ],\n    _: [\n      {\n        srcPath: '/pricing-plans/v2/checkout',\n        destPath: '/v2/checkout',\n      },\n      {\n        srcPath: '/_api/paid-plans/v2/checkout',\n        destPath: '/v2/checkout',\n      },\n      {\n        srcPath: '/_api/pricing-plans/v2/checkout',\n        destPath: '/v2/checkout',\n      },\n    ],\n    'editor-flow.wixapps.net': [\n      {\n        srcPath: '/_api/paid-plans/v2/checkout',\n        destPath: '/v2/checkout',\n      },\n    ],\n    'editor._base_domain_': [\n      {\n        srcPath: '/_api/paid-plans/v2/checkout',\n        destPath: '/v2/checkout',\n      },\n    ],\n    'blocks._base_domain_': [\n      {\n        srcPath: '/_api/paid-plans/v2/checkout',\n        destPath: '/v2/checkout',\n      },\n    ],\n    'create.editorx': [\n      {\n        srcPath: '/_api/paid-plans/v2/checkout',\n        destPath: '/v2/checkout',\n      },\n    ],\n    'editor.wixapps.net': [\n      {\n        srcPath: '/_api/paid-plans/v2/checkout',\n        destPath: '/v2/checkout',\n      },\n    ],\n    'forums._base_domain_': [\n      {\n        srcPath: '/_api/paid-plans/v2/checkout',\n        destPath: '/v2/checkout',\n      },\n    ],\n    'forums.wixapps.net': [\n      {\n        srcPath: '/_api/paid-plans/v2/checkout',\n        destPath: '/v2/checkout',\n      },\n    ],\n    'manage._base_domain_': [\n      {\n        srcPath: '/_api/pricing-plans/v2/checkout',\n        destPath: '/v2/checkout',\n      },\n      {\n        srcPath: '/_api/paid-plans/v2/checkout',\n        destPath: '/v2/checkout',\n      },\n      {\n        srcPath: '/pricing-plans/v2/checkout',\n        destPath: '/v2/checkout',\n      },\n    ],\n    'www._base_domain_': [\n      {\n        srcPath: '/_api/paid-plans/v2/checkout',\n        destPath: '/v2/checkout',\n      },\n    ],\n    'www.wixapis.com': [\n      {\n        srcPath: '/pricing-plans/v2/checkout',\n        destPath: '/v2/checkout',\n      },\n    ],\n  };\n\n  return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nfunction resolveComWixpressMembershipV2OrdersMemberMemberOrdersServiceUrl(\n  opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n  const domainToMappings = {\n    'api._api_base_domain_': [\n      {\n        srcPath: '/member-orders-service-proxy',\n        destPath: '',\n      },\n    ],\n    '*.dev.wix-code.com': [\n      {\n        srcPath: '/_api/pricing-plans-member-orders/v2/member/orders',\n        destPath: '/v2/member/orders',\n      },\n      {\n        srcPath: '/_api/pricing-plans/v2/member/orders',\n        destPath: '/v2/member/orders',\n      },\n    ],\n    '*.pub.wix-code.com': [\n      {\n        srcPath: '/_api/pricing-plans-member-orders/v2/member/orders',\n        destPath: '/v2/member/orders',\n      },\n      {\n        srcPath: '/_api/pricing-plans/v2/member/orders',\n        destPath: '/v2/member/orders',\n      },\n    ],\n    _: [\n      {\n        srcPath: '/_api/pricing-plans/v2/member/orders',\n        destPath: '/v2/member/orders',\n      },\n    ],\n    'editor.wixapps.net': [\n      {\n        srcPath: '/_api/pricing-plans/v2/member/orders',\n        destPath: '/v2/member/orders',\n      },\n    ],\n    'manage._base_domain_': [\n      {\n        srcPath: '/_api/pricing-plans/v2/member/orders',\n        destPath: '/v2/member/orders',\n      },\n    ],\n    'www._base_domain_': [\n      {\n        srcPath: '/_api/pricing-plans/v2/member/orders',\n        destPath: '/v2/member/orders',\n      },\n    ],\n    'www.wixapis.com': [\n      {\n        srcPath: '/pricing-plans/v2/member/orders',\n        destPath: '/v2/member/orders',\n      },\n    ],\n  };\n\n  return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_pricing-plans_orders';\n\n/** Retrieves an order for the currently logged-in member by ID. */\nexport function memberGetOrder(payload: object): RequestOptionsFactory<any> {\n  function __memberGetOrder({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.pricing_plans.v2.order',\n      method: 'GET' as any,\n      methodFqn:\n        'com.wixpress.membership.v2.orders.member.MemberOrdersService.GetOrder',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressMembershipV2OrdersMemberMemberOrdersServiceUrl({\n        protoPath: '/v2/member/orders/{id}',\n        data: payload,\n        host,\n      }),\n      params: toURLSearchParams(payload),\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [\n              { path: 'order.startDate' },\n              { path: 'order.endDate' },\n              { path: 'order.earliestEndDate' },\n              { path: 'order.createdDate' },\n              { path: 'order.updatedDate' },\n              { path: 'order.cancellation.requestedDate' },\n              { path: 'order.pausePeriods.pauseDate' },\n              { path: 'order.pausePeriods.resumeDate' },\n              { path: 'order.currentCycle.startedDate' },\n              { path: 'order.currentCycle.endedDate' },\n              { path: 'order.cycles.startedDate' },\n              { path: 'order.cycles.endedDate' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __memberGetOrder;\n}\n\n/** Retrieves a list of up to 100 pricing plan orders for currently logged-in member. */\nexport function memberListOrders(payload: object): RequestOptionsFactory<any> {\n  function __memberListOrders({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.pricing_plans.v2.order',\n      method: 'GET' as any,\n      methodFqn:\n        'com.wixpress.membership.v2.orders.member.MemberOrdersService.ListOrders',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressMembershipV2OrdersMemberMemberOrdersServiceUrl({\n        protoPath: '/v2/member/orders',\n        data: payload,\n        host,\n      }),\n      params: toURLSearchParams(payload, true),\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [\n              { path: 'orders.startDate' },\n              { path: 'orders.endDate' },\n              { path: 'orders.earliestEndDate' },\n              { path: 'orders.createdDate' },\n              { path: 'orders.updatedDate' },\n              { path: 'orders.cancellation.requestedDate' },\n              { path: 'orders.pausePeriods.pauseDate' },\n              { path: 'orders.pausePeriods.resumeDate' },\n              { path: 'orders.currentCycle.startedDate' },\n              { path: 'orders.currentCycle.endedDate' },\n              { path: 'orders.cycles.startedDate' },\n              { path: 'orders.cycles.endedDate' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __memberListOrders;\n}\n\n/**\n * Cancels an order. Recurring orders can be canceled either immediately or at the next payment date. One time orders can only be canceled immediately.\n *\n * 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.\n *\n * Canceling during the free trial period: When a buyer cancels their order during the free trial period, the buyer's subscription expires at the end of the free trial period and they won't be billed. The buyer may continue using the benefits until the end of the free trial period.\n *\n * >**Note:**\n * >This method requires [visitor or member authentication](https://dev.wix.com/docs/rest/articles/getting-started/access-types-and-permissions).\n */\nexport function requestCancellation(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __requestCancellation({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.pricing_plans.v2.order',\n      method: 'POST' as any,\n      methodFqn:\n        'com.wixpress.membership.v2.orders.member.MemberOrdersService.RequestCancellation',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressMembershipV2OrdersMemberMemberOrdersServiceUrl({\n        protoPath: '/v2/member/orders/{id}/cancel',\n        data: payload,\n        host,\n      }),\n      data: payload,\n    };\n\n    return metadata;\n  }\n\n  return __requestCancellation;\n}\n\n/**\n * Creates an online order for a site member.\n *\n * If this method is called by a [site member](https://dev.wix.com/docs/rest/articles/getting-started/about-identities#site-member), the plan is automatically ordered on behalf of that site member. Otherwise, you must specify `onBehalf.memberId` in your call.\n *\n * When an online order is created, but payment hasn't been processed, its status is set to `DRAFT`. After the payment has been processed, if the start date is in the future the order's status is set to `PENDING`. Otherwise, it's set to `ACTIVE`.\n */\nexport function createOnlineOrder(payload: object): RequestOptionsFactory<any> {\n  function __createOnlineOrder({ host }: any) {\n    const serializedData = transformPaths(payload, [\n      {\n        transformFn: transformSDKTimestampToRESTTimestamp,\n        paths: [{ path: 'startDate' }],\n      },\n    ]);\n    const metadata = {\n      entityFqdn: 'wix.pricing_plans.v2.order',\n      method: 'POST' as any,\n      methodFqn:\n        'com.wixpress.membership.v2.orders.CheckoutService.CreateOnlineOrder',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressMembershipV2OrdersCheckoutServiceUrl({\n        protoPath: '/v2/checkout/orders/online',\n        data: serializedData,\n        host,\n      }),\n      data: serializedData,\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [\n              { path: 'order.startDate' },\n              { path: 'order.endDate' },\n              { path: 'order.earliestEndDate' },\n              { path: 'order.createdDate' },\n              { path: 'order.updatedDate' },\n              { path: 'order.cancellation.requestedDate' },\n              { path: 'order.pausePeriods.pauseDate' },\n              { path: 'order.pausePeriods.resumeDate' },\n              { path: 'order.currentCycle.startedDate' },\n              { path: 'order.currentCycle.endedDate' },\n              { path: 'order.cycles.startedDate' },\n              { path: 'order.cycles.endedDate' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __createOnlineOrder;\n}\n\n/**\n * Creates an order for a buyer who purchased the plan with an offline transaction.\n *\n * An offline order is handled off of the Wix site and is marked as `type`: `offline`. If a pricing plan\n * has a limit on the amount of purchases per buyer, that limit is ignored for offline orders.\n * Tax is only applied if the site [has it configured](https://support.wix.com/en/article/pricing-plans-setting-up-tax-collection).\n *\n * When creating a free offline order:\n * The order's status is set to `\"PENDING\"` if the start date is in the future. Otherwise, the status is set to `\"ACTIVE\"`.\n * The order's last payment status is set to `\"NOT_APPLICABLE\"`. \"\n *\n * When creating a non-free offline order:\n * The order's status is set to `\"PENDING\"` if the start date is in the future. Otherwise, the status is set to `\"ACTIVE\"`.\n * The order's last payment status is set to `\"UNPAID\"` or `\"PAID\"` based on the data passed in the `paid` boolean in the request.\n *\n * Payment for an offline order can be set in 1 of 2 ways:\n * + During order creation, set `paid`: `true`.\n * + After creation, call Mark As Paid.\n */\nexport function createOfflineOrder(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __createOfflineOrder({ host }: any) {\n    const serializedData = transformPaths(payload, [\n      {\n        transformFn: transformSDKTimestampToRESTTimestamp,\n        paths: [{ path: 'startDate' }],\n      },\n    ]);\n    const metadata = {\n      entityFqdn: 'wix.pricing_plans.v2.order',\n      method: 'POST' as any,\n      methodFqn:\n        'com.wixpress.membership.v2.orders.CheckoutService.CreateOfflineOrder',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressMembershipV2OrdersCheckoutServiceUrl({\n        protoPath: '/v2/checkout/orders/offline',\n        data: serializedData,\n        host,\n      }),\n      data: serializedData,\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [\n              { path: 'order.startDate' },\n              { path: 'order.endDate' },\n              { path: 'order.earliestEndDate' },\n              { path: 'order.createdDate' },\n              { path: 'order.updatedDate' },\n              { path: 'order.cancellation.requestedDate' },\n              { path: 'order.pausePeriods.pauseDate' },\n              { path: 'order.pausePeriods.resumeDate' },\n              { path: 'order.currentCycle.startedDate' },\n              { path: 'order.currentCycle.endedDate' },\n              { path: 'order.cycles.startedDate' },\n              { path: 'order.cycles.endedDate' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __createOfflineOrder;\n}\n\n/**\n * Returns an `order` object that represents a potential online order for a site member.\n *\n * You can use this method to show a site member a preview of an online order before [creating](https://dev.wix.com/docs/rest/business-solutions/pricing-plans/pricing-plans/orders/create-online-order) it.\n *\n * This method must be called using the [site member identity](https://dev.wix.com/docs/rest/articles/getting-started/about-identities#site-member). Therefore, [Wix apps](https://dev.wix.com/docs/build-apps) can't currently call this method using REST.\n */\nexport function getOnlineOrderPreview(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __getOnlineOrderPreview({ host }: any) {\n    const serializedData = transformPaths(payload, [\n      {\n        transformFn: transformSDKTimestampToRESTTimestamp,\n        paths: [{ path: 'startDate' }],\n      },\n    ]);\n    const metadata = {\n      entityFqdn: 'wix.pricing_plans.v2.order',\n      method: 'POST' as any,\n      methodFqn:\n        'com.wixpress.membership.v2.orders.CheckoutService.GetOnlineOrderPreview',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressMembershipV2OrdersCheckoutServiceUrl({\n        protoPath: '/v2/checkout/orders/preview-online',\n        data: serializedData,\n        host,\n      }),\n      data: serializedData,\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [\n              { path: 'order.startDate' },\n              { path: 'order.endDate' },\n              { path: 'order.earliestEndDate' },\n              { path: 'order.createdDate' },\n              { path: 'order.updatedDate' },\n              { path: 'order.cancellation.requestedDate' },\n              { path: 'order.pausePeriods.pauseDate' },\n              { path: 'order.pausePeriods.resumeDate' },\n              { path: 'order.currentCycle.startedDate' },\n              { path: 'order.currentCycle.endedDate' },\n              { path: 'order.cycles.startedDate' },\n              { path: 'order.cycles.endedDate' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __getOnlineOrderPreview;\n}\n\n/**\n * Performs a dry run of a purchase and provides an order preview.\n *\n * The preview uses the same logic as purchasing a plan, but the preview is not saved. Because an order is not actually\n * created, the preview order's `orderId` and `subscriptionId` are displayed as a string of multiple zero characters\n * (`000000-0000`). Tax is only calculated if the site [has it configured](https://support.wix.com/en/article/pricing-plans-setting-up-tax-collection).\n * <br>\n * If a pricing plan has a limit on the amount of purchases per buyer, that limit is not considered for generating the preview.\n * But, if that limit has been reached and this order would then exceed the amount of purchases permitted for this buyer, then\n * `purchaseLimitExceeded` will return as `true`.\n *\n * To get a general price preview for a plan that's not buyer-specific, call Get Price Preview.\n */\nexport function getOfflineOrderPreview(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __getOfflineOrderPreview({ host }: any) {\n    const serializedData = transformPaths(payload, [\n      {\n        transformFn: transformSDKTimestampToRESTTimestamp,\n        paths: [{ path: 'startDate' }],\n      },\n    ]);\n    const metadata = {\n      entityFqdn: 'wix.pricing_plans.v2.order',\n      method: 'POST' as any,\n      methodFqn:\n        'com.wixpress.membership.v2.orders.CheckoutService.GetOfflineOrderPreview',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressMembershipV2OrdersCheckoutServiceUrl({\n        protoPath: '/v2/checkout/orders/preview-offline',\n        data: serializedData,\n        host,\n      }),\n      data: serializedData,\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [\n              { path: 'order.startDate' },\n              { path: 'order.endDate' },\n              { path: 'order.earliestEndDate' },\n              { path: 'order.createdDate' },\n              { path: 'order.updatedDate' },\n              { path: 'order.cancellation.requestedDate' },\n              { path: 'order.pausePeriods.pauseDate' },\n              { path: 'order.pausePeriods.resumeDate' },\n              { path: 'order.currentCycle.startedDate' },\n              { path: 'order.currentCycle.endedDate' },\n              { path: 'order.cycles.startedDate' },\n              { path: 'order.cycles.endedDate' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __getOfflineOrderPreview;\n}\n\n/**\n * Retrieves a plan's pricing.\n *\n * The price preview uses the same logic as purchasing a plan, but the preview is not saved. Tax is only applied if\n * the site [has it configured](https://support.wix.com/en/article/pricing-plans-setting-up-tax-collection). The price is returned\n * in the pricing model format used for orders. 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).\n *\n * Buyers do not have to be logged in to preview the price, and as such, the details returned are not buyer-specific. To\n * generate a preview of a purchase for a specific buyer, call Get Offline Order Preview.\n */\nexport function getPricePreview(payload: object): RequestOptionsFactory<any> {\n  function __getPricePreview({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.pricing_plans.v2.order',\n      method: 'POST' as any,\n      methodFqn:\n        'com.wixpress.membership.v2.orders.CheckoutService.GetPricePreview',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressMembershipV2OrdersCheckoutServiceUrl({\n        protoPath: '/v2/checkout/orders/price-preview',\n        data: payload,\n        host,\n      }),\n      data: payload,\n    };\n\n    return metadata;\n  }\n\n  return __getPricePreview;\n}\n\n/** Retrieves an order by ID. */\nexport function managementGetOrder(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __managementGetOrder({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.pricing_plans.v2.order',\n      method: 'GET' as any,\n      methodFqn:\n        'com.wixpress.membership.v2.orders.OrderManagementService.GetOrder',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressMembershipV2OrdersOrderManagementServiceUrl({\n        protoPath: '/v2/orders/{id}',\n        data: payload,\n        host,\n      }),\n      params: toURLSearchParams(payload),\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [\n              { path: 'order.startDate' },\n              { path: 'order.endDate' },\n              { path: 'order.earliestEndDate' },\n              { path: 'order.createdDate' },\n              { path: 'order.updatedDate' },\n              { path: 'order.cancellation.requestedDate' },\n              { path: 'order.pausePeriods.pauseDate' },\n              { path: 'order.pausePeriods.resumeDate' },\n              { path: 'order.currentCycle.startedDate' },\n              { path: 'order.currentCycle.endedDate' },\n              { path: 'order.cycles.startedDate' },\n              { path: 'order.cycles.endedDate' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __managementGetOrder;\n}\n\n/**\n * Retrieves a list of up to 50 pricing plan orders and details, given the specified sorting and filtering.\n *\n * By default, this endpoint will retrieve all orders and return them sorted by `createdDate` in `DESC`, descending order.\n * `sort.fieldName` supports `endDate` and `createdDate` fields and defaults to `ASC`, ascending order.\n */\nexport function managementListOrders(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __managementListOrders({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.pricing_plans.v2.order',\n      method: 'GET' as any,\n      methodFqn:\n        'com.wixpress.membership.v2.orders.OrderManagementService.ListOrders',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressMembershipV2OrdersOrderManagementServiceUrl({\n        protoPath: '/v2/orders',\n        data: payload,\n        host,\n      }),\n      params: toURLSearchParams(payload, true),\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [\n              { path: 'orders.startDate' },\n              { path: 'orders.endDate' },\n              { path: 'orders.earliestEndDate' },\n              { path: 'orders.createdDate' },\n              { path: 'orders.updatedDate' },\n              { path: 'orders.cancellation.requestedDate' },\n              { path: 'orders.pausePeriods.pauseDate' },\n              { path: 'orders.pausePeriods.resumeDate' },\n              { path: 'orders.currentCycle.startedDate' },\n              { path: 'orders.currentCycle.endedDate' },\n              { path: 'orders.cycles.startedDate' },\n              { path: 'orders.cycles.endedDate' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __managementListOrders;\n}\n\n/**\n * 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.\n *\n * New `endDate` must be later than the order's current `endDate`. Can't postpone orders that are unlimited.\n * Can't postpone an order with `status`: `PAUSED`.\n */\nexport function postponeEndDate(payload: object): RequestOptionsFactory<any> {\n  function __postponeEndDate({ host }: any) {\n    const serializedData = transformPaths(payload, [\n      {\n        transformFn: transformSDKTimestampToRESTTimestamp,\n        paths: [{ path: 'endDate' }],\n      },\n    ]);\n    const metadata = {\n      entityFqdn: 'wix.pricing_plans.v2.order',\n      method: 'PATCH' as any,\n      methodFqn:\n        'com.wixpress.membership.v2.orders.OrderManagementService.PostponeEndDate',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressMembershipV2OrdersOrderManagementServiceUrl({\n        protoPath: '/v2/orders/{id}',\n        data: serializedData,\n        host,\n      }),\n      data: serializedData,\n    };\n\n    return metadata;\n  }\n\n  return __postponeEndDate;\n}\n\n/**\n * Cancels an existing order.\n *\n * For orders with recurring payments, a cancellation can be set to occur either `IMMEDIATELY` or at the `NEXT_PAYMENT_DATE`.\n * For orders with one-time payments, a cancellation can only be set for `IMMEDIATELY`.\n *\n * #### Canceling during the free trial period.\n *\n * When a buyer cancels their order during the free trial period, the buyer's subscription expires at the end\n * of the free trial period and they will not be billed. The buyer may continue using the benefits until the end\n * of the free trial period.\n *\n * When a Wix user cancels an ordered plan during the free trial period, they choose whether to apply the cancellation\n * `IMMEDIATELY` or at the `NEXT_PAYMENT_DATE`. Canceling `IMMEDIATELY` will end the subscription for the buyer\n * immediately, even during the free trial period and the buyer won't be billed. Canceling at the\n * `NEXT_PAYMENT_DATE` allows the buyer to continue using the benefits of the subscription until the end of the free trial period.\n * Then, the subscription ends and the buyer is not billed.\n */\nexport function cancelOrder(payload: object): RequestOptionsFactory<any> {\n  function __cancelOrder({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.pricing_plans.v2.order',\n      method: 'POST' as any,\n      methodFqn:\n        'com.wixpress.membership.v2.orders.OrderManagementService.CancelOrder',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressMembershipV2OrdersOrderManagementServiceUrl({\n        protoPath: '/v2/orders/{id}/cancel',\n        data: payload,\n        host,\n      }),\n      data: payload,\n    };\n\n    return metadata;\n  }\n\n  return __cancelOrder;\n}\n\n/**\n * Marks an offline order as paid.\n * > __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.\n *\n * Marking an offline order as paid causes the following changes:\n * - The order's `lastPaymentStatus` changes to `\"PAID\"`.\n * - The order's status changes to either `\"PENDING\"` or `\"ACTIVE\"`, depending on the order's `startDate`.\n *\n * An error occurs if you attempt to:\n * - Mark an already-paid, offline order as paid. You cannot mark an offline order as paid twice.\n * - Mark an online order as paid. The Mark as Paid method is supported for offline orders only.\n */\nexport function markAsPaid(payload: object): RequestOptionsFactory<any> {\n  function __markAsPaid({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.pricing_plans.v2.order',\n      method: 'POST' as any,\n      methodFqn:\n        'com.wixpress.membership.v2.orders.OrderManagementService.MarkAsPaid',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressMembershipV2OrdersOrderManagementServiceUrl({\n        protoPath: '/v2/orders/{id}/mark-as-paid',\n        data: payload,\n        host,\n      }),\n      data: payload,\n    };\n\n    return metadata;\n  }\n\n  return __markAsPaid;\n}\n\n/**\n * Pauses an order. Calling this method changes the order status to `\"PAUSED\"` and updates the `pausePeriods` array.\n *\n * Only orders with `status`: `ACTIVE` can be paused.\n * For orders with recurring payments, it also pauses the payment schedule. Buyers are not charged when an order is paused.\n * Pausing an order affects the end date of the order by adding the time the order is paused to the `endDate`.\n * The `endDate` and the `earliestEndDate` for the order are adjusted to include the pause period when the order is resumed.\n *\n * To resume a paused order, call Resume Order.\n */\nexport function pauseOrder(payload: object): RequestOptionsFactory<any> {\n  function __pauseOrder({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.pricing_plans.v2.order',\n      method: 'POST' as any,\n      methodFqn:\n        'com.wixpress.membership.v2.orders.OrderManagementService.PauseOrder',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressMembershipV2OrdersOrderManagementServiceUrl({\n        protoPath: '/v2/orders/{id}/pause',\n        data: payload,\n        host,\n      }),\n      data: payload,\n    };\n\n    return metadata;\n  }\n\n  return __pauseOrder;\n}\n\n/**\n * Resumes a paused order. For orders with recurring payments, it also restarts the payment schedule.\n *\n * Resuming an order causes the following changes:\n * - The order status changes to `\"ACTIVE\"`.\n * - The `pausePeriods` array is updated.\n * - The `endDate` for the order is adjusted to include the pause period.\n * - For orders with recurring payments, the payment schedule is restarted.\n * - The `earliestEndDate` is adjusted to include the pause period. (This property is reserved for future use).\n *\n * To pause an order, call Pause Order.\n */\nexport function resumeOrder(payload: object): RequestOptionsFactory<any> {\n  function __resumeOrder({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.pricing_plans.v2.order',\n      method: 'POST' as any,\n      methodFqn:\n        'com.wixpress.membership.v2.orders.OrderManagementService.ResumeOrder',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressMembershipV2OrdersOrderManagementServiceUrl({\n        protoPath: '/v2/orders/{id}/resume',\n        data: payload,\n        host,\n      }),\n      data: payload,\n    };\n\n    return metadata;\n  }\n\n  return __resumeOrder;\n}\n","import {\n  memberGetOrder as publicMemberGetOrder,\n  memberListOrders as publicMemberListOrders,\n  requestCancellation as publicRequestCancellation,\n  createOnlineOrder as publicCreateOnlineOrder,\n  createOfflineOrder as publicCreateOfflineOrder,\n  getOnlineOrderPreview as publicGetOnlineOrderPreview,\n  getOfflineOrderPreview as publicGetOfflineOrderPreview,\n  getPricePreview as publicGetPricePreview,\n  managementGetOrder as publicManagementGetOrder,\n  managementListOrders as publicManagementListOrders,\n  postponeEndDate as publicPostponeEndDate,\n  cancelOrder as publicCancelOrder,\n  markAsPaid as publicMarkAsPaid,\n  pauseOrder as publicPauseOrder,\n  resumeOrder as publicResumeOrder,\n} from './pricing-plans-v2-order-orders.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n  BuildRESTFunction,\n  MaybeContext,\n  BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { onOrderCanceled as publicOnOrderCanceled } from './pricing-plans-v2-order-orders.public.js';\nimport { onOrderCreated as publicOnOrderCreated } from './pricing-plans-v2-order-orders.public.js';\nimport { onOrderStartDateChanged as publicOnOrderStartDateChanged } from './pricing-plans-v2-order-orders.public.js';\nimport { onOrderUpdated as publicOnOrderUpdated } from './pricing-plans-v2-order-orders.public.js';\nimport { onOrderAutoRenewCanceled as publicOnOrderAutoRenewCanceled } from './pricing-plans-v2-order-orders.public.js';\nimport { onOrderCycleStarted as publicOnOrderCycleStarted } from './pricing-plans-v2-order-orders.public.js';\nimport { onOrderEndDatePostponed as publicOnOrderEndDatePostponed } from './pricing-plans-v2-order-orders.public.js';\nimport { onOrderEnded as publicOnOrderEnded } from './pricing-plans-v2-order-orders.public.js';\nimport { onOrderMarkedAsPaid as publicOnOrderMarkedAsPaid } from './pricing-plans-v2-order-orders.public.js';\nimport { onOrderPaused as publicOnOrderPaused } from './pricing-plans-v2-order-orders.public.js';\nimport { onOrderPurchased as publicOnOrderPurchased } from './pricing-plans-v2-order-orders.public.js';\nimport { onOrderResumed as publicOnOrderResumed } from './pricing-plans-v2-order-orders.public.js';\nimport { onOrderStarted as publicOnOrderStarted } from './pricing-plans-v2-order-orders.public.js';\n\nexport const memberGetOrder: MaybeContext<\n  BuildRESTFunction<typeof publicMemberGetOrder> & typeof publicMemberGetOrder\n> = /*#__PURE__*/ createRESTModule(publicMemberGetOrder);\nexport const memberListOrders: MaybeContext<\n  BuildRESTFunction<typeof publicMemberListOrders> &\n    typeof publicMemberListOrders\n> = /*#__PURE__*/ createRESTModule(publicMemberListOrders);\nexport const requestCancellation: MaybeContext<\n  BuildRESTFunction<typeof publicRequestCancellation> &\n    typeof publicRequestCancellation\n> = /*#__PURE__*/ createRESTModule(publicRequestCancellation);\nexport const createOnlineOrder: MaybeContext<\n  BuildRESTFunction<typeof publicCreateOnlineOrder> &\n    typeof publicCreateOnlineOrder\n> = /*#__PURE__*/ createRESTModule(publicCreateOnlineOrder);\nexport const createOfflineOrder: MaybeContext<\n  BuildRESTFunction<typeof publicCreateOfflineOrder> &\n    typeof publicCreateOfflineOrder\n> = /*#__PURE__*/ createRESTModule(publicCreateOfflineOrder);\nexport const getOnlineOrderPreview: MaybeContext<\n  BuildRESTFunction<typeof publicGetOnlineOrderPreview> &\n    typeof publicGetOnlineOrderPreview\n> = /*#__PURE__*/ createRESTModule(publicGetOnlineOrderPreview);\nexport const getOfflineOrderPreview: MaybeContext<\n  BuildRESTFunction<typeof publicGetOfflineOrderPreview> &\n    typeof publicGetOfflineOrderPreview\n> = /*#__PURE__*/ createRESTModule(publicGetOfflineOrderPreview);\nexport const getPricePreview: MaybeContext<\n  BuildRESTFunction<typeof publicGetPricePreview> & typeof publicGetPricePreview\n> = /*#__PURE__*/ createRESTModule(publicGetPricePreview);\nexport const managementGetOrder: MaybeContext<\n  BuildRESTFunction<typeof publicManagementGetOrder> &\n    typeof publicManagementGetOrder\n> = /*#__PURE__*/ createRESTModule(publicManagementGetOrder);\nexport const managementListOrders: MaybeContext<\n  BuildRESTFunction<typeof publicManagementListOrders> &\n    typeof publicManagementListOrders\n> = /*#__PURE__*/ createRESTModule(publicManagementListOrders);\nexport const postponeEndDate: MaybeContext<\n  BuildRESTFunction<typeof publicPostponeEndDate> & typeof publicPostponeEndDate\n> = /*#__PURE__*/ createRESTModule(publicPostponeEndDate);\nexport const cancelOrder: MaybeContext<\n  BuildRESTFunction<typeof publicCancelOrder> & typeof publicCancelOrder\n> = /*#__PURE__*/ createRESTModule(publicCancelOrder);\nexport const markAsPaid: MaybeContext<\n  BuildRESTFunction<typeof publicMarkAsPaid> & typeof publicMarkAsPaid\n> = /*#__PURE__*/ createRESTModule(publicMarkAsPaid);\nexport const pauseOrder: MaybeContext<\n  BuildRESTFunction<typeof publicPauseOrder> & typeof publicPauseOrder\n> = /*#__PURE__*/ createRESTModule(publicPauseOrder);\nexport const resumeOrder: MaybeContext<\n  BuildRESTFunction<typeof publicResumeOrder> & typeof publicResumeOrder\n> = /*#__PURE__*/ createRESTModule(publicResumeOrder);\n/**\n * Triggered when an order is canceled.\n *\n * This webhook is triggered either immediately or at the end of the current payment cycle, as follows:\n * + If the order is canceled and `effectiveAt` is set to `IMMEDIATELY`, the webhook is triggered immediately when canceled.\n * + 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.\n */\nexport const onOrderCanceled: BuildEventDefinition<\n  typeof publicOnOrderCanceled\n> &\n  typeof publicOnOrderCanceled = createEventModule(publicOnOrderCanceled);\n/**\n * Triggered when an order is created.\n */\nexport const onOrderCreated: BuildEventDefinition<typeof publicOnOrderCreated> &\n  typeof publicOnOrderCreated = createEventModule(publicOnOrderCreated);\n/**\n * Triggered when an order's `startDate` is changed.\n */\nexport const onOrderStartDateChanged: BuildEventDefinition<\n  typeof publicOnOrderStartDateChanged\n> &\n  typeof publicOnOrderStartDateChanged = createEventModule(\n  publicOnOrderStartDateChanged\n);\n/**\n * Triggered for any of the following update events:\n *\n * + Order is paid for. Order Purchased is also triggered.\n * + Order reaches its start date or end date. Order Started and Order Ended, respectively, are also triggered.\n * + New payment cycle of an order starts. Order Cycle Started is also triggered.\n * + Offline order is marked as paid. Order Marked As Paid is also triggered.\n * + End date of the order is postponed. Order End Date Postponed is also triggered\n * + Order is paused, or a paused order is resumed. Order Paused and Order Resumed, respectively, are also triggered.\n * + Order is canceled, either immediately or at the end of the payment cycle. Order Canceled and Order Auto Renew Canceled, respectively, are also triggered.\n */\nexport const onOrderUpdated: BuildEventDefinition<typeof publicOnOrderUpdated> &\n  typeof publicOnOrderUpdated = createEventModule(publicOnOrderUpdated);\n/**\n * Triggered when an order is canceled and `effectiveAt` is set to `NEXT_PAYMENT_DATE`.\n *\n * This webhook is *not* triggered in the following scenarios:\n * + When an order is canceled and `effectiveAt` is set to `IMMEDIATELY`. Instead, at the time of cancellation, Order Canceled is triggered.\n * + 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.\n */\nexport const onOrderAutoRenewCanceled: BuildEventDefinition<\n  typeof publicOnOrderAutoRenewCanceled\n> &\n  typeof publicOnOrderAutoRenewCanceled = createEventModule(\n  publicOnOrderAutoRenewCanceled\n);\n/**\n * Triggered at the start of a new payment cycle for an existing order.\n *\n * Not triggered at the initial start of an offline order.\n */\nexport const onOrderCycleStarted: BuildEventDefinition<\n  typeof publicOnOrderCycleStarted\n> &\n  typeof publicOnOrderCycleStarted = createEventModule(\n  publicOnOrderCycleStarted\n);\n/**\n * Triggered when an order's `endDate` is postponed.\n */\nexport const onOrderEndDatePostponed: BuildEventDefinition<\n  typeof publicOnOrderEndDatePostponed\n> &\n  typeof publicOnOrderEndDatePostponed = createEventModule(\n  publicOnOrderEndDatePostponed\n);\n/**\n * Triggered when an order ends.\n *\n * This webhook is triggered:\n * + When an order expires at the end of the current payment cycle.\n * + When an order is canceled and `effectiveAt` is set to `IMMEDIATELY`.\n */\nexport const onOrderEnded: BuildEventDefinition<typeof publicOnOrderEnded> &\n  typeof publicOnOrderEnded = createEventModule(publicOnOrderEnded);\n/**\n * Triggered when an offline order is marked as paid.\n */\nexport const onOrderMarkedAsPaid: BuildEventDefinition<\n  typeof publicOnOrderMarkedAsPaid\n> &\n  typeof publicOnOrderMarkedAsPaid = createEventModule(\n  publicOnOrderMarkedAsPaid\n);\n/**\n * Triggered when an order is paused.\n */\nexport const onOrderPaused: BuildEventDefinition<typeof publicOnOrderPaused> &\n  typeof publicOnOrderPaused = createEventModule(publicOnOrderPaused);\n/**\n * Triggered for any of the following purchase events:\n * + Order is paid in full.\n * + At least 1 order cycle payment is paid for.\n * + Offline order is created, even if not yet marked as paid.\n * + Free order is created.\n */\nexport const onOrderPurchased: BuildEventDefinition<\n  typeof publicOnOrderPurchased\n> &\n  typeof publicOnOrderPurchased = createEventModule(publicOnOrderPurchased);\n/**\n * Triggered when a paused order is resumed.\n */\nexport const onOrderResumed: BuildEventDefinition<typeof publicOnOrderResumed> &\n  typeof publicOnOrderResumed = createEventModule(publicOnOrderResumed);\n/**\n * Triggered when an order reaches its `startDate`. Applies to both purchased and free orders.\n */\nexport const onOrderStarted: BuildEventDefinition<typeof publicOnOrderStarted> &\n  typeof publicOnOrderStarted = createEventModule(publicOnOrderStarted);\n\nexport {\n  PeriodUnit,\n  OrderType,\n  OrderMethod,\n  OrderStatus,\n  CancellationCause,\n  CancellationEffectiveAt,\n  PaymentStatus,\n  Status,\n  Set,\n  SortOrder,\n  WebhookIdentityType,\n  ReasonNotSuspendable,\n} from './pricing-plans-v2-order-orders.universal.js';\nexport {\n  Order,\n  Buyer,\n  PriceDetails,\n  PriceDetailsPricingModelOneOf,\n  Tax,\n  Recurrence,\n  Duration,\n  Coupon,\n  PricingDetails,\n  PricingDetailsPricingModelOneOf,\n  SpannedPrice,\n  PriceDuration,\n  Price,\n  Fee,\n  Cancellation,\n  PausePeriod,\n  CurrentCycle,\n  OrderCycle,\n  FormData,\n  DomainEvent,\n  DomainEventBodyOneOf,\n  EntityCreatedEvent,\n  RestoreInfo,\n  EntityUpdatedEvent,\n  EntityDeletedEvent,\n  ActionEvent,\n  Empty,\n  MemberGetOrderRequest,\n  MemberGetOrderResponse,\n  MemberListOrdersRequest,\n  Sorting,\n  MemberListOrdersResponse,\n  PagingMetadataV2,\n  Cursors,\n  QueryOrdersRequest,\n  QueryV2,\n  QueryV2PagingMethodOneOf,\n  Paging,\n  CursorPaging,\n  QueryOrdersResponse,\n  RequestCancellationRequest,\n  RequestCancellationResponse,\n  OrderCanceled,\n  MessageEnvelope,\n  IdentificationData,\n  IdentificationDataIdOneOf,\n  AccountInfo,\n  CreateOnlineOrderRequest,\n  OnBehalf,\n  CreateOnlineOrderResponse,\n  CouponsError,\n  CreateGuestOnlineOrderRequest,\n  Captcha,\n  Guest,\n  CreateGuestOnlineOrderResponse,\n  CreateOfflineOrderRequest,\n  CreateOfflineOrderResponse,\n  CreateExternalOrderRequest,\n  CreateExternalOrderResponse,\n  GetOnlineOrderPreviewRequest,\n  GetOnlineOrderPreviewResponse,\n  GetGuestOnlineOrderPreviewRequest,\n  GetGuestOnlineOrderPreviewResponse,\n  GetOfflineOrderPreviewRequest,\n  GetOfflineOrderPreviewResponse,\n  GetPricePreviewRequest,\n  GetPricePreviewResponse,\n  ChangeStartDateRequest,\n  ChangeStartDateResponse,\n  OrderStartDateChanged,\n  ApplyCouponRequest,\n  ApplyCouponResponse,\n  SetSubmissionRequest,\n  SetSubmissionResponse,\n  OrderPurchased,\n  OrderStarted,\n  OrderCycleStarted,\n  OrderAutoRenewCanceled,\n  OrderEnded,\n  GetOrderRequest,\n  GetOrderResponse,\n  ListOrdersRequest,\n  ListOrdersResponse,\n  OrdersQueryOrdersRequest,\n  OrdersQueryOrdersResponse,\n  GetOrdersStatsRequest,\n  GetOrdersStatsResponse,\n  GetAvailableOrderActionsRequest,\n  GetAvailableOrderActionsResponse,\n  PostponeEndDateRequest,\n  PostponeEndDateResponse,\n  OrderEndDatePostponed,\n  CancelOrderRequest,\n  CancelOrderResponse,\n  MarkAsPaidRequest,\n  MarkAsPaidResponse,\n  OrderMarkedAsPaid,\n  PauseOrderRequest,\n  PauseOrderResponse,\n  OrderPaused,\n  BulkPauseOrderRequest,\n  BulkPauseOrderResponse,\n  BulkOrderResult,\n  ItemMetadata,\n  ApplicationError,\n  BulkActionMetadata,\n  ResumeOrderRequest,\n  ResumeOrderResponse,\n  OrderResumed,\n  BulkResumeOrderRequest,\n  BulkResumeOrderResponse,\n  BaseEventMetadata,\n  EventMetadata,\n  AccountInfoMetadata,\n  OrderCanceledEnvelope,\n  OrderCreatedEnvelope,\n  OrderStartDateChangedEnvelope,\n  OrderUpdatedEnvelope,\n  OrderAutoRenewCanceledEnvelope,\n  OrderCycleStartedEnvelope,\n  OrderEndDatePostponedEnvelope,\n  OrderEndedEnvelope,\n  OrderMarkedAsPaidEnvelope,\n  OrderPausedEnvelope,\n  OrderPurchasedEnvelope,\n  OrderResumedEnvelope,\n  OrderStartedEnvelope,\n  MemberGetOrderOptions,\n  MemberListOrdersOptions,\n  CreateOnlineOrderOptions,\n  CreateOfflineOrderOptions,\n  GetOnlineOrderPreviewOptions,\n  GetOfflineOrderPreviewOptions,\n  GetPricePreviewOptions,\n  ManagementGetOrderOptions,\n  ManagementListOrdersOptions,\n} from './pricing-plans-v2-order-orders.universal.js';\nexport {\n  PeriodUnitWithLiterals,\n  OrderTypeWithLiterals,\n  OrderMethodWithLiterals,\n  OrderStatusWithLiterals,\n  CancellationCauseWithLiterals,\n  CancellationEffectiveAtWithLiterals,\n  PaymentStatusWithLiterals,\n  StatusWithLiterals,\n  SetWithLiterals,\n  SortOrderWithLiterals,\n  WebhookIdentityTypeWithLiterals,\n  ReasonNotSuspendableWithLiterals,\n  CreateOnlineOrderApplicationErrors,\n  CreateOnlineOrderValidationErrors,\n  CreateOfflineOrderApplicationErrors,\n  CreateOfflineOrderValidationErrors,\n  GetOnlineOrderPreviewApplicationErrors,\n  GetOnlineOrderPreviewValidationErrors,\n  GetOfflineOrderPreviewApplicationErrors,\n  GetOfflineOrderPreviewValidationErrors,\n  GetPricePreviewApplicationErrors,\n} from './pricing-plans-v2-order-orders.universal.js';\n"],"mappings":";AAAA,SAAS,2CAAAA,gDAA+C;AACxD,SAAS,wCAAAC,6CAA4C;AACrD,SAAS,kBAAAC,uBAAsB;AAC/B,SAAS,uBAAqD;;;ACH9D,SAAS,kBAAkB,yBAAyB;AACpD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xD,IAAMC,mBAEK,iCAAiBA,gBAAqB;AACjD,IAAMC,sBAGK,iCAAiBA,mBAAwB;AACpD,IAAMC,wBAGK,iCAAiBA,qBAA0B;AACtD,IAAMC,mBAEK,iCAAiBA,gBAAqB;AACjD,IAAMC,eAEK,iCAAiBA,YAAiB;AAC7C,IAAMC,cAEK,iCAAiBA,WAAgB;AAC5C,IAAMC,cAEK,iCAAiBA,WAAgB;AAC5C,IAAMC,eAEK,iCAAiBA,YAAiB;AAQ7C,IAAMC,mBAGoB,kBAAkB,eAAqB;AAIjE,IAAMC,kBACmB,kBAAkB,cAAoB;AAI/D,IAAMC,2BAG4B;AAAA,EACvC;AACF;AAYO,IAAMC,kBACmB,kBAAkB,cAAoB;AAQ/D,IAAMC,4BAG6B;AAAA,EACxC;AACF;AAMO,IAAMC,uBAGwB;AAAA,EACnC;AACF;AAIO,IAAMC,2BAG4B;AAAA,EACvC;AACF;AAQO,IAAMC,gBACiB,kBAAkB,YAAkB;AAI3D,IAAMC,uBAGwB;AAAA,EACnC;AACF;AAIO,IAAMC,iBACkB,kBAAkB,aAAmB;AAQ7D,IAAMC,oBAGqB,kBAAkB,gBAAsB;AAInE,IAAMC,kBACmB,kBAAkB,cAAoB;AAI/D,IAAMC,kBACmB,kBAAkB,cAAoB;","names":["renameKeysFromRESTResponseToSDKResponse","transformRESTTimestampToSDKTimestamp","transformPaths","payload","PeriodUnit","OrderType","OrderMethod","OrderStatus","CancellationCause","CancellationEffectiveAt","PaymentStatus","Status","Set","SortOrder","WebhookIdentityType","ReasonNotSuspendable","memberGetOrder","memberListOrders","requestCancellation","createOnlineOrder","createOfflineOrder","getOnlineOrderPreview","getOfflineOrderPreview","getPricePreview","managementGetOrder","managementListOrders","postponeEndDate","cancelOrder","markAsPaid","pauseOrder","resumeOrder","memberGetOrder","memberListOrders","requestCancellation","createOnlineOrder","createOfflineOrder","getOnlineOrderPreview","getOfflineOrderPreview","getPricePreview","managementGetOrder","managementListOrders","postponeEndDate","cancelOrder","markAsPaid","pauseOrder","resumeOrder","renameKeysFromRESTResponseToSDKResponse","transformPaths","transformRESTTimestampToSDKTimestamp","memberGetOrder","memberListOrders","requestCancellation","createOnlineOrder","createOfflineOrder","getOnlineOrderPreview","getOfflineOrderPreview","getPricePreview","managementGetOrder","managementListOrders","postponeEndDate","cancelOrder","markAsPaid","pauseOrder","resumeOrder","onOrderCanceled","onOrderCreated","onOrderStartDateChanged","onOrderUpdated","onOrderAutoRenewCanceled","onOrderCycleStarted","onOrderEndDatePostponed","onOrderEnded","onOrderMarkedAsPaid","onOrderPaused","onOrderPurchased","onOrderResumed","onOrderStarted"]}