@wix/auto_sdk_subscription_subscriptions 1.0.21 → 1.0.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +20 -20
- package/build/cjs/index.js +2 -4
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +21 -25
- package/build/cjs/index.typings.js +2 -4
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +1 -3
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +20 -20
- package/build/es/index.mjs +2 -4
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +21 -25
- package/build/es/index.typings.mjs +2 -4
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +1 -3
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +21 -21
- package/build/internal/cjs/index.js +2 -4
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +22 -26
- package/build/internal/cjs/index.typings.js +2 -4
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +1 -3
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +21 -21
- package/build/internal/es/index.mjs +2 -4
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +22 -26
- package/build/internal/es/index.typings.mjs +2 -4
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +1 -3
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../index.typings.ts","../../../src/billing-v1-subscription-subscriptions.universal.ts","../../../src/billing-v1-subscription-subscriptions.http.ts"],"sourcesContent":["export * from './src/billing-v1-subscription-subscriptions.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 ambassadorWixBillingV1Subscription from './billing-v1-subscription-subscriptions.http.js';\nimport { transformSDKAddressToRESTAddress } from '@wix/sdk-runtime/transformations/address';\nimport { transformRESTAddressToSDKAddress } from '@wix/sdk-runtime/transformations/address';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\nexport interface Subscription {\n /**\n * Subscription's unique id. Automatically generated and read-only.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Date when subscription was created\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date when subscription was updated\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Revision of subscription. Increments upon changes\n * @readonly\n */\n revision?: string | null;\n /**\n * Subscription name: minLength is 1, maxLength is 150\n * @maxLength 150\n */\n name?: string;\n /**\n * Subscription description. Optional.\n * @maxLength 500\n */\n description?: string | null;\n /**\n * 3. No Start Date:\n * - If the start_date is not provided, this field will default to \"now\",\n * meaning the subscription will start immediately.\n */\n startDate?: Date | null;\n /**\n * Represents when the subscription will end, relevant for subscriptions with a termed period.\n * If not provided, will be calculated based on billing schedule. Should be empty for evergreen subscription.\n * Note: A 13-hour tolerance is applied when validating the end date to handle for time zone differences and minor discrepancies.\n */\n endDate?: Date | null;\n /** Business origin subscription is coming from. In site-level subscription it will be vertical app_id and entity_id */\n origin?: BusinessOrigin;\n /** Customer information like id and identity type (member or contact) */\n customer?: Customer;\n /**\n * Status of subscription\n * @readonly\n */\n status?: SubscriptionStatusEnumSubscriptionStatusWithLiterals;\n /** Billing details parameters including schedule, currency, etc. */\n billingSettings?: BillingSettings;\n /**\n * Includes many attributes about billing status of the subscription\n * @readonly\n */\n billingStatus?: BillingStatus;\n /** Shipping address associated with subscription. At the moment used only for payments. Optional. */\n shippingAddress?: FullAddressDetails;\n /** Restrictions on possible subscription actions. If not provided, default policies are all restrictions enabled. */\n policies?: SubscriptionPolicies;\n /**\n * Information related to either paused subscription or scheduled for future pause\n * @readonly\n */\n pauseInfo?: PauseInfo;\n /**\n * Information related to cancellation for already canceled subscription or scheduled for cancel\n * @readonly\n */\n cancellationInfo?: CancellationInfo;\n /**\n * Pending update for the next billing cycle\n * @readonly\n */\n pendingUpdateData?: SubscriptionUpdateData;\n /**\n * Key / Value store to keep up to 10 additional values related to the subscription.\n * Key max length = 50, Value max length = 200. Value can not be empty.\n * Should not include any sensitive or PII information.\n * @maxSize 10\n */\n metadata?: Record<string, string>;\n /**\n * Pending update for a specific date\n * @readonly\n */\n specificDatePendingUpdateData?: SpecificDateSubscriptionUpdateData;\n /**\n * ChangesCounter of subscription. Increments upon every change to the domain\n * @readonly\n */\n changesCounter?: string | null;\n /**\n * Billing order id. Optional.\n * @format GUID\n */\n orderId?: string | null;\n /** Platform origin subscription is coming from. */\n platformOrigin?: PlatformOrigin;\n /**\n * The Business Location ID represents a business location in an external service, which includes the business address.\n * @format GUID\n */\n businessLocationId?: string | null;\n /**\n * items, minSize is 1, maxSize is 100\n * @maxSize 100\n */\n items?: Item[];\n}\n\nexport interface BusinessOrigin {\n /** @format GUID */\n appId?: string | null;\n /** @format GUID */\n entityId?: string | null;\n}\n\nexport interface Customer extends CustomerIdOneOf {\n /**\n * Visitor ID of the customer. Available when the customer is an anonymous\n * site visitor.\n * @format GUID\n */\n visitorId?: string;\n /**\n * Contact ID of the customer. Available when the customer is a\n * [contact](https://dev.wix.com/docs/rest/api-reference/people-communications/contacts/contacts/contact-v-4#contact-object).\n * @format GUID\n */\n contactId?: string;\n /**\n * Member ID of the customer. Available when the customer is a\n * [member](https://dev.wix.com/docs/rest/api-reference/people-communications/members/members#member-object).\n * @format GUID\n */\n memberId?: string;\n /**\n * Wix account ID\n * @format GUID\n */\n accountId?: string;\n}\n\n/** @oneof */\nexport interface CustomerIdOneOf {\n /**\n * Visitor ID of the customer. Available when the customer is an anonymous\n * site visitor.\n * @format GUID\n */\n visitorId?: string;\n /**\n * Contact ID of the customer. Available when the customer is a\n * [contact](https://dev.wix.com/docs/rest/api-reference/people-communications/contacts/contacts/contact-v-4#contact-object).\n * @format GUID\n */\n contactId?: string;\n /**\n * Member ID of the customer. Available when the customer is a\n * [member](https://dev.wix.com/docs/rest/api-reference/people-communications/members/members#member-object).\n * @format GUID\n */\n memberId?: string;\n /**\n * Wix account ID\n * @format GUID\n */\n accountId?: string;\n}\n\nexport enum SubscriptionStatusEnumSubscriptionStatus {\n UNKNOWN = 'UNKNOWN',\n /** Subscription created in this status, but hasn't been paid for yet. Filtered out from subscriptions querying. */\n DRAFT = 'DRAFT',\n /** Subscription that will be active in future. */\n PENDING = 'PENDING',\n /** Subscription is active */\n ACTIVE = 'ACTIVE',\n /** Subscription is paused */\n PAUSED = 'PAUSED',\n /** Subscription was ended */\n ENDED = 'ENDED',\n /** Subscription was canceled or auto-renew off. Ended before its time. */\n CANCELED = 'CANCELED',\n}\n\n/** @enumType */\nexport type SubscriptionStatusEnumSubscriptionStatusWithLiterals =\n | SubscriptionStatusEnumSubscriptionStatus\n | 'UNKNOWN'\n | 'DRAFT'\n | 'PENDING'\n | 'ACTIVE'\n | 'PAUSED'\n | 'ENDED'\n | 'CANCELED';\n\nexport interface BillingSettings {\n /**\n * Currency of all subscription items prices. Three letter ISO currency code. https://en.wikipedia.org/wiki/ISO_4217\n * @format CURRENCY\n */\n currency?: string;\n /** customer payment source to make recurring payments with */\n paymentMethod?: PaymentMethod;\n /** Instructs how payments will be collected. */\n collectionMethod?: CollectionMethodEnumCollectionMethodWithLiterals;\n /**\n * Duration of cycle. For example, 1 MONTH, 2 WEEKS, 7 DAYS, 1 YEAR etc.\n * Shortest supported cycle duration is 7 days.\n */\n cycleDuration?: Duration;\n /**\n * Number of billing cycles. If not set subscription auto-renewed until cycle-auto-renew will be disabled.\n * @min 1\n */\n totalCycles?: number | null;\n /** If set to false, subscription will be canceled at the next billing cycle. */\n cycleAutoRenew?: boolean;\n /** Billing Schedule to be defined in order to override default billing schedule */\n customBillingSchedule?: CustomBillingSchedule;\n /** Definition of trial period */\n freeTrialDuration?: Duration;\n /**\n * Shipping costs collected each cycle\n * @format DECIMAL_VALUE\n * @deprecated\n * @replacedBy shipping_charges\n * @targetRemovalDate 2024-10-31\n */\n shippingFee?: string | null;\n /** Billing address associated with subscription to be used for payments. */\n billingAddress?: FullAddressDetails;\n taxSettings?: TaxSettings;\n /**\n * Fees that are only added to an invoice when a specific condition is met.\n * For example, a setup fee that only applies to the very first invoice of a\n * subscription.\n *\n * Max: 5 additional fees\n * @maxSize 5\n */\n additionalFees?: AdditionalFee[];\n /** Shipping fee charges */\n shippingCharges?: ShippingCharges;\n /**\n * General discount that applied to all items in the subscription\n * @maxSize 5\n */\n discounts?: Discount[];\n /**\n * Details about the external collection service.\n * Only set when the collection_method is EXTERNAL.\n */\n externalCollectionDetails?: ExternalCollectionDetails;\n}\n\nexport interface PaymentMethod {\n /**\n * reference to payment source id stored in payments system\n * @format GUID\n */\n _id?: string;\n}\n\nexport enum CollectionMethodEnumCollectionMethod {\n UNKNOWN = 'UNKNOWN',\n /** Subscriber automatically charged */\n AUTO_CHARGE = 'AUTO_CHARGE',\n /** Payments manually collected and managed by owner */\n OFFLINE = 'OFFLINE',\n /** Payment will be collected somehow. Billing only issues invoice per cycle. */\n SEND_INVOICE = 'SEND_INVOICE',\n /** Payment will be collected externally */\n EXTERNAL = 'EXTERNAL',\n /** Indicates the product has a zero amount, meaning its free with no payment required. */\n FREE = 'FREE',\n}\n\n/** @enumType */\nexport type CollectionMethodEnumCollectionMethodWithLiterals =\n | CollectionMethodEnumCollectionMethod\n | 'UNKNOWN'\n | 'AUTO_CHARGE'\n | 'OFFLINE'\n | 'SEND_INVOICE'\n | 'EXTERNAL'\n | 'FREE';\n\nexport interface Duration {\n /** Duration unit: DAY, WEEK, MONTH, YEAR */\n unit?: DurationUnitWithLiterals;\n /**\n * Amount of units. For example, 1 MONTH, 1 YEAR, 2 WEEKS, etc. Optional. Default is 1.\n * @min 1\n */\n count?: number | null;\n}\n\nexport enum DurationUnit {\n UNKNOWN = 'UNKNOWN',\n DAY = 'DAY',\n WEEK = 'WEEK',\n MONTH = 'MONTH',\n YEAR = 'YEAR',\n}\n\n/** @enumType */\nexport type DurationUnitWithLiterals =\n | DurationUnit\n | 'UNKNOWN'\n | 'DAY'\n | 'WEEK'\n | 'MONTH'\n | 'YEAR';\n\nexport interface CustomBillingSchedule {\n /**\n * Amount of cycles to be paid on Subscription creation, currently only cycles_to_pay_on_creation equals to 1 is supported\n * When used with Subscription.start_date, Subscription cycles will be paid on creation but Subscription will be activated in the future\n * @min 1\n * @max 1\n */\n cyclesToPayOnCreation?: number | null;\n}\n\nexport interface FullAddressDetails {\n /** Details about the person associated with the address. */\n contactDetails?: FullAddressContactDetails;\n /** Information about the address. */\n address?: Address;\n}\n\nexport interface FullAddressContactDetails {\n /** First name of the contact. */\n firstName?: string | null;\n /** Last name of the contact. */\n lastName?: string | null;\n /**\n * Phone number of the contact.\n * @format PHONE\n */\n phone?: string | null;\n /** Company associated with the contact. */\n company?: string | null;\n /**\n * Email address of the contact.\n * @format EMAIL\n */\n email?: string | null;\n}\n\nexport interface Address extends AddressStreetOneOf {\n /** Street name and number. */\n streetAddress?: StreetAddress;\n /** Main address line, usually street and number as free text. */\n addressLine1?: string | null;\n /**\n * 2-letter country code in\n * [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)\n * format.\n * @format COUNTRY\n */\n country?: string | null;\n /**\n * Subdivision. Usually a state, region, prefecture, or province code,\n * according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2).\n */\n subdivision?: string | null;\n /** City name. */\n city?: string | null;\n /** Zip/postal code. */\n postalCode?: string | null;\n}\n\n/** @oneof */\nexport interface AddressStreetOneOf {\n /** Street name and number. */\n streetAddress?: StreetAddress;\n /** Main address line, usually street and number as free text. */\n addressLine?: string | null;\n}\n\nexport interface StreetAddress {\n /** Street number. */\n number?: string;\n /** Street name. */\n name?: string;\n}\n\nexport interface TaxSettings {\n /** If true then taxes are included in given prices */\n inclusive?: boolean;\n}\n\nexport interface AdditionalFee {\n /**\n * Name of the conditional fee.\n *\n * Max: 500 characters\n * @maxLength 500\n */\n name?: string;\n /**\n * Amount of the conditional fee.\n *\n * Min: `0.01`\n * @decimalValue options { gt:0.00 }\n */\n amount?: string;\n /**\n * When the fee is added to the invoice.\n *\n * + `UNKNOWN_FEE_TRIGGER`: There is no information about when the fee is added to an invoice.\n * + `FIRST_PAYMENT`: The fee is only added to the very first invoice of a subscription.\n * @deprecated When the fee is added to the invoice.\n *\n * + `UNKNOWN_FEE_TRIGGER`: There is no information about when the fee is added to an invoice.\n * + `FIRST_PAYMENT`: The fee is only added to the very first invoice of a subscription.\n * @replacedBy cycles\n * @targetRemovalDate 2025-12-31\n */\n trigger?: AdditionalFeeTriggerWithLiterals;\n /** Information about the tax of the conditional fee. */\n tax?: Tax;\n /**\n * Specifies the cycles during which the fee will be applied. If this field is provided,\n * it determines the exact range of cycles the fee applies to. The logic is as follows:\n *\n * - `cycle_from`: The first cycle the fee will be added to. Must be greater than 0.\n * - `number_of_cycles`: The number of consecutive cycles the fee will be applied to,\n * starting from `cycle_from`. If not specified, the fee applies to all cycles starting\n * from `cycle_from`.\n *\n * Example:\n * - `cycle_from = 1, number_of_cycles = 3`: Fee applies to cycles 1, 2, and 3.\n * - `cycle_from = 2, number_of_cycles = None`: Fee applies to cycles 2 and onward indefinitely.\n *\n * If `cycles` is not specified (`None`), the fee will be applied on all cycles.\n */\n cycles?: Cycles;\n /** Indicates the source of the fee, Contains app_id and entity_id */\n origin?: Origin;\n}\n\nexport enum AdditionalFeeTrigger {\n UNKNOWN = 'UNKNOWN',\n /** Charge upon subscription first payment */\n FIRST_PAYMENT = 'FIRST_PAYMENT',\n}\n\n/** @enumType */\nexport type AdditionalFeeTriggerWithLiterals =\n | AdditionalFeeTrigger\n | 'UNKNOWN'\n | 'FIRST_PAYMENT';\n\nexport interface Tax extends TaxValueOneOf {\n /**\n * Tax amount for the invoice's line item. Available when the tax is an\n * amount and not a precentage.\n *\n * Min: `0.01`\n * @decimalValue options { gt:0.00 }\n */\n amount?: string;\n /**\n * Tax amount for the invoice's line item price and application fee.\n * Can't be combined with `invoiceItems.priceDetails.discount`.\n * Available when the tax is a precentage and not an amount.\n *\n * Min: `0.01`\n * Max: `100`\n * @decimalValue options { gt:0.00, lte:100 }\n */\n percentage?: string;\n /** Dynamic tax calculation */\n dynamic?: DynamicTax;\n}\n\n/** @oneof */\nexport interface TaxValueOneOf {\n /**\n * Tax amount for the invoice's line item. Available when the tax is an\n * amount and not a precentage.\n *\n * Min: `0.01`\n * @decimalValue options { gt:0.00 }\n */\n amount?: string;\n /**\n * Tax amount for the invoice's line item price and application fee.\n * Can't be combined with `invoiceItems.priceDetails.discount`.\n * Available when the tax is a precentage and not an amount.\n *\n * Min: `0.01`\n * Max: `100`\n * @decimalValue options { gt:0.00, lte:100 }\n */\n percentage?: string;\n /** Dynamic tax calculation */\n dynamic?: DynamicTax;\n}\n\nexport interface DynamicTax {\n /**\n * Tax group ID used to calculate tax, default will be used if not available\n * @format GUID\n */\n taxGroupId?: string | null;\n /** Taxable address used to calculate tax */\n taxableAddressType?: TaxableAddressTypeWithLiterals;\n}\n\nexport enum TaxableAddressType {\n UNKNOWN = 'UNKNOWN',\n /** Tax will be calculated using a single address */\n BUSINESS = 'BUSINESS',\n /** Tax will be calculated using multiple address (from BUSINESS to BILLING) */\n BILLING = 'BILLING',\n /** Tax will be calculated using multiple address (from BUSINESS to SHIPPING) */\n SHIPPING = 'SHIPPING',\n}\n\n/** @enumType */\nexport type TaxableAddressTypeWithLiterals =\n | TaxableAddressType\n | 'UNKNOWN'\n | 'BUSINESS'\n | 'BILLING'\n | 'SHIPPING';\n\nexport interface Cycles {\n /**\n * The cycle will start. Minimum cycle number is 1\n * @min 1\n */\n cycleFrom?: number;\n /**\n * Number of cycles to be applied on. In order to apply a on all cycles until the end of the subscription, this field should be empty.\n * @min 1\n */\n numberOfCycles?: number | null;\n}\n\nexport interface Origin {\n /** @format GUID */\n appId?: string;\n /** @format GUID */\n entityId?: string;\n}\n\nexport interface ShippingCharges {\n /**\n * Amount of the shipping fee in `0.00` format.\n *\n * Min: `0.01`\n * @decimalValue options { gte:0.00, maxScale:2 }\n */\n amount?: string;\n /** Tax of the shipping fee */\n tax?: Tax;\n /** @maxSize 5 */\n discounts?: Discount[];\n}\n\nexport interface Discount extends DiscountValueOneOf {\n /**\n * Discount amount.\n * Available when the discount is an amount.\n *\n * Min: `0.01`\n * @decimalValue options { gt:0.00 }\n */\n amount?: string;\n /**\n * Discount percentage.\n * Available when the discount is a parcentage value.\n *\n * Min: `0.01`\n * Max: `100`\n * @decimalValue options { gt:0.00, lte:100 }\n */\n percentage?: string;\n cycles?: DiscountCycles;\n /** Discount origin is coming from. Contains app_id and entity_id */\n origin?: DiscountOrigin;\n}\n\n/** @oneof */\nexport interface DiscountValueOneOf {\n /**\n * Discount amount.\n * Available when the discount is an amount.\n *\n * Min: `0.01`\n * @decimalValue options { gt:0.00 }\n */\n amount?: string;\n /**\n * Discount percentage.\n * Available when the discount is a parcentage value.\n *\n * Min: `0.01`\n * Max: `100`\n * @decimalValue options { gt:0.00, lte:100 }\n */\n percentage?: string;\n}\n\nexport interface DiscountCycles {\n /**\n * The cycle from which the discount will start. Minimum cycle number is 1\n * @min 1\n */\n cycleFrom?: number;\n /**\n * Number of cycles to be applied on them discount. In order to apply a discount on all cycles until the end of the subscription, this field should be empty.\n * @min 1\n */\n numberOfCycles?: number | null;\n}\n\nexport interface DiscountOrigin {\n /** @format GUID */\n appId?: string;\n /** @format GUID */\n entityId?: string;\n}\n\nexport interface ExternalCollectionDetails {\n /** The name of the external collector. */\n collectorName?: string;\n}\n\nexport interface BillingStatus {\n /**\n * Current cycle of subscription billing schedule. When billing schedule starts cycles start from 1\n * and incremented each next billing cycle.\n * In case billing schedule not started (free trial, pay later start later) then current_cycle will remain 0\n */\n currentCycle?: number;\n /** how many cycled are remaining, For auto-renew subscriptions is not set. */\n remainingCycles?: number | null;\n /** Date when charge will be for next billing cycle */\n nextBillingDate?: Date | null;\n /** Previous Date charged for previous billing cycle */\n previousBillingDate?: Date | null;\n /** last payment details */\n latestPaymentData?: PaymentData;\n /** Free trial data */\n freeTrialData?: FreeTrialData;\n /**\n * Grace period information during grace period after payment failure\n * @readonly\n */\n gracePeriodData?: GracePeriodData;\n}\n\nexport interface PaymentData {\n /**\n * Latest payment's invoice ID\n * @format GUID\n */\n invoiceId?: string;\n /** Latest payment's status: UNPAID/PAID/FAILED */\n paymentStatus?: PaymentStatusWithLiterals;\n /** Latest payment's totals. */\n totals?: Totals;\n initialFailedPaymentDate?: Date | null;\n /** Tax-related data for the latest payment */\n taxData?: PaymentTaxData;\n}\n\nexport enum PaymentStatus {\n /** Payment status unknown */\n UNKNOWN = 'UNKNOWN',\n /** Payment has not been paid */\n UNPAID = 'UNPAID',\n /** Payment has been paid // TODO: p13n review: we are not sending event when in SEND_INVOICE mode cycle was paid. should we and which event? */\n PAID = 'PAID',\n /** Payment failed */\n FAILED = 'FAILED',\n}\n\n/** @enumType */\nexport type PaymentStatusWithLiterals =\n | PaymentStatus\n | 'UNKNOWN'\n | 'UNPAID'\n | 'PAID'\n | 'FAILED';\n\nexport interface Totals {\n /**\n * Total price of the subscription that the customer must pay per billing\n * cycle. Calculated as: `subtotal + tax + shippingFee + applicationFee + extraCharge - discount - credit`\n * Note: platformFee is NOT included in this calculation as it is absorbed by the merchant and does not affect the customer's total.\n * @format DECIMAL_VALUE\n * @readonly\n */\n totalPrice?: string;\n /**\n * Subtotal of all line items that belong to the subscription.\n * Calculated as: `sum_{i=1}^{n} (itemPrice[i] * quantity[i])`\n * @format DECIMAL_VALUE\n * @readonly\n */\n subtotal?: string;\n /**\n * Total tax.\n * @format DECIMAL_VALUE\n * @readonly\n */\n tax?: string | null;\n /**\n * Total discount.\n * @format DECIMAL_VALUE\n * @readonly\n */\n discount?: string | null;\n /**\n * Total application fee.\n * @format DECIMAL_VALUE\n * @readonly\n */\n applicationFee?: string | null;\n /**\n * Total shipping fee.\n * @format DECIMAL_VALUE\n * @readonly\n */\n shippingFee?: string | null;\n /**\n * Total extra charges without tax.\n * @format DECIMAL_VALUE\n * @readonly\n */\n extraCharge?: string | null;\n /**\n * Total credits without tax.\n * @format DECIMAL_VALUE\n * @readonly\n */\n credit?: string | null;\n /**\n * The tax amount for the proration, which is also included in the total tax.\n * @format DECIMAL_VALUE\n * @readonly\n */\n prorationTax?: string | null;\n /**\n * Platform fee calculated based on vertical-specific billing settings configuration.\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0.00, maxScale:2 }\n * @readonly\n */\n platformFee?: string | null;\n}\n\nexport interface PaymentTaxData {\n /**\n * A detailed breakdown of the tax authorities for all subscription items from the latest payment\n * @minSize 1\n * @maxSize 100\n */\n taxBreakdowns?: TaxBreakdown[];\n /**\n * Tax amount for all subscription items\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0.00, maxScale:2 }\n */\n taxAmount?: string | null;\n}\n\nexport interface TaxBreakdown {\n taxType?: string;\n /** @decimalValue options { maxScale:4 } */\n taxRate?: string;\n /** @format DECIMAL_VALUE */\n taxAmount?: string | null;\n /** @format DECIMAL_VALUE */\n taxableAmount?: string | null;\n /** @format DECIMAL_VALUE */\n nonTaxableAmount?: string | null;\n /**\n * Name of the tax that was calculated. For example, \"NY State Sales Tax\", \"Quebec GST\", etc.\n * @maxLength 200\n */\n taxName?: string | null;\n /**\n * Jurisdiction that taxes were calculated for.\n * @maxLength 200\n */\n jurisdiction?: string | null;\n /** Type of jurisdiction that taxes were calculated for. */\n jurisdictionType?: string;\n}\n\nexport interface FreeTrialData {\n /**\n * Date when free trial starts\n * @readonly\n */\n startDate?: Date | null;\n /**\n * Date when free trial ends\n * @readonly\n */\n endDate?: Date | null;\n}\n\nexport interface UpdateBillingDateData {\n /**\n * Date until the subscription is paid for.\n * Different from `nextBillingDate` only when the next billing date is updated without immediately issuing a new invoice.\n */\n paidUntil?: Date | null;\n /** Information about how to adjust the item's payment due to the update of the billing date */\n proration?: Proration;\n}\n\nexport interface Proration extends ProrationTypeOneOf {\n /**\n * BASS automatically calculates the proration amount based on the number\n * of days added to or removed from the current billing cycle. BASS uses\n * this formula to calculate the charge or credit amount:\n * `(Subscription total for the current billing cycle) * (number of days added to or removed from the current billing cycle) / (total number of days for the current billing cycle before the adjustment)`.\n * For example, the customer has paid 100 UDS for the current\n * billing cycle that last 31 days, and you want to extend the cycle by 8\n * days. Then, BASS calculates the proration amount like this:\n * `100 USD * 8 days / 31 days`, which equals `25.81 USD`.\n */\n timeBased?: TimeBasedProration;\n /** Proration amount that's based on your custom calculation. */\n custom?: CustomProration;\n}\n\n/** @oneof */\nexport interface ProrationTypeOneOf {\n /**\n * BASS automatically calculates the proration amount based on the number\n * of days added to or removed from the current billing cycle. BASS uses\n * this formula to calculate the charge or credit amount:\n * `(Subscription total for the current billing cycle) * (number of days added to or removed from the current billing cycle) / (total number of days for the current billing cycle before the adjustment)`.\n * For example, the customer has paid 100 UDS for the current\n * billing cycle that last 31 days, and you want to extend the cycle by 8\n * days. Then, BASS calculates the proration amount like this:\n * `100 USD * 8 days / 31 days`, which equals `25.81 USD`.\n */\n timeBased?: TimeBasedProration;\n /** Proration amount that's based on your custom calculation. */\n custom?: CustomProration;\n}\n\nexport interface TimeBasedProration {}\n\nexport interface CustomProration extends CustomProrationAmountOneOf {\n /**\n * Proration charge amount that's based on your custom calculation.\n * Increases the total that the customer must pay with the next invoice.\n *\n * Min: `0.01`\n * @decimalValue options { gt:0.00 }\n */\n charge?: string;\n /**\n * Proration credit amount that's based on your custom calculation.\n * Lowers the total that the customer must pay with the next invoice.\n *\n * Min: `0.01`\n * @decimalValue options { gt:0.00 }\n */\n credit?: string;\n}\n\n/** @oneof */\nexport interface CustomProrationAmountOneOf {\n /**\n * Proration charge amount that's based on your custom calculation.\n * Increases the total that the customer must pay with the next invoice.\n *\n * Min: `0.01`\n * @decimalValue options { gt:0.00 }\n */\n charge?: string;\n /**\n * Proration credit amount that's based on your custom calculation.\n * Lowers the total that the customer must pay with the next invoice.\n *\n * Min: `0.01`\n * @decimalValue options { gt:0.00 }\n */\n credit?: string;\n}\n\nexport interface GracePeriodData {\n /**\n * Grace period start date\n * @readonly\n */\n startDate?: Date | null;\n /**\n * Grace period end date\n * @readonly\n */\n endDate?: Date | null;\n /** Automatic retry data during grade period, if have any. Optional. */\n automaticRetryData?: AutomaticRetryData;\n}\n\nexport interface AutomaticRetryData {\n enabled?: boolean;\n}\n\nexport interface SubscriptionPolicies {\n /** Subscription can be canceled by the customer who bought it */\n customerCanCancel?: boolean;\n /** Subscription end date can be updated by business */\n businessCanExtend?: boolean;\n /** Subscription can be canceled not only immediately, but also at end of billing cycle by turning off auto-renew */\n allowEndOfCycleCancellation?: boolean;\n}\n\nexport interface PauseInfo {\n pausePolicy?: PausePolicyWithLiterals;\n pauseAt?: PauseAtWithLiterals;\n startDate?: Date | null;\n startCycle?: number | null;\n resumeAt?: ResumeAtWithLiterals;\n resumeDate?: Date | null;\n resumeCycle?: number | null;\n /** The type of pause applied to the subscription (e.g., traditional pause vs skip cycle) */\n pauseType?: PauseTypeWithLiterals;\n}\n\nexport enum PausePolicy {\n NONE = 'NONE',\n /** Pause the payment and the service. When resuming, the subscription end date is extended by the number of cycles postponed, and if the pause happened in a middle of a cycle, the payment date is postponed by the amount of days that already paid. */\n SERVICE_AND_PAYMENTS = 'SERVICE_AND_PAYMENTS',\n /** Pause the service and continue the billing. When resuming, extend the service by the time that was paused */\n SERVICE_ONLY = 'SERVICE_ONLY',\n}\n\n/** @enumType */\nexport type PausePolicyWithLiterals =\n | PausePolicy\n | 'NONE'\n | 'SERVICE_AND_PAYMENTS'\n | 'SERVICE_ONLY';\n\nexport enum PauseAt {\n /** Cancel scheduled pause */\n NONE = 'NONE',\n /** Pause the subscription now */\n IMMEDIATELY = 'IMMEDIATELY',\n /** Pause the subscription at the next billing date */\n NEXT_BILLING_DATE = 'NEXT_BILLING_DATE',\n /** A specific date must be defined in Schedule.specific_date */\n SPECIFIC_DATE = 'SPECIFIC_DATE',\n /** The number of cycles must be defined in Schedule.number_of_cycles */\n NUMBER_OF_CYCLES_FROM_TODAY = 'NUMBER_OF_CYCLES_FROM_TODAY',\n}\n\n/** @enumType */\nexport type PauseAtWithLiterals =\n | PauseAt\n | 'NONE'\n | 'IMMEDIATELY'\n | 'NEXT_BILLING_DATE'\n | 'SPECIFIC_DATE'\n | 'NUMBER_OF_CYCLES_FROM_TODAY';\n\nexport enum ResumeAt {\n /** Cancel scheduled resume */\n NONE = 'NONE',\n /** Resume the subscription now */\n IMMEDIATELY = 'IMMEDIATELY',\n /** Resume the subscription at the next billing date */\n NEXT_BILLING_DATE = 'NEXT_BILLING_DATE',\n /** A specific date must be defined in Schedule.specific_date */\n SPECIFIC_DATE = 'SPECIFIC_DATE',\n}\n\n/** @enumType */\nexport type ResumeAtWithLiterals =\n | ResumeAt\n | 'NONE'\n | 'IMMEDIATELY'\n | 'NEXT_BILLING_DATE'\n | 'SPECIFIC_DATE';\n\nexport enum PauseType {\n /** Default value for backward compatibility */\n UNKNOWN_PAUSE_TYPE = 'UNKNOWN_PAUSE_TYPE',\n /** Subscription was paused using the Pause/Resume flow */\n PAUSE = 'PAUSE',\n /** Subscription was paused using the Skip Cycle/Skip Order flow */\n SKIP_CYCLE = 'SKIP_CYCLE',\n}\n\n/** @enumType */\nexport type PauseTypeWithLiterals =\n | PauseType\n | 'UNKNOWN_PAUSE_TYPE'\n | 'PAUSE'\n | 'SKIP_CYCLE';\n\nexport interface CancellationInfo {\n /** Subscription cancel date. Can contain a future or past date */\n cancellationDate?: Date | null;\n /** Initiator for cancellation */\n initiator?: HistoryActionInitiatorWithLiterals;\n /** Reason for cancellation. Optional. */\n reason?: string | null;\n}\n\nexport enum HistoryActionInitiator {\n UNDEFINED = 'UNDEFINED',\n BUSINESS = 'BUSINESS',\n CUSTOMER = 'CUSTOMER',\n SYSTEM = 'SYSTEM',\n PAYMENT_FAILURE = 'PAYMENT_FAILURE',\n}\n\n/** @enumType */\nexport type HistoryActionInitiatorWithLiterals =\n | HistoryActionInitiator\n | 'UNDEFINED'\n | 'BUSINESS'\n | 'CUSTOMER'\n | 'SYSTEM'\n | 'PAYMENT_FAILURE';\n\nexport interface SubscriptionUpdateData {\n /** @maxSize 100 */\n itemsToUpdate?: ItemChange[];\n /** @maxSize 99 */\n itemsToAdd?: Item[];\n /**\n * @format GUID\n * @maxSize 99\n */\n itemsToDelete?: string[] | null;\n /** @readonly */\n numberOfRequests?: number;\n}\n\nexport interface ItemChange {\n /**\n * Item ID\n * @format GUID\n */\n _id?: string;\n pricingModel?: PricingModel;\n /** @min 1 */\n quantity?: number | null;\n tax?: Tax;\n}\n\nexport interface PricingModel extends PricingModelModelOneOf {\n /** Details about the fixed item price. */\n fixedPrice?: FixedPrice;\n}\n\n/** @oneof */\nexport interface PricingModelModelOneOf {\n /** Details about the fixed item price. */\n fixedPrice?: FixedPrice;\n}\n\nexport interface FixedPrice {\n /**\n * Fixed item price with a period as a decimal separator. For example, `3.99`.\n * Price doesn't include tax, discounts, or application fee.\n *\n * Min: `0.01`\n * @decimalValue options { gte:0.00 }\n */\n itemPrice?: string;\n}\n\nexport interface Item {\n /**\n * Unique identifier of subscription item. Automatically generated and read-only.\n * @readonly\n * @format GUID\n */\n _id?: string | null;\n /**\n * Name of the item. Typically product name.\n * @minLength 1\n * @maxLength 200\n */\n name?: string;\n /**\n * Description of the item.\n * @maxLength 500\n */\n description?: string | null;\n /** References to external product catalog data known to client. */\n catalogReference?: CatalogReference;\n /** Category of item. Whether it is digital or physical one. */\n category?: ItemCategoryWithLiterals;\n /**\n * Amount of products\n * @min 1\n */\n quantity?: number;\n /** Pricing model of the item. Whether fixed price or dynamic price models. */\n pricingModel?: PricingModel;\n /** Tax, positive value, optional */\n tax?: Tax;\n /**\n * Discounts applied on item price\n * @maxSize 5\n */\n discounts?: Discount[];\n /** Application specific fee, positive value, optional (if application_fee == 0, don't include it to request). Only positive values. */\n applicationFee?: ApplicationFee;\n /**\n * External reference identifier for mapping item in consumer's system.\n * This allows the consumer to correlate the item in their system with the item in this API.\n * @format GUID\n */\n externalId?: string | null;\n /**\n * Key / Value store to keep up to 10 additional values related to the subscription item.\n * Key max length = 50, Value max length = 200. Value can not be empty.\n * Should not include any sensitive or PII information.\n * @maxSize 10\n */\n metadata?: Record<string, string>;\n}\n\nexport interface CatalogReference {\n /**\n * Product ID from the external catalog.\n * @minLength 1\n * @maxLength 50\n */\n catalogItemId?: string;\n /**\n * ID of the app that the product catalog belongs to.\n * When omitted, BASS assumes that the product belongs to the subscription's\n * `origin.appId`.\n *\n * Min: 1 character\n * Max: 50 characters\n * @minLength 1\n * @maxLength 50\n */\n appId?: string | null;\n}\n\nexport enum ItemCategory {\n UNKNOWN = 'UNKNOWN',\n PHYSICAL = 'PHYSICAL',\n DIGITAL = 'DIGITAL',\n}\n\n/** @enumType */\nexport type ItemCategoryWithLiterals =\n | ItemCategory\n | 'UNKNOWN'\n | 'PHYSICAL'\n | 'DIGITAL';\n\nexport interface ApplicationFee extends ApplicationFeeValueOneOf {\n /**\n * Amount of the application fee in `0.00` format.\n * @format DECIMAL_VALUE\n */\n amount?: string;\n /**\n * Discounts for the application fee.\n *\n * Max: 5 discounts\n * @maxSize 5\n */\n discounts?: Discount[];\n}\n\n/** @oneof */\nexport interface ApplicationFeeValueOneOf {\n /**\n * Amount of the application fee in `0.00` format.\n * @format DECIMAL_VALUE\n */\n amount?: string;\n}\n\nexport interface SpecificDateSubscriptionUpdateData {\n updateData?: SubscriptionUpdateData;\n executionDate?: Date | null;\n}\n\nexport interface PlatformOrigin {\n /** @format GUID */\n appId?: string | null;\n /** @format GUID */\n entityId?: string | null;\n}\n\nexport interface SubscriptionBillingCyclePaid {\n /** The subscription for which one of the invoices has been marked as paid */\n subscription?: Subscription;\n /** The cycle that has been marked as paid */\n paidCycle?: number;\n /**\n * The invoice ID that has been marked as paid\n * @format GUID\n */\n invoiceId?: string;\n /**\n * The transaction ID of the payment order that has been marked as paid\n * @format GUID\n */\n paymentTransactionId?: string | null;\n}\n\nexport interface GetSubscriptionRequest {\n /** @format GUID */\n _id: string;\n}\n\nexport interface GetSubscriptionResponse {\n subscription?: Subscription;\n}\n\nexport interface CustomerCancelSubscriptionRequest {\n /** @format GUID */\n _id: string;\n /** Optional action reason message */\n reason?: string | null;\n}\n\nexport interface CustomerCancelSubscriptionResponse {\n subscription?: Subscription;\n}\n\n/**\n * Sent each time a subscription status has been set to Canceled\n * Canceled shows that a subscription was canceled and ended its life cycle as a result of some intervention\n * For example:\n * * A user decided to cancel a subscription before the original end date\n * * A subscription is canceled due to bad payment\n */\nexport interface SubscriptionCanceled {\n subscription?: Subscription;\n actionDetails?: ActionDetails;\n}\n\nexport interface ActionDetails {\n initiator?: HistoryActionInitiatorWithLiterals;\n reason?: string | null;\n}\n\nexport interface CustomerTurnOnAutoRenewalRequest {\n /** @format GUID */\n _id: string;\n /** Optional action reason message */\n reason?: string | null;\n}\n\nexport interface CustomerTurnOnAutoRenewalResponse {\n subscription?: Subscription;\n}\n\nexport interface CustomerTurnOffAutoRenewalRequest {\n /** @format GUID */\n _id: string;\n /** Optional action reason message */\n reason?: string | null;\n}\n\nexport interface CustomerTurnOffAutoRenewalResponse {\n subscription?: Subscription;\n}\n\nexport interface CustomerExtendSubscriptionRequest {\n /**\n * The ID of the subscription to be extended\n * @format GUID\n */\n _id: string;\n /** Optional action reason message */\n reason?: string | null;\n /**\n * For termed - Subscription end date will be updated with the extension period and number of cycles will be added\n * @min 1\n */\n billingCyclesToAdd: number | null;\n}\n\nexport interface CustomerExtendSubscriptionResponse {\n /** The now extended subscription */\n subscription?: Subscription;\n}\n\nexport interface SubscriptionExtended\n extends SubscriptionExtendedExtendPolicyOneOf {\n extensionPeriod?: Duration;\n extensionBillingCycles?: number;\n subscription?: Subscription;\n actionDetails?: ActionDetails;\n}\n\n/** @oneof */\nexport interface SubscriptionExtendedExtendPolicyOneOf {\n extensionPeriod?: Duration;\n extensionBillingCycles?: number;\n}\n\nexport interface QuerySubscriptionsRequest {\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 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 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 QuerySubscriptionsResponse {\n subscriptions?: Subscription[];\n metadata?: 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\nexport interface CountSubscriptionsRequest {\n /** Filters to specify which subscriptions are counted. */\n filter?: CountSubscriptionFilter;\n}\n\nexport interface CountSubscriptionFilter\n extends CountSubscriptionFilterStatusOneOf {\n /** List of statuses to filter the counted subscriptions by. */\n statuses?: SubscriptionStatus;\n /**\n * Predefined status combination to filter the counted subscriptions by.\n * + `ALL`: Includes these subscription statuses: `\"DRAFT\"`, `\"PENDING\"`, `\"ACTIVE\"`, `\"PAUSED\"`, `\"ENDED\"`, and `\"CANCELED\"`.\n * + `LIVE`: Includes these subscription statuses: `\"PENDING\"`, `\"ACTIVE\"`, and `\"PAUSED\"`.\n */\n statusGroup?: SubscriptionStatusGroupWithLiterals;\n /**\n * Customer ID to filter the counted subscriptions by. You can pass a\n * [member ID](https://bo.wix.com/wix-docs/rest/members/members/member-object),\n * [contact ID](https://bo.wix.com/wix-docs/rest/crm/contacts/contacts-v4/contact-object),\n * or the ID of an anonymous site visitor as `customerId`. When providing a\n * `customerId` you must also specify a `paymentMethodId`.\n * @format GUID\n */\n customerId?: string | null;\n /**\n * ID of the payment method to filter the counted subscriptions by.\n * You must provide a `paymentMethodId` when passing a `customerId`.\n * @format GUID\n */\n paymentMethodId?: string | null;\n}\n\n/** @oneof */\nexport interface CountSubscriptionFilterStatusOneOf {\n /** List of statuses to filter the counted subscriptions by. */\n statuses?: SubscriptionStatus;\n /**\n * Predefined status combination to filter the counted subscriptions by.\n * + `ALL`: Includes these subscription statuses: `\"DRAFT\"`, `\"PENDING\"`, `\"ACTIVE\"`, `\"PAUSED\"`, `\"ENDED\"`, and `\"CANCELED\"`.\n * + `LIVE`: Includes these subscription statuses: `\"PENDING\"`, `\"ACTIVE\"`, and `\"PAUSED\"`.\n */\n statusGroup?: SubscriptionStatusGroupWithLiterals;\n}\n\nexport interface SubscriptionStatus {\n /**\n * Statuses to filter the counted subscriptions by.\n *\n * Max: 6 statuses\n * @maxSize 6\n */\n statuses?: SubscriptionStatusEnumSubscriptionStatusWithLiterals[];\n}\n\nexport enum SubscriptionStatusGroup {\n ALL = 'ALL',\n /** Union of ACTIVE, PAUSED and PENDING */\n LIVE = 'LIVE',\n}\n\n/** @enumType */\nexport type SubscriptionStatusGroupWithLiterals =\n | SubscriptionStatusGroup\n | 'ALL'\n | 'LIVE';\n\nexport interface CountSubscriptionsResponse {\n /**\n * List of statuses and the corresponding number of subscriptions that match\n * the filters.\n */\n countByStatus?: CountByStatus[];\n /** Total number of subscriptions that match the filters. */\n total?: number;\n}\n\nexport interface CountByStatus {\n /** Subscription status. */\n status?: SubscriptionStatusEnumSubscriptionStatusWithLiterals;\n /** Number of subscriptions with the status that match the filters. */\n count?: number;\n}\n\nexport interface UpdateSubscriptionPaymentMethodRequest {\n /**\n * Subscription ID\n * @format GUID\n */\n _id: string;\n /** @format GUID */\n paymentMethodId: string;\n}\n\nexport interface UpdateSubscriptionPaymentMethodResponse {\n subscription?: Subscription;\n}\n\nexport interface CustomerAllowedActionsRequest {\n /** @format GUID */\n _id: string;\n}\n\nexport interface CustomerAllowedActionsResponse {\n actions?: Action[];\n}\n\nexport interface Action {\n actionType?: ActionTypeWithLiterals;\n pausePolicies?: PausePolicyWithLiterals[];\n pauseAt?: PauseAtWithLiterals[];\n resumeAt?: ResumeAtWithLiterals[];\n extendPolicies?: ExtendPolicyTypeWithLiterals[];\n}\n\nexport enum ActionType {\n NONE = 'NONE',\n CREATION = 'CREATION',\n CANCEL = 'CANCEL',\n CYCLE_AUTO_RENEW_ON = 'CYCLE_AUTO_RENEW_ON',\n CYCLE_AUTO_RENEW_OFF = 'CYCLE_AUTO_RENEW_OFF',\n PAUSE = 'PAUSE',\n RESUME = 'RESUME',\n MARK_AS_PAID = 'MARK_AS_PAID',\n EXTEND = 'EXTEND',\n UPDATE = 'UPDATE',\n UPDATE_START_DATE = 'UPDATE_START_DATE',\n UPM = 'UPM',\n UPDATE_BILLING_DATE = 'UPDATE_BILLING_DATE',\n UPDATE_COLLECTION_METHOD = 'UPDATE_COLLECTION_METHOD',\n}\n\n/** @enumType */\nexport type ActionTypeWithLiterals =\n | ActionType\n | 'NONE'\n | 'CREATION'\n | 'CANCEL'\n | 'CYCLE_AUTO_RENEW_ON'\n | 'CYCLE_AUTO_RENEW_OFF'\n | 'PAUSE'\n | 'RESUME'\n | 'MARK_AS_PAID'\n | 'EXTEND'\n | 'UPDATE'\n | 'UPDATE_START_DATE'\n | 'UPM'\n | 'UPDATE_BILLING_DATE'\n | 'UPDATE_COLLECTION_METHOD';\n\nexport enum ExtendPolicyType {\n PERIOD = 'PERIOD',\n BILLING_CYCLE = 'BILLING_CYCLE',\n}\n\n/** @enumType */\nexport type ExtendPolicyTypeWithLiterals =\n | ExtendPolicyType\n | 'PERIOD'\n | 'BILLING_CYCLE';\n\nexport interface CustomerListUpcomingChargesRequest {\n /**\n * Subscription id upcoming charge to be previewed for\n * @format GUID\n */\n _id: string;\n}\n\nexport interface CustomerListUpcomingChargesResponse {\n /** Subscription upcoming charge. Will be empty if no more billing scheduled. */\n upcomingCharge?: SubscriptionCharge;\n}\n\nexport interface SubscriptionCharge {\n /** cycle of future charge */\n cycle?: number;\n /** date of the charge */\n billingDate?: Date | null;\n /** breakdown of charge */\n totals?: Totals;\n /** List of items in the invoice */\n invoiceItems?: InvoiceItem[];\n /** Discount details for the invoice */\n discount?: InvoiceDiscount;\n}\n\nexport interface InvoiceItem extends InvoiceItemPaymentTypeOneOf {\n /** Information about a line item that's purchased on a recurring basis. */\n recurring?: Recurring;\n /**\n * Empty object that's available when the line item is purchased a single\n * time, not on a recurring basis.\n */\n oneTime?: OneTime;\n /**\n * ID of the invoice line item.\n * @format GUID\n */\n _id?: string;\n /**\n * ID of the [subscription](https://bo.wix.com/wix-docs/rest/premium/premium-subscriptions-manager/subscription-object)\n * that belongs to the invoice line item.\n * @format GUID\n */\n subscriptionId?: string | null;\n /**\n * Name of the invoice line item.\n * Typically the product name.\n *\n * Max: 200 characters\n * @minLength 1\n * @maxLength 200\n */\n name?: string;\n /**\n * Description of the invoice line item.\n *\n * Max: 500 characters\n * @maxLength 500\n */\n description?: string | null;\n /** Information about the product from the external product catalog. */\n catalogReference?: CatalogReference;\n /**\n * Product category.\n *\n * + `\"UNKNOWN\"`: There is no information about the product category.\n * + `\"PHYSICAL\"`: A physical product that's shipped to the shipping address.\n * + `\"DIGITAL\"`: A digital product that doesn't require shipping.\n */\n category?: ItemCategoryWithLiterals;\n /** Quantity of the invoice line item. */\n quantity?: number;\n /** Information about the invoice line item's price. */\n priceDetails?: PriceDetails;\n /** Information about the invoice line item's totals */\n totals?: Totals;\n /**\n * Information about the invoice line item's tax data\n * @readonly\n */\n taxData?: ItemTaxData;\n /**\n * ID of the [one time] that belongs to the invoice line item.\n * @format GUID\n */\n oneTimeItemId?: string | null;\n /**\n * Key / Value store to keep up to 10 additional values related to the invoice item.\n * Key max length = 50, Value max length = 200. Value can not be empty.\n * Should not include any sensitive or PII information.\n * @maxSize 10\n */\n metadata?: Record<string, string>;\n}\n\n/** @oneof */\nexport interface InvoiceItemPaymentTypeOneOf {\n /** Information about a line item that's purchased on a recurring basis. */\n recurring?: Recurring;\n /**\n * Empty object that's available when the line item is purchased a single\n * time, not on a recurring basis.\n */\n oneTime?: OneTime;\n}\n\nexport interface Recurring {\n /**\n * Number of cycles. Describes how many times a customer purchases the line item\n * on a recurring basis.\n */\n cycleNumber?: number;\n}\n\nexport interface OneTime {}\n\nexport interface PriceDetails {\n /**\n * Price of the invoice line item in `0.00` format.\n * A minus sign (-) indicates that the amount is negative.\n * @format DECIMAL_VALUE\n */\n price?: string;\n /** Information about the invoice line item's tax. */\n tax?: Tax;\n /** Discount that's applied to a specicific invoice line item. */\n discount?: InvoiceDiscount;\n /**\n * Application fee. Set by the origin app, and not by BASS. Wix receives the\n * full `applicationFee`, while the merchant doesn't receive any portion of it.\n */\n applicationFeeDetails?: InvoiceApplicationFee;\n /**\n * Platform fee configuration for this invoice line item. Defines how the platform\n * fee is applied (absorbed by merchant or passed on to customer) and the fee amount\n * (percentage or fixed amount).\n * @readonly\n */\n platformFeeDetails?: InvoicePlatformFee;\n}\n\nexport interface InvoiceDiscount extends InvoiceDiscountValueOneOf {\n /**\n * Discount amount.\n * Available when the discount is an amount.\n *\n * Min: `0.01`\n * @decimalValue options { gt:0.00 }\n */\n amount?: string;\n /**\n * Discount percentage.\n * Available when the discount is a percentage value.\n *\n * Min: `0.01`\n * Max: `100`\n * @decimalValue options { gt:0.00, lte:100 }\n */\n percentage?: string;\n /** Indicates the source of the discount. . Contains app_id and entity_id */\n origin?: DiscountOrigin;\n}\n\n/** @oneof */\nexport interface InvoiceDiscountValueOneOf {\n /**\n * Discount amount.\n * Available when the discount is an amount.\n *\n * Min: `0.01`\n * @decimalValue options { gt:0.00 }\n */\n amount?: string;\n /**\n * Discount percentage.\n * Available when the discount is a percentage value.\n *\n * Min: `0.01`\n * Max: `100`\n * @decimalValue options { gt:0.00, lte:100 }\n */\n percentage?: string;\n}\n\nexport interface InvoiceApplicationFee extends InvoiceApplicationFeeValueOneOf {\n /**\n * Application fee amount. Set by the origin app, and not by BASS. Wix\n * receives the full `applicationFee`, while the merchant doesn't receive\n * any portion of it.\n * @format DECIMAL_VALUE\n */\n amount?: string;\n /** Information about the discount for the invoice line item's application fee. */\n discount?: InvoiceDiscount;\n}\n\n/** @oneof */\nexport interface InvoiceApplicationFeeValueOneOf {\n /**\n * Application fee amount. Set by the origin app, and not by BASS. Wix\n * receives the full `applicationFee`, while the merchant doesn't receive\n * any portion of it.\n * @format DECIMAL_VALUE\n */\n amount?: string;\n}\n\nexport interface InvoicePlatformFee extends InvoicePlatformFeeFeeModelOneOf {\n absorb?: AbsorbFeeConfig;\n passOn?: PassOnFeeConfig;\n}\n\n/** @oneof */\nexport interface InvoicePlatformFeeFeeModelOneOf {\n absorb?: AbsorbFeeConfig;\n passOn?: PassOnFeeConfig;\n}\n\nexport interface AbsorbFeeConfig extends AbsorbFeeConfigValueOneOf {\n percentage?: PercentageFee;\n fixedAmount?: FixedAmountFee;\n}\n\n/** @oneof */\nexport interface AbsorbFeeConfigValueOneOf {\n percentage?: PercentageFee;\n fixedAmount?: FixedAmountFee;\n}\n\nexport interface PercentageFee {\n /** @decimalValue options { gte:0.00, lte:100, maxScale:2 } */\n percentage?: string;\n}\n\nexport interface FixedAmountFee {\n /** @decimalValue options { gte:0.00, maxScale:2 } */\n amount?: string;\n}\n\nexport interface PassOnFeeConfig extends PassOnFeeConfigValueOneOf {\n percentage?: PercentageFee;\n fixedAmount?: FixedAmountFee;\n}\n\n/** @oneof */\nexport interface PassOnFeeConfigValueOneOf {\n percentage?: PercentageFee;\n fixedAmount?: FixedAmountFee;\n}\n\nexport interface ItemTaxData {\n /** Aggregated tax from tax_breakdowns */\n lineItemTaxSummary?: LineItemTaxSummary;\n /**\n * A detailed description of all the tax authorities applied on this item.\n * @minSize 1\n * @maxSize 100\n */\n taxBreakdowns?: TaxBreakdown[];\n}\n\nexport interface LineItemTaxSummary {\n /**\n * Calculated from external tax summary\n * @format DECIMAL_VALUE\n */\n aggregatedTaxAmount?: string;\n /**\n * Aggregated from tax_breakdowns\n * @decimalValue options { gte:0, maxScale:6 }\n */\n aggregatedTaxRate?: string;\n /**\n * Total taxable amount for this line item.\n * @format DECIMAL_VALUE\n * @decimalValue options { maxScale:4 }\n */\n taxableAmount?: string;\n /**\n * Aggregated from tax_breakdowns after applying exemptions\n * @format DECIMAL_VALUE\n * @decimalValue options { maxScale:4 }\n */\n finalTaxAmount?: string | null;\n}\n\nexport interface InitiatePaymentMethodSetupRequest {\n _id: string;\n paymentMode?: PaymentModeWithLiterals;\n paymentSettings?: PaymentSettings;\n}\n\nexport enum PaymentMode {\n NONE = 'NONE',\n /** The latest invoice of the subscription will be charged. */\n CHARGE = 'CHARGE',\n /** An authorization invoice with zero amount will be created. */\n AUTHORIZATION = 'AUTHORIZATION',\n}\n\n/** @enumType */\nexport type PaymentModeWithLiterals =\n | PaymentMode\n | 'NONE'\n | 'CHARGE'\n | 'AUTHORIZATION';\n\nexport interface PaymentSettings {\n /** Allowed payment providers for Subscriptions, for example to limit subscriptions to be created only with \"Wix Payments\" provider. */\n allowedProviderIds?: string[];\n /** payment order method, define how the order was applied */\n orderMethod?: OrderMethodWithLiterals;\n /** Wix Pay callback url(s) to return buyer to a third party system */\n redirectUrls?: RedirectUrls;\n /** @format GUID */\n paymentMethodId?: string | null;\n /**\n * Specifies an alternative origin for processing the payment.\n * When set, the payment order will be created with the specified origin\n * instead of the default origin.\n */\n paymentOrigin?: PaymentOrigin;\n}\n\nexport enum OrderMethod {\n UNKNOWN = 'UNKNOWN',\n MOTO = 'MOTO',\n NOT_MOTO = 'NOT_MOTO',\n}\n\n/** @enumType */\nexport type OrderMethodWithLiterals =\n | OrderMethod\n | 'UNKNOWN'\n | 'MOTO'\n | 'NOT_MOTO';\n\nexport interface RedirectUrls {\n /** URL to redirect buyer in case of approved (successful) transaction (required) */\n successUrl?: string;\n /** URL to redirect buyer in case of failed/rejected transaction (required) */\n errorUrl?: string;\n /** URL to redirect buyer in case of buyer canceled the transaction (optional, default: `{error_url}`) */\n cancelUrl?: string;\n /**\n * URL to redirect buyer in case of pending transaction (that might take some time to process) (optional, default:\n * `{success_url}`)\n */\n pendingUrl?: string;\n}\n\nexport interface PaymentOrigin {\n /**\n * ID of the app for which the Payment will create the order on. For example, Paypal.\n * @format GUID\n */\n appId?: string;\n /**\n * Id of the entity that order will be created on\n * @format GUID\n */\n instanceId?: string;\n}\n\nexport interface InitiatePaymentMethodSetupResponse {\n /** @format GUID */\n paymentOrderId?: string;\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 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}\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 CreateSubscriptionInStateRequest\n extends CreateSubscriptionInStateRequestModeOneOf {\n activeSubscription?: CreateSubscriptionRequest;\n}\n\n/** @oneof */\nexport interface CreateSubscriptionInStateRequestModeOneOf {\n activeSubscription?: CreateSubscriptionRequest;\n}\n\nexport interface CreateSubscriptionRequest {\n subscription?: Subscription;\n /** Optional settings for the payments. Should be empty for free subscriptions. */\n paymentSettings?: PaymentSettings;\n /**\n * Optional unique identifier for this request in order to prevent subscription duplications\n * @format GUID\n */\n idempotencyKey?: string | null;\n /** Optional origin override for setting identity of subscription creator instead of extracting from context */\n originOverride?: OriginOverride;\n}\n\nexport interface OriginOverride {\n /** @format GUID */\n appId?: string;\n /** @format GUID */\n instanceId?: string;\n}\n\nexport interface CreateSubscriptionInStateResponse {\n /** @format GUID */\n subscriptionId?: string;\n}\n\nexport interface PayCycleRequest {\n /** @format GUID */\n subscriptionId: string;\n paymentTestMode?: PaymentTestModeWithLiterals;\n /** @format GUID */\n tenantId: string;\n}\n\nexport enum PaymentTestMode {\n REGULAR = 'REGULAR',\n FAIL_TECHNICAL = 'FAIL_TECHNICAL',\n FAIL_DECLINE = 'FAIL_DECLINE',\n FAIL_RETRYABLE_DECLINE = 'FAIL_RETRYABLE_DECLINE',\n}\n\n/** @enumType */\nexport type PaymentTestModeWithLiterals =\n | PaymentTestMode\n | 'REGULAR'\n | 'FAIL_TECHNICAL'\n | 'FAIL_DECLINE'\n | 'FAIL_RETRYABLE_DECLINE';\n\nexport interface PayCycleResponse {\n /** @format GUID */\n invoiceId?: string;\n /** @format GUID */\n paymentOrderId?: string | null;\n subscription?: Subscription;\n}\n\nexport interface GetFullSubscriptionDataRequest {\n /** @format GUID */\n _id?: string;\n}\n\nexport interface GetFullSubscriptionDataResponse {\n subscription?: Subscription;\n internalSubscriptionData?: InternalSubscriptionData;\n}\n\nexport interface InternalSubscriptionData {\n /** @format GUID */\n originInstanceId?: string;\n source?: string | null;\n billingType?: string;\n isOneTime?: boolean;\n migrationDetails?: MigrationDetails;\n pausePaidDuration?: string | null;\n authorizationPaymentData?: PaymentData;\n currentCyclePausePeriods?: PausePeriod[];\n}\n\nexport interface MigrationDetails {\n /** system (application) where the Subscription has been created */\n originSystem?: string;\n /** date when the Subscription started to be managed in BASS */\n shiftManagementDate?: Date | null;\n}\n\nexport interface PausePeriod {\n startDate?: Date | null;\n endDate?: Date | null;\n}\n\nexport interface GetSubscriptionAndInternalDataRequest {\n /** @format GUID */\n subscriptionId?: string;\n /** @format GUID */\n tenantId?: string;\n}\n\nexport interface GetSubscriptionAndInternalDataResponse {\n subscription?: Subscription;\n internalSubscriptionData?: InternalSubscriptionData;\n}\n\nexport interface SearchSubscriptionRequest {\n /** @format GUID */\n _id?: string;\n /** @format GUID */\n tenantId?: string;\n}\n\nexport interface SearchSubscriptionResponse {\n subscription?: Subscription;\n}\n\nexport interface UpdatePausePaidDurationRequest {\n /** @format GUID */\n subscriptionId?: string;\n /**\n * @min 1\n * @max 10000000\n */\n pausePaidDurationSeconds?: string;\n /** @format GUID */\n tenantId?: string;\n}\n\nexport interface UpdatePausePaidDurationResponse {}\n\nexport interface UpdateStatusRequest {\n /** @format GUID */\n subscriptionId?: string;\n /** @format GUID */\n tenantId?: string;\n status?: SubscriptionStatusEnumSubscriptionStatusWithLiterals;\n}\n\nexport interface UpdateStatusResponse {\n subscription?: Subscription;\n}\n\nexport interface UpdatePaymentStatusRequest {\n /** @format GUID */\n subscriptionId?: string;\n /** @format GUID */\n tenantId?: string;\n paymentStatus?: PaymentStatusWithLiterals;\n}\n\nexport interface UpdatePaymentStatusResponse {\n subscription?: Subscription;\n}\n\nexport interface RemoveCancellationInfoRequest {\n /** @format GUID */\n subscriptionId?: string;\n /** @format GUID */\n tenantId?: string;\n}\n\nexport interface RemoveCancellationInfoResponse {\n subscription?: Subscription;\n}\n\nexport interface ReviveSubscriptionRequest {\n /** @format GUID */\n tenantId?: string;\n /** @format GUID */\n subscriptionId?: string;\n revivePolicy?: RevivePolicyWithLiterals;\n isTestRun?: boolean;\n}\n\nexport enum RevivePolicy {\n SIMPLE = 'SIMPLE',\n RESUME = 'RESUME',\n}\n\n/** @enumType */\nexport type RevivePolicyWithLiterals = RevivePolicy | 'SIMPLE' | 'RESUME';\n\nexport interface ReviveSubscriptionResponse {\n subscription?: Subscription;\n}\n\nexport interface ConvertSapiRequest {\n /** @format GUID */\n subscriptionId?: string;\n}\n\nexport interface ConvertSapiResponse {\n subscription?: Subscription;\n}\n\nexport interface GetSubscriptionInvoicesRequest {\n /** @format GUID */\n _id?: string;\n}\n\nexport interface GetSubscriptionInvoicesResponse {\n invoices?: SubscriptionInvoice[];\n}\n\nexport interface SubscriptionInvoice {\n /** @format GUID */\n _id?: string;\n subscriptionCycle?: number;\n _createdDate?: Date | null;\n}\n\nexport interface FinishFreeTrialNowRequest {\n /** @format GUID */\n subscriptionId?: string;\n /** @format GUID */\n tenantId?: string;\n}\n\nexport interface FinishFreeTrialNowResponse {\n subscription?: Subscription;\n}\n\nexport interface FixSubscriptionTimeCapsuleTasksRequest {\n /** @format GUID */\n subscriptionId?: string;\n /** @format GUID */\n tenantId?: string;\n}\n\nexport interface FixSubscriptionTimeCapsuleTasksResponse {}\n\nexport interface SendTimeCapsuleTaskCanceledBIRequest {\n /** @format GUID */\n tenantId?: string;\n /** @format GUID */\n subscriptionId?: string;\n /** @minLength 1 */\n taskType?: string;\n}\n\nexport interface Empty {}\n\nexport interface ScheduleTimeCapsuleTaskRequest {\n /** @format GUID */\n subscriptionId?: string;\n /** @minLength 1 */\n taskType?: string;\n executionTime?: Date | null;\n /** @format GUID */\n tenantId?: string;\n}\n\nexport interface CancelTimeCapsuleTaskRequest {\n /** @format GUID */\n tenantId?: string;\n /** @format GUID */\n subscriptionId?: string;\n /** @minLength 1 */\n taskType?: string;\n}\n\nexport interface UpdateFullSubscriptionRequest {\n /** @format GUID */\n tenantId?: string;\n subscription?: Subscription;\n}\n\nexport interface UpdateFullSubscriptionResponse {\n subscription?: Subscription;\n}\n\nexport interface UpdateSubscriptionInvoiceCycleRequest {\n /** @format GUID */\n subscriptionId?: string;\n /** @format GUID */\n tenantId?: string;\n /** @format GUID */\n invoiceId?: string;\n subscriptionCycle?: number;\n}\n\nexport interface UpdateSubscriptionInvoiceCycleResponse {\n subscriptionInvoice?: SubscriptionInvoice;\n}\n\nexport interface AddPausePeriodRequest {\n /** @format GUID */\n tenantId?: string;\n /** @format GUID */\n subscriptionId?: string;\n pauseStartDate?: Date | null;\n pauseEndDate?: Date | null;\n}\n\nexport interface AddPausePeriodResponse {\n subscription?: Subscription;\n}\n\nexport interface RunTimeCapsuleTaskNowRequest {\n /** @format GUID */\n tenantId?: string;\n /** @format GUID */\n subscriptionId?: string;\n /** @minLength 1 */\n taskType?: string;\n}\n\nexport interface CreateRecurringInvoiceBORequest {\n /** @format GUID */\n subscriptionId?: string;\n /** @format GUID */\n tenantId?: string;\n /** @min 2 */\n cycleNumber?: number;\n}\n\nexport interface CreateRecurringInvoiceBOResponse {\n invoiceId?: string;\n}\n\nexport interface SetShiftingDataRequest {\n /** @format GUID */\n subscriptionId?: string;\n /** @format GUID */\n tenantId?: string;\n isBassManaged?: boolean;\n shiftManagementDate?: Date | null;\n}\n\nexport interface SetShiftingDataResponse {\n subscription?: Subscription;\n}\n\nexport interface FixSubscriptionInvoicesRequest\n extends FixSubscriptionInvoicesRequestModeOneOf {\n attachInvoice?: AttachInvoice;\n detachInvoice?: DetachInvoice;\n /** @format GUID */\n tenantId?: string;\n /** @format GUID */\n subscriptionId?: string;\n}\n\n/** @oneof */\nexport interface FixSubscriptionInvoicesRequestModeOneOf {\n attachInvoice?: AttachInvoice;\n detachInvoice?: DetachInvoice;\n}\n\nexport interface AttachInvoice {\n /** @format GUID */\n invoiceId?: string;\n}\n\nexport interface DetachInvoice {\n /** @format GUID */\n invoiceId?: string;\n}\n\nexport interface FixSubscriptionInvoicesResponse {\n invoices?: SubscriptionInvoice[];\n}\n\nexport interface RestoreDraftSubscriptionRequest {\n /** @format GUID */\n tenantId?: string;\n /** @format GUID */\n subscriptionId?: string;\n}\n\nexport interface RestoreDraftSubscriptionResponse {\n subscription?: Subscription;\n}\n\nexport interface DeleteDraftSubscriptionRequest {\n /** @format GUID */\n tenantId?: string;\n /** @format GUID */\n subscriptionId?: string;\n}\n\nexport interface DeleteDraftSubscriptionResponse {\n subscription?: Subscription;\n}\n\nexport interface DeleteSubscriptionBORequest {\n /** @format GUID */\n tenantId?: string;\n /** @format GUID */\n subscriptionId?: string;\n}\n\nexport interface DeleteSubscriptionBOResponse {\n subscription?: Subscription;\n}\n\nexport interface CancelSubscriptionBORequest {\n /** @format GUID */\n tenantId?: string;\n /** @format GUID */\n subscriptionId?: string;\n initiator?: ActionInitiatorWithLiterals;\n reason?: string | null;\n}\n\nexport enum ActionInitiator {\n UNDEFINED = 'UNDEFINED',\n BUSINESS = 'BUSINESS',\n CUSTOMER = 'CUSTOMER',\n SYSTEM = 'SYSTEM',\n}\n\n/** @enumType */\nexport type ActionInitiatorWithLiterals =\n | ActionInitiator\n | 'UNDEFINED'\n | 'BUSINESS'\n | 'CUSTOMER'\n | 'SYSTEM';\n\nexport interface CancelSubscriptionBOResponse {\n subscription?: Subscription;\n}\n\nexport interface UpdatePaymentMethodBORequest {\n /** @format GUID */\n tenantId?: string;\n /** @format GUID */\n subscriptionId?: string;\n /** @format GUID */\n paymentMethodId?: string;\n}\n\nexport interface UpdatePaymentMethodBOResponse {\n subscription?: Subscription;\n}\n\nexport interface SendSubscriptionActionEventBORequest\n extends SendSubscriptionActionEventBORequestEventOneOf {\n billingCycleStarted?: SubscriptionBillingCycleStarted;\n /** @format GUID */\n tenantId?: string;\n /** @format GUID */\n subscriptionId?: string;\n}\n\n/** @oneof */\nexport interface SendSubscriptionActionEventBORequestEventOneOf {\n billingCycleStarted?: SubscriptionBillingCycleStarted;\n}\n\nexport interface SubscriptionBillingCycleStarted {\n subscription?: Subscription;\n /**\n * Wix Pay transaction id, optional. Exists if event was triggered by a payment.\n * @format GUID\n */\n paymentTransactionId?: string | null;\n}\n\nexport interface SendSubscriptionActionEventResponse {}\n\nexport interface HandleSubscriptionAfterInvoiceMarkedAsPaidRequest {\n /** @format GUID */\n tenantId?: string;\n /** @format GUID */\n subscriptionId?: string;\n transactionId?: string;\n}\n\nexport interface PauseSubscriptionBORequest {\n /** @format GUID */\n tenantId?: string;\n /** @format GUID */\n subscriptionId?: string;\n pausePolicy?: PausePolicyWithLiterals;\n pauseAt?: PauseAtWithLiterals;\n initiator?: ActionInitiatorWithLiterals;\n /** @maxLength 500 */\n reason?: string | null;\n}\n\nexport interface PauseSubscriptionBOResponse {\n subscription?: Subscription;\n}\n\nexport interface FixSubscriptionInvoicesConsistencyRequest {\n /** @format GUID */\n tenantId?: string;\n /** @format GUID */\n subscriptionId?: string;\n}\n\nexport interface FixSubscriptionInvoicesConsistencyResponse {}\n\nexport interface SetIsMigratedEvent {\n /** @format GUID */\n subscriptionId?: string;\n}\n\nexport interface SubscriptionDelayedSyncEvent {\n /** @format GUID */\n subscriptionId?: string;\n}\n\nexport interface InvoiceAction extends InvoiceActionActionTypeOneOf {\n payRecurring?: PayRecurringInvoice;\n}\n\n/** @oneof */\nexport interface InvoiceActionActionTypeOneOf {\n payRecurring?: PayRecurringInvoice;\n}\n\nexport interface PayRecurringInvoice {\n /** @format GUID */\n invoiceId?: string;\n}\n\n/**\n * Sent each time a subscription status has been set to Active\n * Active shows that a subscription is live and operational.\n * For example:\n * * For subscription with free trial, free trial start date is also the activation date.\n * * For a subscription with future start date, the start date is also the activation date.\n * * When a subscription is resumed from a pause status, the resume date is also the activation date.\n */\nexport interface SubscriptionActivated {\n subscription?: Subscription;\n}\n\n/**\n * Sent each time a subscription status has been set to Ended\n * Ended shows that a subscription reached its end date and ended its life cycle as a result of the agreement.\n * This is different from a Canceled subscription which ends the subscription before a designated end date.\n * Therefore, Ended and Canceled are mutually exclusive.\n */\nexport interface SubscriptionEnded {\n subscription?: Subscription;\n}\n\nexport interface SubscriptionInitialPurchaseCompleted {\n subscription?: Subscription;\n actionDetails?: ActionDetails;\n /** @format GUID */\n paymentTransactionId?: string | null;\n}\n\nexport interface SubscriptionCycleReadyToPay {\n subscription?: Subscription;\n}\n\nexport interface SubscriptionRevived {\n subscription?: Subscription;\n}\n\nexport interface CreateSubscriptionResponse {\n subscription?: Subscription;\n /**\n * Payments order that should be paid (or authorize card) in order to activate subscription. Empty for free subscriptions.\n * @format GUID\n */\n paymentOrderId?: string | null;\n}\n\nexport interface UpdateSubscriptionRequest {\n /** Revision is validated if Subscription.revision is set */\n subscription?: Subscription;\n /**\n * Supported field: start_date\n * Can be updated only if Subscription is in Draft state\n */\n fieldMask?: string[];\n}\n\nexport interface UpdateSubscriptionResponse {\n subscription?: Subscription;\n}\n\nexport interface UpdateSubscriptionStartDateRequest {\n /**\n * Subscription ID\n * @format GUID\n */\n _id?: string;\n /**\n * Can be updated only if Subscription is in Draft state\n * By setting start_date in the future, end_date will be recalculated for termed Subscriptions\n * cycles_to_pay_on_creation will be set to 1 if no free trial is set\n */\n startDate?: Date | null;\n}\n\nexport interface UpdateSubscriptionStartDateResponse {\n subscription?: Subscription;\n}\n\nexport interface BassToSapiPaypalMigrationRequest {\n /**\n * Subscription ID\n * @format GUID\n */\n _id?: string;\n collectionMethod?: CollectionMethodEnumCollectionMethodWithLiterals;\n}\n\nexport interface BassToSapiPaypalMigrationResponse {\n subscription?: Subscription;\n}\n\nexport interface UpdateSubscriptionPoliciesRequest {\n /**\n * Subscription ID\n * @format GUID\n */\n _id?: string;\n cancellableByCustomer?: boolean | null;\n}\n\nexport interface UpdateSubscriptionPoliciesResponse {\n /** Updated policies of the subscription */\n policies?: SubscriptionPolicies;\n}\n\nexport interface UpdateSubscriptionBillingDateRequest {\n /**\n * ID of the subscription to update the billing date for.\n * @format GUID\n */\n _id: string;\n /** New billing date in `YYYY-MM-DDThh:mm:ss:sssZ` format. */\n billingDate: Date | null;\n /**\n * Information about how BASS adjusts the total of the next invoice. Extending\n * the current billing cycle results in a higher payment, while shortening it\n * leads to a lower payment. BASS offers automatic calculation of the proration\n * amount based on the number of days added to or removed from the current billing\n * cycle. Alternatively, you can use your own custom method to calculate the\n * proration amount. The custom proration amount can't exceed the total of the\n * current billing cycle.\n */\n proration?: Proration;\n}\n\nexport interface UpdateSubscriptionBillingDateResponse {\n /** Updated subscription. */\n subscription?: Subscription;\n}\n\nexport interface SubscriptionBillingDateUpdated {\n subscription?: Subscription;\n billingDate?: Date | null;\n proration?: Proration;\n}\n\nexport interface UpdateSubscriptionOriginRequest {\n /**\n * ID of the subscription to update origin.\n * @format GUID\n */\n _id?: string;\n /**\n * Origin entity ID of the subscription to update.\n * @format GUID\n */\n entityId?: string;\n}\n\nexport interface UpdateSubscriptionOriginResponse {\n /** Updated subscription. */\n subscription?: Subscription;\n}\n\nexport interface ReviseSubscriptionRequest {\n /**\n * Subscription ID\n * @format GUID\n */\n _id?: string;\n /**\n * 0 for no revision, maxSize is 100\n * @maxSize 100\n */\n items?: Item[];\n}\n\nexport interface ReviseSubscriptionResponse {\n subscription?: Subscription;\n}\n\nexport interface UpdateSubscriptionItemsRequest {\n /**\n * Subscription ID\n * @format GUID\n */\n _id?: string;\n /** Update action. For RESET_PENDING_UPDATES, nothing but the subscription ID should be defined in the request. */\n updateAction?: UpdateActionWithLiterals;\n /** Updates execution date. Relevant only for UpdateAction.SPECIFIC_DATE. Only specific date is supported. */\n scheduleAdditionalInfo?: ScheduleAdditionalInfo;\n /**\n * Existing items to update\n * @maxSize 100\n */\n itemsToUpdate?: ItemChange[];\n /**\n * Items to add\n * @maxSize 99\n */\n itemsToAdd?: Item[];\n /**\n * Existing items to delete\n * @format GUID\n * @maxSize 99\n */\n itemsToDelete?: string[] | null;\n}\n\nexport enum UpdateAction {\n NONE = 'NONE',\n /** Update subscription immediately, please note proration for updates changing price are not yet supported */\n IMMEDIATELY = 'IMMEDIATELY',\n /** Request updates that will take affect only at the start of the next billing cycle. */\n NEXT_BILLING_CYCLE = 'NEXT_BILLING_CYCLE',\n /** Reset all pending updates */\n RESET_PENDING_UPDATES = 'RESET_PENDING_UPDATES',\n /** Request updates that will take affect only at a specific date. */\n SPECIFIC_DATE = 'SPECIFIC_DATE',\n}\n\n/** @enumType */\nexport type UpdateActionWithLiterals =\n | UpdateAction\n | 'NONE'\n | 'IMMEDIATELY'\n | 'NEXT_BILLING_CYCLE'\n | 'RESET_PENDING_UPDATES'\n | 'SPECIFIC_DATE';\n\nexport interface ScheduleAdditionalInfo\n extends ScheduleAdditionalInfoParamOneOf {\n /**\n * Future date when the update becomes effective in `YYYY-MM-DDThh:mm:ss.sssZ`\n * format. The use of this field may be restricted in various BASS endpoints.\n * For example, in _Bulk Update Subscription Items_ it's only available in\n * combination with `{\"updateAction\": \"SPECIFIC_DATE\"}`, in _Resume Subscription_\n * only in combination with `{\"resumeAt\": \"SPECIFIC_DATE\"}`, and in\n * _Pause Subscription_ only in combination with `{\"pauseAt\": \"SPECIFIC_DATE\"}`.\n */\n specificDate?: Date | null;\n /**\n * When the update becomes effective, as number of billing cycles from now.\n * The use of this field may be restricted in various BASS endpoints.\n * For example, in _Pause Subscription_ it's only available in\n * combination with `{\"pauseAt\": \"NUMBER_OF_CYCLES_FROM_TODAY\"}`.\n * __Note__: Currently not supported in _Bulk Update Subscription Items by Filter_.\n * @min 1\n */\n numberOfCycles?: number;\n}\n\n/** @oneof */\nexport interface ScheduleAdditionalInfoParamOneOf {\n /**\n * Future date when the update becomes effective in `YYYY-MM-DDThh:mm:ss.sssZ`\n * format. The use of this field may be restricted in various BASS endpoints.\n * For example, in _Bulk Update Subscription Items_ it's only available in\n * combination with `{\"updateAction\": \"SPECIFIC_DATE\"}`, in _Resume Subscription_\n * only in combination with `{\"resumeAt\": \"SPECIFIC_DATE\"}`, and in\n * _Pause Subscription_ only in combination with `{\"pauseAt\": \"SPECIFIC_DATE\"}`.\n */\n specificDate?: Date | null;\n /**\n * When the update becomes effective, as number of billing cycles from now.\n * The use of this field may be restricted in various BASS endpoints.\n * For example, in _Pause Subscription_ it's only available in\n * combination with `{\"pauseAt\": \"NUMBER_OF_CYCLES_FROM_TODAY\"}`.\n * __Note__: Currently not supported in _Bulk Update Subscription Items by Filter_.\n * @min 1\n */\n numberOfCycles?: number;\n}\n\nexport interface UpdateSubscriptionItemsResponse {\n subscription?: Subscription;\n}\n\nexport interface BulkUpdateSubscriptionItemsByFilterRequest {\n /**\n * Filter to identify the subscriptions for which items are updated. For\n * supported fields see\n * [Search and Query: Bulk Update Subscription Items By Filter](https://bo.wix.com/wix-docs/rest/drafts/subscriptions-by-billing-by-wix/search-and-query#drafts_subscriptions-by-billing-by-wix_search-and-query_bulk-update-subscription-items-by-filter).\n * Sending an empty subscription filter results in a validation error.\n * In case you pass `{\"updateAction\": \"RESET_PENDING_UPDATES\"}`, use only the\n * `subscriptionId` field inside this filter. Passing any other filter results\n * in a failed validation error.\n */\n subscriptionFilter?: Record<string, any> | null;\n /**\n * Filter to specify which subscription items are updated. Make sure to use\n * the catalog item ID and not the item's unique ID. All subscription items\n * with matching `items.catalogReference.catalogItemId` are updated.\n *\n * Max: `100` reference catalog item IDs\n * @format GUID\n * @maxSize 100\n */\n catalogReferenceIds?: string[] | null;\n /**\n * Information about the update timing and update type.\n *\n * + `\"IMMEDIATELY\"`: The updates become effective immediately.\n * + `\"NEXT_BILLING_CYCLE\"`: The updates are scheduled for the beginning of the next billing cycle.\n * + `\"SPECIFIC_DATE\"`: The updates are scheduled for the date specified in `scheduleAdditionalInfo.specificDate`.\n * + `\"RESET_PENDING_UPDATES\"`: All currently scheduled updates for the specified supcriptions are canceled. Use only the `subscriptionId` field inside `subscriptionFilter`, all other filters result in failed validation errors.\n */\n updateAction?: UpdateActionWithLiterals;\n /**\n * Additional information for updates. Currently, only supported for\n * `{\"updateAction\": \"SPECIFIC_DATE\"}`.\n */\n scheduleAdditionalInfo?: ScheduleAdditionalInfo;\n /**\n * Update details for the susbcription items that match the filtering.\n * Currently, you can update only the item price, quantity, and tax. Note\n * that all item properties are updated to the same values. In case you want set\n * different values for individual items, you must call\n * _Bulk Update Subscription Items By Filter_ multiple times, once per unique update.\n */\n bulkItemUpdateData?: BulkItemChange;\n /**\n * __Not implemented yet__. Items to add to the subscriptions matching the filtering.\n * @maxSize 99\n */\n itemsToAdd?: Item[];\n}\n\nexport interface BulkItemChange {\n /** Information about the new item price. */\n pricingModel?: PricingModel;\n /**\n * New item quantity.\n *\n * Min: `1`\n * @min 1\n */\n quantity?: number | null;\n /** Information about the new item tax. */\n tax?: Tax;\n}\n\nexport interface BulkUpdateSubscriptionItemsByFilterResponse {\n /**\n * ID of your bulk job. You can use\n * [this Async Infra call](https://pbo.wix.com/fire-console/?artifact=com.wixpress.asyncinfra.async-job-service&service=wix.infra.asyncjobs.v1.AsyncJobService&method=ListAsyncJobItems&body=eyJqb2JfaWQiOiIifQ%3D%3D)\n * to retrieve information about the job status.\n */\n jobId?: string;\n}\n\nexport interface DeleteSubscriptionRequest {\n /** @format GUID */\n _id?: string;\n revision?: string;\n}\n\nexport interface DeleteSubscriptionResponse {}\n\nexport interface CancelSubscriptionRequest {\n /** @format GUID */\n _id: string;\n actionContext: ActionContext;\n}\n\nexport interface ActionContext {\n initiator?: ActionInitiatorWithLiterals;\n /** Optional action reason message */\n reason?: string | null;\n}\n\nexport interface CancelSubscriptionResponse {\n subscription?: Subscription;\n}\n\nexport interface PauseSubscriptionRequest {\n /** @format GUID */\n _id: string;\n pausePolicy?: PausePolicyWithLiterals;\n pauseAt?: PauseAtWithLiterals;\n /** contains additional scheduling information for certain pause_at options (for example: SPECIFIC_DATE & NUMBER_OF_CYCLES_FROM_TODAY) */\n pauseAtSchedule?: ScheduleAdditionalInfo;\n /** contains additional scheduling information for certain auto_resume_at either specific date */\n autoResumeAtSchedule?: ScheduleAdditionalInfo;\n actionContext: ActionContext;\n /** The type of pause to apply (PAUSE for traditional pause, SKIP_CYCLE for skip cycle). */\n pauseType?: PauseTypeWithLiterals;\n}\n\nexport interface PauseSubscriptionResponse {\n subscription?: Subscription;\n}\n\nexport interface SubscriptionPaused {\n subscription?: Subscription;\n pausePolicy?: PausePolicyWithLiterals;\n actionDetails?: ActionDetails;\n}\n\nexport interface PauseSubscriptionRequested {\n subscription?: Subscription;\n pauseAt?: PauseAtWithLiterals;\n pausePolicy?: PausePolicyWithLiterals;\n actionDetails?: ActionDetails;\n}\n\nexport interface ScheduledPauseCanceled {\n subscription?: Subscription;\n actionDetails?: ActionDetails;\n}\n\nexport interface ResumeSubscriptionRequest {\n /** @format GUID */\n _id: string;\n resumeAt?: ResumeAtWithLiterals;\n /** contains additional scheduling information for certain resume_at options (for example: SPECIFIC_DATE) */\n resumeAtSchedule?: ScheduleAdditionalInfo;\n actionContext: ActionContext;\n}\n\nexport interface ResumeSubscriptionResponse {\n subscription?: Subscription;\n}\n\nexport interface SubscriptionResumed {\n subscription?: Subscription;\n actionDetails?: ActionDetails;\n}\n\nexport interface ResumeSubscriptionRequested {\n subscription?: Subscription;\n resumeAt?: ResumeAtWithLiterals;\n actionDetails?: ActionDetails;\n}\n\nexport interface ScheduledResumeCanceled {\n subscription?: Subscription;\n actionDetails?: ActionDetails;\n}\n\nexport interface SearchSubscriptionsRequest\n extends SearchSubscriptionsRequestPagingMethodOneOf {\n /** Limit number of results and enable to skip rows. The default limit is 25. */\n paging?: Paging;\n /** A Cursor option for efficient paging. Pass this field from the previous search response to continue to the next page. */\n cursor?: CursorPaging;\n /** A filter object */\n filter?: any;\n /** A Sorting option by field name and order. */\n sorting?: SortingClauses;\n}\n\n/** @oneof */\nexport interface SearchSubscriptionsRequestPagingMethodOneOf {\n /** Limit number of results and enable to skip rows. The default limit is 25. */\n paging?: Paging;\n /** A Cursor option for efficient paging. Pass this field from the previous search response to continue to the next page. */\n cursor?: CursorPaging;\n}\n\nexport interface SortingClauses {\n sorting?: Sorting[];\n}\n\nexport interface SearchSubscriptionsResponse {\n subscriptions?: Subscription[];\n cursor?: CursorPaging;\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Total number of items matching the filter. Available only on the first page of *Search* */\n total?: number | null;\n}\n\nexport interface TurnOnSubscriptionAutoRenewalRequest {\n /** @format GUID */\n _id: string;\n actionContext: ActionContext;\n}\n\nexport interface TurnOnSubscriptionAutoRenewalResponse {\n subscription?: Subscription;\n}\n\nexport interface SubscriptionAutoRenewalTurnedOn {\n subscription?: Subscription;\n actionDetails?: ActionDetails;\n}\n\nexport interface TurnOffSubscriptionAutoRenewalRequest {\n /** @format GUID */\n _id: string;\n actionContext: ActionContext;\n}\n\nexport interface TurnOffSubscriptionAutoRenewalResponse {\n subscription?: Subscription;\n}\n\nexport interface SubscriptionAutoRenewalTurnedOff {\n subscription?: Subscription;\n actionDetails?: ActionDetails;\n}\n\nexport interface MarkLatestInvoiceAsPaidRequest {\n /**\n * The ID of the offline subscription to mark as paid its latest invoice\n * @format GUID\n */\n subscriptionId: string;\n}\n\nexport interface MarkLatestInvoiceAsPaidResponse {\n subscription?: Subscription;\n}\n\nexport interface LatestInvoiceMarkedAsPaid {\n subscription?: Subscription;\n}\n\nexport interface MultipleSubscriptionsOnOrdersInvoice {\n /**\n * the invoice id of the affected subscription\n * @format GUID\n */\n invoiceId?: string;\n /**\n * the order id of the affected subscription\n * @format GUID\n */\n orderId?: string;\n}\n\nexport interface MarkBillingCycleAsPaidRequest {\n /**\n * The ID of the subscription to mark as paid its invoice.\n * @format GUID\n */\n subscriptionId: string;\n /**\n * The subscription cycle for which the invoice is to be marked as paid.\n * If left empty, the most recent cycle will be selected.\n * @min 1\n */\n paidCycle?: number | null;\n}\n\nexport interface MarkBillingCycleAsPaidResponse {\n subscription?: Subscription;\n}\n\nexport interface GetSubscriptionsStatsRequest {}\n\nexport interface GetSubscriptionsStatsResponse {\n amountByStatuses?: AmountByStatus[];\n total?: number;\n}\n\nexport interface AmountByStatus {\n status?: SubscriptionStatusEnumSubscriptionStatusWithLiterals;\n amount?: number;\n}\n\nexport interface ExtendSubscriptionRequest\n extends ExtendSubscriptionRequestExtendPolicyOneOf {\n /** User won't be charged for additional period added on top of subscription end date. */\n extensionPeriod?: Duration;\n /**\n * user will be charged for billing cycles added\n * @min 1\n */\n extensionBillingCycles?: number;\n /**\n * The ID of the subscription to be extended\n * @format GUID\n */\n _id: string;\n actionContext: ActionContext;\n}\n\n/** @oneof */\nexport interface ExtendSubscriptionRequestExtendPolicyOneOf {\n /** User won't be charged for additional period added on top of subscription end date. */\n extensionPeriod?: Duration;\n /**\n * user will be charged for billing cycles added\n * @min 1\n */\n extensionBillingCycles?: number;\n}\n\nexport interface ExtendSubscriptionResponse {\n /** The now extended subscription */\n subscription?: Subscription;\n}\n\nexport interface AllowedActionsRequest {\n /** @format GUID */\n _id: string;\n /**\n * List of additional fields to be included in the response.\n * @maxSize 1\n */\n fields?: RequestedFieldsWithLiterals[];\n}\n\nexport enum RequestedFields {\n UNKNOWN_REQUESTED_FIELD = 'UNKNOWN_REQUESTED_FIELD',\n /** Include unsupported action list, including the reasons for the lack of support */\n UNSUPPORTED_ACTION = 'UNSUPPORTED_ACTION',\n}\n\n/** @enumType */\nexport type RequestedFieldsWithLiterals =\n | RequestedFields\n | 'UNKNOWN_REQUESTED_FIELD'\n | 'UNSUPPORTED_ACTION';\n\nexport interface AllowedActionsResponse {\n /** List of actions that are allowed. */\n actions?: Action[];\n /**\n * List of actions that are not supported, included only if requested. Provides reasons for each unsupported action.\n * @maxSize 20\n */\n unsupportedActions?: UnsupportedAction[];\n}\n\nexport interface UnsupportedAction {\n actionType?: ActionTypeWithLiterals;\n /**\n * Provides detailed reasons for the unsupported action. Each `UnsupportedReason` includes a code and a message explaining why the action is not allowed.\n * @maxSize 20\n */\n reasons?: UnsupportedReason[];\n}\n\nexport interface UnsupportedReason {\n code?: string;\n description?: string | null;\n}\n\nexport interface ListUpcomingChargesRequest {\n /**\n * Subscription id charges to be previewed for\n * @format GUID\n */\n subscriptionId: string;\n /** Period of time to provide charged for. If not provided,then only next charge will be returned. */\n customDuration?: Duration;\n /**\n * Date of the next billing cycle so that the upcoming charges will be calculated accordingly.\n * If not provided, the upcoming charges will be calculated according to the existing next billing date.\n */\n nextBillingDate?: Date | null;\n}\n\nexport interface ListUpcomingChargesResponse {\n upcomingCharges?: SubscriptionCharge[];\n}\n\nexport interface PreviewSubscriptionChargesRequest\n extends PreviewSubscriptionChargesRequestSubscriptionOneOf {\n /** Information about a non-existing subscription. */\n subscriptionInfo?: SubscriptionInfo;\n}\n\n/** @oneof */\nexport interface PreviewSubscriptionChargesRequestSubscriptionOneOf {\n /** Information about a non-existing subscription. */\n subscriptionInfo?: SubscriptionInfo;\n}\n\n/** Subscription information to use for calculating the preview of charges for a subscription. */\nexport interface SubscriptionInfo {\n billingSettings?: BillingSettings;\n items?: Item[];\n startDate?: Date | null;\n}\n\nexport interface PreviewSubscriptionChargesResponse {\n /** Charges for subscription. */\n charges?: Charge[];\n}\n\n/** Represents a charge applicable to a subscription. */\nexport interface Charge {\n /** The cycle number from which the charge starts. */\n cycleFrom?: number;\n /** The number of cycles for which the charge is applicable. */\n cycleCount?: number | null;\n /** The breakdown of the charge */\n totals?: Totals;\n /** The billing date from which the charge starts */\n cycleBillingDate?: Date | null;\n}\n\nexport interface PreviewSubscriptionsChargesRequest {\n /**\n * Information required to calculate the preview charges for the subscriptions, including an identifier.\n * @minSize 1\n * @maxSize 10\n */\n subscriptionsBillingDetails?: SubscriptionBillingDetails[];\n /**\n * Specifies the number of upcoming billing charges to preview for all subscriptions in the order.\n * For instance, if a subscription costs $10 for the first 3 cycles, $12 for cycles 4 through 7,\n * $15 for cycles 8 through 10, and $20 for cycle 11 onwards:\n * - Sending \"1\" will calculate and return charges for cycles 4 through 7 since it's the first charge in the future.\n * - Sending \"2\" will provide a response with charges for cycles 4 through 7 and cycles 8 through 10.\n * - Sending \"3\" or more will include totals for cycles 4 through 7, cycles 8 through 10, and from cycle 11 onwards.\n * If no value is provided, the response will include charges for all upcoming cycles, including the existing one,\n * in this case, charges for cycle 1 through 3.\n * If there is a single charge for a subscription, meaning that subscription price remains consistent across all cycles,\n * then even if future_charges_count is set, it will be ignored and the only charge this subscription has will be returned.\n * @min 1\n * @max 10\n */\n numberOfNextRecurringCharges?: number | null;\n}\n\nexport interface SubscriptionBillingDetails {\n /**\n * External identifier of the subscription\n * @format GUID\n */\n externalId?: string | null;\n /** Billing details parameters including schedule, currency, etc. */\n billingSettings?: BillingSettings;\n /**\n * Items, minSize is 1, maxSize is 100\n * @minSize 1\n * @maxSize 100\n */\n items?: Item[];\n /** Subscription start date, now if not set */\n startDate?: Date | null;\n /** Shipping address associated with subscription. At the moment used only for payments. Optional. */\n shippingAddress?: FullAddressDetails;\n}\n\nexport interface PreviewSubscriptionsChargesResponse {\n /** Charges for the subscriptions, including an identifier. */\n subscriptionsCharges?: SubscriptionCharges[];\n}\n\nexport interface SubscriptionCharges {\n /**\n * External identifier of the subscription\n * @format GUID\n */\n externalId?: string | null;\n /** Charges for subscription. */\n charges?: Charge[];\n}\n\nexport interface CreateSubscriptionForOrderRequest {\n /** Subscription needs to be created */\n subscription?: Subscription;\n /**\n * Optional unique identifier for this request in order to prevent subscription duplications\n * @format GUID\n */\n idempotencyKey?: string | null;\n}\n\nexport interface CreateSubscriptionForOrderResponse {\n /** Created subscription */\n subscription?: Subscription;\n /** Non-persistent invoice */\n invoice?: Invoice;\n}\n\n/** An invoice includes information about the subscription and the customer. */\nexport interface Invoice {\n /**\n * Invoice ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Date and time the invoice was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the invoice was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Revision number, which increments by 1 each time the invoice is updated.\n * To prevent conflicting changes,\n * the current revision must be passed when updating the invoice.\n *\n * Ignored when creating a invoice.\n * @readonly\n */\n revision?: string | null;\n /** Information about the invoice origin. */\n origin?: BusinessOriginData;\n /**\n * Invoice status.\n *\n * + `\"UNKNOWN\"`: There is no information about the invoice status.\n * + `\"OPEN\"`: BASS has created the invoice but hasn't initiated the payment process.\n * + `\"PAID\"`: The customer has successfully paid for the invoice.\n * + `\"ATTEMPT_FAILED\"`: The payment process has started and there has been at least one unsuccessful payment attempt.\n * + `\"FAILED\"`: The payment process has failed and there are no more retries.\n * + `\"CANCELED\"`: The payment process has been stopped because the related subscription has been canceled.\n * @readonly\n */\n status?: InvoiceStatusWithLiterals;\n /**\n * 3-letter currency code of the invoice in\n * [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.\n * @format CURRENCY\n */\n currency?: string;\n /** Information about the customer. */\n customer?: Customer;\n /**\n * Whether the payment is processed through Wix and whether the customer must provide some input.\n *\n * + `\"UNKNOWN\"`: There is no information about the collection method.\n * + `\"AUTO_CHARGE\"`: The customer pays automatically through Wix.\n * + `\"SEND_INVOICE\"`: The customer pays through Wix, but some manual input is required.\n * + `\"OFFLINE\"`: The customer pays outside of Wix.\n */\n collectionMethod?: CollectionMethodWithLiterals;\n /**\n * ID of the\n * [payment method](https://bo.wix.com/wix-docs/rest/wix-cashier/settings/payment-method-type/payment-method-type-object).\n * Not available for the first payment of a subscription and all offline\n * payments.\n * @format GUID\n */\n paymentMethodId?: string | null;\n /**\n * Cashier [Order ID](https://dev.wix.com/docs/rest/payments/wix-cashier/pay/order#order-object)\n * for the corresponding payment.\n * @format GUID\n * @readonly\n */\n paymentOrderId?: string | null;\n /** Information about a discount. Available only for invoices that include a discount. */\n discount?: InvoiceDiscount;\n /** Billing address. */\n billingAddress?: FullAddressDetails;\n /** Shipping address. Available only for `\"PHYSICAL\"` line items. */\n shippingAddress?: FullAddressDetails;\n /**\n * Shipping fee in `0.00` format.\n * @format DECIMAL_VALUE\n */\n shippingFee?: string | null;\n /**\n * Information about the invoice's totals.\n * @readonly\n */\n totals?: Totals;\n /** Line items belonging to the invoice. */\n invoiceItems?: InvoiceItem[];\n /**\n * Whether the invoice is used to validate payment details.\n *\n * + `true`: BASS uses the invoice to test payment details. Relevant for free trials. Ensures that Wix can collect the payment of the first billing cycle.\n * + `false`: Standard invoice.\n */\n isAuthorization?: boolean | null;\n /** Whether the invoice's `totals.totalPrice` includes tax. */\n isTaxInclusive?: boolean | null;\n /** Details of the latest payment attempt. */\n latestPaymentAttempt?: LatestPaymentAttempt;\n /** List of charges and credits that adjust the invoice's `totals.totalPrice`. */\n adjustments?: PriceAdjustment[];\n /**\n * Invoice Number.\n * @maxLength 10\n * @readonly\n */\n invoiceNumber?: string | null;\n /**\n * Shipping charges for the invoice.\n * Supports only one discount without cycles.\n * Discounts with cycles (repeated discounts across different billing cycles) are not supported for shipping\n */\n shippingCharges?: InvoiceShippingCharges;\n /** Information about the invoice tax */\n taxData?: TaxData;\n /** Business address. */\n businessAddress?: Address;\n /**\n * ID of the billing order that created this invoice.\n * @format GUID\n */\n orderId?: string | null;\n /**\n * Platform origin the invoice is originated from.\n * @format GUID\n */\n platformOriginAppId?: string | null;\n /**\n * Refund information, provided that there are refunds for this invoice.\n * @readonly\n */\n refundInfo?: RefundInfo;\n}\n\nexport interface BusinessOriginData {\n /**\n * ID of the app for which BASS has created the invoice. For example,\n * `\"1380b703-ce81-ff05-f115-39571d94dfcd\"` for the Wix eCommerce app.\n * @format GUID\n */\n appId?: string;\n /**\n * [Instance ID](https://dev.wix.com/api/rest/app-management/apps/app-instance/get-app-instance)\n * of the app for which BASS has created the invoice.\n * @format GUID\n */\n instanceId?: string;\n /**\n * ID of the entity that triggered the invoice creation. For example, the ID of a\n * [pricing plan](https://dev.wix.com/docs/rest/payments/pricing-plans/pricing-plans/plan#plan-object).\n * @format GUID\n */\n entityId?: string;\n}\n\nexport enum InvoiceStatus {\n UNKNOWN = 'UNKNOWN',\n OPEN = 'OPEN',\n PAID = 'PAID',\n FAILED = 'FAILED',\n ATTEMPT_FAILED = 'ATTEMPT_FAILED',\n CANCELED = 'CANCELED',\n REFUNDED = 'REFUNDED',\n}\n\n/** @enumType */\nexport type InvoiceStatusWithLiterals =\n | InvoiceStatus\n | 'UNKNOWN'\n | 'OPEN'\n | 'PAID'\n | 'FAILED'\n | 'ATTEMPT_FAILED'\n | 'CANCELED'\n | 'REFUNDED';\n\nexport enum CollectionMethod {\n UNKNOWN = 'UNKNOWN',\n AUTO_CHARGE = 'AUTO_CHARGE',\n OFFLINE = 'OFFLINE',\n SEND_INVOICE = 'SEND_INVOICE',\n}\n\n/** @enumType */\nexport type CollectionMethodWithLiterals =\n | CollectionMethod\n | 'UNKNOWN'\n | 'AUTO_CHARGE'\n | 'OFFLINE'\n | 'SEND_INVOICE';\n\nexport enum CreationMode {\n UNKNOWN = 'UNKNOWN',\n SYSTEM = 'SYSTEM',\n MANUAL = 'MANUAL',\n}\n\n/** @enumType */\nexport type CreationModeWithLiterals =\n | CreationMode\n | 'UNKNOWN'\n | 'SYSTEM'\n | 'MANUAL';\n\nexport interface LatestPaymentAttempt {\n /**\n * ID of the latest payment attempt.\n * @format GUID\n * @readonly\n */\n paymentAttemptId?: string;\n /**\n * Date and time of the latest payment attempt in `YYYY-MM-DDThh:mm.sssZ` format.\n * @readonly\n */\n dateAttempt?: Date | null;\n /** Number of the latest payment attempt. */\n attemptNumber?: number;\n /**\n * Status of the latest payment attempt.\n *\n * + `\"UNKNOWN\"`: There is no information about the status of the latest payment attempt.\n * + `\"SCHEDULED\"`: The latest payment attempt is scheduled but hasn't started yet.\n * + `\"IN_PROGRESS\"`: The latest payment attempt is in progress.\n * + `\"PAID\"`: The latest payment attempt resulted in a successful payment.\n * + `\"DECLINED\"`: The latest payment attempt has been declined.\n * + `\"TECHNICAL_FAILURE\"`: The latest payment attempt couldn't be process due to a technical failure.\n * + `\"CANCELED\"`: The latest payment attempt has been canceled by BASS.\n * @readonly\n */\n status?: PaymentAttemptStatusWithLiterals;\n /**\n * Whether BASS tries to collect the payment another time. Available only when\n * `latestPaymentAttempt.status` is set to `\"DECLINED\"`.\n */\n retryable?: boolean;\n}\n\nexport enum PaymentAttemptStatus {\n UNKNOWN = 'UNKNOWN',\n SCHEDULED = 'SCHEDULED',\n IN_PROGRESS = 'IN_PROGRESS',\n PAID = 'PAID',\n DECLINED = 'DECLINED',\n TECHNICAL_FAILURE = 'TECHNICAL_FAILURE',\n CANCELED = 'CANCELED',\n PENDING = 'PENDING',\n}\n\n/** @enumType */\nexport type PaymentAttemptStatusWithLiterals =\n | PaymentAttemptStatus\n | 'UNKNOWN'\n | 'SCHEDULED'\n | 'IN_PROGRESS'\n | 'PAID'\n | 'DECLINED'\n | 'TECHNICAL_FAILURE'\n | 'CANCELED'\n | 'PENDING';\n\nexport interface PriceAdjustment extends PriceAdjustmentAdjustmentTypeOneOf {\n /** Adjustment that increases the price. */\n charge?: PriceAdjustmentValue;\n /** Adjustment that lowers the price. */\n credit?: PriceAdjustmentValue;\n}\n\n/** @oneof */\nexport interface PriceAdjustmentAdjustmentTypeOneOf {\n /** Adjustment that increases the price. */\n charge?: PriceAdjustmentValue;\n /** Adjustment that lowers the price. */\n credit?: PriceAdjustmentValue;\n}\n\nexport interface PriceAdjustmentValue\n extends PriceAdjustmentValueAdjustmentValueTypeOneOf {\n /**\n * Absolute amount that adjusts the price.\n *\n * Min: `0.01`\n * @decimalValue options { gt:0.00 }\n */\n amount?: string;\n /**\n * Relative factor that adjusts the price. For example, setting\n * `multiplier` to:\n * - `0.50` results in a price adjustment of 50% of the original value.\n * - `0.75` results in a price adjustment of 75% of the original value.\n * - `1.00` results in a price adjustment of 100% of the original value.\n *\n * Min: `0.01`\n * Max: `1.00`\n * @decimalValue options { gt:0.00, lte:1 }\n */\n multiplier?: string;\n}\n\n/** @oneof */\nexport interface PriceAdjustmentValueAdjustmentValueTypeOneOf {\n /**\n * Absolute amount that adjusts the price.\n *\n * Min: `0.01`\n * @decimalValue options { gt:0.00 }\n */\n amount?: string;\n /**\n * Relative factor that adjusts the price. For example, setting\n * `multiplier` to:\n * - `0.50` results in a price adjustment of 50% of the original value.\n * - `0.75` results in a price adjustment of 75% of the original value.\n * - `1.00` results in a price adjustment of 100% of the original value.\n *\n * Min: `0.01`\n * Max: `1.00`\n * @decimalValue options { gt:0.00, lte:1 }\n */\n multiplier?: string;\n}\n\nexport interface InvoiceShippingCharges {\n /**\n * Amount of the shipping fee in `0.00` format.\n *\n * Min: `0.01`\n * @decimalValue options { gte:0.00, maxScale:2 }\n */\n amount?: string;\n /** Tax of the shipping fee */\n tax?: Tax;\n /** Information about the shipping charges tax data */\n taxData?: ItemTaxData;\n discount?: Discount;\n}\n\n/** Tax data from all items */\nexport interface TaxData {\n /** Aggregated tax data from all items */\n taxSummary?: TaxSummary;\n}\n\nexport interface TaxSummary {\n /**\n * Aggregated from tax_breakdowns with exemptions excluded from amount\n * @format DECIMAL_VALUE\n */\n aggregatedTaxAmount?: string;\n /**\n * Array of each tax applied, grouped by `\"jurisdiction\"`, `\"jurisdiction_type\"`, `\"tax_type\"`, `\"tax_name\"` and `\"tax_rate\"`.\n * @maxSize 50\n */\n aggregatedTaxBreakdowns?: AggregatedTaxBreakdown[];\n}\n\nexport interface AggregatedTaxBreakdown {\n /**\n * Name of the tax that was calculated.\n * @maxLength 200\n */\n taxName?: string;\n /**\n * Type of tax that was calculated.\n * @maxLength 200\n */\n taxType?: string;\n /**\n * Jurisdiction that taxes were calculated for.\n * @maxLength 200\n */\n jurisdiction?: string;\n /** Type of jurisdiction that taxes were calculated for. */\n jurisdictionType?: string;\n /**\n * Tax rate used for this jurisdiction, as a decimal. For example, 10% tax is `\"0.1000\"` and 200% tax is `\"2.0000\"`.\n * @decimalValue options { gte:0, maxScale:6 }\n */\n rate?: string;\n /**\n * Total amount of this tax for this jurisdiction.\n * @format DECIMAL_VALUE\n * @decimalValue options { maxScale:4 }\n */\n aggregatedTaxAmount?: string;\n}\n\nexport interface RefundInfo {\n /**\n * If refunds are present, this will include the total amount refunded.\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0.00, maxScale:2 }\n */\n totalRefundAmount?: string | null;\n /**\n * The refunds that have been applied to this invoice\n * @maxSize 20\n */\n refunds?: Refund[];\n}\n\nexport interface Refund {\n /**\n * refund amount\n * @format DECIMAL_VALUE\n * @decimalValue options { gt:0.00, maxScale:2 }\n */\n amount?: string;\n /** the date of the refund transaction */\n transactionDate?: Date | null;\n /**\n * the transaction id associated with this refund\n * @format GUID\n */\n transactionId?: string;\n /** a reason for the refund */\n reason?: RefundReasonWithLiterals;\n /**\n * a description of the refund - this is a free text field for the initiator\n * @maxLength 255\n */\n description?: string | null;\n}\n\nexport enum RefundReason {\n UNKNOWN_REFUND_REASON = 'UNKNOWN_REFUND_REASON',\n DUPLICATE_CHARGE = 'DUPLICATE_CHARGE',\n FRAUDULENT = 'FRAUDULENT',\n CUSTOMER_REQUEST = 'CUSTOMER_REQUEST',\n PROVISION_FAILED = 'PROVISION_FAILED',\n OTHER = 'OTHER',\n}\n\n/** @enumType */\nexport type RefundReasonWithLiterals =\n | RefundReason\n | 'UNKNOWN_REFUND_REASON'\n | 'DUPLICATE_CHARGE'\n | 'FRAUDULENT'\n | 'CUSTOMER_REQUEST'\n | 'PROVISION_FAILED'\n | 'OTHER';\n\nexport interface Task {\n key?: TaskKey;\n executeAt?: Date | null;\n payload?: string | null;\n}\n\nexport interface TaskKey {\n appId?: string;\n instanceId?: string;\n subjectId?: string | null;\n}\n\nexport interface TaskAction extends TaskActionActionOneOf {\n complete?: Complete;\n cancel?: Cancel;\n reschedule?: Reschedule;\n}\n\n/** @oneof */\nexport interface TaskActionActionOneOf {\n complete?: Complete;\n cancel?: Cancel;\n reschedule?: Reschedule;\n}\n\nexport interface Complete {}\n\nexport interface Cancel {}\n\nexport interface Reschedule {\n executeAt?: Date | null;\n payload?: string | null;\n}\n\nexport interface V1SubscriptionEvent extends V1SubscriptionEventEventOneOf {\n /** A subscriptions was created */\n created?: V1SubscriptionCreated;\n /** Subscription is considered active and will be visible to site owners and members */\n activated?: V1SubscriptionActivated;\n /**\n * Subscription was canceled either by cancellation request with requested expiration date NOW or by payment provider.\n * If cancelled by payment provider subscription will be valid until the date calculated depending on how many cycles it was already paid for.\n */\n canceled?: V1SubscriptionCanceled;\n /** Subscription was updated. Currently the only possible change is valid_until date */\n updated?: V1SubscriptionUpdated;\n /** Subscription cycle has started. Currently the cycle starts when a payment is received. */\n cycleTriggered?: SubscriptionCycleTriggered;\n /** Offline subscription was marked as paid */\n markedAsPaid?: SubscriptionMarkedAsPaid;\n /**\n * Subscription cancellation for the future date was requested.\n * Subscription will stay in pending cancellation status until the date calculated depending on free trial and the next payment date.\n */\n cancellationRequested?: SubscriptionCancellationRequested;\n /** Subscription and it's payment schedule (for recurring) was suspended */\n suspended?: SubscriptionSuspended;\n /** Previously suspended subscription and it's payment schedule (for recurring) was resumed */\n resumed?: V1SubscriptionResumed;\n /** Subscription expired according to valid_until expiration date. */\n expired?: SubscriptionExpired;\n /** Subscription initial purchase completed */\n initialPurchaseCompleted?: V1SubscriptionInitialPurchaseCompleted;\n}\n\n/** @oneof */\nexport interface V1SubscriptionEventEventOneOf {\n /** A subscriptions was created */\n created?: V1SubscriptionCreated;\n /** Subscription is considered active and will be visible to site owners and members */\n activated?: V1SubscriptionActivated;\n /**\n * Subscription was canceled either by cancellation request with requested expiration date NOW or by payment provider.\n * If cancelled by payment provider subscription will be valid until the date calculated depending on how many cycles it was already paid for.\n */\n canceled?: V1SubscriptionCanceled;\n /** Subscription was updated. Currently the only possible change is valid_until date */\n updated?: V1SubscriptionUpdated;\n /** Subscription cycle has started. Currently the cycle starts when a payment is received. */\n cycleTriggered?: SubscriptionCycleTriggered;\n /** Offline subscription was marked as paid */\n markedAsPaid?: SubscriptionMarkedAsPaid;\n /**\n * Subscription cancellation for the future date was requested.\n * Subscription will stay in pending cancellation status until the date calculated depending on free trial and the next payment date.\n */\n cancellationRequested?: SubscriptionCancellationRequested;\n /** Subscription and it's payment schedule (for recurring) was suspended */\n suspended?: SubscriptionSuspended;\n /** Previously suspended subscription and it's payment schedule (for recurring) was resumed */\n resumed?: V1SubscriptionResumed;\n /** Subscription expired according to valid_until expiration date. */\n expired?: SubscriptionExpired;\n /** Subscription initial purchase completed */\n initialPurchaseCompleted?: V1SubscriptionInitialPurchaseCompleted;\n}\n\nexport interface V1SubscriptionCreated {\n subscription?: V1Subscription;\n}\n\nexport interface V1Subscription {\n /**\n * ID of the subscription\n * @format GUID\n * @readonly\n */\n _id?: string;\n /**\n * ID of the app which created the subscription\n * @format GUID\n */\n wixAppId?: string;\n /**\n * Instance ID of the Subscriptions app\n * @format GUID\n */\n tenantId?: string;\n /**\n * ID of entity in app (e.g. a cart in stores/order in paid plans)\n * @format GUID\n */\n originEntityId?: string;\n /** Site member or a contact who bought the subscription */\n subscriber?: Subscriber;\n /**\n * Wix Pay order ID, is empty for free subscriptions\n * @format GUID\n */\n wixPayOrderId?: string | null;\n /**\n * Subscription name (e.g. a product or subscription package name)\n * @maxLength 150\n */\n name?: string;\n /**\n * Optional additional subscription description\n * @maxLength 500\n */\n description?: string;\n /** Amount to be paid for a single scheduled payment */\n price?: Money;\n /** True if the subscription is recurring, false for a single payment subscription */\n recurring?: boolean;\n /** Online (paid by subscriber using wix pay) or offline (need to manually mark as paid) */\n subscriptionType?: SubscriptionTypeWithLiterals;\n /** Active, expired, canceled, etc. */\n subscriptionStatus?: V1SubscriptionStatusEnumSubscriptionStatusWithLiterals;\n /** Subscription start date (may differ from creation date) */\n validFrom?: Date | null;\n /** Subscription expiration date */\n validUntil?: Date | null;\n /** Status of last payment associated with this subscription */\n lastPaymentStatus?: PaymentStatusEnumPaymentStatusWithLiterals;\n /** Payment schedule in the wix pay format. Exists for recurring subscriptions only. */\n billingProfile?: V2Subscription;\n /** Owner, member, etc. - present if subscription is canceled */\n cancellationInitiator?: CancellationInitiatorWithLiterals;\n /** Optional, present if subscription is canceled */\n cancellationReason?: string | null;\n /** Can be used for arbitrary app-specific map<string, string> data */\n externalData?: Record<string, string>;\n /** Date when subscription was created (not related to payment dates) */\n dateCreated?: Date | null;\n /** Restrictions on possible subscription actions. Default policy has all restrictions enabled. */\n policy?: SubscriptionPolicy;\n /** List of subscription suspension periods */\n suspensions?: Suspension[];\n /** Initial subscription expiration date that was calculated on the subscription purchase plus duration of suspensions */\n validUntilDateWithSuspensions?: Date | null;\n /** Duration of single payment subscription (instead of billing_profile) */\n singlePaymentDuration?: V1Duration;\n /** @format GUID */\n originInstanceId?: string | null;\n}\n\nexport interface Subscriber {\n /**\n * Member or contact ID\n * @format GUID\n */\n _id?: string;\n /** Member or contact */\n identityType?: IdentityTypeWithLiterals;\n}\n\nexport enum IdentityType {\n /** Identity type undefined */\n UNDEFINED = 'UNDEFINED',\n /** Subscription is associated with a member ID */\n MEMBER = 'MEMBER',\n /** Subscriptions is associated with a contact ID */\n CONTACT = 'CONTACT',\n}\n\n/** @enumType */\nexport type IdentityTypeWithLiterals =\n | IdentityType\n | 'UNDEFINED'\n | 'MEMBER'\n | 'CONTACT';\n\n/** Price of a payment. Includes amount and currency. */\nexport interface Money {\n /**\n * Monetary amount i.e. 3.99.\n * @format DECIMAL_VALUE\n */\n amount?: string;\n /**\n * Currency in ISO 4217 format i.e. USD.\n * @minLength 3\n * @maxLength 3\n */\n currency?: string;\n}\n\nexport enum SubscriptionType {\n UNDEFINED = 'UNDEFINED',\n /** Payments made by the subscriber */\n ONLINE = 'ONLINE',\n /** Payments managed manually by the site owner */\n OFFLINE = 'OFFLINE',\n}\n\n/** @enumType */\nexport type SubscriptionTypeWithLiterals =\n | SubscriptionType\n | 'UNDEFINED'\n | 'ONLINE'\n | 'OFFLINE';\n\nexport enum V1SubscriptionStatusEnumSubscriptionStatus {\n /** Subscription status undefined */\n UNDEFINED = 'UNDEFINED',\n /** Subscription created, but hasn't been paid for yet. This status if filtered out in ListSubscriptions response by default. */\n DRAFT = 'DRAFT',\n /** Subscription has been paid for, but the start date is in the future */\n PENDING = 'PENDING',\n /** Subscription is active */\n ACTIVE = 'ACTIVE',\n /** Subscription has expired */\n EXPIRED = 'EXPIRED',\n /** Subscription has been canceled */\n CANCELED = 'CANCELED',\n /** Subscription has been set to be canceled at a future date */\n PENDING_CANCELLATION = 'PENDING_CANCELLATION',\n /** Subscription is suspended */\n SUSPENDED = 'SUSPENDED',\n}\n\n/** @enumType */\nexport type V1SubscriptionStatusEnumSubscriptionStatusWithLiterals =\n | V1SubscriptionStatusEnumSubscriptionStatus\n | 'UNDEFINED'\n | 'DRAFT'\n | 'PENDING'\n | 'ACTIVE'\n | 'EXPIRED'\n | 'CANCELED'\n | 'PENDING_CANCELLATION'\n | 'SUSPENDED';\n\nexport enum PaymentStatusEnumPaymentStatus {\n /** Payment status undefined */\n UNDEFINED = 'UNDEFINED',\n /** Payment has been paid */\n PAID = 'PAID',\n /** Payment has been refunded */\n REFUNDED = 'REFUNDED',\n /** Recurring payment has failed */\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. Can happen for free trial and PayPal */\n PENDING = 'PENDING',\n}\n\n/** @enumType */\nexport type PaymentStatusEnumPaymentStatusWithLiterals =\n | PaymentStatusEnumPaymentStatus\n | 'UNDEFINED'\n | 'PAID'\n | 'REFUNDED'\n | 'FAILED'\n | 'UNPAID'\n | 'PENDING';\n\n/**\n * Recurring payment is described by `frequency` (day, week, month) and `interval`.\n *\n * For example, to create a recurring payment every 14 days, just set `interval` to 14 and frequency to `DAY`.\n *\n * In some cases there should be a trial period for the order, after which payments start to occur.\n * Trial period is also defined as `frequency` and `interval` pair.\n *\n * So one can define a monthly 'subscription' with a 14 days trial period.\n */\nexport interface V2Subscription {\n /** frequency of recurring payment (required) */\n frequency?: SubscriptionFrequencyWithLiterals;\n /** interval of recurring payment (required) */\n interval?: number;\n /** trial period for recurring payment (optional) */\n trial?: SubscriptionTrialPeriod;\n /**\n * how many billing cycles should be done before subscription finishes\n * (optional, 0 by default means endless subscription)\n */\n billingCycles?: number;\n /**\n * date in the future or in the past when the first billing cycle begins\n * (the first off-session payment is performed when it ends)\n */\n firstCycleStartDate?: Date | null;\n}\n\n/** Frequency unit of recurring payment */\nexport enum SubscriptionFrequency {\n UNDEFINED = 'UNDEFINED',\n DAY = 'DAY',\n WEEK = 'WEEK',\n MONTH = 'MONTH',\n YEAR = 'YEAR',\n}\n\n/** @enumType */\nexport type SubscriptionFrequencyWithLiterals =\n | SubscriptionFrequency\n | 'UNDEFINED'\n | 'DAY'\n | 'WEEK'\n | 'MONTH'\n | 'YEAR';\n\n/** Trial period of subscription */\nexport interface SubscriptionTrialPeriod {\n /** trial period in units (required) */\n period?: number;\n /** units in which trial period is described (optional, default DAY) */\n unit?: SubscriptionFrequencyWithLiterals;\n}\n\nexport enum CancellationInitiator {\n /** Cancellation initiator undefined */\n UNDEFINED = 'UNDEFINED',\n /** Subscription was canceled by site owner (default if canceled by user or service identity) */\n OWNER = 'OWNER',\n /** Subscription was canceled by member (default if canceled by member identity) */\n MEMBER = 'MEMBER',\n /** Subscription was canceled because of payment failure */\n PAYMENT_FAILURE = 'PAYMENT_FAILURE',\n /** Subscription was canceled because of payment setup failure */\n SETUP_FAILURE = 'SETUP_FAILURE',\n}\n\n/** @enumType */\nexport type CancellationInitiatorWithLiterals =\n | CancellationInitiator\n | 'UNDEFINED'\n | 'OWNER'\n | 'MEMBER'\n | 'PAYMENT_FAILURE'\n | 'SETUP_FAILURE';\n\nexport interface SubscriptionPolicy {\n /** Subscription expiration date can be updated */\n expiryDateChangeable?: boolean;\n /** Subscription can be cancelled by the member who bought it (when memberId == subscriberId) */\n cancellableByMember?: boolean;\n /** Subscription expiration date on cancellation can be set to next payment date */\n cancellableAtNextPaymentCycle?: boolean;\n}\n\nexport interface Suspension {\n status?: StatusWithLiterals;\n /** Beginning of the suspended period */\n startsAt?: Date | null;\n /** End of the suspended period */\n endsAt?: Date | null;\n}\n\nexport enum Status {\n UNDEFINED = 'UNDEFINED',\n ACTIVE = 'ACTIVE',\n ENDED = 'ENDED',\n}\n\n/** @enumType */\nexport type StatusWithLiterals = Status | 'UNDEFINED' | 'ACTIVE' | 'ENDED';\n\n/** A duration expressed in amount of time units. */\nexport interface V1Duration {\n /** Amount of the unit */\n amount?: number;\n /** Day, Week, Month, Year. */\n unit?: SubscriptionFrequencyWithLiterals;\n}\n\nexport interface V1SubscriptionActivated {\n subscription?: V1Subscription;\n}\n\nexport interface V1SubscriptionCanceled {\n subscription?: V1Subscription;\n}\n\nexport interface V1SubscriptionUpdated {\n subscription?: V1Subscription;\n}\n\nexport interface SubscriptionCycleTriggered {\n subscription?: V1Subscription;\n billingCycle?: number;\n /**\n * Wix Pay transaction id, optional. Exists if event was triggered by a payment.\n * @format GUID\n */\n transactionId?: string | null;\n}\n\nexport interface SubscriptionMarkedAsPaid {\n subscription?: V1Subscription;\n /** A number indicating which payment (cycle) was marked as paid. For recurring subscriptions only. */\n billingCycle?: number | null;\n}\n\nexport interface SubscriptionCancellationRequested {\n subscription?: V1Subscription;\n}\n\nexport interface SubscriptionSuspended {\n subscription?: V1Subscription;\n}\n\nexport interface V1SubscriptionResumed {\n subscription?: V1Subscription;\n}\n\nexport interface SubscriptionExpired {\n subscription?: V1Subscription;\n}\n\nexport interface V1SubscriptionInitialPurchaseCompleted {\n subscription?: V1Subscription;\n}\n\nexport interface ListSubscriptionHistoryRequest {\n /** @format GUID */\n subscriptionId: string;\n /** Determines the type of view for the history: either a comprehensive backoffice view or a user-centric view. */\n mode?: HistoryViewModeWithLiterals;\n /** Cursor for efficient paging. If paging through results, pass this field from the previous search response to continue to the next page. */\n cursor?: CursorPaging;\n}\n\nexport enum HistoryViewMode {\n UNKNOWN = 'UNKNOWN',\n /** Comprehensive view including all history events. */\n BACKOFFICE = 'BACKOFFICE',\n /** User-centric view of the history. */\n USER = 'USER',\n}\n\n/** @enumType */\nexport type HistoryViewModeWithLiterals =\n | HistoryViewMode\n | 'UNKNOWN'\n | 'BACKOFFICE'\n | 'USER';\n\nexport interface ListSubscriptionHistoryResponse {\n /** List of history entries for the subscription. */\n historyEntries?: SubscriptionHistoryEntry[];\n /** Paging metadata. A `next` cursor is returned if there are more results. */\n pagingMetadata?: PagingMetadataV2;\n}\n\nexport interface SubscriptionHistoryEntry {\n /** @format GUID */\n entryId?: string;\n /** TODO: add max length? it is not defined in domainevents, so should we? */\n slug?: string;\n entryTime?: Date | null;\n event?: SubscriptionEvent;\n}\n\nexport interface SubscriptionEvent extends SubscriptionEventPayloadOneOf {\n created?: SubscriptionCreated;\n updated?: SubscriptionUpdated;\n deleted?: SubscriptionDeleted;\n activated?: SubscriptionActivated;\n ended?: SubscriptionEnded;\n canceled?: SubscriptionCanceled;\n paused?: SubscriptionPaused;\n resumed?: SubscriptionResumed;\n pauseRequested?: PauseSubscriptionRequested;\n resumeRequested?: ResumeSubscriptionRequested;\n scheduledPauseCanceled?: ScheduledPauseCanceled;\n scheduledResumeCanceled?: ScheduledResumeCanceled;\n billingCycleStarted?: SubscriptionBillingCycleStarted;\n autoRenewalTurnedOn?: SubscriptionAutoRenewalTurnedOn;\n autoRenewalTurnedOff?: SubscriptionAutoRenewalTurnedOff;\n cycleReadyToPay?: SubscriptionCycleReadyToPay;\n extended?: SubscriptionExtended;\n initialPurchaseCompleted?: SubscriptionInitialPurchaseCompleted;\n latestInvoiceMarkedAsPaid?: LatestInvoiceMarkedAsPaid;\n revived?: SubscriptionRevived;\n billingDateUpdated?: SubscriptionBillingDateUpdated;\n futureUpdatesRequested?: FutureUpdatesRequested;\n updatesApplied?: UpdatesApplied;\n resetPendingUpdates?: ResetPendingUpdates;\n gracePeriodStarted?: GracePeriodStarted;\n gracePeriodEnded?: GracePeriodEnded;\n paymentMethodUpdated?: PaymentMethodUpdated;\n collectionMethodUpdated?: SubscriptionCollectionMethodUpdated;\n freeTrailStarted?: FreeTrailStarted;\n freeTrailEnded?: FreeTrailEnded;\n billingCyclePaid?: SubscriptionBillingCyclePaid;\n initiatePaymentMethodSetup?: InitiatedPaymentMethodSetup;\n futurePriceUpdatesRequested?: FuturePriceUpdatesRequested;\n subscriptionBoAction?: SubscriptionBackOfficeAction;\n unknown?: UnknownSubscriptionEvent;\n}\n\n/** @oneof */\nexport interface SubscriptionEventPayloadOneOf {\n created?: SubscriptionCreated;\n updated?: SubscriptionUpdated;\n deleted?: SubscriptionDeleted;\n activated?: SubscriptionActivated;\n ended?: SubscriptionEnded;\n canceled?: SubscriptionCanceled;\n paused?: SubscriptionPaused;\n resumed?: SubscriptionResumed;\n pauseRequested?: PauseSubscriptionRequested;\n resumeRequested?: ResumeSubscriptionRequested;\n scheduledPauseCanceled?: ScheduledPauseCanceled;\n scheduledResumeCanceled?: ScheduledResumeCanceled;\n billingCycleStarted?: SubscriptionBillingCycleStarted;\n autoRenewalTurnedOn?: SubscriptionAutoRenewalTurnedOn;\n autoRenewalTurnedOff?: SubscriptionAutoRenewalTurnedOff;\n cycleReadyToPay?: SubscriptionCycleReadyToPay;\n extended?: SubscriptionExtended;\n initialPurchaseCompleted?: SubscriptionInitialPurchaseCompleted;\n latestInvoiceMarkedAsPaid?: LatestInvoiceMarkedAsPaid;\n revived?: SubscriptionRevived;\n billingDateUpdated?: SubscriptionBillingDateUpdated;\n futureUpdatesRequested?: FutureUpdatesRequested;\n updatesApplied?: UpdatesApplied;\n resetPendingUpdates?: ResetPendingUpdates;\n gracePeriodStarted?: GracePeriodStarted;\n gracePeriodEnded?: GracePeriodEnded;\n paymentMethodUpdated?: PaymentMethodUpdated;\n collectionMethodUpdated?: SubscriptionCollectionMethodUpdated;\n freeTrailStarted?: FreeTrailStarted;\n freeTrailEnded?: FreeTrailEnded;\n billingCyclePaid?: SubscriptionBillingCyclePaid;\n initiatePaymentMethodSetup?: InitiatedPaymentMethodSetup;\n futurePriceUpdatesRequested?: FuturePriceUpdatesRequested;\n subscriptionBoAction?: SubscriptionBackOfficeAction;\n unknown?: UnknownSubscriptionEvent;\n}\n\nexport interface SubscriptionCreated {\n subscription?: Subscription;\n}\n\nexport interface SubscriptionUpdated {\n current?: Subscription;\n previous?: Subscription;\n diff?: SubscriptionDiff;\n}\n\nexport interface SubscriptionDiff {\n added?: string | null;\n changed?: string | null;\n deleted?: string | null;\n}\n\nexport interface SubscriptionDeleted {\n subscriptionId?: string;\n}\n\nexport interface FutureUpdatesRequested {\n subscription?: Subscription;\n requestedUpdateData?: SubscriptionUpdateData;\n}\n\nexport interface UpdatesApplied {\n subscription?: Subscription;\n updateAction?: UpdateActionWithLiterals;\n appliedUpdateData?: SubscriptionUpdateData;\n}\n\nexport interface ResetPendingUpdates {\n subscription?: Subscription;\n}\n\nexport interface GracePeriodStarted {\n subscription?: Subscription;\n}\n\nexport interface GracePeriodEnded {\n subscription?: Subscription;\n /** Indication for the payment settlement method. */\n paymentSettlementMethod?: PaymentSettlementMethodWithLiterals;\n}\n\nexport enum PaymentSettlementMethod {\n UNKNOWN = 'UNKNOWN',\n /** System-defined payment settlement. */\n SYSTEM = 'SYSTEM',\n /** Manually mark the payment as paid. */\n MARK_AS_PAID = 'MARK_AS_PAID',\n /** Require the customer to pay immediately, by insert a new payment method. */\n CUSTOMER_PAY_NOW = 'CUSTOMER_PAY_NOW',\n}\n\n/** @enumType */\nexport type PaymentSettlementMethodWithLiterals =\n | PaymentSettlementMethod\n | 'UNKNOWN'\n | 'SYSTEM'\n | 'MARK_AS_PAID'\n | 'CUSTOMER_PAY_NOW';\n\nexport interface PaymentMethodUpdated {\n subscription?: Subscription;\n initiator?: HistoryActionInitiatorWithLiterals;\n paymentMode?: PaymentModeWithLiterals;\n}\n\nexport interface SubscriptionCollectionMethodUpdated {\n subscription?: Subscription;\n newCollectionMethod?: CollectionMethodEnumCollectionMethodWithLiterals;\n previousCollectionMethod?: CollectionMethodEnumCollectionMethodWithLiterals;\n}\n\nexport interface FreeTrailStarted {\n subscription?: Subscription;\n}\n\nexport interface FreeTrailEnded {\n subscription?: Subscription;\n}\n\nexport interface InitiatedPaymentMethodSetup {\n subscription?: Subscription;\n}\n\nexport interface FuturePriceUpdatesRequested {\n subscription?: Subscription;\n requestedUpdateData?: SubscriptionUpdateData;\n}\n\nexport interface SubscriptionBackOfficeAction {\n subscription?: Subscription;\n /** The backoffice method name */\n name?: string;\n /** json as string format, to store the flatted request object */\n params?: string;\n}\n\n/** Defines unknown events restored from the logs */\nexport interface UnknownSubscriptionEvent {\n subscriptionAsString?: string | null;\n}\n\n/** @docsIgnore */\nexport type CustomerCancelSubscriptionApplicationErrors = {\n code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type CustomerTurnOnSubscriptionAutoRenewalApplicationErrors = {\n code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type CustomerTurnOffSubscriptionAutoRenewalApplicationErrors = {\n code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type CustomerExtendSubscriptionApplicationErrors = {\n code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type UpdateSubscriptionBillingDateApplicationErrors = {\n code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type CancelSubscriptionApplicationErrors = {\n code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type PauseSubscriptionApplicationErrors = {\n code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type ResumeSubscriptionApplicationErrors = {\n code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type TurnOnSubscriptionAutoRenewalApplicationErrors = {\n code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type TurnOffSubscriptionAutoRenewalApplicationErrors = {\n code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type MarkLatestInvoiceAsPaidApplicationErrors =\n | {\n code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'SUBSCRIPTION_PART_OF_ORDER';\n description?: string;\n data?: MultipleSubscriptionsOnOrdersInvoice;\n };\n/** @docsIgnore */\nexport type MarkBillingCycleAsPaidApplicationErrors =\n | {\n code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'SUBSCRIPTION_PART_OF_ORDER';\n description?: string;\n data?: MultipleSubscriptionsOnOrdersInvoice;\n }\n | {\n code?: 'INVOICE_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'OPERATION_NOT_SUPPORTED_FOR_COLLECTION_METHOD';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type ExtendSubscriptionApplicationErrors = {\n code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS';\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}\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}\n\nexport interface SubscriptionCanceledEnvelope {\n data: SubscriptionCanceled;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a subscription is canceled.\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionId subscriptions.view\n * @webhook\n * @eventType wix.billing.v1.subscription_canceled\n * @serviceIdentifier com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService\n * @slug canceled\n * @documentationMaturity preview\n */\nexport declare function onSubscriptionCanceled(\n handler: (event: SubscriptionCanceledEnvelope) => void | Promise<void>\n): void;\n\nexport interface SubscriptionExtendedEnvelope {\n data: SubscriptionExtended;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when subscription has been extended\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionId subscriptions.view\n * @webhook\n * @eventType wix.billing.v1.subscription_extended\n * @serviceIdentifier com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService\n * @slug extended\n * @documentationMaturity preview\n */\nexport declare function onSubscriptionExtended(\n handler: (event: SubscriptionExtendedEnvelope) => void | Promise<void>\n): void;\n\nexport interface SubscriptionUpdatedEnvelope {\n entity: Subscription;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a subscription is updated.\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionId subscriptions.view\n * @webhook\n * @eventType wix.billing.v1.subscription_updated\n * @serviceIdentifier com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService\n * @slug updated\n * @documentationMaturity preview\n */\nexport declare function onSubscriptionUpdated(\n handler: (event: SubscriptionUpdatedEnvelope) => void | Promise<void>\n): void;\n\nexport interface SubscriptionAutoRenewalTurnedOffEnvelope {\n data: SubscriptionAutoRenewalTurnedOff;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a subscription cycleAutoRenew was turned off.\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionId subscriptions.view\n * @webhook\n * @eventType wix.billing.v1.subscription_auto_renewal_turned_off\n * @serviceIdentifier com.wixpress.billing.subscriptions.api.v1.SubscriptionsService\n * @slug auto_renewal_turned_off\n * @documentationMaturity preview\n */\nexport declare function onSubscriptionAutoRenewalTurnedOff(\n handler: (\n event: SubscriptionAutoRenewalTurnedOffEnvelope\n ) => void | Promise<void>\n): void;\n\nexport interface SubscriptionAutoRenewalTurnedOnEnvelope {\n data: SubscriptionAutoRenewalTurnedOn;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a subscription cycleAutoRenew was turned on.\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionId subscriptions.view\n * @webhook\n * @eventType wix.billing.v1.subscription_auto_renewal_turned_on\n * @serviceIdentifier com.wixpress.billing.subscriptions.api.v1.SubscriptionsService\n * @slug auto_renewal_turned_on\n * @documentationMaturity preview\n */\nexport declare function onSubscriptionAutoRenewalTurnedOn(\n handler: (\n event: SubscriptionAutoRenewalTurnedOnEnvelope\n ) => void | Promise<void>\n): void;\n\nexport interface SubscriptionBillingDateUpdatedEnvelope {\n data: SubscriptionBillingDateUpdated;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when subscription has been extended\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionId subscriptions.view\n * @webhook\n * @eventType wix.billing.v1.subscription_billing_date_updated\n * @serviceIdentifier com.wixpress.billing.subscriptions.api.v1.SubscriptionsService\n * @slug billing_date_updated\n * @documentationMaturity preview\n */\nexport declare function onSubscriptionBillingDateUpdated(\n handler: (\n event: SubscriptionBillingDateUpdatedEnvelope\n ) => void | Promise<void>\n): void;\n\nexport interface SubscriptionLatestInvoiceMarkedAsPaidEnvelope {\n data: LatestInvoiceMarkedAsPaid;\n metadata: EventMetadata;\n}\n\n/** @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionId subscriptions.view\n * @webhook\n * @eventType wix.billing.v1.subscription_latest_invoice_marked_as_paid\n * @serviceIdentifier com.wixpress.billing.subscriptions.api.v1.SubscriptionsService\n * @slug latest_invoice_marked_as_paid\n * @documentationMaturity preview\n */\nexport declare function onSubscriptionLatestInvoiceMarkedAsPaid(\n handler: (\n event: SubscriptionLatestInvoiceMarkedAsPaidEnvelope\n ) => void | Promise<void>\n): void;\n\nexport interface SubscriptionPauseScheduleCanceledEnvelope {\n data: ScheduledPauseCanceled;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when scheduled pause canceled\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionId subscriptions.view\n * @webhook\n * @eventType wix.billing.v1.subscription_pause_schedule_canceled\n * @serviceIdentifier com.wixpress.billing.subscriptions.api.v1.SubscriptionsService\n * @slug pause_schedule_canceled\n * @documentationMaturity preview\n */\nexport declare function onSubscriptionPauseScheduleCanceled(\n handler: (\n event: SubscriptionPauseScheduleCanceledEnvelope\n ) => void | Promise<void>\n): void;\n\nexport interface SubscriptionPauseScheduledEnvelope {\n data: PauseSubscriptionRequested;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when pause subscription requested\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionId subscriptions.view\n * @webhook\n * @eventType wix.billing.v1.subscription_pause_scheduled\n * @serviceIdentifier com.wixpress.billing.subscriptions.api.v1.SubscriptionsService\n * @slug pause_scheduled\n * @documentationMaturity preview\n */\nexport declare function onSubscriptionPauseScheduled(\n handler: (event: SubscriptionPauseScheduledEnvelope) => void | Promise<void>\n): void;\n\nexport interface SubscriptionPausedEnvelope {\n data: SubscriptionPaused;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a subscription is paused.\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionId subscriptions.view\n * @webhook\n * @eventType wix.billing.v1.subscription_paused\n * @serviceIdentifier com.wixpress.billing.subscriptions.api.v1.SubscriptionsService\n * @slug paused\n * @documentationMaturity preview\n */\nexport declare function onSubscriptionPaused(\n handler: (event: SubscriptionPausedEnvelope) => void | Promise<void>\n): void;\n\nexport interface SubscriptionResumeScheduleCanceledEnvelope {\n data: ScheduledResumeCanceled;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when scheduled pause canceled\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionId subscriptions.view\n * @webhook\n * @eventType wix.billing.v1.subscription_resume_schedule_canceled\n * @serviceIdentifier com.wixpress.billing.subscriptions.api.v1.SubscriptionsService\n * @slug resume_schedule_canceled\n * @documentationMaturity preview\n */\nexport declare function onSubscriptionResumeScheduleCanceled(\n handler: (\n event: SubscriptionResumeScheduleCanceledEnvelope\n ) => void | Promise<void>\n): void;\n\nexport interface SubscriptionResumeScheduledEnvelope {\n data: ResumeSubscriptionRequested;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when resume subscription requested\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionId subscriptions.view\n * @webhook\n * @eventType wix.billing.v1.subscription_resume_scheduled\n * @serviceIdentifier com.wixpress.billing.subscriptions.api.v1.SubscriptionsService\n * @slug resume_scheduled\n * @documentationMaturity preview\n */\nexport declare function onSubscriptionResumeScheduled(\n handler: (event: SubscriptionResumeScheduledEnvelope) => void | Promise<void>\n): void;\n\nexport interface SubscriptionResumedEnvelope {\n data: SubscriptionResumed;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a subscription is resumed.\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionId subscriptions.view\n * @webhook\n * @eventType wix.billing.v1.subscription_resumed\n * @serviceIdentifier com.wixpress.billing.subscriptions.api.v1.SubscriptionsService\n * @slug resumed\n * @documentationMaturity preview\n */\nexport declare function onSubscriptionResumed(\n handler: (event: SubscriptionResumedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Identity must be a site member and customer subscription belongs to\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @fqn com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.GetSubscription\n */\nexport async function customerGetSubscription(\n _id: string\n): Promise<\n NonNullablePaths<\n GetSubscriptionResponse,\n | `subscription.name`\n | `subscription.customer.visitorId`\n | `subscription.customer.contactId`\n | `subscription.customer.memberId`\n | `subscription.customer.accountId`\n | `subscription.status`\n | `subscription.billingSettings.currency`\n | `subscription.billingSettings.paymentMethod._id`\n | `subscription.billingSettings.collectionMethod`\n | `subscription.billingSettings.cycleDuration.unit`\n | `subscription.billingSettings.cycleAutoRenew`\n | `subscription.billingSettings.billingAddress.address.streetAddress.number`\n | `subscription.billingSettings.billingAddress.address.streetAddress.name`\n | `subscription.billingSettings.taxSettings.inclusive`\n | `subscription.billingSettings.additionalFees`\n | `subscription.billingSettings.additionalFees.${number}.name`\n | `subscription.billingSettings.additionalFees.${number}.amount`\n | `subscription.billingSettings.additionalFees.${number}.trigger`\n | `subscription.billingSettings.additionalFees.${number}.tax.amount`\n | `subscription.billingSettings.additionalFees.${number}.tax.percentage`\n | `subscription.billingSettings.additionalFees.${number}.tax.dynamic.taxableAddressType`\n | `subscription.billingSettings.additionalFees.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.additionalFees.${number}.origin.appId`\n | `subscription.billingSettings.additionalFees.${number}.origin.entityId`\n | `subscription.billingSettings.shippingCharges.amount`\n | `subscription.billingSettings.shippingCharges.discounts`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.amount`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.percentage`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.appId`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.entityId`\n | `subscription.billingSettings.discounts`\n | `subscription.billingSettings.externalCollectionDetails.collectorName`\n | `subscription.billingStatus.currentCycle`\n | `subscription.billingStatus.latestPaymentData.invoiceId`\n | `subscription.billingStatus.latestPaymentData.paymentStatus`\n | `subscription.billingStatus.latestPaymentData.totals.totalPrice`\n | `subscription.billingStatus.latestPaymentData.totals.subtotal`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxType`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxRate`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.jurisdictionType`\n | `subscription.billingStatus.gracePeriodData.automaticRetryData.enabled`\n | `subscription.policies.customerCanCancel`\n | `subscription.policies.businessCanExtend`\n | `subscription.policies.allowEndOfCycleCancellation`\n | `subscription.pauseInfo.pausePolicy`\n | `subscription.pauseInfo.pauseAt`\n | `subscription.pauseInfo.resumeAt`\n | `subscription.pauseInfo.pauseType`\n | `subscription.cancellationInfo.initiator`\n | `subscription.pendingUpdateData.itemsToUpdate`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}._id`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}.pricingModel.fixedPrice.itemPrice`\n | `subscription.pendingUpdateData.itemsToAdd`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.name`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.catalogReference.catalogItemId`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.category`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.quantity`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.applicationFee.amount`\n | `subscription.pendingUpdateData.itemsToDelete`\n | `subscription.pendingUpdateData.numberOfRequests`\n | `subscription.items`,\n 8\n >\n> {\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 =\n ambassadorWixBillingV1Subscription.customerGetSubscription(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'subscription.billingSettings.billingAddress.address' },\n { path: 'subscription.shippingAddress.address' },\n ],\n },\n ])\n )!;\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 * Identity must be a site member and customer subscription belongs to\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @fqn com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.CancelSubscription\n */\nexport async function customerCancelSubscription(\n _id: string,\n options?: CustomerCancelSubscriptionOptions\n): Promise<\n NonNullablePaths<\n CustomerCancelSubscriptionResponse,\n | `subscription.name`\n | `subscription.customer.visitorId`\n | `subscription.customer.contactId`\n | `subscription.customer.memberId`\n | `subscription.customer.accountId`\n | `subscription.status`\n | `subscription.billingSettings.currency`\n | `subscription.billingSettings.paymentMethod._id`\n | `subscription.billingSettings.collectionMethod`\n | `subscription.billingSettings.cycleDuration.unit`\n | `subscription.billingSettings.cycleAutoRenew`\n | `subscription.billingSettings.billingAddress.address.streetAddress.number`\n | `subscription.billingSettings.billingAddress.address.streetAddress.name`\n | `subscription.billingSettings.taxSettings.inclusive`\n | `subscription.billingSettings.additionalFees`\n | `subscription.billingSettings.additionalFees.${number}.name`\n | `subscription.billingSettings.additionalFees.${number}.amount`\n | `subscription.billingSettings.additionalFees.${number}.trigger`\n | `subscription.billingSettings.additionalFees.${number}.tax.amount`\n | `subscription.billingSettings.additionalFees.${number}.tax.percentage`\n | `subscription.billingSettings.additionalFees.${number}.tax.dynamic.taxableAddressType`\n | `subscription.billingSettings.additionalFees.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.additionalFees.${number}.origin.appId`\n | `subscription.billingSettings.additionalFees.${number}.origin.entityId`\n | `subscription.billingSettings.shippingCharges.amount`\n | `subscription.billingSettings.shippingCharges.discounts`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.amount`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.percentage`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.appId`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.entityId`\n | `subscription.billingSettings.discounts`\n | `subscription.billingSettings.externalCollectionDetails.collectorName`\n | `subscription.billingStatus.currentCycle`\n | `subscription.billingStatus.latestPaymentData.invoiceId`\n | `subscription.billingStatus.latestPaymentData.paymentStatus`\n | `subscription.billingStatus.latestPaymentData.totals.totalPrice`\n | `subscription.billingStatus.latestPaymentData.totals.subtotal`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxType`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxRate`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.jurisdictionType`\n | `subscription.billingStatus.gracePeriodData.automaticRetryData.enabled`\n | `subscription.policies.customerCanCancel`\n | `subscription.policies.businessCanExtend`\n | `subscription.policies.allowEndOfCycleCancellation`\n | `subscription.pauseInfo.pausePolicy`\n | `subscription.pauseInfo.pauseAt`\n | `subscription.pauseInfo.resumeAt`\n | `subscription.pauseInfo.pauseType`\n | `subscription.cancellationInfo.initiator`\n | `subscription.pendingUpdateData.itemsToUpdate`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}._id`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}.pricingModel.fixedPrice.itemPrice`\n | `subscription.pendingUpdateData.itemsToAdd`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.name`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.catalogReference.catalogItemId`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.category`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.quantity`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.applicationFee.amount`\n | `subscription.pendingUpdateData.itemsToDelete`\n | `subscription.pendingUpdateData.numberOfRequests`\n | `subscription.items`,\n 8\n > & {\n __applicationErrorsType?: CustomerCancelSubscriptionApplicationErrors;\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 reason: options?.reason,\n });\n\n const reqOpts =\n ambassadorWixBillingV1Subscription.customerCancelSubscription(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'subscription.billingSettings.billingAddress.address' },\n { path: 'subscription.shippingAddress.address' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { id: '$[0]', reason: '$[1].reason' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CustomerCancelSubscriptionOptions {\n /** Optional action reason message */\n reason?: string | null;\n}\n\n/**\n * Identity must be a site member and customer subscription belongs to\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @fqn com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.TurnOnSubscriptionAutoRenewal\n */\nexport async function customerTurnOnSubscriptionAutoRenewal(\n _id: string,\n options?: CustomerTurnOnSubscriptionAutoRenewalOptions\n): Promise<\n NonNullablePaths<\n CustomerTurnOnAutoRenewalResponse,\n | `subscription.name`\n | `subscription.customer.visitorId`\n | `subscription.customer.contactId`\n | `subscription.customer.memberId`\n | `subscription.customer.accountId`\n | `subscription.status`\n | `subscription.billingSettings.currency`\n | `subscription.billingSettings.paymentMethod._id`\n | `subscription.billingSettings.collectionMethod`\n | `subscription.billingSettings.cycleDuration.unit`\n | `subscription.billingSettings.cycleAutoRenew`\n | `subscription.billingSettings.billingAddress.address.streetAddress.number`\n | `subscription.billingSettings.billingAddress.address.streetAddress.name`\n | `subscription.billingSettings.taxSettings.inclusive`\n | `subscription.billingSettings.additionalFees`\n | `subscription.billingSettings.additionalFees.${number}.name`\n | `subscription.billingSettings.additionalFees.${number}.amount`\n | `subscription.billingSettings.additionalFees.${number}.trigger`\n | `subscription.billingSettings.additionalFees.${number}.tax.amount`\n | `subscription.billingSettings.additionalFees.${number}.tax.percentage`\n | `subscription.billingSettings.additionalFees.${number}.tax.dynamic.taxableAddressType`\n | `subscription.billingSettings.additionalFees.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.additionalFees.${number}.origin.appId`\n | `subscription.billingSettings.additionalFees.${number}.origin.entityId`\n | `subscription.billingSettings.shippingCharges.amount`\n | `subscription.billingSettings.shippingCharges.discounts`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.amount`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.percentage`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.appId`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.entityId`\n | `subscription.billingSettings.discounts`\n | `subscription.billingSettings.externalCollectionDetails.collectorName`\n | `subscription.billingStatus.currentCycle`\n | `subscription.billingStatus.latestPaymentData.invoiceId`\n | `subscription.billingStatus.latestPaymentData.paymentStatus`\n | `subscription.billingStatus.latestPaymentData.totals.totalPrice`\n | `subscription.billingStatus.latestPaymentData.totals.subtotal`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxType`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxRate`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.jurisdictionType`\n | `subscription.billingStatus.gracePeriodData.automaticRetryData.enabled`\n | `subscription.policies.customerCanCancel`\n | `subscription.policies.businessCanExtend`\n | `subscription.policies.allowEndOfCycleCancellation`\n | `subscription.pauseInfo.pausePolicy`\n | `subscription.pauseInfo.pauseAt`\n | `subscription.pauseInfo.resumeAt`\n | `subscription.pauseInfo.pauseType`\n | `subscription.cancellationInfo.initiator`\n | `subscription.pendingUpdateData.itemsToUpdate`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}._id`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}.pricingModel.fixedPrice.itemPrice`\n | `subscription.pendingUpdateData.itemsToAdd`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.name`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.catalogReference.catalogItemId`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.category`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.quantity`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.applicationFee.amount`\n | `subscription.pendingUpdateData.itemsToDelete`\n | `subscription.pendingUpdateData.numberOfRequests`\n | `subscription.items`,\n 8\n > & {\n __applicationErrorsType?: CustomerTurnOnSubscriptionAutoRenewalApplicationErrors;\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 reason: options?.reason,\n });\n\n const reqOpts =\n ambassadorWixBillingV1Subscription.customerTurnOnSubscriptionAutoRenewal(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'subscription.billingSettings.billingAddress.address' },\n { path: 'subscription.shippingAddress.address' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { id: '$[0]', reason: '$[1].reason' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CustomerTurnOnSubscriptionAutoRenewalOptions {\n /** Optional action reason message */\n reason?: string | null;\n}\n\n/**\n * Identity must be a site member and customer subscription belongs to\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @fqn com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.TurnOffSubscriptionAutoRenewal\n */\nexport async function customerTurnOffSubscriptionAutoRenewal(\n _id: string,\n options?: CustomerTurnOffSubscriptionAutoRenewalOptions\n): Promise<\n NonNullablePaths<\n CustomerTurnOffAutoRenewalResponse,\n | `subscription.name`\n | `subscription.customer.visitorId`\n | `subscription.customer.contactId`\n | `subscription.customer.memberId`\n | `subscription.customer.accountId`\n | `subscription.status`\n | `subscription.billingSettings.currency`\n | `subscription.billingSettings.paymentMethod._id`\n | `subscription.billingSettings.collectionMethod`\n | `subscription.billingSettings.cycleDuration.unit`\n | `subscription.billingSettings.cycleAutoRenew`\n | `subscription.billingSettings.billingAddress.address.streetAddress.number`\n | `subscription.billingSettings.billingAddress.address.streetAddress.name`\n | `subscription.billingSettings.taxSettings.inclusive`\n | `subscription.billingSettings.additionalFees`\n | `subscription.billingSettings.additionalFees.${number}.name`\n | `subscription.billingSettings.additionalFees.${number}.amount`\n | `subscription.billingSettings.additionalFees.${number}.trigger`\n | `subscription.billingSettings.additionalFees.${number}.tax.amount`\n | `subscription.billingSettings.additionalFees.${number}.tax.percentage`\n | `subscription.billingSettings.additionalFees.${number}.tax.dynamic.taxableAddressType`\n | `subscription.billingSettings.additionalFees.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.additionalFees.${number}.origin.appId`\n | `subscription.billingSettings.additionalFees.${number}.origin.entityId`\n | `subscription.billingSettings.shippingCharges.amount`\n | `subscription.billingSettings.shippingCharges.discounts`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.amount`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.percentage`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.appId`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.entityId`\n | `subscription.billingSettings.discounts`\n | `subscription.billingSettings.externalCollectionDetails.collectorName`\n | `subscription.billingStatus.currentCycle`\n | `subscription.billingStatus.latestPaymentData.invoiceId`\n | `subscription.billingStatus.latestPaymentData.paymentStatus`\n | `subscription.billingStatus.latestPaymentData.totals.totalPrice`\n | `subscription.billingStatus.latestPaymentData.totals.subtotal`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxType`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxRate`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.jurisdictionType`\n | `subscription.billingStatus.gracePeriodData.automaticRetryData.enabled`\n | `subscription.policies.customerCanCancel`\n | `subscription.policies.businessCanExtend`\n | `subscription.policies.allowEndOfCycleCancellation`\n | `subscription.pauseInfo.pausePolicy`\n | `subscription.pauseInfo.pauseAt`\n | `subscription.pauseInfo.resumeAt`\n | `subscription.pauseInfo.pauseType`\n | `subscription.cancellationInfo.initiator`\n | `subscription.pendingUpdateData.itemsToUpdate`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}._id`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}.pricingModel.fixedPrice.itemPrice`\n | `subscription.pendingUpdateData.itemsToAdd`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.name`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.catalogReference.catalogItemId`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.category`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.quantity`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.applicationFee.amount`\n | `subscription.pendingUpdateData.itemsToDelete`\n | `subscription.pendingUpdateData.numberOfRequests`\n | `subscription.items`,\n 8\n > & {\n __applicationErrorsType?: CustomerTurnOffSubscriptionAutoRenewalApplicationErrors;\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 reason: options?.reason,\n });\n\n const reqOpts =\n ambassadorWixBillingV1Subscription.customerTurnOffSubscriptionAutoRenewal(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'subscription.billingSettings.billingAddress.address' },\n { path: 'subscription.shippingAddress.address' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { id: '$[0]', reason: '$[1].reason' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CustomerTurnOffSubscriptionAutoRenewalOptions {\n /** Optional action reason message */\n reason?: string | null;\n}\n\n/** @param _id - The ID of the subscription to be extended\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @requiredField options.billingCyclesToAdd\n * @fqn com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.ExtendSubscription\n */\nexport async function customerExtendSubscription(\n _id: string,\n options?: NonNullablePaths<\n CustomerExtendSubscriptionOptions,\n `billingCyclesToAdd`,\n 2\n >\n): Promise<\n NonNullablePaths<\n CustomerExtendSubscriptionResponse,\n | `subscription.name`\n | `subscription.customer.visitorId`\n | `subscription.customer.contactId`\n | `subscription.customer.memberId`\n | `subscription.customer.accountId`\n | `subscription.status`\n | `subscription.billingSettings.currency`\n | `subscription.billingSettings.paymentMethod._id`\n | `subscription.billingSettings.collectionMethod`\n | `subscription.billingSettings.cycleDuration.unit`\n | `subscription.billingSettings.cycleAutoRenew`\n | `subscription.billingSettings.billingAddress.address.streetAddress.number`\n | `subscription.billingSettings.billingAddress.address.streetAddress.name`\n | `subscription.billingSettings.taxSettings.inclusive`\n | `subscription.billingSettings.additionalFees`\n | `subscription.billingSettings.additionalFees.${number}.name`\n | `subscription.billingSettings.additionalFees.${number}.amount`\n | `subscription.billingSettings.additionalFees.${number}.trigger`\n | `subscription.billingSettings.additionalFees.${number}.tax.amount`\n | `subscription.billingSettings.additionalFees.${number}.tax.percentage`\n | `subscription.billingSettings.additionalFees.${number}.tax.dynamic.taxableAddressType`\n | `subscription.billingSettings.additionalFees.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.additionalFees.${number}.origin.appId`\n | `subscription.billingSettings.additionalFees.${number}.origin.entityId`\n | `subscription.billingSettings.shippingCharges.amount`\n | `subscription.billingSettings.shippingCharges.discounts`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.amount`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.percentage`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.appId`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.entityId`\n | `subscription.billingSettings.discounts`\n | `subscription.billingSettings.externalCollectionDetails.collectorName`\n | `subscription.billingStatus.currentCycle`\n | `subscription.billingStatus.latestPaymentData.invoiceId`\n | `subscription.billingStatus.latestPaymentData.paymentStatus`\n | `subscription.billingStatus.latestPaymentData.totals.totalPrice`\n | `subscription.billingStatus.latestPaymentData.totals.subtotal`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxType`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxRate`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.jurisdictionType`\n | `subscription.billingStatus.gracePeriodData.automaticRetryData.enabled`\n | `subscription.policies.customerCanCancel`\n | `subscription.policies.businessCanExtend`\n | `subscription.policies.allowEndOfCycleCancellation`\n | `subscription.pauseInfo.pausePolicy`\n | `subscription.pauseInfo.pauseAt`\n | `subscription.pauseInfo.resumeAt`\n | `subscription.pauseInfo.pauseType`\n | `subscription.cancellationInfo.initiator`\n | `subscription.pendingUpdateData.itemsToUpdate`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}._id`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}.pricingModel.fixedPrice.itemPrice`\n | `subscription.pendingUpdateData.itemsToAdd`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.name`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.catalogReference.catalogItemId`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.category`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.quantity`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.applicationFee.amount`\n | `subscription.pendingUpdateData.itemsToDelete`\n | `subscription.pendingUpdateData.numberOfRequests`\n | `subscription.items`,\n 8\n > & {\n __applicationErrorsType?: CustomerExtendSubscriptionApplicationErrors;\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 reason: options?.reason,\n billingCyclesToAdd: options?.billingCyclesToAdd,\n });\n\n const reqOpts =\n ambassadorWixBillingV1Subscription.customerExtendSubscription(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'subscription.billingSettings.billingAddress.address' },\n { path: 'subscription.shippingAddress.address' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n id: '$[0]',\n reason: '$[1].reason',\n billingCyclesToAdd: '$[1].billingCyclesToAdd',\n },\n singleArgumentUnchanged: false,\n },\n ['_id', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CustomerExtendSubscriptionOptions {\n /** Optional action reason message */\n reason?: string | null;\n /**\n * For termed - Subscription end date will be updated with the extension period and number of cycles will be added\n * @min 1\n */\n billingCyclesToAdd: number | null;\n}\n\n/**\n * identity must be a site member\n * @public\n * @documentationMaturity preview\n * @fqn com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.QuerySubscriptions\n */\nexport async function customerQuerySubscriptions(\n options?: CustomerQuerySubscriptionsOptions\n): Promise<\n NonNullablePaths<\n QuerySubscriptionsResponse,\n | `subscriptions`\n | `subscriptions.${number}.name`\n | `subscriptions.${number}.customer.visitorId`\n | `subscriptions.${number}.customer.contactId`\n | `subscriptions.${number}.customer.memberId`\n | `subscriptions.${number}.customer.accountId`\n | `subscriptions.${number}.status`\n | `subscriptions.${number}.billingSettings.currency`\n | `subscriptions.${number}.billingSettings.paymentMethod._id`\n | `subscriptions.${number}.billingSettings.collectionMethod`\n | `subscriptions.${number}.billingSettings.cycleDuration.unit`\n | `subscriptions.${number}.billingSettings.cycleAutoRenew`\n | `subscriptions.${number}.billingSettings.taxSettings.inclusive`\n | `subscriptions.${number}.billingSettings.shippingCharges.amount`\n | `subscriptions.${number}.billingSettings.externalCollectionDetails.collectorName`\n | `subscriptions.${number}.billingStatus.currentCycle`\n | `subscriptions.${number}.billingStatus.latestPaymentData.invoiceId`\n | `subscriptions.${number}.billingStatus.latestPaymentData.paymentStatus`\n | `subscriptions.${number}.policies.customerCanCancel`\n | `subscriptions.${number}.policies.businessCanExtend`\n | `subscriptions.${number}.policies.allowEndOfCycleCancellation`\n | `subscriptions.${number}.pauseInfo.pausePolicy`\n | `subscriptions.${number}.pauseInfo.pauseAt`\n | `subscriptions.${number}.pauseInfo.resumeAt`\n | `subscriptions.${number}.pauseInfo.pauseType`\n | `subscriptions.${number}.cancellationInfo.initiator`\n | `subscriptions.${number}.pendingUpdateData.numberOfRequests`,\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 query: options?.query,\n });\n\n const reqOpts =\n ambassadorWixBillingV1Subscription.customerQuerySubscriptions(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'subscriptions.billingSettings.billingAddress.address' },\n { path: 'subscriptions.shippingAddress.address' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0].query' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CustomerQuerySubscriptionsOptions {\n query?: QueryV2;\n}\n\n/**\n * Update subscription's payment method.\n * Supported only for recurring subscriptions or one time subscriptions during free trial.\n * @param _id - Subscription ID\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @requiredField paymentMethodId\n * @fqn com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.UpdateSubscriptionPaymentMethod\n */\nexport async function customerUpdateSubscriptionPaymentMethod(\n _id: string,\n paymentMethodId: string\n): Promise<\n NonNullablePaths<\n UpdateSubscriptionPaymentMethodResponse,\n | `subscription.name`\n | `subscription.customer.visitorId`\n | `subscription.customer.contactId`\n | `subscription.customer.memberId`\n | `subscription.customer.accountId`\n | `subscription.status`\n | `subscription.billingSettings.currency`\n | `subscription.billingSettings.paymentMethod._id`\n | `subscription.billingSettings.collectionMethod`\n | `subscription.billingSettings.cycleDuration.unit`\n | `subscription.billingSettings.cycleAutoRenew`\n | `subscription.billingSettings.billingAddress.address.streetAddress.number`\n | `subscription.billingSettings.billingAddress.address.streetAddress.name`\n | `subscription.billingSettings.taxSettings.inclusive`\n | `subscription.billingSettings.additionalFees`\n | `subscription.billingSettings.additionalFees.${number}.name`\n | `subscription.billingSettings.additionalFees.${number}.amount`\n | `subscription.billingSettings.additionalFees.${number}.trigger`\n | `subscription.billingSettings.additionalFees.${number}.tax.amount`\n | `subscription.billingSettings.additionalFees.${number}.tax.percentage`\n | `subscription.billingSettings.additionalFees.${number}.tax.dynamic.taxableAddressType`\n | `subscription.billingSettings.additionalFees.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.additionalFees.${number}.origin.appId`\n | `subscription.billingSettings.additionalFees.${number}.origin.entityId`\n | `subscription.billingSettings.shippingCharges.amount`\n | `subscription.billingSettings.shippingCharges.discounts`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.amount`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.percentage`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.appId`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.entityId`\n | `subscription.billingSettings.discounts`\n | `subscription.billingSettings.externalCollectionDetails.collectorName`\n | `subscription.billingStatus.currentCycle`\n | `subscription.billingStatus.latestPaymentData.invoiceId`\n | `subscription.billingStatus.latestPaymentData.paymentStatus`\n | `subscription.billingStatus.latestPaymentData.totals.totalPrice`\n | `subscription.billingStatus.latestPaymentData.totals.subtotal`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxType`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxRate`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.jurisdictionType`\n | `subscription.billingStatus.gracePeriodData.automaticRetryData.enabled`\n | `subscription.policies.customerCanCancel`\n | `subscription.policies.businessCanExtend`\n | `subscription.policies.allowEndOfCycleCancellation`\n | `subscription.pauseInfo.pausePolicy`\n | `subscription.pauseInfo.pauseAt`\n | `subscription.pauseInfo.resumeAt`\n | `subscription.pauseInfo.pauseType`\n | `subscription.cancellationInfo.initiator`\n | `subscription.pendingUpdateData.itemsToUpdate`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}._id`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}.pricingModel.fixedPrice.itemPrice`\n | `subscription.pendingUpdateData.itemsToAdd`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.name`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.catalogReference.catalogItemId`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.category`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.quantity`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.applicationFee.amount`\n | `subscription.pendingUpdateData.itemsToDelete`\n | `subscription.pendingUpdateData.numberOfRequests`\n | `subscription.items`,\n 8\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 paymentMethodId: paymentMethodId,\n });\n\n const reqOpts =\n ambassadorWixBillingV1Subscription.customerUpdateSubscriptionPaymentMethod(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'subscription.billingSettings.billingAddress.address' },\n { path: 'subscription.shippingAddress.address' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { id: '$[0]', paymentMethodId: '$[1]' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'paymentMethodId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/** @public\n * @documentationMaturity preview\n * @requiredField _id\n * @fqn com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.AllowedActions\n */\nexport async function customerAllowedActions(\n _id: string\n): Promise<\n NonNullablePaths<\n CustomerAllowedActionsResponse,\n `actions` | `actions.${number}.actionType`,\n 4\n >\n> {\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 =\n ambassadorWixBillingV1Subscription.customerAllowedActions(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]' },\n singleArgumentUnchanged: false,\n },\n ['_id']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * List future subscriptions charges.\n * @param _id - Subscription id upcoming charge to be previewed for\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @fqn com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.ListUpcomingCharges\n */\nexport async function customerListUpcomingCharges(\n _id: string\n): Promise<\n NonNullablePaths<\n CustomerListUpcomingChargesResponse,\n | `upcomingCharge.cycle`\n | `upcomingCharge.totals.totalPrice`\n | `upcomingCharge.totals.subtotal`\n | `upcomingCharge.invoiceItems`\n | `upcomingCharge.invoiceItems.${number}.recurring.cycleNumber`\n | `upcomingCharge.invoiceItems.${number}._id`\n | `upcomingCharge.invoiceItems.${number}.name`\n | `upcomingCharge.invoiceItems.${number}.catalogReference.catalogItemId`\n | `upcomingCharge.invoiceItems.${number}.category`\n | `upcomingCharge.invoiceItems.${number}.quantity`\n | `upcomingCharge.invoiceItems.${number}.priceDetails.price`\n | `upcomingCharge.invoiceItems.${number}.priceDetails.tax.amount`\n | `upcomingCharge.invoiceItems.${number}.priceDetails.tax.percentage`\n | `upcomingCharge.invoiceItems.${number}.priceDetails.discount.amount`\n | `upcomingCharge.invoiceItems.${number}.priceDetails.discount.percentage`\n | `upcomingCharge.invoiceItems.${number}.priceDetails.applicationFeeDetails.amount`\n | `upcomingCharge.invoiceItems.${number}.taxData.lineItemTaxSummary.aggregatedTaxAmount`\n | `upcomingCharge.invoiceItems.${number}.taxData.lineItemTaxSummary.aggregatedTaxRate`\n | `upcomingCharge.invoiceItems.${number}.taxData.lineItemTaxSummary.taxableAmount`,\n 7\n >\n> {\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 =\n ambassadorWixBillingV1Subscription.customerListUpcomingCharges(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]' },\n singleArgumentUnchanged: false,\n },\n ['_id']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Creates auto-charge order that can be paid by customer\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @fqn com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.InitiatePaymentMethodSetup\n */\nexport async function customerInitiatePaymentMethodSetup(\n _id: string,\n options?: CustomerInitiatePaymentMethodSetupOptions\n): Promise<\n NonNullablePaths<InitiatePaymentMethodSetupResponse, `paymentOrderId`, 2>\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 paymentMode: options?.paymentMode,\n paymentSettings: options?.paymentSettings,\n });\n\n const reqOpts =\n ambassadorWixBillingV1Subscription.customerInitiatePaymentMethodSetup(\n payload\n );\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 id: '$[0]',\n paymentMode: '$[1].paymentMode',\n paymentSettings: '$[1].paymentSettings',\n },\n singleArgumentUnchanged: false,\n },\n ['_id', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CustomerInitiatePaymentMethodSetupOptions {\n paymentMode?: PaymentModeWithLiterals;\n paymentSettings?: PaymentSettings;\n}\n\n/**\n * This used only for automation and permitted tenants (QA & testing)\n * @public\n * @documentationMaturity preview\n * @requiredField options.tenantId\n * @requiredField subscriptionId\n * @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsBackOfficeService.PayCycle\n */\nexport async function payCycle(\n subscriptionId: string,\n options?: NonNullablePaths<PayCycleOptions, `tenantId`, 2>\n): Promise<\n NonNullablePaths<\n PayCycleResponse,\n | `invoiceId`\n | `subscription.name`\n | `subscription.customer.visitorId`\n | `subscription.customer.contactId`\n | `subscription.customer.memberId`\n | `subscription.customer.accountId`\n | `subscription.status`\n | `subscription.billingSettings.currency`\n | `subscription.billingSettings.paymentMethod._id`\n | `subscription.billingSettings.collectionMethod`\n | `subscription.billingSettings.cycleDuration.unit`\n | `subscription.billingSettings.cycleAutoRenew`\n | `subscription.billingSettings.billingAddress.address.streetAddress.number`\n | `subscription.billingSettings.billingAddress.address.streetAddress.name`\n | `subscription.billingSettings.taxSettings.inclusive`\n | `subscription.billingSettings.additionalFees`\n | `subscription.billingSettings.additionalFees.${number}.name`\n | `subscription.billingSettings.additionalFees.${number}.amount`\n | `subscription.billingSettings.additionalFees.${number}.trigger`\n | `subscription.billingSettings.additionalFees.${number}.tax.amount`\n | `subscription.billingSettings.additionalFees.${number}.tax.percentage`\n | `subscription.billingSettings.additionalFees.${number}.tax.dynamic.taxableAddressType`\n | `subscription.billingSettings.additionalFees.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.additionalFees.${number}.origin.appId`\n | `subscription.billingSettings.additionalFees.${number}.origin.entityId`\n | `subscription.billingSettings.shippingCharges.amount`\n | `subscription.billingSettings.shippingCharges.discounts`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.amount`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.percentage`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.appId`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.entityId`\n | `subscription.billingSettings.discounts`\n | `subscription.billingSettings.externalCollectionDetails.collectorName`\n | `subscription.billingStatus.currentCycle`\n | `subscription.billingStatus.latestPaymentData.invoiceId`\n | `subscription.billingStatus.latestPaymentData.paymentStatus`\n | `subscription.billingStatus.latestPaymentData.totals.totalPrice`\n | `subscription.billingStatus.latestPaymentData.totals.subtotal`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxType`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxRate`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.jurisdictionType`\n | `subscription.billingStatus.gracePeriodData.automaticRetryData.enabled`\n | `subscription.policies.customerCanCancel`\n | `subscription.policies.businessCanExtend`\n | `subscription.policies.allowEndOfCycleCancellation`\n | `subscription.pauseInfo.pausePolicy`\n | `subscription.pauseInfo.pauseAt`\n | `subscription.pauseInfo.resumeAt`\n | `subscription.pauseInfo.pauseType`\n | `subscription.cancellationInfo.initiator`\n | `subscription.pendingUpdateData.itemsToUpdate`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}._id`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}.pricingModel.fixedPrice.itemPrice`\n | `subscription.pendingUpdateData.itemsToAdd`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.name`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.catalogReference.catalogItemId`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.category`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.quantity`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.applicationFee.amount`\n | `subscription.pendingUpdateData.itemsToDelete`\n | `subscription.pendingUpdateData.numberOfRequests`\n | `subscription.items`,\n 8\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 subscriptionId: subscriptionId,\n paymentTestMode: options?.paymentTestMode,\n tenantId: options?.tenantId,\n });\n\n const reqOpts = ambassadorWixBillingV1Subscription.payCycle(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'subscription.billingSettings.billingAddress.address' },\n { path: 'subscription.shippingAddress.address' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n subscriptionId: '$[0]',\n paymentTestMode: '$[1].paymentTestMode',\n tenantId: '$[1].tenantId',\n },\n singleArgumentUnchanged: false,\n },\n ['subscriptionId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface PayCycleOptions {\n paymentTestMode?: PaymentTestModeWithLiterals;\n /** @format GUID */\n tenantId: string;\n}\n\n/**\n * Returns a single subscription by its id\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @permissionId subscriptions.view\n * @applicableIdentity APP\n * @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.GetSubscription\n */\nexport async function getSubscription(\n _id: string\n): Promise<\n NonNullablePaths<\n GetSubscriptionResponse,\n | `subscription.name`\n | `subscription.customer.visitorId`\n | `subscription.customer.contactId`\n | `subscription.customer.memberId`\n | `subscription.customer.accountId`\n | `subscription.status`\n | `subscription.billingSettings.currency`\n | `subscription.billingSettings.paymentMethod._id`\n | `subscription.billingSettings.collectionMethod`\n | `subscription.billingSettings.cycleDuration.unit`\n | `subscription.billingSettings.cycleAutoRenew`\n | `subscription.billingSettings.billingAddress.address.streetAddress.number`\n | `subscription.billingSettings.billingAddress.address.streetAddress.name`\n | `subscription.billingSettings.taxSettings.inclusive`\n | `subscription.billingSettings.additionalFees`\n | `subscription.billingSettings.additionalFees.${number}.name`\n | `subscription.billingSettings.additionalFees.${number}.amount`\n | `subscription.billingSettings.additionalFees.${number}.trigger`\n | `subscription.billingSettings.additionalFees.${number}.tax.amount`\n | `subscription.billingSettings.additionalFees.${number}.tax.percentage`\n | `subscription.billingSettings.additionalFees.${number}.tax.dynamic.taxableAddressType`\n | `subscription.billingSettings.additionalFees.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.additionalFees.${number}.origin.appId`\n | `subscription.billingSettings.additionalFees.${number}.origin.entityId`\n | `subscription.billingSettings.shippingCharges.amount`\n | `subscription.billingSettings.shippingCharges.discounts`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.amount`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.percentage`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.appId`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.entityId`\n | `subscription.billingSettings.discounts`\n | `subscription.billingSettings.externalCollectionDetails.collectorName`\n | `subscription.billingStatus.currentCycle`\n | `subscription.billingStatus.latestPaymentData.invoiceId`\n | `subscription.billingStatus.latestPaymentData.paymentStatus`\n | `subscription.billingStatus.latestPaymentData.totals.totalPrice`\n | `subscription.billingStatus.latestPaymentData.totals.subtotal`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxType`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxRate`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.jurisdictionType`\n | `subscription.billingStatus.gracePeriodData.automaticRetryData.enabled`\n | `subscription.policies.customerCanCancel`\n | `subscription.policies.businessCanExtend`\n | `subscription.policies.allowEndOfCycleCancellation`\n | `subscription.pauseInfo.pausePolicy`\n | `subscription.pauseInfo.pauseAt`\n | `subscription.pauseInfo.resumeAt`\n | `subscription.pauseInfo.pauseType`\n | `subscription.cancellationInfo.initiator`\n | `subscription.pendingUpdateData.itemsToUpdate`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}._id`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}.pricingModel.fixedPrice.itemPrice`\n | `subscription.pendingUpdateData.itemsToAdd`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.name`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.catalogReference.catalogItemId`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.category`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.quantity`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.applicationFee.amount`\n | `subscription.pendingUpdateData.itemsToDelete`\n | `subscription.pendingUpdateData.numberOfRequests`\n | `subscription.items`,\n 8\n >\n> {\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 = ambassadorWixBillingV1Subscription.getSubscription(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'subscription.billingSettings.billingAddress.address' },\n { path: 'subscription.shippingAddress.address' },\n ],\n },\n ])\n )!;\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 * Update subscription's payment method.\n * Supported only for recurring subscriptions or one time subscriptions during free trial.\n * @param _id - Subscription ID\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @requiredField paymentMethodId\n * @permissionId subscriptions.manage\n * @applicableIdentity APP\n * @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.UpdateSubscriptionPaymentMethod\n */\nexport async function updateSubscriptionPaymentMethod(\n _id: string,\n paymentMethodId: string\n): Promise<\n NonNullablePaths<\n UpdateSubscriptionPaymentMethodResponse,\n | `subscription.name`\n | `subscription.customer.visitorId`\n | `subscription.customer.contactId`\n | `subscription.customer.memberId`\n | `subscription.customer.accountId`\n | `subscription.status`\n | `subscription.billingSettings.currency`\n | `subscription.billingSettings.paymentMethod._id`\n | `subscription.billingSettings.collectionMethod`\n | `subscription.billingSettings.cycleDuration.unit`\n | `subscription.billingSettings.cycleAutoRenew`\n | `subscription.billingSettings.billingAddress.address.streetAddress.number`\n | `subscription.billingSettings.billingAddress.address.streetAddress.name`\n | `subscription.billingSettings.taxSettings.inclusive`\n | `subscription.billingSettings.additionalFees`\n | `subscription.billingSettings.additionalFees.${number}.name`\n | `subscription.billingSettings.additionalFees.${number}.amount`\n | `subscription.billingSettings.additionalFees.${number}.trigger`\n | `subscription.billingSettings.additionalFees.${number}.tax.amount`\n | `subscription.billingSettings.additionalFees.${number}.tax.percentage`\n | `subscription.billingSettings.additionalFees.${number}.tax.dynamic.taxableAddressType`\n | `subscription.billingSettings.additionalFees.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.additionalFees.${number}.origin.appId`\n | `subscription.billingSettings.additionalFees.${number}.origin.entityId`\n | `subscription.billingSettings.shippingCharges.amount`\n | `subscription.billingSettings.shippingCharges.discounts`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.amount`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.percentage`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.appId`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.entityId`\n | `subscription.billingSettings.discounts`\n | `subscription.billingSettings.externalCollectionDetails.collectorName`\n | `subscription.billingStatus.currentCycle`\n | `subscription.billingStatus.latestPaymentData.invoiceId`\n | `subscription.billingStatus.latestPaymentData.paymentStatus`\n | `subscription.billingStatus.latestPaymentData.totals.totalPrice`\n | `subscription.billingStatus.latestPaymentData.totals.subtotal`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxType`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxRate`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.jurisdictionType`\n | `subscription.billingStatus.gracePeriodData.automaticRetryData.enabled`\n | `subscription.policies.customerCanCancel`\n | `subscription.policies.businessCanExtend`\n | `subscription.policies.allowEndOfCycleCancellation`\n | `subscription.pauseInfo.pausePolicy`\n | `subscription.pauseInfo.pauseAt`\n | `subscription.pauseInfo.resumeAt`\n | `subscription.pauseInfo.pauseType`\n | `subscription.cancellationInfo.initiator`\n | `subscription.pendingUpdateData.itemsToUpdate`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}._id`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}.pricingModel.fixedPrice.itemPrice`\n | `subscription.pendingUpdateData.itemsToAdd`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.name`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.catalogReference.catalogItemId`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.category`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.quantity`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.applicationFee.amount`\n | `subscription.pendingUpdateData.itemsToDelete`\n | `subscription.pendingUpdateData.numberOfRequests`\n | `subscription.items`,\n 8\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 paymentMethodId: paymentMethodId,\n });\n\n const reqOpts =\n ambassadorWixBillingV1Subscription.updateSubscriptionPaymentMethod(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'subscription.billingSettings.billingAddress.address' },\n { path: 'subscription.shippingAddress.address' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { id: '$[0]', paymentMethodId: '$[1]' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'paymentMethodId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Updates the next billing date for a subscription.\n *\n *\n * Updating the billing date may add a proration charge or credit to the next\n * invoice. The customer must pay more in case you extend the current billing\n * cycle. They pay less in case you shorten the current billing cycle. You can\n * choose whether BASS automatically calculates the proration amount based on\n * the number of days added to or removed from the current billing cycle.\n * Alternatively, you can pass a proration amount based on your own custom\n * calculation. The custom proration amount can't exceed the total of the\n * current billing cycle.\n * @param _id - ID of the subscription to update the billing date for.\n * @param billingDate - New billing date in `YYYY-MM-DDThh:mm:ss:sssZ` format.\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @requiredField billingDate\n * @permissionId subscriptions.manage\n * @applicableIdentity APP\n * @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.UpdateSubscriptionBillingDate\n */\nexport async function updateSubscriptionBillingDate(\n _id: string,\n billingDate: Date,\n options?: UpdateSubscriptionBillingDateOptions\n): Promise<\n NonNullablePaths<\n UpdateSubscriptionBillingDateResponse,\n | `subscription.name`\n | `subscription.customer.visitorId`\n | `subscription.customer.contactId`\n | `subscription.customer.memberId`\n | `subscription.customer.accountId`\n | `subscription.status`\n | `subscription.billingSettings.currency`\n | `subscription.billingSettings.paymentMethod._id`\n | `subscription.billingSettings.collectionMethod`\n | `subscription.billingSettings.cycleDuration.unit`\n | `subscription.billingSettings.cycleAutoRenew`\n | `subscription.billingSettings.billingAddress.address.streetAddress.number`\n | `subscription.billingSettings.billingAddress.address.streetAddress.name`\n | `subscription.billingSettings.taxSettings.inclusive`\n | `subscription.billingSettings.additionalFees`\n | `subscription.billingSettings.additionalFees.${number}.name`\n | `subscription.billingSettings.additionalFees.${number}.amount`\n | `subscription.billingSettings.additionalFees.${number}.trigger`\n | `subscription.billingSettings.additionalFees.${number}.tax.amount`\n | `subscription.billingSettings.additionalFees.${number}.tax.percentage`\n | `subscription.billingSettings.additionalFees.${number}.tax.dynamic.taxableAddressType`\n | `subscription.billingSettings.additionalFees.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.additionalFees.${number}.origin.appId`\n | `subscription.billingSettings.additionalFees.${number}.origin.entityId`\n | `subscription.billingSettings.shippingCharges.amount`\n | `subscription.billingSettings.shippingCharges.discounts`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.amount`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.percentage`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.appId`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.entityId`\n | `subscription.billingSettings.discounts`\n | `subscription.billingSettings.externalCollectionDetails.collectorName`\n | `subscription.billingStatus.currentCycle`\n | `subscription.billingStatus.latestPaymentData.invoiceId`\n | `subscription.billingStatus.latestPaymentData.paymentStatus`\n | `subscription.billingStatus.latestPaymentData.totals.totalPrice`\n | `subscription.billingStatus.latestPaymentData.totals.subtotal`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxType`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxRate`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.jurisdictionType`\n | `subscription.billingStatus.gracePeriodData.automaticRetryData.enabled`\n | `subscription.policies.customerCanCancel`\n | `subscription.policies.businessCanExtend`\n | `subscription.policies.allowEndOfCycleCancellation`\n | `subscription.pauseInfo.pausePolicy`\n | `subscription.pauseInfo.pauseAt`\n | `subscription.pauseInfo.resumeAt`\n | `subscription.pauseInfo.pauseType`\n | `subscription.cancellationInfo.initiator`\n | `subscription.pendingUpdateData.itemsToUpdate`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}._id`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}.pricingModel.fixedPrice.itemPrice`\n | `subscription.pendingUpdateData.itemsToAdd`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.name`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.catalogReference.catalogItemId`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.category`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.quantity`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.applicationFee.amount`\n | `subscription.pendingUpdateData.itemsToDelete`\n | `subscription.pendingUpdateData.numberOfRequests`\n | `subscription.items`,\n 8\n > & {\n __applicationErrorsType?: UpdateSubscriptionBillingDateApplicationErrors;\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 id: _id,\n billingDate: billingDate,\n proration: options?.proration,\n });\n\n const reqOpts =\n ambassadorWixBillingV1Subscription.updateSubscriptionBillingDate(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'subscription.billingSettings.billingAddress.address' },\n { path: 'subscription.shippingAddress.address' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n id: '$[0]',\n billingDate: '$[1]',\n proration: '$[2].proration',\n },\n singleArgumentUnchanged: false,\n },\n ['_id', 'billingDate', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateSubscriptionBillingDateOptions {\n /**\n * Information about how BASS adjusts the total of the next invoice. Extending\n * the current billing cycle results in a higher payment, while shortening it\n * leads to a lower payment. BASS offers automatic calculation of the proration\n * amount based on the number of days added to or removed from the current billing\n * cycle. Alternatively, you can use your own custom method to calculate the\n * proration amount. The custom proration amount can't exceed the total of the\n * current billing cycle.\n */\n proration?: Proration;\n}\n\n/**\n * Cancels subscription immediately. Can be canceled by member if subscription policy allows it\n * Only PENDING, ACTIVE or PAUSED subscriptions can be canceled\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @requiredField actionContext\n * @permissionId subscriptions.manage\n * @applicableIdentity APP\n * @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.CancelSubscription\n */\nexport async function cancelSubscription(\n _id: string,\n actionContext: ActionContext\n): Promise<\n NonNullablePaths<\n CancelSubscriptionResponse,\n | `subscription.name`\n | `subscription.customer.visitorId`\n | `subscription.customer.contactId`\n | `subscription.customer.memberId`\n | `subscription.customer.accountId`\n | `subscription.status`\n | `subscription.billingSettings.currency`\n | `subscription.billingSettings.paymentMethod._id`\n | `subscription.billingSettings.collectionMethod`\n | `subscription.billingSettings.cycleDuration.unit`\n | `subscription.billingSettings.cycleAutoRenew`\n | `subscription.billingSettings.billingAddress.address.streetAddress.number`\n | `subscription.billingSettings.billingAddress.address.streetAddress.name`\n | `subscription.billingSettings.taxSettings.inclusive`\n | `subscription.billingSettings.additionalFees`\n | `subscription.billingSettings.additionalFees.${number}.name`\n | `subscription.billingSettings.additionalFees.${number}.amount`\n | `subscription.billingSettings.additionalFees.${number}.trigger`\n | `subscription.billingSettings.additionalFees.${number}.tax.amount`\n | `subscription.billingSettings.additionalFees.${number}.tax.percentage`\n | `subscription.billingSettings.additionalFees.${number}.tax.dynamic.taxableAddressType`\n | `subscription.billingSettings.additionalFees.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.additionalFees.${number}.origin.appId`\n | `subscription.billingSettings.additionalFees.${number}.origin.entityId`\n | `subscription.billingSettings.shippingCharges.amount`\n | `subscription.billingSettings.shippingCharges.discounts`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.amount`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.percentage`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.appId`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.entityId`\n | `subscription.billingSettings.discounts`\n | `subscription.billingSettings.externalCollectionDetails.collectorName`\n | `subscription.billingStatus.currentCycle`\n | `subscription.billingStatus.latestPaymentData.invoiceId`\n | `subscription.billingStatus.latestPaymentData.paymentStatus`\n | `subscription.billingStatus.latestPaymentData.totals.totalPrice`\n | `subscription.billingStatus.latestPaymentData.totals.subtotal`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxType`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxRate`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.jurisdictionType`\n | `subscription.billingStatus.gracePeriodData.automaticRetryData.enabled`\n | `subscription.policies.customerCanCancel`\n | `subscription.policies.businessCanExtend`\n | `subscription.policies.allowEndOfCycleCancellation`\n | `subscription.pauseInfo.pausePolicy`\n | `subscription.pauseInfo.pauseAt`\n | `subscription.pauseInfo.resumeAt`\n | `subscription.pauseInfo.pauseType`\n | `subscription.cancellationInfo.initiator`\n | `subscription.pendingUpdateData.itemsToUpdate`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}._id`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}.pricingModel.fixedPrice.itemPrice`\n | `subscription.pendingUpdateData.itemsToAdd`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.name`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.catalogReference.catalogItemId`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.category`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.quantity`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.applicationFee.amount`\n | `subscription.pendingUpdateData.itemsToDelete`\n | `subscription.pendingUpdateData.numberOfRequests`\n | `subscription.items`,\n 8\n > & {\n __applicationErrorsType?: CancelSubscriptionApplicationErrors;\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 actionContext: actionContext,\n });\n\n const reqOpts =\n ambassadorWixBillingV1Subscription.cancelSubscription(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'subscription.billingSettings.billingAddress.address' },\n { path: 'subscription.shippingAddress.address' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { id: '$[0]', actionContext: '$[1]' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'actionContext']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Pauses subscription now or in future. Possible to pause also payments schedule.\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @requiredField options.actionContext\n * @permissionId subscriptions.manage\n * @applicableIdentity APP\n * @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.PauseSubscription\n */\nexport async function pauseSubscription(\n _id: string,\n options?: NonNullablePaths<PauseSubscriptionOptions, `actionContext`, 2>\n): Promise<\n NonNullablePaths<\n PauseSubscriptionResponse,\n | `subscription.name`\n | `subscription.customer.visitorId`\n | `subscription.customer.contactId`\n | `subscription.customer.memberId`\n | `subscription.customer.accountId`\n | `subscription.status`\n | `subscription.billingSettings.currency`\n | `subscription.billingSettings.paymentMethod._id`\n | `subscription.billingSettings.collectionMethod`\n | `subscription.billingSettings.cycleDuration.unit`\n | `subscription.billingSettings.cycleAutoRenew`\n | `subscription.billingSettings.billingAddress.address.streetAddress.number`\n | `subscription.billingSettings.billingAddress.address.streetAddress.name`\n | `subscription.billingSettings.taxSettings.inclusive`\n | `subscription.billingSettings.additionalFees`\n | `subscription.billingSettings.additionalFees.${number}.name`\n | `subscription.billingSettings.additionalFees.${number}.amount`\n | `subscription.billingSettings.additionalFees.${number}.trigger`\n | `subscription.billingSettings.additionalFees.${number}.tax.amount`\n | `subscription.billingSettings.additionalFees.${number}.tax.percentage`\n | `subscription.billingSettings.additionalFees.${number}.tax.dynamic.taxableAddressType`\n | `subscription.billingSettings.additionalFees.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.additionalFees.${number}.origin.appId`\n | `subscription.billingSettings.additionalFees.${number}.origin.entityId`\n | `subscription.billingSettings.shippingCharges.amount`\n | `subscription.billingSettings.shippingCharges.discounts`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.amount`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.percentage`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.appId`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.entityId`\n | `subscription.billingSettings.discounts`\n | `subscription.billingSettings.externalCollectionDetails.collectorName`\n | `subscription.billingStatus.currentCycle`\n | `subscription.billingStatus.latestPaymentData.invoiceId`\n | `subscription.billingStatus.latestPaymentData.paymentStatus`\n | `subscription.billingStatus.latestPaymentData.totals.totalPrice`\n | `subscription.billingStatus.latestPaymentData.totals.subtotal`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxType`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxRate`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.jurisdictionType`\n | `subscription.billingStatus.gracePeriodData.automaticRetryData.enabled`\n | `subscription.policies.customerCanCancel`\n | `subscription.policies.businessCanExtend`\n | `subscription.policies.allowEndOfCycleCancellation`\n | `subscription.pauseInfo.pausePolicy`\n | `subscription.pauseInfo.pauseAt`\n | `subscription.pauseInfo.resumeAt`\n | `subscription.pauseInfo.pauseType`\n | `subscription.cancellationInfo.initiator`\n | `subscription.pendingUpdateData.itemsToUpdate`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}._id`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}.pricingModel.fixedPrice.itemPrice`\n | `subscription.pendingUpdateData.itemsToAdd`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.name`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.catalogReference.catalogItemId`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.category`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.quantity`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.applicationFee.amount`\n | `subscription.pendingUpdateData.itemsToDelete`\n | `subscription.pendingUpdateData.numberOfRequests`\n | `subscription.items`,\n 8\n > & {\n __applicationErrorsType?: PauseSubscriptionApplicationErrors;\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 pausePolicy: options?.pausePolicy,\n pauseAt: options?.pauseAt,\n pauseAtSchedule: options?.pauseAtSchedule,\n autoResumeAtSchedule: options?.autoResumeAtSchedule,\n actionContext: options?.actionContext,\n pauseType: options?.pauseType,\n });\n\n const reqOpts = ambassadorWixBillingV1Subscription.pauseSubscription(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'subscription.billingSettings.billingAddress.address' },\n { path: 'subscription.shippingAddress.address' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n id: '$[0]',\n pausePolicy: '$[1].pausePolicy',\n pauseAt: '$[1].pauseAt',\n pauseAtSchedule: '$[1].pauseAtSchedule',\n autoResumeAtSchedule: '$[1].autoResumeAtSchedule',\n actionContext: '$[1].actionContext',\n pauseType: '$[1].pauseType',\n },\n singleArgumentUnchanged: false,\n },\n ['_id', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface PauseSubscriptionOptions {\n pausePolicy?: PausePolicyWithLiterals;\n pauseAt?: PauseAtWithLiterals;\n /** contains additional scheduling information for certain pause_at options (for example: SPECIFIC_DATE & NUMBER_OF_CYCLES_FROM_TODAY) */\n pauseAtSchedule?: ScheduleAdditionalInfo;\n /** contains additional scheduling information for certain auto_resume_at either specific date */\n autoResumeAtSchedule?: ScheduleAdditionalInfo;\n actionContext: ActionContext;\n /** The type of pause to apply (PAUSE for traditional pause, SKIP_CYCLE for skip cycle). */\n pauseType?: PauseTypeWithLiterals;\n}\n\n/**\n * Resumes paused subscription now or in future.\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @requiredField options.actionContext\n * @permissionId subscriptions.manage\n * @applicableIdentity APP\n * @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.ResumeSubscription\n */\nexport async function resumeSubscription(\n _id: string,\n options?: NonNullablePaths<ResumeSubscriptionOptions, `actionContext`, 2>\n): Promise<\n NonNullablePaths<\n ResumeSubscriptionResponse,\n | `subscription.name`\n | `subscription.customer.visitorId`\n | `subscription.customer.contactId`\n | `subscription.customer.memberId`\n | `subscription.customer.accountId`\n | `subscription.status`\n | `subscription.billingSettings.currency`\n | `subscription.billingSettings.paymentMethod._id`\n | `subscription.billingSettings.collectionMethod`\n | `subscription.billingSettings.cycleDuration.unit`\n | `subscription.billingSettings.cycleAutoRenew`\n | `subscription.billingSettings.billingAddress.address.streetAddress.number`\n | `subscription.billingSettings.billingAddress.address.streetAddress.name`\n | `subscription.billingSettings.taxSettings.inclusive`\n | `subscription.billingSettings.additionalFees`\n | `subscription.billingSettings.additionalFees.${number}.name`\n | `subscription.billingSettings.additionalFees.${number}.amount`\n | `subscription.billingSettings.additionalFees.${number}.trigger`\n | `subscription.billingSettings.additionalFees.${number}.tax.amount`\n | `subscription.billingSettings.additionalFees.${number}.tax.percentage`\n | `subscription.billingSettings.additionalFees.${number}.tax.dynamic.taxableAddressType`\n | `subscription.billingSettings.additionalFees.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.additionalFees.${number}.origin.appId`\n | `subscription.billingSettings.additionalFees.${number}.origin.entityId`\n | `subscription.billingSettings.shippingCharges.amount`\n | `subscription.billingSettings.shippingCharges.discounts`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.amount`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.percentage`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.appId`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.entityId`\n | `subscription.billingSettings.discounts`\n | `subscription.billingSettings.externalCollectionDetails.collectorName`\n | `subscription.billingStatus.currentCycle`\n | `subscription.billingStatus.latestPaymentData.invoiceId`\n | `subscription.billingStatus.latestPaymentData.paymentStatus`\n | `subscription.billingStatus.latestPaymentData.totals.totalPrice`\n | `subscription.billingStatus.latestPaymentData.totals.subtotal`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxType`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxRate`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.jurisdictionType`\n | `subscription.billingStatus.gracePeriodData.automaticRetryData.enabled`\n | `subscription.policies.customerCanCancel`\n | `subscription.policies.businessCanExtend`\n | `subscription.policies.allowEndOfCycleCancellation`\n | `subscription.pauseInfo.pausePolicy`\n | `subscription.pauseInfo.pauseAt`\n | `subscription.pauseInfo.resumeAt`\n | `subscription.pauseInfo.pauseType`\n | `subscription.cancellationInfo.initiator`\n | `subscription.pendingUpdateData.itemsToUpdate`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}._id`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}.pricingModel.fixedPrice.itemPrice`\n | `subscription.pendingUpdateData.itemsToAdd`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.name`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.catalogReference.catalogItemId`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.category`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.quantity`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.applicationFee.amount`\n | `subscription.pendingUpdateData.itemsToDelete`\n | `subscription.pendingUpdateData.numberOfRequests`\n | `subscription.items`,\n 8\n > & {\n __applicationErrorsType?: ResumeSubscriptionApplicationErrors;\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 resumeAt: options?.resumeAt,\n resumeAtSchedule: options?.resumeAtSchedule,\n actionContext: options?.actionContext,\n });\n\n const reqOpts =\n ambassadorWixBillingV1Subscription.resumeSubscription(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'subscription.billingSettings.billingAddress.address' },\n { path: 'subscription.shippingAddress.address' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n id: '$[0]',\n resumeAt: '$[1].resumeAt',\n resumeAtSchedule: '$[1].resumeAtSchedule',\n actionContext: '$[1].actionContext',\n },\n singleArgumentUnchanged: false,\n },\n ['_id', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ResumeSubscriptionOptions {\n resumeAt?: ResumeAtWithLiterals;\n /** contains additional scheduling information for certain resume_at options (for example: SPECIFIC_DATE) */\n resumeAtSchedule?: ScheduleAdditionalInfo;\n actionContext: ActionContext;\n}\n\n/**\n * Lists subscriptions based on specified filters.\n * By default non-draft subscriptions returned.\n * @public\n * @documentationMaturity preview\n * @requiredField query\n * @permissionId subscriptions.view\n * @applicableIdentity APP\n * @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.QuerySubscriptions\n */\nexport async function querySubscriptions(\n query: QueryV2\n): Promise<\n NonNullablePaths<\n QuerySubscriptionsResponse,\n | `subscriptions`\n | `subscriptions.${number}.name`\n | `subscriptions.${number}.customer.visitorId`\n | `subscriptions.${number}.customer.contactId`\n | `subscriptions.${number}.customer.memberId`\n | `subscriptions.${number}.customer.accountId`\n | `subscriptions.${number}.status`\n | `subscriptions.${number}.billingSettings.currency`\n | `subscriptions.${number}.billingSettings.paymentMethod._id`\n | `subscriptions.${number}.billingSettings.collectionMethod`\n | `subscriptions.${number}.billingSettings.cycleDuration.unit`\n | `subscriptions.${number}.billingSettings.cycleAutoRenew`\n | `subscriptions.${number}.billingSettings.taxSettings.inclusive`\n | `subscriptions.${number}.billingSettings.shippingCharges.amount`\n | `subscriptions.${number}.billingSettings.externalCollectionDetails.collectorName`\n | `subscriptions.${number}.billingStatus.currentCycle`\n | `subscriptions.${number}.billingStatus.latestPaymentData.invoiceId`\n | `subscriptions.${number}.billingStatus.latestPaymentData.paymentStatus`\n | `subscriptions.${number}.policies.customerCanCancel`\n | `subscriptions.${number}.policies.businessCanExtend`\n | `subscriptions.${number}.policies.allowEndOfCycleCancellation`\n | `subscriptions.${number}.pauseInfo.pausePolicy`\n | `subscriptions.${number}.pauseInfo.pauseAt`\n | `subscriptions.${number}.pauseInfo.resumeAt`\n | `subscriptions.${number}.pauseInfo.pauseType`\n | `subscriptions.${number}.cancellationInfo.initiator`\n | `subscriptions.${number}.pendingUpdateData.numberOfRequests`,\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({ query: query });\n\n const reqOpts =\n ambassadorWixBillingV1Subscription.querySubscriptions(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'subscriptions.billingSettings.billingAddress.address' },\n { path: 'subscriptions.shippingAddress.address' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['query']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/** @public\n * @documentationMaturity preview\n * @permissionId subscriptions.view\n * @applicableIdentity APP\n * @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.SearchSubscriptions\n */\nexport async function searchSubscriptions(\n options?: SearchSubscriptionsOptions\n): Promise<\n NonNullablePaths<\n SearchSubscriptionsResponse,\n | `subscriptions`\n | `subscriptions.${number}.name`\n | `subscriptions.${number}.customer.visitorId`\n | `subscriptions.${number}.customer.contactId`\n | `subscriptions.${number}.customer.memberId`\n | `subscriptions.${number}.customer.accountId`\n | `subscriptions.${number}.status`\n | `subscriptions.${number}.billingSettings.currency`\n | `subscriptions.${number}.billingSettings.paymentMethod._id`\n | `subscriptions.${number}.billingSettings.collectionMethod`\n | `subscriptions.${number}.billingSettings.cycleDuration.unit`\n | `subscriptions.${number}.billingSettings.cycleAutoRenew`\n | `subscriptions.${number}.billingSettings.taxSettings.inclusive`\n | `subscriptions.${number}.billingSettings.shippingCharges.amount`\n | `subscriptions.${number}.billingSettings.externalCollectionDetails.collectorName`\n | `subscriptions.${number}.billingStatus.currentCycle`\n | `subscriptions.${number}.billingStatus.latestPaymentData.invoiceId`\n | `subscriptions.${number}.billingStatus.latestPaymentData.paymentStatus`\n | `subscriptions.${number}.policies.customerCanCancel`\n | `subscriptions.${number}.policies.businessCanExtend`\n | `subscriptions.${number}.policies.allowEndOfCycleCancellation`\n | `subscriptions.${number}.pauseInfo.pausePolicy`\n | `subscriptions.${number}.pauseInfo.pauseAt`\n | `subscriptions.${number}.pauseInfo.resumeAt`\n | `subscriptions.${number}.pauseInfo.pauseType`\n | `subscriptions.${number}.cancellationInfo.initiator`\n | `subscriptions.${number}.pendingUpdateData.numberOfRequests`,\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 filter: options?.filter,\n paging: options?.paging,\n cursor: options?.cursor,\n sorting: options?.sorting,\n });\n\n const reqOpts =\n ambassadorWixBillingV1Subscription.searchSubscriptions(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'subscriptions.billingSettings.billingAddress.address' },\n { path: 'subscriptions.shippingAddress.address' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n filter: '$[0].filter',\n paging: '$[0].paging',\n cursor: '$[0].cursor',\n sorting: '$[0].sorting',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface SearchSubscriptionsOptions\n extends SearchSubscriptionsOptionsPagingMethodOneOf {\n /** A filter object */\n filter?: any;\n /** Limit number of results and enable to skip rows. The default limit is 25. */\n paging?: Paging;\n /** A Cursor option for efficient paging. Pass this field from the previous search response to continue to the next page. */\n cursor?: CursorPaging;\n /** A Sorting option by field name and order. */\n sorting?: SortingClauses;\n}\n\n/** @oneof */\nexport interface SearchSubscriptionsOptionsPagingMethodOneOf {\n /** Limit number of results and enable to skip rows. The default limit is 25. */\n paging?: Paging;\n /** A Cursor option for efficient paging. Pass this field from the previous search response to continue to the next page. */\n cursor?: CursorPaging;\n}\n\n/**\n * Counts subscriptions given the provided filters. Returns the total number\n * of subscriptions matching the filters and a count per status.\n *\n *\n * You can either pass a list of statuses or a `statusGroup`, which is a\n * pre-defined combination of statuses.\n *\n * If you don't provide any filters, all subscription statuses with the\n * exception of `\"DRAFT\"` are counted.\n *\n * You may also specify a `customerId` as filter. Then, only subscriptions for\n * this customer are counted. When providing a `customerId`, you must also\n * specify a `paymentMethodId`.\n * @public\n * @documentationMaturity preview\n * @permissionId subscriptions.view\n * @applicableIdentity APP\n * @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.CountSubscriptions\n */\nexport async function countSubscriptions(\n options?: CountSubscriptionsOptions\n): Promise<\n NonNullablePaths<\n CountSubscriptionsResponse,\n | `countByStatus`\n | `countByStatus.${number}.status`\n | `countByStatus.${number}.count`\n | `total`,\n 4\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 filter: options?.filter,\n });\n\n const reqOpts =\n ambassadorWixBillingV1Subscription.countSubscriptions(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: { filter: '$[0].filter' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CountSubscriptionsOptions {\n /** Filters to specify which subscriptions are counted. */\n filter?: CountSubscriptionFilter;\n}\n\n/**\n * Turn on auto-renew subscription in case auto-renew was turned off. The operation changes back cycle_auto_renew\n * to true, which will ensure subscription billing will continue. Also cancellation info holding information about\n * auto renew off will be cleared.\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @requiredField actionContext\n * @permissionId subscriptions.manage\n * @applicableIdentity APP\n * @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.TurnOnSubscriptionAutoRenewal\n */\nexport async function turnOnSubscriptionAutoRenewal(\n _id: string,\n actionContext: ActionContext\n): Promise<\n NonNullablePaths<\n TurnOnSubscriptionAutoRenewalResponse,\n | `subscription.name`\n | `subscription.customer.visitorId`\n | `subscription.customer.contactId`\n | `subscription.customer.memberId`\n | `subscription.customer.accountId`\n | `subscription.status`\n | `subscription.billingSettings.currency`\n | `subscription.billingSettings.paymentMethod._id`\n | `subscription.billingSettings.collectionMethod`\n | `subscription.billingSettings.cycleDuration.unit`\n | `subscription.billingSettings.cycleAutoRenew`\n | `subscription.billingSettings.billingAddress.address.streetAddress.number`\n | `subscription.billingSettings.billingAddress.address.streetAddress.name`\n | `subscription.billingSettings.taxSettings.inclusive`\n | `subscription.billingSettings.additionalFees`\n | `subscription.billingSettings.additionalFees.${number}.name`\n | `subscription.billingSettings.additionalFees.${number}.amount`\n | `subscription.billingSettings.additionalFees.${number}.trigger`\n | `subscription.billingSettings.additionalFees.${number}.tax.amount`\n | `subscription.billingSettings.additionalFees.${number}.tax.percentage`\n | `subscription.billingSettings.additionalFees.${number}.tax.dynamic.taxableAddressType`\n | `subscription.billingSettings.additionalFees.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.additionalFees.${number}.origin.appId`\n | `subscription.billingSettings.additionalFees.${number}.origin.entityId`\n | `subscription.billingSettings.shippingCharges.amount`\n | `subscription.billingSettings.shippingCharges.discounts`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.amount`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.percentage`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.appId`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.entityId`\n | `subscription.billingSettings.discounts`\n | `subscription.billingSettings.externalCollectionDetails.collectorName`\n | `subscription.billingStatus.currentCycle`\n | `subscription.billingStatus.latestPaymentData.invoiceId`\n | `subscription.billingStatus.latestPaymentData.paymentStatus`\n | `subscription.billingStatus.latestPaymentData.totals.totalPrice`\n | `subscription.billingStatus.latestPaymentData.totals.subtotal`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxType`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxRate`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.jurisdictionType`\n | `subscription.billingStatus.gracePeriodData.automaticRetryData.enabled`\n | `subscription.policies.customerCanCancel`\n | `subscription.policies.businessCanExtend`\n | `subscription.policies.allowEndOfCycleCancellation`\n | `subscription.pauseInfo.pausePolicy`\n | `subscription.pauseInfo.pauseAt`\n | `subscription.pauseInfo.resumeAt`\n | `subscription.pauseInfo.pauseType`\n | `subscription.cancellationInfo.initiator`\n | `subscription.pendingUpdateData.itemsToUpdate`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}._id`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}.pricingModel.fixedPrice.itemPrice`\n | `subscription.pendingUpdateData.itemsToAdd`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.name`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.catalogReference.catalogItemId`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.category`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.quantity`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.applicationFee.amount`\n | `subscription.pendingUpdateData.itemsToDelete`\n | `subscription.pendingUpdateData.numberOfRequests`\n | `subscription.items`,\n 8\n > & {\n __applicationErrorsType?: TurnOnSubscriptionAutoRenewalApplicationErrors;\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 actionContext: actionContext,\n });\n\n const reqOpts =\n ambassadorWixBillingV1Subscription.turnOnSubscriptionAutoRenewal(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'subscription.billingSettings.billingAddress.address' },\n { path: 'subscription.shippingAddress.address' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { id: '$[0]', actionContext: '$[1]' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'actionContext']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Turn off auto-renew of subscription. At next billing date subscription will be canceled.\n * Billing settings flag cycle_auto_renew is set to false and information about this operation stored\n * in cancellation info for future usage in cancellation.\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @requiredField actionContext\n * @permissionId subscriptions.manage\n * @applicableIdentity APP\n * @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.TurnOffSubscriptionAutoRenewal\n */\nexport async function turnOffSubscriptionAutoRenewal(\n _id: string,\n actionContext: ActionContext\n): Promise<\n NonNullablePaths<\n TurnOffSubscriptionAutoRenewalResponse,\n | `subscription.name`\n | `subscription.customer.visitorId`\n | `subscription.customer.contactId`\n | `subscription.customer.memberId`\n | `subscription.customer.accountId`\n | `subscription.status`\n | `subscription.billingSettings.currency`\n | `subscription.billingSettings.paymentMethod._id`\n | `subscription.billingSettings.collectionMethod`\n | `subscription.billingSettings.cycleDuration.unit`\n | `subscription.billingSettings.cycleAutoRenew`\n | `subscription.billingSettings.billingAddress.address.streetAddress.number`\n | `subscription.billingSettings.billingAddress.address.streetAddress.name`\n | `subscription.billingSettings.taxSettings.inclusive`\n | `subscription.billingSettings.additionalFees`\n | `subscription.billingSettings.additionalFees.${number}.name`\n | `subscription.billingSettings.additionalFees.${number}.amount`\n | `subscription.billingSettings.additionalFees.${number}.trigger`\n | `subscription.billingSettings.additionalFees.${number}.tax.amount`\n | `subscription.billingSettings.additionalFees.${number}.tax.percentage`\n | `subscription.billingSettings.additionalFees.${number}.tax.dynamic.taxableAddressType`\n | `subscription.billingSettings.additionalFees.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.additionalFees.${number}.origin.appId`\n | `subscription.billingSettings.additionalFees.${number}.origin.entityId`\n | `subscription.billingSettings.shippingCharges.amount`\n | `subscription.billingSettings.shippingCharges.discounts`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.amount`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.percentage`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.appId`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.entityId`\n | `subscription.billingSettings.discounts`\n | `subscription.billingSettings.externalCollectionDetails.collectorName`\n | `subscription.billingStatus.currentCycle`\n | `subscription.billingStatus.latestPaymentData.invoiceId`\n | `subscription.billingStatus.latestPaymentData.paymentStatus`\n | `subscription.billingStatus.latestPaymentData.totals.totalPrice`\n | `subscription.billingStatus.latestPaymentData.totals.subtotal`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxType`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxRate`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.jurisdictionType`\n | `subscription.billingStatus.gracePeriodData.automaticRetryData.enabled`\n | `subscription.policies.customerCanCancel`\n | `subscription.policies.businessCanExtend`\n | `subscription.policies.allowEndOfCycleCancellation`\n | `subscription.pauseInfo.pausePolicy`\n | `subscription.pauseInfo.pauseAt`\n | `subscription.pauseInfo.resumeAt`\n | `subscription.pauseInfo.pauseType`\n | `subscription.cancellationInfo.initiator`\n | `subscription.pendingUpdateData.itemsToUpdate`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}._id`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}.pricingModel.fixedPrice.itemPrice`\n | `subscription.pendingUpdateData.itemsToAdd`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.name`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.catalogReference.catalogItemId`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.category`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.quantity`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.applicationFee.amount`\n | `subscription.pendingUpdateData.itemsToDelete`\n | `subscription.pendingUpdateData.numberOfRequests`\n | `subscription.items`,\n 8\n > & {\n __applicationErrorsType?: TurnOffSubscriptionAutoRenewalApplicationErrors;\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 actionContext: actionContext,\n });\n\n const reqOpts =\n ambassadorWixBillingV1Subscription.turnOffSubscriptionAutoRenewal(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'subscription.billingSettings.billingAddress.address' },\n { path: 'subscription.shippingAddress.address' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { id: '$[0]', actionContext: '$[1]' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'actionContext']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Marks the last invoice as paid used for the following scenarios:\n * * Offline subscriptions.\n * * Online subscriptions during grace period. The operation will convert invoice to offline, remove grace period\n * and will send BillingCycleStarted event after invoice closing.\n * * Online one time payment subscription with total price of zero during purchase flow.\n * Activated event will be sent after invoice closing and subscription will be activated.\n * @param subscriptionId - The ID of the offline subscription to mark as paid its latest invoice\n * @public\n * @documentationMaturity preview\n * @requiredField subscriptionId\n * @permissionId subscriptions.manage\n * @applicableIdentity APP\n * @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.MarkLatestInvoiceAsPaid\n * @deprecated\n * @replacedBy com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.MarkInvoiceAsPaid\n * @targetRemovalDate 2025-09-30\n */\nexport async function markLatestInvoiceAsPaid(subscriptionId: string): Promise<\n NonNullablePaths<\n MarkLatestInvoiceAsPaidResponse,\n | `subscription.name`\n | `subscription.customer.visitorId`\n | `subscription.customer.contactId`\n | `subscription.customer.memberId`\n | `subscription.customer.accountId`\n | `subscription.status`\n | `subscription.billingSettings.currency`\n | `subscription.billingSettings.paymentMethod._id`\n | `subscription.billingSettings.collectionMethod`\n | `subscription.billingSettings.cycleDuration.unit`\n | `subscription.billingSettings.cycleAutoRenew`\n | `subscription.billingSettings.billingAddress.address.streetAddress.number`\n | `subscription.billingSettings.billingAddress.address.streetAddress.name`\n | `subscription.billingSettings.taxSettings.inclusive`\n | `subscription.billingSettings.additionalFees`\n | `subscription.billingSettings.additionalFees.${number}.name`\n | `subscription.billingSettings.additionalFees.${number}.amount`\n | `subscription.billingSettings.additionalFees.${number}.trigger`\n | `subscription.billingSettings.additionalFees.${number}.tax.amount`\n | `subscription.billingSettings.additionalFees.${number}.tax.percentage`\n | `subscription.billingSettings.additionalFees.${number}.tax.dynamic.taxableAddressType`\n | `subscription.billingSettings.additionalFees.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.additionalFees.${number}.origin.appId`\n | `subscription.billingSettings.additionalFees.${number}.origin.entityId`\n | `subscription.billingSettings.shippingCharges.amount`\n | `subscription.billingSettings.shippingCharges.discounts`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.amount`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.percentage`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.appId`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.entityId`\n | `subscription.billingSettings.discounts`\n | `subscription.billingSettings.externalCollectionDetails.collectorName`\n | `subscription.billingStatus.currentCycle`\n | `subscription.billingStatus.latestPaymentData.invoiceId`\n | `subscription.billingStatus.latestPaymentData.paymentStatus`\n | `subscription.billingStatus.latestPaymentData.totals.totalPrice`\n | `subscription.billingStatus.latestPaymentData.totals.subtotal`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxType`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxRate`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.jurisdictionType`\n | `subscription.billingStatus.gracePeriodData.automaticRetryData.enabled`\n | `subscription.policies.customerCanCancel`\n | `subscription.policies.businessCanExtend`\n | `subscription.policies.allowEndOfCycleCancellation`\n | `subscription.pauseInfo.pausePolicy`\n | `subscription.pauseInfo.pauseAt`\n | `subscription.pauseInfo.resumeAt`\n | `subscription.pauseInfo.pauseType`\n | `subscription.cancellationInfo.initiator`\n | `subscription.pendingUpdateData.itemsToUpdate`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}._id`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}.pricingModel.fixedPrice.itemPrice`\n | `subscription.pendingUpdateData.itemsToAdd`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.name`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.catalogReference.catalogItemId`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.category`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.quantity`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.applicationFee.amount`\n | `subscription.pendingUpdateData.itemsToDelete`\n | `subscription.pendingUpdateData.numberOfRequests`\n | `subscription.items`,\n 8\n > & {\n __applicationErrorsType?: MarkLatestInvoiceAsPaidApplicationErrors;\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 subscriptionId: subscriptionId,\n });\n\n const reqOpts =\n ambassadorWixBillingV1Subscription.markLatestInvoiceAsPaid(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'subscription.billingSettings.billingAddress.address' },\n { path: 'subscription.shippingAddress.address' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { subscriptionId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['subscriptionId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Marks the invoice associated with given subscription cycle as paid for the following scenarios:\n * If `paid_cycle` is left empty, the most recent invoice will be marked as paid.\n * If the invoice contains items other than subscription items, an error will be thrown.\n *\n * Marks the invoice as paid for the following scenarios:\n * 1. Offline subscriptions.\n * 2. Online subscriptions during the grace period.\n * This operation will convert the invoice to offline, remove the grace period,\n * and send a BillingCycleStarted event after the invoice is closed.\n * 3. Online one-time payment subscriptions with a total price of zero during the purchase flow.\n * An Activated event will be sent after the invoice is closed, and the subscription will be activated.\n * 4. For external subscriptions, where the payment occurs outside of BASS, an invoice is created and marked as paid\n * @param subscriptionId - The ID of the subscription to mark as paid its invoice.\n * @internal\n * @documentationMaturity preview\n * @requiredField subscriptionId\n * @permissionId subscriptions.manage\n * @applicableIdentity APP\n * @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.MarkBillingCycleAsPaid\n */\nexport async function markBillingCycleAsPaid(\n subscriptionId: string,\n options?: MarkBillingCycleAsPaidOptions\n): Promise<\n NonNullablePaths<\n MarkBillingCycleAsPaidResponse,\n | `subscription.name`\n | `subscription.customer.visitorId`\n | `subscription.customer.contactId`\n | `subscription.customer.memberId`\n | `subscription.customer.accountId`\n | `subscription.status`\n | `subscription.billingSettings.currency`\n | `subscription.billingSettings.paymentMethod._id`\n | `subscription.billingSettings.collectionMethod`\n | `subscription.billingSettings.cycleDuration.unit`\n | `subscription.billingSettings.cycleAutoRenew`\n | `subscription.billingSettings.billingAddress.address.streetAddress.number`\n | `subscription.billingSettings.billingAddress.address.streetAddress.name`\n | `subscription.billingSettings.taxSettings.inclusive`\n | `subscription.billingSettings.additionalFees`\n | `subscription.billingSettings.additionalFees.${number}.name`\n | `subscription.billingSettings.additionalFees.${number}.amount`\n | `subscription.billingSettings.additionalFees.${number}.trigger`\n | `subscription.billingSettings.additionalFees.${number}.tax.amount`\n | `subscription.billingSettings.additionalFees.${number}.tax.percentage`\n | `subscription.billingSettings.additionalFees.${number}.tax.dynamic.taxableAddressType`\n | `subscription.billingSettings.additionalFees.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.additionalFees.${number}.origin.appId`\n | `subscription.billingSettings.additionalFees.${number}.origin.entityId`\n | `subscription.billingSettings.shippingCharges.amount`\n | `subscription.billingSettings.shippingCharges.discounts`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.amount`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.percentage`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.appId`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.entityId`\n | `subscription.billingSettings.discounts`\n | `subscription.billingSettings.externalCollectionDetails.collectorName`\n | `subscription.billingStatus.currentCycle`\n | `subscription.billingStatus.latestPaymentData.invoiceId`\n | `subscription.billingStatus.latestPaymentData.paymentStatus`\n | `subscription.billingStatus.latestPaymentData.totals.totalPrice`\n | `subscription.billingStatus.latestPaymentData.totals.subtotal`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxType`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxRate`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.jurisdictionType`\n | `subscription.billingStatus.gracePeriodData.automaticRetryData.enabled`\n | `subscription.policies.customerCanCancel`\n | `subscription.policies.businessCanExtend`\n | `subscription.policies.allowEndOfCycleCancellation`\n | `subscription.pauseInfo.pausePolicy`\n | `subscription.pauseInfo.pauseAt`\n | `subscription.pauseInfo.resumeAt`\n | `subscription.pauseInfo.pauseType`\n | `subscription.cancellationInfo.initiator`\n | `subscription.pendingUpdateData.itemsToUpdate`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}._id`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}.pricingModel.fixedPrice.itemPrice`\n | `subscription.pendingUpdateData.itemsToAdd`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.name`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.catalogReference.catalogItemId`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.category`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.quantity`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.applicationFee.amount`\n | `subscription.pendingUpdateData.itemsToDelete`\n | `subscription.pendingUpdateData.numberOfRequests`\n | `subscription.items`,\n 8\n > & {\n __applicationErrorsType?: MarkBillingCycleAsPaidApplicationErrors;\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 subscriptionId: subscriptionId,\n paidCycle: options?.paidCycle,\n });\n\n const reqOpts =\n ambassadorWixBillingV1Subscription.markBillingCycleAsPaid(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'subscription.billingSettings.billingAddress.address' },\n { path: 'subscription.shippingAddress.address' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n subscriptionId: '$[0]',\n paidCycle: '$[1].paidCycle',\n },\n singleArgumentUnchanged: false,\n },\n ['subscriptionId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface MarkBillingCycleAsPaidOptions {\n /**\n * The subscription cycle for which the invoice is to be marked as paid.\n * If left empty, the most recent cycle will be selected.\n * @min 1\n */\n paidCycle?: number | null;\n}\n\n/**\n * Returns number of subscriptions in each state.\n * @public\n * @documentationMaturity preview\n * @permissionId subscriptions.view\n * @applicableIdentity APP\n * @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.GetSubscriptionsStats\n */\nexport async function getSubscriptionsStats(): Promise<\n NonNullablePaths<\n GetSubscriptionsStatsResponse,\n | `amountByStatuses`\n | `amountByStatuses.${number}.status`\n | `amountByStatuses.${number}.amount`\n | `total`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n const reqOpts =\n ambassadorWixBillingV1Subscription.getSubscriptionsStats(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 singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Extends subscription by moving end date with or without billing cycles addition.\n * @param _id - The ID of the subscription to be extended\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @requiredField actionContext\n * @requiredField options\n * @requiredField options.extendPolicy\n * @permissionId subscriptions.manage\n * @applicableIdentity APP\n * @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.ExtendSubscription\n */\nexport async function extendSubscription(\n _id: string,\n actionContext: ActionContext,\n options: ExtendSubscriptionOptions\n): Promise<\n NonNullablePaths<\n ExtendSubscriptionResponse,\n | `subscription.name`\n | `subscription.customer.visitorId`\n | `subscription.customer.contactId`\n | `subscription.customer.memberId`\n | `subscription.customer.accountId`\n | `subscription.status`\n | `subscription.billingSettings.currency`\n | `subscription.billingSettings.paymentMethod._id`\n | `subscription.billingSettings.collectionMethod`\n | `subscription.billingSettings.cycleDuration.unit`\n | `subscription.billingSettings.cycleAutoRenew`\n | `subscription.billingSettings.billingAddress.address.streetAddress.number`\n | `subscription.billingSettings.billingAddress.address.streetAddress.name`\n | `subscription.billingSettings.taxSettings.inclusive`\n | `subscription.billingSettings.additionalFees`\n | `subscription.billingSettings.additionalFees.${number}.name`\n | `subscription.billingSettings.additionalFees.${number}.amount`\n | `subscription.billingSettings.additionalFees.${number}.trigger`\n | `subscription.billingSettings.additionalFees.${number}.tax.amount`\n | `subscription.billingSettings.additionalFees.${number}.tax.percentage`\n | `subscription.billingSettings.additionalFees.${number}.tax.dynamic.taxableAddressType`\n | `subscription.billingSettings.additionalFees.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.additionalFees.${number}.origin.appId`\n | `subscription.billingSettings.additionalFees.${number}.origin.entityId`\n | `subscription.billingSettings.shippingCharges.amount`\n | `subscription.billingSettings.shippingCharges.discounts`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.amount`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.percentage`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.appId`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.entityId`\n | `subscription.billingSettings.discounts`\n | `subscription.billingSettings.externalCollectionDetails.collectorName`\n | `subscription.billingStatus.currentCycle`\n | `subscription.billingStatus.latestPaymentData.invoiceId`\n | `subscription.billingStatus.latestPaymentData.paymentStatus`\n | `subscription.billingStatus.latestPaymentData.totals.totalPrice`\n | `subscription.billingStatus.latestPaymentData.totals.subtotal`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxType`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxRate`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.jurisdictionType`\n | `subscription.billingStatus.gracePeriodData.automaticRetryData.enabled`\n | `subscription.policies.customerCanCancel`\n | `subscription.policies.businessCanExtend`\n | `subscription.policies.allowEndOfCycleCancellation`\n | `subscription.pauseInfo.pausePolicy`\n | `subscription.pauseInfo.pauseAt`\n | `subscription.pauseInfo.resumeAt`\n | `subscription.pauseInfo.pauseType`\n | `subscription.cancellationInfo.initiator`\n | `subscription.pendingUpdateData.itemsToUpdate`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}._id`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}.pricingModel.fixedPrice.itemPrice`\n | `subscription.pendingUpdateData.itemsToAdd`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.name`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.catalogReference.catalogItemId`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.category`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.quantity`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.applicationFee.amount`\n | `subscription.pendingUpdateData.itemsToDelete`\n | `subscription.pendingUpdateData.numberOfRequests`\n | `subscription.items`,\n 8\n > & {\n __applicationErrorsType?: ExtendSubscriptionApplicationErrors;\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 id: _id,\n actionContext: actionContext,\n extensionPeriod: options?.extensionPeriod,\n extensionBillingCycles: options?.extensionBillingCycles,\n });\n\n const reqOpts =\n ambassadorWixBillingV1Subscription.extendSubscription(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'subscription.billingSettings.billingAddress.address' },\n { path: 'subscription.shippingAddress.address' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n id: '$[0]',\n actionContext: '$[1]',\n extensionPeriod: '$[2].extensionPeriod',\n extensionBillingCycles: '$[2].extensionBillingCycles',\n },\n singleArgumentUnchanged: false,\n },\n ['_id', 'actionContext', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ExtendSubscriptionOptions\n extends ExtendSubscriptionOptionsExtendPolicyOneOf {\n /** User won't be charged for additional period added on top of subscription end date. */\n extensionPeriod?: Duration;\n /**\n * user will be charged for billing cycles added\n * @min 1\n */\n extensionBillingCycles?: number;\n}\n\n/** @oneof */\nexport interface ExtendSubscriptionOptionsExtendPolicyOneOf {\n /** User won't be charged for additional period added on top of subscription end date. */\n extensionPeriod?: Duration;\n /**\n * user will be charged for billing cycles added\n * @min 1\n */\n extensionBillingCycles?: number;\n}\n\n/** @public\n * @documentationMaturity preview\n * @requiredField _id\n * @permissionId subscriptions.manage\n * @applicableIdentity APP\n * @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.AllowedActions\n */\nexport async function allowedActions(\n _id: string,\n options?: AllowedActionsOptions\n): Promise<\n NonNullablePaths<\n AllowedActionsResponse,\n | `actions`\n | `actions.${number}.actionType`\n | `unsupportedActions`\n | `unsupportedActions.${number}.actionType`,\n 4\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 fields: options?.fields,\n });\n\n const reqOpts = ambassadorWixBillingV1Subscription.allowedActions(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]', fields: '$[1].fields' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface AllowedActionsOptions {\n /**\n * List of additional fields to be included in the response.\n * @maxSize 1\n */\n fields?: RequestedFieldsWithLiterals[];\n}\n\n/**\n * List future subscriptions charges\n * @param subscriptionId - Subscription id charges to be previewed for\n * @public\n * @documentationMaturity preview\n * @requiredField subscriptionId\n * @permissionId subscriptions.view\n * @applicableIdentity APP\n * @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.ListUpcomingCharges\n */\nexport async function listUpcomingCharges(\n subscriptionId: string,\n options?: ListUpcomingChargesOptions\n): Promise<\n NonNullablePaths<\n ListUpcomingChargesResponse,\n | `upcomingCharges`\n | `upcomingCharges.${number}.cycle`\n | `upcomingCharges.${number}.totals.totalPrice`\n | `upcomingCharges.${number}.totals.subtotal`\n | `upcomingCharges.${number}.discount.amount`\n | `upcomingCharges.${number}.discount.percentage`\n | `upcomingCharges.${number}.discount.origin.appId`\n | `upcomingCharges.${number}.discount.origin.entityId`,\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 subscriptionId: subscriptionId,\n customDuration: options?.customDuration,\n nextBillingDate: options?.nextBillingDate,\n });\n\n const reqOpts =\n ambassadorWixBillingV1Subscription.listUpcomingCharges(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 subscriptionId: '$[0]',\n customDuration: '$[1].customDuration',\n nextBillingDate: '$[1].nextBillingDate',\n },\n singleArgumentUnchanged: false,\n },\n ['subscriptionId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListUpcomingChargesOptions {\n /** Period of time to provide charged for. If not provided,then only next charge will be returned. */\n customDuration?: Duration;\n /**\n * Date of the next billing cycle so that the upcoming charges will be calculated accordingly.\n * If not provided, the upcoming charges will be calculated according to the existing next billing date.\n */\n nextBillingDate?: Date | null;\n}\n\n/**\n * Retrieves the preview of subscription charges.\n * Returns all the charges applicable to a subscription based on the provided subscription information.\n * @public\n * @documentationMaturity preview\n * @requiredField options.subscription.subscriptionInfo\n * @requiredField options.subscription.subscriptionInfo.billingSettings\n * @requiredField options.subscription.subscriptionInfo.items\n * @requiredField options.subscription.subscriptionInfo.items.pricingModel\n * @permissionId subscriptions.view\n * @applicableIdentity APP\n * @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.PreviewSubscriptionCharges\n * @deprecated\n * @replacedBy com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.PreviewSubscriptionsCharges\n * @targetRemovalDate 2025-06-30\n */\nexport async function previewSubscriptionCharges(\n options?: PreviewSubscriptionChargesOptions\n): Promise<\n NonNullablePaths<\n PreviewSubscriptionChargesResponse,\n | `charges`\n | `charges.${number}.cycleFrom`\n | `charges.${number}.totals.totalPrice`\n | `charges.${number}.totals.subtotal`,\n 5\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = transformPaths(\n renameKeysFromSDKRequestToRESTRequest({\n subscriptionInfo: options?.subscriptionInfo,\n }),\n [\n {\n transformFn: transformSDKAddressToRESTAddress,\n paths: [\n { path: 'subscriptionInfo.billingSettings.billingAddress.address' },\n ],\n },\n ]\n );\n\n const reqOpts =\n ambassadorWixBillingV1Subscription.previewSubscriptionCharges(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: { subscriptionInfo: '$[0].subscriptionInfo' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface PreviewSubscriptionChargesOptions\n extends PreviewSubscriptionChargesOptionsSubscriptionOneOf {\n /** Information about a non-existing subscription. */\n subscriptionInfo?: SubscriptionInfo;\n}\n\n/** @oneof */\nexport interface PreviewSubscriptionChargesOptionsSubscriptionOneOf {\n /** Information about a non-existing subscription. */\n subscriptionInfo?: SubscriptionInfo;\n}\n\n/**\n * Retrieves the preview of subscription charges for a bulk of subscriptions.\n * Returns all the charges applicable to all subscriptions, based on the provided subscriptions information.\n * @public\n * @documentationMaturity preview\n * @requiredField options.subscriptionsBillingDetails.billingSettings\n * @requiredField options.subscriptionsBillingDetails.externalId\n * @requiredField options.subscriptionsBillingDetails.items\n * @requiredField options.subscriptionsBillingDetails.items.pricingModel\n * @permissionId subscriptions.view\n * @applicableIdentity APP\n * @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.PreviewSubscriptionsCharges\n */\nexport async function previewSubscriptionsCharges(\n options?: NonNullablePaths<\n PreviewSubscriptionsChargesOptions,\n | `subscriptionsBillingDetails.${number}.billingSettings`\n | `subscriptionsBillingDetails.${number}.externalId`\n | `subscriptionsBillingDetails.${number}.items`\n | `subscriptionsBillingDetails.${number}.items.${number}.pricingModel`,\n 6\n >\n): Promise<\n NonNullablePaths<\n PreviewSubscriptionsChargesResponse,\n `subscriptionsCharges`,\n 2\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = transformPaths(\n renameKeysFromSDKRequestToRESTRequest({\n subscriptionsBillingDetails: options?.subscriptionsBillingDetails,\n numberOfNextRecurringCharges: options?.numberOfNextRecurringCharges,\n }),\n [\n {\n transformFn: transformSDKAddressToRESTAddress,\n paths: [\n {\n path: 'subscriptionsBillingDetails.billingSettings.billingAddress.address',\n },\n { path: 'subscriptionsBillingDetails.shippingAddress.address' },\n ],\n },\n ]\n );\n\n const reqOpts =\n ambassadorWixBillingV1Subscription.previewSubscriptionsCharges(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 subscriptionsBillingDetails: '$[0].subscriptionsBillingDetails',\n numberOfNextRecurringCharges: '$[0].numberOfNextRecurringCharges',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface PreviewSubscriptionsChargesOptions {\n /**\n * Information required to calculate the preview charges for the subscriptions, including an identifier.\n * @minSize 1\n * @maxSize 10\n */\n subscriptionsBillingDetails?: SubscriptionBillingDetails[];\n /**\n * Specifies the number of upcoming billing charges to preview for all subscriptions in the order.\n * For instance, if a subscription costs $10 for the first 3 cycles, $12 for cycles 4 through 7,\n * $15 for cycles 8 through 10, and $20 for cycle 11 onwards:\n * - Sending \"1\" will calculate and return charges for cycles 4 through 7 since it's the first charge in the future.\n * - Sending \"2\" will provide a response with charges for cycles 4 through 7 and cycles 8 through 10.\n * - Sending \"3\" or more will include totals for cycles 4 through 7, cycles 8 through 10, and from cycle 11 onwards.\n * If no value is provided, the response will include charges for all upcoming cycles, including the existing one,\n * in this case, charges for cycle 1 through 3.\n * If there is a single charge for a subscription, meaning that subscription price remains consistent across all cycles,\n * then even if future_charges_count is set, it will be ignored and the only charge this subscription has will be returned.\n * @min 1\n * @max 10\n */\n numberOfNextRecurringCharges?: number | null;\n}\n\n/**\n * Creates authorization invoice with Moto settings in order to create\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @permissionId subscriptions.manage\n * @applicableIdentity APP\n * @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.InitiatePaymentMethodSetup\n */\nexport async function initiatePaymentMethodSetup(\n _id: string,\n options?: InitiatePaymentMethodSetupOptions\n): Promise<\n NonNullablePaths<InitiatePaymentMethodSetupResponse, `paymentOrderId`, 2>\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 paymentMode: options?.paymentMode,\n paymentSettings: options?.paymentSettings,\n });\n\n const reqOpts =\n ambassadorWixBillingV1Subscription.initiatePaymentMethodSetup(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 id: '$[0]',\n paymentMode: '$[1].paymentMode',\n paymentSettings: '$[1].paymentSettings',\n },\n singleArgumentUnchanged: false,\n },\n ['_id', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface InitiatePaymentMethodSetupOptions {\n paymentMode?: PaymentModeWithLiterals;\n paymentSettings?: PaymentSettings;\n}\n\n/** @public\n * @documentationMaturity preview\n * @requiredField subscriptionId\n * @permissionId subscriptions.view\n * @applicableIdentity APP\n * @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionHistoryService.ListSubscriptionHistory\n */\nexport async function listSubscriptionHistory(\n subscriptionId: string,\n options?: ListSubscriptionHistoryOptions\n): Promise<\n NonNullablePaths<\n ListSubscriptionHistoryResponse,\n | `historyEntries`\n | `historyEntries.${number}.entryId`\n | `historyEntries.${number}.slug`\n | `historyEntries.${number}.event.deleted.subscriptionId`\n | `historyEntries.${number}.event.paused.pausePolicy`\n | `historyEntries.${number}.event.pauseRequested.pauseAt`\n | `historyEntries.${number}.event.pauseRequested.pausePolicy`\n | `historyEntries.${number}.event.resumeRequested.resumeAt`\n | `historyEntries.${number}.event.extended.extensionBillingCycles`\n | `historyEntries.${number}.event.updatesApplied.updateAction`\n | `historyEntries.${number}.event.gracePeriodEnded.paymentSettlementMethod`\n | `historyEntries.${number}.event.paymentMethodUpdated.initiator`\n | `historyEntries.${number}.event.paymentMethodUpdated.paymentMode`\n | `historyEntries.${number}.event.collectionMethodUpdated.newCollectionMethod`\n | `historyEntries.${number}.event.collectionMethodUpdated.previousCollectionMethod`\n | `historyEntries.${number}.event.billingCyclePaid.paidCycle`\n | `historyEntries.${number}.event.billingCyclePaid.invoiceId`\n | `historyEntries.${number}.event.subscriptionBoAction.name`\n | `historyEntries.${number}.event.subscriptionBoAction.params`,\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 subscriptionId: subscriptionId,\n mode: options?.mode,\n cursor: options?.cursor,\n });\n\n const reqOpts =\n ambassadorWixBillingV1Subscription.listSubscriptionHistory(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n {\n path: 'historyEntries.event.created.subscription.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.created.subscription.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.updated.current.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.updated.current.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.updated.previous.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.updated.previous.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.activated.subscription.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.activated.subscription.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.ended.subscription.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.ended.subscription.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.canceled.subscription.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.canceled.subscription.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.paused.subscription.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.paused.subscription.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.resumed.subscription.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.resumed.subscription.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.pauseRequested.subscription.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.pauseRequested.subscription.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.resumeRequested.subscription.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.resumeRequested.subscription.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.scheduledPauseCanceled.subscription.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.scheduledPauseCanceled.subscription.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.scheduledResumeCanceled.subscription.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.scheduledResumeCanceled.subscription.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.billingCycleStarted.subscription.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.billingCycleStarted.subscription.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOn.subscription.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOn.subscription.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOff.subscription.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOff.subscription.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.cycleReadyToPay.subscription.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.cycleReadyToPay.subscription.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.extended.subscription.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.extended.subscription.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.initialPurchaseCompleted.subscription.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.initialPurchaseCompleted.subscription.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.latestInvoiceMarkedAsPaid.subscription.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.latestInvoiceMarkedAsPaid.subscription.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.revived.subscription.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.revived.subscription.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.billingDateUpdated.subscription.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.billingDateUpdated.subscription.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.futureUpdatesRequested.subscription.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.futureUpdatesRequested.subscription.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.updatesApplied.subscription.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.updatesApplied.subscription.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.resetPendingUpdates.subscription.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.resetPendingUpdates.subscription.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.gracePeriodStarted.subscription.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.gracePeriodStarted.subscription.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.gracePeriodEnded.subscription.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.gracePeriodEnded.subscription.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.paymentMethodUpdated.subscription.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.paymentMethodUpdated.subscription.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.collectionMethodUpdated.subscription.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.collectionMethodUpdated.subscription.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.freeTrailStarted.subscription.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.freeTrailStarted.subscription.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.freeTrailEnded.subscription.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.freeTrailEnded.subscription.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.billingCyclePaid.subscription.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.billingCyclePaid.subscription.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.initiatePaymentMethodSetup.subscription.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.initiatePaymentMethodSetup.subscription.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.futurePriceUpdatesRequested.subscription.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.futurePriceUpdatesRequested.subscription.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.subscriptionBoAction.subscription.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.subscriptionBoAction.subscription.shippingAddress.address',\n },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n subscriptionId: '$[0]',\n mode: '$[1].mode',\n cursor: '$[1].cursor',\n },\n singleArgumentUnchanged: false,\n },\n ['subscriptionId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListSubscriptionHistoryOptions {\n /** Determines the type of view for the history: either a comprehensive backoffice view or a user-centric view. */\n mode?: HistoryViewModeWithLiterals;\n /** Cursor for efficient paging. If paging through results, pass this field from the previous search response to continue to the next page. */\n cursor?: CursorPaging;\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 resolveComWixpressBillingSubscriptionsApiV1SubscriptionHistoryServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www._base_domain_': [\n {\n srcPath: '/_api/billing-subscriptions',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/billing-subscriptions',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/billing-subscriptions',\n destPath: '',\n },\n ],\n '*.pub.wix-code.com': [\n {\n srcPath: '/_api/billing-subscriptions',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/billing-subscriptions',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nfunction resolveComWixpressBillingSubscriptionsApiV1SubscriptionsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www._base_domain_': [\n {\n srcPath: '/_api/billing-subscriptions',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/billing-subscriptions',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/billing-subscriptions',\n destPath: '',\n },\n ],\n '*.pub.wix-code.com': [\n {\n srcPath: '/_api/billing-subscriptions',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/billing-subscriptions',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nfunction resolveComWixpressBillingSubscriptionsApiV1SubscriptionsBackOfficeServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www._base_domain_': [\n {\n srcPath: '/_api/billing-subscriptions',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/billing-subscriptions',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/billing-subscriptions',\n destPath: '',\n },\n ],\n '*.pub.wix-code.com': [\n {\n srcPath: '/_api/billing-subscriptions',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/billing-subscriptions',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nfunction resolveComWixpressBillingSubscriptionsApiV1CustomerSubscriptionsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www._base_domain_': [\n {\n srcPath: '/_api/billing-subscriptions',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/billing-subscriptions',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/billing-subscriptions',\n destPath: '',\n },\n ],\n '*.pub.wix-code.com': [\n {\n srcPath: '/_api/billing-subscriptions',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/billing-subscriptions',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_subscription_subscriptions';\n\n/** Identity must be a site member and customer subscription belongs to */\nexport function customerGetSubscription(\n payload: object\n): RequestOptionsFactory<any> {\n function __customerGetSubscription({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.billing.v1.subscription',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.GetSubscription',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingSubscriptionsApiV1CustomerSubscriptionsServiceUrl(\n { protoPath: '/v1/customer_subscriptions/{id}', data: payload, host }\n ),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'subscription.createdDate' },\n { path: 'subscription.updatedDate' },\n { path: 'subscription.startDate' },\n { path: 'subscription.endDate' },\n { path: 'subscription.billingStatus.nextBillingDate' },\n { path: 'subscription.billingStatus.previousBillingDate' },\n {\n path: 'subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n { path: 'subscription.billingStatus.freeTrialData.startDate' },\n { path: 'subscription.billingStatus.freeTrialData.endDate' },\n {\n path: 'subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n { path: 'subscription.billingStatus.gracePeriodData.startDate' },\n { path: 'subscription.billingStatus.gracePeriodData.endDate' },\n { path: 'subscription.pauseInfo.startDate' },\n { path: 'subscription.pauseInfo.resumeDate' },\n { path: 'subscription.cancellationInfo.cancellationDate' },\n {\n path: 'subscription.specificDatePendingUpdateData.executionDate',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __customerGetSubscription;\n}\n\n/** Identity must be a site member and customer subscription belongs to */\nexport function customerCancelSubscription(\n payload: object\n): RequestOptionsFactory<any> {\n function __customerCancelSubscription({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.billing.v1.subscription',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.CancelSubscription',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingSubscriptionsApiV1CustomerSubscriptionsServiceUrl(\n {\n protoPath: '/v1/customer_subscriptions/{id}/cancel',\n data: payload,\n host,\n }\n ),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'subscription.createdDate' },\n { path: 'subscription.updatedDate' },\n { path: 'subscription.startDate' },\n { path: 'subscription.endDate' },\n { path: 'subscription.billingStatus.nextBillingDate' },\n { path: 'subscription.billingStatus.previousBillingDate' },\n {\n path: 'subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n { path: 'subscription.billingStatus.freeTrialData.startDate' },\n { path: 'subscription.billingStatus.freeTrialData.endDate' },\n {\n path: 'subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n { path: 'subscription.billingStatus.gracePeriodData.startDate' },\n { path: 'subscription.billingStatus.gracePeriodData.endDate' },\n { path: 'subscription.pauseInfo.startDate' },\n { path: 'subscription.pauseInfo.resumeDate' },\n { path: 'subscription.cancellationInfo.cancellationDate' },\n {\n path: 'subscription.specificDatePendingUpdateData.executionDate',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __customerCancelSubscription;\n}\n\n/** Identity must be a site member and customer subscription belongs to */\nexport function customerTurnOnSubscriptionAutoRenewal(\n payload: object\n): RequestOptionsFactory<any> {\n function __customerTurnOnSubscriptionAutoRenewal({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.billing.v1.subscription',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.TurnOnSubscriptionAutoRenewal',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingSubscriptionsApiV1CustomerSubscriptionsServiceUrl(\n {\n protoPath: '/v1/customer_subscriptions/{id}/turn_on_auto_renewal',\n data: payload,\n host,\n }\n ),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'subscription.createdDate' },\n { path: 'subscription.updatedDate' },\n { path: 'subscription.startDate' },\n { path: 'subscription.endDate' },\n { path: 'subscription.billingStatus.nextBillingDate' },\n { path: 'subscription.billingStatus.previousBillingDate' },\n {\n path: 'subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n { path: 'subscription.billingStatus.freeTrialData.startDate' },\n { path: 'subscription.billingStatus.freeTrialData.endDate' },\n {\n path: 'subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n { path: 'subscription.billingStatus.gracePeriodData.startDate' },\n { path: 'subscription.billingStatus.gracePeriodData.endDate' },\n { path: 'subscription.pauseInfo.startDate' },\n { path: 'subscription.pauseInfo.resumeDate' },\n { path: 'subscription.cancellationInfo.cancellationDate' },\n {\n path: 'subscription.specificDatePendingUpdateData.executionDate',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __customerTurnOnSubscriptionAutoRenewal;\n}\n\n/** Identity must be a site member and customer subscription belongs to */\nexport function customerTurnOffSubscriptionAutoRenewal(\n payload: object\n): RequestOptionsFactory<any> {\n function __customerTurnOffSubscriptionAutoRenewal({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.billing.v1.subscription',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.TurnOffSubscriptionAutoRenewal',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingSubscriptionsApiV1CustomerSubscriptionsServiceUrl(\n {\n protoPath: '/v1/customer_subscriptions/{id}/turn_off_auto_renewal',\n data: payload,\n host,\n }\n ),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'subscription.createdDate' },\n { path: 'subscription.updatedDate' },\n { path: 'subscription.startDate' },\n { path: 'subscription.endDate' },\n { path: 'subscription.billingStatus.nextBillingDate' },\n { path: 'subscription.billingStatus.previousBillingDate' },\n {\n path: 'subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n { path: 'subscription.billingStatus.freeTrialData.startDate' },\n { path: 'subscription.billingStatus.freeTrialData.endDate' },\n {\n path: 'subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n { path: 'subscription.billingStatus.gracePeriodData.startDate' },\n { path: 'subscription.billingStatus.gracePeriodData.endDate' },\n { path: 'subscription.pauseInfo.startDate' },\n { path: 'subscription.pauseInfo.resumeDate' },\n { path: 'subscription.cancellationInfo.cancellationDate' },\n {\n path: 'subscription.specificDatePendingUpdateData.executionDate',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __customerTurnOffSubscriptionAutoRenewal;\n}\n\nexport function customerExtendSubscription(\n payload: object\n): RequestOptionsFactory<any> {\n function __customerExtendSubscription({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.billing.v1.subscription',\n method: 'PATCH' as any,\n methodFqn:\n 'com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.ExtendSubscription',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingSubscriptionsApiV1CustomerSubscriptionsServiceUrl(\n {\n protoPath: '/v1/customer_subscriptions/{id}/extend',\n data: payload,\n host,\n }\n ),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'subscription.createdDate' },\n { path: 'subscription.updatedDate' },\n { path: 'subscription.startDate' },\n { path: 'subscription.endDate' },\n { path: 'subscription.billingStatus.nextBillingDate' },\n { path: 'subscription.billingStatus.previousBillingDate' },\n {\n path: 'subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n { path: 'subscription.billingStatus.freeTrialData.startDate' },\n { path: 'subscription.billingStatus.freeTrialData.endDate' },\n {\n path: 'subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n { path: 'subscription.billingStatus.gracePeriodData.startDate' },\n { path: 'subscription.billingStatus.gracePeriodData.endDate' },\n { path: 'subscription.pauseInfo.startDate' },\n { path: 'subscription.pauseInfo.resumeDate' },\n { path: 'subscription.cancellationInfo.cancellationDate' },\n {\n path: 'subscription.specificDatePendingUpdateData.executionDate',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __customerExtendSubscription;\n}\n\n/** identity must be a site member */\nexport function customerQuerySubscriptions(\n payload: object\n): RequestOptionsFactory<any> {\n function __customerQuerySubscriptions({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.billing.v1.subscription',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.QuerySubscriptions',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingSubscriptionsApiV1CustomerSubscriptionsServiceUrl(\n { protoPath: '/v1/customer_subscriptions/query', data: payload, host }\n ),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'subscriptions.createdDate' },\n { path: 'subscriptions.updatedDate' },\n { path: 'subscriptions.startDate' },\n { path: 'subscriptions.endDate' },\n { path: 'subscriptions.billingStatus.nextBillingDate' },\n { path: 'subscriptions.billingStatus.previousBillingDate' },\n {\n path: 'subscriptions.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n { path: 'subscriptions.billingStatus.freeTrialData.startDate' },\n { path: 'subscriptions.billingStatus.freeTrialData.endDate' },\n {\n path: 'subscriptions.billingStatus.updateBillingDateData.paidUntil',\n },\n { path: 'subscriptions.billingStatus.gracePeriodData.startDate' },\n { path: 'subscriptions.billingStatus.gracePeriodData.endDate' },\n { path: 'subscriptions.pauseInfo.startDate' },\n { path: 'subscriptions.pauseInfo.resumeDate' },\n { path: 'subscriptions.cancellationInfo.cancellationDate' },\n {\n path: 'subscriptions.specificDatePendingUpdateData.executionDate',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __customerQuerySubscriptions;\n}\n\n/**\n * Update subscription's payment method.\n * Supported only for recurring subscriptions or one time subscriptions during free trial.\n */\nexport function customerUpdateSubscriptionPaymentMethod(\n payload: object\n): RequestOptionsFactory<any> {\n function __customerUpdateSubscriptionPaymentMethod({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.billing.v1.subscription',\n method: 'PATCH' as any,\n methodFqn:\n 'com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.UpdateSubscriptionPaymentMethod',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingSubscriptionsApiV1CustomerSubscriptionsServiceUrl(\n {\n protoPath: '/v1/customer_subscriptions/{id}/payment_method',\n data: payload,\n host,\n }\n ),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'subscription.createdDate' },\n { path: 'subscription.updatedDate' },\n { path: 'subscription.startDate' },\n { path: 'subscription.endDate' },\n { path: 'subscription.billingStatus.nextBillingDate' },\n { path: 'subscription.billingStatus.previousBillingDate' },\n {\n path: 'subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n { path: 'subscription.billingStatus.freeTrialData.startDate' },\n { path: 'subscription.billingStatus.freeTrialData.endDate' },\n {\n path: 'subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n { path: 'subscription.billingStatus.gracePeriodData.startDate' },\n { path: 'subscription.billingStatus.gracePeriodData.endDate' },\n { path: 'subscription.pauseInfo.startDate' },\n { path: 'subscription.pauseInfo.resumeDate' },\n { path: 'subscription.cancellationInfo.cancellationDate' },\n {\n path: 'subscription.specificDatePendingUpdateData.executionDate',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __customerUpdateSubscriptionPaymentMethod;\n}\n\nexport function customerAllowedActions(\n payload: object\n): RequestOptionsFactory<any> {\n function __customerAllowedActions({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.billing.v1.subscription',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.AllowedActions',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingSubscriptionsApiV1CustomerSubscriptionsServiceUrl(\n {\n protoPath: '/v1/customer_subscriptions/{id}/allowed_actions',\n data: payload,\n host,\n }\n ),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __customerAllowedActions;\n}\n\n/** List future subscriptions charges. */\nexport function customerListUpcomingCharges(\n payload: object\n): RequestOptionsFactory<any> {\n function __customerListUpcomingCharges({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.billing.v1.subscription',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.ListUpcomingCharges',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingSubscriptionsApiV1CustomerSubscriptionsServiceUrl(\n {\n protoPath: '/v1/customer_subscriptions/{id}/upcoming_charges',\n data: payload,\n host,\n }\n ),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'upcomingCharge.billingDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __customerListUpcomingCharges;\n}\n\n/** Creates auto-charge order that can be paid by customer */\nexport function customerInitiatePaymentMethodSetup(\n payload: object\n): RequestOptionsFactory<any> {\n function __customerInitiatePaymentMethodSetup({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.billing.v1.subscription',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.InitiatePaymentMethodSetup',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingSubscriptionsApiV1CustomerSubscriptionsServiceUrl(\n {\n protoPath: '/v1/customer_subscriptions/{id}/payment_method_setup',\n data: payload,\n host,\n }\n ),\n data: payload,\n };\n\n return metadata;\n }\n\n return __customerInitiatePaymentMethodSetup;\n}\n\n/** This used only for automation and permitted tenants (QA & testing) */\nexport function payCycle(payload: object): RequestOptionsFactory<any> {\n function __payCycle({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.billing.v1.subscription',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.billing.subscriptions.api.v1.SubscriptionsBackOfficeService.PayCycle',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingSubscriptionsApiV1SubscriptionsBackOfficeServiceUrl(\n {\n protoPath: '/v1/subscriptions-bo/{subscriptionId}/pay-cycle',\n data: payload,\n host,\n }\n ),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'subscription.createdDate' },\n { path: 'subscription.updatedDate' },\n { path: 'subscription.startDate' },\n { path: 'subscription.endDate' },\n { path: 'subscription.billingStatus.nextBillingDate' },\n { path: 'subscription.billingStatus.previousBillingDate' },\n {\n path: 'subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n { path: 'subscription.billingStatus.freeTrialData.startDate' },\n { path: 'subscription.billingStatus.freeTrialData.endDate' },\n {\n path: 'subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n { path: 'subscription.billingStatus.gracePeriodData.startDate' },\n { path: 'subscription.billingStatus.gracePeriodData.endDate' },\n { path: 'subscription.pauseInfo.startDate' },\n { path: 'subscription.pauseInfo.resumeDate' },\n { path: 'subscription.cancellationInfo.cancellationDate' },\n {\n path: 'subscription.specificDatePendingUpdateData.executionDate',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __payCycle;\n}\n\n/** Returns a single subscription by its id */\nexport function getSubscription(payload: object): RequestOptionsFactory<any> {\n function __getSubscription({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.billing.v1.subscription',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.GetSubscription',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingSubscriptionsApiV1SubscriptionsServiceUrl({\n protoPath: '/v1/subscriptions/{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: 'subscription.createdDate' },\n { path: 'subscription.updatedDate' },\n { path: 'subscription.startDate' },\n { path: 'subscription.endDate' },\n { path: 'subscription.billingStatus.nextBillingDate' },\n { path: 'subscription.billingStatus.previousBillingDate' },\n {\n path: 'subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n { path: 'subscription.billingStatus.freeTrialData.startDate' },\n { path: 'subscription.billingStatus.freeTrialData.endDate' },\n {\n path: 'subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n { path: 'subscription.billingStatus.gracePeriodData.startDate' },\n { path: 'subscription.billingStatus.gracePeriodData.endDate' },\n { path: 'subscription.pauseInfo.startDate' },\n { path: 'subscription.pauseInfo.resumeDate' },\n { path: 'subscription.cancellationInfo.cancellationDate' },\n {\n path: 'subscription.specificDatePendingUpdateData.executionDate',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getSubscription;\n}\n\n/**\n * Update subscription's payment method.\n * Supported only for recurring subscriptions or one time subscriptions during free trial.\n */\nexport function updateSubscriptionPaymentMethod(\n payload: object\n): RequestOptionsFactory<any> {\n function __updateSubscriptionPaymentMethod({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.billing.v1.subscription',\n method: 'PATCH' as any,\n methodFqn:\n 'com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.UpdateSubscriptionPaymentMethod',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingSubscriptionsApiV1SubscriptionsServiceUrl({\n protoPath: '/v1/subscriptions/{id}/payment_method',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'subscription.createdDate' },\n { path: 'subscription.updatedDate' },\n { path: 'subscription.startDate' },\n { path: 'subscription.endDate' },\n { path: 'subscription.billingStatus.nextBillingDate' },\n { path: 'subscription.billingStatus.previousBillingDate' },\n {\n path: 'subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n { path: 'subscription.billingStatus.freeTrialData.startDate' },\n { path: 'subscription.billingStatus.freeTrialData.endDate' },\n {\n path: 'subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n { path: 'subscription.billingStatus.gracePeriodData.startDate' },\n { path: 'subscription.billingStatus.gracePeriodData.endDate' },\n { path: 'subscription.pauseInfo.startDate' },\n { path: 'subscription.pauseInfo.resumeDate' },\n { path: 'subscription.cancellationInfo.cancellationDate' },\n {\n path: 'subscription.specificDatePendingUpdateData.executionDate',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateSubscriptionPaymentMethod;\n}\n\n/**\n * Updates the next billing date for a subscription.\n *\n *\n * Updating the billing date may add a proration charge or credit to the next\n * invoice. The customer must pay more in case you extend the current billing\n * cycle. They pay less in case you shorten the current billing cycle. You can\n * choose whether BASS automatically calculates the proration amount based on\n * the number of days added to or removed from the current billing cycle.\n * Alternatively, you can pass a proration amount based on your own custom\n * calculation. The custom proration amount can't exceed the total of the\n * current billing cycle.\n */\nexport function updateSubscriptionBillingDate(\n payload: object\n): RequestOptionsFactory<any> {\n function __updateSubscriptionBillingDate({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'billingDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.billing.v1.subscription',\n method: 'PATCH' as any,\n methodFqn:\n 'com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.UpdateSubscriptionBillingDate',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingSubscriptionsApiV1SubscriptionsServiceUrl({\n protoPath: '/v1/subscriptions/{id}/update-billing-date',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'subscription.createdDate' },\n { path: 'subscription.updatedDate' },\n { path: 'subscription.startDate' },\n { path: 'subscription.endDate' },\n { path: 'subscription.billingStatus.nextBillingDate' },\n { path: 'subscription.billingStatus.previousBillingDate' },\n {\n path: 'subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n { path: 'subscription.billingStatus.freeTrialData.startDate' },\n { path: 'subscription.billingStatus.freeTrialData.endDate' },\n {\n path: 'subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n { path: 'subscription.billingStatus.gracePeriodData.startDate' },\n { path: 'subscription.billingStatus.gracePeriodData.endDate' },\n { path: 'subscription.pauseInfo.startDate' },\n { path: 'subscription.pauseInfo.resumeDate' },\n { path: 'subscription.cancellationInfo.cancellationDate' },\n {\n path: 'subscription.specificDatePendingUpdateData.executionDate',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateSubscriptionBillingDate;\n}\n\n/**\n * Cancels subscription immediately. Can be canceled by member if subscription policy allows it\n * Only PENDING, ACTIVE or PAUSED subscriptions can be canceled\n */\nexport function cancelSubscription(\n payload: object\n): RequestOptionsFactory<any> {\n function __cancelSubscription({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.billing.v1.subscription',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.CancelSubscription',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingSubscriptionsApiV1SubscriptionsServiceUrl({\n protoPath: '/v1/subscriptions/{id}/cancel',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'subscription.createdDate' },\n { path: 'subscription.updatedDate' },\n { path: 'subscription.startDate' },\n { path: 'subscription.endDate' },\n { path: 'subscription.billingStatus.nextBillingDate' },\n { path: 'subscription.billingStatus.previousBillingDate' },\n {\n path: 'subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n { path: 'subscription.billingStatus.freeTrialData.startDate' },\n { path: 'subscription.billingStatus.freeTrialData.endDate' },\n {\n path: 'subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n { path: 'subscription.billingStatus.gracePeriodData.startDate' },\n { path: 'subscription.billingStatus.gracePeriodData.endDate' },\n { path: 'subscription.pauseInfo.startDate' },\n { path: 'subscription.pauseInfo.resumeDate' },\n { path: 'subscription.cancellationInfo.cancellationDate' },\n {\n path: 'subscription.specificDatePendingUpdateData.executionDate',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __cancelSubscription;\n}\n\n/** Pauses subscription now or in future. Possible to pause also payments schedule. */\nexport function pauseSubscription(payload: object): RequestOptionsFactory<any> {\n function __pauseSubscription({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'pauseAtSchedule.specificDate' },\n { path: 'autoResumeAtSchedule.specificDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.billing.v1.subscription',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.PauseSubscription',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingSubscriptionsApiV1SubscriptionsServiceUrl({\n protoPath: '/v1/subscriptions/{id}/pause',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'subscription.createdDate' },\n { path: 'subscription.updatedDate' },\n { path: 'subscription.startDate' },\n { path: 'subscription.endDate' },\n { path: 'subscription.billingStatus.nextBillingDate' },\n { path: 'subscription.billingStatus.previousBillingDate' },\n {\n path: 'subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n { path: 'subscription.billingStatus.freeTrialData.startDate' },\n { path: 'subscription.billingStatus.freeTrialData.endDate' },\n {\n path: 'subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n { path: 'subscription.billingStatus.gracePeriodData.startDate' },\n { path: 'subscription.billingStatus.gracePeriodData.endDate' },\n { path: 'subscription.pauseInfo.startDate' },\n { path: 'subscription.pauseInfo.resumeDate' },\n { path: 'subscription.cancellationInfo.cancellationDate' },\n {\n path: 'subscription.specificDatePendingUpdateData.executionDate',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __pauseSubscription;\n}\n\n/** Resumes paused subscription now or in future. */\nexport function resumeSubscription(\n payload: object\n): RequestOptionsFactory<any> {\n function __resumeSubscription({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'resumeAtSchedule.specificDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.billing.v1.subscription',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.ResumeSubscription',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingSubscriptionsApiV1SubscriptionsServiceUrl({\n protoPath: '/v1/subscriptions/{id}/resume',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'subscription.createdDate' },\n { path: 'subscription.updatedDate' },\n { path: 'subscription.startDate' },\n { path: 'subscription.endDate' },\n { path: 'subscription.billingStatus.nextBillingDate' },\n { path: 'subscription.billingStatus.previousBillingDate' },\n {\n path: 'subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n { path: 'subscription.billingStatus.freeTrialData.startDate' },\n { path: 'subscription.billingStatus.freeTrialData.endDate' },\n {\n path: 'subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n { path: 'subscription.billingStatus.gracePeriodData.startDate' },\n { path: 'subscription.billingStatus.gracePeriodData.endDate' },\n { path: 'subscription.pauseInfo.startDate' },\n { path: 'subscription.pauseInfo.resumeDate' },\n { path: 'subscription.cancellationInfo.cancellationDate' },\n {\n path: 'subscription.specificDatePendingUpdateData.executionDate',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __resumeSubscription;\n}\n\n/**\n * Lists subscriptions based on specified filters.\n * By default non-draft subscriptions returned.\n */\nexport function querySubscriptions(\n payload: object\n): RequestOptionsFactory<any> {\n function __querySubscriptions({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.billing.v1.subscription',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.QuerySubscriptions',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingSubscriptionsApiV1SubscriptionsServiceUrl({\n protoPath: '/v1/subscriptions/query',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'subscriptions.createdDate' },\n { path: 'subscriptions.updatedDate' },\n { path: 'subscriptions.startDate' },\n { path: 'subscriptions.endDate' },\n { path: 'subscriptions.billingStatus.nextBillingDate' },\n { path: 'subscriptions.billingStatus.previousBillingDate' },\n {\n path: 'subscriptions.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n { path: 'subscriptions.billingStatus.freeTrialData.startDate' },\n { path: 'subscriptions.billingStatus.freeTrialData.endDate' },\n {\n path: 'subscriptions.billingStatus.updateBillingDateData.paidUntil',\n },\n { path: 'subscriptions.billingStatus.gracePeriodData.startDate' },\n { path: 'subscriptions.billingStatus.gracePeriodData.endDate' },\n { path: 'subscriptions.pauseInfo.startDate' },\n { path: 'subscriptions.pauseInfo.resumeDate' },\n { path: 'subscriptions.cancellationInfo.cancellationDate' },\n {\n path: 'subscriptions.specificDatePendingUpdateData.executionDate',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __querySubscriptions;\n}\n\nexport function searchSubscriptions(\n payload: object\n): RequestOptionsFactory<any> {\n function __searchSubscriptions({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.billing.v1.subscription',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.SearchSubscriptions',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingSubscriptionsApiV1SubscriptionsServiceUrl({\n protoPath: '/v1/subscriptions/search',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'subscriptions.createdDate' },\n { path: 'subscriptions.updatedDate' },\n { path: 'subscriptions.startDate' },\n { path: 'subscriptions.endDate' },\n { path: 'subscriptions.billingStatus.nextBillingDate' },\n { path: 'subscriptions.billingStatus.previousBillingDate' },\n {\n path: 'subscriptions.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n { path: 'subscriptions.billingStatus.freeTrialData.startDate' },\n { path: 'subscriptions.billingStatus.freeTrialData.endDate' },\n {\n path: 'subscriptions.billingStatus.updateBillingDateData.paidUntil',\n },\n { path: 'subscriptions.billingStatus.gracePeriodData.startDate' },\n { path: 'subscriptions.billingStatus.gracePeriodData.endDate' },\n { path: 'subscriptions.pauseInfo.startDate' },\n { path: 'subscriptions.pauseInfo.resumeDate' },\n { path: 'subscriptions.cancellationInfo.cancellationDate' },\n {\n path: 'subscriptions.specificDatePendingUpdateData.executionDate',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __searchSubscriptions;\n}\n\n/**\n * Counts subscriptions given the provided filters. Returns the total number\n * of subscriptions matching the filters and a count per status.\n *\n *\n * You can either pass a list of statuses or a `statusGroup`, which is a\n * pre-defined combination of statuses.\n *\n * If you don't provide any filters, all subscription statuses with the\n * exception of `\"DRAFT\"` are counted.\n *\n * You may also specify a `customerId` as filter. Then, only subscriptions for\n * this customer are counted. When providing a `customerId`, you must also\n * specify a `paymentMethodId`.\n */\nexport function countSubscriptions(\n payload: object\n): RequestOptionsFactory<any> {\n function __countSubscriptions({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.billing.v1.subscription',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.CountSubscriptions',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingSubscriptionsApiV1SubscriptionsServiceUrl({\n protoPath: '/v1/subscriptions/count',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __countSubscriptions;\n}\n\n/**\n * Turn on auto-renew subscription in case auto-renew was turned off. The operation changes back cycle_auto_renew\n * to true, which will ensure subscription billing will continue. Also cancellation info holding information about\n * auto renew off will be cleared.\n */\nexport function turnOnSubscriptionAutoRenewal(\n payload: object\n): RequestOptionsFactory<any> {\n function __turnOnSubscriptionAutoRenewal({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.billing.v1.subscription',\n method: 'PATCH' as any,\n methodFqn:\n 'com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.TurnOnSubscriptionAutoRenewal',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingSubscriptionsApiV1SubscriptionsServiceUrl({\n protoPath: '/v1/subscriptions/{id}/turn_on_auto_renewal',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'subscription.createdDate' },\n { path: 'subscription.updatedDate' },\n { path: 'subscription.startDate' },\n { path: 'subscription.endDate' },\n { path: 'subscription.billingStatus.nextBillingDate' },\n { path: 'subscription.billingStatus.previousBillingDate' },\n {\n path: 'subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n { path: 'subscription.billingStatus.freeTrialData.startDate' },\n { path: 'subscription.billingStatus.freeTrialData.endDate' },\n {\n path: 'subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n { path: 'subscription.billingStatus.gracePeriodData.startDate' },\n { path: 'subscription.billingStatus.gracePeriodData.endDate' },\n { path: 'subscription.pauseInfo.startDate' },\n { path: 'subscription.pauseInfo.resumeDate' },\n { path: 'subscription.cancellationInfo.cancellationDate' },\n {\n path: 'subscription.specificDatePendingUpdateData.executionDate',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __turnOnSubscriptionAutoRenewal;\n}\n\n/**\n * Turn off auto-renew of subscription. At next billing date subscription will be canceled.\n * Billing settings flag cycle_auto_renew is set to false and information about this operation stored\n * in cancellation info for future usage in cancellation.\n */\nexport function turnOffSubscriptionAutoRenewal(\n payload: object\n): RequestOptionsFactory<any> {\n function __turnOffSubscriptionAutoRenewal({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.billing.v1.subscription',\n method: 'PATCH' as any,\n methodFqn:\n 'com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.TurnOffSubscriptionAutoRenewal',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingSubscriptionsApiV1SubscriptionsServiceUrl({\n protoPath: '/v1/subscriptions/{id}/turn_off_auto_renewal',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'subscription.createdDate' },\n { path: 'subscription.updatedDate' },\n { path: 'subscription.startDate' },\n { path: 'subscription.endDate' },\n { path: 'subscription.billingStatus.nextBillingDate' },\n { path: 'subscription.billingStatus.previousBillingDate' },\n {\n path: 'subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n { path: 'subscription.billingStatus.freeTrialData.startDate' },\n { path: 'subscription.billingStatus.freeTrialData.endDate' },\n {\n path: 'subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n { path: 'subscription.billingStatus.gracePeriodData.startDate' },\n { path: 'subscription.billingStatus.gracePeriodData.endDate' },\n { path: 'subscription.pauseInfo.startDate' },\n { path: 'subscription.pauseInfo.resumeDate' },\n { path: 'subscription.cancellationInfo.cancellationDate' },\n {\n path: 'subscription.specificDatePendingUpdateData.executionDate',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __turnOffSubscriptionAutoRenewal;\n}\n\n/**\n * Marks the last invoice as paid used for the following scenarios:\n * * Offline subscriptions.\n * * Online subscriptions during grace period. The operation will convert invoice to offline, remove grace period\n * and will send BillingCycleStarted event after invoice closing.\n * * Online one time payment subscription with total price of zero during purchase flow.\n * Activated event will be sent after invoice closing and subscription will be activated.\n * @deprecated It has been replaced with com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.MarkInvoiceAsPaid(), and will be removed on 2025-09-30.\n */\nexport function markLatestInvoiceAsPaid(\n payload: object\n): RequestOptionsFactory<any> {\n function __markLatestInvoiceAsPaid({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.billing.v1.subscription',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.MarkLatestInvoiceAsPaid',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingSubscriptionsApiV1SubscriptionsServiceUrl({\n protoPath:\n '/v1/subscriptions/{subscriptionId}/mark-latest-invoice-as-paid',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'subscription.createdDate' },\n { path: 'subscription.updatedDate' },\n { path: 'subscription.startDate' },\n { path: 'subscription.endDate' },\n { path: 'subscription.billingStatus.nextBillingDate' },\n { path: 'subscription.billingStatus.previousBillingDate' },\n {\n path: 'subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n { path: 'subscription.billingStatus.freeTrialData.startDate' },\n { path: 'subscription.billingStatus.freeTrialData.endDate' },\n {\n path: 'subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n { path: 'subscription.billingStatus.gracePeriodData.startDate' },\n { path: 'subscription.billingStatus.gracePeriodData.endDate' },\n { path: 'subscription.pauseInfo.startDate' },\n { path: 'subscription.pauseInfo.resumeDate' },\n { path: 'subscription.cancellationInfo.cancellationDate' },\n {\n path: 'subscription.specificDatePendingUpdateData.executionDate',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __markLatestInvoiceAsPaid;\n}\n\n/**\n * Marks the invoice associated with given subscription cycle as paid for the following scenarios:\n * If `paid_cycle` is left empty, the most recent invoice will be marked as paid.\n * If the invoice contains items other than subscription items, an error will be thrown.\n *\n * Marks the invoice as paid for the following scenarios:\n * 1. Offline subscriptions.\n * 2. Online subscriptions during the grace period.\n * This operation will convert the invoice to offline, remove the grace period,\n * and send a BillingCycleStarted event after the invoice is closed.\n * 3. Online one-time payment subscriptions with a total price of zero during the purchase flow.\n * An Activated event will be sent after the invoice is closed, and the subscription will be activated.\n * 4. For external subscriptions, where the payment occurs outside of BASS, an invoice is created and marked as paid\n */\nexport function markBillingCycleAsPaid(\n payload: object\n): RequestOptionsFactory<any> {\n function __markBillingCycleAsPaid({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.billing.v1.subscription',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.MarkBillingCycleAsPaid',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingSubscriptionsApiV1SubscriptionsServiceUrl({\n protoPath: '/v1/subscriptions/{subscriptionId}/mark-cycle-as-paid',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'subscription.createdDate' },\n { path: 'subscription.updatedDate' },\n { path: 'subscription.startDate' },\n { path: 'subscription.endDate' },\n { path: 'subscription.billingStatus.nextBillingDate' },\n { path: 'subscription.billingStatus.previousBillingDate' },\n {\n path: 'subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n { path: 'subscription.billingStatus.freeTrialData.startDate' },\n { path: 'subscription.billingStatus.freeTrialData.endDate' },\n {\n path: 'subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n { path: 'subscription.billingStatus.gracePeriodData.startDate' },\n { path: 'subscription.billingStatus.gracePeriodData.endDate' },\n { path: 'subscription.pauseInfo.startDate' },\n { path: 'subscription.pauseInfo.resumeDate' },\n { path: 'subscription.cancellationInfo.cancellationDate' },\n {\n path: 'subscription.specificDatePendingUpdateData.executionDate',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __markBillingCycleAsPaid;\n}\n\n/** Returns number of subscriptions in each state. */\nexport function getSubscriptionsStats(\n payload: object\n): RequestOptionsFactory<any> {\n function __getSubscriptionsStats({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.billing.v1.subscription',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.GetSubscriptionsStats',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingSubscriptionsApiV1SubscriptionsServiceUrl({\n protoPath: '/v1/subscriptions/stats',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __getSubscriptionsStats;\n}\n\n/** Extends subscription by moving end date with or without billing cycles addition. */\nexport function extendSubscription(\n payload: object\n): RequestOptionsFactory<any> {\n function __extendSubscription({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.billing.v1.subscription',\n method: 'PATCH' as any,\n methodFqn:\n 'com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.ExtendSubscription',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingSubscriptionsApiV1SubscriptionsServiceUrl({\n protoPath: '/v1/subscriptions/{id}/extend',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'subscription.createdDate' },\n { path: 'subscription.updatedDate' },\n { path: 'subscription.startDate' },\n { path: 'subscription.endDate' },\n { path: 'subscription.billingStatus.nextBillingDate' },\n { path: 'subscription.billingStatus.previousBillingDate' },\n {\n path: 'subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n { path: 'subscription.billingStatus.freeTrialData.startDate' },\n { path: 'subscription.billingStatus.freeTrialData.endDate' },\n {\n path: 'subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n { path: 'subscription.billingStatus.gracePeriodData.startDate' },\n { path: 'subscription.billingStatus.gracePeriodData.endDate' },\n { path: 'subscription.pauseInfo.startDate' },\n { path: 'subscription.pauseInfo.resumeDate' },\n { path: 'subscription.cancellationInfo.cancellationDate' },\n {\n path: 'subscription.specificDatePendingUpdateData.executionDate',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __extendSubscription;\n}\n\nexport function allowedActions(payload: object): RequestOptionsFactory<any> {\n function __allowedActions({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.billing.v1.subscription',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.AllowedActions',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingSubscriptionsApiV1SubscriptionsServiceUrl({\n protoPath: '/v1/subscriptions/{id}/allowed_actions',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __allowedActions;\n}\n\n/** List future subscriptions charges */\nexport function listUpcomingCharges(\n payload: object\n): RequestOptionsFactory<any> {\n function __listUpcomingCharges({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'nextBillingDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.billing.v1.subscription',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.ListUpcomingCharges',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingSubscriptionsApiV1SubscriptionsServiceUrl({\n protoPath: '/v1/subscriptions/{subscriptionId}/upcoming_charges',\n data: serializedData,\n host,\n }),\n params: toURLSearchParams(serializedData),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'upcomingCharges.billingDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listUpcomingCharges;\n}\n\n/**\n * Retrieves the preview of subscription charges.\n * Returns all the charges applicable to a subscription based on the provided subscription information.\n * @deprecated It has been replaced with com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.PreviewSubscriptionsCharges(), and will be removed on 2025-06-30.\n */\nexport function previewSubscriptionCharges(\n payload: object\n): RequestOptionsFactory<any> {\n function __previewSubscriptionCharges({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'subscriptionInfo.startDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.billing.v1.subscription',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.PreviewSubscriptionCharges',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingSubscriptionsApiV1SubscriptionsServiceUrl({\n protoPath: '/v1/subscriptions/preview_charges',\n data: serializedData,\n host,\n }),\n params: toURLSearchParams(serializedData, true),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'charges.cycleBillingDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __previewSubscriptionCharges;\n}\n\n/**\n * Retrieves the preview of subscription charges for a bulk of subscriptions.\n * Returns all the charges applicable to all subscriptions, based on the provided subscriptions information.\n */\nexport function previewSubscriptionsCharges(\n payload: object\n): RequestOptionsFactory<any> {\n function __previewSubscriptionsCharges({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'subscriptionsBillingDetails.startDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.billing.v1.subscription',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.PreviewSubscriptionsCharges',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingSubscriptionsApiV1SubscriptionsServiceUrl({\n protoPath: '/v1/subscriptions/preview-subscriptions-charges',\n data: serializedData,\n host,\n }),\n params: toURLSearchParams(serializedData, true),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'subscriptionsCharges.charges.cycleBillingDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __previewSubscriptionsCharges;\n}\n\n/** Creates authorization invoice with Moto settings in order to create */\nexport function initiatePaymentMethodSetup(\n payload: object\n): RequestOptionsFactory<any> {\n function __initiatePaymentMethodSetup({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.billing.v1.subscription',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.InitiatePaymentMethodSetup',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingSubscriptionsApiV1SubscriptionsServiceUrl({\n protoPath: '/v1/subscriptions/{id}/payment_method_setup',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __initiatePaymentMethodSetup;\n}\n\nexport function listSubscriptionHistory(\n payload: object\n): RequestOptionsFactory<any> {\n function __listSubscriptionHistory({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.billing.v1.subscription',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.billing.subscriptions.api.v1.SubscriptionHistoryService.ListSubscriptionHistory',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingSubscriptionsApiV1SubscriptionHistoryServiceUrl(\n {\n protoPath: '/v1/subscriptions/{subscriptionId}/history',\n data: payload,\n host,\n }\n ),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'historyEntries.entryTime' },\n { path: 'historyEntries.event.created.subscription.createdDate' },\n { path: 'historyEntries.event.created.subscription.updatedDate' },\n { path: 'historyEntries.event.created.subscription.startDate' },\n { path: 'historyEntries.event.created.subscription.endDate' },\n {\n path: 'historyEntries.event.created.subscription.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.created.subscription.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.created.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.created.subscription.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.created.subscription.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.created.subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.created.subscription.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.created.subscription.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.created.subscription.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.created.subscription.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.created.subscription.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.created.subscription.specificDatePendingUpdateData.executionDate',\n },\n { path: 'historyEntries.event.updated.current.createdDate' },\n { path: 'historyEntries.event.updated.current.updatedDate' },\n { path: 'historyEntries.event.updated.current.startDate' },\n { path: 'historyEntries.event.updated.current.endDate' },\n {\n path: 'historyEntries.event.updated.current.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.updated.current.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.updated.current.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.updated.current.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.updated.current.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.updated.current.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.updated.current.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.updated.current.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.updated.current.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.updated.current.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.updated.current.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.updated.current.specificDatePendingUpdateData.executionDate',\n },\n { path: 'historyEntries.event.updated.previous.createdDate' },\n { path: 'historyEntries.event.updated.previous.updatedDate' },\n { path: 'historyEntries.event.updated.previous.startDate' },\n { path: 'historyEntries.event.updated.previous.endDate' },\n {\n path: 'historyEntries.event.updated.previous.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.updated.previous.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.updated.previous.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.updated.previous.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.updated.previous.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.updated.previous.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.updated.previous.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.updated.previous.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.updated.previous.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.updated.previous.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.updated.previous.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.updated.previous.specificDatePendingUpdateData.executionDate',\n },\n {\n path: 'historyEntries.event.activated.subscription.createdDate',\n },\n {\n path: 'historyEntries.event.activated.subscription.updatedDate',\n },\n { path: 'historyEntries.event.activated.subscription.startDate' },\n { path: 'historyEntries.event.activated.subscription.endDate' },\n {\n path: 'historyEntries.event.activated.subscription.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.activated.subscription.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.activated.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.activated.subscription.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.activated.subscription.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.activated.subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.activated.subscription.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.activated.subscription.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.activated.subscription.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.activated.subscription.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.activated.subscription.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.activated.subscription.specificDatePendingUpdateData.executionDate',\n },\n { path: 'historyEntries.event.ended.subscription.createdDate' },\n { path: 'historyEntries.event.ended.subscription.updatedDate' },\n { path: 'historyEntries.event.ended.subscription.startDate' },\n { path: 'historyEntries.event.ended.subscription.endDate' },\n {\n path: 'historyEntries.event.ended.subscription.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.ended.subscription.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.ended.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.ended.subscription.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.ended.subscription.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.ended.subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.ended.subscription.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.ended.subscription.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.ended.subscription.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.ended.subscription.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.ended.subscription.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.ended.subscription.specificDatePendingUpdateData.executionDate',\n },\n {\n path: 'historyEntries.event.canceled.subscription.createdDate',\n },\n {\n path: 'historyEntries.event.canceled.subscription.updatedDate',\n },\n { path: 'historyEntries.event.canceled.subscription.startDate' },\n { path: 'historyEntries.event.canceled.subscription.endDate' },\n {\n path: 'historyEntries.event.canceled.subscription.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.canceled.subscription.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.canceled.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.canceled.subscription.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.canceled.subscription.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.canceled.subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.canceled.subscription.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.canceled.subscription.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.canceled.subscription.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.canceled.subscription.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.canceled.subscription.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.canceled.subscription.specificDatePendingUpdateData.executionDate',\n },\n { path: 'historyEntries.event.paused.subscription.createdDate' },\n { path: 'historyEntries.event.paused.subscription.updatedDate' },\n { path: 'historyEntries.event.paused.subscription.startDate' },\n { path: 'historyEntries.event.paused.subscription.endDate' },\n {\n path: 'historyEntries.event.paused.subscription.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.paused.subscription.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.paused.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.paused.subscription.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.paused.subscription.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.paused.subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.paused.subscription.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.paused.subscription.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.paused.subscription.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.paused.subscription.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.paused.subscription.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.paused.subscription.specificDatePendingUpdateData.executionDate',\n },\n { path: 'historyEntries.event.resumed.subscription.createdDate' },\n { path: 'historyEntries.event.resumed.subscription.updatedDate' },\n { path: 'historyEntries.event.resumed.subscription.startDate' },\n { path: 'historyEntries.event.resumed.subscription.endDate' },\n {\n path: 'historyEntries.event.resumed.subscription.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.resumed.subscription.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.resumed.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.resumed.subscription.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.resumed.subscription.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.resumed.subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.resumed.subscription.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.resumed.subscription.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.resumed.subscription.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.resumed.subscription.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.resumed.subscription.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.resumed.subscription.specificDatePendingUpdateData.executionDate',\n },\n {\n path: 'historyEntries.event.pauseRequested.subscription.createdDate',\n },\n {\n path: 'historyEntries.event.pauseRequested.subscription.updatedDate',\n },\n {\n path: 'historyEntries.event.pauseRequested.subscription.startDate',\n },\n {\n path: 'historyEntries.event.pauseRequested.subscription.endDate',\n },\n {\n path: 'historyEntries.event.pauseRequested.subscription.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.pauseRequested.subscription.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.pauseRequested.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.pauseRequested.subscription.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.pauseRequested.subscription.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.pauseRequested.subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.pauseRequested.subscription.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.pauseRequested.subscription.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.pauseRequested.subscription.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.pauseRequested.subscription.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.pauseRequested.subscription.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.pauseRequested.subscription.specificDatePendingUpdateData.executionDate',\n },\n {\n path: 'historyEntries.event.resumeRequested.subscription.createdDate',\n },\n {\n path: 'historyEntries.event.resumeRequested.subscription.updatedDate',\n },\n {\n path: 'historyEntries.event.resumeRequested.subscription.startDate',\n },\n {\n path: 'historyEntries.event.resumeRequested.subscription.endDate',\n },\n {\n path: 'historyEntries.event.resumeRequested.subscription.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.resumeRequested.subscription.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.resumeRequested.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.resumeRequested.subscription.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.resumeRequested.subscription.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.resumeRequested.subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.resumeRequested.subscription.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.resumeRequested.subscription.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.resumeRequested.subscription.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.resumeRequested.subscription.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.resumeRequested.subscription.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.resumeRequested.subscription.specificDatePendingUpdateData.executionDate',\n },\n {\n path: 'historyEntries.event.scheduledPauseCanceled.subscription.createdDate',\n },\n {\n path: 'historyEntries.event.scheduledPauseCanceled.subscription.updatedDate',\n },\n {\n path: 'historyEntries.event.scheduledPauseCanceled.subscription.startDate',\n },\n {\n path: 'historyEntries.event.scheduledPauseCanceled.subscription.endDate',\n },\n {\n path: 'historyEntries.event.scheduledPauseCanceled.subscription.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.scheduledPauseCanceled.subscription.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.scheduledPauseCanceled.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.scheduledPauseCanceled.subscription.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.scheduledPauseCanceled.subscription.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.scheduledPauseCanceled.subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.scheduledPauseCanceled.subscription.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.scheduledPauseCanceled.subscription.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.scheduledPauseCanceled.subscription.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.scheduledPauseCanceled.subscription.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.scheduledPauseCanceled.subscription.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.scheduledPauseCanceled.subscription.specificDatePendingUpdateData.executionDate',\n },\n {\n path: 'historyEntries.event.scheduledResumeCanceled.subscription.createdDate',\n },\n {\n path: 'historyEntries.event.scheduledResumeCanceled.subscription.updatedDate',\n },\n {\n path: 'historyEntries.event.scheduledResumeCanceled.subscription.startDate',\n },\n {\n path: 'historyEntries.event.scheduledResumeCanceled.subscription.endDate',\n },\n {\n path: 'historyEntries.event.scheduledResumeCanceled.subscription.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.scheduledResumeCanceled.subscription.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.scheduledResumeCanceled.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.scheduledResumeCanceled.subscription.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.scheduledResumeCanceled.subscription.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.scheduledResumeCanceled.subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.scheduledResumeCanceled.subscription.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.scheduledResumeCanceled.subscription.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.scheduledResumeCanceled.subscription.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.scheduledResumeCanceled.subscription.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.scheduledResumeCanceled.subscription.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.scheduledResumeCanceled.subscription.specificDatePendingUpdateData.executionDate',\n },\n {\n path: 'historyEntries.event.billingCycleStarted.subscription.createdDate',\n },\n {\n path: 'historyEntries.event.billingCycleStarted.subscription.updatedDate',\n },\n {\n path: 'historyEntries.event.billingCycleStarted.subscription.startDate',\n },\n {\n path: 'historyEntries.event.billingCycleStarted.subscription.endDate',\n },\n {\n path: 'historyEntries.event.billingCycleStarted.subscription.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.billingCycleStarted.subscription.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.billingCycleStarted.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.billingCycleStarted.subscription.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.billingCycleStarted.subscription.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.billingCycleStarted.subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.billingCycleStarted.subscription.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.billingCycleStarted.subscription.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.billingCycleStarted.subscription.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.billingCycleStarted.subscription.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.billingCycleStarted.subscription.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.billingCycleStarted.subscription.specificDatePendingUpdateData.executionDate',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOn.subscription.createdDate',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOn.subscription.updatedDate',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOn.subscription.startDate',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOn.subscription.endDate',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOn.subscription.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOn.subscription.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOn.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOn.subscription.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOn.subscription.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOn.subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOn.subscription.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOn.subscription.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOn.subscription.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOn.subscription.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOn.subscription.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOn.subscription.specificDatePendingUpdateData.executionDate',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOff.subscription.createdDate',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOff.subscription.updatedDate',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOff.subscription.startDate',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOff.subscription.endDate',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOff.subscription.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOff.subscription.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOff.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOff.subscription.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOff.subscription.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOff.subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOff.subscription.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOff.subscription.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOff.subscription.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOff.subscription.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOff.subscription.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOff.subscription.specificDatePendingUpdateData.executionDate',\n },\n {\n path: 'historyEntries.event.cycleReadyToPay.subscription.createdDate',\n },\n {\n path: 'historyEntries.event.cycleReadyToPay.subscription.updatedDate',\n },\n {\n path: 'historyEntries.event.cycleReadyToPay.subscription.startDate',\n },\n {\n path: 'historyEntries.event.cycleReadyToPay.subscription.endDate',\n },\n {\n path: 'historyEntries.event.cycleReadyToPay.subscription.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.cycleReadyToPay.subscription.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.cycleReadyToPay.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.cycleReadyToPay.subscription.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.cycleReadyToPay.subscription.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.cycleReadyToPay.subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.cycleReadyToPay.subscription.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.cycleReadyToPay.subscription.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.cycleReadyToPay.subscription.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.cycleReadyToPay.subscription.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.cycleReadyToPay.subscription.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.cycleReadyToPay.subscription.specificDatePendingUpdateData.executionDate',\n },\n {\n path: 'historyEntries.event.extended.subscription.createdDate',\n },\n {\n path: 'historyEntries.event.extended.subscription.updatedDate',\n },\n { path: 'historyEntries.event.extended.subscription.startDate' },\n { path: 'historyEntries.event.extended.subscription.endDate' },\n {\n path: 'historyEntries.event.extended.subscription.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.extended.subscription.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.extended.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.extended.subscription.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.extended.subscription.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.extended.subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.extended.subscription.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.extended.subscription.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.extended.subscription.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.extended.subscription.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.extended.subscription.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.extended.subscription.specificDatePendingUpdateData.executionDate',\n },\n {\n path: 'historyEntries.event.initialPurchaseCompleted.subscription.createdDate',\n },\n {\n path: 'historyEntries.event.initialPurchaseCompleted.subscription.updatedDate',\n },\n {\n path: 'historyEntries.event.initialPurchaseCompleted.subscription.startDate',\n },\n {\n path: 'historyEntries.event.initialPurchaseCompleted.subscription.endDate',\n },\n {\n path: 'historyEntries.event.initialPurchaseCompleted.subscription.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.initialPurchaseCompleted.subscription.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.initialPurchaseCompleted.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.initialPurchaseCompleted.subscription.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.initialPurchaseCompleted.subscription.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.initialPurchaseCompleted.subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.initialPurchaseCompleted.subscription.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.initialPurchaseCompleted.subscription.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.initialPurchaseCompleted.subscription.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.initialPurchaseCompleted.subscription.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.initialPurchaseCompleted.subscription.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.initialPurchaseCompleted.subscription.specificDatePendingUpdateData.executionDate',\n },\n {\n path: 'historyEntries.event.latestInvoiceMarkedAsPaid.subscription.createdDate',\n },\n {\n path: 'historyEntries.event.latestInvoiceMarkedAsPaid.subscription.updatedDate',\n },\n {\n path: 'historyEntries.event.latestInvoiceMarkedAsPaid.subscription.startDate',\n },\n {\n path: 'historyEntries.event.latestInvoiceMarkedAsPaid.subscription.endDate',\n },\n {\n path: 'historyEntries.event.latestInvoiceMarkedAsPaid.subscription.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.latestInvoiceMarkedAsPaid.subscription.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.latestInvoiceMarkedAsPaid.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.latestInvoiceMarkedAsPaid.subscription.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.latestInvoiceMarkedAsPaid.subscription.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.latestInvoiceMarkedAsPaid.subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.latestInvoiceMarkedAsPaid.subscription.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.latestInvoiceMarkedAsPaid.subscription.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.latestInvoiceMarkedAsPaid.subscription.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.latestInvoiceMarkedAsPaid.subscription.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.latestInvoiceMarkedAsPaid.subscription.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.latestInvoiceMarkedAsPaid.subscription.specificDatePendingUpdateData.executionDate',\n },\n { path: 'historyEntries.event.revived.subscription.createdDate' },\n { path: 'historyEntries.event.revived.subscription.updatedDate' },\n { path: 'historyEntries.event.revived.subscription.startDate' },\n { path: 'historyEntries.event.revived.subscription.endDate' },\n {\n path: 'historyEntries.event.revived.subscription.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.revived.subscription.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.revived.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.revived.subscription.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.revived.subscription.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.revived.subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.revived.subscription.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.revived.subscription.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.revived.subscription.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.revived.subscription.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.revived.subscription.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.revived.subscription.specificDatePendingUpdateData.executionDate',\n },\n { path: 'historyEntries.event.billingDateUpdated.billingDate' },\n {\n path: 'historyEntries.event.billingDateUpdated.subscription.createdDate',\n },\n {\n path: 'historyEntries.event.billingDateUpdated.subscription.updatedDate',\n },\n {\n path: 'historyEntries.event.billingDateUpdated.subscription.startDate',\n },\n {\n path: 'historyEntries.event.billingDateUpdated.subscription.endDate',\n },\n {\n path: 'historyEntries.event.billingDateUpdated.subscription.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.billingDateUpdated.subscription.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.billingDateUpdated.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.billingDateUpdated.subscription.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.billingDateUpdated.subscription.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.billingDateUpdated.subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.billingDateUpdated.subscription.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.billingDateUpdated.subscription.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.billingDateUpdated.subscription.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.billingDateUpdated.subscription.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.billingDateUpdated.subscription.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.billingDateUpdated.subscription.specificDatePendingUpdateData.executionDate',\n },\n {\n path: 'historyEntries.event.futureUpdatesRequested.subscription.createdDate',\n },\n {\n path: 'historyEntries.event.futureUpdatesRequested.subscription.updatedDate',\n },\n {\n path: 'historyEntries.event.futureUpdatesRequested.subscription.startDate',\n },\n {\n path: 'historyEntries.event.futureUpdatesRequested.subscription.endDate',\n },\n {\n path: 'historyEntries.event.futureUpdatesRequested.subscription.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.futureUpdatesRequested.subscription.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.futureUpdatesRequested.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.futureUpdatesRequested.subscription.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.futureUpdatesRequested.subscription.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.futureUpdatesRequested.subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.futureUpdatesRequested.subscription.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.futureUpdatesRequested.subscription.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.futureUpdatesRequested.subscription.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.futureUpdatesRequested.subscription.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.futureUpdatesRequested.subscription.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.futureUpdatesRequested.subscription.specificDatePendingUpdateData.executionDate',\n },\n {\n path: 'historyEntries.event.updatesApplied.subscription.createdDate',\n },\n {\n path: 'historyEntries.event.updatesApplied.subscription.updatedDate',\n },\n {\n path: 'historyEntries.event.updatesApplied.subscription.startDate',\n },\n {\n path: 'historyEntries.event.updatesApplied.subscription.endDate',\n },\n {\n path: 'historyEntries.event.updatesApplied.subscription.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.updatesApplied.subscription.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.updatesApplied.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.updatesApplied.subscription.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.updatesApplied.subscription.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.updatesApplied.subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.updatesApplied.subscription.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.updatesApplied.subscription.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.updatesApplied.subscription.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.updatesApplied.subscription.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.updatesApplied.subscription.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.updatesApplied.subscription.specificDatePendingUpdateData.executionDate',\n },\n {\n path: 'historyEntries.event.resetPendingUpdates.subscription.createdDate',\n },\n {\n path: 'historyEntries.event.resetPendingUpdates.subscription.updatedDate',\n },\n {\n path: 'historyEntries.event.resetPendingUpdates.subscription.startDate',\n },\n {\n path: 'historyEntries.event.resetPendingUpdates.subscription.endDate',\n },\n {\n path: 'historyEntries.event.resetPendingUpdates.subscription.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.resetPendingUpdates.subscription.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.resetPendingUpdates.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.resetPendingUpdates.subscription.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.resetPendingUpdates.subscription.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.resetPendingUpdates.subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.resetPendingUpdates.subscription.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.resetPendingUpdates.subscription.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.resetPendingUpdates.subscription.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.resetPendingUpdates.subscription.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.resetPendingUpdates.subscription.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.resetPendingUpdates.subscription.specificDatePendingUpdateData.executionDate',\n },\n {\n path: 'historyEntries.event.gracePeriodStarted.subscription.createdDate',\n },\n {\n path: 'historyEntries.event.gracePeriodStarted.subscription.updatedDate',\n },\n {\n path: 'historyEntries.event.gracePeriodStarted.subscription.startDate',\n },\n {\n path: 'historyEntries.event.gracePeriodStarted.subscription.endDate',\n },\n {\n path: 'historyEntries.event.gracePeriodStarted.subscription.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.gracePeriodStarted.subscription.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.gracePeriodStarted.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.gracePeriodStarted.subscription.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.gracePeriodStarted.subscription.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.gracePeriodStarted.subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.gracePeriodStarted.subscription.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.gracePeriodStarted.subscription.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.gracePeriodStarted.subscription.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.gracePeriodStarted.subscription.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.gracePeriodStarted.subscription.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.gracePeriodStarted.subscription.specificDatePendingUpdateData.executionDate',\n },\n {\n path: 'historyEntries.event.gracePeriodEnded.subscription.createdDate',\n },\n {\n path: 'historyEntries.event.gracePeriodEnded.subscription.updatedDate',\n },\n {\n path: 'historyEntries.event.gracePeriodEnded.subscription.startDate',\n },\n {\n path: 'historyEntries.event.gracePeriodEnded.subscription.endDate',\n },\n {\n path: 'historyEntries.event.gracePeriodEnded.subscription.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.gracePeriodEnded.subscription.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.gracePeriodEnded.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.gracePeriodEnded.subscription.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.gracePeriodEnded.subscription.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.gracePeriodEnded.subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.gracePeriodEnded.subscription.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.gracePeriodEnded.subscription.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.gracePeriodEnded.subscription.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.gracePeriodEnded.subscription.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.gracePeriodEnded.subscription.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.gracePeriodEnded.subscription.specificDatePendingUpdateData.executionDate',\n },\n {\n path: 'historyEntries.event.paymentMethodUpdated.subscription.createdDate',\n },\n {\n path: 'historyEntries.event.paymentMethodUpdated.subscription.updatedDate',\n },\n {\n path: 'historyEntries.event.paymentMethodUpdated.subscription.startDate',\n },\n {\n path: 'historyEntries.event.paymentMethodUpdated.subscription.endDate',\n },\n {\n path: 'historyEntries.event.paymentMethodUpdated.subscription.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.paymentMethodUpdated.subscription.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.paymentMethodUpdated.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.paymentMethodUpdated.subscription.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.paymentMethodUpdated.subscription.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.paymentMethodUpdated.subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.paymentMethodUpdated.subscription.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.paymentMethodUpdated.subscription.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.paymentMethodUpdated.subscription.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.paymentMethodUpdated.subscription.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.paymentMethodUpdated.subscription.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.paymentMethodUpdated.subscription.specificDatePendingUpdateData.executionDate',\n },\n {\n path: 'historyEntries.event.collectionMethodUpdated.subscription.createdDate',\n },\n {\n path: 'historyEntries.event.collectionMethodUpdated.subscription.updatedDate',\n },\n {\n path: 'historyEntries.event.collectionMethodUpdated.subscription.startDate',\n },\n {\n path: 'historyEntries.event.collectionMethodUpdated.subscription.endDate',\n },\n {\n path: 'historyEntries.event.collectionMethodUpdated.subscription.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.collectionMethodUpdated.subscription.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.collectionMethodUpdated.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.collectionMethodUpdated.subscription.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.collectionMethodUpdated.subscription.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.collectionMethodUpdated.subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.collectionMethodUpdated.subscription.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.collectionMethodUpdated.subscription.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.collectionMethodUpdated.subscription.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.collectionMethodUpdated.subscription.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.collectionMethodUpdated.subscription.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.collectionMethodUpdated.subscription.specificDatePendingUpdateData.executionDate',\n },\n {\n path: 'historyEntries.event.freeTrailStarted.subscription.createdDate',\n },\n {\n path: 'historyEntries.event.freeTrailStarted.subscription.updatedDate',\n },\n {\n path: 'historyEntries.event.freeTrailStarted.subscription.startDate',\n },\n {\n path: 'historyEntries.event.freeTrailStarted.subscription.endDate',\n },\n {\n path: 'historyEntries.event.freeTrailStarted.subscription.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.freeTrailStarted.subscription.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.freeTrailStarted.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.freeTrailStarted.subscription.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.freeTrailStarted.subscription.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.freeTrailStarted.subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.freeTrailStarted.subscription.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.freeTrailStarted.subscription.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.freeTrailStarted.subscription.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.freeTrailStarted.subscription.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.freeTrailStarted.subscription.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.freeTrailStarted.subscription.specificDatePendingUpdateData.executionDate',\n },\n {\n path: 'historyEntries.event.freeTrailEnded.subscription.createdDate',\n },\n {\n path: 'historyEntries.event.freeTrailEnded.subscription.updatedDate',\n },\n {\n path: 'historyEntries.event.freeTrailEnded.subscription.startDate',\n },\n {\n path: 'historyEntries.event.freeTrailEnded.subscription.endDate',\n },\n {\n path: 'historyEntries.event.freeTrailEnded.subscription.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.freeTrailEnded.subscription.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.freeTrailEnded.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.freeTrailEnded.subscription.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.freeTrailEnded.subscription.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.freeTrailEnded.subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.freeTrailEnded.subscription.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.freeTrailEnded.subscription.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.freeTrailEnded.subscription.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.freeTrailEnded.subscription.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.freeTrailEnded.subscription.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.freeTrailEnded.subscription.specificDatePendingUpdateData.executionDate',\n },\n {\n path: 'historyEntries.event.billingCyclePaid.subscription.createdDate',\n },\n {\n path: 'historyEntries.event.billingCyclePaid.subscription.updatedDate',\n },\n {\n path: 'historyEntries.event.billingCyclePaid.subscription.startDate',\n },\n {\n path: 'historyEntries.event.billingCyclePaid.subscription.endDate',\n },\n {\n path: 'historyEntries.event.billingCyclePaid.subscription.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.billingCyclePaid.subscription.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.billingCyclePaid.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.billingCyclePaid.subscription.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.billingCyclePaid.subscription.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.billingCyclePaid.subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.billingCyclePaid.subscription.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.billingCyclePaid.subscription.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.billingCyclePaid.subscription.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.billingCyclePaid.subscription.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.billingCyclePaid.subscription.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.billingCyclePaid.subscription.specificDatePendingUpdateData.executionDate',\n },\n {\n path: 'historyEntries.event.initiatePaymentMethodSetup.subscription.createdDate',\n },\n {\n path: 'historyEntries.event.initiatePaymentMethodSetup.subscription.updatedDate',\n },\n {\n path: 'historyEntries.event.initiatePaymentMethodSetup.subscription.startDate',\n },\n {\n path: 'historyEntries.event.initiatePaymentMethodSetup.subscription.endDate',\n },\n {\n path: 'historyEntries.event.initiatePaymentMethodSetup.subscription.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.initiatePaymentMethodSetup.subscription.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.initiatePaymentMethodSetup.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.initiatePaymentMethodSetup.subscription.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.initiatePaymentMethodSetup.subscription.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.initiatePaymentMethodSetup.subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.initiatePaymentMethodSetup.subscription.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.initiatePaymentMethodSetup.subscription.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.initiatePaymentMethodSetup.subscription.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.initiatePaymentMethodSetup.subscription.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.initiatePaymentMethodSetup.subscription.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.initiatePaymentMethodSetup.subscription.specificDatePendingUpdateData.executionDate',\n },\n {\n path: 'historyEntries.event.futurePriceUpdatesRequested.subscription.createdDate',\n },\n {\n path: 'historyEntries.event.futurePriceUpdatesRequested.subscription.updatedDate',\n },\n {\n path: 'historyEntries.event.futurePriceUpdatesRequested.subscription.startDate',\n },\n {\n path: 'historyEntries.event.futurePriceUpdatesRequested.subscription.endDate',\n },\n {\n path: 'historyEntries.event.futurePriceUpdatesRequested.subscription.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.futurePriceUpdatesRequested.subscription.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.futurePriceUpdatesRequested.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.futurePriceUpdatesRequested.subscription.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.futurePriceUpdatesRequested.subscription.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.futurePriceUpdatesRequested.subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.futurePriceUpdatesRequested.subscription.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.futurePriceUpdatesRequested.subscription.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.futurePriceUpdatesRequested.subscription.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.futurePriceUpdatesRequested.subscription.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.futurePriceUpdatesRequested.subscription.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.futurePriceUpdatesRequested.subscription.specificDatePendingUpdateData.executionDate',\n },\n {\n path: 'historyEntries.event.subscriptionBoAction.subscription.createdDate',\n },\n {\n path: 'historyEntries.event.subscriptionBoAction.subscription.updatedDate',\n },\n {\n path: 'historyEntries.event.subscriptionBoAction.subscription.startDate',\n },\n {\n path: 'historyEntries.event.subscriptionBoAction.subscription.endDate',\n },\n {\n path: 'historyEntries.event.subscriptionBoAction.subscription.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.subscriptionBoAction.subscription.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.subscriptionBoAction.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.subscriptionBoAction.subscription.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.subscriptionBoAction.subscription.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.subscriptionBoAction.subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.subscriptionBoAction.subscription.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.subscriptionBoAction.subscription.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.subscriptionBoAction.subscription.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.subscriptionBoAction.subscription.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.subscriptionBoAction.subscription.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.subscriptionBoAction.subscription.specificDatePendingUpdateData.executionDate',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listSubscriptionHistory;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAAAA;AAAA,EAAA,0BAAAC;AAAA,EAAA,0BAAAC;AAAA,EAAA,8BAAAC;AAAA,EAAA,kCAAAC;AAAA,EAAA,kCAAAC;AAAA,EAAA,+BAAAC;AAAA,EAAA,0CAAAC;AAAA,EAAA,mCAAAC;AAAA,EAAA,kCAAAC;AAAA,EAAA,8CAAAC;AAAA,EAAA,6CAAAC;AAAA,EAAA,+CAAAC;AAAA,EAAA,0BAAAC;AAAA,EAAA,uBAAAC;AAAA,EAAA,6BAAAC;AAAA,EAAA,kCAAAC;AAAA,EAAA,+BAAAC;AAAA,EAAA,2BAAAC;AAAA,EAAA,8BAAAC;AAAA,EAAA,+BAAAC;AAAA,EAAA,yBAAAC;AAAA,EAAA,gBAAAC;AAAA,EAA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ACA;AAAA,cACE,MAAM;AAAA,YACR;AAAA,YACA;AAAA,cACE,MAAM;AAAA,YACR;AAAA,YACA;AAAA,cACE,MAAM;AAAA,YACR;AAAA,YACA;AAAA,cACE,MAAM;AAAA,YACR;AAAA,YACA;AAAA,cACE,MAAM;AAAA,YACR;AAAA,YACA;AAAA,cACE,MAAM;AAAA,YACR;AAAA,YACA;AAAA,cACE,MAAM;AAAA,YACR;AAAA,YACA;AAAA,cACE,MAAM;AAAA,YACR;AAAA,YACA;AAAA,cACE,MAAM;AAAA,YACR;AAAA,YACA;AAAA,cACE,MAAM;AAAA,YACR;AAAA,YACA;AAAA,cACE,MAAM;AAAA,YACR;AAAA,YACA;AAAA,cACE,MAAM;AAAA,YACR;AAAA,YACA;AAAA,cACE,MAAM;AAAA,YACR;AAAA,UACF;AAAA,QACF;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAA/B;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,gBAAgB;AAAA,UAChB,MAAM;AAAA,UACN,QAAQ;AAAA,QACV;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,kBAAkB,SAAS;AAAA,IAC9B;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["allowedActions","cancelSubscription","countSubscriptions","customerAllowedActions","customerCancelSubscription","customerExtendSubscription","customerGetSubscription","customerInitiatePaymentMethodSetup","customerListUpcomingCharges","customerQuerySubscriptions","customerTurnOffSubscriptionAutoRenewal","customerTurnOnSubscriptionAutoRenewal","customerUpdateSubscriptionPaymentMethod","extendSubscription","getSubscription","getSubscriptionsStats","initiatePaymentMethodSetup","listSubscriptionHistory","listUpcomingCharges","markBillingCycleAsPaid","markLatestInvoiceAsPaid","pauseSubscription","payCycle","previewSubscriptionCharges","previewSubscriptionsCharges","querySubscriptions","resumeSubscription","searchSubscriptions","turnOffSubscriptionAutoRenewal","turnOnSubscriptionAutoRenewal","updateSubscriptionBillingDate","updateSubscriptionPaymentMethod","import_timestamp","import_rest_modules","payload","import_address","import_transform_paths","SubscriptionStatusEnumSubscriptionStatus","CollectionMethodEnumCollectionMethod","DurationUnit","AdditionalFeeTrigger","TaxableAddressType","PaymentStatus","PausePolicy","PauseAt","ResumeAt","PauseType","HistoryActionInitiator","ItemCategory","SortOrder","SubscriptionStatusGroup","ActionType","ExtendPolicyType","PaymentMode","OrderMethod","WebhookIdentityType","PaymentTestMode","RevivePolicy","ActionInitiator","UpdateAction","RequestedFields","InvoiceStatus","CollectionMethod","CreationMode","PaymentAttemptStatus","RefundReason","IdentityType","SubscriptionType","V1SubscriptionStatusEnumSubscriptionStatus","PaymentStatusEnumPaymentStatus","SubscriptionFrequency","CancellationInitiator","Status","HistoryViewMode","PaymentSettlementMethod","customerGetSubscription","sdkTransformError","customerCancelSubscription","customerTurnOnSubscriptionAutoRenewal","customerTurnOffSubscriptionAutoRenewal","customerExtendSubscription","customerQuerySubscriptions","customerUpdateSubscriptionPaymentMethod","customerAllowedActions","customerListUpcomingCharges","customerInitiatePaymentMethodSetup","payCycle","getSubscription","updateSubscriptionPaymentMethod","updateSubscriptionBillingDate","cancelSubscription","pauseSubscription","resumeSubscription","querySubscriptions","searchSubscriptions","countSubscriptions","turnOnSubscriptionAutoRenewal","turnOffSubscriptionAutoRenewal","markLatestInvoiceAsPaid","markBillingCycleAsPaid","getSubscriptionsStats","extendSubscription","allowedActions","listUpcomingCharges","previewSubscriptionCharges","previewSubscriptionsCharges","initiatePaymentMethodSetup","listSubscriptionHistory"]}
|
|
1
|
+
{"version":3,"sources":["../../../index.typings.ts","../../../src/billing-v1-subscription-subscriptions.universal.ts","../../../src/billing-v1-subscription-subscriptions.http.ts"],"sourcesContent":["export * from './src/billing-v1-subscription-subscriptions.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 ambassadorWixBillingV1Subscription from './billing-v1-subscription-subscriptions.http.js';\nimport { transformSDKAddressToRESTAddress } from '@wix/sdk-runtime/transformations/address';\nimport { transformRESTAddressToSDKAddress } from '@wix/sdk-runtime/transformations/address';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\nexport interface Subscription {\n /**\n * Subscription's unique id. Automatically generated and read-only.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Date when subscription was created\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date when subscription was updated\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Revision of subscription. Increments upon changes\n * @readonly\n */\n revision?: string | null;\n /**\n * Subscription name: minLength is 1, maxLength is 150\n * @maxLength 150\n */\n name?: string;\n /**\n * Subscription description. Optional.\n * @maxLength 500\n */\n description?: string | null;\n /**\n * 3. No Start Date:\n * - If the start_date is not provided, this field will default to \"now\",\n * meaning the subscription will start immediately.\n */\n startDate?: Date | null;\n /**\n * Represents when the subscription will end, relevant for subscriptions with a termed period.\n * If not provided, will be calculated based on billing schedule. Should be empty for evergreen subscription.\n * Note: A 13-hour tolerance is applied when validating the end date to handle for time zone differences and minor discrepancies.\n */\n endDate?: Date | null;\n /** Business origin subscription is coming from. In site-level subscription it will be vertical app_id and entity_id */\n origin?: BusinessOrigin;\n /** Customer information like id and identity type (member or contact) */\n customer?: Customer;\n /**\n * Status of subscription\n * @readonly\n */\n status?: SubscriptionStatusEnumSubscriptionStatusWithLiterals;\n /** Billing details parameters including schedule, currency, etc. */\n billingSettings?: BillingSettings;\n /**\n * Includes many attributes about billing status of the subscription\n * @readonly\n */\n billingStatus?: BillingStatus;\n /** Shipping address associated with subscription. At the moment used only for payments. Optional. */\n shippingAddress?: FullAddressDetails;\n /** Restrictions on possible subscription actions. If not provided, default policies are all restrictions enabled. */\n policies?: SubscriptionPolicies;\n /**\n * Information related to either paused subscription or scheduled for future pause\n * @readonly\n */\n pauseInfo?: PauseInfo;\n /**\n * Information related to cancellation for already canceled subscription or scheduled for cancel\n * @readonly\n */\n cancellationInfo?: CancellationInfo;\n /**\n * Pending update for the next billing cycle\n * @readonly\n */\n pendingUpdateData?: SubscriptionUpdateData;\n /**\n * Key / Value store to keep up to 10 additional values related to the subscription.\n * Key max length = 50, Value max length = 200. Value can not be empty.\n * Should not include any sensitive or PII information.\n * @maxSize 10\n */\n metadata?: Record<string, string>;\n /**\n * Pending update for a specific date\n * @readonly\n */\n specificDatePendingUpdateData?: SpecificDateSubscriptionUpdateData;\n /**\n * ChangesCounter of subscription. Increments upon every change to the domain\n * @readonly\n */\n changesCounter?: string | null;\n /**\n * Billing order id. Optional.\n * @format GUID\n */\n orderId?: string | null;\n /** Platform origin subscription is coming from. */\n platformOrigin?: PlatformOrigin;\n /**\n * The Business Location ID represents a business location in an external service, which includes the business address.\n * @format GUID\n */\n businessLocationId?: string | null;\n /**\n * items, minSize is 1, maxSize is 100\n * @maxSize 100\n */\n items?: Item[];\n}\n\nexport interface BusinessOrigin {\n /** @format GUID */\n appId?: string | null;\n /** @format GUID */\n entityId?: string | null;\n}\n\nexport interface Customer extends CustomerIdOneOf {\n /**\n * Visitor ID of the customer. Available when the customer is an anonymous\n * site visitor.\n * @format GUID\n */\n visitorId?: string;\n /**\n * Contact ID of the customer. Available when the customer is a\n * [contact](https://dev.wix.com/docs/rest/api-reference/people-communications/contacts/contacts/contact-v-4#contact-object).\n * @format GUID\n */\n contactId?: string;\n /**\n * Member ID of the customer. Available when the customer is a\n * [member](https://dev.wix.com/docs/rest/api-reference/people-communications/members/members#member-object).\n * @format GUID\n */\n memberId?: string;\n /**\n * Wix account ID\n * @format GUID\n */\n accountId?: string;\n}\n\n/** @oneof */\nexport interface CustomerIdOneOf {\n /**\n * Visitor ID of the customer. Available when the customer is an anonymous\n * site visitor.\n * @format GUID\n */\n visitorId?: string;\n /**\n * Contact ID of the customer. Available when the customer is a\n * [contact](https://dev.wix.com/docs/rest/api-reference/people-communications/contacts/contacts/contact-v-4#contact-object).\n * @format GUID\n */\n contactId?: string;\n /**\n * Member ID of the customer. Available when the customer is a\n * [member](https://dev.wix.com/docs/rest/api-reference/people-communications/members/members#member-object).\n * @format GUID\n */\n memberId?: string;\n /**\n * Wix account ID\n * @format GUID\n */\n accountId?: string;\n}\n\nexport enum SubscriptionStatusEnumSubscriptionStatus {\n UNKNOWN = 'UNKNOWN',\n /** Subscription created in this status, but hasn't been paid for yet. Filtered out from subscriptions querying. */\n DRAFT = 'DRAFT',\n /** Subscription that will be active in future. */\n PENDING = 'PENDING',\n /** Subscription is active */\n ACTIVE = 'ACTIVE',\n /** Subscription is paused */\n PAUSED = 'PAUSED',\n /** Subscription was ended */\n ENDED = 'ENDED',\n /** Subscription was canceled or auto-renew off. Ended before its time. */\n CANCELED = 'CANCELED',\n}\n\n/** @enumType */\nexport type SubscriptionStatusEnumSubscriptionStatusWithLiterals =\n | SubscriptionStatusEnumSubscriptionStatus\n | 'UNKNOWN'\n | 'DRAFT'\n | 'PENDING'\n | 'ACTIVE'\n | 'PAUSED'\n | 'ENDED'\n | 'CANCELED';\n\nexport interface BillingSettings {\n /**\n * Currency of all subscription items prices. Three letter ISO currency code. https://en.wikipedia.org/wiki/ISO_4217\n * @format CURRENCY\n */\n currency?: string;\n /** customer payment source to make recurring payments with */\n paymentMethod?: PaymentMethod;\n /** Instructs how payments will be collected. */\n collectionMethod?: CollectionMethodEnumCollectionMethodWithLiterals;\n /**\n * Duration of cycle. For example, 1 MONTH, 2 WEEKS, 7 DAYS, 1 YEAR etc.\n * Shortest supported cycle duration is 7 days.\n */\n cycleDuration?: Duration;\n /**\n * Number of billing cycles. If not set subscription auto-renewed until cycle-auto-renew will be disabled.\n * @min 1\n */\n totalCycles?: number | null;\n /** If set to false, subscription will be canceled at the next billing cycle. */\n cycleAutoRenew?: boolean;\n /** Billing Schedule to be defined in order to override default billing schedule */\n customBillingSchedule?: CustomBillingSchedule;\n /** Definition of trial period */\n freeTrialDuration?: Duration;\n /**\n * Shipping costs collected each cycle\n * @format DECIMAL_VALUE\n * @deprecated\n * @replacedBy shipping_charges\n * @targetRemovalDate 2024-10-31\n */\n shippingFee?: string | null;\n /** Billing address associated with subscription to be used for payments. */\n billingAddress?: FullAddressDetails;\n taxSettings?: TaxSettings;\n /**\n * Fees that are only added to an invoice when a specific condition is met.\n * For example, a setup fee that only applies to the very first invoice of a\n * subscription.\n *\n * Max: 5 additional fees\n * @maxSize 5\n */\n additionalFees?: AdditionalFee[];\n /** Shipping fee charges */\n shippingCharges?: ShippingCharges;\n /**\n * General discount that applied to all items in the subscription\n * @maxSize 5\n */\n discounts?: Discount[];\n /**\n * Details about the external collection service.\n * Only set when the collection_method is EXTERNAL.\n */\n externalCollectionDetails?: ExternalCollectionDetails;\n}\n\nexport interface PaymentMethod {\n /**\n * reference to payment source id stored in payments system\n * @format GUID\n */\n _id?: string;\n}\n\nexport enum CollectionMethodEnumCollectionMethod {\n UNKNOWN = 'UNKNOWN',\n /** Subscriber automatically charged */\n AUTO_CHARGE = 'AUTO_CHARGE',\n /** Payments manually collected and managed by owner */\n OFFLINE = 'OFFLINE',\n /** Payment will be collected somehow. Billing only issues invoice per cycle. */\n SEND_INVOICE = 'SEND_INVOICE',\n /** Payment will be collected externally */\n EXTERNAL = 'EXTERNAL',\n /** Indicates the product has a zero amount, meaning its free with no payment required. */\n FREE = 'FREE',\n}\n\n/** @enumType */\nexport type CollectionMethodEnumCollectionMethodWithLiterals =\n | CollectionMethodEnumCollectionMethod\n | 'UNKNOWN'\n | 'AUTO_CHARGE'\n | 'OFFLINE'\n | 'SEND_INVOICE'\n | 'EXTERNAL'\n | 'FREE';\n\nexport interface Duration {\n /** Duration unit: DAY, WEEK, MONTH, YEAR */\n unit?: DurationUnitWithLiterals;\n /**\n * Amount of units. For example, 1 MONTH, 1 YEAR, 2 WEEKS, etc. Optional. Default is 1.\n * @min 1\n */\n count?: number | null;\n}\n\nexport enum DurationUnit {\n UNKNOWN = 'UNKNOWN',\n DAY = 'DAY',\n WEEK = 'WEEK',\n MONTH = 'MONTH',\n YEAR = 'YEAR',\n}\n\n/** @enumType */\nexport type DurationUnitWithLiterals =\n | DurationUnit\n | 'UNKNOWN'\n | 'DAY'\n | 'WEEK'\n | 'MONTH'\n | 'YEAR';\n\nexport interface CustomBillingSchedule {\n /**\n * Amount of cycles to be paid on Subscription creation, currently only cycles_to_pay_on_creation equals to 1 is supported\n * When used with Subscription.start_date, Subscription cycles will be paid on creation but Subscription will be activated in the future\n * @min 1\n * @max 1\n */\n cyclesToPayOnCreation?: number | null;\n}\n\nexport interface FullAddressDetails {\n /** Details about the person associated with the address. */\n contactDetails?: FullAddressContactDetails;\n /** Information about the address. */\n address?: Address;\n}\n\nexport interface FullAddressContactDetails {\n /** First name of the contact. */\n firstName?: string | null;\n /** Last name of the contact. */\n lastName?: string | null;\n /**\n * Phone number of the contact.\n * @format PHONE\n */\n phone?: string | null;\n /** Company associated with the contact. */\n company?: string | null;\n /**\n * Email address of the contact.\n * @format EMAIL\n */\n email?: string | null;\n}\n\nexport interface Address extends AddressStreetOneOf {\n /** Street name and number. */\n streetAddress?: StreetAddress;\n /** Main address line, usually street and number as free text. */\n addressLine1?: string | null;\n /**\n * 2-letter country code in\n * [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)\n * format.\n * @format COUNTRY\n */\n country?: string | null;\n /**\n * Subdivision. Usually a state, region, prefecture, or province code,\n * according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2).\n */\n subdivision?: string | null;\n /** City name. */\n city?: string | null;\n /** Zip/postal code. */\n postalCode?: string | null;\n}\n\n/** @oneof */\nexport interface AddressStreetOneOf {\n /** Street name and number. */\n streetAddress?: StreetAddress;\n /** Main address line, usually street and number as free text. */\n addressLine?: string | null;\n}\n\nexport interface StreetAddress {\n /** Street number. */\n number?: string;\n /** Street name. */\n name?: string;\n}\n\nexport interface TaxSettings {\n /** If true then taxes are included in given prices */\n inclusive?: boolean;\n}\n\nexport interface AdditionalFee {\n /**\n * Name of the conditional fee.\n *\n * Max: 500 characters\n * @maxLength 500\n */\n name?: string;\n /**\n * Amount of the conditional fee.\n *\n * Min: `0.01`\n * @decimalValue options { gt:0.00 }\n */\n amount?: string;\n /**\n * When the fee is added to the invoice.\n *\n * + `UNKNOWN_FEE_TRIGGER`: There is no information about when the fee is added to an invoice.\n * + `FIRST_PAYMENT`: The fee is only added to the very first invoice of a subscription.\n * @deprecated When the fee is added to the invoice.\n *\n * + `UNKNOWN_FEE_TRIGGER`: There is no information about when the fee is added to an invoice.\n * + `FIRST_PAYMENT`: The fee is only added to the very first invoice of a subscription.\n * @replacedBy cycles\n * @targetRemovalDate 2025-12-31\n */\n trigger?: AdditionalFeeTriggerWithLiterals;\n /** Information about the tax of the conditional fee. */\n tax?: Tax;\n /**\n * Specifies the cycles during which the fee will be applied. If this field is provided,\n * it determines the exact range of cycles the fee applies to. The logic is as follows:\n *\n * - `cycle_from`: The first cycle the fee will be added to. Must be greater than 0.\n * - `number_of_cycles`: The number of consecutive cycles the fee will be applied to,\n * starting from `cycle_from`. If not specified, the fee applies to all cycles starting\n * from `cycle_from`.\n *\n * Example:\n * - `cycle_from = 1, number_of_cycles = 3`: Fee applies to cycles 1, 2, and 3.\n * - `cycle_from = 2, number_of_cycles = None`: Fee applies to cycles 2 and onward indefinitely.\n *\n * If `cycles` is not specified (`None`), the fee will be applied on all cycles.\n */\n cycles?: Cycles;\n /** Indicates the source of the fee, Contains app_id and entity_id */\n origin?: Origin;\n}\n\nexport enum AdditionalFeeTrigger {\n UNKNOWN = 'UNKNOWN',\n /** Charge upon subscription first payment */\n FIRST_PAYMENT = 'FIRST_PAYMENT',\n}\n\n/** @enumType */\nexport type AdditionalFeeTriggerWithLiterals =\n | AdditionalFeeTrigger\n | 'UNKNOWN'\n | 'FIRST_PAYMENT';\n\nexport interface Tax extends TaxValueOneOf {\n /**\n * Tax amount for the invoice's line item. Available when the tax is an\n * amount and not a precentage.\n *\n * Min: `0.01`\n * @decimalValue options { gt:0.00 }\n */\n amount?: string;\n /**\n * Tax amount for the invoice's line item price and application fee.\n * Can't be combined with `invoiceItems.priceDetails.discount`.\n * Available when the tax is a precentage and not an amount.\n *\n * Min: `0.01`\n * Max: `100`\n * @decimalValue options { gt:0.00, lte:100 }\n */\n percentage?: string;\n /** Dynamic tax calculation */\n dynamic?: DynamicTax;\n}\n\n/** @oneof */\nexport interface TaxValueOneOf {\n /**\n * Tax amount for the invoice's line item. Available when the tax is an\n * amount and not a precentage.\n *\n * Min: `0.01`\n * @decimalValue options { gt:0.00 }\n */\n amount?: string;\n /**\n * Tax amount for the invoice's line item price and application fee.\n * Can't be combined with `invoiceItems.priceDetails.discount`.\n * Available when the tax is a precentage and not an amount.\n *\n * Min: `0.01`\n * Max: `100`\n * @decimalValue options { gt:0.00, lte:100 }\n */\n percentage?: string;\n /** Dynamic tax calculation */\n dynamic?: DynamicTax;\n}\n\nexport interface DynamicTax {\n /**\n * Tax group ID used to calculate tax, default will be used if not available\n * @format GUID\n */\n taxGroupId?: string | null;\n /** Taxable address used to calculate tax */\n taxableAddressType?: TaxableAddressTypeWithLiterals;\n}\n\nexport enum TaxableAddressType {\n UNKNOWN = 'UNKNOWN',\n /** Tax will be calculated using a single address */\n BUSINESS = 'BUSINESS',\n /** Tax will be calculated using multiple address (from BUSINESS to BILLING) */\n BILLING = 'BILLING',\n /** Tax will be calculated using multiple address (from BUSINESS to SHIPPING) */\n SHIPPING = 'SHIPPING',\n}\n\n/** @enumType */\nexport type TaxableAddressTypeWithLiterals =\n | TaxableAddressType\n | 'UNKNOWN'\n | 'BUSINESS'\n | 'BILLING'\n | 'SHIPPING';\n\nexport interface Cycles {\n /**\n * The cycle will start. Minimum cycle number is 1\n * @min 1\n */\n cycleFrom?: number;\n /**\n * Number of cycles to be applied on. In order to apply a on all cycles until the end of the subscription, this field should be empty.\n * @min 1\n */\n numberOfCycles?: number | null;\n}\n\nexport interface Origin {\n /** @format GUID */\n appId?: string;\n /** @format GUID */\n entityId?: string;\n}\n\nexport interface ShippingCharges {\n /**\n * Amount of the shipping fee in `0.00` format.\n *\n * Min: `0.01`\n * @decimalValue options { gte:0.00, maxScale:2 }\n */\n amount?: string;\n /** Tax of the shipping fee */\n tax?: Tax;\n /** @maxSize 5 */\n discounts?: Discount[];\n}\n\nexport interface Discount extends DiscountValueOneOf {\n /**\n * Discount amount.\n * Available when the discount is an amount.\n *\n * Min: `0.01`\n * @decimalValue options { gt:0.00 }\n */\n amount?: string;\n /**\n * Discount percentage.\n * Available when the discount is a parcentage value.\n *\n * Min: `0.01`\n * Max: `100`\n * @decimalValue options { gt:0.00, lte:100 }\n */\n percentage?: string;\n cycles?: DiscountCycles;\n /** Discount origin is coming from. Contains app_id and entity_id */\n origin?: DiscountOrigin;\n}\n\n/** @oneof */\nexport interface DiscountValueOneOf {\n /**\n * Discount amount.\n * Available when the discount is an amount.\n *\n * Min: `0.01`\n * @decimalValue options { gt:0.00 }\n */\n amount?: string;\n /**\n * Discount percentage.\n * Available when the discount is a parcentage value.\n *\n * Min: `0.01`\n * Max: `100`\n * @decimalValue options { gt:0.00, lte:100 }\n */\n percentage?: string;\n}\n\nexport interface DiscountCycles {\n /**\n * The cycle from which the discount will start. Minimum cycle number is 1\n * @min 1\n */\n cycleFrom?: number;\n /**\n * Number of cycles to be applied on them discount. In order to apply a discount on all cycles until the end of the subscription, this field should be empty.\n * @min 1\n */\n numberOfCycles?: number | null;\n}\n\nexport interface DiscountOrigin {\n /** @format GUID */\n appId?: string;\n /** @format GUID */\n entityId?: string;\n}\n\nexport interface ExternalCollectionDetails {\n /** The name of the external collector. */\n collectorName?: string;\n}\n\nexport interface BillingStatus {\n /**\n * Current cycle of subscription billing schedule. When billing schedule starts cycles start from 1\n * and incremented each next billing cycle.\n * In case billing schedule not started (free trial, pay later start later) then current_cycle will remain 0\n */\n currentCycle?: number;\n /** how many cycled are remaining, For auto-renew subscriptions is not set. */\n remainingCycles?: number | null;\n /** Date when charge will be for next billing cycle */\n nextBillingDate?: Date | null;\n /** Previous Date charged for previous billing cycle */\n previousBillingDate?: Date | null;\n /** last payment details */\n latestPaymentData?: PaymentData;\n /** Free trial data */\n freeTrialData?: FreeTrialData;\n /**\n * Grace period information during grace period after payment failure\n * @readonly\n */\n gracePeriodData?: GracePeriodData;\n}\n\nexport interface PaymentData {\n /**\n * Latest payment's invoice ID\n * @format GUID\n */\n invoiceId?: string;\n /** Latest payment's status: UNPAID/PAID/FAILED */\n paymentStatus?: PaymentStatusWithLiterals;\n /** Latest payment's totals. */\n totals?: Totals;\n initialFailedPaymentDate?: Date | null;\n /** Tax-related data for the latest payment */\n taxData?: PaymentTaxData;\n}\n\nexport enum PaymentStatus {\n /** Payment status unknown */\n UNKNOWN = 'UNKNOWN',\n /** Payment has not been paid */\n UNPAID = 'UNPAID',\n /** Payment has been paid // TODO: p13n review: we are not sending event when in SEND_INVOICE mode cycle was paid. should we and which event? */\n PAID = 'PAID',\n /** Payment failed */\n FAILED = 'FAILED',\n}\n\n/** @enumType */\nexport type PaymentStatusWithLiterals =\n | PaymentStatus\n | 'UNKNOWN'\n | 'UNPAID'\n | 'PAID'\n | 'FAILED';\n\nexport interface Totals {\n /**\n * Total price of the subscription that the customer must pay per billing\n * cycle. Calculated as: `subtotal + tax + shippingFee + applicationFee + extraCharge - discount - credit`\n * Note: platformFee is NOT included in this calculation as it is absorbed by the merchant and does not affect the customer's total.\n * @format DECIMAL_VALUE\n * @readonly\n */\n totalPrice?: string;\n /**\n * Subtotal of all line items that belong to the subscription.\n * Calculated as: `sum_{i=1}^{n} (itemPrice[i] * quantity[i])`\n * @format DECIMAL_VALUE\n * @readonly\n */\n subtotal?: string;\n /**\n * Total tax.\n * @format DECIMAL_VALUE\n * @readonly\n */\n tax?: string | null;\n /**\n * Total discount.\n * @format DECIMAL_VALUE\n * @readonly\n */\n discount?: string | null;\n /**\n * Total application fee.\n * @format DECIMAL_VALUE\n * @readonly\n */\n applicationFee?: string | null;\n /**\n * Total shipping fee.\n * @format DECIMAL_VALUE\n * @readonly\n */\n shippingFee?: string | null;\n /**\n * Total extra charges without tax.\n * @format DECIMAL_VALUE\n * @readonly\n */\n extraCharge?: string | null;\n /**\n * Total credits without tax.\n * @format DECIMAL_VALUE\n * @readonly\n */\n credit?: string | null;\n /**\n * The tax amount for the proration, which is also included in the total tax.\n * @format DECIMAL_VALUE\n * @readonly\n */\n prorationTax?: string | null;\n /**\n * Platform fee calculated based on vertical-specific billing settings configuration.\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0.00, maxScale:2 }\n * @readonly\n */\n platformFee?: string | null;\n}\n\nexport interface PaymentTaxData {\n /**\n * A detailed breakdown of the tax authorities for all subscription items from the latest payment\n * @minSize 1\n * @maxSize 100\n */\n taxBreakdowns?: TaxBreakdown[];\n /**\n * Tax amount for all subscription items\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0.00, maxScale:2 }\n */\n taxAmount?: string | null;\n}\n\nexport interface TaxBreakdown {\n taxType?: string;\n /** @decimalValue options { maxScale:4 } */\n taxRate?: string;\n /** @format DECIMAL_VALUE */\n taxAmount?: string | null;\n /** @format DECIMAL_VALUE */\n taxableAmount?: string | null;\n /** @format DECIMAL_VALUE */\n nonTaxableAmount?: string | null;\n /**\n * Name of the tax that was calculated. For example, \"NY State Sales Tax\", \"Quebec GST\", etc.\n * @maxLength 200\n */\n taxName?: string | null;\n /**\n * Jurisdiction that taxes were calculated for.\n * @maxLength 200\n */\n jurisdiction?: string | null;\n /** Type of jurisdiction that taxes were calculated for. */\n jurisdictionType?: string;\n}\n\nexport interface FreeTrialData {\n /**\n * Date when free trial starts\n * @readonly\n */\n startDate?: Date | null;\n /**\n * Date when free trial ends\n * @readonly\n */\n endDate?: Date | null;\n}\n\nexport interface UpdateBillingDateData {\n /**\n * Date until the subscription is paid for.\n * Different from `nextBillingDate` only when the next billing date is updated without immediately issuing a new invoice.\n */\n paidUntil?: Date | null;\n /** Information about how to adjust the item's payment due to the update of the billing date */\n proration?: Proration;\n}\n\nexport interface Proration extends ProrationTypeOneOf {\n /**\n * BASS automatically calculates the proration amount based on the number\n * of days added to or removed from the current billing cycle. BASS uses\n * this formula to calculate the charge or credit amount:\n * `(Subscription total for the current billing cycle) * (number of days added to or removed from the current billing cycle) / (total number of days for the current billing cycle before the adjustment)`.\n * For example, the customer has paid 100 UDS for the current\n * billing cycle that last 31 days, and you want to extend the cycle by 8\n * days. Then, BASS calculates the proration amount like this:\n * `100 USD * 8 days / 31 days`, which equals `25.81 USD`.\n */\n timeBased?: TimeBasedProration;\n /** Proration amount that's based on your custom calculation. */\n custom?: CustomProration;\n}\n\n/** @oneof */\nexport interface ProrationTypeOneOf {\n /**\n * BASS automatically calculates the proration amount based on the number\n * of days added to or removed from the current billing cycle. BASS uses\n * this formula to calculate the charge or credit amount:\n * `(Subscription total for the current billing cycle) * (number of days added to or removed from the current billing cycle) / (total number of days for the current billing cycle before the adjustment)`.\n * For example, the customer has paid 100 UDS for the current\n * billing cycle that last 31 days, and you want to extend the cycle by 8\n * days. Then, BASS calculates the proration amount like this:\n * `100 USD * 8 days / 31 days`, which equals `25.81 USD`.\n */\n timeBased?: TimeBasedProration;\n /** Proration amount that's based on your custom calculation. */\n custom?: CustomProration;\n}\n\nexport interface TimeBasedProration {}\n\nexport interface CustomProration extends CustomProrationAmountOneOf {\n /**\n * Proration charge amount that's based on your custom calculation.\n * Increases the total that the customer must pay with the next invoice.\n *\n * Min: `0.01`\n * @decimalValue options { gt:0.00 }\n */\n charge?: string;\n /**\n * Proration credit amount that's based on your custom calculation.\n * Lowers the total that the customer must pay with the next invoice.\n *\n * Min: `0.01`\n * @decimalValue options { gt:0.00 }\n */\n credit?: string;\n}\n\n/** @oneof */\nexport interface CustomProrationAmountOneOf {\n /**\n * Proration charge amount that's based on your custom calculation.\n * Increases the total that the customer must pay with the next invoice.\n *\n * Min: `0.01`\n * @decimalValue options { gt:0.00 }\n */\n charge?: string;\n /**\n * Proration credit amount that's based on your custom calculation.\n * Lowers the total that the customer must pay with the next invoice.\n *\n * Min: `0.01`\n * @decimalValue options { gt:0.00 }\n */\n credit?: string;\n}\n\nexport interface GracePeriodData {\n /**\n * Grace period start date\n * @readonly\n */\n startDate?: Date | null;\n /**\n * Grace period end date\n * @readonly\n */\n endDate?: Date | null;\n /** Automatic retry data during grade period, if have any. Optional. */\n automaticRetryData?: AutomaticRetryData;\n}\n\nexport interface AutomaticRetryData {\n enabled?: boolean;\n}\n\nexport interface SubscriptionPolicies {\n /** Subscription can be canceled by the customer who bought it */\n customerCanCancel?: boolean;\n /** Subscription end date can be updated by business */\n businessCanExtend?: boolean;\n /** Subscription can be canceled not only immediately, but also at end of billing cycle by turning off auto-renew */\n allowEndOfCycleCancellation?: boolean;\n}\n\nexport interface PauseInfo {\n pausePolicy?: PausePolicyWithLiterals;\n pauseAt?: PauseAtWithLiterals;\n startDate?: Date | null;\n startCycle?: number | null;\n resumeAt?: ResumeAtWithLiterals;\n resumeDate?: Date | null;\n resumeCycle?: number | null;\n /** The type of pause applied to the subscription (e.g., traditional pause vs skip cycle) */\n type?: PauseTypeWithLiterals;\n}\n\nexport enum PausePolicy {\n NONE = 'NONE',\n /** Pause the payment and the service. When resuming, the subscription end date is extended by the number of cycles postponed, and if the pause happened in a middle of a cycle, the payment date is postponed by the amount of days that already paid. */\n SERVICE_AND_PAYMENTS = 'SERVICE_AND_PAYMENTS',\n /** Pause the service and continue the billing. When resuming, extend the service by the time that was paused */\n SERVICE_ONLY = 'SERVICE_ONLY',\n}\n\n/** @enumType */\nexport type PausePolicyWithLiterals =\n | PausePolicy\n | 'NONE'\n | 'SERVICE_AND_PAYMENTS'\n | 'SERVICE_ONLY';\n\nexport enum PauseAt {\n /** Cancel scheduled pause */\n NONE = 'NONE',\n /** Pause the subscription now */\n IMMEDIATELY = 'IMMEDIATELY',\n /** Pause the subscription at the next billing date */\n NEXT_BILLING_DATE = 'NEXT_BILLING_DATE',\n /** A specific date must be defined in Schedule.specific_date */\n SPECIFIC_DATE = 'SPECIFIC_DATE',\n /** The number of cycles must be defined in Schedule.number_of_cycles */\n NUMBER_OF_CYCLES_FROM_TODAY = 'NUMBER_OF_CYCLES_FROM_TODAY',\n}\n\n/** @enumType */\nexport type PauseAtWithLiterals =\n | PauseAt\n | 'NONE'\n | 'IMMEDIATELY'\n | 'NEXT_BILLING_DATE'\n | 'SPECIFIC_DATE'\n | 'NUMBER_OF_CYCLES_FROM_TODAY';\n\nexport enum ResumeAt {\n /** Cancel scheduled resume */\n NONE = 'NONE',\n /** Resume the subscription now */\n IMMEDIATELY = 'IMMEDIATELY',\n /** Resume the subscription at the next billing date */\n NEXT_BILLING_DATE = 'NEXT_BILLING_DATE',\n /** A specific date must be defined in Schedule.specific_date */\n SPECIFIC_DATE = 'SPECIFIC_DATE',\n}\n\n/** @enumType */\nexport type ResumeAtWithLiterals =\n | ResumeAt\n | 'NONE'\n | 'IMMEDIATELY'\n | 'NEXT_BILLING_DATE'\n | 'SPECIFIC_DATE';\n\nexport enum PauseType {\n /** Default value for backward compatibility */\n UNKNOWN_PAUSE_TYPE = 'UNKNOWN_PAUSE_TYPE',\n /** Subscription was paused using the Pause/Resume flow */\n PAUSE = 'PAUSE',\n /** Subscription was paused using the Skip Cycle/Skip Order flow */\n SKIP_CYCLE = 'SKIP_CYCLE',\n}\n\n/** @enumType */\nexport type PauseTypeWithLiterals =\n | PauseType\n | 'UNKNOWN_PAUSE_TYPE'\n | 'PAUSE'\n | 'SKIP_CYCLE';\n\nexport interface CancellationInfo {\n /** Subscription cancel date. Can contain a future or past date */\n cancellationDate?: Date | null;\n /** Initiator for cancellation */\n initiator?: HistoryActionInitiatorWithLiterals;\n /** Reason for cancellation. Optional. */\n reason?: string | null;\n}\n\nexport enum HistoryActionInitiator {\n UNDEFINED = 'UNDEFINED',\n BUSINESS = 'BUSINESS',\n CUSTOMER = 'CUSTOMER',\n SYSTEM = 'SYSTEM',\n PAYMENT_FAILURE = 'PAYMENT_FAILURE',\n}\n\n/** @enumType */\nexport type HistoryActionInitiatorWithLiterals =\n | HistoryActionInitiator\n | 'UNDEFINED'\n | 'BUSINESS'\n | 'CUSTOMER'\n | 'SYSTEM'\n | 'PAYMENT_FAILURE';\n\nexport interface SubscriptionUpdateData {\n /** @maxSize 100 */\n itemsToUpdate?: ItemChange[];\n /** @maxSize 99 */\n itemsToAdd?: Item[];\n /**\n * @format GUID\n * @maxSize 99\n */\n itemsToDelete?: string[] | null;\n /** @readonly */\n numberOfRequests?: number;\n}\n\nexport interface ItemChange {\n /**\n * Item ID\n * @format GUID\n */\n _id?: string;\n pricingModel?: PricingModel;\n /** @min 1 */\n quantity?: number | null;\n tax?: Tax;\n}\n\nexport interface PricingModel extends PricingModelModelOneOf {\n /** Details about the fixed item price. */\n fixedPrice?: FixedPrice;\n}\n\n/** @oneof */\nexport interface PricingModelModelOneOf {\n /** Details about the fixed item price. */\n fixedPrice?: FixedPrice;\n}\n\nexport interface FixedPrice {\n /**\n * Fixed item price with a period as a decimal separator. For example, `3.99`.\n * Price doesn't include tax, discounts, or application fee.\n *\n * Min: `0.01`\n * @decimalValue options { gte:0.00 }\n */\n itemPrice?: string;\n}\n\nexport interface Item {\n /**\n * Unique identifier of subscription item. Automatically generated and read-only.\n * @readonly\n * @format GUID\n */\n _id?: string | null;\n /**\n * Name of the item. Typically product name.\n * @minLength 1\n * @maxLength 200\n */\n name?: string;\n /**\n * Description of the item.\n * @maxLength 500\n */\n description?: string | null;\n /** References to external product catalog data known to client. */\n catalogReference?: CatalogReference;\n /** Category of item. Whether it is digital or physical one. */\n category?: ItemCategoryWithLiterals;\n /**\n * Amount of products\n * @min 1\n */\n quantity?: number;\n /** Pricing model of the item. Whether fixed price or dynamic price models. */\n pricingModel?: PricingModel;\n /** Tax, positive value, optional */\n tax?: Tax;\n /**\n * Discounts applied on item price\n * @maxSize 5\n */\n discounts?: Discount[];\n /** Application specific fee, positive value, optional (if application_fee == 0, don't include it to request). Only positive values. */\n applicationFee?: ApplicationFee;\n /**\n * External reference identifier for mapping item in consumer's system.\n * This allows the consumer to correlate the item in their system with the item in this API.\n * @format GUID\n */\n externalId?: string | null;\n /**\n * Key / Value store to keep up to 10 additional values related to the subscription item.\n * Key max length = 50, Value max length = 200. Value can not be empty.\n * Should not include any sensitive or PII information.\n * @maxSize 10\n */\n metadata?: Record<string, string>;\n}\n\nexport interface CatalogReference {\n /**\n * Product ID from the external catalog.\n * @minLength 1\n * @maxLength 50\n */\n catalogItemId?: string;\n /**\n * ID of the app that the product catalog belongs to.\n * When omitted, BASS assumes that the product belongs to the subscription's\n * `origin.appId`.\n *\n * Min: 1 character\n * Max: 50 characters\n * @minLength 1\n * @maxLength 50\n */\n appId?: string | null;\n}\n\nexport enum ItemCategory {\n UNKNOWN = 'UNKNOWN',\n PHYSICAL = 'PHYSICAL',\n DIGITAL = 'DIGITAL',\n}\n\n/** @enumType */\nexport type ItemCategoryWithLiterals =\n | ItemCategory\n | 'UNKNOWN'\n | 'PHYSICAL'\n | 'DIGITAL';\n\nexport interface ApplicationFee extends ApplicationFeeValueOneOf {\n /**\n * Amount of the application fee in `0.00` format.\n * @format DECIMAL_VALUE\n */\n amount?: string;\n /**\n * Discounts for the application fee.\n *\n * Max: 5 discounts\n * @maxSize 5\n */\n discounts?: Discount[];\n}\n\n/** @oneof */\nexport interface ApplicationFeeValueOneOf {\n /**\n * Amount of the application fee in `0.00` format.\n * @format DECIMAL_VALUE\n */\n amount?: string;\n}\n\nexport interface SpecificDateSubscriptionUpdateData {\n updateData?: SubscriptionUpdateData;\n executionDate?: Date | null;\n}\n\nexport interface PlatformOrigin {\n /** @format GUID */\n appId?: string | null;\n /** @format GUID */\n entityId?: string | null;\n}\n\nexport interface SubscriptionBillingCyclePaid {\n /** The subscription for which one of the invoices has been marked as paid */\n subscription?: Subscription;\n /** The cycle that has been marked as paid */\n paidCycle?: number;\n /**\n * The invoice ID that has been marked as paid\n * @format GUID\n */\n invoiceId?: string;\n /**\n * The transaction ID of the payment order that has been marked as paid\n * @format GUID\n */\n paymentTransactionId?: string | null;\n}\n\nexport interface GetSubscriptionRequest {\n /** @format GUID */\n _id: string;\n}\n\nexport interface GetSubscriptionResponse {\n subscription?: Subscription;\n}\n\nexport interface CustomerCancelSubscriptionRequest {\n /** @format GUID */\n _id: string;\n /** Optional action reason message */\n reason?: string | null;\n}\n\nexport interface CustomerCancelSubscriptionResponse {\n subscription?: Subscription;\n}\n\n/**\n * Sent each time a subscription status has been set to Canceled\n * Canceled shows that a subscription was canceled and ended its life cycle as a result of some intervention\n * For example:\n * * A user decided to cancel a subscription before the original end date\n * * A subscription is canceled due to bad payment\n */\nexport interface SubscriptionCanceled {\n subscription?: Subscription;\n actionDetails?: ActionDetails;\n}\n\nexport interface ActionDetails {\n initiator?: HistoryActionInitiatorWithLiterals;\n reason?: string | null;\n}\n\nexport interface CustomerTurnOnAutoRenewalRequest {\n /** @format GUID */\n _id: string;\n /** Optional action reason message */\n reason?: string | null;\n}\n\nexport interface CustomerTurnOnAutoRenewalResponse {\n subscription?: Subscription;\n}\n\nexport interface CustomerTurnOffAutoRenewalRequest {\n /** @format GUID */\n _id: string;\n /** Optional action reason message */\n reason?: string | null;\n}\n\nexport interface CustomerTurnOffAutoRenewalResponse {\n subscription?: Subscription;\n}\n\nexport interface CustomerExtendSubscriptionRequest {\n /**\n * The ID of the subscription to be extended\n * @format GUID\n */\n _id: string;\n /** Optional action reason message */\n reason?: string | null;\n /**\n * For termed - Subscription end date will be updated with the extension period and number of cycles will be added\n * @min 1\n */\n billingCyclesToAdd: number | null;\n}\n\nexport interface CustomerExtendSubscriptionResponse {\n /** The now extended subscription */\n subscription?: Subscription;\n}\n\nexport interface SubscriptionExtended\n extends SubscriptionExtendedExtendPolicyOneOf {\n extensionPeriod?: Duration;\n extensionBillingCycles?: number;\n subscription?: Subscription;\n actionDetails?: ActionDetails;\n}\n\n/** @oneof */\nexport interface SubscriptionExtendedExtendPolicyOneOf {\n extensionPeriod?: Duration;\n extensionBillingCycles?: number;\n}\n\nexport interface QuerySubscriptionsRequest {\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 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 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 QuerySubscriptionsResponse {\n subscriptions?: Subscription[];\n metadata?: 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\nexport interface CountSubscriptionsRequest {\n /** Filters to specify which subscriptions are counted. */\n filter?: CountSubscriptionFilter;\n}\n\nexport interface CountSubscriptionFilter\n extends CountSubscriptionFilterStatusOneOf {\n /** List of statuses to filter the counted subscriptions by. */\n statuses?: SubscriptionStatus;\n /**\n * Predefined status combination to filter the counted subscriptions by.\n * + `ALL`: Includes these subscription statuses: `\"DRAFT\"`, `\"PENDING\"`, `\"ACTIVE\"`, `\"PAUSED\"`, `\"ENDED\"`, and `\"CANCELED\"`.\n * + `LIVE`: Includes these subscription statuses: `\"PENDING\"`, `\"ACTIVE\"`, and `\"PAUSED\"`.\n */\n statusGroup?: SubscriptionStatusGroupWithLiterals;\n /**\n * Customer ID to filter the counted subscriptions by. You can pass a\n * [member ID](https://bo.wix.com/wix-docs/rest/members/members/member-object),\n * [contact ID](https://bo.wix.com/wix-docs/rest/crm/contacts/contacts-v4/contact-object),\n * or the ID of an anonymous site visitor as `customerId`. When providing a\n * `customerId` you must also specify a `paymentMethodId`.\n * @format GUID\n */\n customerId?: string | null;\n /**\n * ID of the payment method to filter the counted subscriptions by.\n * You must provide a `paymentMethodId` when passing a `customerId`.\n * @format GUID\n */\n paymentMethodId?: string | null;\n}\n\n/** @oneof */\nexport interface CountSubscriptionFilterStatusOneOf {\n /** List of statuses to filter the counted subscriptions by. */\n statuses?: SubscriptionStatus;\n /**\n * Predefined status combination to filter the counted subscriptions by.\n * + `ALL`: Includes these subscription statuses: `\"DRAFT\"`, `\"PENDING\"`, `\"ACTIVE\"`, `\"PAUSED\"`, `\"ENDED\"`, and `\"CANCELED\"`.\n * + `LIVE`: Includes these subscription statuses: `\"PENDING\"`, `\"ACTIVE\"`, and `\"PAUSED\"`.\n */\n statusGroup?: SubscriptionStatusGroupWithLiterals;\n}\n\nexport interface SubscriptionStatus {\n /**\n * Statuses to filter the counted subscriptions by.\n *\n * Max: 6 statuses\n * @maxSize 6\n */\n statuses?: SubscriptionStatusEnumSubscriptionStatusWithLiterals[];\n}\n\nexport enum SubscriptionStatusGroup {\n ALL = 'ALL',\n /** Union of ACTIVE, PAUSED and PENDING */\n LIVE = 'LIVE',\n}\n\n/** @enumType */\nexport type SubscriptionStatusGroupWithLiterals =\n | SubscriptionStatusGroup\n | 'ALL'\n | 'LIVE';\n\nexport interface CountSubscriptionsResponse {\n /**\n * List of statuses and the corresponding number of subscriptions that match\n * the filters.\n */\n countByStatus?: CountByStatus[];\n /** Total number of subscriptions that match the filters. */\n total?: number;\n}\n\nexport interface CountByStatus {\n /** Subscription status. */\n status?: SubscriptionStatusEnumSubscriptionStatusWithLiterals;\n /** Number of subscriptions with the status that match the filters. */\n count?: number;\n}\n\nexport interface UpdateSubscriptionPaymentMethodRequest {\n /**\n * Subscription ID\n * @format GUID\n */\n _id: string;\n /** @format GUID */\n paymentMethodId: string;\n}\n\nexport interface UpdateSubscriptionPaymentMethodResponse {\n subscription?: Subscription;\n}\n\nexport interface CustomerAllowedActionsRequest {\n /** @format GUID */\n _id: string;\n}\n\nexport interface CustomerAllowedActionsResponse {\n actions?: Action[];\n}\n\nexport interface Action {\n actionType?: ActionTypeWithLiterals;\n pausePolicies?: PausePolicyWithLiterals[];\n pauseAt?: PauseAtWithLiterals[];\n resumeAt?: ResumeAtWithLiterals[];\n extendPolicies?: ExtendPolicyTypeWithLiterals[];\n}\n\nexport enum ActionType {\n NONE = 'NONE',\n CREATION = 'CREATION',\n CANCEL = 'CANCEL',\n CYCLE_AUTO_RENEW_ON = 'CYCLE_AUTO_RENEW_ON',\n CYCLE_AUTO_RENEW_OFF = 'CYCLE_AUTO_RENEW_OFF',\n PAUSE = 'PAUSE',\n RESUME = 'RESUME',\n MARK_AS_PAID = 'MARK_AS_PAID',\n EXTEND = 'EXTEND',\n UPDATE = 'UPDATE',\n UPDATE_START_DATE = 'UPDATE_START_DATE',\n UPM = 'UPM',\n UPDATE_BILLING_DATE = 'UPDATE_BILLING_DATE',\n UPDATE_COLLECTION_METHOD = 'UPDATE_COLLECTION_METHOD',\n}\n\n/** @enumType */\nexport type ActionTypeWithLiterals =\n | ActionType\n | 'NONE'\n | 'CREATION'\n | 'CANCEL'\n | 'CYCLE_AUTO_RENEW_ON'\n | 'CYCLE_AUTO_RENEW_OFF'\n | 'PAUSE'\n | 'RESUME'\n | 'MARK_AS_PAID'\n | 'EXTEND'\n | 'UPDATE'\n | 'UPDATE_START_DATE'\n | 'UPM'\n | 'UPDATE_BILLING_DATE'\n | 'UPDATE_COLLECTION_METHOD';\n\nexport enum ExtendPolicyType {\n PERIOD = 'PERIOD',\n BILLING_CYCLE = 'BILLING_CYCLE',\n}\n\n/** @enumType */\nexport type ExtendPolicyTypeWithLiterals =\n | ExtendPolicyType\n | 'PERIOD'\n | 'BILLING_CYCLE';\n\nexport interface CustomerListUpcomingChargesRequest {\n /**\n * Subscription id upcoming charge to be previewed for\n * @format GUID\n */\n _id: string;\n}\n\nexport interface CustomerListUpcomingChargesResponse {\n /** Subscription upcoming charge. Will be empty if no more billing scheduled. */\n upcomingCharge?: SubscriptionCharge;\n}\n\nexport interface SubscriptionCharge {\n /** cycle of future charge */\n cycle?: number;\n /** date of the charge */\n billingDate?: Date | null;\n /** breakdown of charge */\n totals?: Totals;\n /** List of items in the invoice */\n invoiceItems?: InvoiceItem[];\n /** Discount details for the invoice */\n discount?: InvoiceDiscount;\n}\n\nexport interface InvoiceItem extends InvoiceItemPaymentTypeOneOf {\n /** Information about a line item that's purchased on a recurring basis. */\n recurring?: Recurring;\n /**\n * Empty object that's available when the line item is purchased a single\n * time, not on a recurring basis.\n */\n oneTime?: OneTime;\n /**\n * ID of the invoice line item.\n * @format GUID\n */\n _id?: string;\n /**\n * ID of the [subscription](https://bo.wix.com/wix-docs/rest/premium/premium-subscriptions-manager/subscription-object)\n * that belongs to the invoice line item.\n * @format GUID\n */\n subscriptionId?: string | null;\n /**\n * Name of the invoice line item.\n * Typically the product name.\n *\n * Max: 200 characters\n * @minLength 1\n * @maxLength 200\n */\n name?: string;\n /**\n * Description of the invoice line item.\n *\n * Max: 500 characters\n * @maxLength 500\n */\n description?: string | null;\n /** Information about the product from the external product catalog. */\n catalogReference?: CatalogReference;\n /**\n * Product category.\n *\n * + `\"UNKNOWN\"`: There is no information about the product category.\n * + `\"PHYSICAL\"`: A physical product that's shipped to the shipping address.\n * + `\"DIGITAL\"`: A digital product that doesn't require shipping.\n */\n category?: ItemCategoryWithLiterals;\n /** Quantity of the invoice line item. */\n quantity?: number;\n /** Information about the invoice line item's price. */\n priceDetails?: PriceDetails;\n /** Information about the invoice line item's totals */\n totals?: Totals;\n /**\n * Information about the invoice line item's tax data\n * @readonly\n */\n taxData?: ItemTaxData;\n /**\n * ID of the [one time] that belongs to the invoice line item.\n * @format GUID\n */\n oneTimeItemId?: string | null;\n /**\n * Key / Value store to keep up to 10 additional values related to the invoice item.\n * Key max length = 50, Value max length = 200. Value can not be empty.\n * Should not include any sensitive or PII information.\n * @maxSize 10\n */\n metadata?: Record<string, string>;\n}\n\n/** @oneof */\nexport interface InvoiceItemPaymentTypeOneOf {\n /** Information about a line item that's purchased on a recurring basis. */\n recurring?: Recurring;\n /**\n * Empty object that's available when the line item is purchased a single\n * time, not on a recurring basis.\n */\n oneTime?: OneTime;\n}\n\nexport interface Recurring {\n /**\n * Number of cycles. Describes how many times a customer purchases the line item\n * on a recurring basis.\n */\n cycleNumber?: number;\n}\n\nexport interface OneTime {}\n\nexport interface PriceDetails {\n /**\n * Price of the invoice line item in `0.00` format.\n * A minus sign (-) indicates that the amount is negative.\n * @format DECIMAL_VALUE\n */\n price?: string;\n /** Information about the invoice line item's tax. */\n tax?: Tax;\n /** Discount that's applied to a specicific invoice line item. */\n discount?: InvoiceDiscount;\n /**\n * Application fee. Set by the origin app, and not by BASS. Wix receives the\n * full `applicationFee`, while the merchant doesn't receive any portion of it.\n */\n applicationFeeDetails?: InvoiceApplicationFee;\n /**\n * Platform fee configuration for this invoice line item. Defines how the platform\n * fee is applied (absorbed by merchant or passed on to customer) and the fee amount\n * (percentage or fixed amount).\n * @readonly\n */\n platformFeeDetails?: InvoicePlatformFee;\n}\n\nexport interface InvoiceDiscount extends InvoiceDiscountValueOneOf {\n /**\n * Discount amount.\n * Available when the discount is an amount.\n *\n * Min: `0.01`\n * @decimalValue options { gt:0.00 }\n */\n amount?: string;\n /**\n * Discount percentage.\n * Available when the discount is a percentage value.\n *\n * Min: `0.01`\n * Max: `100`\n * @decimalValue options { gt:0.00, lte:100 }\n */\n percentage?: string;\n /** Indicates the source of the discount. . Contains app_id and entity_id */\n origin?: DiscountOrigin;\n}\n\n/** @oneof */\nexport interface InvoiceDiscountValueOneOf {\n /**\n * Discount amount.\n * Available when the discount is an amount.\n *\n * Min: `0.01`\n * @decimalValue options { gt:0.00 }\n */\n amount?: string;\n /**\n * Discount percentage.\n * Available when the discount is a percentage value.\n *\n * Min: `0.01`\n * Max: `100`\n * @decimalValue options { gt:0.00, lte:100 }\n */\n percentage?: string;\n}\n\nexport interface InvoiceApplicationFee extends InvoiceApplicationFeeValueOneOf {\n /**\n * Application fee amount. Set by the origin app, and not by BASS. Wix\n * receives the full `applicationFee`, while the merchant doesn't receive\n * any portion of it.\n * @format DECIMAL_VALUE\n */\n amount?: string;\n /** Information about the discount for the invoice line item's application fee. */\n discount?: InvoiceDiscount;\n}\n\n/** @oneof */\nexport interface InvoiceApplicationFeeValueOneOf {\n /**\n * Application fee amount. Set by the origin app, and not by BASS. Wix\n * receives the full `applicationFee`, while the merchant doesn't receive\n * any portion of it.\n * @format DECIMAL_VALUE\n */\n amount?: string;\n}\n\nexport interface InvoicePlatformFee extends InvoicePlatformFeeFeeModelOneOf {\n absorb?: AbsorbFeeConfig;\n passOn?: PassOnFeeConfig;\n}\n\n/** @oneof */\nexport interface InvoicePlatformFeeFeeModelOneOf {\n absorb?: AbsorbFeeConfig;\n passOn?: PassOnFeeConfig;\n}\n\nexport interface AbsorbFeeConfig extends AbsorbFeeConfigValueOneOf {\n percentage?: PercentageFee;\n fixedAmount?: FixedAmountFee;\n}\n\n/** @oneof */\nexport interface AbsorbFeeConfigValueOneOf {\n percentage?: PercentageFee;\n fixedAmount?: FixedAmountFee;\n}\n\nexport interface PercentageFee {\n /** @decimalValue options { gte:0.00, lte:100, maxScale:2 } */\n percentage?: string;\n}\n\nexport interface FixedAmountFee {\n /** @decimalValue options { gte:0.00, maxScale:2 } */\n amount?: string;\n}\n\nexport interface PassOnFeeConfig extends PassOnFeeConfigValueOneOf {\n percentage?: PercentageFee;\n fixedAmount?: FixedAmountFee;\n}\n\n/** @oneof */\nexport interface PassOnFeeConfigValueOneOf {\n percentage?: PercentageFee;\n fixedAmount?: FixedAmountFee;\n}\n\nexport interface ItemTaxData {\n /** Aggregated tax from tax_breakdowns */\n lineItemTaxSummary?: LineItemTaxSummary;\n /**\n * A detailed description of all the tax authorities applied on this item.\n * @minSize 1\n * @maxSize 100\n */\n taxBreakdowns?: TaxBreakdown[];\n}\n\nexport interface LineItemTaxSummary {\n /**\n * Calculated from external tax summary\n * @format DECIMAL_VALUE\n */\n aggregatedTaxAmount?: string;\n /**\n * Aggregated from tax_breakdowns\n * @decimalValue options { gte:0, maxScale:6 }\n */\n aggregatedTaxRate?: string;\n /**\n * Total taxable amount for this line item.\n * @format DECIMAL_VALUE\n * @decimalValue options { maxScale:4 }\n */\n taxableAmount?: string;\n /**\n * Aggregated from tax_breakdowns after applying exemptions\n * @format DECIMAL_VALUE\n * @decimalValue options { maxScale:4 }\n */\n finalTaxAmount?: string | null;\n}\n\nexport interface InitiatePaymentMethodSetupRequest {\n _id: string;\n paymentMode?: PaymentModeWithLiterals;\n paymentSettings?: PaymentSettings;\n}\n\nexport enum PaymentMode {\n NONE = 'NONE',\n /** The latest invoice of the subscription will be charged. */\n CHARGE = 'CHARGE',\n /** An authorization invoice with zero amount will be created. */\n AUTHORIZATION = 'AUTHORIZATION',\n}\n\n/** @enumType */\nexport type PaymentModeWithLiterals =\n | PaymentMode\n | 'NONE'\n | 'CHARGE'\n | 'AUTHORIZATION';\n\nexport interface PaymentSettings {\n /** Allowed payment providers for Subscriptions, for example to limit subscriptions to be created only with \"Wix Payments\" provider. */\n allowedProviderIds?: string[];\n /** payment order method, define how the order was applied */\n orderMethod?: OrderMethodWithLiterals;\n /** Wix Pay callback url(s) to return buyer to a third party system */\n redirectUrls?: RedirectUrls;\n /** @format GUID */\n paymentMethodId?: string | null;\n /**\n * Specifies an alternative origin for processing the payment.\n * When set, the payment order will be created with the specified origin\n * instead of the default origin.\n */\n paymentOrigin?: PaymentOrigin;\n}\n\nexport enum OrderMethod {\n UNKNOWN = 'UNKNOWN',\n MOTO = 'MOTO',\n NOT_MOTO = 'NOT_MOTO',\n}\n\n/** @enumType */\nexport type OrderMethodWithLiterals =\n | OrderMethod\n | 'UNKNOWN'\n | 'MOTO'\n | 'NOT_MOTO';\n\nexport interface RedirectUrls {\n /** URL to redirect buyer in case of approved (successful) transaction (required) */\n successUrl?: string;\n /** URL to redirect buyer in case of failed/rejected transaction (required) */\n errorUrl?: string;\n /** URL to redirect buyer in case of buyer canceled the transaction (optional, default: `{error_url}`) */\n cancelUrl?: string;\n /**\n * URL to redirect buyer in case of pending transaction (that might take some time to process) (optional, default:\n * `{success_url}`)\n */\n pendingUrl?: string;\n}\n\nexport interface PaymentOrigin {\n /**\n * ID of the app for which the Payment will create the order on. For example, Paypal.\n * @format GUID\n */\n appId?: string;\n /**\n * Id of the entity that order will be created on\n * @format GUID\n */\n instanceId?: string;\n}\n\nexport interface InitiatePaymentMethodSetupResponse {\n /** @format GUID */\n paymentOrderId?: string;\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 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}\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 CreateSubscriptionInStateRequest\n extends CreateSubscriptionInStateRequestModeOneOf {\n activeSubscription?: CreateSubscriptionRequest;\n}\n\n/** @oneof */\nexport interface CreateSubscriptionInStateRequestModeOneOf {\n activeSubscription?: CreateSubscriptionRequest;\n}\n\nexport interface CreateSubscriptionRequest {\n subscription?: Subscription;\n /** Optional settings for the payments. Should be empty for free subscriptions. */\n paymentSettings?: PaymentSettings;\n /**\n * Optional unique identifier for this request in order to prevent subscription duplications\n * @format GUID\n */\n idempotencyKey?: string | null;\n /** Optional origin override for setting identity of subscription creator instead of extracting from context */\n originOverride?: OriginOverride;\n}\n\nexport interface OriginOverride {\n /** @format GUID */\n appId?: string;\n /** @format GUID */\n instanceId?: string;\n}\n\nexport interface CreateSubscriptionInStateResponse {\n /** @format GUID */\n subscriptionId?: string;\n}\n\nexport interface PayCycleRequest {\n /** @format GUID */\n subscriptionId: string;\n paymentTestMode?: PaymentTestModeWithLiterals;\n /** @format GUID */\n tenantId: string;\n}\n\nexport enum PaymentTestMode {\n REGULAR = 'REGULAR',\n FAIL_TECHNICAL = 'FAIL_TECHNICAL',\n FAIL_DECLINE = 'FAIL_DECLINE',\n FAIL_RETRYABLE_DECLINE = 'FAIL_RETRYABLE_DECLINE',\n}\n\n/** @enumType */\nexport type PaymentTestModeWithLiterals =\n | PaymentTestMode\n | 'REGULAR'\n | 'FAIL_TECHNICAL'\n | 'FAIL_DECLINE'\n | 'FAIL_RETRYABLE_DECLINE';\n\nexport interface PayCycleResponse {\n /** @format GUID */\n invoiceId?: string;\n /** @format GUID */\n paymentOrderId?: string | null;\n subscription?: Subscription;\n}\n\nexport interface GetFullSubscriptionDataRequest {\n /** @format GUID */\n _id?: string;\n}\n\nexport interface GetFullSubscriptionDataResponse {\n subscription?: Subscription;\n internalSubscriptionData?: InternalSubscriptionData;\n}\n\nexport interface InternalSubscriptionData {\n /** @format GUID */\n originInstanceId?: string;\n source?: string | null;\n billingType?: string;\n isOneTime?: boolean;\n migrationDetails?: MigrationDetails;\n pausePaidDuration?: string | null;\n authorizationPaymentData?: PaymentData;\n currentCyclePausePeriods?: PausePeriod[];\n}\n\nexport interface MigrationDetails {\n /** system (application) where the Subscription has been created */\n originSystem?: string;\n /** date when the Subscription started to be managed in BASS */\n shiftManagementDate?: Date | null;\n}\n\nexport interface PausePeriod {\n startDate?: Date | null;\n endDate?: Date | null;\n}\n\nexport interface GetSubscriptionAndInternalDataRequest {\n /** @format GUID */\n subscriptionId?: string;\n /** @format GUID */\n tenantId?: string;\n}\n\nexport interface GetSubscriptionAndInternalDataResponse {\n subscription?: Subscription;\n internalSubscriptionData?: InternalSubscriptionData;\n}\n\nexport interface SearchSubscriptionRequest {\n /** @format GUID */\n _id?: string;\n /** @format GUID */\n tenantId?: string;\n}\n\nexport interface SearchSubscriptionResponse {\n subscription?: Subscription;\n}\n\nexport interface UpdatePausePaidDurationRequest {\n /** @format GUID */\n subscriptionId?: string;\n /**\n * @min 1\n * @max 10000000\n */\n pausePaidDurationSeconds?: string;\n /** @format GUID */\n tenantId?: string;\n}\n\nexport interface UpdatePausePaidDurationResponse {}\n\nexport interface UpdateStatusRequest {\n /** @format GUID */\n subscriptionId?: string;\n /** @format GUID */\n tenantId?: string;\n status?: SubscriptionStatusEnumSubscriptionStatusWithLiterals;\n}\n\nexport interface UpdateStatusResponse {\n subscription?: Subscription;\n}\n\nexport interface UpdatePaymentStatusRequest {\n /** @format GUID */\n subscriptionId?: string;\n /** @format GUID */\n tenantId?: string;\n paymentStatus?: PaymentStatusWithLiterals;\n}\n\nexport interface UpdatePaymentStatusResponse {\n subscription?: Subscription;\n}\n\nexport interface RemoveCancellationInfoRequest {\n /** @format GUID */\n subscriptionId?: string;\n /** @format GUID */\n tenantId?: string;\n}\n\nexport interface RemoveCancellationInfoResponse {\n subscription?: Subscription;\n}\n\nexport interface ReviveSubscriptionRequest {\n /** @format GUID */\n tenantId?: string;\n /** @format GUID */\n subscriptionId?: string;\n revivePolicy?: RevivePolicyWithLiterals;\n isTestRun?: boolean;\n}\n\nexport enum RevivePolicy {\n SIMPLE = 'SIMPLE',\n RESUME = 'RESUME',\n}\n\n/** @enumType */\nexport type RevivePolicyWithLiterals = RevivePolicy | 'SIMPLE' | 'RESUME';\n\nexport interface ReviveSubscriptionResponse {\n subscription?: Subscription;\n}\n\nexport interface ConvertSapiRequest {\n /** @format GUID */\n subscriptionId?: string;\n}\n\nexport interface ConvertSapiResponse {\n subscription?: Subscription;\n}\n\nexport interface GetSubscriptionInvoicesRequest {\n /** @format GUID */\n _id?: string;\n}\n\nexport interface GetSubscriptionInvoicesResponse {\n invoices?: SubscriptionInvoice[];\n}\n\nexport interface SubscriptionInvoice {\n /** @format GUID */\n _id?: string;\n subscriptionCycle?: number;\n _createdDate?: Date | null;\n}\n\nexport interface FinishFreeTrialNowRequest {\n /** @format GUID */\n subscriptionId?: string;\n /** @format GUID */\n tenantId?: string;\n}\n\nexport interface FinishFreeTrialNowResponse {\n subscription?: Subscription;\n}\n\nexport interface FixSubscriptionTimeCapsuleTasksRequest {\n /** @format GUID */\n subscriptionId?: string;\n /** @format GUID */\n tenantId?: string;\n}\n\nexport interface FixSubscriptionTimeCapsuleTasksResponse {}\n\nexport interface SendTimeCapsuleTaskCanceledBIRequest {\n /** @format GUID */\n tenantId?: string;\n /** @format GUID */\n subscriptionId?: string;\n /** @minLength 1 */\n taskType?: string;\n}\n\nexport interface Empty {}\n\nexport interface ScheduleTimeCapsuleTaskRequest {\n /** @format GUID */\n subscriptionId?: string;\n /** @minLength 1 */\n taskType?: string;\n executionTime?: Date | null;\n /** @format GUID */\n tenantId?: string;\n}\n\nexport interface CancelTimeCapsuleTaskRequest {\n /** @format GUID */\n tenantId?: string;\n /** @format GUID */\n subscriptionId?: string;\n /** @minLength 1 */\n taskType?: string;\n}\n\nexport interface UpdateFullSubscriptionRequest {\n /** @format GUID */\n tenantId?: string;\n subscription?: Subscription;\n}\n\nexport interface UpdateFullSubscriptionResponse {\n subscription?: Subscription;\n}\n\nexport interface UpdateSubscriptionInvoiceCycleRequest {\n /** @format GUID */\n subscriptionId?: string;\n /** @format GUID */\n tenantId?: string;\n /** @format GUID */\n invoiceId?: string;\n subscriptionCycle?: number;\n}\n\nexport interface UpdateSubscriptionInvoiceCycleResponse {\n subscriptionInvoice?: SubscriptionInvoice;\n}\n\nexport interface AddPausePeriodRequest {\n /** @format GUID */\n tenantId?: string;\n /** @format GUID */\n subscriptionId?: string;\n pauseStartDate?: Date | null;\n pauseEndDate?: Date | null;\n}\n\nexport interface AddPausePeriodResponse {\n subscription?: Subscription;\n}\n\nexport interface RunTimeCapsuleTaskNowRequest {\n /** @format GUID */\n tenantId?: string;\n /** @format GUID */\n subscriptionId?: string;\n /** @minLength 1 */\n taskType?: string;\n}\n\nexport interface CreateRecurringInvoiceBORequest {\n /** @format GUID */\n subscriptionId?: string;\n /** @format GUID */\n tenantId?: string;\n /** @min 2 */\n cycleNumber?: number;\n}\n\nexport interface CreateRecurringInvoiceBOResponse {\n invoiceId?: string;\n}\n\nexport interface SetShiftingDataRequest {\n /** @format GUID */\n subscriptionId?: string;\n /** @format GUID */\n tenantId?: string;\n isBassManaged?: boolean;\n shiftManagementDate?: Date | null;\n}\n\nexport interface SetShiftingDataResponse {\n subscription?: Subscription;\n}\n\nexport interface FixSubscriptionInvoicesRequest\n extends FixSubscriptionInvoicesRequestModeOneOf {\n attachInvoice?: AttachInvoice;\n detachInvoice?: DetachInvoice;\n /** @format GUID */\n tenantId?: string;\n /** @format GUID */\n subscriptionId?: string;\n}\n\n/** @oneof */\nexport interface FixSubscriptionInvoicesRequestModeOneOf {\n attachInvoice?: AttachInvoice;\n detachInvoice?: DetachInvoice;\n}\n\nexport interface AttachInvoice {\n /** @format GUID */\n invoiceId?: string;\n}\n\nexport interface DetachInvoice {\n /** @format GUID */\n invoiceId?: string;\n}\n\nexport interface FixSubscriptionInvoicesResponse {\n invoices?: SubscriptionInvoice[];\n}\n\nexport interface RestoreDraftSubscriptionRequest {\n /** @format GUID */\n tenantId?: string;\n /** @format GUID */\n subscriptionId?: string;\n}\n\nexport interface RestoreDraftSubscriptionResponse {\n subscription?: Subscription;\n}\n\nexport interface DeleteDraftSubscriptionRequest {\n /** @format GUID */\n tenantId?: string;\n /** @format GUID */\n subscriptionId?: string;\n}\n\nexport interface DeleteDraftSubscriptionResponse {\n subscription?: Subscription;\n}\n\nexport interface DeleteSubscriptionBORequest {\n /** @format GUID */\n tenantId?: string;\n /** @format GUID */\n subscriptionId?: string;\n}\n\nexport interface DeleteSubscriptionBOResponse {\n subscription?: Subscription;\n}\n\nexport interface CancelSubscriptionBORequest {\n /** @format GUID */\n tenantId?: string;\n /** @format GUID */\n subscriptionId?: string;\n initiator?: ActionInitiatorWithLiterals;\n reason?: string | null;\n}\n\nexport enum ActionInitiator {\n UNDEFINED = 'UNDEFINED',\n BUSINESS = 'BUSINESS',\n CUSTOMER = 'CUSTOMER',\n SYSTEM = 'SYSTEM',\n}\n\n/** @enumType */\nexport type ActionInitiatorWithLiterals =\n | ActionInitiator\n | 'UNDEFINED'\n | 'BUSINESS'\n | 'CUSTOMER'\n | 'SYSTEM';\n\nexport interface CancelSubscriptionBOResponse {\n subscription?: Subscription;\n}\n\nexport interface UpdatePaymentMethodBORequest {\n /** @format GUID */\n tenantId?: string;\n /** @format GUID */\n subscriptionId?: string;\n /** @format GUID */\n paymentMethodId?: string;\n}\n\nexport interface UpdatePaymentMethodBOResponse {\n subscription?: Subscription;\n}\n\nexport interface SendSubscriptionActionEventBORequest\n extends SendSubscriptionActionEventBORequestEventOneOf {\n billingCycleStarted?: SubscriptionBillingCycleStarted;\n /** @format GUID */\n tenantId?: string;\n /** @format GUID */\n subscriptionId?: string;\n}\n\n/** @oneof */\nexport interface SendSubscriptionActionEventBORequestEventOneOf {\n billingCycleStarted?: SubscriptionBillingCycleStarted;\n}\n\nexport interface SubscriptionBillingCycleStarted {\n subscription?: Subscription;\n /**\n * Wix Pay transaction id, optional. Exists if event was triggered by a payment.\n * @format GUID\n */\n paymentTransactionId?: string | null;\n}\n\nexport interface SendSubscriptionActionEventResponse {}\n\nexport interface HandleSubscriptionAfterInvoiceMarkedAsPaidRequest {\n /** @format GUID */\n tenantId?: string;\n /** @format GUID */\n subscriptionId?: string;\n transactionId?: string;\n}\n\nexport interface PauseSubscriptionBORequest {\n /** @format GUID */\n tenantId?: string;\n /** @format GUID */\n subscriptionId?: string;\n pausePolicy?: PausePolicyWithLiterals;\n pauseAt?: PauseAtWithLiterals;\n initiator?: ActionInitiatorWithLiterals;\n /** @maxLength 500 */\n reason?: string | null;\n}\n\nexport interface PauseSubscriptionBOResponse {\n subscription?: Subscription;\n}\n\nexport interface FixSubscriptionInvoicesConsistencyRequest {\n /** @format GUID */\n tenantId?: string;\n /** @format GUID */\n subscriptionId?: string;\n}\n\nexport interface FixSubscriptionInvoicesConsistencyResponse {}\n\nexport interface SetIsMigratedEvent {\n /** @format GUID */\n subscriptionId?: string;\n}\n\nexport interface SubscriptionDelayedSyncEvent {\n /** @format GUID */\n subscriptionId?: string;\n}\n\nexport interface InvoiceAction extends InvoiceActionActionTypeOneOf {\n payRecurring?: PayRecurringInvoice;\n}\n\n/** @oneof */\nexport interface InvoiceActionActionTypeOneOf {\n payRecurring?: PayRecurringInvoice;\n}\n\nexport interface PayRecurringInvoice {\n /** @format GUID */\n invoiceId?: string;\n}\n\n/**\n * Sent each time a subscription status has been set to Active\n * Active shows that a subscription is live and operational.\n * For example:\n * * For subscription with free trial, free trial start date is also the activation date.\n * * For a subscription with future start date, the start date is also the activation date.\n * * When a subscription is resumed from a pause status, the resume date is also the activation date.\n */\nexport interface SubscriptionActivated {\n subscription?: Subscription;\n}\n\n/**\n * Sent each time a subscription status has been set to Ended\n * Ended shows that a subscription reached its end date and ended its life cycle as a result of the agreement.\n * This is different from a Canceled subscription which ends the subscription before a designated end date.\n * Therefore, Ended and Canceled are mutually exclusive.\n */\nexport interface SubscriptionEnded {\n subscription?: Subscription;\n}\n\nexport interface SubscriptionInitialPurchaseCompleted {\n subscription?: Subscription;\n actionDetails?: ActionDetails;\n /** @format GUID */\n paymentTransactionId?: string | null;\n}\n\nexport interface SubscriptionCycleReadyToPay {\n subscription?: Subscription;\n}\n\nexport interface SubscriptionRevived {\n subscription?: Subscription;\n}\n\nexport interface CreateSubscriptionResponse {\n subscription?: Subscription;\n /**\n * Payments order that should be paid (or authorize card) in order to activate subscription. Empty for free subscriptions.\n * @format GUID\n */\n paymentOrderId?: string | null;\n}\n\nexport interface UpdateSubscriptionRequest {\n /** Revision is validated if Subscription.revision is set */\n subscription?: Subscription;\n /**\n * Supported field: start_date\n * Can be updated only if Subscription is in Draft state\n */\n fieldMask?: string[];\n}\n\nexport interface UpdateSubscriptionResponse {\n subscription?: Subscription;\n}\n\nexport interface UpdateSubscriptionStartDateRequest {\n /**\n * Subscription ID\n * @format GUID\n */\n _id?: string;\n /**\n * Can be updated only if Subscription is in Draft state\n * By setting start_date in the future, end_date will be recalculated for termed Subscriptions\n * cycles_to_pay_on_creation will be set to 1 if no free trial is set\n */\n startDate?: Date | null;\n}\n\nexport interface UpdateSubscriptionStartDateResponse {\n subscription?: Subscription;\n}\n\nexport interface BassToSapiPaypalMigrationRequest {\n /**\n * Subscription ID\n * @format GUID\n */\n _id?: string;\n collectionMethod?: CollectionMethodEnumCollectionMethodWithLiterals;\n}\n\nexport interface BassToSapiPaypalMigrationResponse {\n subscription?: Subscription;\n}\n\nexport interface UpdateSubscriptionPoliciesRequest {\n /**\n * Subscription ID\n * @format GUID\n */\n _id?: string;\n cancellableByCustomer?: boolean | null;\n}\n\nexport interface UpdateSubscriptionPoliciesResponse {\n /** Updated policies of the subscription */\n policies?: SubscriptionPolicies;\n}\n\nexport interface UpdateSubscriptionBillingDateRequest {\n /**\n * ID of the subscription to update the billing date for.\n * @format GUID\n */\n _id: string;\n /** New billing date in `YYYY-MM-DDThh:mm:ss:sssZ` format. */\n billingDate: Date | null;\n /**\n * Information about how BASS adjusts the total of the next invoice. Extending\n * the current billing cycle results in a higher payment, while shortening it\n * leads to a lower payment. BASS offers automatic calculation of the proration\n * amount based on the number of days added to or removed from the current billing\n * cycle. Alternatively, you can use your own custom method to calculate the\n * proration amount. The custom proration amount can't exceed the total of the\n * current billing cycle.\n */\n proration?: Proration;\n}\n\nexport interface UpdateSubscriptionBillingDateResponse {\n /** Updated subscription. */\n subscription?: Subscription;\n}\n\nexport interface SubscriptionBillingDateUpdated {\n subscription?: Subscription;\n billingDate?: Date | null;\n proration?: Proration;\n}\n\nexport interface UpdateSubscriptionOriginRequest {\n /**\n * ID of the subscription to update origin.\n * @format GUID\n */\n _id?: string;\n /**\n * Origin entity ID of the subscription to update.\n * @format GUID\n */\n entityId?: string;\n}\n\nexport interface UpdateSubscriptionOriginResponse {\n /** Updated subscription. */\n subscription?: Subscription;\n}\n\nexport interface ReviseSubscriptionRequest {\n /**\n * Subscription ID\n * @format GUID\n */\n _id?: string;\n /**\n * 0 for no revision, maxSize is 100\n * @maxSize 100\n */\n items?: Item[];\n}\n\nexport interface ReviseSubscriptionResponse {\n subscription?: Subscription;\n}\n\nexport interface UpdateSubscriptionItemsRequest {\n /**\n * Subscription ID\n * @format GUID\n */\n _id?: string;\n /** Update action. For RESET_PENDING_UPDATES, nothing but the subscription ID should be defined in the request. */\n updateAction?: UpdateActionWithLiterals;\n /** Updates execution date. Relevant only for UpdateAction.SPECIFIC_DATE. Only specific date is supported. */\n scheduleAdditionalInfo?: ScheduleAdditionalInfo;\n /**\n * Existing items to update\n * @maxSize 100\n */\n itemsToUpdate?: ItemChange[];\n /**\n * Items to add\n * @maxSize 99\n */\n itemsToAdd?: Item[];\n /**\n * Existing items to delete\n * @format GUID\n * @maxSize 99\n */\n itemsToDelete?: string[] | null;\n}\n\nexport enum UpdateAction {\n NONE = 'NONE',\n /** Update subscription immediately, please note proration for updates changing price are not yet supported */\n IMMEDIATELY = 'IMMEDIATELY',\n /** Request updates that will take affect only at the start of the next billing cycle. */\n NEXT_BILLING_CYCLE = 'NEXT_BILLING_CYCLE',\n /** Reset all pending updates */\n RESET_PENDING_UPDATES = 'RESET_PENDING_UPDATES',\n /** Request updates that will take affect only at a specific date. */\n SPECIFIC_DATE = 'SPECIFIC_DATE',\n}\n\n/** @enumType */\nexport type UpdateActionWithLiterals =\n | UpdateAction\n | 'NONE'\n | 'IMMEDIATELY'\n | 'NEXT_BILLING_CYCLE'\n | 'RESET_PENDING_UPDATES'\n | 'SPECIFIC_DATE';\n\nexport interface ScheduleAdditionalInfo\n extends ScheduleAdditionalInfoParamOneOf {\n /**\n * Future date when the update becomes effective in `YYYY-MM-DDThh:mm:ss.sssZ`\n * format. The use of this field may be restricted in various BASS endpoints.\n * For example, in _Bulk Update Subscription Items_ it's only available in\n * combination with `{\"updateAction\": \"SPECIFIC_DATE\"}`, in _Resume Subscription_\n * only in combination with `{\"resumeAt\": \"SPECIFIC_DATE\"}`, and in\n * _Pause Subscription_ only in combination with `{\"pauseAt\": \"SPECIFIC_DATE\"}`.\n */\n specificDate?: Date | null;\n /**\n * When the update becomes effective, as number of billing cycles from now.\n * The use of this field may be restricted in various BASS endpoints.\n * For example, in _Pause Subscription_ it's only available in\n * combination with `{\"pauseAt\": \"NUMBER_OF_CYCLES_FROM_TODAY\"}`.\n * __Note__: Currently not supported in _Bulk Update Subscription Items by Filter_.\n * @min 1\n */\n numberOfCycles?: number;\n}\n\n/** @oneof */\nexport interface ScheduleAdditionalInfoParamOneOf {\n /**\n * Future date when the update becomes effective in `YYYY-MM-DDThh:mm:ss.sssZ`\n * format. The use of this field may be restricted in various BASS endpoints.\n * For example, in _Bulk Update Subscription Items_ it's only available in\n * combination with `{\"updateAction\": \"SPECIFIC_DATE\"}`, in _Resume Subscription_\n * only in combination with `{\"resumeAt\": \"SPECIFIC_DATE\"}`, and in\n * _Pause Subscription_ only in combination with `{\"pauseAt\": \"SPECIFIC_DATE\"}`.\n */\n specificDate?: Date | null;\n /**\n * When the update becomes effective, as number of billing cycles from now.\n * The use of this field may be restricted in various BASS endpoints.\n * For example, in _Pause Subscription_ it's only available in\n * combination with `{\"pauseAt\": \"NUMBER_OF_CYCLES_FROM_TODAY\"}`.\n * __Note__: Currently not supported in _Bulk Update Subscription Items by Filter_.\n * @min 1\n */\n numberOfCycles?: number;\n}\n\nexport interface UpdateSubscriptionItemsResponse {\n subscription?: Subscription;\n}\n\nexport interface BulkUpdateSubscriptionItemsByFilterRequest {\n /**\n * Filter to identify the subscriptions for which items are updated. For\n * supported fields see\n * [Search and Query: Bulk Update Subscription Items By Filter](https://bo.wix.com/wix-docs/rest/drafts/subscriptions-by-billing-by-wix/search-and-query#drafts_subscriptions-by-billing-by-wix_search-and-query_bulk-update-subscription-items-by-filter).\n * Sending an empty subscription filter results in a validation error.\n * In case you pass `{\"updateAction\": \"RESET_PENDING_UPDATES\"}`, use only the\n * `subscriptionId` field inside this filter. Passing any other filter results\n * in a failed validation error.\n */\n subscriptionFilter?: Record<string, any> | null;\n /**\n * Filter to specify which subscription items are updated. Make sure to use\n * the catalog item ID and not the item's unique ID. All subscription items\n * with matching `items.catalogReference.catalogItemId` are updated.\n *\n * Max: `100` reference catalog item IDs\n * @format GUID\n * @maxSize 100\n */\n catalogReferenceIds?: string[] | null;\n /**\n * Information about the update timing and update type.\n *\n * + `\"IMMEDIATELY\"`: The updates become effective immediately.\n * + `\"NEXT_BILLING_CYCLE\"`: The updates are scheduled for the beginning of the next billing cycle.\n * + `\"SPECIFIC_DATE\"`: The updates are scheduled for the date specified in `scheduleAdditionalInfo.specificDate`.\n * + `\"RESET_PENDING_UPDATES\"`: All currently scheduled updates for the specified supcriptions are canceled. Use only the `subscriptionId` field inside `subscriptionFilter`, all other filters result in failed validation errors.\n */\n updateAction?: UpdateActionWithLiterals;\n /**\n * Additional information for updates. Currently, only supported for\n * `{\"updateAction\": \"SPECIFIC_DATE\"}`.\n */\n scheduleAdditionalInfo?: ScheduleAdditionalInfo;\n /**\n * Update details for the susbcription items that match the filtering.\n * Currently, you can update only the item price, quantity, and tax. Note\n * that all item properties are updated to the same values. In case you want set\n * different values for individual items, you must call\n * _Bulk Update Subscription Items By Filter_ multiple times, once per unique update.\n */\n bulkItemUpdateData?: BulkItemChange;\n /**\n * __Not implemented yet__. Items to add to the subscriptions matching the filtering.\n * @maxSize 99\n */\n itemsToAdd?: Item[];\n}\n\nexport interface BulkItemChange {\n /** Information about the new item price. */\n pricingModel?: PricingModel;\n /**\n * New item quantity.\n *\n * Min: `1`\n * @min 1\n */\n quantity?: number | null;\n /** Information about the new item tax. */\n tax?: Tax;\n}\n\nexport interface BulkUpdateSubscriptionItemsByFilterResponse {\n /**\n * ID of your bulk job. You can use\n * [this Async Infra call](https://pbo.wix.com/fire-console/?artifact=com.wixpress.asyncinfra.async-job-service&service=wix.infra.asyncjobs.v1.AsyncJobService&method=ListAsyncJobItems&body=eyJqb2JfaWQiOiIifQ%3D%3D)\n * to retrieve information about the job status.\n */\n jobId?: string;\n}\n\nexport interface DeleteSubscriptionRequest {\n /** @format GUID */\n _id?: string;\n revision?: string;\n}\n\nexport interface DeleteSubscriptionResponse {}\n\nexport interface CancelSubscriptionRequest {\n /** @format GUID */\n _id: string;\n actionContext: ActionContext;\n}\n\nexport interface ActionContext {\n initiator?: ActionInitiatorWithLiterals;\n /** Optional action reason message */\n reason?: string | null;\n}\n\nexport interface CancelSubscriptionResponse {\n subscription?: Subscription;\n}\n\nexport interface PauseSubscriptionRequest {\n /** @format GUID */\n _id: string;\n pausePolicy?: PausePolicyWithLiterals;\n pauseAt?: PauseAtWithLiterals;\n /** contains additional scheduling information for certain pause_at options (for example: SPECIFIC_DATE & NUMBER_OF_CYCLES_FROM_TODAY) */\n pauseAtSchedule?: ScheduleAdditionalInfo;\n /** contains additional scheduling information for certain auto_resume_at either specific date */\n autoResumeAtSchedule?: ScheduleAdditionalInfo;\n actionContext: ActionContext;\n}\n\nexport interface PauseSubscriptionResponse {\n subscription?: Subscription;\n}\n\nexport interface SubscriptionPaused {\n subscription?: Subscription;\n pausePolicy?: PausePolicyWithLiterals;\n actionDetails?: ActionDetails;\n}\n\nexport interface PauseSubscriptionRequested {\n subscription?: Subscription;\n pauseAt?: PauseAtWithLiterals;\n pausePolicy?: PausePolicyWithLiterals;\n actionDetails?: ActionDetails;\n}\n\nexport interface ScheduledPauseCanceled {\n subscription?: Subscription;\n actionDetails?: ActionDetails;\n}\n\nexport interface ResumeSubscriptionRequest {\n /** @format GUID */\n _id: string;\n resumeAt?: ResumeAtWithLiterals;\n /** contains additional scheduling information for certain resume_at options (for example: SPECIFIC_DATE) */\n resumeAtSchedule?: ScheduleAdditionalInfo;\n actionContext: ActionContext;\n}\n\nexport interface ResumeSubscriptionResponse {\n subscription?: Subscription;\n}\n\nexport interface SubscriptionResumed {\n subscription?: Subscription;\n actionDetails?: ActionDetails;\n}\n\nexport interface ResumeSubscriptionRequested {\n subscription?: Subscription;\n resumeAt?: ResumeAtWithLiterals;\n actionDetails?: ActionDetails;\n}\n\nexport interface ScheduledResumeCanceled {\n subscription?: Subscription;\n actionDetails?: ActionDetails;\n}\n\nexport interface SearchSubscriptionsRequest\n extends SearchSubscriptionsRequestPagingMethodOneOf {\n /** Limit number of results and enable to skip rows. The default limit is 25. */\n paging?: Paging;\n /** A Cursor option for efficient paging. Pass this field from the previous search response to continue to the next page. */\n cursor?: CursorPaging;\n /** A filter object */\n filter?: any;\n /** A Sorting option by field name and order. */\n sorting?: SortingClauses;\n}\n\n/** @oneof */\nexport interface SearchSubscriptionsRequestPagingMethodOneOf {\n /** Limit number of results and enable to skip rows. The default limit is 25. */\n paging?: Paging;\n /** A Cursor option for efficient paging. Pass this field from the previous search response to continue to the next page. */\n cursor?: CursorPaging;\n}\n\nexport interface SortingClauses {\n sorting?: Sorting[];\n}\n\nexport interface SearchSubscriptionsResponse {\n subscriptions?: Subscription[];\n cursor?: CursorPaging;\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Total number of items matching the filter. Available only on the first page of *Search* */\n total?: number | null;\n}\n\nexport interface TurnOnSubscriptionAutoRenewalRequest {\n /** @format GUID */\n _id: string;\n actionContext: ActionContext;\n}\n\nexport interface TurnOnSubscriptionAutoRenewalResponse {\n subscription?: Subscription;\n}\n\nexport interface SubscriptionAutoRenewalTurnedOn {\n subscription?: Subscription;\n actionDetails?: ActionDetails;\n}\n\nexport interface TurnOffSubscriptionAutoRenewalRequest {\n /** @format GUID */\n _id: string;\n actionContext: ActionContext;\n}\n\nexport interface TurnOffSubscriptionAutoRenewalResponse {\n subscription?: Subscription;\n}\n\nexport interface SubscriptionAutoRenewalTurnedOff {\n subscription?: Subscription;\n actionDetails?: ActionDetails;\n}\n\nexport interface MarkLatestInvoiceAsPaidRequest {\n /**\n * The ID of the offline subscription to mark as paid its latest invoice\n * @format GUID\n */\n subscriptionId: string;\n}\n\nexport interface MarkLatestInvoiceAsPaidResponse {\n subscription?: Subscription;\n}\n\nexport interface LatestInvoiceMarkedAsPaid {\n subscription?: Subscription;\n}\n\nexport interface MultipleSubscriptionsOnOrdersInvoice {\n /**\n * the invoice id of the affected subscription\n * @format GUID\n */\n invoiceId?: string;\n /**\n * the order id of the affected subscription\n * @format GUID\n */\n orderId?: string;\n}\n\nexport interface MarkBillingCycleAsPaidRequest {\n /**\n * The ID of the subscription to mark as paid its invoice.\n * @format GUID\n */\n subscriptionId: string;\n /**\n * The subscription cycle for which the invoice is to be marked as paid.\n * If left empty, the most recent cycle will be selected.\n * @min 1\n */\n paidCycle?: number | null;\n}\n\nexport interface MarkBillingCycleAsPaidResponse {\n subscription?: Subscription;\n}\n\nexport interface GetSubscriptionsStatsRequest {}\n\nexport interface GetSubscriptionsStatsResponse {\n amountByStatuses?: AmountByStatus[];\n total?: number;\n}\n\nexport interface AmountByStatus {\n status?: SubscriptionStatusEnumSubscriptionStatusWithLiterals;\n amount?: number;\n}\n\nexport interface ExtendSubscriptionRequest\n extends ExtendSubscriptionRequestExtendPolicyOneOf {\n /** User won't be charged for additional period added on top of subscription end date. */\n extensionPeriod?: Duration;\n /**\n * user will be charged for billing cycles added\n * @min 1\n */\n extensionBillingCycles?: number;\n /**\n * The ID of the subscription to be extended\n * @format GUID\n */\n _id: string;\n actionContext: ActionContext;\n}\n\n/** @oneof */\nexport interface ExtendSubscriptionRequestExtendPolicyOneOf {\n /** User won't be charged for additional period added on top of subscription end date. */\n extensionPeriod?: Duration;\n /**\n * user will be charged for billing cycles added\n * @min 1\n */\n extensionBillingCycles?: number;\n}\n\nexport interface ExtendSubscriptionResponse {\n /** The now extended subscription */\n subscription?: Subscription;\n}\n\nexport interface AllowedActionsRequest {\n /** @format GUID */\n _id: string;\n /**\n * List of additional fields to be included in the response.\n * @maxSize 1\n */\n fields?: RequestedFieldsWithLiterals[];\n}\n\nexport enum RequestedFields {\n UNKNOWN_REQUESTED_FIELD = 'UNKNOWN_REQUESTED_FIELD',\n /** Include unsupported action list, including the reasons for the lack of support */\n UNSUPPORTED_ACTION = 'UNSUPPORTED_ACTION',\n}\n\n/** @enumType */\nexport type RequestedFieldsWithLiterals =\n | RequestedFields\n | 'UNKNOWN_REQUESTED_FIELD'\n | 'UNSUPPORTED_ACTION';\n\nexport interface AllowedActionsResponse {\n /** List of actions that are allowed. */\n actions?: Action[];\n /**\n * List of actions that are not supported, included only if requested. Provides reasons for each unsupported action.\n * @maxSize 20\n */\n unsupportedActions?: UnsupportedAction[];\n}\n\nexport interface UnsupportedAction {\n actionType?: ActionTypeWithLiterals;\n /**\n * Provides detailed reasons for the unsupported action. Each `UnsupportedReason` includes a code and a message explaining why the action is not allowed.\n * @maxSize 20\n */\n reasons?: UnsupportedReason[];\n}\n\nexport interface UnsupportedReason {\n code?: string;\n description?: string | null;\n}\n\nexport interface ListUpcomingChargesRequest {\n /**\n * Subscription id charges to be previewed for\n * @format GUID\n */\n subscriptionId: string;\n /** Period of time to provide charged for. If not provided,then only next charge will be returned. */\n customDuration?: Duration;\n /**\n * Date of the next billing cycle so that the upcoming charges will be calculated accordingly.\n * If not provided, the upcoming charges will be calculated according to the existing next billing date.\n */\n nextBillingDate?: Date | null;\n}\n\nexport interface ListUpcomingChargesResponse {\n upcomingCharges?: SubscriptionCharge[];\n}\n\nexport interface PreviewSubscriptionChargesRequest\n extends PreviewSubscriptionChargesRequestSubscriptionOneOf {\n /** Information about a non-existing subscription. */\n subscriptionInfo?: SubscriptionInfo;\n}\n\n/** @oneof */\nexport interface PreviewSubscriptionChargesRequestSubscriptionOneOf {\n /** Information about a non-existing subscription. */\n subscriptionInfo?: SubscriptionInfo;\n}\n\n/** Subscription information to use for calculating the preview of charges for a subscription. */\nexport interface SubscriptionInfo {\n billingSettings?: BillingSettings;\n items?: Item[];\n startDate?: Date | null;\n}\n\nexport interface PreviewSubscriptionChargesResponse {\n /** Charges for subscription. */\n charges?: Charge[];\n}\n\n/** Represents a charge applicable to a subscription. */\nexport interface Charge {\n /** The cycle number from which the charge starts. */\n cycleFrom?: number;\n /** The number of cycles for which the charge is applicable. */\n cycleCount?: number | null;\n /** The breakdown of the charge */\n totals?: Totals;\n /** The billing date from which the charge starts */\n cycleBillingDate?: Date | null;\n}\n\nexport interface PreviewSubscriptionsChargesRequest {\n /**\n * Information required to calculate the preview charges for the subscriptions, including an identifier.\n * @minSize 1\n * @maxSize 10\n */\n subscriptionsBillingDetails?: SubscriptionBillingDetails[];\n /**\n * Specifies the number of upcoming billing charges to preview for all subscriptions in the order.\n * For instance, if a subscription costs $10 for the first 3 cycles, $12 for cycles 4 through 7,\n * $15 for cycles 8 through 10, and $20 for cycle 11 onwards:\n * - Sending \"1\" will calculate and return charges for cycles 4 through 7 since it's the first charge in the future.\n * - Sending \"2\" will provide a response with charges for cycles 4 through 7 and cycles 8 through 10.\n * - Sending \"3\" or more will include totals for cycles 4 through 7, cycles 8 through 10, and from cycle 11 onwards.\n * If no value is provided, the response will include charges for all upcoming cycles, including the existing one,\n * in this case, charges for cycle 1 through 3.\n * If there is a single charge for a subscription, meaning that subscription price remains consistent across all cycles,\n * then even if future_charges_count is set, it will be ignored and the only charge this subscription has will be returned.\n * @min 1\n * @max 10\n */\n numberOfNextRecurringCharges?: number | null;\n}\n\nexport interface SubscriptionBillingDetails {\n /**\n * External identifier of the subscription\n * @format GUID\n */\n externalId?: string | null;\n /** Billing details parameters including schedule, currency, etc. */\n billingSettings?: BillingSettings;\n /**\n * Items, minSize is 1, maxSize is 100\n * @minSize 1\n * @maxSize 100\n */\n items?: Item[];\n /** Subscription start date, now if not set */\n startDate?: Date | null;\n /** Shipping address associated with subscription. At the moment used only for payments. Optional. */\n shippingAddress?: FullAddressDetails;\n}\n\nexport interface PreviewSubscriptionsChargesResponse {\n /** Charges for the subscriptions, including an identifier. */\n subscriptionsCharges?: SubscriptionCharges[];\n}\n\nexport interface SubscriptionCharges {\n /**\n * External identifier of the subscription\n * @format GUID\n */\n externalId?: string | null;\n /** Charges for subscription. */\n charges?: Charge[];\n}\n\nexport interface CreateSubscriptionForOrderRequest {\n /** Subscription needs to be created */\n subscription?: Subscription;\n /**\n * Optional unique identifier for this request in order to prevent subscription duplications\n * @format GUID\n */\n idempotencyKey?: string | null;\n}\n\nexport interface CreateSubscriptionForOrderResponse {\n /** Created subscription */\n subscription?: Subscription;\n /** Non-persistent invoice */\n invoice?: Invoice;\n}\n\n/** An invoice includes information about the subscription and the customer. */\nexport interface Invoice {\n /**\n * Invoice ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Date and time the invoice was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the invoice was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Revision number, which increments by 1 each time the invoice is updated.\n * To prevent conflicting changes,\n * the current revision must be passed when updating the invoice.\n *\n * Ignored when creating a invoice.\n * @readonly\n */\n revision?: string | null;\n /** Information about the invoice origin. */\n origin?: BusinessOriginData;\n /**\n * Invoice status.\n *\n * + `\"UNKNOWN\"`: There is no information about the invoice status.\n * + `\"OPEN\"`: BASS has created the invoice but hasn't initiated the payment process.\n * + `\"PAID\"`: The customer has successfully paid for the invoice.\n * + `\"ATTEMPT_FAILED\"`: The payment process has started and there has been at least one unsuccessful payment attempt.\n * + `\"FAILED\"`: The payment process has failed and there are no more retries.\n * + `\"CANCELED\"`: The payment process has been stopped because the related subscription has been canceled.\n * @readonly\n */\n status?: InvoiceStatusWithLiterals;\n /**\n * 3-letter currency code of the invoice in\n * [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.\n * @format CURRENCY\n */\n currency?: string;\n /** Information about the customer. */\n customer?: Customer;\n /**\n * Whether the payment is processed through Wix and whether the customer must provide some input.\n *\n * + `\"UNKNOWN\"`: There is no information about the collection method.\n * + `\"AUTO_CHARGE\"`: The customer pays automatically through Wix.\n * + `\"SEND_INVOICE\"`: The customer pays through Wix, but some manual input is required.\n * + `\"OFFLINE\"`: The customer pays outside of Wix.\n */\n collectionMethod?: CollectionMethodWithLiterals;\n /**\n * ID of the\n * [payment method](https://bo.wix.com/wix-docs/rest/wix-cashier/settings/payment-method-type/payment-method-type-object).\n * Not available for the first payment of a subscription and all offline\n * payments.\n * @format GUID\n */\n paymentMethodId?: string | null;\n /**\n * Cashier [Order ID](https://dev.wix.com/docs/rest/payments/wix-cashier/pay/order#order-object)\n * for the corresponding payment.\n * @format GUID\n * @readonly\n */\n paymentOrderId?: string | null;\n /** Information about a discount. Available only for invoices that include a discount. */\n discount?: InvoiceDiscount;\n /** Billing address. */\n billingAddress?: FullAddressDetails;\n /** Shipping address. Available only for `\"PHYSICAL\"` line items. */\n shippingAddress?: FullAddressDetails;\n /**\n * Shipping fee in `0.00` format.\n * @format DECIMAL_VALUE\n */\n shippingFee?: string | null;\n /**\n * Information about the invoice's totals.\n * @readonly\n */\n totals?: Totals;\n /** Line items belonging to the invoice. */\n invoiceItems?: InvoiceItem[];\n /**\n * Whether the invoice is used to validate payment details.\n *\n * + `true`: BASS uses the invoice to test payment details. Relevant for free trials. Ensures that Wix can collect the payment of the first billing cycle.\n * + `false`: Standard invoice.\n */\n isAuthorization?: boolean | null;\n /** Whether the invoice's `totals.totalPrice` includes tax. */\n isTaxInclusive?: boolean | null;\n /** Details of the latest payment attempt. */\n latestPaymentAttempt?: LatestPaymentAttempt;\n /** List of charges and credits that adjust the invoice's `totals.totalPrice`. */\n adjustments?: PriceAdjustment[];\n /**\n * Invoice Number.\n * @maxLength 10\n * @readonly\n */\n invoiceNumber?: string | null;\n /**\n * Shipping charges for the invoice.\n * Supports only one discount without cycles.\n * Discounts with cycles (repeated discounts across different billing cycles) are not supported for shipping\n */\n shippingCharges?: InvoiceShippingCharges;\n /** Information about the invoice tax */\n taxData?: TaxData;\n /** Business address. */\n businessAddress?: Address;\n /**\n * ID of the billing order that created this invoice.\n * @format GUID\n */\n orderId?: string | null;\n /**\n * Platform origin the invoice is originated from.\n * @format GUID\n */\n platformOriginAppId?: string | null;\n /**\n * Refund information, provided that there are refunds for this invoice.\n * @readonly\n */\n refundInfo?: RefundInfo;\n}\n\nexport interface BusinessOriginData {\n /**\n * ID of the app for which BASS has created the invoice. For example,\n * `\"1380b703-ce81-ff05-f115-39571d94dfcd\"` for the Wix eCommerce app.\n * @format GUID\n */\n appId?: string;\n /**\n * [Instance ID](https://dev.wix.com/api/rest/app-management/apps/app-instance/get-app-instance)\n * of the app for which BASS has created the invoice.\n * @format GUID\n */\n instanceId?: string;\n /**\n * ID of the entity that triggered the invoice creation. For example, the ID of a\n * [pricing plan](https://dev.wix.com/docs/rest/payments/pricing-plans/pricing-plans/plan#plan-object).\n * @format GUID\n */\n entityId?: string;\n}\n\nexport enum InvoiceStatus {\n UNKNOWN = 'UNKNOWN',\n OPEN = 'OPEN',\n PAID = 'PAID',\n FAILED = 'FAILED',\n ATTEMPT_FAILED = 'ATTEMPT_FAILED',\n CANCELED = 'CANCELED',\n REFUNDED = 'REFUNDED',\n}\n\n/** @enumType */\nexport type InvoiceStatusWithLiterals =\n | InvoiceStatus\n | 'UNKNOWN'\n | 'OPEN'\n | 'PAID'\n | 'FAILED'\n | 'ATTEMPT_FAILED'\n | 'CANCELED'\n | 'REFUNDED';\n\nexport enum CollectionMethod {\n UNKNOWN = 'UNKNOWN',\n AUTO_CHARGE = 'AUTO_CHARGE',\n OFFLINE = 'OFFLINE',\n SEND_INVOICE = 'SEND_INVOICE',\n}\n\n/** @enumType */\nexport type CollectionMethodWithLiterals =\n | CollectionMethod\n | 'UNKNOWN'\n | 'AUTO_CHARGE'\n | 'OFFLINE'\n | 'SEND_INVOICE';\n\nexport enum CreationMode {\n UNKNOWN = 'UNKNOWN',\n SYSTEM = 'SYSTEM',\n MANUAL = 'MANUAL',\n}\n\n/** @enumType */\nexport type CreationModeWithLiterals =\n | CreationMode\n | 'UNKNOWN'\n | 'SYSTEM'\n | 'MANUAL';\n\nexport interface LatestPaymentAttempt {\n /**\n * ID of the latest payment attempt.\n * @format GUID\n * @readonly\n */\n paymentAttemptId?: string;\n /**\n * Date and time of the latest payment attempt in `YYYY-MM-DDThh:mm.sssZ` format.\n * @readonly\n */\n dateAttempt?: Date | null;\n /** Number of the latest payment attempt. */\n attemptNumber?: number;\n /**\n * Status of the latest payment attempt.\n *\n * + `\"UNKNOWN\"`: There is no information about the status of the latest payment attempt.\n * + `\"SCHEDULED\"`: The latest payment attempt is scheduled but hasn't started yet.\n * + `\"IN_PROGRESS\"`: The latest payment attempt is in progress.\n * + `\"PAID\"`: The latest payment attempt resulted in a successful payment.\n * + `\"DECLINED\"`: The latest payment attempt has been declined.\n * + `\"TECHNICAL_FAILURE\"`: The latest payment attempt couldn't be process due to a technical failure.\n * + `\"CANCELED\"`: The latest payment attempt has been canceled by BASS.\n * @readonly\n */\n status?: PaymentAttemptStatusWithLiterals;\n /**\n * Whether BASS tries to collect the payment another time. Available only when\n * `latestPaymentAttempt.status` is set to `\"DECLINED\"`.\n */\n retryable?: boolean;\n}\n\nexport enum PaymentAttemptStatus {\n UNKNOWN = 'UNKNOWN',\n SCHEDULED = 'SCHEDULED',\n IN_PROGRESS = 'IN_PROGRESS',\n PAID = 'PAID',\n DECLINED = 'DECLINED',\n TECHNICAL_FAILURE = 'TECHNICAL_FAILURE',\n CANCELED = 'CANCELED',\n PENDING = 'PENDING',\n}\n\n/** @enumType */\nexport type PaymentAttemptStatusWithLiterals =\n | PaymentAttemptStatus\n | 'UNKNOWN'\n | 'SCHEDULED'\n | 'IN_PROGRESS'\n | 'PAID'\n | 'DECLINED'\n | 'TECHNICAL_FAILURE'\n | 'CANCELED'\n | 'PENDING';\n\nexport interface PriceAdjustment extends PriceAdjustmentAdjustmentTypeOneOf {\n /** Adjustment that increases the price. */\n charge?: PriceAdjustmentValue;\n /** Adjustment that lowers the price. */\n credit?: PriceAdjustmentValue;\n}\n\n/** @oneof */\nexport interface PriceAdjustmentAdjustmentTypeOneOf {\n /** Adjustment that increases the price. */\n charge?: PriceAdjustmentValue;\n /** Adjustment that lowers the price. */\n credit?: PriceAdjustmentValue;\n}\n\nexport interface PriceAdjustmentValue\n extends PriceAdjustmentValueAdjustmentValueTypeOneOf {\n /**\n * Absolute amount that adjusts the price.\n *\n * Min: `0.01`\n * @decimalValue options { gt:0.00 }\n */\n amount?: string;\n /**\n * Relative factor that adjusts the price. For example, setting\n * `multiplier` to:\n * - `0.50` results in a price adjustment of 50% of the original value.\n * - `0.75` results in a price adjustment of 75% of the original value.\n * - `1.00` results in a price adjustment of 100% of the original value.\n *\n * Min: `0.01`\n * Max: `1.00`\n * @decimalValue options { gt:0.00, lte:1 }\n */\n multiplier?: string;\n}\n\n/** @oneof */\nexport interface PriceAdjustmentValueAdjustmentValueTypeOneOf {\n /**\n * Absolute amount that adjusts the price.\n *\n * Min: `0.01`\n * @decimalValue options { gt:0.00 }\n */\n amount?: string;\n /**\n * Relative factor that adjusts the price. For example, setting\n * `multiplier` to:\n * - `0.50` results in a price adjustment of 50% of the original value.\n * - `0.75` results in a price adjustment of 75% of the original value.\n * - `1.00` results in a price adjustment of 100% of the original value.\n *\n * Min: `0.01`\n * Max: `1.00`\n * @decimalValue options { gt:0.00, lte:1 }\n */\n multiplier?: string;\n}\n\nexport interface InvoiceShippingCharges {\n /**\n * Amount of the shipping fee in `0.00` format.\n *\n * Min: `0.01`\n * @decimalValue options { gte:0.00, maxScale:2 }\n */\n amount?: string;\n /** Tax of the shipping fee */\n tax?: Tax;\n /** Information about the shipping charges tax data */\n taxData?: ItemTaxData;\n discount?: Discount;\n}\n\n/** Tax data from all items */\nexport interface TaxData {\n /** Aggregated tax data from all items */\n taxSummary?: TaxSummary;\n}\n\nexport interface TaxSummary {\n /**\n * Aggregated from tax_breakdowns with exemptions excluded from amount\n * @format DECIMAL_VALUE\n */\n aggregatedTaxAmount?: string;\n /**\n * Array of each tax applied, grouped by `\"jurisdiction\"`, `\"jurisdiction_type\"`, `\"tax_type\"`, `\"tax_name\"` and `\"tax_rate\"`.\n * @maxSize 50\n */\n aggregatedTaxBreakdowns?: AggregatedTaxBreakdown[];\n}\n\nexport interface AggregatedTaxBreakdown {\n /**\n * Name of the tax that was calculated.\n * @maxLength 200\n */\n taxName?: string;\n /**\n * Type of tax that was calculated.\n * @maxLength 200\n */\n taxType?: string;\n /**\n * Jurisdiction that taxes were calculated for.\n * @maxLength 200\n */\n jurisdiction?: string;\n /** Type of jurisdiction that taxes were calculated for. */\n jurisdictionType?: string;\n /**\n * Tax rate used for this jurisdiction, as a decimal. For example, 10% tax is `\"0.1000\"` and 200% tax is `\"2.0000\"`.\n * @decimalValue options { gte:0, maxScale:6 }\n */\n rate?: string;\n /**\n * Total amount of this tax for this jurisdiction.\n * @format DECIMAL_VALUE\n * @decimalValue options { maxScale:4 }\n */\n aggregatedTaxAmount?: string;\n}\n\nexport interface RefundInfo {\n /**\n * If refunds are present, this will include the total amount refunded.\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0.00, maxScale:2 }\n */\n totalRefundAmount?: string | null;\n /**\n * The refunds that have been applied to this invoice\n * @maxSize 20\n */\n refunds?: Refund[];\n}\n\nexport interface Refund {\n /**\n * refund amount\n * @format DECIMAL_VALUE\n * @decimalValue options { gt:0.00, maxScale:2 }\n */\n amount?: string;\n /** the date of the refund transaction */\n transactionDate?: Date | null;\n /**\n * the transaction id associated with this refund\n * @format GUID\n */\n transactionId?: string;\n /** a reason for the refund */\n reason?: RefundReasonWithLiterals;\n /**\n * a description of the refund - this is a free text field for the initiator\n * @maxLength 255\n */\n description?: string | null;\n}\n\nexport enum RefundReason {\n UNKNOWN_REFUND_REASON = 'UNKNOWN_REFUND_REASON',\n DUPLICATE_CHARGE = 'DUPLICATE_CHARGE',\n FRAUDULENT = 'FRAUDULENT',\n CUSTOMER_REQUEST = 'CUSTOMER_REQUEST',\n PROVISION_FAILED = 'PROVISION_FAILED',\n OTHER = 'OTHER',\n}\n\n/** @enumType */\nexport type RefundReasonWithLiterals =\n | RefundReason\n | 'UNKNOWN_REFUND_REASON'\n | 'DUPLICATE_CHARGE'\n | 'FRAUDULENT'\n | 'CUSTOMER_REQUEST'\n | 'PROVISION_FAILED'\n | 'OTHER';\n\nexport interface Task {\n key?: TaskKey;\n executeAt?: Date | null;\n payload?: string | null;\n}\n\nexport interface TaskKey {\n appId?: string;\n instanceId?: string;\n subjectId?: string | null;\n}\n\nexport interface TaskAction extends TaskActionActionOneOf {\n complete?: Complete;\n cancel?: Cancel;\n reschedule?: Reschedule;\n}\n\n/** @oneof */\nexport interface TaskActionActionOneOf {\n complete?: Complete;\n cancel?: Cancel;\n reschedule?: Reschedule;\n}\n\nexport interface Complete {}\n\nexport interface Cancel {}\n\nexport interface Reschedule {\n executeAt?: Date | null;\n payload?: string | null;\n}\n\nexport interface V1SubscriptionEvent extends V1SubscriptionEventEventOneOf {\n /** A subscriptions was created */\n created?: V1SubscriptionCreated;\n /** Subscription is considered active and will be visible to site owners and members */\n activated?: V1SubscriptionActivated;\n /**\n * Subscription was canceled either by cancellation request with requested expiration date NOW or by payment provider.\n * If cancelled by payment provider subscription will be valid until the date calculated depending on how many cycles it was already paid for.\n */\n canceled?: V1SubscriptionCanceled;\n /** Subscription was updated. Currently the only possible change is valid_until date */\n updated?: V1SubscriptionUpdated;\n /** Subscription cycle has started. Currently the cycle starts when a payment is received. */\n cycleTriggered?: SubscriptionCycleTriggered;\n /** Offline subscription was marked as paid */\n markedAsPaid?: SubscriptionMarkedAsPaid;\n /**\n * Subscription cancellation for the future date was requested.\n * Subscription will stay in pending cancellation status until the date calculated depending on free trial and the next payment date.\n */\n cancellationRequested?: SubscriptionCancellationRequested;\n /** Subscription and it's payment schedule (for recurring) was suspended */\n suspended?: SubscriptionSuspended;\n /** Previously suspended subscription and it's payment schedule (for recurring) was resumed */\n resumed?: V1SubscriptionResumed;\n /** Subscription expired according to valid_until expiration date. */\n expired?: SubscriptionExpired;\n /** Subscription initial purchase completed */\n initialPurchaseCompleted?: V1SubscriptionInitialPurchaseCompleted;\n}\n\n/** @oneof */\nexport interface V1SubscriptionEventEventOneOf {\n /** A subscriptions was created */\n created?: V1SubscriptionCreated;\n /** Subscription is considered active and will be visible to site owners and members */\n activated?: V1SubscriptionActivated;\n /**\n * Subscription was canceled either by cancellation request with requested expiration date NOW or by payment provider.\n * If cancelled by payment provider subscription will be valid until the date calculated depending on how many cycles it was already paid for.\n */\n canceled?: V1SubscriptionCanceled;\n /** Subscription was updated. Currently the only possible change is valid_until date */\n updated?: V1SubscriptionUpdated;\n /** Subscription cycle has started. Currently the cycle starts when a payment is received. */\n cycleTriggered?: SubscriptionCycleTriggered;\n /** Offline subscription was marked as paid */\n markedAsPaid?: SubscriptionMarkedAsPaid;\n /**\n * Subscription cancellation for the future date was requested.\n * Subscription will stay in pending cancellation status until the date calculated depending on free trial and the next payment date.\n */\n cancellationRequested?: SubscriptionCancellationRequested;\n /** Subscription and it's payment schedule (for recurring) was suspended */\n suspended?: SubscriptionSuspended;\n /** Previously suspended subscription and it's payment schedule (for recurring) was resumed */\n resumed?: V1SubscriptionResumed;\n /** Subscription expired according to valid_until expiration date. */\n expired?: SubscriptionExpired;\n /** Subscription initial purchase completed */\n initialPurchaseCompleted?: V1SubscriptionInitialPurchaseCompleted;\n}\n\nexport interface V1SubscriptionCreated {\n subscription?: V1Subscription;\n}\n\nexport interface V1Subscription {\n /**\n * ID of the subscription\n * @format GUID\n * @readonly\n */\n _id?: string;\n /**\n * ID of the app which created the subscription\n * @format GUID\n */\n wixAppId?: string;\n /**\n * Instance ID of the Subscriptions app\n * @format GUID\n */\n tenantId?: string;\n /**\n * ID of entity in app (e.g. a cart in stores/order in paid plans)\n * @format GUID\n */\n originEntityId?: string;\n /** Site member or a contact who bought the subscription */\n subscriber?: Subscriber;\n /**\n * Wix Pay order ID, is empty for free subscriptions\n * @format GUID\n */\n wixPayOrderId?: string | null;\n /**\n * Subscription name (e.g. a product or subscription package name)\n * @maxLength 150\n */\n name?: string;\n /**\n * Optional additional subscription description\n * @maxLength 500\n */\n description?: string;\n /** Amount to be paid for a single scheduled payment */\n price?: Money;\n /** True if the subscription is recurring, false for a single payment subscription */\n recurring?: boolean;\n /** Online (paid by subscriber using wix pay) or offline (need to manually mark as paid) */\n subscriptionType?: SubscriptionTypeWithLiterals;\n /** Active, expired, canceled, etc. */\n subscriptionStatus?: V1SubscriptionStatusEnumSubscriptionStatusWithLiterals;\n /** Subscription start date (may differ from creation date) */\n validFrom?: Date | null;\n /** Subscription expiration date */\n validUntil?: Date | null;\n /** Status of last payment associated with this subscription */\n lastPaymentStatus?: PaymentStatusEnumPaymentStatusWithLiterals;\n /** Payment schedule in the wix pay format. Exists for recurring subscriptions only. */\n billingProfile?: V2Subscription;\n /** Owner, member, etc. - present if subscription is canceled */\n cancellationInitiator?: CancellationInitiatorWithLiterals;\n /** Optional, present if subscription is canceled */\n cancellationReason?: string | null;\n /** Can be used for arbitrary app-specific map<string, string> data */\n externalData?: Record<string, string>;\n /** Date when subscription was created (not related to payment dates) */\n dateCreated?: Date | null;\n /** Restrictions on possible subscription actions. Default policy has all restrictions enabled. */\n policy?: SubscriptionPolicy;\n /** List of subscription suspension periods */\n suspensions?: Suspension[];\n /** Initial subscription expiration date that was calculated on the subscription purchase plus duration of suspensions */\n validUntilDateWithSuspensions?: Date | null;\n /** Duration of single payment subscription (instead of billing_profile) */\n singlePaymentDuration?: V1Duration;\n /** @format GUID */\n originInstanceId?: string | null;\n}\n\nexport interface Subscriber {\n /**\n * Member or contact ID\n * @format GUID\n */\n _id?: string;\n /** Member or contact */\n identityType?: IdentityTypeWithLiterals;\n}\n\nexport enum IdentityType {\n /** Identity type undefined */\n UNDEFINED = 'UNDEFINED',\n /** Subscription is associated with a member ID */\n MEMBER = 'MEMBER',\n /** Subscriptions is associated with a contact ID */\n CONTACT = 'CONTACT',\n}\n\n/** @enumType */\nexport type IdentityTypeWithLiterals =\n | IdentityType\n | 'UNDEFINED'\n | 'MEMBER'\n | 'CONTACT';\n\n/** Price of a payment. Includes amount and currency. */\nexport interface Money {\n /**\n * Monetary amount i.e. 3.99.\n * @format DECIMAL_VALUE\n */\n amount?: string;\n /**\n * Currency in ISO 4217 format i.e. USD.\n * @minLength 3\n * @maxLength 3\n */\n currency?: string;\n}\n\nexport enum SubscriptionType {\n UNDEFINED = 'UNDEFINED',\n /** Payments made by the subscriber */\n ONLINE = 'ONLINE',\n /** Payments managed manually by the site owner */\n OFFLINE = 'OFFLINE',\n}\n\n/** @enumType */\nexport type SubscriptionTypeWithLiterals =\n | SubscriptionType\n | 'UNDEFINED'\n | 'ONLINE'\n | 'OFFLINE';\n\nexport enum V1SubscriptionStatusEnumSubscriptionStatus {\n /** Subscription status undefined */\n UNDEFINED = 'UNDEFINED',\n /** Subscription created, but hasn't been paid for yet. This status if filtered out in ListSubscriptions response by default. */\n DRAFT = 'DRAFT',\n /** Subscription has been paid for, but the start date is in the future */\n PENDING = 'PENDING',\n /** Subscription is active */\n ACTIVE = 'ACTIVE',\n /** Subscription has expired */\n EXPIRED = 'EXPIRED',\n /** Subscription has been canceled */\n CANCELED = 'CANCELED',\n /** Subscription has been set to be canceled at a future date */\n PENDING_CANCELLATION = 'PENDING_CANCELLATION',\n /** Subscription is suspended */\n SUSPENDED = 'SUSPENDED',\n}\n\n/** @enumType */\nexport type V1SubscriptionStatusEnumSubscriptionStatusWithLiterals =\n | V1SubscriptionStatusEnumSubscriptionStatus\n | 'UNDEFINED'\n | 'DRAFT'\n | 'PENDING'\n | 'ACTIVE'\n | 'EXPIRED'\n | 'CANCELED'\n | 'PENDING_CANCELLATION'\n | 'SUSPENDED';\n\nexport enum PaymentStatusEnumPaymentStatus {\n /** Payment status undefined */\n UNDEFINED = 'UNDEFINED',\n /** Payment has been paid */\n PAID = 'PAID',\n /** Payment has been refunded */\n REFUNDED = 'REFUNDED',\n /** Recurring payment has failed */\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. Can happen for free trial and PayPal */\n PENDING = 'PENDING',\n}\n\n/** @enumType */\nexport type PaymentStatusEnumPaymentStatusWithLiterals =\n | PaymentStatusEnumPaymentStatus\n | 'UNDEFINED'\n | 'PAID'\n | 'REFUNDED'\n | 'FAILED'\n | 'UNPAID'\n | 'PENDING';\n\n/**\n * Recurring payment is described by `frequency` (day, week, month) and `interval`.\n *\n * For example, to create a recurring payment every 14 days, just set `interval` to 14 and frequency to `DAY`.\n *\n * In some cases there should be a trial period for the order, after which payments start to occur.\n * Trial period is also defined as `frequency` and `interval` pair.\n *\n * So one can define a monthly 'subscription' with a 14 days trial period.\n */\nexport interface V2Subscription {\n /** frequency of recurring payment (required) */\n frequency?: SubscriptionFrequencyWithLiterals;\n /** interval of recurring payment (required) */\n interval?: number;\n /** trial period for recurring payment (optional) */\n trial?: SubscriptionTrialPeriod;\n /**\n * how many billing cycles should be done before subscription finishes\n * (optional, 0 by default means endless subscription)\n */\n billingCycles?: number;\n /**\n * date in the future or in the past when the first billing cycle begins\n * (the first off-session payment is performed when it ends)\n */\n firstCycleStartDate?: Date | null;\n}\n\n/** Frequency unit of recurring payment */\nexport enum SubscriptionFrequency {\n UNDEFINED = 'UNDEFINED',\n DAY = 'DAY',\n WEEK = 'WEEK',\n MONTH = 'MONTH',\n YEAR = 'YEAR',\n}\n\n/** @enumType */\nexport type SubscriptionFrequencyWithLiterals =\n | SubscriptionFrequency\n | 'UNDEFINED'\n | 'DAY'\n | 'WEEK'\n | 'MONTH'\n | 'YEAR';\n\n/** Trial period of subscription */\nexport interface SubscriptionTrialPeriod {\n /** trial period in units (required) */\n period?: number;\n /** units in which trial period is described (optional, default DAY) */\n unit?: SubscriptionFrequencyWithLiterals;\n}\n\nexport enum CancellationInitiator {\n /** Cancellation initiator undefined */\n UNDEFINED = 'UNDEFINED',\n /** Subscription was canceled by site owner (default if canceled by user or service identity) */\n OWNER = 'OWNER',\n /** Subscription was canceled by member (default if canceled by member identity) */\n MEMBER = 'MEMBER',\n /** Subscription was canceled because of payment failure */\n PAYMENT_FAILURE = 'PAYMENT_FAILURE',\n /** Subscription was canceled because of payment setup failure */\n SETUP_FAILURE = 'SETUP_FAILURE',\n}\n\n/** @enumType */\nexport type CancellationInitiatorWithLiterals =\n | CancellationInitiator\n | 'UNDEFINED'\n | 'OWNER'\n | 'MEMBER'\n | 'PAYMENT_FAILURE'\n | 'SETUP_FAILURE';\n\nexport interface SubscriptionPolicy {\n /** Subscription expiration date can be updated */\n expiryDateChangeable?: boolean;\n /** Subscription can be cancelled by the member who bought it (when memberId == subscriberId) */\n cancellableByMember?: boolean;\n /** Subscription expiration date on cancellation can be set to next payment date */\n cancellableAtNextPaymentCycle?: boolean;\n}\n\nexport interface Suspension {\n status?: StatusWithLiterals;\n /** Beginning of the suspended period */\n startsAt?: Date | null;\n /** End of the suspended period */\n endsAt?: Date | null;\n}\n\nexport enum Status {\n UNDEFINED = 'UNDEFINED',\n ACTIVE = 'ACTIVE',\n ENDED = 'ENDED',\n}\n\n/** @enumType */\nexport type StatusWithLiterals = Status | 'UNDEFINED' | 'ACTIVE' | 'ENDED';\n\n/** A duration expressed in amount of time units. */\nexport interface V1Duration {\n /** Amount of the unit */\n amount?: number;\n /** Day, Week, Month, Year. */\n unit?: SubscriptionFrequencyWithLiterals;\n}\n\nexport interface V1SubscriptionActivated {\n subscription?: V1Subscription;\n}\n\nexport interface V1SubscriptionCanceled {\n subscription?: V1Subscription;\n}\n\nexport interface V1SubscriptionUpdated {\n subscription?: V1Subscription;\n}\n\nexport interface SubscriptionCycleTriggered {\n subscription?: V1Subscription;\n billingCycle?: number;\n /**\n * Wix Pay transaction id, optional. Exists if event was triggered by a payment.\n * @format GUID\n */\n transactionId?: string | null;\n}\n\nexport interface SubscriptionMarkedAsPaid {\n subscription?: V1Subscription;\n /** A number indicating which payment (cycle) was marked as paid. For recurring subscriptions only. */\n billingCycle?: number | null;\n}\n\nexport interface SubscriptionCancellationRequested {\n subscription?: V1Subscription;\n}\n\nexport interface SubscriptionSuspended {\n subscription?: V1Subscription;\n}\n\nexport interface V1SubscriptionResumed {\n subscription?: V1Subscription;\n}\n\nexport interface SubscriptionExpired {\n subscription?: V1Subscription;\n}\n\nexport interface V1SubscriptionInitialPurchaseCompleted {\n subscription?: V1Subscription;\n}\n\nexport interface ListSubscriptionHistoryRequest {\n /** @format GUID */\n subscriptionId: string;\n /** Determines the type of view for the history: either a comprehensive backoffice view or a user-centric view. */\n mode?: HistoryViewModeWithLiterals;\n /** Cursor for efficient paging. If paging through results, pass this field from the previous search response to continue to the next page. */\n cursor?: CursorPaging;\n}\n\nexport enum HistoryViewMode {\n UNKNOWN = 'UNKNOWN',\n /** Comprehensive view including all history events. */\n BACKOFFICE = 'BACKOFFICE',\n /** User-centric view of the history. */\n USER = 'USER',\n}\n\n/** @enumType */\nexport type HistoryViewModeWithLiterals =\n | HistoryViewMode\n | 'UNKNOWN'\n | 'BACKOFFICE'\n | 'USER';\n\nexport interface ListSubscriptionHistoryResponse {\n /** List of history entries for the subscription. */\n historyEntries?: SubscriptionHistoryEntry[];\n /** Paging metadata. A `next` cursor is returned if there are more results. */\n pagingMetadata?: PagingMetadataV2;\n}\n\nexport interface SubscriptionHistoryEntry {\n /** @format GUID */\n entryId?: string;\n /** TODO: add max length? it is not defined in domainevents, so should we? */\n slug?: string;\n entryTime?: Date | null;\n event?: SubscriptionEvent;\n}\n\nexport interface SubscriptionEvent extends SubscriptionEventPayloadOneOf {\n created?: SubscriptionCreated;\n updated?: SubscriptionUpdated;\n deleted?: SubscriptionDeleted;\n activated?: SubscriptionActivated;\n ended?: SubscriptionEnded;\n canceled?: SubscriptionCanceled;\n paused?: SubscriptionPaused;\n resumed?: SubscriptionResumed;\n pauseRequested?: PauseSubscriptionRequested;\n resumeRequested?: ResumeSubscriptionRequested;\n scheduledPauseCanceled?: ScheduledPauseCanceled;\n scheduledResumeCanceled?: ScheduledResumeCanceled;\n billingCycleStarted?: SubscriptionBillingCycleStarted;\n autoRenewalTurnedOn?: SubscriptionAutoRenewalTurnedOn;\n autoRenewalTurnedOff?: SubscriptionAutoRenewalTurnedOff;\n cycleReadyToPay?: SubscriptionCycleReadyToPay;\n extended?: SubscriptionExtended;\n initialPurchaseCompleted?: SubscriptionInitialPurchaseCompleted;\n latestInvoiceMarkedAsPaid?: LatestInvoiceMarkedAsPaid;\n revived?: SubscriptionRevived;\n billingDateUpdated?: SubscriptionBillingDateUpdated;\n futureUpdatesRequested?: FutureUpdatesRequested;\n updatesApplied?: UpdatesApplied;\n resetPendingUpdates?: ResetPendingUpdates;\n gracePeriodStarted?: GracePeriodStarted;\n gracePeriodEnded?: GracePeriodEnded;\n paymentMethodUpdated?: PaymentMethodUpdated;\n collectionMethodUpdated?: SubscriptionCollectionMethodUpdated;\n freeTrailStarted?: FreeTrailStarted;\n freeTrailEnded?: FreeTrailEnded;\n billingCyclePaid?: SubscriptionBillingCyclePaid;\n initiatePaymentMethodSetup?: InitiatedPaymentMethodSetup;\n futurePriceUpdatesRequested?: FuturePriceUpdatesRequested;\n subscriptionBoAction?: SubscriptionBackOfficeAction;\n unknown?: UnknownSubscriptionEvent;\n}\n\n/** @oneof */\nexport interface SubscriptionEventPayloadOneOf {\n created?: SubscriptionCreated;\n updated?: SubscriptionUpdated;\n deleted?: SubscriptionDeleted;\n activated?: SubscriptionActivated;\n ended?: SubscriptionEnded;\n canceled?: SubscriptionCanceled;\n paused?: SubscriptionPaused;\n resumed?: SubscriptionResumed;\n pauseRequested?: PauseSubscriptionRequested;\n resumeRequested?: ResumeSubscriptionRequested;\n scheduledPauseCanceled?: ScheduledPauseCanceled;\n scheduledResumeCanceled?: ScheduledResumeCanceled;\n billingCycleStarted?: SubscriptionBillingCycleStarted;\n autoRenewalTurnedOn?: SubscriptionAutoRenewalTurnedOn;\n autoRenewalTurnedOff?: SubscriptionAutoRenewalTurnedOff;\n cycleReadyToPay?: SubscriptionCycleReadyToPay;\n extended?: SubscriptionExtended;\n initialPurchaseCompleted?: SubscriptionInitialPurchaseCompleted;\n latestInvoiceMarkedAsPaid?: LatestInvoiceMarkedAsPaid;\n revived?: SubscriptionRevived;\n billingDateUpdated?: SubscriptionBillingDateUpdated;\n futureUpdatesRequested?: FutureUpdatesRequested;\n updatesApplied?: UpdatesApplied;\n resetPendingUpdates?: ResetPendingUpdates;\n gracePeriodStarted?: GracePeriodStarted;\n gracePeriodEnded?: GracePeriodEnded;\n paymentMethodUpdated?: PaymentMethodUpdated;\n collectionMethodUpdated?: SubscriptionCollectionMethodUpdated;\n freeTrailStarted?: FreeTrailStarted;\n freeTrailEnded?: FreeTrailEnded;\n billingCyclePaid?: SubscriptionBillingCyclePaid;\n initiatePaymentMethodSetup?: InitiatedPaymentMethodSetup;\n futurePriceUpdatesRequested?: FuturePriceUpdatesRequested;\n subscriptionBoAction?: SubscriptionBackOfficeAction;\n unknown?: UnknownSubscriptionEvent;\n}\n\nexport interface SubscriptionCreated {\n subscription?: Subscription;\n}\n\nexport interface SubscriptionUpdated {\n current?: Subscription;\n previous?: Subscription;\n diff?: SubscriptionDiff;\n}\n\nexport interface SubscriptionDiff {\n added?: string | null;\n changed?: string | null;\n deleted?: string | null;\n}\n\nexport interface SubscriptionDeleted {\n subscriptionId?: string;\n}\n\nexport interface FutureUpdatesRequested {\n subscription?: Subscription;\n requestedUpdateData?: SubscriptionUpdateData;\n}\n\nexport interface UpdatesApplied {\n subscription?: Subscription;\n updateAction?: UpdateActionWithLiterals;\n appliedUpdateData?: SubscriptionUpdateData;\n}\n\nexport interface ResetPendingUpdates {\n subscription?: Subscription;\n}\n\nexport interface GracePeriodStarted {\n subscription?: Subscription;\n}\n\nexport interface GracePeriodEnded {\n subscription?: Subscription;\n /** Indication for the payment settlement method. */\n paymentSettlementMethod?: PaymentSettlementMethodWithLiterals;\n}\n\nexport enum PaymentSettlementMethod {\n UNKNOWN = 'UNKNOWN',\n /** System-defined payment settlement. */\n SYSTEM = 'SYSTEM',\n /** Manually mark the payment as paid. */\n MARK_AS_PAID = 'MARK_AS_PAID',\n /** Require the customer to pay immediately, by insert a new payment method. */\n CUSTOMER_PAY_NOW = 'CUSTOMER_PAY_NOW',\n}\n\n/** @enumType */\nexport type PaymentSettlementMethodWithLiterals =\n | PaymentSettlementMethod\n | 'UNKNOWN'\n | 'SYSTEM'\n | 'MARK_AS_PAID'\n | 'CUSTOMER_PAY_NOW';\n\nexport interface PaymentMethodUpdated {\n subscription?: Subscription;\n initiator?: HistoryActionInitiatorWithLiterals;\n paymentMode?: PaymentModeWithLiterals;\n}\n\nexport interface SubscriptionCollectionMethodUpdated {\n subscription?: Subscription;\n newCollectionMethod?: CollectionMethodEnumCollectionMethodWithLiterals;\n previousCollectionMethod?: CollectionMethodEnumCollectionMethodWithLiterals;\n}\n\nexport interface FreeTrailStarted {\n subscription?: Subscription;\n}\n\nexport interface FreeTrailEnded {\n subscription?: Subscription;\n}\n\nexport interface InitiatedPaymentMethodSetup {\n subscription?: Subscription;\n}\n\nexport interface FuturePriceUpdatesRequested {\n subscription?: Subscription;\n requestedUpdateData?: SubscriptionUpdateData;\n}\n\nexport interface SubscriptionBackOfficeAction {\n subscription?: Subscription;\n /** The backoffice method name */\n name?: string;\n /** json as string format, to store the flatted request object */\n params?: string;\n}\n\n/** Defines unknown events restored from the logs */\nexport interface UnknownSubscriptionEvent {\n subscriptionAsString?: string | null;\n}\n\n/** @docsIgnore */\nexport type CustomerCancelSubscriptionApplicationErrors = {\n code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type CustomerTurnOnSubscriptionAutoRenewalApplicationErrors = {\n code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type CustomerTurnOffSubscriptionAutoRenewalApplicationErrors = {\n code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type CustomerExtendSubscriptionApplicationErrors = {\n code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type UpdateSubscriptionBillingDateApplicationErrors = {\n code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type CancelSubscriptionApplicationErrors = {\n code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type PauseSubscriptionApplicationErrors = {\n code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type ResumeSubscriptionApplicationErrors = {\n code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type TurnOnSubscriptionAutoRenewalApplicationErrors = {\n code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type TurnOffSubscriptionAutoRenewalApplicationErrors = {\n code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type MarkLatestInvoiceAsPaidApplicationErrors =\n | {\n code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'SUBSCRIPTION_PART_OF_ORDER';\n description?: string;\n data?: MultipleSubscriptionsOnOrdersInvoice;\n };\n/** @docsIgnore */\nexport type MarkBillingCycleAsPaidApplicationErrors =\n | {\n code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'SUBSCRIPTION_PART_OF_ORDER';\n description?: string;\n data?: MultipleSubscriptionsOnOrdersInvoice;\n }\n | {\n code?: 'INVOICE_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'OPERATION_NOT_SUPPORTED_FOR_COLLECTION_METHOD';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type ExtendSubscriptionApplicationErrors = {\n code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS';\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}\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}\n\nexport interface SubscriptionCanceledEnvelope {\n data: SubscriptionCanceled;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a subscription is canceled.\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionId subscriptions.view\n * @webhook\n * @eventType wix.billing.v1.subscription_canceled\n * @serviceIdentifier com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService\n * @slug canceled\n * @documentationMaturity preview\n */\nexport declare function onSubscriptionCanceled(\n handler: (event: SubscriptionCanceledEnvelope) => void | Promise<void>\n): void;\n\nexport interface SubscriptionExtendedEnvelope {\n data: SubscriptionExtended;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when subscription has been extended\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionId subscriptions.view\n * @webhook\n * @eventType wix.billing.v1.subscription_extended\n * @serviceIdentifier com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService\n * @slug extended\n * @documentationMaturity preview\n */\nexport declare function onSubscriptionExtended(\n handler: (event: SubscriptionExtendedEnvelope) => void | Promise<void>\n): void;\n\nexport interface SubscriptionUpdatedEnvelope {\n entity: Subscription;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a subscription is updated.\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionId subscriptions.view\n * @webhook\n * @eventType wix.billing.v1.subscription_updated\n * @serviceIdentifier com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService\n * @slug updated\n * @documentationMaturity preview\n */\nexport declare function onSubscriptionUpdated(\n handler: (event: SubscriptionUpdatedEnvelope) => void | Promise<void>\n): void;\n\nexport interface SubscriptionAutoRenewalTurnedOffEnvelope {\n data: SubscriptionAutoRenewalTurnedOff;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a subscription cycleAutoRenew was turned off.\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionId subscriptions.view\n * @webhook\n * @eventType wix.billing.v1.subscription_auto_renewal_turned_off\n * @serviceIdentifier com.wixpress.billing.subscriptions.api.v1.SubscriptionsService\n * @slug auto_renewal_turned_off\n * @documentationMaturity preview\n */\nexport declare function onSubscriptionAutoRenewalTurnedOff(\n handler: (\n event: SubscriptionAutoRenewalTurnedOffEnvelope\n ) => void | Promise<void>\n): void;\n\nexport interface SubscriptionAutoRenewalTurnedOnEnvelope {\n data: SubscriptionAutoRenewalTurnedOn;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a subscription cycleAutoRenew was turned on.\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionId subscriptions.view\n * @webhook\n * @eventType wix.billing.v1.subscription_auto_renewal_turned_on\n * @serviceIdentifier com.wixpress.billing.subscriptions.api.v1.SubscriptionsService\n * @slug auto_renewal_turned_on\n * @documentationMaturity preview\n */\nexport declare function onSubscriptionAutoRenewalTurnedOn(\n handler: (\n event: SubscriptionAutoRenewalTurnedOnEnvelope\n ) => void | Promise<void>\n): void;\n\nexport interface SubscriptionBillingDateUpdatedEnvelope {\n data: SubscriptionBillingDateUpdated;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when subscription has been extended\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionId subscriptions.view\n * @webhook\n * @eventType wix.billing.v1.subscription_billing_date_updated\n * @serviceIdentifier com.wixpress.billing.subscriptions.api.v1.SubscriptionsService\n * @slug billing_date_updated\n * @documentationMaturity preview\n */\nexport declare function onSubscriptionBillingDateUpdated(\n handler: (\n event: SubscriptionBillingDateUpdatedEnvelope\n ) => void | Promise<void>\n): void;\n\nexport interface SubscriptionLatestInvoiceMarkedAsPaidEnvelope {\n data: LatestInvoiceMarkedAsPaid;\n metadata: EventMetadata;\n}\n\n/** @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionId subscriptions.view\n * @webhook\n * @eventType wix.billing.v1.subscription_latest_invoice_marked_as_paid\n * @serviceIdentifier com.wixpress.billing.subscriptions.api.v1.SubscriptionsService\n * @slug latest_invoice_marked_as_paid\n * @documentationMaturity preview\n */\nexport declare function onSubscriptionLatestInvoiceMarkedAsPaid(\n handler: (\n event: SubscriptionLatestInvoiceMarkedAsPaidEnvelope\n ) => void | Promise<void>\n): void;\n\nexport interface SubscriptionPauseScheduleCanceledEnvelope {\n data: ScheduledPauseCanceled;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when scheduled pause canceled\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionId subscriptions.view\n * @webhook\n * @eventType wix.billing.v1.subscription_pause_schedule_canceled\n * @serviceIdentifier com.wixpress.billing.subscriptions.api.v1.SubscriptionsService\n * @slug pause_schedule_canceled\n * @documentationMaturity preview\n */\nexport declare function onSubscriptionPauseScheduleCanceled(\n handler: (\n event: SubscriptionPauseScheduleCanceledEnvelope\n ) => void | Promise<void>\n): void;\n\nexport interface SubscriptionPauseScheduledEnvelope {\n data: PauseSubscriptionRequested;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when pause subscription requested\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionId subscriptions.view\n * @webhook\n * @eventType wix.billing.v1.subscription_pause_scheduled\n * @serviceIdentifier com.wixpress.billing.subscriptions.api.v1.SubscriptionsService\n * @slug pause_scheduled\n * @documentationMaturity preview\n */\nexport declare function onSubscriptionPauseScheduled(\n handler: (event: SubscriptionPauseScheduledEnvelope) => void | Promise<void>\n): void;\n\nexport interface SubscriptionPausedEnvelope {\n data: SubscriptionPaused;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a subscription is paused.\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionId subscriptions.view\n * @webhook\n * @eventType wix.billing.v1.subscription_paused\n * @serviceIdentifier com.wixpress.billing.subscriptions.api.v1.SubscriptionsService\n * @slug paused\n * @documentationMaturity preview\n */\nexport declare function onSubscriptionPaused(\n handler: (event: SubscriptionPausedEnvelope) => void | Promise<void>\n): void;\n\nexport interface SubscriptionResumeScheduleCanceledEnvelope {\n data: ScheduledResumeCanceled;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when scheduled pause canceled\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionId subscriptions.view\n * @webhook\n * @eventType wix.billing.v1.subscription_resume_schedule_canceled\n * @serviceIdentifier com.wixpress.billing.subscriptions.api.v1.SubscriptionsService\n * @slug resume_schedule_canceled\n * @documentationMaturity preview\n */\nexport declare function onSubscriptionResumeScheduleCanceled(\n handler: (\n event: SubscriptionResumeScheduleCanceledEnvelope\n ) => void | Promise<void>\n): void;\n\nexport interface SubscriptionResumeScheduledEnvelope {\n data: ResumeSubscriptionRequested;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when resume subscription requested\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionId subscriptions.view\n * @webhook\n * @eventType wix.billing.v1.subscription_resume_scheduled\n * @serviceIdentifier com.wixpress.billing.subscriptions.api.v1.SubscriptionsService\n * @slug resume_scheduled\n * @documentationMaturity preview\n */\nexport declare function onSubscriptionResumeScheduled(\n handler: (event: SubscriptionResumeScheduledEnvelope) => void | Promise<void>\n): void;\n\nexport interface SubscriptionResumedEnvelope {\n data: SubscriptionResumed;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a subscription is resumed.\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionId subscriptions.view\n * @webhook\n * @eventType wix.billing.v1.subscription_resumed\n * @serviceIdentifier com.wixpress.billing.subscriptions.api.v1.SubscriptionsService\n * @slug resumed\n * @documentationMaturity preview\n */\nexport declare function onSubscriptionResumed(\n handler: (event: SubscriptionResumedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Identity must be a site member and customer subscription belongs to\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @fqn com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.GetSubscription\n */\nexport async function customerGetSubscription(\n _id: string\n): Promise<\n NonNullablePaths<\n GetSubscriptionResponse,\n | `subscription.name`\n | `subscription.customer.visitorId`\n | `subscription.customer.contactId`\n | `subscription.customer.memberId`\n | `subscription.customer.accountId`\n | `subscription.status`\n | `subscription.billingSettings.currency`\n | `subscription.billingSettings.paymentMethod._id`\n | `subscription.billingSettings.collectionMethod`\n | `subscription.billingSettings.cycleDuration.unit`\n | `subscription.billingSettings.cycleAutoRenew`\n | `subscription.billingSettings.billingAddress.address.streetAddress.number`\n | `subscription.billingSettings.billingAddress.address.streetAddress.name`\n | `subscription.billingSettings.taxSettings.inclusive`\n | `subscription.billingSettings.additionalFees`\n | `subscription.billingSettings.additionalFees.${number}.name`\n | `subscription.billingSettings.additionalFees.${number}.amount`\n | `subscription.billingSettings.additionalFees.${number}.trigger`\n | `subscription.billingSettings.additionalFees.${number}.tax.amount`\n | `subscription.billingSettings.additionalFees.${number}.tax.percentage`\n | `subscription.billingSettings.additionalFees.${number}.tax.dynamic.taxableAddressType`\n | `subscription.billingSettings.additionalFees.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.additionalFees.${number}.origin.appId`\n | `subscription.billingSettings.additionalFees.${number}.origin.entityId`\n | `subscription.billingSettings.shippingCharges.amount`\n | `subscription.billingSettings.shippingCharges.discounts`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.amount`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.percentage`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.appId`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.entityId`\n | `subscription.billingSettings.discounts`\n | `subscription.billingSettings.externalCollectionDetails.collectorName`\n | `subscription.billingStatus.currentCycle`\n | `subscription.billingStatus.latestPaymentData.invoiceId`\n | `subscription.billingStatus.latestPaymentData.paymentStatus`\n | `subscription.billingStatus.latestPaymentData.totals.totalPrice`\n | `subscription.billingStatus.latestPaymentData.totals.subtotal`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxType`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxRate`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.jurisdictionType`\n | `subscription.billingStatus.gracePeriodData.automaticRetryData.enabled`\n | `subscription.policies.customerCanCancel`\n | `subscription.policies.businessCanExtend`\n | `subscription.policies.allowEndOfCycleCancellation`\n | `subscription.pauseInfo.pausePolicy`\n | `subscription.pauseInfo.pauseAt`\n | `subscription.pauseInfo.resumeAt`\n | `subscription.pauseInfo.type`\n | `subscription.cancellationInfo.initiator`\n | `subscription.pendingUpdateData.itemsToUpdate`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}._id`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}.pricingModel.fixedPrice.itemPrice`\n | `subscription.pendingUpdateData.itemsToAdd`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.name`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.catalogReference.catalogItemId`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.category`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.quantity`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.applicationFee.amount`\n | `subscription.pendingUpdateData.itemsToDelete`\n | `subscription.pendingUpdateData.numberOfRequests`\n | `subscription.items`,\n 8\n >\n> {\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 =\n ambassadorWixBillingV1Subscription.customerGetSubscription(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'subscription.billingSettings.billingAddress.address' },\n { path: 'subscription.shippingAddress.address' },\n ],\n },\n ])\n )!;\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 * Identity must be a site member and customer subscription belongs to\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @fqn com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.CancelSubscription\n */\nexport async function customerCancelSubscription(\n _id: string,\n options?: CustomerCancelSubscriptionOptions\n): Promise<\n NonNullablePaths<\n CustomerCancelSubscriptionResponse,\n | `subscription.name`\n | `subscription.customer.visitorId`\n | `subscription.customer.contactId`\n | `subscription.customer.memberId`\n | `subscription.customer.accountId`\n | `subscription.status`\n | `subscription.billingSettings.currency`\n | `subscription.billingSettings.paymentMethod._id`\n | `subscription.billingSettings.collectionMethod`\n | `subscription.billingSettings.cycleDuration.unit`\n | `subscription.billingSettings.cycleAutoRenew`\n | `subscription.billingSettings.billingAddress.address.streetAddress.number`\n | `subscription.billingSettings.billingAddress.address.streetAddress.name`\n | `subscription.billingSettings.taxSettings.inclusive`\n | `subscription.billingSettings.additionalFees`\n | `subscription.billingSettings.additionalFees.${number}.name`\n | `subscription.billingSettings.additionalFees.${number}.amount`\n | `subscription.billingSettings.additionalFees.${number}.trigger`\n | `subscription.billingSettings.additionalFees.${number}.tax.amount`\n | `subscription.billingSettings.additionalFees.${number}.tax.percentage`\n | `subscription.billingSettings.additionalFees.${number}.tax.dynamic.taxableAddressType`\n | `subscription.billingSettings.additionalFees.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.additionalFees.${number}.origin.appId`\n | `subscription.billingSettings.additionalFees.${number}.origin.entityId`\n | `subscription.billingSettings.shippingCharges.amount`\n | `subscription.billingSettings.shippingCharges.discounts`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.amount`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.percentage`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.appId`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.entityId`\n | `subscription.billingSettings.discounts`\n | `subscription.billingSettings.externalCollectionDetails.collectorName`\n | `subscription.billingStatus.currentCycle`\n | `subscription.billingStatus.latestPaymentData.invoiceId`\n | `subscription.billingStatus.latestPaymentData.paymentStatus`\n | `subscription.billingStatus.latestPaymentData.totals.totalPrice`\n | `subscription.billingStatus.latestPaymentData.totals.subtotal`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxType`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxRate`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.jurisdictionType`\n | `subscription.billingStatus.gracePeriodData.automaticRetryData.enabled`\n | `subscription.policies.customerCanCancel`\n | `subscription.policies.businessCanExtend`\n | `subscription.policies.allowEndOfCycleCancellation`\n | `subscription.pauseInfo.pausePolicy`\n | `subscription.pauseInfo.pauseAt`\n | `subscription.pauseInfo.resumeAt`\n | `subscription.pauseInfo.type`\n | `subscription.cancellationInfo.initiator`\n | `subscription.pendingUpdateData.itemsToUpdate`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}._id`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}.pricingModel.fixedPrice.itemPrice`\n | `subscription.pendingUpdateData.itemsToAdd`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.name`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.catalogReference.catalogItemId`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.category`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.quantity`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.applicationFee.amount`\n | `subscription.pendingUpdateData.itemsToDelete`\n | `subscription.pendingUpdateData.numberOfRequests`\n | `subscription.items`,\n 8\n > & {\n __applicationErrorsType?: CustomerCancelSubscriptionApplicationErrors;\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 reason: options?.reason,\n });\n\n const reqOpts =\n ambassadorWixBillingV1Subscription.customerCancelSubscription(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'subscription.billingSettings.billingAddress.address' },\n { path: 'subscription.shippingAddress.address' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { id: '$[0]', reason: '$[1].reason' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CustomerCancelSubscriptionOptions {\n /** Optional action reason message */\n reason?: string | null;\n}\n\n/**\n * Identity must be a site member and customer subscription belongs to\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @fqn com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.TurnOnSubscriptionAutoRenewal\n */\nexport async function customerTurnOnSubscriptionAutoRenewal(\n _id: string,\n options?: CustomerTurnOnSubscriptionAutoRenewalOptions\n): Promise<\n NonNullablePaths<\n CustomerTurnOnAutoRenewalResponse,\n | `subscription.name`\n | `subscription.customer.visitorId`\n | `subscription.customer.contactId`\n | `subscription.customer.memberId`\n | `subscription.customer.accountId`\n | `subscription.status`\n | `subscription.billingSettings.currency`\n | `subscription.billingSettings.paymentMethod._id`\n | `subscription.billingSettings.collectionMethod`\n | `subscription.billingSettings.cycleDuration.unit`\n | `subscription.billingSettings.cycleAutoRenew`\n | `subscription.billingSettings.billingAddress.address.streetAddress.number`\n | `subscription.billingSettings.billingAddress.address.streetAddress.name`\n | `subscription.billingSettings.taxSettings.inclusive`\n | `subscription.billingSettings.additionalFees`\n | `subscription.billingSettings.additionalFees.${number}.name`\n | `subscription.billingSettings.additionalFees.${number}.amount`\n | `subscription.billingSettings.additionalFees.${number}.trigger`\n | `subscription.billingSettings.additionalFees.${number}.tax.amount`\n | `subscription.billingSettings.additionalFees.${number}.tax.percentage`\n | `subscription.billingSettings.additionalFees.${number}.tax.dynamic.taxableAddressType`\n | `subscription.billingSettings.additionalFees.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.additionalFees.${number}.origin.appId`\n | `subscription.billingSettings.additionalFees.${number}.origin.entityId`\n | `subscription.billingSettings.shippingCharges.amount`\n | `subscription.billingSettings.shippingCharges.discounts`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.amount`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.percentage`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.appId`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.entityId`\n | `subscription.billingSettings.discounts`\n | `subscription.billingSettings.externalCollectionDetails.collectorName`\n | `subscription.billingStatus.currentCycle`\n | `subscription.billingStatus.latestPaymentData.invoiceId`\n | `subscription.billingStatus.latestPaymentData.paymentStatus`\n | `subscription.billingStatus.latestPaymentData.totals.totalPrice`\n | `subscription.billingStatus.latestPaymentData.totals.subtotal`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxType`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxRate`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.jurisdictionType`\n | `subscription.billingStatus.gracePeriodData.automaticRetryData.enabled`\n | `subscription.policies.customerCanCancel`\n | `subscription.policies.businessCanExtend`\n | `subscription.policies.allowEndOfCycleCancellation`\n | `subscription.pauseInfo.pausePolicy`\n | `subscription.pauseInfo.pauseAt`\n | `subscription.pauseInfo.resumeAt`\n | `subscription.pauseInfo.type`\n | `subscription.cancellationInfo.initiator`\n | `subscription.pendingUpdateData.itemsToUpdate`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}._id`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}.pricingModel.fixedPrice.itemPrice`\n | `subscription.pendingUpdateData.itemsToAdd`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.name`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.catalogReference.catalogItemId`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.category`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.quantity`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.applicationFee.amount`\n | `subscription.pendingUpdateData.itemsToDelete`\n | `subscription.pendingUpdateData.numberOfRequests`\n | `subscription.items`,\n 8\n > & {\n __applicationErrorsType?: CustomerTurnOnSubscriptionAutoRenewalApplicationErrors;\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 reason: options?.reason,\n });\n\n const reqOpts =\n ambassadorWixBillingV1Subscription.customerTurnOnSubscriptionAutoRenewal(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'subscription.billingSettings.billingAddress.address' },\n { path: 'subscription.shippingAddress.address' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { id: '$[0]', reason: '$[1].reason' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CustomerTurnOnSubscriptionAutoRenewalOptions {\n /** Optional action reason message */\n reason?: string | null;\n}\n\n/**\n * Identity must be a site member and customer subscription belongs to\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @fqn com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.TurnOffSubscriptionAutoRenewal\n */\nexport async function customerTurnOffSubscriptionAutoRenewal(\n _id: string,\n options?: CustomerTurnOffSubscriptionAutoRenewalOptions\n): Promise<\n NonNullablePaths<\n CustomerTurnOffAutoRenewalResponse,\n | `subscription.name`\n | `subscription.customer.visitorId`\n | `subscription.customer.contactId`\n | `subscription.customer.memberId`\n | `subscription.customer.accountId`\n | `subscription.status`\n | `subscription.billingSettings.currency`\n | `subscription.billingSettings.paymentMethod._id`\n | `subscription.billingSettings.collectionMethod`\n | `subscription.billingSettings.cycleDuration.unit`\n | `subscription.billingSettings.cycleAutoRenew`\n | `subscription.billingSettings.billingAddress.address.streetAddress.number`\n | `subscription.billingSettings.billingAddress.address.streetAddress.name`\n | `subscription.billingSettings.taxSettings.inclusive`\n | `subscription.billingSettings.additionalFees`\n | `subscription.billingSettings.additionalFees.${number}.name`\n | `subscription.billingSettings.additionalFees.${number}.amount`\n | `subscription.billingSettings.additionalFees.${number}.trigger`\n | `subscription.billingSettings.additionalFees.${number}.tax.amount`\n | `subscription.billingSettings.additionalFees.${number}.tax.percentage`\n | `subscription.billingSettings.additionalFees.${number}.tax.dynamic.taxableAddressType`\n | `subscription.billingSettings.additionalFees.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.additionalFees.${number}.origin.appId`\n | `subscription.billingSettings.additionalFees.${number}.origin.entityId`\n | `subscription.billingSettings.shippingCharges.amount`\n | `subscription.billingSettings.shippingCharges.discounts`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.amount`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.percentage`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.appId`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.entityId`\n | `subscription.billingSettings.discounts`\n | `subscription.billingSettings.externalCollectionDetails.collectorName`\n | `subscription.billingStatus.currentCycle`\n | `subscription.billingStatus.latestPaymentData.invoiceId`\n | `subscription.billingStatus.latestPaymentData.paymentStatus`\n | `subscription.billingStatus.latestPaymentData.totals.totalPrice`\n | `subscription.billingStatus.latestPaymentData.totals.subtotal`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxType`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxRate`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.jurisdictionType`\n | `subscription.billingStatus.gracePeriodData.automaticRetryData.enabled`\n | `subscription.policies.customerCanCancel`\n | `subscription.policies.businessCanExtend`\n | `subscription.policies.allowEndOfCycleCancellation`\n | `subscription.pauseInfo.pausePolicy`\n | `subscription.pauseInfo.pauseAt`\n | `subscription.pauseInfo.resumeAt`\n | `subscription.pauseInfo.type`\n | `subscription.cancellationInfo.initiator`\n | `subscription.pendingUpdateData.itemsToUpdate`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}._id`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}.pricingModel.fixedPrice.itemPrice`\n | `subscription.pendingUpdateData.itemsToAdd`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.name`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.catalogReference.catalogItemId`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.category`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.quantity`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.applicationFee.amount`\n | `subscription.pendingUpdateData.itemsToDelete`\n | `subscription.pendingUpdateData.numberOfRequests`\n | `subscription.items`,\n 8\n > & {\n __applicationErrorsType?: CustomerTurnOffSubscriptionAutoRenewalApplicationErrors;\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 reason: options?.reason,\n });\n\n const reqOpts =\n ambassadorWixBillingV1Subscription.customerTurnOffSubscriptionAutoRenewal(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'subscription.billingSettings.billingAddress.address' },\n { path: 'subscription.shippingAddress.address' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { id: '$[0]', reason: '$[1].reason' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CustomerTurnOffSubscriptionAutoRenewalOptions {\n /** Optional action reason message */\n reason?: string | null;\n}\n\n/** @param _id - The ID of the subscription to be extended\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @requiredField options.billingCyclesToAdd\n * @fqn com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.ExtendSubscription\n */\nexport async function customerExtendSubscription(\n _id: string,\n options?: NonNullablePaths<\n CustomerExtendSubscriptionOptions,\n `billingCyclesToAdd`,\n 2\n >\n): Promise<\n NonNullablePaths<\n CustomerExtendSubscriptionResponse,\n | `subscription.name`\n | `subscription.customer.visitorId`\n | `subscription.customer.contactId`\n | `subscription.customer.memberId`\n | `subscription.customer.accountId`\n | `subscription.status`\n | `subscription.billingSettings.currency`\n | `subscription.billingSettings.paymentMethod._id`\n | `subscription.billingSettings.collectionMethod`\n | `subscription.billingSettings.cycleDuration.unit`\n | `subscription.billingSettings.cycleAutoRenew`\n | `subscription.billingSettings.billingAddress.address.streetAddress.number`\n | `subscription.billingSettings.billingAddress.address.streetAddress.name`\n | `subscription.billingSettings.taxSettings.inclusive`\n | `subscription.billingSettings.additionalFees`\n | `subscription.billingSettings.additionalFees.${number}.name`\n | `subscription.billingSettings.additionalFees.${number}.amount`\n | `subscription.billingSettings.additionalFees.${number}.trigger`\n | `subscription.billingSettings.additionalFees.${number}.tax.amount`\n | `subscription.billingSettings.additionalFees.${number}.tax.percentage`\n | `subscription.billingSettings.additionalFees.${number}.tax.dynamic.taxableAddressType`\n | `subscription.billingSettings.additionalFees.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.additionalFees.${number}.origin.appId`\n | `subscription.billingSettings.additionalFees.${number}.origin.entityId`\n | `subscription.billingSettings.shippingCharges.amount`\n | `subscription.billingSettings.shippingCharges.discounts`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.amount`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.percentage`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.appId`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.entityId`\n | `subscription.billingSettings.discounts`\n | `subscription.billingSettings.externalCollectionDetails.collectorName`\n | `subscription.billingStatus.currentCycle`\n | `subscription.billingStatus.latestPaymentData.invoiceId`\n | `subscription.billingStatus.latestPaymentData.paymentStatus`\n | `subscription.billingStatus.latestPaymentData.totals.totalPrice`\n | `subscription.billingStatus.latestPaymentData.totals.subtotal`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxType`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxRate`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.jurisdictionType`\n | `subscription.billingStatus.gracePeriodData.automaticRetryData.enabled`\n | `subscription.policies.customerCanCancel`\n | `subscription.policies.businessCanExtend`\n | `subscription.policies.allowEndOfCycleCancellation`\n | `subscription.pauseInfo.pausePolicy`\n | `subscription.pauseInfo.pauseAt`\n | `subscription.pauseInfo.resumeAt`\n | `subscription.pauseInfo.type`\n | `subscription.cancellationInfo.initiator`\n | `subscription.pendingUpdateData.itemsToUpdate`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}._id`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}.pricingModel.fixedPrice.itemPrice`\n | `subscription.pendingUpdateData.itemsToAdd`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.name`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.catalogReference.catalogItemId`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.category`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.quantity`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.applicationFee.amount`\n | `subscription.pendingUpdateData.itemsToDelete`\n | `subscription.pendingUpdateData.numberOfRequests`\n | `subscription.items`,\n 8\n > & {\n __applicationErrorsType?: CustomerExtendSubscriptionApplicationErrors;\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 reason: options?.reason,\n billingCyclesToAdd: options?.billingCyclesToAdd,\n });\n\n const reqOpts =\n ambassadorWixBillingV1Subscription.customerExtendSubscription(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'subscription.billingSettings.billingAddress.address' },\n { path: 'subscription.shippingAddress.address' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n id: '$[0]',\n reason: '$[1].reason',\n billingCyclesToAdd: '$[1].billingCyclesToAdd',\n },\n singleArgumentUnchanged: false,\n },\n ['_id', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CustomerExtendSubscriptionOptions {\n /** Optional action reason message */\n reason?: string | null;\n /**\n * For termed - Subscription end date will be updated with the extension period and number of cycles will be added\n * @min 1\n */\n billingCyclesToAdd: number | null;\n}\n\n/**\n * identity must be a site member\n * @public\n * @documentationMaturity preview\n * @fqn com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.QuerySubscriptions\n */\nexport async function customerQuerySubscriptions(\n options?: CustomerQuerySubscriptionsOptions\n): Promise<\n NonNullablePaths<\n QuerySubscriptionsResponse,\n | `subscriptions`\n | `subscriptions.${number}.name`\n | `subscriptions.${number}.customer.visitorId`\n | `subscriptions.${number}.customer.contactId`\n | `subscriptions.${number}.customer.memberId`\n | `subscriptions.${number}.customer.accountId`\n | `subscriptions.${number}.status`\n | `subscriptions.${number}.billingSettings.currency`\n | `subscriptions.${number}.billingSettings.paymentMethod._id`\n | `subscriptions.${number}.billingSettings.collectionMethod`\n | `subscriptions.${number}.billingSettings.cycleDuration.unit`\n | `subscriptions.${number}.billingSettings.cycleAutoRenew`\n | `subscriptions.${number}.billingSettings.taxSettings.inclusive`\n | `subscriptions.${number}.billingSettings.shippingCharges.amount`\n | `subscriptions.${number}.billingSettings.externalCollectionDetails.collectorName`\n | `subscriptions.${number}.billingStatus.currentCycle`\n | `subscriptions.${number}.billingStatus.latestPaymentData.invoiceId`\n | `subscriptions.${number}.billingStatus.latestPaymentData.paymentStatus`\n | `subscriptions.${number}.policies.customerCanCancel`\n | `subscriptions.${number}.policies.businessCanExtend`\n | `subscriptions.${number}.policies.allowEndOfCycleCancellation`\n | `subscriptions.${number}.pauseInfo.pausePolicy`\n | `subscriptions.${number}.pauseInfo.pauseAt`\n | `subscriptions.${number}.pauseInfo.resumeAt`\n | `subscriptions.${number}.pauseInfo.type`\n | `subscriptions.${number}.cancellationInfo.initiator`\n | `subscriptions.${number}.pendingUpdateData.numberOfRequests`,\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 query: options?.query,\n });\n\n const reqOpts =\n ambassadorWixBillingV1Subscription.customerQuerySubscriptions(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'subscriptions.billingSettings.billingAddress.address' },\n { path: 'subscriptions.shippingAddress.address' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0].query' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CustomerQuerySubscriptionsOptions {\n query?: QueryV2;\n}\n\n/**\n * Update subscription's payment method.\n * Supported only for recurring subscriptions or one time subscriptions during free trial.\n * @param _id - Subscription ID\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @requiredField paymentMethodId\n * @fqn com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.UpdateSubscriptionPaymentMethod\n */\nexport async function customerUpdateSubscriptionPaymentMethod(\n _id: string,\n paymentMethodId: string\n): Promise<\n NonNullablePaths<\n UpdateSubscriptionPaymentMethodResponse,\n | `subscription.name`\n | `subscription.customer.visitorId`\n | `subscription.customer.contactId`\n | `subscription.customer.memberId`\n | `subscription.customer.accountId`\n | `subscription.status`\n | `subscription.billingSettings.currency`\n | `subscription.billingSettings.paymentMethod._id`\n | `subscription.billingSettings.collectionMethod`\n | `subscription.billingSettings.cycleDuration.unit`\n | `subscription.billingSettings.cycleAutoRenew`\n | `subscription.billingSettings.billingAddress.address.streetAddress.number`\n | `subscription.billingSettings.billingAddress.address.streetAddress.name`\n | `subscription.billingSettings.taxSettings.inclusive`\n | `subscription.billingSettings.additionalFees`\n | `subscription.billingSettings.additionalFees.${number}.name`\n | `subscription.billingSettings.additionalFees.${number}.amount`\n | `subscription.billingSettings.additionalFees.${number}.trigger`\n | `subscription.billingSettings.additionalFees.${number}.tax.amount`\n | `subscription.billingSettings.additionalFees.${number}.tax.percentage`\n | `subscription.billingSettings.additionalFees.${number}.tax.dynamic.taxableAddressType`\n | `subscription.billingSettings.additionalFees.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.additionalFees.${number}.origin.appId`\n | `subscription.billingSettings.additionalFees.${number}.origin.entityId`\n | `subscription.billingSettings.shippingCharges.amount`\n | `subscription.billingSettings.shippingCharges.discounts`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.amount`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.percentage`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.appId`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.entityId`\n | `subscription.billingSettings.discounts`\n | `subscription.billingSettings.externalCollectionDetails.collectorName`\n | `subscription.billingStatus.currentCycle`\n | `subscription.billingStatus.latestPaymentData.invoiceId`\n | `subscription.billingStatus.latestPaymentData.paymentStatus`\n | `subscription.billingStatus.latestPaymentData.totals.totalPrice`\n | `subscription.billingStatus.latestPaymentData.totals.subtotal`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxType`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxRate`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.jurisdictionType`\n | `subscription.billingStatus.gracePeriodData.automaticRetryData.enabled`\n | `subscription.policies.customerCanCancel`\n | `subscription.policies.businessCanExtend`\n | `subscription.policies.allowEndOfCycleCancellation`\n | `subscription.pauseInfo.pausePolicy`\n | `subscription.pauseInfo.pauseAt`\n | `subscription.pauseInfo.resumeAt`\n | `subscription.pauseInfo.type`\n | `subscription.cancellationInfo.initiator`\n | `subscription.pendingUpdateData.itemsToUpdate`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}._id`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}.pricingModel.fixedPrice.itemPrice`\n | `subscription.pendingUpdateData.itemsToAdd`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.name`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.catalogReference.catalogItemId`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.category`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.quantity`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.applicationFee.amount`\n | `subscription.pendingUpdateData.itemsToDelete`\n | `subscription.pendingUpdateData.numberOfRequests`\n | `subscription.items`,\n 8\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 paymentMethodId: paymentMethodId,\n });\n\n const reqOpts =\n ambassadorWixBillingV1Subscription.customerUpdateSubscriptionPaymentMethod(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'subscription.billingSettings.billingAddress.address' },\n { path: 'subscription.shippingAddress.address' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { id: '$[0]', paymentMethodId: '$[1]' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'paymentMethodId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/** @public\n * @documentationMaturity preview\n * @requiredField _id\n * @fqn com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.AllowedActions\n */\nexport async function customerAllowedActions(\n _id: string\n): Promise<\n NonNullablePaths<\n CustomerAllowedActionsResponse,\n `actions` | `actions.${number}.actionType`,\n 4\n >\n> {\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 =\n ambassadorWixBillingV1Subscription.customerAllowedActions(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]' },\n singleArgumentUnchanged: false,\n },\n ['_id']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * List future subscriptions charges.\n * @param _id - Subscription id upcoming charge to be previewed for\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @fqn com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.ListUpcomingCharges\n */\nexport async function customerListUpcomingCharges(\n _id: string\n): Promise<\n NonNullablePaths<\n CustomerListUpcomingChargesResponse,\n | `upcomingCharge.cycle`\n | `upcomingCharge.totals.totalPrice`\n | `upcomingCharge.totals.subtotal`\n | `upcomingCharge.invoiceItems`\n | `upcomingCharge.invoiceItems.${number}.recurring.cycleNumber`\n | `upcomingCharge.invoiceItems.${number}._id`\n | `upcomingCharge.invoiceItems.${number}.name`\n | `upcomingCharge.invoiceItems.${number}.catalogReference.catalogItemId`\n | `upcomingCharge.invoiceItems.${number}.category`\n | `upcomingCharge.invoiceItems.${number}.quantity`\n | `upcomingCharge.invoiceItems.${number}.priceDetails.price`\n | `upcomingCharge.invoiceItems.${number}.priceDetails.tax.amount`\n | `upcomingCharge.invoiceItems.${number}.priceDetails.tax.percentage`\n | `upcomingCharge.invoiceItems.${number}.priceDetails.discount.amount`\n | `upcomingCharge.invoiceItems.${number}.priceDetails.discount.percentage`\n | `upcomingCharge.invoiceItems.${number}.priceDetails.applicationFeeDetails.amount`\n | `upcomingCharge.invoiceItems.${number}.taxData.lineItemTaxSummary.aggregatedTaxAmount`\n | `upcomingCharge.invoiceItems.${number}.taxData.lineItemTaxSummary.aggregatedTaxRate`\n | `upcomingCharge.invoiceItems.${number}.taxData.lineItemTaxSummary.taxableAmount`,\n 7\n >\n> {\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 =\n ambassadorWixBillingV1Subscription.customerListUpcomingCharges(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]' },\n singleArgumentUnchanged: false,\n },\n ['_id']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Creates auto-charge order that can be paid by customer\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @fqn com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.InitiatePaymentMethodSetup\n */\nexport async function customerInitiatePaymentMethodSetup(\n _id: string,\n options?: CustomerInitiatePaymentMethodSetupOptions\n): Promise<\n NonNullablePaths<InitiatePaymentMethodSetupResponse, `paymentOrderId`, 2>\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 paymentMode: options?.paymentMode,\n paymentSettings: options?.paymentSettings,\n });\n\n const reqOpts =\n ambassadorWixBillingV1Subscription.customerInitiatePaymentMethodSetup(\n payload\n );\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 id: '$[0]',\n paymentMode: '$[1].paymentMode',\n paymentSettings: '$[1].paymentSettings',\n },\n singleArgumentUnchanged: false,\n },\n ['_id', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CustomerInitiatePaymentMethodSetupOptions {\n paymentMode?: PaymentModeWithLiterals;\n paymentSettings?: PaymentSettings;\n}\n\n/**\n * This used only for automation and permitted tenants (QA & testing)\n * @public\n * @documentationMaturity preview\n * @requiredField options.tenantId\n * @requiredField subscriptionId\n * @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsBackOfficeService.PayCycle\n */\nexport async function payCycle(\n subscriptionId: string,\n options?: NonNullablePaths<PayCycleOptions, `tenantId`, 2>\n): Promise<\n NonNullablePaths<\n PayCycleResponse,\n | `invoiceId`\n | `subscription.name`\n | `subscription.customer.visitorId`\n | `subscription.customer.contactId`\n | `subscription.customer.memberId`\n | `subscription.customer.accountId`\n | `subscription.status`\n | `subscription.billingSettings.currency`\n | `subscription.billingSettings.paymentMethod._id`\n | `subscription.billingSettings.collectionMethod`\n | `subscription.billingSettings.cycleDuration.unit`\n | `subscription.billingSettings.cycleAutoRenew`\n | `subscription.billingSettings.billingAddress.address.streetAddress.number`\n | `subscription.billingSettings.billingAddress.address.streetAddress.name`\n | `subscription.billingSettings.taxSettings.inclusive`\n | `subscription.billingSettings.additionalFees`\n | `subscription.billingSettings.additionalFees.${number}.name`\n | `subscription.billingSettings.additionalFees.${number}.amount`\n | `subscription.billingSettings.additionalFees.${number}.trigger`\n | `subscription.billingSettings.additionalFees.${number}.tax.amount`\n | `subscription.billingSettings.additionalFees.${number}.tax.percentage`\n | `subscription.billingSettings.additionalFees.${number}.tax.dynamic.taxableAddressType`\n | `subscription.billingSettings.additionalFees.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.additionalFees.${number}.origin.appId`\n | `subscription.billingSettings.additionalFees.${number}.origin.entityId`\n | `subscription.billingSettings.shippingCharges.amount`\n | `subscription.billingSettings.shippingCharges.discounts`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.amount`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.percentage`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.appId`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.entityId`\n | `subscription.billingSettings.discounts`\n | `subscription.billingSettings.externalCollectionDetails.collectorName`\n | `subscription.billingStatus.currentCycle`\n | `subscription.billingStatus.latestPaymentData.invoiceId`\n | `subscription.billingStatus.latestPaymentData.paymentStatus`\n | `subscription.billingStatus.latestPaymentData.totals.totalPrice`\n | `subscription.billingStatus.latestPaymentData.totals.subtotal`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxType`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxRate`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.jurisdictionType`\n | `subscription.billingStatus.gracePeriodData.automaticRetryData.enabled`\n | `subscription.policies.customerCanCancel`\n | `subscription.policies.businessCanExtend`\n | `subscription.policies.allowEndOfCycleCancellation`\n | `subscription.pauseInfo.pausePolicy`\n | `subscription.pauseInfo.pauseAt`\n | `subscription.pauseInfo.resumeAt`\n | `subscription.pauseInfo.type`\n | `subscription.cancellationInfo.initiator`\n | `subscription.pendingUpdateData.itemsToUpdate`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}._id`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}.pricingModel.fixedPrice.itemPrice`\n | `subscription.pendingUpdateData.itemsToAdd`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.name`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.catalogReference.catalogItemId`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.category`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.quantity`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.applicationFee.amount`\n | `subscription.pendingUpdateData.itemsToDelete`\n | `subscription.pendingUpdateData.numberOfRequests`\n | `subscription.items`,\n 8\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 subscriptionId: subscriptionId,\n paymentTestMode: options?.paymentTestMode,\n tenantId: options?.tenantId,\n });\n\n const reqOpts = ambassadorWixBillingV1Subscription.payCycle(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'subscription.billingSettings.billingAddress.address' },\n { path: 'subscription.shippingAddress.address' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n subscriptionId: '$[0]',\n paymentTestMode: '$[1].paymentTestMode',\n tenantId: '$[1].tenantId',\n },\n singleArgumentUnchanged: false,\n },\n ['subscriptionId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface PayCycleOptions {\n paymentTestMode?: PaymentTestModeWithLiterals;\n /** @format GUID */\n tenantId: string;\n}\n\n/**\n * Returns a single subscription by its id\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @permissionId subscriptions.view\n * @applicableIdentity APP\n * @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.GetSubscription\n */\nexport async function getSubscription(\n _id: string\n): Promise<\n NonNullablePaths<\n GetSubscriptionResponse,\n | `subscription.name`\n | `subscription.customer.visitorId`\n | `subscription.customer.contactId`\n | `subscription.customer.memberId`\n | `subscription.customer.accountId`\n | `subscription.status`\n | `subscription.billingSettings.currency`\n | `subscription.billingSettings.paymentMethod._id`\n | `subscription.billingSettings.collectionMethod`\n | `subscription.billingSettings.cycleDuration.unit`\n | `subscription.billingSettings.cycleAutoRenew`\n | `subscription.billingSettings.billingAddress.address.streetAddress.number`\n | `subscription.billingSettings.billingAddress.address.streetAddress.name`\n | `subscription.billingSettings.taxSettings.inclusive`\n | `subscription.billingSettings.additionalFees`\n | `subscription.billingSettings.additionalFees.${number}.name`\n | `subscription.billingSettings.additionalFees.${number}.amount`\n | `subscription.billingSettings.additionalFees.${number}.trigger`\n | `subscription.billingSettings.additionalFees.${number}.tax.amount`\n | `subscription.billingSettings.additionalFees.${number}.tax.percentage`\n | `subscription.billingSettings.additionalFees.${number}.tax.dynamic.taxableAddressType`\n | `subscription.billingSettings.additionalFees.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.additionalFees.${number}.origin.appId`\n | `subscription.billingSettings.additionalFees.${number}.origin.entityId`\n | `subscription.billingSettings.shippingCharges.amount`\n | `subscription.billingSettings.shippingCharges.discounts`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.amount`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.percentage`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.appId`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.entityId`\n | `subscription.billingSettings.discounts`\n | `subscription.billingSettings.externalCollectionDetails.collectorName`\n | `subscription.billingStatus.currentCycle`\n | `subscription.billingStatus.latestPaymentData.invoiceId`\n | `subscription.billingStatus.latestPaymentData.paymentStatus`\n | `subscription.billingStatus.latestPaymentData.totals.totalPrice`\n | `subscription.billingStatus.latestPaymentData.totals.subtotal`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxType`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxRate`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.jurisdictionType`\n | `subscription.billingStatus.gracePeriodData.automaticRetryData.enabled`\n | `subscription.policies.customerCanCancel`\n | `subscription.policies.businessCanExtend`\n | `subscription.policies.allowEndOfCycleCancellation`\n | `subscription.pauseInfo.pausePolicy`\n | `subscription.pauseInfo.pauseAt`\n | `subscription.pauseInfo.resumeAt`\n | `subscription.pauseInfo.type`\n | `subscription.cancellationInfo.initiator`\n | `subscription.pendingUpdateData.itemsToUpdate`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}._id`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}.pricingModel.fixedPrice.itemPrice`\n | `subscription.pendingUpdateData.itemsToAdd`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.name`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.catalogReference.catalogItemId`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.category`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.quantity`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.applicationFee.amount`\n | `subscription.pendingUpdateData.itemsToDelete`\n | `subscription.pendingUpdateData.numberOfRequests`\n | `subscription.items`,\n 8\n >\n> {\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 = ambassadorWixBillingV1Subscription.getSubscription(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'subscription.billingSettings.billingAddress.address' },\n { path: 'subscription.shippingAddress.address' },\n ],\n },\n ])\n )!;\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 * Update subscription's payment method.\n * Supported only for recurring subscriptions or one time subscriptions during free trial.\n * @param _id - Subscription ID\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @requiredField paymentMethodId\n * @permissionId subscriptions.manage\n * @applicableIdentity APP\n * @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.UpdateSubscriptionPaymentMethod\n */\nexport async function updateSubscriptionPaymentMethod(\n _id: string,\n paymentMethodId: string\n): Promise<\n NonNullablePaths<\n UpdateSubscriptionPaymentMethodResponse,\n | `subscription.name`\n | `subscription.customer.visitorId`\n | `subscription.customer.contactId`\n | `subscription.customer.memberId`\n | `subscription.customer.accountId`\n | `subscription.status`\n | `subscription.billingSettings.currency`\n | `subscription.billingSettings.paymentMethod._id`\n | `subscription.billingSettings.collectionMethod`\n | `subscription.billingSettings.cycleDuration.unit`\n | `subscription.billingSettings.cycleAutoRenew`\n | `subscription.billingSettings.billingAddress.address.streetAddress.number`\n | `subscription.billingSettings.billingAddress.address.streetAddress.name`\n | `subscription.billingSettings.taxSettings.inclusive`\n | `subscription.billingSettings.additionalFees`\n | `subscription.billingSettings.additionalFees.${number}.name`\n | `subscription.billingSettings.additionalFees.${number}.amount`\n | `subscription.billingSettings.additionalFees.${number}.trigger`\n | `subscription.billingSettings.additionalFees.${number}.tax.amount`\n | `subscription.billingSettings.additionalFees.${number}.tax.percentage`\n | `subscription.billingSettings.additionalFees.${number}.tax.dynamic.taxableAddressType`\n | `subscription.billingSettings.additionalFees.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.additionalFees.${number}.origin.appId`\n | `subscription.billingSettings.additionalFees.${number}.origin.entityId`\n | `subscription.billingSettings.shippingCharges.amount`\n | `subscription.billingSettings.shippingCharges.discounts`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.amount`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.percentage`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.appId`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.entityId`\n | `subscription.billingSettings.discounts`\n | `subscription.billingSettings.externalCollectionDetails.collectorName`\n | `subscription.billingStatus.currentCycle`\n | `subscription.billingStatus.latestPaymentData.invoiceId`\n | `subscription.billingStatus.latestPaymentData.paymentStatus`\n | `subscription.billingStatus.latestPaymentData.totals.totalPrice`\n | `subscription.billingStatus.latestPaymentData.totals.subtotal`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxType`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxRate`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.jurisdictionType`\n | `subscription.billingStatus.gracePeriodData.automaticRetryData.enabled`\n | `subscription.policies.customerCanCancel`\n | `subscription.policies.businessCanExtend`\n | `subscription.policies.allowEndOfCycleCancellation`\n | `subscription.pauseInfo.pausePolicy`\n | `subscription.pauseInfo.pauseAt`\n | `subscription.pauseInfo.resumeAt`\n | `subscription.pauseInfo.type`\n | `subscription.cancellationInfo.initiator`\n | `subscription.pendingUpdateData.itemsToUpdate`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}._id`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}.pricingModel.fixedPrice.itemPrice`\n | `subscription.pendingUpdateData.itemsToAdd`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.name`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.catalogReference.catalogItemId`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.category`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.quantity`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.applicationFee.amount`\n | `subscription.pendingUpdateData.itemsToDelete`\n | `subscription.pendingUpdateData.numberOfRequests`\n | `subscription.items`,\n 8\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 paymentMethodId: paymentMethodId,\n });\n\n const reqOpts =\n ambassadorWixBillingV1Subscription.updateSubscriptionPaymentMethod(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'subscription.billingSettings.billingAddress.address' },\n { path: 'subscription.shippingAddress.address' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { id: '$[0]', paymentMethodId: '$[1]' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'paymentMethodId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Updates the next billing date for a subscription.\n *\n *\n * Updating the billing date may add a proration charge or credit to the next\n * invoice. The customer must pay more in case you extend the current billing\n * cycle. They pay less in case you shorten the current billing cycle. You can\n * choose whether BASS automatically calculates the proration amount based on\n * the number of days added to or removed from the current billing cycle.\n * Alternatively, you can pass a proration amount based on your own custom\n * calculation. The custom proration amount can't exceed the total of the\n * current billing cycle.\n * @param _id - ID of the subscription to update the billing date for.\n * @param billingDate - New billing date in `YYYY-MM-DDThh:mm:ss:sssZ` format.\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @requiredField billingDate\n * @permissionId subscriptions.manage\n * @applicableIdentity APP\n * @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.UpdateSubscriptionBillingDate\n */\nexport async function updateSubscriptionBillingDate(\n _id: string,\n billingDate: Date,\n options?: UpdateSubscriptionBillingDateOptions\n): Promise<\n NonNullablePaths<\n UpdateSubscriptionBillingDateResponse,\n | `subscription.name`\n | `subscription.customer.visitorId`\n | `subscription.customer.contactId`\n | `subscription.customer.memberId`\n | `subscription.customer.accountId`\n | `subscription.status`\n | `subscription.billingSettings.currency`\n | `subscription.billingSettings.paymentMethod._id`\n | `subscription.billingSettings.collectionMethod`\n | `subscription.billingSettings.cycleDuration.unit`\n | `subscription.billingSettings.cycleAutoRenew`\n | `subscription.billingSettings.billingAddress.address.streetAddress.number`\n | `subscription.billingSettings.billingAddress.address.streetAddress.name`\n | `subscription.billingSettings.taxSettings.inclusive`\n | `subscription.billingSettings.additionalFees`\n | `subscription.billingSettings.additionalFees.${number}.name`\n | `subscription.billingSettings.additionalFees.${number}.amount`\n | `subscription.billingSettings.additionalFees.${number}.trigger`\n | `subscription.billingSettings.additionalFees.${number}.tax.amount`\n | `subscription.billingSettings.additionalFees.${number}.tax.percentage`\n | `subscription.billingSettings.additionalFees.${number}.tax.dynamic.taxableAddressType`\n | `subscription.billingSettings.additionalFees.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.additionalFees.${number}.origin.appId`\n | `subscription.billingSettings.additionalFees.${number}.origin.entityId`\n | `subscription.billingSettings.shippingCharges.amount`\n | `subscription.billingSettings.shippingCharges.discounts`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.amount`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.percentage`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.appId`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.entityId`\n | `subscription.billingSettings.discounts`\n | `subscription.billingSettings.externalCollectionDetails.collectorName`\n | `subscription.billingStatus.currentCycle`\n | `subscription.billingStatus.latestPaymentData.invoiceId`\n | `subscription.billingStatus.latestPaymentData.paymentStatus`\n | `subscription.billingStatus.latestPaymentData.totals.totalPrice`\n | `subscription.billingStatus.latestPaymentData.totals.subtotal`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxType`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxRate`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.jurisdictionType`\n | `subscription.billingStatus.gracePeriodData.automaticRetryData.enabled`\n | `subscription.policies.customerCanCancel`\n | `subscription.policies.businessCanExtend`\n | `subscription.policies.allowEndOfCycleCancellation`\n | `subscription.pauseInfo.pausePolicy`\n | `subscription.pauseInfo.pauseAt`\n | `subscription.pauseInfo.resumeAt`\n | `subscription.pauseInfo.type`\n | `subscription.cancellationInfo.initiator`\n | `subscription.pendingUpdateData.itemsToUpdate`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}._id`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}.pricingModel.fixedPrice.itemPrice`\n | `subscription.pendingUpdateData.itemsToAdd`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.name`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.catalogReference.catalogItemId`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.category`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.quantity`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.applicationFee.amount`\n | `subscription.pendingUpdateData.itemsToDelete`\n | `subscription.pendingUpdateData.numberOfRequests`\n | `subscription.items`,\n 8\n > & {\n __applicationErrorsType?: UpdateSubscriptionBillingDateApplicationErrors;\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 id: _id,\n billingDate: billingDate,\n proration: options?.proration,\n });\n\n const reqOpts =\n ambassadorWixBillingV1Subscription.updateSubscriptionBillingDate(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'subscription.billingSettings.billingAddress.address' },\n { path: 'subscription.shippingAddress.address' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n id: '$[0]',\n billingDate: '$[1]',\n proration: '$[2].proration',\n },\n singleArgumentUnchanged: false,\n },\n ['_id', 'billingDate', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateSubscriptionBillingDateOptions {\n /**\n * Information about how BASS adjusts the total of the next invoice. Extending\n * the current billing cycle results in a higher payment, while shortening it\n * leads to a lower payment. BASS offers automatic calculation of the proration\n * amount based on the number of days added to or removed from the current billing\n * cycle. Alternatively, you can use your own custom method to calculate the\n * proration amount. The custom proration amount can't exceed the total of the\n * current billing cycle.\n */\n proration?: Proration;\n}\n\n/**\n * Cancels subscription immediately. Can be canceled by member if subscription policy allows it\n * Only PENDING, ACTIVE or PAUSED subscriptions can be canceled\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @requiredField actionContext\n * @permissionId subscriptions.manage\n * @applicableIdentity APP\n * @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.CancelSubscription\n */\nexport async function cancelSubscription(\n _id: string,\n actionContext: ActionContext\n): Promise<\n NonNullablePaths<\n CancelSubscriptionResponse,\n | `subscription.name`\n | `subscription.customer.visitorId`\n | `subscription.customer.contactId`\n | `subscription.customer.memberId`\n | `subscription.customer.accountId`\n | `subscription.status`\n | `subscription.billingSettings.currency`\n | `subscription.billingSettings.paymentMethod._id`\n | `subscription.billingSettings.collectionMethod`\n | `subscription.billingSettings.cycleDuration.unit`\n | `subscription.billingSettings.cycleAutoRenew`\n | `subscription.billingSettings.billingAddress.address.streetAddress.number`\n | `subscription.billingSettings.billingAddress.address.streetAddress.name`\n | `subscription.billingSettings.taxSettings.inclusive`\n | `subscription.billingSettings.additionalFees`\n | `subscription.billingSettings.additionalFees.${number}.name`\n | `subscription.billingSettings.additionalFees.${number}.amount`\n | `subscription.billingSettings.additionalFees.${number}.trigger`\n | `subscription.billingSettings.additionalFees.${number}.tax.amount`\n | `subscription.billingSettings.additionalFees.${number}.tax.percentage`\n | `subscription.billingSettings.additionalFees.${number}.tax.dynamic.taxableAddressType`\n | `subscription.billingSettings.additionalFees.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.additionalFees.${number}.origin.appId`\n | `subscription.billingSettings.additionalFees.${number}.origin.entityId`\n | `subscription.billingSettings.shippingCharges.amount`\n | `subscription.billingSettings.shippingCharges.discounts`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.amount`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.percentage`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.appId`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.entityId`\n | `subscription.billingSettings.discounts`\n | `subscription.billingSettings.externalCollectionDetails.collectorName`\n | `subscription.billingStatus.currentCycle`\n | `subscription.billingStatus.latestPaymentData.invoiceId`\n | `subscription.billingStatus.latestPaymentData.paymentStatus`\n | `subscription.billingStatus.latestPaymentData.totals.totalPrice`\n | `subscription.billingStatus.latestPaymentData.totals.subtotal`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxType`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxRate`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.jurisdictionType`\n | `subscription.billingStatus.gracePeriodData.automaticRetryData.enabled`\n | `subscription.policies.customerCanCancel`\n | `subscription.policies.businessCanExtend`\n | `subscription.policies.allowEndOfCycleCancellation`\n | `subscription.pauseInfo.pausePolicy`\n | `subscription.pauseInfo.pauseAt`\n | `subscription.pauseInfo.resumeAt`\n | `subscription.pauseInfo.type`\n | `subscription.cancellationInfo.initiator`\n | `subscription.pendingUpdateData.itemsToUpdate`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}._id`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}.pricingModel.fixedPrice.itemPrice`\n | `subscription.pendingUpdateData.itemsToAdd`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.name`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.catalogReference.catalogItemId`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.category`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.quantity`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.applicationFee.amount`\n | `subscription.pendingUpdateData.itemsToDelete`\n | `subscription.pendingUpdateData.numberOfRequests`\n | `subscription.items`,\n 8\n > & {\n __applicationErrorsType?: CancelSubscriptionApplicationErrors;\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 actionContext: actionContext,\n });\n\n const reqOpts =\n ambassadorWixBillingV1Subscription.cancelSubscription(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'subscription.billingSettings.billingAddress.address' },\n { path: 'subscription.shippingAddress.address' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { id: '$[0]', actionContext: '$[1]' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'actionContext']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Pauses subscription now or in future. Possible to pause also payments schedule.\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @requiredField options.actionContext\n * @permissionId subscriptions.manage\n * @applicableIdentity APP\n * @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.PauseSubscription\n */\nexport async function pauseSubscription(\n _id: string,\n options?: NonNullablePaths<PauseSubscriptionOptions, `actionContext`, 2>\n): Promise<\n NonNullablePaths<\n PauseSubscriptionResponse,\n | `subscription.name`\n | `subscription.customer.visitorId`\n | `subscription.customer.contactId`\n | `subscription.customer.memberId`\n | `subscription.customer.accountId`\n | `subscription.status`\n | `subscription.billingSettings.currency`\n | `subscription.billingSettings.paymentMethod._id`\n | `subscription.billingSettings.collectionMethod`\n | `subscription.billingSettings.cycleDuration.unit`\n | `subscription.billingSettings.cycleAutoRenew`\n | `subscription.billingSettings.billingAddress.address.streetAddress.number`\n | `subscription.billingSettings.billingAddress.address.streetAddress.name`\n | `subscription.billingSettings.taxSettings.inclusive`\n | `subscription.billingSettings.additionalFees`\n | `subscription.billingSettings.additionalFees.${number}.name`\n | `subscription.billingSettings.additionalFees.${number}.amount`\n | `subscription.billingSettings.additionalFees.${number}.trigger`\n | `subscription.billingSettings.additionalFees.${number}.tax.amount`\n | `subscription.billingSettings.additionalFees.${number}.tax.percentage`\n | `subscription.billingSettings.additionalFees.${number}.tax.dynamic.taxableAddressType`\n | `subscription.billingSettings.additionalFees.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.additionalFees.${number}.origin.appId`\n | `subscription.billingSettings.additionalFees.${number}.origin.entityId`\n | `subscription.billingSettings.shippingCharges.amount`\n | `subscription.billingSettings.shippingCharges.discounts`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.amount`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.percentage`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.appId`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.entityId`\n | `subscription.billingSettings.discounts`\n | `subscription.billingSettings.externalCollectionDetails.collectorName`\n | `subscription.billingStatus.currentCycle`\n | `subscription.billingStatus.latestPaymentData.invoiceId`\n | `subscription.billingStatus.latestPaymentData.paymentStatus`\n | `subscription.billingStatus.latestPaymentData.totals.totalPrice`\n | `subscription.billingStatus.latestPaymentData.totals.subtotal`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxType`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxRate`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.jurisdictionType`\n | `subscription.billingStatus.gracePeriodData.automaticRetryData.enabled`\n | `subscription.policies.customerCanCancel`\n | `subscription.policies.businessCanExtend`\n | `subscription.policies.allowEndOfCycleCancellation`\n | `subscription.pauseInfo.pausePolicy`\n | `subscription.pauseInfo.pauseAt`\n | `subscription.pauseInfo.resumeAt`\n | `subscription.pauseInfo.type`\n | `subscription.cancellationInfo.initiator`\n | `subscription.pendingUpdateData.itemsToUpdate`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}._id`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}.pricingModel.fixedPrice.itemPrice`\n | `subscription.pendingUpdateData.itemsToAdd`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.name`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.catalogReference.catalogItemId`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.category`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.quantity`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.applicationFee.amount`\n | `subscription.pendingUpdateData.itemsToDelete`\n | `subscription.pendingUpdateData.numberOfRequests`\n | `subscription.items`,\n 8\n > & {\n __applicationErrorsType?: PauseSubscriptionApplicationErrors;\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 pausePolicy: options?.pausePolicy,\n pauseAt: options?.pauseAt,\n pauseAtSchedule: options?.pauseAtSchedule,\n autoResumeAtSchedule: options?.autoResumeAtSchedule,\n actionContext: options?.actionContext,\n });\n\n const reqOpts = ambassadorWixBillingV1Subscription.pauseSubscription(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'subscription.billingSettings.billingAddress.address' },\n { path: 'subscription.shippingAddress.address' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n id: '$[0]',\n pausePolicy: '$[1].pausePolicy',\n pauseAt: '$[1].pauseAt',\n pauseAtSchedule: '$[1].pauseAtSchedule',\n autoResumeAtSchedule: '$[1].autoResumeAtSchedule',\n actionContext: '$[1].actionContext',\n },\n singleArgumentUnchanged: false,\n },\n ['_id', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface PauseSubscriptionOptions {\n pausePolicy?: PausePolicyWithLiterals;\n pauseAt?: PauseAtWithLiterals;\n /** contains additional scheduling information for certain pause_at options (for example: SPECIFIC_DATE & NUMBER_OF_CYCLES_FROM_TODAY) */\n pauseAtSchedule?: ScheduleAdditionalInfo;\n /** contains additional scheduling information for certain auto_resume_at either specific date */\n autoResumeAtSchedule?: ScheduleAdditionalInfo;\n actionContext: ActionContext;\n}\n\n/**\n * Resumes paused subscription now or in future.\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @requiredField options.actionContext\n * @permissionId subscriptions.manage\n * @applicableIdentity APP\n * @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.ResumeSubscription\n */\nexport async function resumeSubscription(\n _id: string,\n options?: NonNullablePaths<ResumeSubscriptionOptions, `actionContext`, 2>\n): Promise<\n NonNullablePaths<\n ResumeSubscriptionResponse,\n | `subscription.name`\n | `subscription.customer.visitorId`\n | `subscription.customer.contactId`\n | `subscription.customer.memberId`\n | `subscription.customer.accountId`\n | `subscription.status`\n | `subscription.billingSettings.currency`\n | `subscription.billingSettings.paymentMethod._id`\n | `subscription.billingSettings.collectionMethod`\n | `subscription.billingSettings.cycleDuration.unit`\n | `subscription.billingSettings.cycleAutoRenew`\n | `subscription.billingSettings.billingAddress.address.streetAddress.number`\n | `subscription.billingSettings.billingAddress.address.streetAddress.name`\n | `subscription.billingSettings.taxSettings.inclusive`\n | `subscription.billingSettings.additionalFees`\n | `subscription.billingSettings.additionalFees.${number}.name`\n | `subscription.billingSettings.additionalFees.${number}.amount`\n | `subscription.billingSettings.additionalFees.${number}.trigger`\n | `subscription.billingSettings.additionalFees.${number}.tax.amount`\n | `subscription.billingSettings.additionalFees.${number}.tax.percentage`\n | `subscription.billingSettings.additionalFees.${number}.tax.dynamic.taxableAddressType`\n | `subscription.billingSettings.additionalFees.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.additionalFees.${number}.origin.appId`\n | `subscription.billingSettings.additionalFees.${number}.origin.entityId`\n | `subscription.billingSettings.shippingCharges.amount`\n | `subscription.billingSettings.shippingCharges.discounts`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.amount`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.percentage`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.appId`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.entityId`\n | `subscription.billingSettings.discounts`\n | `subscription.billingSettings.externalCollectionDetails.collectorName`\n | `subscription.billingStatus.currentCycle`\n | `subscription.billingStatus.latestPaymentData.invoiceId`\n | `subscription.billingStatus.latestPaymentData.paymentStatus`\n | `subscription.billingStatus.latestPaymentData.totals.totalPrice`\n | `subscription.billingStatus.latestPaymentData.totals.subtotal`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxType`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxRate`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.jurisdictionType`\n | `subscription.billingStatus.gracePeriodData.automaticRetryData.enabled`\n | `subscription.policies.customerCanCancel`\n | `subscription.policies.businessCanExtend`\n | `subscription.policies.allowEndOfCycleCancellation`\n | `subscription.pauseInfo.pausePolicy`\n | `subscription.pauseInfo.pauseAt`\n | `subscription.pauseInfo.resumeAt`\n | `subscription.pauseInfo.type`\n | `subscription.cancellationInfo.initiator`\n | `subscription.pendingUpdateData.itemsToUpdate`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}._id`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}.pricingModel.fixedPrice.itemPrice`\n | `subscription.pendingUpdateData.itemsToAdd`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.name`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.catalogReference.catalogItemId`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.category`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.quantity`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.applicationFee.amount`\n | `subscription.pendingUpdateData.itemsToDelete`\n | `subscription.pendingUpdateData.numberOfRequests`\n | `subscription.items`,\n 8\n > & {\n __applicationErrorsType?: ResumeSubscriptionApplicationErrors;\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 resumeAt: options?.resumeAt,\n resumeAtSchedule: options?.resumeAtSchedule,\n actionContext: options?.actionContext,\n });\n\n const reqOpts =\n ambassadorWixBillingV1Subscription.resumeSubscription(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'subscription.billingSettings.billingAddress.address' },\n { path: 'subscription.shippingAddress.address' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n id: '$[0]',\n resumeAt: '$[1].resumeAt',\n resumeAtSchedule: '$[1].resumeAtSchedule',\n actionContext: '$[1].actionContext',\n },\n singleArgumentUnchanged: false,\n },\n ['_id', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ResumeSubscriptionOptions {\n resumeAt?: ResumeAtWithLiterals;\n /** contains additional scheduling information for certain resume_at options (for example: SPECIFIC_DATE) */\n resumeAtSchedule?: ScheduleAdditionalInfo;\n actionContext: ActionContext;\n}\n\n/**\n * Lists subscriptions based on specified filters.\n * By default non-draft subscriptions returned.\n * @public\n * @documentationMaturity preview\n * @requiredField query\n * @permissionId subscriptions.view\n * @applicableIdentity APP\n * @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.QuerySubscriptions\n */\nexport async function querySubscriptions(\n query: QueryV2\n): Promise<\n NonNullablePaths<\n QuerySubscriptionsResponse,\n | `subscriptions`\n | `subscriptions.${number}.name`\n | `subscriptions.${number}.customer.visitorId`\n | `subscriptions.${number}.customer.contactId`\n | `subscriptions.${number}.customer.memberId`\n | `subscriptions.${number}.customer.accountId`\n | `subscriptions.${number}.status`\n | `subscriptions.${number}.billingSettings.currency`\n | `subscriptions.${number}.billingSettings.paymentMethod._id`\n | `subscriptions.${number}.billingSettings.collectionMethod`\n | `subscriptions.${number}.billingSettings.cycleDuration.unit`\n | `subscriptions.${number}.billingSettings.cycleAutoRenew`\n | `subscriptions.${number}.billingSettings.taxSettings.inclusive`\n | `subscriptions.${number}.billingSettings.shippingCharges.amount`\n | `subscriptions.${number}.billingSettings.externalCollectionDetails.collectorName`\n | `subscriptions.${number}.billingStatus.currentCycle`\n | `subscriptions.${number}.billingStatus.latestPaymentData.invoiceId`\n | `subscriptions.${number}.billingStatus.latestPaymentData.paymentStatus`\n | `subscriptions.${number}.policies.customerCanCancel`\n | `subscriptions.${number}.policies.businessCanExtend`\n | `subscriptions.${number}.policies.allowEndOfCycleCancellation`\n | `subscriptions.${number}.pauseInfo.pausePolicy`\n | `subscriptions.${number}.pauseInfo.pauseAt`\n | `subscriptions.${number}.pauseInfo.resumeAt`\n | `subscriptions.${number}.pauseInfo.type`\n | `subscriptions.${number}.cancellationInfo.initiator`\n | `subscriptions.${number}.pendingUpdateData.numberOfRequests`,\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({ query: query });\n\n const reqOpts =\n ambassadorWixBillingV1Subscription.querySubscriptions(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'subscriptions.billingSettings.billingAddress.address' },\n { path: 'subscriptions.shippingAddress.address' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['query']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/** @public\n * @documentationMaturity preview\n * @permissionId subscriptions.view\n * @applicableIdentity APP\n * @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.SearchSubscriptions\n */\nexport async function searchSubscriptions(\n options?: SearchSubscriptionsOptions\n): Promise<\n NonNullablePaths<\n SearchSubscriptionsResponse,\n | `subscriptions`\n | `subscriptions.${number}.name`\n | `subscriptions.${number}.customer.visitorId`\n | `subscriptions.${number}.customer.contactId`\n | `subscriptions.${number}.customer.memberId`\n | `subscriptions.${number}.customer.accountId`\n | `subscriptions.${number}.status`\n | `subscriptions.${number}.billingSettings.currency`\n | `subscriptions.${number}.billingSettings.paymentMethod._id`\n | `subscriptions.${number}.billingSettings.collectionMethod`\n | `subscriptions.${number}.billingSettings.cycleDuration.unit`\n | `subscriptions.${number}.billingSettings.cycleAutoRenew`\n | `subscriptions.${number}.billingSettings.taxSettings.inclusive`\n | `subscriptions.${number}.billingSettings.shippingCharges.amount`\n | `subscriptions.${number}.billingSettings.externalCollectionDetails.collectorName`\n | `subscriptions.${number}.billingStatus.currentCycle`\n | `subscriptions.${number}.billingStatus.latestPaymentData.invoiceId`\n | `subscriptions.${number}.billingStatus.latestPaymentData.paymentStatus`\n | `subscriptions.${number}.policies.customerCanCancel`\n | `subscriptions.${number}.policies.businessCanExtend`\n | `subscriptions.${number}.policies.allowEndOfCycleCancellation`\n | `subscriptions.${number}.pauseInfo.pausePolicy`\n | `subscriptions.${number}.pauseInfo.pauseAt`\n | `subscriptions.${number}.pauseInfo.resumeAt`\n | `subscriptions.${number}.pauseInfo.type`\n | `subscriptions.${number}.cancellationInfo.initiator`\n | `subscriptions.${number}.pendingUpdateData.numberOfRequests`,\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 filter: options?.filter,\n paging: options?.paging,\n cursor: options?.cursor,\n sorting: options?.sorting,\n });\n\n const reqOpts =\n ambassadorWixBillingV1Subscription.searchSubscriptions(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'subscriptions.billingSettings.billingAddress.address' },\n { path: 'subscriptions.shippingAddress.address' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n filter: '$[0].filter',\n paging: '$[0].paging',\n cursor: '$[0].cursor',\n sorting: '$[0].sorting',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface SearchSubscriptionsOptions\n extends SearchSubscriptionsOptionsPagingMethodOneOf {\n /** A filter object */\n filter?: any;\n /** Limit number of results and enable to skip rows. The default limit is 25. */\n paging?: Paging;\n /** A Cursor option for efficient paging. Pass this field from the previous search response to continue to the next page. */\n cursor?: CursorPaging;\n /** A Sorting option by field name and order. */\n sorting?: SortingClauses;\n}\n\n/** @oneof */\nexport interface SearchSubscriptionsOptionsPagingMethodOneOf {\n /** Limit number of results and enable to skip rows. The default limit is 25. */\n paging?: Paging;\n /** A Cursor option for efficient paging. Pass this field from the previous search response to continue to the next page. */\n cursor?: CursorPaging;\n}\n\n/**\n * Counts subscriptions given the provided filters. Returns the total number\n * of subscriptions matching the filters and a count per status.\n *\n *\n * You can either pass a list of statuses or a `statusGroup`, which is a\n * pre-defined combination of statuses.\n *\n * If you don't provide any filters, all subscription statuses with the\n * exception of `\"DRAFT\"` are counted.\n *\n * You may also specify a `customerId` as filter. Then, only subscriptions for\n * this customer are counted. When providing a `customerId`, you must also\n * specify a `paymentMethodId`.\n * @public\n * @documentationMaturity preview\n * @permissionId subscriptions.view\n * @applicableIdentity APP\n * @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.CountSubscriptions\n */\nexport async function countSubscriptions(\n options?: CountSubscriptionsOptions\n): Promise<\n NonNullablePaths<\n CountSubscriptionsResponse,\n | `countByStatus`\n | `countByStatus.${number}.status`\n | `countByStatus.${number}.count`\n | `total`,\n 4\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 filter: options?.filter,\n });\n\n const reqOpts =\n ambassadorWixBillingV1Subscription.countSubscriptions(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: { filter: '$[0].filter' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CountSubscriptionsOptions {\n /** Filters to specify which subscriptions are counted. */\n filter?: CountSubscriptionFilter;\n}\n\n/**\n * Turn on auto-renew subscription in case auto-renew was turned off. The operation changes back cycle_auto_renew\n * to true, which will ensure subscription billing will continue. Also cancellation info holding information about\n * auto renew off will be cleared.\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @requiredField actionContext\n * @permissionId subscriptions.manage\n * @applicableIdentity APP\n * @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.TurnOnSubscriptionAutoRenewal\n */\nexport async function turnOnSubscriptionAutoRenewal(\n _id: string,\n actionContext: ActionContext\n): Promise<\n NonNullablePaths<\n TurnOnSubscriptionAutoRenewalResponse,\n | `subscription.name`\n | `subscription.customer.visitorId`\n | `subscription.customer.contactId`\n | `subscription.customer.memberId`\n | `subscription.customer.accountId`\n | `subscription.status`\n | `subscription.billingSettings.currency`\n | `subscription.billingSettings.paymentMethod._id`\n | `subscription.billingSettings.collectionMethod`\n | `subscription.billingSettings.cycleDuration.unit`\n | `subscription.billingSettings.cycleAutoRenew`\n | `subscription.billingSettings.billingAddress.address.streetAddress.number`\n | `subscription.billingSettings.billingAddress.address.streetAddress.name`\n | `subscription.billingSettings.taxSettings.inclusive`\n | `subscription.billingSettings.additionalFees`\n | `subscription.billingSettings.additionalFees.${number}.name`\n | `subscription.billingSettings.additionalFees.${number}.amount`\n | `subscription.billingSettings.additionalFees.${number}.trigger`\n | `subscription.billingSettings.additionalFees.${number}.tax.amount`\n | `subscription.billingSettings.additionalFees.${number}.tax.percentage`\n | `subscription.billingSettings.additionalFees.${number}.tax.dynamic.taxableAddressType`\n | `subscription.billingSettings.additionalFees.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.additionalFees.${number}.origin.appId`\n | `subscription.billingSettings.additionalFees.${number}.origin.entityId`\n | `subscription.billingSettings.shippingCharges.amount`\n | `subscription.billingSettings.shippingCharges.discounts`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.amount`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.percentage`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.appId`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.entityId`\n | `subscription.billingSettings.discounts`\n | `subscription.billingSettings.externalCollectionDetails.collectorName`\n | `subscription.billingStatus.currentCycle`\n | `subscription.billingStatus.latestPaymentData.invoiceId`\n | `subscription.billingStatus.latestPaymentData.paymentStatus`\n | `subscription.billingStatus.latestPaymentData.totals.totalPrice`\n | `subscription.billingStatus.latestPaymentData.totals.subtotal`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxType`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxRate`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.jurisdictionType`\n | `subscription.billingStatus.gracePeriodData.automaticRetryData.enabled`\n | `subscription.policies.customerCanCancel`\n | `subscription.policies.businessCanExtend`\n | `subscription.policies.allowEndOfCycleCancellation`\n | `subscription.pauseInfo.pausePolicy`\n | `subscription.pauseInfo.pauseAt`\n | `subscription.pauseInfo.resumeAt`\n | `subscription.pauseInfo.type`\n | `subscription.cancellationInfo.initiator`\n | `subscription.pendingUpdateData.itemsToUpdate`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}._id`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}.pricingModel.fixedPrice.itemPrice`\n | `subscription.pendingUpdateData.itemsToAdd`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.name`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.catalogReference.catalogItemId`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.category`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.quantity`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.applicationFee.amount`\n | `subscription.pendingUpdateData.itemsToDelete`\n | `subscription.pendingUpdateData.numberOfRequests`\n | `subscription.items`,\n 8\n > & {\n __applicationErrorsType?: TurnOnSubscriptionAutoRenewalApplicationErrors;\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 actionContext: actionContext,\n });\n\n const reqOpts =\n ambassadorWixBillingV1Subscription.turnOnSubscriptionAutoRenewal(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'subscription.billingSettings.billingAddress.address' },\n { path: 'subscription.shippingAddress.address' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { id: '$[0]', actionContext: '$[1]' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'actionContext']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Turn off auto-renew of subscription. At next billing date subscription will be canceled.\n * Billing settings flag cycle_auto_renew is set to false and information about this operation stored\n * in cancellation info for future usage in cancellation.\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @requiredField actionContext\n * @permissionId subscriptions.manage\n * @applicableIdentity APP\n * @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.TurnOffSubscriptionAutoRenewal\n */\nexport async function turnOffSubscriptionAutoRenewal(\n _id: string,\n actionContext: ActionContext\n): Promise<\n NonNullablePaths<\n TurnOffSubscriptionAutoRenewalResponse,\n | `subscription.name`\n | `subscription.customer.visitorId`\n | `subscription.customer.contactId`\n | `subscription.customer.memberId`\n | `subscription.customer.accountId`\n | `subscription.status`\n | `subscription.billingSettings.currency`\n | `subscription.billingSettings.paymentMethod._id`\n | `subscription.billingSettings.collectionMethod`\n | `subscription.billingSettings.cycleDuration.unit`\n | `subscription.billingSettings.cycleAutoRenew`\n | `subscription.billingSettings.billingAddress.address.streetAddress.number`\n | `subscription.billingSettings.billingAddress.address.streetAddress.name`\n | `subscription.billingSettings.taxSettings.inclusive`\n | `subscription.billingSettings.additionalFees`\n | `subscription.billingSettings.additionalFees.${number}.name`\n | `subscription.billingSettings.additionalFees.${number}.amount`\n | `subscription.billingSettings.additionalFees.${number}.trigger`\n | `subscription.billingSettings.additionalFees.${number}.tax.amount`\n | `subscription.billingSettings.additionalFees.${number}.tax.percentage`\n | `subscription.billingSettings.additionalFees.${number}.tax.dynamic.taxableAddressType`\n | `subscription.billingSettings.additionalFees.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.additionalFees.${number}.origin.appId`\n | `subscription.billingSettings.additionalFees.${number}.origin.entityId`\n | `subscription.billingSettings.shippingCharges.amount`\n | `subscription.billingSettings.shippingCharges.discounts`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.amount`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.percentage`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.appId`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.entityId`\n | `subscription.billingSettings.discounts`\n | `subscription.billingSettings.externalCollectionDetails.collectorName`\n | `subscription.billingStatus.currentCycle`\n | `subscription.billingStatus.latestPaymentData.invoiceId`\n | `subscription.billingStatus.latestPaymentData.paymentStatus`\n | `subscription.billingStatus.latestPaymentData.totals.totalPrice`\n | `subscription.billingStatus.latestPaymentData.totals.subtotal`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxType`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxRate`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.jurisdictionType`\n | `subscription.billingStatus.gracePeriodData.automaticRetryData.enabled`\n | `subscription.policies.customerCanCancel`\n | `subscription.policies.businessCanExtend`\n | `subscription.policies.allowEndOfCycleCancellation`\n | `subscription.pauseInfo.pausePolicy`\n | `subscription.pauseInfo.pauseAt`\n | `subscription.pauseInfo.resumeAt`\n | `subscription.pauseInfo.type`\n | `subscription.cancellationInfo.initiator`\n | `subscription.pendingUpdateData.itemsToUpdate`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}._id`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}.pricingModel.fixedPrice.itemPrice`\n | `subscription.pendingUpdateData.itemsToAdd`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.name`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.catalogReference.catalogItemId`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.category`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.quantity`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.applicationFee.amount`\n | `subscription.pendingUpdateData.itemsToDelete`\n | `subscription.pendingUpdateData.numberOfRequests`\n | `subscription.items`,\n 8\n > & {\n __applicationErrorsType?: TurnOffSubscriptionAutoRenewalApplicationErrors;\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 actionContext: actionContext,\n });\n\n const reqOpts =\n ambassadorWixBillingV1Subscription.turnOffSubscriptionAutoRenewal(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'subscription.billingSettings.billingAddress.address' },\n { path: 'subscription.shippingAddress.address' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { id: '$[0]', actionContext: '$[1]' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'actionContext']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Marks the last invoice as paid used for the following scenarios:\n * * Offline subscriptions.\n * * Online subscriptions during grace period. The operation will convert invoice to offline, remove grace period\n * and will send BillingCycleStarted event after invoice closing.\n * * Online one time payment subscription with total price of zero during purchase flow.\n * Activated event will be sent after invoice closing and subscription will be activated.\n * @param subscriptionId - The ID of the offline subscription to mark as paid its latest invoice\n * @public\n * @documentationMaturity preview\n * @requiredField subscriptionId\n * @permissionId subscriptions.manage\n * @applicableIdentity APP\n * @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.MarkLatestInvoiceAsPaid\n * @deprecated\n * @replacedBy com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.MarkInvoiceAsPaid\n * @targetRemovalDate 2025-09-30\n */\nexport async function markLatestInvoiceAsPaid(subscriptionId: string): Promise<\n NonNullablePaths<\n MarkLatestInvoiceAsPaidResponse,\n | `subscription.name`\n | `subscription.customer.visitorId`\n | `subscription.customer.contactId`\n | `subscription.customer.memberId`\n | `subscription.customer.accountId`\n | `subscription.status`\n | `subscription.billingSettings.currency`\n | `subscription.billingSettings.paymentMethod._id`\n | `subscription.billingSettings.collectionMethod`\n | `subscription.billingSettings.cycleDuration.unit`\n | `subscription.billingSettings.cycleAutoRenew`\n | `subscription.billingSettings.billingAddress.address.streetAddress.number`\n | `subscription.billingSettings.billingAddress.address.streetAddress.name`\n | `subscription.billingSettings.taxSettings.inclusive`\n | `subscription.billingSettings.additionalFees`\n | `subscription.billingSettings.additionalFees.${number}.name`\n | `subscription.billingSettings.additionalFees.${number}.amount`\n | `subscription.billingSettings.additionalFees.${number}.trigger`\n | `subscription.billingSettings.additionalFees.${number}.tax.amount`\n | `subscription.billingSettings.additionalFees.${number}.tax.percentage`\n | `subscription.billingSettings.additionalFees.${number}.tax.dynamic.taxableAddressType`\n | `subscription.billingSettings.additionalFees.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.additionalFees.${number}.origin.appId`\n | `subscription.billingSettings.additionalFees.${number}.origin.entityId`\n | `subscription.billingSettings.shippingCharges.amount`\n | `subscription.billingSettings.shippingCharges.discounts`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.amount`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.percentage`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.appId`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.entityId`\n | `subscription.billingSettings.discounts`\n | `subscription.billingSettings.externalCollectionDetails.collectorName`\n | `subscription.billingStatus.currentCycle`\n | `subscription.billingStatus.latestPaymentData.invoiceId`\n | `subscription.billingStatus.latestPaymentData.paymentStatus`\n | `subscription.billingStatus.latestPaymentData.totals.totalPrice`\n | `subscription.billingStatus.latestPaymentData.totals.subtotal`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxType`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxRate`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.jurisdictionType`\n | `subscription.billingStatus.gracePeriodData.automaticRetryData.enabled`\n | `subscription.policies.customerCanCancel`\n | `subscription.policies.businessCanExtend`\n | `subscription.policies.allowEndOfCycleCancellation`\n | `subscription.pauseInfo.pausePolicy`\n | `subscription.pauseInfo.pauseAt`\n | `subscription.pauseInfo.resumeAt`\n | `subscription.pauseInfo.type`\n | `subscription.cancellationInfo.initiator`\n | `subscription.pendingUpdateData.itemsToUpdate`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}._id`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}.pricingModel.fixedPrice.itemPrice`\n | `subscription.pendingUpdateData.itemsToAdd`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.name`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.catalogReference.catalogItemId`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.category`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.quantity`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.applicationFee.amount`\n | `subscription.pendingUpdateData.itemsToDelete`\n | `subscription.pendingUpdateData.numberOfRequests`\n | `subscription.items`,\n 8\n > & {\n __applicationErrorsType?: MarkLatestInvoiceAsPaidApplicationErrors;\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 subscriptionId: subscriptionId,\n });\n\n const reqOpts =\n ambassadorWixBillingV1Subscription.markLatestInvoiceAsPaid(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'subscription.billingSettings.billingAddress.address' },\n { path: 'subscription.shippingAddress.address' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { subscriptionId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['subscriptionId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Marks the invoice associated with given subscription cycle as paid for the following scenarios:\n * If `paid_cycle` is left empty, the most recent invoice will be marked as paid.\n * If the invoice contains items other than subscription items, an error will be thrown.\n *\n * Marks the invoice as paid for the following scenarios:\n * 1. Offline subscriptions.\n * 2. Online subscriptions during the grace period.\n * This operation will convert the invoice to offline, remove the grace period,\n * and send a BillingCycleStarted event after the invoice is closed.\n * 3. Online one-time payment subscriptions with a total price of zero during the purchase flow.\n * An Activated event will be sent after the invoice is closed, and the subscription will be activated.\n * 4. For external subscriptions, where the payment occurs outside of BASS, an invoice is created and marked as paid\n * @param subscriptionId - The ID of the subscription to mark as paid its invoice.\n * @internal\n * @documentationMaturity preview\n * @requiredField subscriptionId\n * @permissionId subscriptions.manage\n * @applicableIdentity APP\n * @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.MarkBillingCycleAsPaid\n */\nexport async function markBillingCycleAsPaid(\n subscriptionId: string,\n options?: MarkBillingCycleAsPaidOptions\n): Promise<\n NonNullablePaths<\n MarkBillingCycleAsPaidResponse,\n | `subscription.name`\n | `subscription.customer.visitorId`\n | `subscription.customer.contactId`\n | `subscription.customer.memberId`\n | `subscription.customer.accountId`\n | `subscription.status`\n | `subscription.billingSettings.currency`\n | `subscription.billingSettings.paymentMethod._id`\n | `subscription.billingSettings.collectionMethod`\n | `subscription.billingSettings.cycleDuration.unit`\n | `subscription.billingSettings.cycleAutoRenew`\n | `subscription.billingSettings.billingAddress.address.streetAddress.number`\n | `subscription.billingSettings.billingAddress.address.streetAddress.name`\n | `subscription.billingSettings.taxSettings.inclusive`\n | `subscription.billingSettings.additionalFees`\n | `subscription.billingSettings.additionalFees.${number}.name`\n | `subscription.billingSettings.additionalFees.${number}.amount`\n | `subscription.billingSettings.additionalFees.${number}.trigger`\n | `subscription.billingSettings.additionalFees.${number}.tax.amount`\n | `subscription.billingSettings.additionalFees.${number}.tax.percentage`\n | `subscription.billingSettings.additionalFees.${number}.tax.dynamic.taxableAddressType`\n | `subscription.billingSettings.additionalFees.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.additionalFees.${number}.origin.appId`\n | `subscription.billingSettings.additionalFees.${number}.origin.entityId`\n | `subscription.billingSettings.shippingCharges.amount`\n | `subscription.billingSettings.shippingCharges.discounts`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.amount`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.percentage`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.appId`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.entityId`\n | `subscription.billingSettings.discounts`\n | `subscription.billingSettings.externalCollectionDetails.collectorName`\n | `subscription.billingStatus.currentCycle`\n | `subscription.billingStatus.latestPaymentData.invoiceId`\n | `subscription.billingStatus.latestPaymentData.paymentStatus`\n | `subscription.billingStatus.latestPaymentData.totals.totalPrice`\n | `subscription.billingStatus.latestPaymentData.totals.subtotal`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxType`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxRate`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.jurisdictionType`\n | `subscription.billingStatus.gracePeriodData.automaticRetryData.enabled`\n | `subscription.policies.customerCanCancel`\n | `subscription.policies.businessCanExtend`\n | `subscription.policies.allowEndOfCycleCancellation`\n | `subscription.pauseInfo.pausePolicy`\n | `subscription.pauseInfo.pauseAt`\n | `subscription.pauseInfo.resumeAt`\n | `subscription.pauseInfo.type`\n | `subscription.cancellationInfo.initiator`\n | `subscription.pendingUpdateData.itemsToUpdate`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}._id`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}.pricingModel.fixedPrice.itemPrice`\n | `subscription.pendingUpdateData.itemsToAdd`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.name`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.catalogReference.catalogItemId`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.category`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.quantity`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.applicationFee.amount`\n | `subscription.pendingUpdateData.itemsToDelete`\n | `subscription.pendingUpdateData.numberOfRequests`\n | `subscription.items`,\n 8\n > & {\n __applicationErrorsType?: MarkBillingCycleAsPaidApplicationErrors;\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 subscriptionId: subscriptionId,\n paidCycle: options?.paidCycle,\n });\n\n const reqOpts =\n ambassadorWixBillingV1Subscription.markBillingCycleAsPaid(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'subscription.billingSettings.billingAddress.address' },\n { path: 'subscription.shippingAddress.address' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n subscriptionId: '$[0]',\n paidCycle: '$[1].paidCycle',\n },\n singleArgumentUnchanged: false,\n },\n ['subscriptionId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface MarkBillingCycleAsPaidOptions {\n /**\n * The subscription cycle for which the invoice is to be marked as paid.\n * If left empty, the most recent cycle will be selected.\n * @min 1\n */\n paidCycle?: number | null;\n}\n\n/**\n * Returns number of subscriptions in each state.\n * @public\n * @documentationMaturity preview\n * @permissionId subscriptions.view\n * @applicableIdentity APP\n * @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.GetSubscriptionsStats\n */\nexport async function getSubscriptionsStats(): Promise<\n NonNullablePaths<\n GetSubscriptionsStatsResponse,\n | `amountByStatuses`\n | `amountByStatuses.${number}.status`\n | `amountByStatuses.${number}.amount`\n | `total`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n const reqOpts =\n ambassadorWixBillingV1Subscription.getSubscriptionsStats(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 singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Extends subscription by moving end date with or without billing cycles addition.\n * @param _id - The ID of the subscription to be extended\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @requiredField actionContext\n * @requiredField options\n * @requiredField options.extendPolicy\n * @permissionId subscriptions.manage\n * @applicableIdentity APP\n * @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.ExtendSubscription\n */\nexport async function extendSubscription(\n _id: string,\n actionContext: ActionContext,\n options: ExtendSubscriptionOptions\n): Promise<\n NonNullablePaths<\n ExtendSubscriptionResponse,\n | `subscription.name`\n | `subscription.customer.visitorId`\n | `subscription.customer.contactId`\n | `subscription.customer.memberId`\n | `subscription.customer.accountId`\n | `subscription.status`\n | `subscription.billingSettings.currency`\n | `subscription.billingSettings.paymentMethod._id`\n | `subscription.billingSettings.collectionMethod`\n | `subscription.billingSettings.cycleDuration.unit`\n | `subscription.billingSettings.cycleAutoRenew`\n | `subscription.billingSettings.billingAddress.address.streetAddress.number`\n | `subscription.billingSettings.billingAddress.address.streetAddress.name`\n | `subscription.billingSettings.taxSettings.inclusive`\n | `subscription.billingSettings.additionalFees`\n | `subscription.billingSettings.additionalFees.${number}.name`\n | `subscription.billingSettings.additionalFees.${number}.amount`\n | `subscription.billingSettings.additionalFees.${number}.trigger`\n | `subscription.billingSettings.additionalFees.${number}.tax.amount`\n | `subscription.billingSettings.additionalFees.${number}.tax.percentage`\n | `subscription.billingSettings.additionalFees.${number}.tax.dynamic.taxableAddressType`\n | `subscription.billingSettings.additionalFees.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.additionalFees.${number}.origin.appId`\n | `subscription.billingSettings.additionalFees.${number}.origin.entityId`\n | `subscription.billingSettings.shippingCharges.amount`\n | `subscription.billingSettings.shippingCharges.discounts`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.amount`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.percentage`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.cycles.cycleFrom`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.appId`\n | `subscription.billingSettings.shippingCharges.discounts.${number}.origin.entityId`\n | `subscription.billingSettings.discounts`\n | `subscription.billingSettings.externalCollectionDetails.collectorName`\n | `subscription.billingStatus.currentCycle`\n | `subscription.billingStatus.latestPaymentData.invoiceId`\n | `subscription.billingStatus.latestPaymentData.paymentStatus`\n | `subscription.billingStatus.latestPaymentData.totals.totalPrice`\n | `subscription.billingStatus.latestPaymentData.totals.subtotal`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxType`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.taxRate`\n | `subscription.billingStatus.latestPaymentData.taxData.taxBreakdowns.${number}.jurisdictionType`\n | `subscription.billingStatus.gracePeriodData.automaticRetryData.enabled`\n | `subscription.policies.customerCanCancel`\n | `subscription.policies.businessCanExtend`\n | `subscription.policies.allowEndOfCycleCancellation`\n | `subscription.pauseInfo.pausePolicy`\n | `subscription.pauseInfo.pauseAt`\n | `subscription.pauseInfo.resumeAt`\n | `subscription.pauseInfo.type`\n | `subscription.cancellationInfo.initiator`\n | `subscription.pendingUpdateData.itemsToUpdate`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}._id`\n | `subscription.pendingUpdateData.itemsToUpdate.${number}.pricingModel.fixedPrice.itemPrice`\n | `subscription.pendingUpdateData.itemsToAdd`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.name`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.catalogReference.catalogItemId`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.category`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.quantity`\n | `subscription.pendingUpdateData.itemsToAdd.${number}.applicationFee.amount`\n | `subscription.pendingUpdateData.itemsToDelete`\n | `subscription.pendingUpdateData.numberOfRequests`\n | `subscription.items`,\n 8\n > & {\n __applicationErrorsType?: ExtendSubscriptionApplicationErrors;\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 id: _id,\n actionContext: actionContext,\n extensionPeriod: options?.extensionPeriod,\n extensionBillingCycles: options?.extensionBillingCycles,\n });\n\n const reqOpts =\n ambassadorWixBillingV1Subscription.extendSubscription(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'subscription.billingSettings.billingAddress.address' },\n { path: 'subscription.shippingAddress.address' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n id: '$[0]',\n actionContext: '$[1]',\n extensionPeriod: '$[2].extensionPeriod',\n extensionBillingCycles: '$[2].extensionBillingCycles',\n },\n singleArgumentUnchanged: false,\n },\n ['_id', 'actionContext', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ExtendSubscriptionOptions\n extends ExtendSubscriptionOptionsExtendPolicyOneOf {\n /** User won't be charged for additional period added on top of subscription end date. */\n extensionPeriod?: Duration;\n /**\n * user will be charged for billing cycles added\n * @min 1\n */\n extensionBillingCycles?: number;\n}\n\n/** @oneof */\nexport interface ExtendSubscriptionOptionsExtendPolicyOneOf {\n /** User won't be charged for additional period added on top of subscription end date. */\n extensionPeriod?: Duration;\n /**\n * user will be charged for billing cycles added\n * @min 1\n */\n extensionBillingCycles?: number;\n}\n\n/** @public\n * @documentationMaturity preview\n * @requiredField _id\n * @permissionId subscriptions.manage\n * @applicableIdentity APP\n * @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.AllowedActions\n */\nexport async function allowedActions(\n _id: string,\n options?: AllowedActionsOptions\n): Promise<\n NonNullablePaths<\n AllowedActionsResponse,\n | `actions`\n | `actions.${number}.actionType`\n | `unsupportedActions`\n | `unsupportedActions.${number}.actionType`,\n 4\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 fields: options?.fields,\n });\n\n const reqOpts = ambassadorWixBillingV1Subscription.allowedActions(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]', fields: '$[1].fields' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface AllowedActionsOptions {\n /**\n * List of additional fields to be included in the response.\n * @maxSize 1\n */\n fields?: RequestedFieldsWithLiterals[];\n}\n\n/**\n * List future subscriptions charges\n * @param subscriptionId - Subscription id charges to be previewed for\n * @public\n * @documentationMaturity preview\n * @requiredField subscriptionId\n * @permissionId subscriptions.view\n * @applicableIdentity APP\n * @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.ListUpcomingCharges\n */\nexport async function listUpcomingCharges(\n subscriptionId: string,\n options?: ListUpcomingChargesOptions\n): Promise<\n NonNullablePaths<\n ListUpcomingChargesResponse,\n | `upcomingCharges`\n | `upcomingCharges.${number}.cycle`\n | `upcomingCharges.${number}.totals.totalPrice`\n | `upcomingCharges.${number}.totals.subtotal`\n | `upcomingCharges.${number}.discount.amount`\n | `upcomingCharges.${number}.discount.percentage`\n | `upcomingCharges.${number}.discount.origin.appId`\n | `upcomingCharges.${number}.discount.origin.entityId`,\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 subscriptionId: subscriptionId,\n customDuration: options?.customDuration,\n nextBillingDate: options?.nextBillingDate,\n });\n\n const reqOpts =\n ambassadorWixBillingV1Subscription.listUpcomingCharges(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 subscriptionId: '$[0]',\n customDuration: '$[1].customDuration',\n nextBillingDate: '$[1].nextBillingDate',\n },\n singleArgumentUnchanged: false,\n },\n ['subscriptionId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListUpcomingChargesOptions {\n /** Period of time to provide charged for. If not provided,then only next charge will be returned. */\n customDuration?: Duration;\n /**\n * Date of the next billing cycle so that the upcoming charges will be calculated accordingly.\n * If not provided, the upcoming charges will be calculated according to the existing next billing date.\n */\n nextBillingDate?: Date | null;\n}\n\n/**\n * Retrieves the preview of subscription charges.\n * Returns all the charges applicable to a subscription based on the provided subscription information.\n * @public\n * @documentationMaturity preview\n * @requiredField options.subscription.subscriptionInfo\n * @requiredField options.subscription.subscriptionInfo.billingSettings\n * @requiredField options.subscription.subscriptionInfo.items\n * @requiredField options.subscription.subscriptionInfo.items.pricingModel\n * @permissionId subscriptions.view\n * @applicableIdentity APP\n * @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.PreviewSubscriptionCharges\n * @deprecated\n * @replacedBy com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.PreviewSubscriptionsCharges\n * @targetRemovalDate 2025-06-30\n */\nexport async function previewSubscriptionCharges(\n options?: PreviewSubscriptionChargesOptions\n): Promise<\n NonNullablePaths<\n PreviewSubscriptionChargesResponse,\n | `charges`\n | `charges.${number}.cycleFrom`\n | `charges.${number}.totals.totalPrice`\n | `charges.${number}.totals.subtotal`,\n 5\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = transformPaths(\n renameKeysFromSDKRequestToRESTRequest({\n subscriptionInfo: options?.subscriptionInfo,\n }),\n [\n {\n transformFn: transformSDKAddressToRESTAddress,\n paths: [\n { path: 'subscriptionInfo.billingSettings.billingAddress.address' },\n ],\n },\n ]\n );\n\n const reqOpts =\n ambassadorWixBillingV1Subscription.previewSubscriptionCharges(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: { subscriptionInfo: '$[0].subscriptionInfo' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface PreviewSubscriptionChargesOptions\n extends PreviewSubscriptionChargesOptionsSubscriptionOneOf {\n /** Information about a non-existing subscription. */\n subscriptionInfo?: SubscriptionInfo;\n}\n\n/** @oneof */\nexport interface PreviewSubscriptionChargesOptionsSubscriptionOneOf {\n /** Information about a non-existing subscription. */\n subscriptionInfo?: SubscriptionInfo;\n}\n\n/**\n * Retrieves the preview of subscription charges for a bulk of subscriptions.\n * Returns all the charges applicable to all subscriptions, based on the provided subscriptions information.\n * @public\n * @documentationMaturity preview\n * @requiredField options.subscriptionsBillingDetails.billingSettings\n * @requiredField options.subscriptionsBillingDetails.externalId\n * @requiredField options.subscriptionsBillingDetails.items\n * @requiredField options.subscriptionsBillingDetails.items.pricingModel\n * @permissionId subscriptions.view\n * @applicableIdentity APP\n * @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.PreviewSubscriptionsCharges\n */\nexport async function previewSubscriptionsCharges(\n options?: NonNullablePaths<\n PreviewSubscriptionsChargesOptions,\n | `subscriptionsBillingDetails.${number}.billingSettings`\n | `subscriptionsBillingDetails.${number}.externalId`\n | `subscriptionsBillingDetails.${number}.items`\n | `subscriptionsBillingDetails.${number}.items.${number}.pricingModel`,\n 6\n >\n): Promise<\n NonNullablePaths<\n PreviewSubscriptionsChargesResponse,\n `subscriptionsCharges`,\n 2\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = transformPaths(\n renameKeysFromSDKRequestToRESTRequest({\n subscriptionsBillingDetails: options?.subscriptionsBillingDetails,\n numberOfNextRecurringCharges: options?.numberOfNextRecurringCharges,\n }),\n [\n {\n transformFn: transformSDKAddressToRESTAddress,\n paths: [\n {\n path: 'subscriptionsBillingDetails.billingSettings.billingAddress.address',\n },\n { path: 'subscriptionsBillingDetails.shippingAddress.address' },\n ],\n },\n ]\n );\n\n const reqOpts =\n ambassadorWixBillingV1Subscription.previewSubscriptionsCharges(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 subscriptionsBillingDetails: '$[0].subscriptionsBillingDetails',\n numberOfNextRecurringCharges: '$[0].numberOfNextRecurringCharges',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface PreviewSubscriptionsChargesOptions {\n /**\n * Information required to calculate the preview charges for the subscriptions, including an identifier.\n * @minSize 1\n * @maxSize 10\n */\n subscriptionsBillingDetails?: SubscriptionBillingDetails[];\n /**\n * Specifies the number of upcoming billing charges to preview for all subscriptions in the order.\n * For instance, if a subscription costs $10 for the first 3 cycles, $12 for cycles 4 through 7,\n * $15 for cycles 8 through 10, and $20 for cycle 11 onwards:\n * - Sending \"1\" will calculate and return charges for cycles 4 through 7 since it's the first charge in the future.\n * - Sending \"2\" will provide a response with charges for cycles 4 through 7 and cycles 8 through 10.\n * - Sending \"3\" or more will include totals for cycles 4 through 7, cycles 8 through 10, and from cycle 11 onwards.\n * If no value is provided, the response will include charges for all upcoming cycles, including the existing one,\n * in this case, charges for cycle 1 through 3.\n * If there is a single charge for a subscription, meaning that subscription price remains consistent across all cycles,\n * then even if future_charges_count is set, it will be ignored and the only charge this subscription has will be returned.\n * @min 1\n * @max 10\n */\n numberOfNextRecurringCharges?: number | null;\n}\n\n/**\n * Creates authorization invoice with Moto settings in order to create\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @permissionId subscriptions.manage\n * @applicableIdentity APP\n * @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.InitiatePaymentMethodSetup\n */\nexport async function initiatePaymentMethodSetup(\n _id: string,\n options?: InitiatePaymentMethodSetupOptions\n): Promise<\n NonNullablePaths<InitiatePaymentMethodSetupResponse, `paymentOrderId`, 2>\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 paymentMode: options?.paymentMode,\n paymentSettings: options?.paymentSettings,\n });\n\n const reqOpts =\n ambassadorWixBillingV1Subscription.initiatePaymentMethodSetup(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 id: '$[0]',\n paymentMode: '$[1].paymentMode',\n paymentSettings: '$[1].paymentSettings',\n },\n singleArgumentUnchanged: false,\n },\n ['_id', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface InitiatePaymentMethodSetupOptions {\n paymentMode?: PaymentModeWithLiterals;\n paymentSettings?: PaymentSettings;\n}\n\n/** @public\n * @documentationMaturity preview\n * @requiredField subscriptionId\n * @permissionId subscriptions.view\n * @applicableIdentity APP\n * @fqn com.wixpress.billing.subscriptions.api.v1.SubscriptionHistoryService.ListSubscriptionHistory\n */\nexport async function listSubscriptionHistory(\n subscriptionId: string,\n options?: ListSubscriptionHistoryOptions\n): Promise<\n NonNullablePaths<\n ListSubscriptionHistoryResponse,\n | `historyEntries`\n | `historyEntries.${number}.entryId`\n | `historyEntries.${number}.slug`\n | `historyEntries.${number}.event.deleted.subscriptionId`\n | `historyEntries.${number}.event.paused.pausePolicy`\n | `historyEntries.${number}.event.pauseRequested.pauseAt`\n | `historyEntries.${number}.event.pauseRequested.pausePolicy`\n | `historyEntries.${number}.event.resumeRequested.resumeAt`\n | `historyEntries.${number}.event.extended.extensionBillingCycles`\n | `historyEntries.${number}.event.updatesApplied.updateAction`\n | `historyEntries.${number}.event.gracePeriodEnded.paymentSettlementMethod`\n | `historyEntries.${number}.event.paymentMethodUpdated.initiator`\n | `historyEntries.${number}.event.paymentMethodUpdated.paymentMode`\n | `historyEntries.${number}.event.collectionMethodUpdated.newCollectionMethod`\n | `historyEntries.${number}.event.collectionMethodUpdated.previousCollectionMethod`\n | `historyEntries.${number}.event.billingCyclePaid.paidCycle`\n | `historyEntries.${number}.event.billingCyclePaid.invoiceId`\n | `historyEntries.${number}.event.subscriptionBoAction.name`\n | `historyEntries.${number}.event.subscriptionBoAction.params`,\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 subscriptionId: subscriptionId,\n mode: options?.mode,\n cursor: options?.cursor,\n });\n\n const reqOpts =\n ambassadorWixBillingV1Subscription.listSubscriptionHistory(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n {\n path: 'historyEntries.event.created.subscription.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.created.subscription.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.updated.current.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.updated.current.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.updated.previous.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.updated.previous.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.activated.subscription.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.activated.subscription.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.ended.subscription.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.ended.subscription.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.canceled.subscription.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.canceled.subscription.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.paused.subscription.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.paused.subscription.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.resumed.subscription.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.resumed.subscription.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.pauseRequested.subscription.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.pauseRequested.subscription.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.resumeRequested.subscription.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.resumeRequested.subscription.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.scheduledPauseCanceled.subscription.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.scheduledPauseCanceled.subscription.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.scheduledResumeCanceled.subscription.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.scheduledResumeCanceled.subscription.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.billingCycleStarted.subscription.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.billingCycleStarted.subscription.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOn.subscription.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOn.subscription.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOff.subscription.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOff.subscription.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.cycleReadyToPay.subscription.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.cycleReadyToPay.subscription.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.extended.subscription.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.extended.subscription.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.initialPurchaseCompleted.subscription.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.initialPurchaseCompleted.subscription.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.latestInvoiceMarkedAsPaid.subscription.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.latestInvoiceMarkedAsPaid.subscription.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.revived.subscription.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.revived.subscription.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.billingDateUpdated.subscription.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.billingDateUpdated.subscription.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.futureUpdatesRequested.subscription.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.futureUpdatesRequested.subscription.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.updatesApplied.subscription.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.updatesApplied.subscription.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.resetPendingUpdates.subscription.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.resetPendingUpdates.subscription.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.gracePeriodStarted.subscription.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.gracePeriodStarted.subscription.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.gracePeriodEnded.subscription.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.gracePeriodEnded.subscription.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.paymentMethodUpdated.subscription.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.paymentMethodUpdated.subscription.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.collectionMethodUpdated.subscription.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.collectionMethodUpdated.subscription.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.freeTrailStarted.subscription.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.freeTrailStarted.subscription.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.freeTrailEnded.subscription.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.freeTrailEnded.subscription.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.billingCyclePaid.subscription.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.billingCyclePaid.subscription.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.initiatePaymentMethodSetup.subscription.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.initiatePaymentMethodSetup.subscription.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.futurePriceUpdatesRequested.subscription.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.futurePriceUpdatesRequested.subscription.shippingAddress.address',\n },\n {\n path: 'historyEntries.event.subscriptionBoAction.subscription.billingSettings.billingAddress.address',\n },\n {\n path: 'historyEntries.event.subscriptionBoAction.subscription.shippingAddress.address',\n },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n subscriptionId: '$[0]',\n mode: '$[1].mode',\n cursor: '$[1].cursor',\n },\n singleArgumentUnchanged: false,\n },\n ['subscriptionId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListSubscriptionHistoryOptions {\n /** Determines the type of view for the history: either a comprehensive backoffice view or a user-centric view. */\n mode?: HistoryViewModeWithLiterals;\n /** Cursor for efficient paging. If paging through results, pass this field from the previous search response to continue to the next page. */\n cursor?: CursorPaging;\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 resolveComWixpressBillingSubscriptionsApiV1SubscriptionHistoryServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www._base_domain_': [\n {\n srcPath: '/_api/billing-subscriptions',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/billing-subscriptions',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/billing-subscriptions',\n destPath: '',\n },\n ],\n '*.pub.wix-code.com': [\n {\n srcPath: '/_api/billing-subscriptions',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/billing-subscriptions',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nfunction resolveComWixpressBillingSubscriptionsApiV1SubscriptionsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www._base_domain_': [\n {\n srcPath: '/_api/billing-subscriptions',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/billing-subscriptions',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/billing-subscriptions',\n destPath: '',\n },\n ],\n '*.pub.wix-code.com': [\n {\n srcPath: '/_api/billing-subscriptions',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/billing-subscriptions',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nfunction resolveComWixpressBillingSubscriptionsApiV1SubscriptionsBackOfficeServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www._base_domain_': [\n {\n srcPath: '/_api/billing-subscriptions',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/billing-subscriptions',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/billing-subscriptions',\n destPath: '',\n },\n ],\n '*.pub.wix-code.com': [\n {\n srcPath: '/_api/billing-subscriptions',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/billing-subscriptions',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nfunction resolveComWixpressBillingSubscriptionsApiV1CustomerSubscriptionsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www._base_domain_': [\n {\n srcPath: '/_api/billing-subscriptions',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/billing-subscriptions',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/billing-subscriptions',\n destPath: '',\n },\n ],\n '*.pub.wix-code.com': [\n {\n srcPath: '/_api/billing-subscriptions',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/billing-subscriptions',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_subscription_subscriptions';\n\n/** Identity must be a site member and customer subscription belongs to */\nexport function customerGetSubscription(\n payload: object\n): RequestOptionsFactory<any> {\n function __customerGetSubscription({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.billing.v1.subscription',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.GetSubscription',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingSubscriptionsApiV1CustomerSubscriptionsServiceUrl(\n { protoPath: '/v1/customer_subscriptions/{id}', data: payload, host }\n ),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'subscription.createdDate' },\n { path: 'subscription.updatedDate' },\n { path: 'subscription.startDate' },\n { path: 'subscription.endDate' },\n { path: 'subscription.billingStatus.nextBillingDate' },\n { path: 'subscription.billingStatus.previousBillingDate' },\n {\n path: 'subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n { path: 'subscription.billingStatus.freeTrialData.startDate' },\n { path: 'subscription.billingStatus.freeTrialData.endDate' },\n {\n path: 'subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n { path: 'subscription.billingStatus.gracePeriodData.startDate' },\n { path: 'subscription.billingStatus.gracePeriodData.endDate' },\n { path: 'subscription.pauseInfo.startDate' },\n { path: 'subscription.pauseInfo.resumeDate' },\n { path: 'subscription.cancellationInfo.cancellationDate' },\n {\n path: 'subscription.specificDatePendingUpdateData.executionDate',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __customerGetSubscription;\n}\n\n/** Identity must be a site member and customer subscription belongs to */\nexport function customerCancelSubscription(\n payload: object\n): RequestOptionsFactory<any> {\n function __customerCancelSubscription({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.billing.v1.subscription',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.CancelSubscription',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingSubscriptionsApiV1CustomerSubscriptionsServiceUrl(\n {\n protoPath: '/v1/customer_subscriptions/{id}/cancel',\n data: payload,\n host,\n }\n ),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'subscription.createdDate' },\n { path: 'subscription.updatedDate' },\n { path: 'subscription.startDate' },\n { path: 'subscription.endDate' },\n { path: 'subscription.billingStatus.nextBillingDate' },\n { path: 'subscription.billingStatus.previousBillingDate' },\n {\n path: 'subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n { path: 'subscription.billingStatus.freeTrialData.startDate' },\n { path: 'subscription.billingStatus.freeTrialData.endDate' },\n {\n path: 'subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n { path: 'subscription.billingStatus.gracePeriodData.startDate' },\n { path: 'subscription.billingStatus.gracePeriodData.endDate' },\n { path: 'subscription.pauseInfo.startDate' },\n { path: 'subscription.pauseInfo.resumeDate' },\n { path: 'subscription.cancellationInfo.cancellationDate' },\n {\n path: 'subscription.specificDatePendingUpdateData.executionDate',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __customerCancelSubscription;\n}\n\n/** Identity must be a site member and customer subscription belongs to */\nexport function customerTurnOnSubscriptionAutoRenewal(\n payload: object\n): RequestOptionsFactory<any> {\n function __customerTurnOnSubscriptionAutoRenewal({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.billing.v1.subscription',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.TurnOnSubscriptionAutoRenewal',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingSubscriptionsApiV1CustomerSubscriptionsServiceUrl(\n {\n protoPath: '/v1/customer_subscriptions/{id}/turn_on_auto_renewal',\n data: payload,\n host,\n }\n ),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'subscription.createdDate' },\n { path: 'subscription.updatedDate' },\n { path: 'subscription.startDate' },\n { path: 'subscription.endDate' },\n { path: 'subscription.billingStatus.nextBillingDate' },\n { path: 'subscription.billingStatus.previousBillingDate' },\n {\n path: 'subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n { path: 'subscription.billingStatus.freeTrialData.startDate' },\n { path: 'subscription.billingStatus.freeTrialData.endDate' },\n {\n path: 'subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n { path: 'subscription.billingStatus.gracePeriodData.startDate' },\n { path: 'subscription.billingStatus.gracePeriodData.endDate' },\n { path: 'subscription.pauseInfo.startDate' },\n { path: 'subscription.pauseInfo.resumeDate' },\n { path: 'subscription.cancellationInfo.cancellationDate' },\n {\n path: 'subscription.specificDatePendingUpdateData.executionDate',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __customerTurnOnSubscriptionAutoRenewal;\n}\n\n/** Identity must be a site member and customer subscription belongs to */\nexport function customerTurnOffSubscriptionAutoRenewal(\n payload: object\n): RequestOptionsFactory<any> {\n function __customerTurnOffSubscriptionAutoRenewal({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.billing.v1.subscription',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.TurnOffSubscriptionAutoRenewal',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingSubscriptionsApiV1CustomerSubscriptionsServiceUrl(\n {\n protoPath: '/v1/customer_subscriptions/{id}/turn_off_auto_renewal',\n data: payload,\n host,\n }\n ),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'subscription.createdDate' },\n { path: 'subscription.updatedDate' },\n { path: 'subscription.startDate' },\n { path: 'subscription.endDate' },\n { path: 'subscription.billingStatus.nextBillingDate' },\n { path: 'subscription.billingStatus.previousBillingDate' },\n {\n path: 'subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n { path: 'subscription.billingStatus.freeTrialData.startDate' },\n { path: 'subscription.billingStatus.freeTrialData.endDate' },\n {\n path: 'subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n { path: 'subscription.billingStatus.gracePeriodData.startDate' },\n { path: 'subscription.billingStatus.gracePeriodData.endDate' },\n { path: 'subscription.pauseInfo.startDate' },\n { path: 'subscription.pauseInfo.resumeDate' },\n { path: 'subscription.cancellationInfo.cancellationDate' },\n {\n path: 'subscription.specificDatePendingUpdateData.executionDate',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __customerTurnOffSubscriptionAutoRenewal;\n}\n\nexport function customerExtendSubscription(\n payload: object\n): RequestOptionsFactory<any> {\n function __customerExtendSubscription({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.billing.v1.subscription',\n method: 'PATCH' as any,\n methodFqn:\n 'com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.ExtendSubscription',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingSubscriptionsApiV1CustomerSubscriptionsServiceUrl(\n {\n protoPath: '/v1/customer_subscriptions/{id}/extend',\n data: payload,\n host,\n }\n ),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'subscription.createdDate' },\n { path: 'subscription.updatedDate' },\n { path: 'subscription.startDate' },\n { path: 'subscription.endDate' },\n { path: 'subscription.billingStatus.nextBillingDate' },\n { path: 'subscription.billingStatus.previousBillingDate' },\n {\n path: 'subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n { path: 'subscription.billingStatus.freeTrialData.startDate' },\n { path: 'subscription.billingStatus.freeTrialData.endDate' },\n {\n path: 'subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n { path: 'subscription.billingStatus.gracePeriodData.startDate' },\n { path: 'subscription.billingStatus.gracePeriodData.endDate' },\n { path: 'subscription.pauseInfo.startDate' },\n { path: 'subscription.pauseInfo.resumeDate' },\n { path: 'subscription.cancellationInfo.cancellationDate' },\n {\n path: 'subscription.specificDatePendingUpdateData.executionDate',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __customerExtendSubscription;\n}\n\n/** identity must be a site member */\nexport function customerQuerySubscriptions(\n payload: object\n): RequestOptionsFactory<any> {\n function __customerQuerySubscriptions({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.billing.v1.subscription',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.QuerySubscriptions',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingSubscriptionsApiV1CustomerSubscriptionsServiceUrl(\n { protoPath: '/v1/customer_subscriptions/query', data: payload, host }\n ),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'subscriptions.createdDate' },\n { path: 'subscriptions.updatedDate' },\n { path: 'subscriptions.startDate' },\n { path: 'subscriptions.endDate' },\n { path: 'subscriptions.billingStatus.nextBillingDate' },\n { path: 'subscriptions.billingStatus.previousBillingDate' },\n {\n path: 'subscriptions.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n { path: 'subscriptions.billingStatus.freeTrialData.startDate' },\n { path: 'subscriptions.billingStatus.freeTrialData.endDate' },\n {\n path: 'subscriptions.billingStatus.updateBillingDateData.paidUntil',\n },\n { path: 'subscriptions.billingStatus.gracePeriodData.startDate' },\n { path: 'subscriptions.billingStatus.gracePeriodData.endDate' },\n { path: 'subscriptions.pauseInfo.startDate' },\n { path: 'subscriptions.pauseInfo.resumeDate' },\n { path: 'subscriptions.cancellationInfo.cancellationDate' },\n {\n path: 'subscriptions.specificDatePendingUpdateData.executionDate',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __customerQuerySubscriptions;\n}\n\n/**\n * Update subscription's payment method.\n * Supported only for recurring subscriptions or one time subscriptions during free trial.\n */\nexport function customerUpdateSubscriptionPaymentMethod(\n payload: object\n): RequestOptionsFactory<any> {\n function __customerUpdateSubscriptionPaymentMethod({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.billing.v1.subscription',\n method: 'PATCH' as any,\n methodFqn:\n 'com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.UpdateSubscriptionPaymentMethod',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingSubscriptionsApiV1CustomerSubscriptionsServiceUrl(\n {\n protoPath: '/v1/customer_subscriptions/{id}/payment_method',\n data: payload,\n host,\n }\n ),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'subscription.createdDate' },\n { path: 'subscription.updatedDate' },\n { path: 'subscription.startDate' },\n { path: 'subscription.endDate' },\n { path: 'subscription.billingStatus.nextBillingDate' },\n { path: 'subscription.billingStatus.previousBillingDate' },\n {\n path: 'subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n { path: 'subscription.billingStatus.freeTrialData.startDate' },\n { path: 'subscription.billingStatus.freeTrialData.endDate' },\n {\n path: 'subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n { path: 'subscription.billingStatus.gracePeriodData.startDate' },\n { path: 'subscription.billingStatus.gracePeriodData.endDate' },\n { path: 'subscription.pauseInfo.startDate' },\n { path: 'subscription.pauseInfo.resumeDate' },\n { path: 'subscription.cancellationInfo.cancellationDate' },\n {\n path: 'subscription.specificDatePendingUpdateData.executionDate',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __customerUpdateSubscriptionPaymentMethod;\n}\n\nexport function customerAllowedActions(\n payload: object\n): RequestOptionsFactory<any> {\n function __customerAllowedActions({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.billing.v1.subscription',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.AllowedActions',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingSubscriptionsApiV1CustomerSubscriptionsServiceUrl(\n {\n protoPath: '/v1/customer_subscriptions/{id}/allowed_actions',\n data: payload,\n host,\n }\n ),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __customerAllowedActions;\n}\n\n/** List future subscriptions charges. */\nexport function customerListUpcomingCharges(\n payload: object\n): RequestOptionsFactory<any> {\n function __customerListUpcomingCharges({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.billing.v1.subscription',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.ListUpcomingCharges',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingSubscriptionsApiV1CustomerSubscriptionsServiceUrl(\n {\n protoPath: '/v1/customer_subscriptions/{id}/upcoming_charges',\n data: payload,\n host,\n }\n ),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'upcomingCharge.billingDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __customerListUpcomingCharges;\n}\n\n/** Creates auto-charge order that can be paid by customer */\nexport function customerInitiatePaymentMethodSetup(\n payload: object\n): RequestOptionsFactory<any> {\n function __customerInitiatePaymentMethodSetup({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.billing.v1.subscription',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.InitiatePaymentMethodSetup',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingSubscriptionsApiV1CustomerSubscriptionsServiceUrl(\n {\n protoPath: '/v1/customer_subscriptions/{id}/payment_method_setup',\n data: payload,\n host,\n }\n ),\n data: payload,\n };\n\n return metadata;\n }\n\n return __customerInitiatePaymentMethodSetup;\n}\n\n/** This used only for automation and permitted tenants (QA & testing) */\nexport function payCycle(payload: object): RequestOptionsFactory<any> {\n function __payCycle({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.billing.v1.subscription',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.billing.subscriptions.api.v1.SubscriptionsBackOfficeService.PayCycle',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingSubscriptionsApiV1SubscriptionsBackOfficeServiceUrl(\n {\n protoPath: '/v1/subscriptions-bo/{subscriptionId}/pay-cycle',\n data: payload,\n host,\n }\n ),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'subscription.createdDate' },\n { path: 'subscription.updatedDate' },\n { path: 'subscription.startDate' },\n { path: 'subscription.endDate' },\n { path: 'subscription.billingStatus.nextBillingDate' },\n { path: 'subscription.billingStatus.previousBillingDate' },\n {\n path: 'subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n { path: 'subscription.billingStatus.freeTrialData.startDate' },\n { path: 'subscription.billingStatus.freeTrialData.endDate' },\n {\n path: 'subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n { path: 'subscription.billingStatus.gracePeriodData.startDate' },\n { path: 'subscription.billingStatus.gracePeriodData.endDate' },\n { path: 'subscription.pauseInfo.startDate' },\n { path: 'subscription.pauseInfo.resumeDate' },\n { path: 'subscription.cancellationInfo.cancellationDate' },\n {\n path: 'subscription.specificDatePendingUpdateData.executionDate',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __payCycle;\n}\n\n/** Returns a single subscription by its id */\nexport function getSubscription(payload: object): RequestOptionsFactory<any> {\n function __getSubscription({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.billing.v1.subscription',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.GetSubscription',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingSubscriptionsApiV1SubscriptionsServiceUrl({\n protoPath: '/v1/subscriptions/{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: 'subscription.createdDate' },\n { path: 'subscription.updatedDate' },\n { path: 'subscription.startDate' },\n { path: 'subscription.endDate' },\n { path: 'subscription.billingStatus.nextBillingDate' },\n { path: 'subscription.billingStatus.previousBillingDate' },\n {\n path: 'subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n { path: 'subscription.billingStatus.freeTrialData.startDate' },\n { path: 'subscription.billingStatus.freeTrialData.endDate' },\n {\n path: 'subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n { path: 'subscription.billingStatus.gracePeriodData.startDate' },\n { path: 'subscription.billingStatus.gracePeriodData.endDate' },\n { path: 'subscription.pauseInfo.startDate' },\n { path: 'subscription.pauseInfo.resumeDate' },\n { path: 'subscription.cancellationInfo.cancellationDate' },\n {\n path: 'subscription.specificDatePendingUpdateData.executionDate',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getSubscription;\n}\n\n/**\n * Update subscription's payment method.\n * Supported only for recurring subscriptions or one time subscriptions during free trial.\n */\nexport function updateSubscriptionPaymentMethod(\n payload: object\n): RequestOptionsFactory<any> {\n function __updateSubscriptionPaymentMethod({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.billing.v1.subscription',\n method: 'PATCH' as any,\n methodFqn:\n 'com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.UpdateSubscriptionPaymentMethod',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingSubscriptionsApiV1SubscriptionsServiceUrl({\n protoPath: '/v1/subscriptions/{id}/payment_method',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'subscription.createdDate' },\n { path: 'subscription.updatedDate' },\n { path: 'subscription.startDate' },\n { path: 'subscription.endDate' },\n { path: 'subscription.billingStatus.nextBillingDate' },\n { path: 'subscription.billingStatus.previousBillingDate' },\n {\n path: 'subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n { path: 'subscription.billingStatus.freeTrialData.startDate' },\n { path: 'subscription.billingStatus.freeTrialData.endDate' },\n {\n path: 'subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n { path: 'subscription.billingStatus.gracePeriodData.startDate' },\n { path: 'subscription.billingStatus.gracePeriodData.endDate' },\n { path: 'subscription.pauseInfo.startDate' },\n { path: 'subscription.pauseInfo.resumeDate' },\n { path: 'subscription.cancellationInfo.cancellationDate' },\n {\n path: 'subscription.specificDatePendingUpdateData.executionDate',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateSubscriptionPaymentMethod;\n}\n\n/**\n * Updates the next billing date for a subscription.\n *\n *\n * Updating the billing date may add a proration charge or credit to the next\n * invoice. The customer must pay more in case you extend the current billing\n * cycle. They pay less in case you shorten the current billing cycle. You can\n * choose whether BASS automatically calculates the proration amount based on\n * the number of days added to or removed from the current billing cycle.\n * Alternatively, you can pass a proration amount based on your own custom\n * calculation. The custom proration amount can't exceed the total of the\n * current billing cycle.\n */\nexport function updateSubscriptionBillingDate(\n payload: object\n): RequestOptionsFactory<any> {\n function __updateSubscriptionBillingDate({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'billingDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.billing.v1.subscription',\n method: 'PATCH' as any,\n methodFqn:\n 'com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.UpdateSubscriptionBillingDate',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingSubscriptionsApiV1SubscriptionsServiceUrl({\n protoPath: '/v1/subscriptions/{id}/update-billing-date',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'subscription.createdDate' },\n { path: 'subscription.updatedDate' },\n { path: 'subscription.startDate' },\n { path: 'subscription.endDate' },\n { path: 'subscription.billingStatus.nextBillingDate' },\n { path: 'subscription.billingStatus.previousBillingDate' },\n {\n path: 'subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n { path: 'subscription.billingStatus.freeTrialData.startDate' },\n { path: 'subscription.billingStatus.freeTrialData.endDate' },\n {\n path: 'subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n { path: 'subscription.billingStatus.gracePeriodData.startDate' },\n { path: 'subscription.billingStatus.gracePeriodData.endDate' },\n { path: 'subscription.pauseInfo.startDate' },\n { path: 'subscription.pauseInfo.resumeDate' },\n { path: 'subscription.cancellationInfo.cancellationDate' },\n {\n path: 'subscription.specificDatePendingUpdateData.executionDate',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateSubscriptionBillingDate;\n}\n\n/**\n * Cancels subscription immediately. Can be canceled by member if subscription policy allows it\n * Only PENDING, ACTIVE or PAUSED subscriptions can be canceled\n */\nexport function cancelSubscription(\n payload: object\n): RequestOptionsFactory<any> {\n function __cancelSubscription({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.billing.v1.subscription',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.CancelSubscription',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingSubscriptionsApiV1SubscriptionsServiceUrl({\n protoPath: '/v1/subscriptions/{id}/cancel',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'subscription.createdDate' },\n { path: 'subscription.updatedDate' },\n { path: 'subscription.startDate' },\n { path: 'subscription.endDate' },\n { path: 'subscription.billingStatus.nextBillingDate' },\n { path: 'subscription.billingStatus.previousBillingDate' },\n {\n path: 'subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n { path: 'subscription.billingStatus.freeTrialData.startDate' },\n { path: 'subscription.billingStatus.freeTrialData.endDate' },\n {\n path: 'subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n { path: 'subscription.billingStatus.gracePeriodData.startDate' },\n { path: 'subscription.billingStatus.gracePeriodData.endDate' },\n { path: 'subscription.pauseInfo.startDate' },\n { path: 'subscription.pauseInfo.resumeDate' },\n { path: 'subscription.cancellationInfo.cancellationDate' },\n {\n path: 'subscription.specificDatePendingUpdateData.executionDate',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __cancelSubscription;\n}\n\n/** Pauses subscription now or in future. Possible to pause also payments schedule. */\nexport function pauseSubscription(payload: object): RequestOptionsFactory<any> {\n function __pauseSubscription({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'pauseAtSchedule.specificDate' },\n { path: 'autoResumeAtSchedule.specificDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.billing.v1.subscription',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.PauseSubscription',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingSubscriptionsApiV1SubscriptionsServiceUrl({\n protoPath: '/v1/subscriptions/{id}/pause',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'subscription.createdDate' },\n { path: 'subscription.updatedDate' },\n { path: 'subscription.startDate' },\n { path: 'subscription.endDate' },\n { path: 'subscription.billingStatus.nextBillingDate' },\n { path: 'subscription.billingStatus.previousBillingDate' },\n {\n path: 'subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n { path: 'subscription.billingStatus.freeTrialData.startDate' },\n { path: 'subscription.billingStatus.freeTrialData.endDate' },\n {\n path: 'subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n { path: 'subscription.billingStatus.gracePeriodData.startDate' },\n { path: 'subscription.billingStatus.gracePeriodData.endDate' },\n { path: 'subscription.pauseInfo.startDate' },\n { path: 'subscription.pauseInfo.resumeDate' },\n { path: 'subscription.cancellationInfo.cancellationDate' },\n {\n path: 'subscription.specificDatePendingUpdateData.executionDate',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __pauseSubscription;\n}\n\n/** Resumes paused subscription now or in future. */\nexport function resumeSubscription(\n payload: object\n): RequestOptionsFactory<any> {\n function __resumeSubscription({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'resumeAtSchedule.specificDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.billing.v1.subscription',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.ResumeSubscription',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingSubscriptionsApiV1SubscriptionsServiceUrl({\n protoPath: '/v1/subscriptions/{id}/resume',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'subscription.createdDate' },\n { path: 'subscription.updatedDate' },\n { path: 'subscription.startDate' },\n { path: 'subscription.endDate' },\n { path: 'subscription.billingStatus.nextBillingDate' },\n { path: 'subscription.billingStatus.previousBillingDate' },\n {\n path: 'subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n { path: 'subscription.billingStatus.freeTrialData.startDate' },\n { path: 'subscription.billingStatus.freeTrialData.endDate' },\n {\n path: 'subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n { path: 'subscription.billingStatus.gracePeriodData.startDate' },\n { path: 'subscription.billingStatus.gracePeriodData.endDate' },\n { path: 'subscription.pauseInfo.startDate' },\n { path: 'subscription.pauseInfo.resumeDate' },\n { path: 'subscription.cancellationInfo.cancellationDate' },\n {\n path: 'subscription.specificDatePendingUpdateData.executionDate',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __resumeSubscription;\n}\n\n/**\n * Lists subscriptions based on specified filters.\n * By default non-draft subscriptions returned.\n */\nexport function querySubscriptions(\n payload: object\n): RequestOptionsFactory<any> {\n function __querySubscriptions({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.billing.v1.subscription',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.QuerySubscriptions',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingSubscriptionsApiV1SubscriptionsServiceUrl({\n protoPath: '/v1/subscriptions/query',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'subscriptions.createdDate' },\n { path: 'subscriptions.updatedDate' },\n { path: 'subscriptions.startDate' },\n { path: 'subscriptions.endDate' },\n { path: 'subscriptions.billingStatus.nextBillingDate' },\n { path: 'subscriptions.billingStatus.previousBillingDate' },\n {\n path: 'subscriptions.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n { path: 'subscriptions.billingStatus.freeTrialData.startDate' },\n { path: 'subscriptions.billingStatus.freeTrialData.endDate' },\n {\n path: 'subscriptions.billingStatus.updateBillingDateData.paidUntil',\n },\n { path: 'subscriptions.billingStatus.gracePeriodData.startDate' },\n { path: 'subscriptions.billingStatus.gracePeriodData.endDate' },\n { path: 'subscriptions.pauseInfo.startDate' },\n { path: 'subscriptions.pauseInfo.resumeDate' },\n { path: 'subscriptions.cancellationInfo.cancellationDate' },\n {\n path: 'subscriptions.specificDatePendingUpdateData.executionDate',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __querySubscriptions;\n}\n\nexport function searchSubscriptions(\n payload: object\n): RequestOptionsFactory<any> {\n function __searchSubscriptions({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.billing.v1.subscription',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.SearchSubscriptions',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingSubscriptionsApiV1SubscriptionsServiceUrl({\n protoPath: '/v1/subscriptions/search',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'subscriptions.createdDate' },\n { path: 'subscriptions.updatedDate' },\n { path: 'subscriptions.startDate' },\n { path: 'subscriptions.endDate' },\n { path: 'subscriptions.billingStatus.nextBillingDate' },\n { path: 'subscriptions.billingStatus.previousBillingDate' },\n {\n path: 'subscriptions.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n { path: 'subscriptions.billingStatus.freeTrialData.startDate' },\n { path: 'subscriptions.billingStatus.freeTrialData.endDate' },\n {\n path: 'subscriptions.billingStatus.updateBillingDateData.paidUntil',\n },\n { path: 'subscriptions.billingStatus.gracePeriodData.startDate' },\n { path: 'subscriptions.billingStatus.gracePeriodData.endDate' },\n { path: 'subscriptions.pauseInfo.startDate' },\n { path: 'subscriptions.pauseInfo.resumeDate' },\n { path: 'subscriptions.cancellationInfo.cancellationDate' },\n {\n path: 'subscriptions.specificDatePendingUpdateData.executionDate',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __searchSubscriptions;\n}\n\n/**\n * Counts subscriptions given the provided filters. Returns the total number\n * of subscriptions matching the filters and a count per status.\n *\n *\n * You can either pass a list of statuses or a `statusGroup`, which is a\n * pre-defined combination of statuses.\n *\n * If you don't provide any filters, all subscription statuses with the\n * exception of `\"DRAFT\"` are counted.\n *\n * You may also specify a `customerId` as filter. Then, only subscriptions for\n * this customer are counted. When providing a `customerId`, you must also\n * specify a `paymentMethodId`.\n */\nexport function countSubscriptions(\n payload: object\n): RequestOptionsFactory<any> {\n function __countSubscriptions({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.billing.v1.subscription',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.CountSubscriptions',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingSubscriptionsApiV1SubscriptionsServiceUrl({\n protoPath: '/v1/subscriptions/count',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __countSubscriptions;\n}\n\n/**\n * Turn on auto-renew subscription in case auto-renew was turned off. The operation changes back cycle_auto_renew\n * to true, which will ensure subscription billing will continue. Also cancellation info holding information about\n * auto renew off will be cleared.\n */\nexport function turnOnSubscriptionAutoRenewal(\n payload: object\n): RequestOptionsFactory<any> {\n function __turnOnSubscriptionAutoRenewal({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.billing.v1.subscription',\n method: 'PATCH' as any,\n methodFqn:\n 'com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.TurnOnSubscriptionAutoRenewal',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingSubscriptionsApiV1SubscriptionsServiceUrl({\n protoPath: '/v1/subscriptions/{id}/turn_on_auto_renewal',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'subscription.createdDate' },\n { path: 'subscription.updatedDate' },\n { path: 'subscription.startDate' },\n { path: 'subscription.endDate' },\n { path: 'subscription.billingStatus.nextBillingDate' },\n { path: 'subscription.billingStatus.previousBillingDate' },\n {\n path: 'subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n { path: 'subscription.billingStatus.freeTrialData.startDate' },\n { path: 'subscription.billingStatus.freeTrialData.endDate' },\n {\n path: 'subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n { path: 'subscription.billingStatus.gracePeriodData.startDate' },\n { path: 'subscription.billingStatus.gracePeriodData.endDate' },\n { path: 'subscription.pauseInfo.startDate' },\n { path: 'subscription.pauseInfo.resumeDate' },\n { path: 'subscription.cancellationInfo.cancellationDate' },\n {\n path: 'subscription.specificDatePendingUpdateData.executionDate',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __turnOnSubscriptionAutoRenewal;\n}\n\n/**\n * Turn off auto-renew of subscription. At next billing date subscription will be canceled.\n * Billing settings flag cycle_auto_renew is set to false and information about this operation stored\n * in cancellation info for future usage in cancellation.\n */\nexport function turnOffSubscriptionAutoRenewal(\n payload: object\n): RequestOptionsFactory<any> {\n function __turnOffSubscriptionAutoRenewal({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.billing.v1.subscription',\n method: 'PATCH' as any,\n methodFqn:\n 'com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.TurnOffSubscriptionAutoRenewal',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingSubscriptionsApiV1SubscriptionsServiceUrl({\n protoPath: '/v1/subscriptions/{id}/turn_off_auto_renewal',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'subscription.createdDate' },\n { path: 'subscription.updatedDate' },\n { path: 'subscription.startDate' },\n { path: 'subscription.endDate' },\n { path: 'subscription.billingStatus.nextBillingDate' },\n { path: 'subscription.billingStatus.previousBillingDate' },\n {\n path: 'subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n { path: 'subscription.billingStatus.freeTrialData.startDate' },\n { path: 'subscription.billingStatus.freeTrialData.endDate' },\n {\n path: 'subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n { path: 'subscription.billingStatus.gracePeriodData.startDate' },\n { path: 'subscription.billingStatus.gracePeriodData.endDate' },\n { path: 'subscription.pauseInfo.startDate' },\n { path: 'subscription.pauseInfo.resumeDate' },\n { path: 'subscription.cancellationInfo.cancellationDate' },\n {\n path: 'subscription.specificDatePendingUpdateData.executionDate',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __turnOffSubscriptionAutoRenewal;\n}\n\n/**\n * Marks the last invoice as paid used for the following scenarios:\n * * Offline subscriptions.\n * * Online subscriptions during grace period. The operation will convert invoice to offline, remove grace period\n * and will send BillingCycleStarted event after invoice closing.\n * * Online one time payment subscription with total price of zero during purchase flow.\n * Activated event will be sent after invoice closing and subscription will be activated.\n * @deprecated It has been replaced with com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.MarkInvoiceAsPaid(), and will be removed on 2025-09-30.\n */\nexport function markLatestInvoiceAsPaid(\n payload: object\n): RequestOptionsFactory<any> {\n function __markLatestInvoiceAsPaid({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.billing.v1.subscription',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.MarkLatestInvoiceAsPaid',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingSubscriptionsApiV1SubscriptionsServiceUrl({\n protoPath:\n '/v1/subscriptions/{subscriptionId}/mark-latest-invoice-as-paid',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'subscription.createdDate' },\n { path: 'subscription.updatedDate' },\n { path: 'subscription.startDate' },\n { path: 'subscription.endDate' },\n { path: 'subscription.billingStatus.nextBillingDate' },\n { path: 'subscription.billingStatus.previousBillingDate' },\n {\n path: 'subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n { path: 'subscription.billingStatus.freeTrialData.startDate' },\n { path: 'subscription.billingStatus.freeTrialData.endDate' },\n {\n path: 'subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n { path: 'subscription.billingStatus.gracePeriodData.startDate' },\n { path: 'subscription.billingStatus.gracePeriodData.endDate' },\n { path: 'subscription.pauseInfo.startDate' },\n { path: 'subscription.pauseInfo.resumeDate' },\n { path: 'subscription.cancellationInfo.cancellationDate' },\n {\n path: 'subscription.specificDatePendingUpdateData.executionDate',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __markLatestInvoiceAsPaid;\n}\n\n/**\n * Marks the invoice associated with given subscription cycle as paid for the following scenarios:\n * If `paid_cycle` is left empty, the most recent invoice will be marked as paid.\n * If the invoice contains items other than subscription items, an error will be thrown.\n *\n * Marks the invoice as paid for the following scenarios:\n * 1. Offline subscriptions.\n * 2. Online subscriptions during the grace period.\n * This operation will convert the invoice to offline, remove the grace period,\n * and send a BillingCycleStarted event after the invoice is closed.\n * 3. Online one-time payment subscriptions with a total price of zero during the purchase flow.\n * An Activated event will be sent after the invoice is closed, and the subscription will be activated.\n * 4. For external subscriptions, where the payment occurs outside of BASS, an invoice is created and marked as paid\n */\nexport function markBillingCycleAsPaid(\n payload: object\n): RequestOptionsFactory<any> {\n function __markBillingCycleAsPaid({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.billing.v1.subscription',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.MarkBillingCycleAsPaid',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingSubscriptionsApiV1SubscriptionsServiceUrl({\n protoPath: '/v1/subscriptions/{subscriptionId}/mark-cycle-as-paid',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'subscription.createdDate' },\n { path: 'subscription.updatedDate' },\n { path: 'subscription.startDate' },\n { path: 'subscription.endDate' },\n { path: 'subscription.billingStatus.nextBillingDate' },\n { path: 'subscription.billingStatus.previousBillingDate' },\n {\n path: 'subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n { path: 'subscription.billingStatus.freeTrialData.startDate' },\n { path: 'subscription.billingStatus.freeTrialData.endDate' },\n {\n path: 'subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n { path: 'subscription.billingStatus.gracePeriodData.startDate' },\n { path: 'subscription.billingStatus.gracePeriodData.endDate' },\n { path: 'subscription.pauseInfo.startDate' },\n { path: 'subscription.pauseInfo.resumeDate' },\n { path: 'subscription.cancellationInfo.cancellationDate' },\n {\n path: 'subscription.specificDatePendingUpdateData.executionDate',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __markBillingCycleAsPaid;\n}\n\n/** Returns number of subscriptions in each state. */\nexport function getSubscriptionsStats(\n payload: object\n): RequestOptionsFactory<any> {\n function __getSubscriptionsStats({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.billing.v1.subscription',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.GetSubscriptionsStats',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingSubscriptionsApiV1SubscriptionsServiceUrl({\n protoPath: '/v1/subscriptions/stats',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __getSubscriptionsStats;\n}\n\n/** Extends subscription by moving end date with or without billing cycles addition. */\nexport function extendSubscription(\n payload: object\n): RequestOptionsFactory<any> {\n function __extendSubscription({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.billing.v1.subscription',\n method: 'PATCH' as any,\n methodFqn:\n 'com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.ExtendSubscription',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingSubscriptionsApiV1SubscriptionsServiceUrl({\n protoPath: '/v1/subscriptions/{id}/extend',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'subscription.createdDate' },\n { path: 'subscription.updatedDate' },\n { path: 'subscription.startDate' },\n { path: 'subscription.endDate' },\n { path: 'subscription.billingStatus.nextBillingDate' },\n { path: 'subscription.billingStatus.previousBillingDate' },\n {\n path: 'subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n { path: 'subscription.billingStatus.freeTrialData.startDate' },\n { path: 'subscription.billingStatus.freeTrialData.endDate' },\n {\n path: 'subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n { path: 'subscription.billingStatus.gracePeriodData.startDate' },\n { path: 'subscription.billingStatus.gracePeriodData.endDate' },\n { path: 'subscription.pauseInfo.startDate' },\n { path: 'subscription.pauseInfo.resumeDate' },\n { path: 'subscription.cancellationInfo.cancellationDate' },\n {\n path: 'subscription.specificDatePendingUpdateData.executionDate',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __extendSubscription;\n}\n\nexport function allowedActions(payload: object): RequestOptionsFactory<any> {\n function __allowedActions({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.billing.v1.subscription',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.AllowedActions',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingSubscriptionsApiV1SubscriptionsServiceUrl({\n protoPath: '/v1/subscriptions/{id}/allowed_actions',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __allowedActions;\n}\n\n/** List future subscriptions charges */\nexport function listUpcomingCharges(\n payload: object\n): RequestOptionsFactory<any> {\n function __listUpcomingCharges({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'nextBillingDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.billing.v1.subscription',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.ListUpcomingCharges',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingSubscriptionsApiV1SubscriptionsServiceUrl({\n protoPath: '/v1/subscriptions/{subscriptionId}/upcoming_charges',\n data: serializedData,\n host,\n }),\n params: toURLSearchParams(serializedData),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'upcomingCharges.billingDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listUpcomingCharges;\n}\n\n/**\n * Retrieves the preview of subscription charges.\n * Returns all the charges applicable to a subscription based on the provided subscription information.\n * @deprecated It has been replaced with com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.PreviewSubscriptionsCharges(), and will be removed on 2025-06-30.\n */\nexport function previewSubscriptionCharges(\n payload: object\n): RequestOptionsFactory<any> {\n function __previewSubscriptionCharges({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'subscriptionInfo.startDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.billing.v1.subscription',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.PreviewSubscriptionCharges',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingSubscriptionsApiV1SubscriptionsServiceUrl({\n protoPath: '/v1/subscriptions/preview_charges',\n data: serializedData,\n host,\n }),\n params: toURLSearchParams(serializedData, true),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'charges.cycleBillingDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __previewSubscriptionCharges;\n}\n\n/**\n * Retrieves the preview of subscription charges for a bulk of subscriptions.\n * Returns all the charges applicable to all subscriptions, based on the provided subscriptions information.\n */\nexport function previewSubscriptionsCharges(\n payload: object\n): RequestOptionsFactory<any> {\n function __previewSubscriptionsCharges({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'subscriptionsBillingDetails.startDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.billing.v1.subscription',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.PreviewSubscriptionsCharges',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingSubscriptionsApiV1SubscriptionsServiceUrl({\n protoPath: '/v1/subscriptions/preview-subscriptions-charges',\n data: serializedData,\n host,\n }),\n params: toURLSearchParams(serializedData, true),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'subscriptionsCharges.charges.cycleBillingDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __previewSubscriptionsCharges;\n}\n\n/** Creates authorization invoice with Moto settings in order to create */\nexport function initiatePaymentMethodSetup(\n payload: object\n): RequestOptionsFactory<any> {\n function __initiatePaymentMethodSetup({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.billing.v1.subscription',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.billing.subscriptions.api.v1.SubscriptionsService.InitiatePaymentMethodSetup',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingSubscriptionsApiV1SubscriptionsServiceUrl({\n protoPath: '/v1/subscriptions/{id}/payment_method_setup',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __initiatePaymentMethodSetup;\n}\n\nexport function listSubscriptionHistory(\n payload: object\n): RequestOptionsFactory<any> {\n function __listSubscriptionHistory({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.billing.v1.subscription',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.billing.subscriptions.api.v1.SubscriptionHistoryService.ListSubscriptionHistory',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingSubscriptionsApiV1SubscriptionHistoryServiceUrl(\n {\n protoPath: '/v1/subscriptions/{subscriptionId}/history',\n data: payload,\n host,\n }\n ),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'historyEntries.entryTime' },\n { path: 'historyEntries.event.created.subscription.createdDate' },\n { path: 'historyEntries.event.created.subscription.updatedDate' },\n { path: 'historyEntries.event.created.subscription.startDate' },\n { path: 'historyEntries.event.created.subscription.endDate' },\n {\n path: 'historyEntries.event.created.subscription.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.created.subscription.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.created.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.created.subscription.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.created.subscription.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.created.subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.created.subscription.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.created.subscription.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.created.subscription.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.created.subscription.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.created.subscription.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.created.subscription.specificDatePendingUpdateData.executionDate',\n },\n { path: 'historyEntries.event.updated.current.createdDate' },\n { path: 'historyEntries.event.updated.current.updatedDate' },\n { path: 'historyEntries.event.updated.current.startDate' },\n { path: 'historyEntries.event.updated.current.endDate' },\n {\n path: 'historyEntries.event.updated.current.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.updated.current.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.updated.current.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.updated.current.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.updated.current.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.updated.current.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.updated.current.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.updated.current.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.updated.current.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.updated.current.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.updated.current.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.updated.current.specificDatePendingUpdateData.executionDate',\n },\n { path: 'historyEntries.event.updated.previous.createdDate' },\n { path: 'historyEntries.event.updated.previous.updatedDate' },\n { path: 'historyEntries.event.updated.previous.startDate' },\n { path: 'historyEntries.event.updated.previous.endDate' },\n {\n path: 'historyEntries.event.updated.previous.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.updated.previous.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.updated.previous.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.updated.previous.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.updated.previous.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.updated.previous.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.updated.previous.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.updated.previous.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.updated.previous.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.updated.previous.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.updated.previous.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.updated.previous.specificDatePendingUpdateData.executionDate',\n },\n {\n path: 'historyEntries.event.activated.subscription.createdDate',\n },\n {\n path: 'historyEntries.event.activated.subscription.updatedDate',\n },\n { path: 'historyEntries.event.activated.subscription.startDate' },\n { path: 'historyEntries.event.activated.subscription.endDate' },\n {\n path: 'historyEntries.event.activated.subscription.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.activated.subscription.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.activated.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.activated.subscription.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.activated.subscription.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.activated.subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.activated.subscription.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.activated.subscription.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.activated.subscription.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.activated.subscription.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.activated.subscription.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.activated.subscription.specificDatePendingUpdateData.executionDate',\n },\n { path: 'historyEntries.event.ended.subscription.createdDate' },\n { path: 'historyEntries.event.ended.subscription.updatedDate' },\n { path: 'historyEntries.event.ended.subscription.startDate' },\n { path: 'historyEntries.event.ended.subscription.endDate' },\n {\n path: 'historyEntries.event.ended.subscription.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.ended.subscription.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.ended.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.ended.subscription.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.ended.subscription.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.ended.subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.ended.subscription.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.ended.subscription.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.ended.subscription.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.ended.subscription.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.ended.subscription.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.ended.subscription.specificDatePendingUpdateData.executionDate',\n },\n {\n path: 'historyEntries.event.canceled.subscription.createdDate',\n },\n {\n path: 'historyEntries.event.canceled.subscription.updatedDate',\n },\n { path: 'historyEntries.event.canceled.subscription.startDate' },\n { path: 'historyEntries.event.canceled.subscription.endDate' },\n {\n path: 'historyEntries.event.canceled.subscription.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.canceled.subscription.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.canceled.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.canceled.subscription.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.canceled.subscription.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.canceled.subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.canceled.subscription.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.canceled.subscription.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.canceled.subscription.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.canceled.subscription.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.canceled.subscription.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.canceled.subscription.specificDatePendingUpdateData.executionDate',\n },\n { path: 'historyEntries.event.paused.subscription.createdDate' },\n { path: 'historyEntries.event.paused.subscription.updatedDate' },\n { path: 'historyEntries.event.paused.subscription.startDate' },\n { path: 'historyEntries.event.paused.subscription.endDate' },\n {\n path: 'historyEntries.event.paused.subscription.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.paused.subscription.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.paused.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.paused.subscription.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.paused.subscription.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.paused.subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.paused.subscription.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.paused.subscription.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.paused.subscription.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.paused.subscription.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.paused.subscription.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.paused.subscription.specificDatePendingUpdateData.executionDate',\n },\n { path: 'historyEntries.event.resumed.subscription.createdDate' },\n { path: 'historyEntries.event.resumed.subscription.updatedDate' },\n { path: 'historyEntries.event.resumed.subscription.startDate' },\n { path: 'historyEntries.event.resumed.subscription.endDate' },\n {\n path: 'historyEntries.event.resumed.subscription.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.resumed.subscription.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.resumed.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.resumed.subscription.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.resumed.subscription.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.resumed.subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.resumed.subscription.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.resumed.subscription.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.resumed.subscription.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.resumed.subscription.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.resumed.subscription.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.resumed.subscription.specificDatePendingUpdateData.executionDate',\n },\n {\n path: 'historyEntries.event.pauseRequested.subscription.createdDate',\n },\n {\n path: 'historyEntries.event.pauseRequested.subscription.updatedDate',\n },\n {\n path: 'historyEntries.event.pauseRequested.subscription.startDate',\n },\n {\n path: 'historyEntries.event.pauseRequested.subscription.endDate',\n },\n {\n path: 'historyEntries.event.pauseRequested.subscription.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.pauseRequested.subscription.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.pauseRequested.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.pauseRequested.subscription.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.pauseRequested.subscription.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.pauseRequested.subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.pauseRequested.subscription.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.pauseRequested.subscription.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.pauseRequested.subscription.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.pauseRequested.subscription.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.pauseRequested.subscription.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.pauseRequested.subscription.specificDatePendingUpdateData.executionDate',\n },\n {\n path: 'historyEntries.event.resumeRequested.subscription.createdDate',\n },\n {\n path: 'historyEntries.event.resumeRequested.subscription.updatedDate',\n },\n {\n path: 'historyEntries.event.resumeRequested.subscription.startDate',\n },\n {\n path: 'historyEntries.event.resumeRequested.subscription.endDate',\n },\n {\n path: 'historyEntries.event.resumeRequested.subscription.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.resumeRequested.subscription.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.resumeRequested.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.resumeRequested.subscription.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.resumeRequested.subscription.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.resumeRequested.subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.resumeRequested.subscription.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.resumeRequested.subscription.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.resumeRequested.subscription.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.resumeRequested.subscription.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.resumeRequested.subscription.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.resumeRequested.subscription.specificDatePendingUpdateData.executionDate',\n },\n {\n path: 'historyEntries.event.scheduledPauseCanceled.subscription.createdDate',\n },\n {\n path: 'historyEntries.event.scheduledPauseCanceled.subscription.updatedDate',\n },\n {\n path: 'historyEntries.event.scheduledPauseCanceled.subscription.startDate',\n },\n {\n path: 'historyEntries.event.scheduledPauseCanceled.subscription.endDate',\n },\n {\n path: 'historyEntries.event.scheduledPauseCanceled.subscription.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.scheduledPauseCanceled.subscription.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.scheduledPauseCanceled.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.scheduledPauseCanceled.subscription.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.scheduledPauseCanceled.subscription.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.scheduledPauseCanceled.subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.scheduledPauseCanceled.subscription.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.scheduledPauseCanceled.subscription.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.scheduledPauseCanceled.subscription.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.scheduledPauseCanceled.subscription.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.scheduledPauseCanceled.subscription.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.scheduledPauseCanceled.subscription.specificDatePendingUpdateData.executionDate',\n },\n {\n path: 'historyEntries.event.scheduledResumeCanceled.subscription.createdDate',\n },\n {\n path: 'historyEntries.event.scheduledResumeCanceled.subscription.updatedDate',\n },\n {\n path: 'historyEntries.event.scheduledResumeCanceled.subscription.startDate',\n },\n {\n path: 'historyEntries.event.scheduledResumeCanceled.subscription.endDate',\n },\n {\n path: 'historyEntries.event.scheduledResumeCanceled.subscription.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.scheduledResumeCanceled.subscription.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.scheduledResumeCanceled.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.scheduledResumeCanceled.subscription.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.scheduledResumeCanceled.subscription.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.scheduledResumeCanceled.subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.scheduledResumeCanceled.subscription.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.scheduledResumeCanceled.subscription.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.scheduledResumeCanceled.subscription.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.scheduledResumeCanceled.subscription.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.scheduledResumeCanceled.subscription.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.scheduledResumeCanceled.subscription.specificDatePendingUpdateData.executionDate',\n },\n {\n path: 'historyEntries.event.billingCycleStarted.subscription.createdDate',\n },\n {\n path: 'historyEntries.event.billingCycleStarted.subscription.updatedDate',\n },\n {\n path: 'historyEntries.event.billingCycleStarted.subscription.startDate',\n },\n {\n path: 'historyEntries.event.billingCycleStarted.subscription.endDate',\n },\n {\n path: 'historyEntries.event.billingCycleStarted.subscription.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.billingCycleStarted.subscription.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.billingCycleStarted.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.billingCycleStarted.subscription.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.billingCycleStarted.subscription.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.billingCycleStarted.subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.billingCycleStarted.subscription.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.billingCycleStarted.subscription.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.billingCycleStarted.subscription.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.billingCycleStarted.subscription.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.billingCycleStarted.subscription.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.billingCycleStarted.subscription.specificDatePendingUpdateData.executionDate',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOn.subscription.createdDate',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOn.subscription.updatedDate',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOn.subscription.startDate',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOn.subscription.endDate',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOn.subscription.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOn.subscription.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOn.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOn.subscription.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOn.subscription.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOn.subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOn.subscription.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOn.subscription.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOn.subscription.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOn.subscription.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOn.subscription.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOn.subscription.specificDatePendingUpdateData.executionDate',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOff.subscription.createdDate',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOff.subscription.updatedDate',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOff.subscription.startDate',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOff.subscription.endDate',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOff.subscription.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOff.subscription.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOff.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOff.subscription.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOff.subscription.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOff.subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOff.subscription.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOff.subscription.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOff.subscription.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOff.subscription.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOff.subscription.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.autoRenewalTurnedOff.subscription.specificDatePendingUpdateData.executionDate',\n },\n {\n path: 'historyEntries.event.cycleReadyToPay.subscription.createdDate',\n },\n {\n path: 'historyEntries.event.cycleReadyToPay.subscription.updatedDate',\n },\n {\n path: 'historyEntries.event.cycleReadyToPay.subscription.startDate',\n },\n {\n path: 'historyEntries.event.cycleReadyToPay.subscription.endDate',\n },\n {\n path: 'historyEntries.event.cycleReadyToPay.subscription.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.cycleReadyToPay.subscription.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.cycleReadyToPay.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.cycleReadyToPay.subscription.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.cycleReadyToPay.subscription.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.cycleReadyToPay.subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.cycleReadyToPay.subscription.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.cycleReadyToPay.subscription.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.cycleReadyToPay.subscription.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.cycleReadyToPay.subscription.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.cycleReadyToPay.subscription.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.cycleReadyToPay.subscription.specificDatePendingUpdateData.executionDate',\n },\n {\n path: 'historyEntries.event.extended.subscription.createdDate',\n },\n {\n path: 'historyEntries.event.extended.subscription.updatedDate',\n },\n { path: 'historyEntries.event.extended.subscription.startDate' },\n { path: 'historyEntries.event.extended.subscription.endDate' },\n {\n path: 'historyEntries.event.extended.subscription.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.extended.subscription.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.extended.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.extended.subscription.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.extended.subscription.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.extended.subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.extended.subscription.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.extended.subscription.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.extended.subscription.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.extended.subscription.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.extended.subscription.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.extended.subscription.specificDatePendingUpdateData.executionDate',\n },\n {\n path: 'historyEntries.event.initialPurchaseCompleted.subscription.createdDate',\n },\n {\n path: 'historyEntries.event.initialPurchaseCompleted.subscription.updatedDate',\n },\n {\n path: 'historyEntries.event.initialPurchaseCompleted.subscription.startDate',\n },\n {\n path: 'historyEntries.event.initialPurchaseCompleted.subscription.endDate',\n },\n {\n path: 'historyEntries.event.initialPurchaseCompleted.subscription.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.initialPurchaseCompleted.subscription.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.initialPurchaseCompleted.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.initialPurchaseCompleted.subscription.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.initialPurchaseCompleted.subscription.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.initialPurchaseCompleted.subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.initialPurchaseCompleted.subscription.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.initialPurchaseCompleted.subscription.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.initialPurchaseCompleted.subscription.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.initialPurchaseCompleted.subscription.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.initialPurchaseCompleted.subscription.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.initialPurchaseCompleted.subscription.specificDatePendingUpdateData.executionDate',\n },\n {\n path: 'historyEntries.event.latestInvoiceMarkedAsPaid.subscription.createdDate',\n },\n {\n path: 'historyEntries.event.latestInvoiceMarkedAsPaid.subscription.updatedDate',\n },\n {\n path: 'historyEntries.event.latestInvoiceMarkedAsPaid.subscription.startDate',\n },\n {\n path: 'historyEntries.event.latestInvoiceMarkedAsPaid.subscription.endDate',\n },\n {\n path: 'historyEntries.event.latestInvoiceMarkedAsPaid.subscription.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.latestInvoiceMarkedAsPaid.subscription.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.latestInvoiceMarkedAsPaid.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.latestInvoiceMarkedAsPaid.subscription.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.latestInvoiceMarkedAsPaid.subscription.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.latestInvoiceMarkedAsPaid.subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.latestInvoiceMarkedAsPaid.subscription.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.latestInvoiceMarkedAsPaid.subscription.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.latestInvoiceMarkedAsPaid.subscription.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.latestInvoiceMarkedAsPaid.subscription.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.latestInvoiceMarkedAsPaid.subscription.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.latestInvoiceMarkedAsPaid.subscription.specificDatePendingUpdateData.executionDate',\n },\n { path: 'historyEntries.event.revived.subscription.createdDate' },\n { path: 'historyEntries.event.revived.subscription.updatedDate' },\n { path: 'historyEntries.event.revived.subscription.startDate' },\n { path: 'historyEntries.event.revived.subscription.endDate' },\n {\n path: 'historyEntries.event.revived.subscription.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.revived.subscription.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.revived.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.revived.subscription.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.revived.subscription.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.revived.subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.revived.subscription.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.revived.subscription.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.revived.subscription.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.revived.subscription.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.revived.subscription.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.revived.subscription.specificDatePendingUpdateData.executionDate',\n },\n { path: 'historyEntries.event.billingDateUpdated.billingDate' },\n {\n path: 'historyEntries.event.billingDateUpdated.subscription.createdDate',\n },\n {\n path: 'historyEntries.event.billingDateUpdated.subscription.updatedDate',\n },\n {\n path: 'historyEntries.event.billingDateUpdated.subscription.startDate',\n },\n {\n path: 'historyEntries.event.billingDateUpdated.subscription.endDate',\n },\n {\n path: 'historyEntries.event.billingDateUpdated.subscription.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.billingDateUpdated.subscription.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.billingDateUpdated.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.billingDateUpdated.subscription.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.billingDateUpdated.subscription.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.billingDateUpdated.subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.billingDateUpdated.subscription.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.billingDateUpdated.subscription.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.billingDateUpdated.subscription.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.billingDateUpdated.subscription.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.billingDateUpdated.subscription.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.billingDateUpdated.subscription.specificDatePendingUpdateData.executionDate',\n },\n {\n path: 'historyEntries.event.futureUpdatesRequested.subscription.createdDate',\n },\n {\n path: 'historyEntries.event.futureUpdatesRequested.subscription.updatedDate',\n },\n {\n path: 'historyEntries.event.futureUpdatesRequested.subscription.startDate',\n },\n {\n path: 'historyEntries.event.futureUpdatesRequested.subscription.endDate',\n },\n {\n path: 'historyEntries.event.futureUpdatesRequested.subscription.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.futureUpdatesRequested.subscription.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.futureUpdatesRequested.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.futureUpdatesRequested.subscription.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.futureUpdatesRequested.subscription.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.futureUpdatesRequested.subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.futureUpdatesRequested.subscription.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.futureUpdatesRequested.subscription.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.futureUpdatesRequested.subscription.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.futureUpdatesRequested.subscription.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.futureUpdatesRequested.subscription.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.futureUpdatesRequested.subscription.specificDatePendingUpdateData.executionDate',\n },\n {\n path: 'historyEntries.event.updatesApplied.subscription.createdDate',\n },\n {\n path: 'historyEntries.event.updatesApplied.subscription.updatedDate',\n },\n {\n path: 'historyEntries.event.updatesApplied.subscription.startDate',\n },\n {\n path: 'historyEntries.event.updatesApplied.subscription.endDate',\n },\n {\n path: 'historyEntries.event.updatesApplied.subscription.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.updatesApplied.subscription.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.updatesApplied.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.updatesApplied.subscription.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.updatesApplied.subscription.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.updatesApplied.subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.updatesApplied.subscription.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.updatesApplied.subscription.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.updatesApplied.subscription.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.updatesApplied.subscription.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.updatesApplied.subscription.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.updatesApplied.subscription.specificDatePendingUpdateData.executionDate',\n },\n {\n path: 'historyEntries.event.resetPendingUpdates.subscription.createdDate',\n },\n {\n path: 'historyEntries.event.resetPendingUpdates.subscription.updatedDate',\n },\n {\n path: 'historyEntries.event.resetPendingUpdates.subscription.startDate',\n },\n {\n path: 'historyEntries.event.resetPendingUpdates.subscription.endDate',\n },\n {\n path: 'historyEntries.event.resetPendingUpdates.subscription.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.resetPendingUpdates.subscription.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.resetPendingUpdates.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.resetPendingUpdates.subscription.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.resetPendingUpdates.subscription.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.resetPendingUpdates.subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.resetPendingUpdates.subscription.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.resetPendingUpdates.subscription.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.resetPendingUpdates.subscription.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.resetPendingUpdates.subscription.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.resetPendingUpdates.subscription.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.resetPendingUpdates.subscription.specificDatePendingUpdateData.executionDate',\n },\n {\n path: 'historyEntries.event.gracePeriodStarted.subscription.createdDate',\n },\n {\n path: 'historyEntries.event.gracePeriodStarted.subscription.updatedDate',\n },\n {\n path: 'historyEntries.event.gracePeriodStarted.subscription.startDate',\n },\n {\n path: 'historyEntries.event.gracePeriodStarted.subscription.endDate',\n },\n {\n path: 'historyEntries.event.gracePeriodStarted.subscription.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.gracePeriodStarted.subscription.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.gracePeriodStarted.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.gracePeriodStarted.subscription.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.gracePeriodStarted.subscription.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.gracePeriodStarted.subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.gracePeriodStarted.subscription.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.gracePeriodStarted.subscription.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.gracePeriodStarted.subscription.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.gracePeriodStarted.subscription.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.gracePeriodStarted.subscription.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.gracePeriodStarted.subscription.specificDatePendingUpdateData.executionDate',\n },\n {\n path: 'historyEntries.event.gracePeriodEnded.subscription.createdDate',\n },\n {\n path: 'historyEntries.event.gracePeriodEnded.subscription.updatedDate',\n },\n {\n path: 'historyEntries.event.gracePeriodEnded.subscription.startDate',\n },\n {\n path: 'historyEntries.event.gracePeriodEnded.subscription.endDate',\n },\n {\n path: 'historyEntries.event.gracePeriodEnded.subscription.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.gracePeriodEnded.subscription.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.gracePeriodEnded.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.gracePeriodEnded.subscription.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.gracePeriodEnded.subscription.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.gracePeriodEnded.subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.gracePeriodEnded.subscription.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.gracePeriodEnded.subscription.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.gracePeriodEnded.subscription.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.gracePeriodEnded.subscription.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.gracePeriodEnded.subscription.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.gracePeriodEnded.subscription.specificDatePendingUpdateData.executionDate',\n },\n {\n path: 'historyEntries.event.paymentMethodUpdated.subscription.createdDate',\n },\n {\n path: 'historyEntries.event.paymentMethodUpdated.subscription.updatedDate',\n },\n {\n path: 'historyEntries.event.paymentMethodUpdated.subscription.startDate',\n },\n {\n path: 'historyEntries.event.paymentMethodUpdated.subscription.endDate',\n },\n {\n path: 'historyEntries.event.paymentMethodUpdated.subscription.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.paymentMethodUpdated.subscription.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.paymentMethodUpdated.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.paymentMethodUpdated.subscription.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.paymentMethodUpdated.subscription.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.paymentMethodUpdated.subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.paymentMethodUpdated.subscription.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.paymentMethodUpdated.subscription.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.paymentMethodUpdated.subscription.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.paymentMethodUpdated.subscription.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.paymentMethodUpdated.subscription.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.paymentMethodUpdated.subscription.specificDatePendingUpdateData.executionDate',\n },\n {\n path: 'historyEntries.event.collectionMethodUpdated.subscription.createdDate',\n },\n {\n path: 'historyEntries.event.collectionMethodUpdated.subscription.updatedDate',\n },\n {\n path: 'historyEntries.event.collectionMethodUpdated.subscription.startDate',\n },\n {\n path: 'historyEntries.event.collectionMethodUpdated.subscription.endDate',\n },\n {\n path: 'historyEntries.event.collectionMethodUpdated.subscription.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.collectionMethodUpdated.subscription.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.collectionMethodUpdated.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.collectionMethodUpdated.subscription.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.collectionMethodUpdated.subscription.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.collectionMethodUpdated.subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.collectionMethodUpdated.subscription.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.collectionMethodUpdated.subscription.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.collectionMethodUpdated.subscription.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.collectionMethodUpdated.subscription.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.collectionMethodUpdated.subscription.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.collectionMethodUpdated.subscription.specificDatePendingUpdateData.executionDate',\n },\n {\n path: 'historyEntries.event.freeTrailStarted.subscription.createdDate',\n },\n {\n path: 'historyEntries.event.freeTrailStarted.subscription.updatedDate',\n },\n {\n path: 'historyEntries.event.freeTrailStarted.subscription.startDate',\n },\n {\n path: 'historyEntries.event.freeTrailStarted.subscription.endDate',\n },\n {\n path: 'historyEntries.event.freeTrailStarted.subscription.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.freeTrailStarted.subscription.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.freeTrailStarted.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.freeTrailStarted.subscription.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.freeTrailStarted.subscription.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.freeTrailStarted.subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.freeTrailStarted.subscription.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.freeTrailStarted.subscription.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.freeTrailStarted.subscription.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.freeTrailStarted.subscription.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.freeTrailStarted.subscription.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.freeTrailStarted.subscription.specificDatePendingUpdateData.executionDate',\n },\n {\n path: 'historyEntries.event.freeTrailEnded.subscription.createdDate',\n },\n {\n path: 'historyEntries.event.freeTrailEnded.subscription.updatedDate',\n },\n {\n path: 'historyEntries.event.freeTrailEnded.subscription.startDate',\n },\n {\n path: 'historyEntries.event.freeTrailEnded.subscription.endDate',\n },\n {\n path: 'historyEntries.event.freeTrailEnded.subscription.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.freeTrailEnded.subscription.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.freeTrailEnded.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.freeTrailEnded.subscription.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.freeTrailEnded.subscription.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.freeTrailEnded.subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.freeTrailEnded.subscription.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.freeTrailEnded.subscription.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.freeTrailEnded.subscription.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.freeTrailEnded.subscription.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.freeTrailEnded.subscription.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.freeTrailEnded.subscription.specificDatePendingUpdateData.executionDate',\n },\n {\n path: 'historyEntries.event.billingCyclePaid.subscription.createdDate',\n },\n {\n path: 'historyEntries.event.billingCyclePaid.subscription.updatedDate',\n },\n {\n path: 'historyEntries.event.billingCyclePaid.subscription.startDate',\n },\n {\n path: 'historyEntries.event.billingCyclePaid.subscription.endDate',\n },\n {\n path: 'historyEntries.event.billingCyclePaid.subscription.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.billingCyclePaid.subscription.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.billingCyclePaid.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.billingCyclePaid.subscription.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.billingCyclePaid.subscription.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.billingCyclePaid.subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.billingCyclePaid.subscription.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.billingCyclePaid.subscription.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.billingCyclePaid.subscription.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.billingCyclePaid.subscription.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.billingCyclePaid.subscription.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.billingCyclePaid.subscription.specificDatePendingUpdateData.executionDate',\n },\n {\n path: 'historyEntries.event.initiatePaymentMethodSetup.subscription.createdDate',\n },\n {\n path: 'historyEntries.event.initiatePaymentMethodSetup.subscription.updatedDate',\n },\n {\n path: 'historyEntries.event.initiatePaymentMethodSetup.subscription.startDate',\n },\n {\n path: 'historyEntries.event.initiatePaymentMethodSetup.subscription.endDate',\n },\n {\n path: 'historyEntries.event.initiatePaymentMethodSetup.subscription.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.initiatePaymentMethodSetup.subscription.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.initiatePaymentMethodSetup.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.initiatePaymentMethodSetup.subscription.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.initiatePaymentMethodSetup.subscription.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.initiatePaymentMethodSetup.subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.initiatePaymentMethodSetup.subscription.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.initiatePaymentMethodSetup.subscription.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.initiatePaymentMethodSetup.subscription.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.initiatePaymentMethodSetup.subscription.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.initiatePaymentMethodSetup.subscription.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.initiatePaymentMethodSetup.subscription.specificDatePendingUpdateData.executionDate',\n },\n {\n path: 'historyEntries.event.futurePriceUpdatesRequested.subscription.createdDate',\n },\n {\n path: 'historyEntries.event.futurePriceUpdatesRequested.subscription.updatedDate',\n },\n {\n path: 'historyEntries.event.futurePriceUpdatesRequested.subscription.startDate',\n },\n {\n path: 'historyEntries.event.futurePriceUpdatesRequested.subscription.endDate',\n },\n {\n path: 'historyEntries.event.futurePriceUpdatesRequested.subscription.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.futurePriceUpdatesRequested.subscription.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.futurePriceUpdatesRequested.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.futurePriceUpdatesRequested.subscription.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.futurePriceUpdatesRequested.subscription.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.futurePriceUpdatesRequested.subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.futurePriceUpdatesRequested.subscription.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.futurePriceUpdatesRequested.subscription.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.futurePriceUpdatesRequested.subscription.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.futurePriceUpdatesRequested.subscription.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.futurePriceUpdatesRequested.subscription.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.futurePriceUpdatesRequested.subscription.specificDatePendingUpdateData.executionDate',\n },\n {\n path: 'historyEntries.event.subscriptionBoAction.subscription.createdDate',\n },\n {\n path: 'historyEntries.event.subscriptionBoAction.subscription.updatedDate',\n },\n {\n path: 'historyEntries.event.subscriptionBoAction.subscription.startDate',\n },\n {\n path: 'historyEntries.event.subscriptionBoAction.subscription.endDate',\n },\n {\n path: 'historyEntries.event.subscriptionBoAction.subscription.billingStatus.nextBillingDate',\n },\n {\n path: 'historyEntries.event.subscriptionBoAction.subscription.billingStatus.previousBillingDate',\n },\n {\n path: 'historyEntries.event.subscriptionBoAction.subscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n },\n {\n path: 'historyEntries.event.subscriptionBoAction.subscription.billingStatus.freeTrialData.startDate',\n },\n {\n path: 'historyEntries.event.subscriptionBoAction.subscription.billingStatus.freeTrialData.endDate',\n },\n {\n path: 'historyEntries.event.subscriptionBoAction.subscription.billingStatus.updateBillingDateData.paidUntil',\n },\n {\n path: 'historyEntries.event.subscriptionBoAction.subscription.billingStatus.gracePeriodData.startDate',\n },\n {\n path: 'historyEntries.event.subscriptionBoAction.subscription.billingStatus.gracePeriodData.endDate',\n },\n {\n path: 'historyEntries.event.subscriptionBoAction.subscription.pauseInfo.startDate',\n },\n {\n path: 'historyEntries.event.subscriptionBoAction.subscription.pauseInfo.resumeDate',\n },\n {\n path: 'historyEntries.event.subscriptionBoAction.subscription.cancellationInfo.cancellationDate',\n },\n {\n path: 'historyEntries.event.subscriptionBoAction.subscription.specificDatePendingUpdateData.executionDate',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listSubscriptionHistory;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAAAA;AAAA,EAAA,0BAAAC;AAAA,EAAA,0BAAAC;AAAA,EAAA,8BAAAC;AAAA,EAAA,kCAAAC;AAAA,EAAA,kCAAAC;AAAA,EAAA,+BAAAC;AAAA,EAAA,0CAAAC;AAAA,EAAA,mCAAAC;AAAA,EAAA,kCAAAC;AAAA,EAAA,8CAAAC;AAAA,EAAA,6CAAAC;AAAA,EAAA,+CAAAC;AAAA,EAAA,0BAAAC;AAAA,EAAA,uBAAAC;AAAA,EAAA,6BAAAC;AAAA,EAAA,kCAAAC;AAAA,EAAA,+BAAAC;AAAA,EAAA,2BAAAC;AAAA,EAAA,8BAAAC;AAAA,EAAA,+BAAAC;AAAA,EAAA,yBAAAC;AAAA,EAAA,gBAAAC;AAAA,EAAA,kCAAAC;AAAA,EAAA,mCAAAC;AAAA,EAAA,0BAAAC;AAAA,EAAA,0BAAAC;AAAA,EAAA,2BAAAC;AAAA,EAAA,sCAAAC;AAAA,EAAA,qCAAAC;AAAA,EAAA,qCAAAC;AAAA,EAAA,uCAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,uBAAqD;AACrD,IAAAC,oBAA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A,YACA;AAAA,cACE,MAAM;AAAA,YACR;AAAA,YACA;AAAA,cACE,MAAM;AAAA,YACR;AAAA,YACA;AAAA,cACE,MAAM;AAAA,YACR;AAAA,YACA;AAAA,cACE,MAAM;AAAA,YACR;AAAA,YACA;AAAA,cACE,MAAM;AAAA,YACR;AAAA,UACF;AAAA,QACF;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAA/B;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,gBAAgB;AAAA,UAChB,MAAM;AAAA,UACN,QAAQ;AAAA,QACV;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,kBAAkB,SAAS;AAAA,IAC9B;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["allowedActions","cancelSubscription","countSubscriptions","customerAllowedActions","customerCancelSubscription","customerExtendSubscription","customerGetSubscription","customerInitiatePaymentMethodSetup","customerListUpcomingCharges","customerQuerySubscriptions","customerTurnOffSubscriptionAutoRenewal","customerTurnOnSubscriptionAutoRenewal","customerUpdateSubscriptionPaymentMethod","extendSubscription","getSubscription","getSubscriptionsStats","initiatePaymentMethodSetup","listSubscriptionHistory","listUpcomingCharges","markBillingCycleAsPaid","markLatestInvoiceAsPaid","pauseSubscription","payCycle","previewSubscriptionCharges","previewSubscriptionsCharges","querySubscriptions","resumeSubscription","searchSubscriptions","turnOffSubscriptionAutoRenewal","turnOnSubscriptionAutoRenewal","updateSubscriptionBillingDate","updateSubscriptionPaymentMethod","import_timestamp","import_rest_modules","payload","import_address","import_transform_paths","SubscriptionStatusEnumSubscriptionStatus","CollectionMethodEnumCollectionMethod","DurationUnit","AdditionalFeeTrigger","TaxableAddressType","PaymentStatus","PausePolicy","PauseAt","ResumeAt","PauseType","HistoryActionInitiator","ItemCategory","SortOrder","SubscriptionStatusGroup","ActionType","ExtendPolicyType","PaymentMode","OrderMethod","WebhookIdentityType","PaymentTestMode","RevivePolicy","ActionInitiator","UpdateAction","RequestedFields","InvoiceStatus","CollectionMethod","CreationMode","PaymentAttemptStatus","RefundReason","IdentityType","SubscriptionType","V1SubscriptionStatusEnumSubscriptionStatus","PaymentStatusEnumPaymentStatus","SubscriptionFrequency","CancellationInitiator","Status","HistoryViewMode","PaymentSettlementMethod","customerGetSubscription","sdkTransformError","customerCancelSubscription","customerTurnOnSubscriptionAutoRenewal","customerTurnOffSubscriptionAutoRenewal","customerExtendSubscription","customerQuerySubscriptions","customerUpdateSubscriptionPaymentMethod","customerAllowedActions","customerListUpcomingCharges","customerInitiatePaymentMethodSetup","payCycle","getSubscription","updateSubscriptionPaymentMethod","updateSubscriptionBillingDate","cancelSubscription","pauseSubscription","resumeSubscription","querySubscriptions","searchSubscriptions","countSubscriptions","turnOnSubscriptionAutoRenewal","turnOffSubscriptionAutoRenewal","markLatestInvoiceAsPaid","markBillingCycleAsPaid","getSubscriptionsStats","extendSubscription","allowedActions","listUpcomingCharges","previewSubscriptionCharges","previewSubscriptionsCharges","initiatePaymentMethodSetup","listSubscriptionHistory"]}
|