@wix/auto_sdk_subscription_subscriptions 1.0.47 → 1.0.49

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.
Files changed (37) hide show
  1. package/build/cjs/index.d.ts +3 -11
  2. package/build/cjs/index.js +402 -142
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +2020 -1771
  5. package/build/cjs/index.typings.js +338 -97
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +1991 -1762
  8. package/build/cjs/meta.js +291 -92
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +3 -11
  11. package/build/es/index.mjs +396 -141
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +2020 -1771
  14. package/build/es/index.typings.mjs +332 -96
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +1991 -1762
  17. package/build/es/meta.mjs +285 -91
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +28 -10
  20. package/build/internal/cjs/index.typings.d.ts +1713 -1383
  21. package/build/internal/cjs/meta.d.ts +2124 -1783
  22. package/build/internal/es/index.d.mts +28 -10
  23. package/build/internal/es/index.typings.d.mts +1713 -1383
  24. package/build/internal/es/meta.d.mts +2124 -1783
  25. package/package.json +4 -4
  26. package/build/internal/cjs/index.js +0 -6659
  27. package/build/internal/cjs/index.js.map +0 -1
  28. package/build/internal/cjs/index.typings.js +0 -5629
  29. package/build/internal/cjs/index.typings.js.map +0 -1
  30. package/build/internal/cjs/meta.js +0 -4712
  31. package/build/internal/cjs/meta.js.map +0 -1
  32. package/build/internal/es/index.mjs +0 -6543
  33. package/build/internal/es/index.mjs.map +0 -1
  34. package/build/internal/es/index.typings.mjs +0 -5526
  35. package/build/internal/es/index.typings.mjs.map +0 -1
  36. package/build/internal/es/meta.mjs +0 -4606
  37. package/build/internal/es/meta.mjs.map +0 -1
@@ -1,4 +1,4 @@
1
- import { GetSubscriptionRequest as GetSubscriptionRequest$1, GetSubscriptionResponse as GetSubscriptionResponse$1, CustomerCancelSubscriptionRequest as CustomerCancelSubscriptionRequest$1, CustomerCancelSubscriptionResponse as CustomerCancelSubscriptionResponse$1, CustomerTurnOnAutoRenewalRequest as CustomerTurnOnAutoRenewalRequest$1, CustomerTurnOnAutoRenewalResponse as CustomerTurnOnAutoRenewalResponse$1, CustomerTurnOffAutoRenewalRequest as CustomerTurnOffAutoRenewalRequest$1, CustomerTurnOffAutoRenewalResponse as CustomerTurnOffAutoRenewalResponse$1, CustomerExtendSubscriptionRequest as CustomerExtendSubscriptionRequest$1, CustomerExtendSubscriptionResponse as CustomerExtendSubscriptionResponse$1, QuerySubscriptionsRequest as QuerySubscriptionsRequest$1, QuerySubscriptionsResponse as QuerySubscriptionsResponse$1, UpdateSubscriptionPaymentMethodRequest as UpdateSubscriptionPaymentMethodRequest$1, UpdateSubscriptionPaymentMethodResponse as UpdateSubscriptionPaymentMethodResponse$1, CustomerAllowedActionsRequest as CustomerAllowedActionsRequest$1, CustomerAllowedActionsResponse as CustomerAllowedActionsResponse$1, CustomerListUpcomingChargesRequest as CustomerListUpcomingChargesRequest$1, CustomerListUpcomingChargesResponse as CustomerListUpcomingChargesResponse$1, InitiatePaymentMethodSetupRequest as InitiatePaymentMethodSetupRequest$1, InitiatePaymentMethodSetupResponse as InitiatePaymentMethodSetupResponse$1, CustomerSkipCycleRequest as CustomerSkipCycleRequest$1, CustomerSkipCycleResponse as CustomerSkipCycleResponse$1, CustomerCancelScheduledSkipRequest as CustomerCancelScheduledSkipRequest$1, CustomerCancelScheduledSkipResponse as CustomerCancelScheduledSkipResponse$1, CustomerPauseSubscriptionRequest as CustomerPauseSubscriptionRequest$1, CustomerPauseSubscriptionResponse as CustomerPauseSubscriptionResponse$1, CustomerResumeSubscriptionRequest as CustomerResumeSubscriptionRequest$1, CustomerResumeSubscriptionResponse as CustomerResumeSubscriptionResponse$1, CustomerCancelScheduledPauseRequest as CustomerCancelScheduledPauseRequest$1, CustomerCancelScheduledPauseResponse as CustomerCancelScheduledPauseResponse$1, CustomerUpdateBillingDateRequest as CustomerUpdateBillingDateRequest$1, CustomerUpdateBillingDateResponse as CustomerUpdateBillingDateResponse$1, PayCycleRequest as PayCycleRequest$1, PayCycleResponse as PayCycleResponse$1, UpdateSubscriptionBillingDateRequest as UpdateSubscriptionBillingDateRequest$1, UpdateSubscriptionBillingDateResponse as UpdateSubscriptionBillingDateResponse$1, ReviseSubscriptionRequest as ReviseSubscriptionRequest$1, ReviseSubscriptionResponse as ReviseSubscriptionResponse$1, CancelSubscriptionRequest as CancelSubscriptionRequest$1, CancelSubscriptionResponse as CancelSubscriptionResponse$1, PauseSubscriptionRequest as PauseSubscriptionRequest$1, PauseSubscriptionResponse as PauseSubscriptionResponse$1, ResumeSubscriptionRequest as ResumeSubscriptionRequest$1, ResumeSubscriptionResponse as ResumeSubscriptionResponse$1, SearchSubscriptionsRequest as SearchSubscriptionsRequest$1, SearchSubscriptionsResponse as SearchSubscriptionsResponse$1, CountSubscriptionsRequest as CountSubscriptionsRequest$1, CountSubscriptionsResponse as CountSubscriptionsResponse$1, TurnOnSubscriptionAutoRenewalRequest as TurnOnSubscriptionAutoRenewalRequest$1, TurnOnSubscriptionAutoRenewalResponse as TurnOnSubscriptionAutoRenewalResponse$1, TurnOffSubscriptionAutoRenewalRequest as TurnOffSubscriptionAutoRenewalRequest$1, TurnOffSubscriptionAutoRenewalResponse as TurnOffSubscriptionAutoRenewalResponse$1, MarkLatestInvoiceAsPaidRequest as MarkLatestInvoiceAsPaidRequest$1, MarkLatestInvoiceAsPaidResponse as MarkLatestInvoiceAsPaidResponse$1, MarkBillingCycleAsPaidRequest as MarkBillingCycleAsPaidRequest$1, MarkBillingCycleAsPaidResponse as MarkBillingCycleAsPaidResponse$1, GetSubscriptionsStatsRequest as GetSubscriptionsStatsRequest$1, GetSubscriptionsStatsResponse as GetSubscriptionsStatsResponse$1, ExtendSubscriptionRequest as ExtendSubscriptionRequest$1, ExtendSubscriptionResponse as ExtendSubscriptionResponse$1, AllowedActionsRequest as AllowedActionsRequest$1, AllowedActionsResponse as AllowedActionsResponse$1, ListUpcomingChargesRequest as ListUpcomingChargesRequest$1, ListUpcomingChargesResponse as ListUpcomingChargesResponse$1, PreviewSubscriptionChargesRequest as PreviewSubscriptionChargesRequest$1, PreviewSubscriptionChargesResponse as PreviewSubscriptionChargesResponse$1, PreviewSubscriptionsChargesRequest as PreviewSubscriptionsChargesRequest$1, PreviewSubscriptionsChargesResponse as PreviewSubscriptionsChargesResponse$1, ListSubscriptionHistoryRequest as ListSubscriptionHistoryRequest$1, ListSubscriptionHistoryResponse as ListSubscriptionHistoryResponse$1 } from './index.typings.js';
1
+ import { GetSubscriptionRequest as GetSubscriptionRequest$1, GetSubscriptionResponse as GetSubscriptionResponse$1, CustomerCancelSubscriptionRequest as CustomerCancelSubscriptionRequest$1, CustomerCancelSubscriptionResponse as CustomerCancelSubscriptionResponse$1, CustomerTurnOnAutoRenewalRequest as CustomerTurnOnAutoRenewalRequest$1, CustomerTurnOnAutoRenewalResponse as CustomerTurnOnAutoRenewalResponse$1, CustomerTurnOffAutoRenewalRequest as CustomerTurnOffAutoRenewalRequest$1, CustomerTurnOffAutoRenewalResponse as CustomerTurnOffAutoRenewalResponse$1, CustomerExtendSubscriptionRequest as CustomerExtendSubscriptionRequest$1, CustomerExtendSubscriptionResponse as CustomerExtendSubscriptionResponse$1, QuerySubscriptionsRequest as QuerySubscriptionsRequest$1, QuerySubscriptionsResponse as QuerySubscriptionsResponse$1, UpdateSubscriptionPaymentMethodRequest as UpdateSubscriptionPaymentMethodRequest$1, UpdateSubscriptionPaymentMethodResponse as UpdateSubscriptionPaymentMethodResponse$1, CustomerAllowedActionsRequest as CustomerAllowedActionsRequest$1, CustomerAllowedActionsResponse as CustomerAllowedActionsResponse$1, CustomerListUpcomingChargesRequest as CustomerListUpcomingChargesRequest$1, CustomerListUpcomingChargesResponse as CustomerListUpcomingChargesResponse$1, InitiatePaymentMethodSetupRequest as InitiatePaymentMethodSetupRequest$1, InitiatePaymentMethodSetupResponse as InitiatePaymentMethodSetupResponse$1, CustomerSkipCycleRequest as CustomerSkipCycleRequest$1, CustomerSkipCycleResponse as CustomerSkipCycleResponse$1, CustomerCancelScheduledSkipRequest as CustomerCancelScheduledSkipRequest$1, CustomerCancelScheduledSkipResponse as CustomerCancelScheduledSkipResponse$1, CustomerPauseSubscriptionRequest as CustomerPauseSubscriptionRequest$1, CustomerPauseSubscriptionResponse as CustomerPauseSubscriptionResponse$1, CustomerResumeSubscriptionRequest as CustomerResumeSubscriptionRequest$1, CustomerResumeSubscriptionResponse as CustomerResumeSubscriptionResponse$1, CustomerCancelScheduledPauseRequest as CustomerCancelScheduledPauseRequest$1, CustomerCancelScheduledPauseResponse as CustomerCancelScheduledPauseResponse$1, CustomerUpdateBillingDateRequest as CustomerUpdateBillingDateRequest$1, CustomerUpdateBillingDateResponse as CustomerUpdateBillingDateResponse$1, CustomerChangeSubscriptionRequest as CustomerChangeSubscriptionRequest$1, CustomerChangeSubscriptionResponse as CustomerChangeSubscriptionResponse$1, CustomerPreviewChangeSubscriptionRequest as CustomerPreviewChangeSubscriptionRequest$1, CustomerPreviewChangeSubscriptionResponse as CustomerPreviewChangeSubscriptionResponse$1, CustomerCancelPendingChangeRequest as CustomerCancelPendingChangeRequest$1, CustomerCancelPendingChangeResponse as CustomerCancelPendingChangeResponse$1, UpdateSubscriptionBillingDateRequest as UpdateSubscriptionBillingDateRequest$1, UpdateSubscriptionBillingDateResponse as UpdateSubscriptionBillingDateResponse$1, ReviseSubscriptionRequest as ReviseSubscriptionRequest$1, ReviseSubscriptionResponse as ReviseSubscriptionResponse$1, CancelSubscriptionRequest as CancelSubscriptionRequest$1, CancelSubscriptionResponse as CancelSubscriptionResponse$1, PauseSubscriptionRequest as PauseSubscriptionRequest$1, PauseSubscriptionResponse as PauseSubscriptionResponse$1, ResumeSubscriptionRequest as ResumeSubscriptionRequest$1, ResumeSubscriptionResponse as ResumeSubscriptionResponse$1, SearchSubscriptionsRequest as SearchSubscriptionsRequest$1, SearchSubscriptionsResponse as SearchSubscriptionsResponse$1, CountSubscriptionsRequest as CountSubscriptionsRequest$1, CountSubscriptionsResponse as CountSubscriptionsResponse$1, TurnOnSubscriptionAutoRenewalRequest as TurnOnSubscriptionAutoRenewalRequest$1, TurnOnSubscriptionAutoRenewalResponse as TurnOnSubscriptionAutoRenewalResponse$1, TurnOffSubscriptionAutoRenewalRequest as TurnOffSubscriptionAutoRenewalRequest$1, TurnOffSubscriptionAutoRenewalResponse as TurnOffSubscriptionAutoRenewalResponse$1, MarkLatestInvoiceAsPaidRequest as MarkLatestInvoiceAsPaidRequest$1, MarkLatestInvoiceAsPaidResponse as MarkLatestInvoiceAsPaidResponse$1, MarkBillingCycleAsPaidRequest as MarkBillingCycleAsPaidRequest$1, MarkBillingCycleAsPaidResponse as MarkBillingCycleAsPaidResponse$1, GetSubscriptionsStatsRequest as GetSubscriptionsStatsRequest$1, GetSubscriptionsStatsResponse as GetSubscriptionsStatsResponse$1, ExtendSubscriptionRequest as ExtendSubscriptionRequest$1, ExtendSubscriptionResponse as ExtendSubscriptionResponse$1, AllowedActionsRequest as AllowedActionsRequest$1, AllowedActionsResponse as AllowedActionsResponse$1, ListUpcomingChargesRequest as ListUpcomingChargesRequest$1, ListUpcomingChargesResponse as ListUpcomingChargesResponse$1, PreviewSubscriptionChargesRequest as PreviewSubscriptionChargesRequest$1, PreviewSubscriptionChargesResponse as PreviewSubscriptionChargesResponse$1, PreviewSubscriptionsChargesRequest as PreviewSubscriptionsChargesRequest$1, PreviewSubscriptionsChargesResponse as PreviewSubscriptionsChargesResponse$1, ListSubscriptionHistoryRequest as ListSubscriptionHistoryRequest$1, ListSubscriptionHistoryResponse as ListSubscriptionHistoryResponse$1 } from './index.typings.js';
2
2
  import '@wix/sdk-types';
3
3
 
4
4
  interface Subscription {
@@ -80,6 +80,12 @@ interface Subscription {
80
80
  * @readonly
81
81
  */
82
82
  pendingUpdateData?: SubscriptionUpdateData;
83
+ /**
84
+ * Indicator whether subscription is managed by BASS or external system, like SAPI, for example.
85
+ * @internal
86
+ * @readonly
87
+ */
88
+ bassManaged?: boolean;
83
89
  /**
84
90
  * Key / Value store to keep up to 10 additional values related to the subscription.
85
91
  * Key max length = 50, Value max length = 200. Value can not be empty.
@@ -109,6 +115,12 @@ interface Subscription {
109
115
  * @format GUID
110
116
  */
111
117
  businessLocationId?: string | null;
118
+ /**
119
+ * Indicates BASS needs an operator choice for billing start when resuming this subscription.
120
+ * @internal
121
+ * @readonly
122
+ */
123
+ requiresResumeBillingStartChoice?: boolean;
112
124
  /**
113
125
  * items, minSize is 1, maxSize is 100
114
126
  * @maxSize 100
@@ -247,6 +259,15 @@ interface BillingSettings {
247
259
  * Only set when the collection_method is EXTERNAL.
248
260
  */
249
261
  externalCollectionDetails?: ExternalCollectionDetails;
262
+ /**
263
+ * Day of month (1-28) on which the first recurring billing date is anchored.
264
+ * Applies to monthly subscriptions only. Subsequent billing dates may shift
265
+ * if the subscription is modified (e.g. payment date update, pause/resume).
266
+ * @internal
267
+ * @min 1
268
+ * @max 28
269
+ */
270
+ billingAnchorDay?: number | null;
250
271
  }
251
272
  interface PaymentMethod {
252
273
  /**
@@ -593,6 +614,11 @@ interface BillingStatus {
593
614
  latestPaymentData?: PaymentData;
594
615
  /** Free trial data */
595
616
  freeTrialData?: FreeTrialData;
617
+ /**
618
+ * Update billing date operation data
619
+ * @internal
620
+ */
621
+ updateBillingDateData?: UpdateBillingDateData;
596
622
  /**
597
623
  * Grace period information during grace period after payment failure
598
624
  * @readonly
@@ -652,6 +678,13 @@ interface Totals {
652
678
  * @readonly
653
679
  */
654
680
  tax?: string | null;
681
+ /**
682
+ * Tax-exempt amount.
683
+ * @format DECIMAL_VALUE
684
+ * @decimalValue options { gte:0.00, maxScale:2 }
685
+ * @readonly
686
+ */
687
+ exempt?: string | null;
655
688
  /**
656
689
  * Total discount.
657
690
  * @format DECIMAL_VALUE
@@ -854,11 +887,16 @@ interface SubscriptionPolicies {
854
887
  /** Subscription can be canceled not only immediately, but also at end of billing cycle by turning off auto-renew */
855
888
  allowEndOfCycleCancellation?: boolean;
856
889
  /**
857
- * Per-subscription customer action settings. Controls which self-service actions
858
- * customers can perform on this specific subscription.
859
- * If not provided on creation, copied from site-level BillingSettings.
890
+ * Deprecated. Never in production. BASS does not read or write this field; UoU gates use
891
+ * `CustomerSettingsResolver` BBS `customer_settings_by_app_def_id` or Legacy booleans above.
892
+ * @deprecated
860
893
  */
861
894
  customerActionSettings?: CustomerActionSettings;
895
+ /**
896
+ * Number of self-service actions already used on this subscription.
897
+ * @readonly
898
+ */
899
+ customerActionCounters?: CustomerActionCounters;
862
900
  }
863
901
  /**
864
902
  * Per-action merchant configuration for customer self-service actions.
@@ -975,6 +1013,18 @@ interface UpdateBillingDateActionConfiguration {
975
1013
  /** Whether to allow advancing billing date for weekly subscriptions */
976
1014
  allowAdvanceForWeekly?: boolean | null;
977
1015
  }
1016
+ interface CustomerActionCounters {
1017
+ /**
1018
+ * Number of self-service skips already used. Unset means zero.
1019
+ * @readonly
1020
+ */
1021
+ skipCount?: number | null;
1022
+ /**
1023
+ * Number of self-service pauses already used. Unset means zero.
1024
+ * @readonly
1025
+ */
1026
+ pauseCount?: number | null;
1027
+ }
978
1028
  interface PauseInfo {
979
1029
  pausePolicy?: PausePolicyWithLiterals;
980
1030
  pauseAt?: PauseAtWithLiterals;
@@ -1345,6 +1395,25 @@ interface Sorting {
1345
1395
  fieldName?: string;
1346
1396
  /** Sort order. */
1347
1397
  order?: SortOrderWithLiterals;
1398
+ /**
1399
+ * When `field_name` is a property of repeated field that is marked as `MATCH_ITEMS` and sort should be done by
1400
+ * a specific element from a collection, filter can/should be provided to ensure correct sort value is picked.
1401
+ *
1402
+ * If multiple filters are provided, they are combined with AND operator.
1403
+ *
1404
+ * Example:
1405
+ * Given we have document like {"id": "1", "nestedField": [{"price": 10, "region": "EU"}, {"price": 20, "region": "US"}]}
1406
+ * and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be
1407
+ * { fieldName: "nestedField.price", "select_items_by": [{"nestedField.region": "US"}] }
1408
+ * @internal
1409
+ * @maxSize 10
1410
+ */
1411
+ selectItemsBy?: Record<string, any>[] | null;
1412
+ /**
1413
+ * Origin point for geo-distance sorting on a GEO field
1414
+ * results are ordered by distance from this point (ASC = nearest first, DESC = farthest first).
1415
+ */
1416
+ origin?: AddressLocation;
1348
1417
  }
1349
1418
  declare enum SortOrder {
1350
1419
  ASC = "ASC",
@@ -1352,6 +1421,12 @@ declare enum SortOrder {
1352
1421
  }
1353
1422
  /** @enumType */
1354
1423
  type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
1424
+ interface AddressLocation {
1425
+ /** Address latitude. */
1426
+ latitude?: number | null;
1427
+ /** Address longitude. */
1428
+ longitude?: number | null;
1429
+ }
1355
1430
  interface Paging {
1356
1431
  /** Number of items to load. */
1357
1432
  limit?: number | null;
@@ -1388,6 +1463,13 @@ interface PagingMetadataV2 {
1388
1463
  tooManyToCount?: boolean | null;
1389
1464
  /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
1390
1465
  cursors?: Cursors;
1466
+ /**
1467
+ * Indicates if there are more results after the current page.
1468
+ * If `true`, another page of results can be retrieved.
1469
+ * If `false`, this is the last page.
1470
+ * @internal
1471
+ */
1472
+ hasNext?: boolean | null;
1391
1473
  }
1392
1474
  interface Cursors {
1393
1475
  /**
@@ -1451,6 +1533,8 @@ interface SubscriptionStatus {
1451
1533
  statuses?: SubscriptionStatusEnumSubscriptionStatusWithLiterals[];
1452
1534
  }
1453
1535
  declare enum SubscriptionStatusGroup {
1536
+ /** @internal */
1537
+ UNKNOWN_STATUS_GROUP = "UNKNOWN_STATUS_GROUP",
1454
1538
  ALL = "ALL",
1455
1539
  /** Union of ACTIVE, PAUSED and PENDING */
1456
1540
  LIVE = "LIVE"
@@ -1516,10 +1600,11 @@ declare enum ActionType {
1516
1600
  UPDATE_BILLING_DATE = "UPDATE_BILLING_DATE",
1517
1601
  UPDATE_COLLECTION_METHOD = "UPDATE_COLLECTION_METHOD",
1518
1602
  SKIP_CYCLE = "SKIP_CYCLE",
1519
- CUSTOMER_UPDATE_BILLING_DATE = "CUSTOMER_UPDATE_BILLING_DATE"
1603
+ CUSTOMER_UPDATE_BILLING_DATE = "CUSTOMER_UPDATE_BILLING_DATE",
1604
+ CHANGE_SUBSCRIPTION = "CHANGE_SUBSCRIPTION"
1520
1605
  }
1521
1606
  /** @enumType */
1522
- type ActionTypeWithLiterals = ActionType | 'NONE' | 'CREATION' | 'CANCEL' | 'CYCLE_AUTO_RENEW_ON' | 'CYCLE_AUTO_RENEW_OFF' | 'PAUSE' | 'RESUME' | 'MARK_AS_PAID' | 'EXTEND' | 'UPDATE' | 'UPDATE_START_DATE' | 'UPM' | 'UPDATE_BILLING_DATE' | 'UPDATE_COLLECTION_METHOD' | 'SKIP_CYCLE' | 'CUSTOMER_UPDATE_BILLING_DATE';
1607
+ type ActionTypeWithLiterals = ActionType | 'NONE' | 'CREATION' | 'CANCEL' | 'CYCLE_AUTO_RENEW_ON' | 'CYCLE_AUTO_RENEW_OFF' | 'PAUSE' | 'RESUME' | 'MARK_AS_PAID' | 'EXTEND' | 'UPDATE' | 'UPDATE_START_DATE' | 'UPM' | 'UPDATE_BILLING_DATE' | 'UPDATE_COLLECTION_METHOD' | 'SKIP_CYCLE' | 'CUSTOMER_UPDATE_BILLING_DATE' | 'CHANGE_SUBSCRIPTION';
1523
1608
  declare enum ExtendPolicyType {
1524
1609
  PERIOD = "PERIOD",
1525
1610
  BILLING_CYCLE = "BILLING_CYCLE"
@@ -1853,6 +1938,12 @@ interface LineItemTaxSummary {
1853
1938
  * @decimalValue options { maxScale:4 }
1854
1939
  */
1855
1940
  finalTaxAmount?: string | null;
1941
+ /**
1942
+ * Tax amount the merchant is NOT collecting because the customer is responsible for paying the authority directly (reverse charge / exempt). Optional; absence is treated as zero.
1943
+ * @format DECIMAL_VALUE
1944
+ * @decimalValue options { maxScale:4 }
1945
+ */
1946
+ exemptAmount?: string | null;
1856
1947
  }
1857
1948
  interface FixedPriceConfig {
1858
1949
  }
@@ -2061,6 +2152,182 @@ interface CustomerUpdateBillingDateRequest {
2061
2152
  interface CustomerUpdateBillingDateResponse {
2062
2153
  subscription?: Subscription;
2063
2154
  }
2155
+ interface CustomerChangeSubscriptionRequest {
2156
+ /** @format GUID */
2157
+ subscriptionId: string;
2158
+ /** @maxSize 100 */
2159
+ itemChanges?: SubscriptionItemChange[];
2160
+ newCycle?: Duration;
2161
+ effectiveTime?: ChangeEffectiveTimeWithLiterals;
2162
+ }
2163
+ /**
2164
+ * Describes a change to a single subscription item.
2165
+ * The caller (BG/CVS) resolves pricing from their catalog and passes concrete values.
2166
+ */
2167
+ interface SubscriptionItemChange {
2168
+ /**
2169
+ * Which item to change. Must match an existing item ID in the subscription.
2170
+ * @format GUID
2171
+ */
2172
+ itemId?: string;
2173
+ /**
2174
+ * New price per unit. Caller resolves this from their product catalog.
2175
+ * Required when changing product/plan. Optional for quantity-only changes (uses current price).
2176
+ * @decimalValue options { gte:0.00, maxScale:2 }
2177
+ */
2178
+ newPrice?: string | null;
2179
+ /**
2180
+ * New quantity (seats/licenses). Optional — unchanged if not set.
2181
+ * @min 1
2182
+ */
2183
+ newQuantity?: number | null;
2184
+ /**
2185
+ * New catalog reference. Optional — set when changing to a different product.
2186
+ * This is metadata for the caller's tracking; BASS does not use it for pricing.
2187
+ */
2188
+ newCatalogReference?: CatalogReference;
2189
+ /**
2190
+ * New item name. Optional — set when changing to a different product.
2191
+ * @maxLength 200
2192
+ */
2193
+ newName?: string | null;
2194
+ }
2195
+ declare enum ChangeEffectiveTime {
2196
+ UNKNOWN = "UNKNOWN",
2197
+ /** Apply change immediately with proration */
2198
+ IMMEDIATELY = "IMMEDIATELY",
2199
+ /** Schedule change for the next billing cycle */
2200
+ AT_NEXT_RENEWAL = "AT_NEXT_RENEWAL"
2201
+ }
2202
+ /** @enumType */
2203
+ type ChangeEffectiveTimeWithLiterals = ChangeEffectiveTime | 'UNKNOWN' | 'IMMEDIATELY' | 'AT_NEXT_RENEWAL';
2204
+ interface CustomerChangeSubscriptionResponse {
2205
+ subscription?: Subscription;
2206
+ }
2207
+ interface CustomerPreviewChangeSubscriptionRequest {
2208
+ /** @format GUID */
2209
+ subscriptionId: string;
2210
+ /** @maxSize 100 */
2211
+ itemChanges?: SubscriptionItemChange[];
2212
+ newCycle?: Duration;
2213
+ effectiveTime?: ChangeEffectiveTimeWithLiterals;
2214
+ }
2215
+ interface CustomerPreviewChangeSubscriptionResponse {
2216
+ preview?: PreviewChangeSubscriptionResponse;
2217
+ }
2218
+ interface PreviewChangeSubscriptionResponse {
2219
+ /** Summary of the current subscription state */
2220
+ current?: SubscriptionChangeSummary;
2221
+ /** Summary of the proposed subscription state after the change */
2222
+ proposed?: SubscriptionChangeSummary;
2223
+ /** Proration preview details. Present only for immediate changes. */
2224
+ proration?: ProrationPreview;
2225
+ /** Renewal preview. Present only for changes at next renewal. */
2226
+ renewalPreview?: RenewalPreview;
2227
+ }
2228
+ /** Summary of a subscription's state, used in change previews. */
2229
+ interface SubscriptionChangeSummary {
2230
+ /** Product ID */
2231
+ productId?: string;
2232
+ /** Product name */
2233
+ productName?: string;
2234
+ /** Billing cycle duration */
2235
+ cycle?: Duration;
2236
+ /** Number of units */
2237
+ quantity?: number;
2238
+ /**
2239
+ * Price per unit
2240
+ * @format DECIMAL_VALUE
2241
+ */
2242
+ pricePerUnit?: string;
2243
+ /**
2244
+ * Total price (price_per_unit * quantity)
2245
+ * @format DECIMAL_VALUE
2246
+ */
2247
+ totalPrice?: string;
2248
+ /**
2249
+ * Currency code (ISO 4217)
2250
+ * @format CURRENCY
2251
+ */
2252
+ currency?: string;
2253
+ /** Current billing period start */
2254
+ periodStart?: Date | null;
2255
+ /** Current billing period end */
2256
+ periodEnd?: Date | null;
2257
+ }
2258
+ /** Preview of proration amounts for a proposed subscription change. */
2259
+ interface ProrationPreview {
2260
+ /**
2261
+ * Credit amount for unused time on the current plan
2262
+ * @format DECIMAL_VALUE
2263
+ */
2264
+ creditAmount?: string;
2265
+ /**
2266
+ * Charge amount for the new plan's prorated price
2267
+ * @format DECIMAL_VALUE
2268
+ */
2269
+ chargeAmount?: string;
2270
+ /**
2271
+ * Net amount (charge minus credit)
2272
+ * @format DECIMAL_VALUE
2273
+ */
2274
+ netAmount?: string;
2275
+ /**
2276
+ * Tax amount on the net proration
2277
+ * @format DECIMAL_VALUE
2278
+ */
2279
+ taxAmount?: string;
2280
+ /**
2281
+ * Total amount including tax
2282
+ * @format DECIMAL_VALUE
2283
+ */
2284
+ totalAmount?: string;
2285
+ /** Remaining seconds in the current billing period */
2286
+ remainingSeconds?: string;
2287
+ /** Total seconds in the current billing cycle */
2288
+ totalCycleSeconds?: string;
2289
+ /** New period end date. Present when proration_behavior is PRORATE_AND_EXTEND. */
2290
+ newPeriodEnd?: Date | null;
2291
+ /** Number of days added to the billing period. Present when proration_behavior is PRORATE_AND_EXTEND. */
2292
+ daysAdded?: number;
2293
+ /** The proration action that would be taken */
2294
+ action?: ProrationActionWithLiterals;
2295
+ }
2296
+ declare enum ProrationAction {
2297
+ UNKNOWN = "UNKNOWN",
2298
+ /** Net charge to customer */
2299
+ CHARGE = "CHARGE",
2300
+ /** Net refund to customer */
2301
+ REFUND = "REFUND",
2302
+ /** Extend billing period instead of refund */
2303
+ EXTEND_PERIOD = "EXTEND_PERIOD",
2304
+ /** No financial change needed */
2305
+ NO_CHANGE = "NO_CHANGE"
2306
+ }
2307
+ /** @enumType */
2308
+ type ProrationActionWithLiterals = ProrationAction | 'UNKNOWN' | 'CHARGE' | 'REFUND' | 'EXTEND_PERIOD' | 'NO_CHANGE';
2309
+ /** Preview of what the next renewal will look like after a change. */
2310
+ interface RenewalPreview {
2311
+ /**
2312
+ * New price per unit at next renewal
2313
+ * @format DECIMAL_VALUE
2314
+ */
2315
+ newPrice?: string;
2316
+ /**
2317
+ * New total at next renewal (price * quantity)
2318
+ * @format DECIMAL_VALUE
2319
+ */
2320
+ newTotal?: string;
2321
+ /** Date of the next renewal */
2322
+ nextRenewalDate?: Date | null;
2323
+ }
2324
+ interface CustomerCancelPendingChangeRequest {
2325
+ /** @format GUID */
2326
+ subscriptionId: string;
2327
+ }
2328
+ interface CustomerCancelPendingChangeResponse {
2329
+ subscription?: Subscription;
2330
+ }
2064
2331
  interface DomainEvent extends DomainEventBodyOneOf {
2065
2332
  createdEvent?: EntityCreatedEvent;
2066
2333
  updatedEvent?: EntityUpdatedEvent;
@@ -2090,7 +2357,7 @@ interface DomainEvent extends DomainEventBodyOneOf {
2090
2357
  /** If present, indicates the action that triggered the event. */
2091
2358
  originatedFrom?: string | null;
2092
2359
  /**
2093
- * 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.
2360
+ * 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.
2094
2361
  * 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.
2095
2362
  */
2096
2363
  entityEventSequence?: string | null;
@@ -2104,8 +2371,18 @@ interface DomainEventBodyOneOf {
2104
2371
  }
2105
2372
  interface EntityCreatedEvent {
2106
2373
  entityAsJson?: string;
2374
+ /**
2375
+ * Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity
2376
+ * @internal
2377
+ */
2378
+ triggeredByUndelete?: boolean | null;
2107
2379
  /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
2108
2380
  restoreInfo?: RestoreInfo;
2381
+ /**
2382
+ * Optional domain-specific metadata defined by the API owner, encoded as JSON.
2383
+ * @internal
2384
+ */
2385
+ additionalMetadataAsJson?: string | null;
2109
2386
  }
2110
2387
  interface RestoreInfo {
2111
2388
  deletedDate?: Date | null;
@@ -2117,10 +2394,42 @@ interface EntityUpdatedEvent {
2117
2394
  * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
2118
2395
  */
2119
2396
  currentEntityAsJson?: string;
2397
+ /**
2398
+ * This field is currently part of the of the EntityUpdatedEvent msg, but scala/node libraries which implements the domain events standard
2399
+ * wont populate it / have any reference to it in the API.
2400
+ * The main reason for it is that fetching the old entity from the DB will have a performance hit on an update operation so unless truly needed,
2401
+ * the developer should send only the new (current) entity.
2402
+ * An additional reason is not wanting to send this additional entity over the wire (kafka) since in some cases it can be really big
2403
+ * Developers that must reflect the old entity will have to implement their own domain event sender mechanism which will follow the DomainEvent proto message.
2404
+ * @internal
2405
+ * @deprecated
2406
+ */
2407
+ previousEntityAsJson?: string | null;
2408
+ /**
2409
+ * Map of fully qualified field paths to their previous values for fields that changed.
2410
+ * For more details please see [AIP](https://dev.wix.com/docs/rnd-general/articles/p13n-guidelines-aips/guidance-aips/design-patterns/7016-events#modified-fields-format)
2411
+ * @internal
2412
+ */
2413
+ modifiedFields?: Record<string, any>;
2414
+ /**
2415
+ * Optional domain-specific metadata defined by the API owner, encoded as JSON.
2416
+ * @internal
2417
+ */
2418
+ additionalMetadataAsJson?: string | null;
2120
2419
  }
2121
2420
  interface EntityDeletedEvent {
2421
+ /**
2422
+ * Indicates if the entity is sent to trash-bin. only available when trash-bin is enabled
2423
+ * @internal
2424
+ */
2425
+ movedToTrash?: boolean | null;
2122
2426
  /** Entity that was deleted. */
2123
2427
  deletedEntityAsJson?: string | null;
2428
+ /**
2429
+ * Optional domain-specific metadata defined by the API owner, encoded as JSON.
2430
+ * @internal
2431
+ */
2432
+ additionalMetadataAsJson?: string | null;
2124
2433
  }
2125
2434
  interface ActionEvent {
2126
2435
  bodyAsJson?: string;
@@ -2216,2173 +2525,2181 @@ interface AccountInfo {
2216
2525
  */
2217
2526
  siteId?: string | null;
2218
2527
  }
2219
- interface CreateSubscriptionInStateRequest extends CreateSubscriptionInStateRequestModeOneOf {
2220
- activeSubscription?: CreateSubscriptionRequest;
2221
- }
2222
- /** @oneof */
2223
- interface CreateSubscriptionInStateRequestModeOneOf {
2224
- activeSubscription?: CreateSubscriptionRequest;
2225
- }
2226
- interface CreateSubscriptionRequest {
2227
- subscription?: Subscription;
2228
- /** Optional settings for the payments. Should be empty for free subscriptions. */
2229
- paymentSettings?: PaymentSettings;
2230
- /**
2231
- * Optional unique identifier for this request in order to prevent subscription duplications
2232
- * @format GUID
2233
- */
2234
- idempotencyKey?: string | null;
2235
- /** Optional origin override for setting identity of subscription creator instead of extracting from context */
2236
- originOverride?: OriginOverride;
2237
- }
2238
- interface OriginOverride {
2239
- /** @format GUID */
2240
- appId?: string;
2528
+ interface SetIsMigratedEvent {
2241
2529
  /** @format GUID */
2242
- instanceId?: string;
2530
+ subscriptionId?: string;
2243
2531
  }
2244
- interface CreateSubscriptionInStateResponse {
2532
+ interface SubscriptionDelayedSyncEvent {
2245
2533
  /** @format GUID */
2246
2534
  subscriptionId?: string;
2247
2535
  }
2248
- interface PayCycleRequest {
2249
- /** @format GUID */
2250
- subscriptionId: string;
2251
- paymentTestMode?: PaymentTestModeWithLiterals;
2252
- /** @format GUID */
2253
- tenantId: string;
2536
+ interface InvoiceAction extends InvoiceActionActionTypeOneOf {
2537
+ payRecurring?: PayRecurringInvoice;
2254
2538
  }
2255
- declare enum PaymentTestMode {
2256
- REGULAR = "REGULAR",
2257
- FAIL_TECHNICAL = "FAIL_TECHNICAL",
2258
- FAIL_DECLINE = "FAIL_DECLINE",
2259
- FAIL_RETRYABLE_DECLINE = "FAIL_RETRYABLE_DECLINE"
2539
+ /** @oneof */
2540
+ interface InvoiceActionActionTypeOneOf {
2541
+ payRecurring?: PayRecurringInvoice;
2260
2542
  }
2261
- /** @enumType */
2262
- type PaymentTestModeWithLiterals = PaymentTestMode | 'REGULAR' | 'FAIL_TECHNICAL' | 'FAIL_DECLINE' | 'FAIL_RETRYABLE_DECLINE';
2263
- interface PayCycleResponse {
2543
+ interface PayRecurringInvoice {
2264
2544
  /** @format GUID */
2265
2545
  invoiceId?: string;
2266
- /** @format GUID */
2267
- paymentOrderId?: string | null;
2268
- subscription?: Subscription;
2269
- }
2270
- interface GetFullSubscriptionDataRequest {
2271
- /** @format GUID */
2272
- id?: string;
2273
2546
  }
2274
- interface GetFullSubscriptionDataResponse {
2547
+ /**
2548
+ * Sent each time a subscription status has been set to Active
2549
+ * Active shows that a subscription is live and operational.
2550
+ * For example:
2551
+ * * For subscription with free trial, free trial start date is also the activation date.
2552
+ * * For a subscription with future start date, the start date is also the activation date.
2553
+ * * When a subscription is resumed from a pause status, the resume date is also the activation date.
2554
+ */
2555
+ interface SubscriptionActivated {
2275
2556
  subscription?: Subscription;
2276
- internalSubscriptionData?: InternalSubscriptionData;
2277
- }
2278
- interface InternalSubscriptionData {
2279
- /** @format GUID */
2280
- originInstanceId?: string;
2281
- source?: string | null;
2282
- billingType?: string;
2283
- isOneTime?: boolean;
2284
- migrationDetails?: MigrationDetails;
2285
- pausePaidDuration?: string | null;
2286
- authorizationPaymentData?: PaymentData;
2287
- currentCyclePausePeriods?: PausePeriod[];
2288
- }
2289
- interface MigrationDetails {
2290
- /** system (application) where the Subscription has been created */
2291
- originSystem?: string;
2292
- /** date when the Subscription started to be managed in BASS */
2293
- shiftManagementDate?: Date | null;
2294
- }
2295
- interface PausePeriod {
2296
- startDate?: Date | null;
2297
- endDate?: Date | null;
2298
- }
2299
- interface GetSubscriptionAndInternalDataRequest {
2300
- /** @format GUID */
2301
- subscriptionId?: string;
2302
- /** @format GUID */
2303
- tenantId?: string;
2304
2557
  }
2305
- interface GetSubscriptionAndInternalDataResponse {
2558
+ /**
2559
+ * Sent each time a subscription status has been set to Ended
2560
+ * Ended shows that a subscription reached its end date and ended its life cycle as a result of the agreement.
2561
+ * This is different from a Canceled subscription which ends the subscription before a designated end date.
2562
+ * Therefore, Ended and Canceled are mutually exclusive.
2563
+ */
2564
+ interface SubscriptionEnded {
2306
2565
  subscription?: Subscription;
2307
- internalSubscriptionData?: InternalSubscriptionData;
2308
2566
  }
2309
- interface SearchSubscriptionRequest {
2310
- /** @format GUID */
2311
- id?: string;
2567
+ interface SubscriptionInitialPurchaseCompleted {
2568
+ subscription?: Subscription;
2569
+ actionDetails?: ActionDetails;
2312
2570
  /** @format GUID */
2313
- tenantId?: string;
2571
+ paymentTransactionId?: string | null;
2314
2572
  }
2315
- interface SearchSubscriptionResponse {
2573
+ interface SubscriptionCycleReadyToPay {
2316
2574
  subscription?: Subscription;
2317
2575
  }
2318
- interface UpdatePausePaidDurationRequest {
2319
- /** @format GUID */
2320
- subscriptionId?: string;
2576
+ interface SubscriptionBillingCycleStarted {
2577
+ subscription?: Subscription;
2321
2578
  /**
2322
- * @min 1
2323
- * @max 10000000
2579
+ * Wix Pay transaction id, optional. Exists if event was triggered by a payment.
2580
+ * @format GUID
2324
2581
  */
2325
- pausePaidDurationSeconds?: string;
2326
- /** @format GUID */
2327
- tenantId?: string;
2328
- }
2329
- interface UpdatePausePaidDurationResponse {
2330
- }
2331
- interface UpdateStatusRequest {
2332
- /** @format GUID */
2333
- subscriptionId?: string;
2334
- /** @format GUID */
2335
- tenantId?: string;
2336
- status?: SubscriptionStatusEnumSubscriptionStatusWithLiterals;
2582
+ paymentTransactionId?: string | null;
2337
2583
  }
2338
- interface UpdateStatusResponse {
2584
+ interface SubscriptionRevived {
2339
2585
  subscription?: Subscription;
2340
2586
  }
2341
- interface UpdatePaymentStatusRequest {
2342
- /** @format GUID */
2343
- subscriptionId?: string;
2344
- /** @format GUID */
2345
- tenantId?: string;
2346
- paymentStatus?: PaymentStatusWithLiterals;
2347
- }
2348
- interface UpdatePaymentStatusResponse {
2587
+ interface CreateSubscriptionRequest {
2349
2588
  subscription?: Subscription;
2589
+ /** Optional settings for the payments. Should be empty for free subscriptions. */
2590
+ paymentSettings?: PaymentSettings;
2591
+ /**
2592
+ * Optional unique identifier for this request in order to prevent subscription duplications
2593
+ * @format GUID
2594
+ */
2595
+ idempotencyKey?: string | null;
2596
+ /** Optional origin override for setting identity of subscription creator instead of extracting from context */
2597
+ originOverride?: OriginOverride;
2350
2598
  }
2351
- interface RemoveCancellationInfoRequest {
2599
+ interface OriginOverride {
2352
2600
  /** @format GUID */
2353
- subscriptionId?: string;
2601
+ appId?: string;
2354
2602
  /** @format GUID */
2355
- tenantId?: string;
2603
+ instanceId?: string;
2356
2604
  }
2357
- interface RemoveCancellationInfoResponse {
2605
+ interface CreateSubscriptionResponse {
2358
2606
  subscription?: Subscription;
2607
+ /**
2608
+ * Payments order that should be paid (or authorize card) in order to activate subscription. Empty for free subscriptions.
2609
+ * @format GUID
2610
+ */
2611
+ paymentOrderId?: string | null;
2359
2612
  }
2360
- interface RemovePauseInfoRequest {
2361
- /** @format GUID */
2362
- subscriptionId?: string;
2363
- /** @format GUID */
2364
- tenantId?: string;
2365
- }
2366
- interface RemovePauseInfoResponse {
2613
+ interface UpdateSubscriptionRequest {
2614
+ /** Revision is validated if Subscription.revision is set */
2367
2615
  subscription?: Subscription;
2616
+ /** Supported fields: customer, metadata */
2617
+ fieldMask?: string[];
2368
2618
  }
2369
- interface ReviveSubscriptionRequest {
2370
- /** @format GUID */
2371
- tenantId?: string;
2372
- /** @format GUID */
2373
- subscriptionId?: string;
2374
- revivePolicy?: RevivePolicyWithLiterals;
2375
- isTestRun?: boolean;
2619
+ interface UpdateSubscriptionResponse {
2620
+ subscription?: Subscription;
2376
2621
  }
2377
- declare enum RevivePolicy {
2378
- SIMPLE = "SIMPLE",
2379
- RESUME = "RESUME"
2622
+ interface UpdateSubscriptionStartDateRequest {
2623
+ /**
2624
+ * Subscription ID
2625
+ * @format GUID
2626
+ */
2627
+ id?: string;
2628
+ /**
2629
+ * Can be updated only if Subscription is in Draft state
2630
+ * By setting start_date in the future, end_date will be recalculated for termed Subscriptions
2631
+ * cycles_to_pay_on_creation will be set to 1 if no free trial is set
2632
+ */
2633
+ startDate?: Date | null;
2380
2634
  }
2381
- /** @enumType */
2382
- type RevivePolicyWithLiterals = RevivePolicy | 'SIMPLE' | 'RESUME';
2383
- interface ReviveSubscriptionResponse {
2635
+ interface UpdateSubscriptionStartDateResponse {
2384
2636
  subscription?: Subscription;
2385
2637
  }
2386
- interface ConvertSapiRequest {
2387
- /** @format GUID */
2388
- subscriptionId?: string;
2638
+ interface BassToSapiPaypalMigrationRequest {
2639
+ /**
2640
+ * Subscription ID
2641
+ * @format GUID
2642
+ */
2643
+ id?: string;
2644
+ collectionMethod?: CollectionMethodEnumCollectionMethodWithLiterals;
2389
2645
  }
2390
- interface ConvertSapiResponse {
2646
+ interface BassToSapiPaypalMigrationResponse {
2391
2647
  subscription?: Subscription;
2392
2648
  }
2393
- interface GetSubscriptionInvoicesRequest {
2394
- /** @format GUID */
2649
+ interface UpdateSubscriptionPoliciesRequest {
2650
+ /**
2651
+ * Subscription ID
2652
+ * @format GUID
2653
+ */
2395
2654
  id?: string;
2655
+ cancellableByCustomer?: boolean | null;
2396
2656
  }
2397
- interface GetSubscriptionInvoicesResponse {
2398
- invoices?: SubscriptionInvoice[];
2657
+ interface UpdateSubscriptionPoliciesResponse {
2658
+ /** Updated policies of the subscription */
2659
+ policies?: SubscriptionPolicies;
2399
2660
  }
2400
- interface SubscriptionInvoice {
2401
- /** @format GUID */
2402
- id?: string;
2403
- subscriptionCycle?: number;
2404
- createdDate?: Date | null;
2661
+ interface UpdateSubscriptionBillingDateRequest {
2662
+ /**
2663
+ * ID of the subscription to update the billing date for.
2664
+ * @format GUID
2665
+ */
2666
+ id: string;
2667
+ /** New billing date in `YYYY-MM-DDThh:mm:ss:sssZ` format. */
2668
+ billingDate: Date | null;
2669
+ /**
2670
+ * Information about how BASS adjusts the total of the next invoice. Extending
2671
+ * the current billing cycle results in a higher payment, while shortening it
2672
+ * leads to a lower payment. BASS offers automatic calculation of the proration
2673
+ * amount based on the number of days added to or removed from the current billing
2674
+ * cycle. Alternatively, you can use your own custom method to calculate the
2675
+ * proration amount. The custom proration amount can't exceed the total of the
2676
+ * current billing cycle.
2677
+ */
2678
+ proration?: Proration;
2405
2679
  }
2406
- interface FinishFreeTrialNowRequest {
2407
- /** @format GUID */
2408
- subscriptionId?: string;
2409
- /** @format GUID */
2410
- tenantId?: string;
2680
+ interface UpdateSubscriptionBillingDateResponse {
2681
+ /** Updated subscription. */
2682
+ subscription?: Subscription;
2411
2683
  }
2412
- interface FinishFreeTrialNowResponse {
2684
+ interface SubscriptionBillingDateUpdated {
2413
2685
  subscription?: Subscription;
2686
+ billingDate?: Date | null;
2687
+ proration?: Proration;
2414
2688
  }
2415
- interface FixSubscriptionTimeCapsuleTasksRequest {
2416
- /** @format GUID */
2417
- subscriptionId?: string;
2418
- /** @format GUID */
2419
- tenantId?: string;
2689
+ interface UpdateSubscriptionOriginRequest {
2690
+ /**
2691
+ * ID of the subscription to update origin.
2692
+ * @format GUID
2693
+ */
2694
+ id?: string;
2695
+ /**
2696
+ * Origin entity ID of the subscription to update.
2697
+ * @format GUID
2698
+ */
2699
+ entityId?: string;
2420
2700
  }
2421
- interface FixSubscriptionTimeCapsuleTasksResponse {
2701
+ interface UpdateSubscriptionOriginResponse {
2702
+ /** Updated subscription. */
2703
+ subscription?: Subscription;
2422
2704
  }
2423
- interface SendTimeCapsuleTaskCanceledBIRequest {
2424
- /** @format GUID */
2425
- tenantId?: string;
2426
- /** @format GUID */
2427
- subscriptionId?: string;
2428
- /** @minLength 1 */
2429
- taskType?: string;
2430
- }
2431
- interface Empty {
2705
+ interface ReviseSubscriptionRequest {
2706
+ /**
2707
+ * Subscription ID
2708
+ * @format GUID
2709
+ */
2710
+ id: string;
2711
+ /**
2712
+ * 0 for no revision, maxSize is 100
2713
+ * @maxSize 100
2714
+ */
2715
+ items?: Item[];
2432
2716
  }
2433
- interface ScheduleTimeCapsuleTaskRequest {
2434
- /** @format GUID */
2435
- subscriptionId?: string;
2436
- /** @minLength 1 */
2437
- taskType?: string;
2438
- executionTime?: Date | null;
2439
- /** @format GUID */
2440
- tenantId?: string;
2717
+ interface ReviseSubscriptionResponse {
2718
+ subscription?: Subscription;
2441
2719
  }
2442
- interface CancelTimeCapsuleTaskRequest {
2443
- /** @format GUID */
2444
- tenantId?: string;
2445
- /** @format GUID */
2446
- subscriptionId?: string;
2447
- /** @minLength 1 */
2448
- taskType?: string;
2720
+ interface UpdateSubscriptionItemsRequest {
2721
+ /**
2722
+ * Subscription ID
2723
+ * @format GUID
2724
+ */
2725
+ id?: string;
2726
+ /** Update action. For RESET_PENDING_UPDATES, nothing but the subscription ID should be defined in the request. */
2727
+ updateAction?: UpdateActionWithLiterals;
2728
+ /** Updates execution date. Relevant only for UpdateAction.SPECIFIC_DATE. Only specific date is supported. */
2729
+ scheduleAdditionalInfo?: ScheduleAdditionalInfo;
2730
+ /**
2731
+ * Existing items to update
2732
+ * @maxSize 100
2733
+ */
2734
+ itemsToUpdate?: ItemChange[];
2735
+ /**
2736
+ * Items to add
2737
+ * @maxSize 99
2738
+ */
2739
+ itemsToAdd?: Item[];
2740
+ /**
2741
+ * Existing items to delete
2742
+ * @format GUID
2743
+ * @maxSize 99
2744
+ */
2745
+ itemsToDelete?: string[] | null;
2449
2746
  }
2450
- interface UpdateFullSubscriptionRequest {
2451
- /** @format GUID */
2452
- tenantId?: string;
2453
- subscription?: Subscription;
2747
+ declare enum UpdateAction {
2748
+ NONE = "NONE",
2749
+ /** Update subscription immediately, please note proration for updates changing price are not yet supported */
2750
+ IMMEDIATELY = "IMMEDIATELY",
2751
+ /** Request updates that will take affect only at the start of the next billing cycle. */
2752
+ NEXT_BILLING_CYCLE = "NEXT_BILLING_CYCLE",
2753
+ /** Reset all pending updates */
2754
+ RESET_PENDING_UPDATES = "RESET_PENDING_UPDATES",
2755
+ /** Request updates that will take affect only at a specific date. */
2756
+ SPECIFIC_DATE = "SPECIFIC_DATE"
2454
2757
  }
2455
- interface UpdateFullSubscriptionResponse {
2758
+ /** @enumType */
2759
+ type UpdateActionWithLiterals = UpdateAction | 'NONE' | 'IMMEDIATELY' | 'NEXT_BILLING_CYCLE' | 'RESET_PENDING_UPDATES' | 'SPECIFIC_DATE';
2760
+ interface UpdateSubscriptionItemsResponse {
2456
2761
  subscription?: Subscription;
2457
2762
  }
2458
- interface PatchSubscriptionRequest {
2763
+ interface BulkUpdateSubscriptionItemsByFilterRequest {
2459
2764
  /**
2460
- * Tenant ID (instance ID) of the subscription
2461
- * @format GUID
2765
+ * Filter to identify the subscriptions for which items are updated. For
2766
+ * supported fields see
2767
+ * [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).
2768
+ * Sending an empty subscription filter results in a validation error.
2769
+ * In case you pass `{"updateAction": "RESET_PENDING_UPDATES"}`, use only the
2770
+ * `subscriptionId` field inside this filter. Passing any other filter results
2771
+ * in a failed validation error.
2462
2772
  */
2463
- tenantId?: string;
2773
+ subscriptionFilter?: Record<string, any> | null;
2464
2774
  /**
2465
- * Subscription ID to patch
2775
+ * Filter to specify which subscription items are updated. Make sure to use
2776
+ * the catalog item ID and not the item's unique ID. All subscription items
2777
+ * with matching `items.catalogReference.catalogItemId` are updated.
2778
+ *
2779
+ * Max: `100` reference catalog item IDs
2466
2780
  * @format GUID
2781
+ * @maxSize 100
2467
2782
  */
2468
- subscriptionId?: string;
2469
- /** Partial subscription with updated values */
2470
- subscription?: Subscription;
2471
- /** Fields to update (e.g., "name", "billing_settings.collection_method") */
2472
- fieldMask?: string[];
2783
+ catalogReferenceIds?: string[] | null;
2784
+ /**
2785
+ * Information about the update timing and update type.
2786
+ *
2787
+ * + `"IMMEDIATELY"`: The updates become effective immediately.
2788
+ * + `"NEXT_BILLING_CYCLE"`: The updates are scheduled for the beginning of the next billing cycle.
2789
+ * + `"SPECIFIC_DATE"`: The updates are scheduled for the date specified in `scheduleAdditionalInfo.specificDate`.
2790
+ * + `"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.
2791
+ */
2792
+ updateAction?: UpdateActionWithLiterals;
2793
+ /**
2794
+ * Additional information for updates. Currently, only supported for
2795
+ * `{"updateAction": "SPECIFIC_DATE"}`.
2796
+ */
2797
+ scheduleAdditionalInfo?: ScheduleAdditionalInfo;
2798
+ /**
2799
+ * Update details for the susbcription items that match the filtering.
2800
+ * Currently, you can update only the item price, quantity, and tax. Note
2801
+ * that all item properties are updated to the same values. In case you want set
2802
+ * different values for individual items, you must call
2803
+ * _Bulk Update Subscription Items By Filter_ multiple times, once per unique update.
2804
+ */
2805
+ bulkItemUpdateData?: BulkItemChange;
2806
+ /**
2807
+ * __Not implemented yet__. Items to add to the subscriptions matching the filtering.
2808
+ * @maxSize 99
2809
+ */
2810
+ itemsToAdd?: Item[];
2473
2811
  }
2474
- interface PatchSubscriptionResponse {
2475
- /** The updated subscription */
2476
- subscription?: Subscription;
2812
+ interface BulkItemChange {
2813
+ /** Information about the new item price. */
2814
+ pricingModel?: PricingModel;
2815
+ /**
2816
+ * New item quantity.
2817
+ *
2818
+ * Min: `1`
2819
+ * @min 1
2820
+ */
2821
+ quantity?: number | null;
2822
+ /** Information about the new item tax. */
2823
+ tax?: Tax;
2477
2824
  }
2478
- interface UpdateSubscriptionInvoiceCycleRequest {
2479
- /** @format GUID */
2480
- subscriptionId?: string;
2481
- /** @format GUID */
2482
- tenantId?: string;
2825
+ interface BulkUpdateSubscriptionItemsByFilterResponse {
2826
+ /**
2827
+ * ID of your bulk job. You can use
2828
+ * [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)
2829
+ * to retrieve information about the job status.
2830
+ */
2831
+ jobId?: string;
2832
+ }
2833
+ interface DeleteSubscriptionRequest {
2483
2834
  /** @format GUID */
2484
- invoiceId?: string;
2485
- subscriptionCycle?: number;
2835
+ id?: string;
2836
+ revision?: string;
2486
2837
  }
2487
- interface UpdateSubscriptionInvoiceCycleResponse {
2488
- subscriptionInvoice?: SubscriptionInvoice;
2838
+ interface DeleteSubscriptionResponse {
2489
2839
  }
2490
- interface AddPausePeriodRequest {
2491
- /** @format GUID */
2492
- tenantId?: string;
2840
+ interface CancelSubscriptionRequest {
2493
2841
  /** @format GUID */
2494
- subscriptionId?: string;
2495
- pauseStartDate?: Date | null;
2496
- pauseEndDate?: Date | null;
2842
+ id: string;
2843
+ actionContext: ActionContext;
2497
2844
  }
2498
- interface AddPausePeriodResponse {
2845
+ interface ActionContext {
2846
+ initiator?: ActionInitiatorWithLiterals;
2847
+ /** Optional action reason message */
2848
+ reason?: string | null;
2849
+ }
2850
+ declare enum ActionInitiator {
2851
+ UNDEFINED = "UNDEFINED",
2852
+ BUSINESS = "BUSINESS",
2853
+ CUSTOMER = "CUSTOMER",
2854
+ SYSTEM = "SYSTEM"
2855
+ }
2856
+ /** @enumType */
2857
+ type ActionInitiatorWithLiterals = ActionInitiator | 'UNDEFINED' | 'BUSINESS' | 'CUSTOMER' | 'SYSTEM';
2858
+ interface CancelSubscriptionResponse {
2499
2859
  subscription?: Subscription;
2500
2860
  }
2501
- interface RunTimeCapsuleTaskNowRequest {
2502
- /** @format GUID */
2503
- tenantId?: string;
2861
+ interface PauseSubscriptionRequest {
2504
2862
  /** @format GUID */
2505
- subscriptionId?: string;
2506
- /** @minLength 1 */
2507
- taskType?: string;
2863
+ id: string;
2864
+ pausePolicy?: PausePolicyWithLiterals;
2865
+ pauseAt?: PauseAtWithLiterals;
2866
+ /** contains additional scheduling information for certain pause_at options (for example: SPECIFIC_DATE & NUMBER_OF_CYCLES_FROM_TODAY) */
2867
+ pauseAtSchedule?: ScheduleAdditionalInfo;
2868
+ /** contains additional scheduling information for certain auto_resume_at either specific date */
2869
+ autoResumeAtSchedule?: ScheduleAdditionalInfo;
2870
+ actionContext: ActionContext;
2508
2871
  }
2509
- interface CreateRecurringInvoiceBORequest {
2510
- /** @format GUID */
2511
- subscriptionId?: string;
2512
- /** @format GUID */
2513
- tenantId?: string;
2514
- /** @min 2 */
2515
- cycleNumber?: number;
2872
+ interface PauseSubscriptionResponse {
2873
+ subscription?: Subscription;
2516
2874
  }
2517
- interface CreateRecurringInvoiceBOResponse {
2518
- invoiceId?: string;
2875
+ interface SubscriptionPaused {
2876
+ subscription?: Subscription;
2877
+ pausePolicy?: PausePolicyWithLiterals;
2878
+ actionDetails?: ActionDetails;
2519
2879
  }
2520
- interface SetShiftingDataRequest {
2521
- /** @format GUID */
2522
- subscriptionId?: string;
2523
- /** @format GUID */
2524
- tenantId?: string;
2525
- isBassManaged?: boolean;
2526
- shiftManagementDate?: Date | null;
2880
+ interface PauseSubscriptionRequested {
2881
+ subscription?: Subscription;
2882
+ pauseAt?: PauseAtWithLiterals;
2883
+ pausePolicy?: PausePolicyWithLiterals;
2884
+ actionDetails?: ActionDetails;
2527
2885
  }
2528
- interface SetShiftingDataResponse {
2886
+ interface ScheduledPauseCanceled {
2529
2887
  subscription?: Subscription;
2888
+ actionDetails?: ActionDetails;
2530
2889
  }
2531
- interface FixSubscriptionInvoicesRequest extends FixSubscriptionInvoicesRequestModeOneOf {
2532
- attachInvoice?: AttachInvoice;
2533
- detachInvoice?: DetachInvoice;
2534
- /** @format GUID */
2535
- tenantId?: string;
2890
+ interface ResumeSubscriptionRequest {
2536
2891
  /** @format GUID */
2537
- subscriptionId?: string;
2892
+ id: string;
2893
+ resumeAt?: ResumeAtWithLiterals;
2894
+ /** contains additional scheduling information for certain resume_at options (for example: SPECIFIC_DATE) */
2895
+ resumeAtSchedule?: ScheduleAdditionalInfo;
2896
+ actionContext: ActionContext;
2897
+ /** Strategy for resuming a migrated paused subscription when the previous billing date is missing. */
2898
+ missingPreviousBillingDateResumeStrategy?: MissingPreviousBillingDateResumeStrategyWithLiterals;
2538
2899
  }
2539
- /** @oneof */
2540
- interface FixSubscriptionInvoicesRequestModeOneOf {
2541
- attachInvoice?: AttachInvoice;
2542
- detachInvoice?: DetachInvoice;
2900
+ declare enum MissingPreviousBillingDateResumeStrategy {
2901
+ UNKNOWN = "UNKNOWN",
2902
+ /** Use a fallback that makes the next billing date resolve to now. */
2903
+ START_BILLING_IMMEDIATELY = "START_BILLING_IMMEDIATELY",
2904
+ /** Use a fallback that makes the next billing date resolve to one full cycle from now. */
2905
+ START_BILLING_AFTER_ONE_FULL_CYCLE = "START_BILLING_AFTER_ONE_FULL_CYCLE"
2543
2906
  }
2544
- interface AttachInvoice {
2545
- /** @format GUID */
2546
- invoiceId?: string;
2547
- }
2548
- interface DetachInvoice {
2549
- /** @format GUID */
2550
- invoiceId?: string;
2551
- }
2552
- interface FixSubscriptionInvoicesResponse {
2553
- invoices?: SubscriptionInvoice[];
2554
- }
2555
- interface RestoreDraftSubscriptionRequest {
2556
- /** @format GUID */
2557
- tenantId?: string;
2558
- /** @format GUID */
2559
- subscriptionId?: string;
2907
+ /** @enumType */
2908
+ type MissingPreviousBillingDateResumeStrategyWithLiterals = MissingPreviousBillingDateResumeStrategy | 'UNKNOWN' | 'START_BILLING_IMMEDIATELY' | 'START_BILLING_AFTER_ONE_FULL_CYCLE';
2909
+ interface ResumeSubscriptionResponse {
2910
+ subscription?: Subscription;
2560
2911
  }
2561
- interface RestoreDraftSubscriptionResponse {
2912
+ interface SubscriptionResumed {
2562
2913
  subscription?: Subscription;
2914
+ actionDetails?: ActionDetails;
2915
+ pauseInfo?: PauseInfo;
2563
2916
  }
2564
- interface DeleteDraftSubscriptionRequest {
2565
- /** @format GUID */
2566
- tenantId?: string;
2567
- /** @format GUID */
2568
- subscriptionId?: string;
2917
+ interface ResumeSubscriptionRequested {
2918
+ subscription?: Subscription;
2919
+ resumeAt?: ResumeAtWithLiterals;
2920
+ actionDetails?: ActionDetails;
2569
2921
  }
2570
- interface DeleteDraftSubscriptionResponse {
2922
+ interface ScheduledResumeCanceled {
2571
2923
  subscription?: Subscription;
2924
+ actionDetails?: ActionDetails;
2572
2925
  }
2573
- interface DeleteSubscriptionBORequest {
2574
- /** @format GUID */
2575
- tenantId?: string;
2576
- /** @format GUID */
2577
- subscriptionId?: string;
2926
+ interface SearchSubscriptionsRequest extends SearchSubscriptionsRequestPagingMethodOneOf {
2927
+ /** Limit number of results and enable to skip rows. The default limit is 25. */
2928
+ paging?: Paging;
2929
+ /** A Cursor option for efficient paging. Pass this field from the previous search response to continue to the next page. */
2930
+ cursor?: CursorPaging;
2931
+ /** A filter object */
2932
+ filter?: any;
2933
+ /** A Sorting option by field name and order. */
2934
+ sorting?: SortingClauses;
2578
2935
  }
2579
- interface DeleteSubscriptionBOResponse {
2580
- subscription?: Subscription;
2936
+ /** @oneof */
2937
+ interface SearchSubscriptionsRequestPagingMethodOneOf {
2938
+ /** Limit number of results and enable to skip rows. The default limit is 25. */
2939
+ paging?: Paging;
2940
+ /** A Cursor option for efficient paging. Pass this field from the previous search response to continue to the next page. */
2941
+ cursor?: CursorPaging;
2581
2942
  }
2582
- interface CancelSubscriptionBORequest {
2583
- /** @format GUID */
2584
- tenantId?: string;
2585
- /** @format GUID */
2586
- subscriptionId?: string;
2587
- initiator?: ActionInitiatorWithLiterals;
2588
- reason?: string | null;
2943
+ interface SortingClauses {
2944
+ sorting?: Sorting[];
2589
2945
  }
2590
- declare enum ActionInitiator {
2591
- UNDEFINED = "UNDEFINED",
2592
- BUSINESS = "BUSINESS",
2593
- CUSTOMER = "CUSTOMER",
2594
- SYSTEM = "SYSTEM"
2946
+ interface SearchSubscriptionsResponse {
2947
+ subscriptions?: Subscription[];
2948
+ cursor?: CursorPaging;
2949
+ pagingMetadata?: CursorPagingMetadata;
2595
2950
  }
2596
- /** @enumType */
2597
- type ActionInitiatorWithLiterals = ActionInitiator | 'UNDEFINED' | 'BUSINESS' | 'CUSTOMER' | 'SYSTEM';
2598
- interface CancelSubscriptionBOResponse {
2599
- subscription?: Subscription;
2951
+ interface CursorPagingMetadata {
2952
+ /** Total number of items matching the filter. Available only on the first page of *Search* */
2953
+ total?: number | null;
2600
2954
  }
2601
- interface UpdatePaymentMethodBORequest {
2602
- /** @format GUID */
2603
- tenantId?: string;
2604
- /** @format GUID */
2605
- subscriptionId?: string;
2955
+ interface TurnOnSubscriptionAutoRenewalRequest {
2606
2956
  /** @format GUID */
2607
- paymentMethodId?: string;
2957
+ id: string;
2958
+ actionContext: ActionContext;
2608
2959
  }
2609
- interface UpdatePaymentMethodBOResponse {
2960
+ interface TurnOnSubscriptionAutoRenewalResponse {
2610
2961
  subscription?: Subscription;
2611
2962
  }
2612
- interface SendSubscriptionActionEventBORequest extends SendSubscriptionActionEventBORequestEventOneOf {
2613
- billingCycleStarted?: SubscriptionBillingCycleStarted;
2614
- /** @format GUID */
2615
- tenantId?: string;
2963
+ interface SubscriptionAutoRenewalTurnedOn {
2964
+ subscription?: Subscription;
2965
+ actionDetails?: ActionDetails;
2966
+ }
2967
+ interface TurnOffSubscriptionAutoRenewalRequest {
2616
2968
  /** @format GUID */
2617
- subscriptionId?: string;
2969
+ id: string;
2970
+ actionContext: ActionContext;
2618
2971
  }
2619
- /** @oneof */
2620
- interface SendSubscriptionActionEventBORequestEventOneOf {
2621
- billingCycleStarted?: SubscriptionBillingCycleStarted;
2972
+ interface TurnOffSubscriptionAutoRenewalResponse {
2973
+ subscription?: Subscription;
2622
2974
  }
2623
- interface SubscriptionBillingCycleStarted {
2975
+ interface SubscriptionAutoRenewalTurnedOff {
2624
2976
  subscription?: Subscription;
2977
+ actionDetails?: ActionDetails;
2978
+ }
2979
+ interface MarkLatestInvoiceAsPaidRequest {
2625
2980
  /**
2626
- * Wix Pay transaction id, optional. Exists if event was triggered by a payment.
2981
+ * The ID of the offline subscription to mark as paid its latest invoice
2627
2982
  * @format GUID
2628
2983
  */
2629
- paymentTransactionId?: string | null;
2630
- }
2631
- interface SendSubscriptionActionEventResponse {
2632
- }
2633
- interface HandleSubscriptionAfterInvoiceMarkedAsPaidRequest {
2634
- /** @format GUID */
2635
- tenantId?: string;
2636
- /** @format GUID */
2637
- subscriptionId?: string;
2638
- transactionId?: string;
2639
- }
2640
- interface PauseSubscriptionBORequest {
2641
- /** @format GUID */
2642
- tenantId?: string;
2643
- /** @format GUID */
2644
- subscriptionId?: string;
2645
- pausePolicy?: PausePolicyWithLiterals;
2646
- pauseAt?: PauseAtWithLiterals;
2647
- initiator?: ActionInitiatorWithLiterals;
2648
- /** @maxLength 500 */
2649
- reason?: string | null;
2984
+ subscriptionId: string;
2650
2985
  }
2651
- interface PauseSubscriptionBOResponse {
2986
+ interface MarkLatestInvoiceAsPaidResponse {
2652
2987
  subscription?: Subscription;
2653
2988
  }
2654
- interface FixSubscriptionInvoicesConsistencyRequest {
2655
- /** @format GUID */
2656
- tenantId?: string;
2657
- /** @format GUID */
2658
- subscriptionId?: string;
2659
- }
2660
- interface FixSubscriptionInvoicesConsistencyResponse {
2989
+ interface LatestInvoiceMarkedAsPaid {
2990
+ subscription?: Subscription;
2661
2991
  }
2662
- interface UpdateSubscriptionCurrencyRequest {
2992
+ interface MultipleSubscriptionsOnOrdersInvoice {
2663
2993
  /**
2664
- * Tenant ID (instance ID) of the subscription
2994
+ * the invoice id of the affected subscription
2665
2995
  * @format GUID
2666
2996
  */
2667
- tenantId?: string;
2997
+ invoiceId?: string;
2668
2998
  /**
2669
- * Subscription ID to update currency for
2999
+ * the order id of the affected subscription
2670
3000
  * @format GUID
2671
3001
  */
2672
- subscriptionId?: string;
3002
+ orderId?: string;
3003
+ }
3004
+ interface MarkBillingCycleAsPaidRequest {
2673
3005
  /**
2674
- * New currency code (e.g., "USD", "EUR") - ISO 4217 format
2675
- * @format CURRENCY
3006
+ * The ID of the subscription to mark as paid its invoice.
3007
+ * @format GUID
2676
3008
  */
2677
- newCurrency?: string;
3009
+ subscriptionId: string;
2678
3010
  /**
2679
- * Exchange rate from current currency to new currency (newAmount = oldAmount * exchangeRate)
2680
- * @decimalValue options { gt:0.00, maxScale:6 }
3011
+ * The subscription cycle for which the invoice is to be marked as paid.
3012
+ * If left empty, the most recent cycle will be selected.
3013
+ * @min 1
2681
3014
  */
2682
- exchangeRate?: string;
3015
+ paidCycle?: number | null;
2683
3016
  }
2684
- interface UpdateSubscriptionCurrencyResponse {
2685
- /** The updated subscription with new currency and converted amounts */
3017
+ interface MarkBillingCycleAsPaidResponse {
2686
3018
  subscription?: Subscription;
2687
3019
  }
2688
- interface UpdateSubscriptionPlatformOriginRequest {
3020
+ interface GetSubscriptionsStatsRequest {
3021
+ }
3022
+ interface GetSubscriptionsStatsResponse {
3023
+ amountByStatuses?: AmountByStatus[];
3024
+ total?: number;
3025
+ }
3026
+ interface AmountByStatus {
3027
+ status?: SubscriptionStatusEnumSubscriptionStatusWithLiterals;
3028
+ amount?: number;
3029
+ }
3030
+ interface ExtendSubscriptionRequest extends ExtendSubscriptionRequestExtendPolicyOneOf {
3031
+ /** User won't be charged for additional period added on top of subscription end date. */
3032
+ extensionPeriod?: Duration;
2689
3033
  /**
2690
- * Subscription ID to update platform origin for
2691
- * @format GUID
3034
+ * user will be charged for billing cycles added
3035
+ * @min 1
2692
3036
  */
2693
- subscriptionId?: string;
3037
+ extensionBillingCycles?: number;
2694
3038
  /**
2695
- * Tenant ID (instance ID) of the subscription
3039
+ * The ID of the subscription to be extended
2696
3040
  * @format GUID
2697
3041
  */
2698
- tenantId?: string;
2699
- /** New platform origin (appId and entityId) */
2700
- platformOrigin?: PlatformOrigin;
3042
+ id: string;
3043
+ actionContext: ActionContext;
2701
3044
  }
2702
- interface UpdateSubscriptionPlatformOriginResponse {
2703
- /** The updated subscription with new platform origin */
3045
+ /** @oneof */
3046
+ interface ExtendSubscriptionRequestExtendPolicyOneOf {
3047
+ /** User won't be charged for additional period added on top of subscription end date. */
3048
+ extensionPeriod?: Duration;
3049
+ /**
3050
+ * user will be charged for billing cycles added
3051
+ * @min 1
3052
+ */
3053
+ extensionBillingCycles?: number;
3054
+ }
3055
+ interface ExtendSubscriptionResponse {
3056
+ /** The now extended subscription */
2704
3057
  subscription?: Subscription;
2705
3058
  }
2706
- interface SetIsMigratedEvent {
3059
+ interface AllowedActionsRequest {
2707
3060
  /** @format GUID */
2708
- subscriptionId?: string;
3061
+ id: string;
3062
+ /**
3063
+ * List of additional fields to be included in the response.
3064
+ * @maxSize 1
3065
+ */
3066
+ fields?: RequestedFieldsWithLiterals[];
2709
3067
  }
2710
- interface SubscriptionDelayedSyncEvent {
2711
- /** @format GUID */
2712
- subscriptionId?: string;
3068
+ declare enum RequestedFields {
3069
+ /** Include unsupported action list, including the reasons for the lack of support */
3070
+ UNSUPPORTED_ACTION = "UNSUPPORTED_ACTION"
2713
3071
  }
2714
- interface InvoiceAction extends InvoiceActionActionTypeOneOf {
2715
- payRecurring?: PayRecurringInvoice;
3072
+ /** @enumType */
3073
+ type RequestedFieldsWithLiterals = RequestedFields | 'UNSUPPORTED_ACTION';
3074
+ interface AllowedActionsResponse {
3075
+ /** List of actions that are allowed. */
3076
+ actions?: Action[];
3077
+ /**
3078
+ * List of actions that are not supported, included only if requested. Provides reasons for each unsupported action.
3079
+ * @maxSize 20
3080
+ */
3081
+ unsupportedActions?: UnsupportedAction[];
2716
3082
  }
2717
- /** @oneof */
2718
- interface InvoiceActionActionTypeOneOf {
2719
- payRecurring?: PayRecurringInvoice;
3083
+ interface UnsupportedAction {
3084
+ actionType?: ActionTypeWithLiterals;
3085
+ /**
3086
+ * Provides detailed reasons for the unsupported action. Each `UnsupportedReason` includes a code and a message explaining why the action is not allowed.
3087
+ * @maxSize 20
3088
+ */
3089
+ reasons?: UnsupportedReason[];
2720
3090
  }
2721
- interface PayRecurringInvoice {
2722
- /** @format GUID */
2723
- invoiceId?: string;
2724
- }
2725
- /**
2726
- * Sent each time a subscription status has been set to Active
2727
- * Active shows that a subscription is live and operational.
2728
- * For example:
2729
- * * For subscription with free trial, free trial start date is also the activation date.
2730
- * * For a subscription with future start date, the start date is also the activation date.
2731
- * * When a subscription is resumed from a pause status, the resume date is also the activation date.
2732
- */
2733
- interface SubscriptionActivated {
2734
- subscription?: Subscription;
2735
- }
2736
- /**
2737
- * Sent each time a subscription status has been set to Ended
2738
- * Ended shows that a subscription reached its end date and ended its life cycle as a result of the agreement.
2739
- * This is different from a Canceled subscription which ends the subscription before a designated end date.
2740
- * Therefore, Ended and Canceled are mutually exclusive.
2741
- */
2742
- interface SubscriptionEnded {
2743
- subscription?: Subscription;
2744
- }
2745
- interface SubscriptionInitialPurchaseCompleted {
2746
- subscription?: Subscription;
2747
- actionDetails?: ActionDetails;
2748
- /** @format GUID */
2749
- paymentTransactionId?: string | null;
2750
- }
2751
- interface SubscriptionCycleReadyToPay {
2752
- subscription?: Subscription;
2753
- }
2754
- interface SubscriptionRevived {
2755
- subscription?: Subscription;
3091
+ interface UnsupportedReason {
3092
+ code?: string;
3093
+ description?: string | null;
2756
3094
  }
2757
- interface CreateSubscriptionResponse {
2758
- subscription?: Subscription;
3095
+ interface ListUpcomingChargesRequest {
2759
3096
  /**
2760
- * Payments order that should be paid (or authorize card) in order to activate subscription. Empty for free subscriptions.
3097
+ * Subscription id charges to be previewed for
2761
3098
  * @format GUID
2762
3099
  */
2763
- paymentOrderId?: string | null;
2764
- }
2765
- interface UpdateSubscriptionRequest {
2766
- /** Revision is validated if Subscription.revision is set */
2767
- subscription?: Subscription;
3100
+ subscriptionId: string;
3101
+ /** Period of time to provide charged for. If not provided,then only next charge will be returned. */
3102
+ customDuration?: Duration;
2768
3103
  /**
2769
- * Supported field: start_date
2770
- * Can be updated only if Subscription is in Draft state
3104
+ * Date of the next billing cycle so that the upcoming charges will be calculated accordingly.
3105
+ * If not provided, the upcoming charges will be calculated according to the existing next billing date.
2771
3106
  */
2772
- fieldMask?: string[];
3107
+ nextBillingDate?: Date | null;
2773
3108
  }
2774
- interface UpdateSubscriptionResponse {
2775
- subscription?: Subscription;
3109
+ interface ListUpcomingChargesResponse {
3110
+ upcomingCharges?: SubscriptionCharge[];
2776
3111
  }
2777
- interface UpdateSubscriptionStartDateRequest {
2778
- /**
2779
- * Subscription ID
2780
- * @format GUID
2781
- */
2782
- id?: string;
2783
- /**
2784
- * Can be updated only if Subscription is in Draft state
2785
- * By setting start_date in the future, end_date will be recalculated for termed Subscriptions
2786
- * cycles_to_pay_on_creation will be set to 1 if no free trial is set
2787
- */
2788
- startDate?: Date | null;
3112
+ interface PreviewSubscriptionChargesRequest extends PreviewSubscriptionChargesRequestSubscriptionOneOf {
3113
+ /** Information about a non-existing subscription. */
3114
+ subscriptionInfo?: SubscriptionInfo;
2789
3115
  }
2790
- interface UpdateSubscriptionStartDateResponse {
2791
- subscription?: Subscription;
3116
+ /** @oneof */
3117
+ interface PreviewSubscriptionChargesRequestSubscriptionOneOf {
3118
+ /** Information about a non-existing subscription. */
3119
+ subscriptionInfo?: SubscriptionInfo;
2792
3120
  }
2793
- interface BassToSapiPaypalMigrationRequest {
3121
+ /** Subscription information to use for calculating the preview of charges for a subscription. */
3122
+ interface SubscriptionInfo {
3123
+ billingSettings?: BillingSettings;
3124
+ items?: Item[];
3125
+ startDate?: Date | null;
2794
3126
  /**
2795
- * Subscription ID
2796
- * @format GUID
3127
+ * Customer the subscription belongs to. When provided, used for accurate tax calculation.
3128
+ * Optional for backward compatibility; if omitted, a synthetic id is used (legacy behavior)
3129
+ * and customer-specific tax rules (VAT exemptions, tax IDs) will not apply.
2797
3130
  */
2798
- id?: string;
2799
- collectionMethod?: CollectionMethodEnumCollectionMethodWithLiterals;
3131
+ customer?: Customer;
2800
3132
  }
2801
- interface BassToSapiPaypalMigrationResponse {
2802
- subscription?: Subscription;
3133
+ interface PreviewSubscriptionChargesResponse {
3134
+ /** Charges for subscription. */
3135
+ charges?: Charge[];
2803
3136
  }
2804
- interface UpdateSubscriptionPoliciesRequest {
3137
+ /** Represents a charge applicable to a subscription. */
3138
+ interface Charge {
3139
+ /** The cycle number from which the charge starts. */
3140
+ cycleFrom?: number;
3141
+ /** The number of cycles for which the charge is applicable. */
3142
+ cycleCount?: number | null;
3143
+ /** The breakdown of the charge */
3144
+ totals?: Totals;
3145
+ /** The billing date from which the charge starts */
3146
+ cycleBillingDate?: Date | null;
3147
+ }
3148
+ interface PreviewSubscriptionsChargesRequest {
2805
3149
  /**
2806
- * Subscription ID
2807
- * @format GUID
3150
+ * Information required to calculate the preview charges for the subscriptions, including an identifier.
3151
+ * @minSize 1
3152
+ * @maxSize 10
2808
3153
  */
2809
- id?: string;
2810
- cancellableByCustomer?: boolean | null;
2811
- }
2812
- interface UpdateSubscriptionPoliciesResponse {
2813
- /** Updated policies of the subscription */
2814
- policies?: SubscriptionPolicies;
3154
+ subscriptionsBillingDetails?: SubscriptionBillingDetails[];
3155
+ /**
3156
+ * Specifies the number of upcoming billing charges to preview for all subscriptions in the order.
3157
+ * For instance, if a subscription costs $10 for the first 3 cycles, $12 for cycles 4 through 7,
3158
+ * $15 for cycles 8 through 10, and $20 for cycle 11 onwards:
3159
+ * - Sending "1" will calculate and return charges for cycles 4 through 7 since it's the first charge in the future.
3160
+ * - Sending "2" will provide a response with charges for cycles 4 through 7 and cycles 8 through 10.
3161
+ * - Sending "3" or more will include totals for cycles 4 through 7, cycles 8 through 10, and from cycle 11 onwards.
3162
+ * If no value is provided, the response will include charges for all upcoming cycles, including the existing one,
3163
+ * in this case, charges for cycle 1 through 3.
3164
+ * If there is a single charge for a subscription, meaning that subscription price remains consistent across all cycles,
3165
+ * then even if future_charges_count is set, it will be ignored and the only charge this subscription has will be returned.
3166
+ * @min 1
3167
+ * @max 10
3168
+ */
3169
+ numberOfNextRecurringCharges?: number | null;
2815
3170
  }
2816
- interface UpdateSubscriptionBillingDateRequest {
3171
+ interface SubscriptionBillingDetails {
2817
3172
  /**
2818
- * ID of the subscription to update the billing date for.
3173
+ * External identifier of the subscription
2819
3174
  * @format GUID
2820
3175
  */
2821
- id: string;
2822
- /** New billing date in `YYYY-MM-DDThh:mm:ss:sssZ` format. */
2823
- billingDate: Date | null;
3176
+ externalId?: string | null;
3177
+ /** Billing details parameters including schedule, currency, etc. */
3178
+ billingSettings?: BillingSettings;
2824
3179
  /**
2825
- * Information about how BASS adjusts the total of the next invoice. Extending
2826
- * the current billing cycle results in a higher payment, while shortening it
2827
- * leads to a lower payment. BASS offers automatic calculation of the proration
2828
- * amount based on the number of days added to or removed from the current billing
2829
- * cycle. Alternatively, you can use your own custom method to calculate the
2830
- * proration amount. The custom proration amount can't exceed the total of the
2831
- * current billing cycle.
3180
+ * Items, minSize is 1, maxSize is 100
3181
+ * @minSize 1
3182
+ * @maxSize 100
2832
3183
  */
2833
- proration?: Proration;
2834
- }
2835
- interface UpdateSubscriptionBillingDateResponse {
2836
- /** Updated subscription. */
2837
- subscription?: Subscription;
3184
+ items?: Item[];
3185
+ /** Subscription start date, now if not set */
3186
+ startDate?: Date | null;
3187
+ /** Shipping address associated with subscription. At the moment used only for payments. Optional. */
3188
+ shippingAddress?: FullAddressDetails;
3189
+ /**
3190
+ * Customer the subscription belongs to. When provided, used for accurate tax calculation.
3191
+ * Optional for backward compatibility; if omitted, a synthetic id is used (legacy behavior).
3192
+ */
3193
+ customer?: Customer;
2838
3194
  }
2839
- interface SubscriptionBillingDateUpdated {
2840
- subscription?: Subscription;
2841
- billingDate?: Date | null;
2842
- proration?: Proration;
3195
+ interface PreviewSubscriptionsChargesResponse {
3196
+ /** Charges for the subscriptions, including an identifier. */
3197
+ subscriptionsCharges?: SubscriptionCharges[];
2843
3198
  }
2844
- interface UpdateSubscriptionOriginRequest {
3199
+ interface SubscriptionCharges {
2845
3200
  /**
2846
- * ID of the subscription to update origin.
3201
+ * External identifier of the subscription
2847
3202
  * @format GUID
2848
3203
  */
2849
- id?: string;
3204
+ externalId?: string | null;
3205
+ /** Charges for subscription. */
3206
+ charges?: Charge[];
3207
+ }
3208
+ interface CreateSubscriptionForOrderRequest {
3209
+ /** Subscription needs to be created */
3210
+ subscription?: Subscription;
2850
3211
  /**
2851
- * Origin entity ID of the subscription to update.
3212
+ * Optional unique identifier for this request in order to prevent subscription duplications
2852
3213
  * @format GUID
2853
3214
  */
2854
- entityId?: string;
3215
+ idempotencyKey?: string | null;
2855
3216
  }
2856
- interface UpdateSubscriptionOriginResponse {
2857
- /** Updated subscription. */
3217
+ interface CreateSubscriptionForOrderResponse {
3218
+ /** Created subscription */
2858
3219
  subscription?: Subscription;
3220
+ /** Non-persistent invoice */
3221
+ invoice?: Invoice;
2859
3222
  }
2860
- interface ReviseSubscriptionRequest {
3223
+ /** An invoice includes information about the subscription and the customer. */
3224
+ interface Invoice {
2861
3225
  /**
2862
- * Subscription ID
3226
+ * Invoice ID.
2863
3227
  * @format GUID
3228
+ * @readonly
2864
3229
  */
2865
- id: string;
3230
+ id?: string | null;
2866
3231
  /**
2867
- * 0 for no revision, maxSize is 100
2868
- * @maxSize 100
3232
+ * Date and time the invoice was created.
3233
+ * @readonly
2869
3234
  */
2870
- items?: Item[];
2871
- }
2872
- interface ReviseSubscriptionResponse {
2873
- subscription?: Subscription;
2874
- }
2875
- interface UpdateSubscriptionItemsRequest {
3235
+ createdDate?: Date | null;
2876
3236
  /**
2877
- * Subscription ID
2878
- * @format GUID
3237
+ * Date and time the invoice was last updated.
3238
+ * @readonly
2879
3239
  */
2880
- id?: string;
2881
- /** Update action. For RESET_PENDING_UPDATES, nothing but the subscription ID should be defined in the request. */
2882
- updateAction?: UpdateActionWithLiterals;
2883
- /** Updates execution date. Relevant only for UpdateAction.SPECIFIC_DATE. Only specific date is supported. */
2884
- scheduleAdditionalInfo?: ScheduleAdditionalInfo;
3240
+ updatedDate?: Date | null;
2885
3241
  /**
2886
- * Existing items to update
2887
- * @maxSize 100
3242
+ * Revision number, which increments by 1 each time the invoice is updated.
3243
+ * To prevent conflicting changes,
3244
+ * the current revision must be passed when updating the invoice.
3245
+ *
3246
+ * Ignored when creating a invoice.
3247
+ * @readonly
2888
3248
  */
2889
- itemsToUpdate?: ItemChange[];
3249
+ revision?: string | null;
2890
3250
  /**
2891
- * Items to add
2892
- * @maxSize 99
3251
+ * Source of the invoice.
3252
+ * @internal
2893
3253
  */
2894
- itemsToAdd?: Item[];
3254
+ source?: string | null;
3255
+ /** Information about the invoice origin. */
3256
+ origin?: BusinessOriginData;
2895
3257
  /**
2896
- * Existing items to delete
2897
- * @format GUID
2898
- * @maxSize 99
3258
+ * Invoice status.
3259
+ *
3260
+ * + `"UNKNOWN"`: There is no information about the invoice status.
3261
+ * + `"OPEN"`: BASS has created the invoice but hasn't initiated the payment process.
3262
+ * + `"PAID"`: The customer has successfully paid for the invoice.
3263
+ * + `"ATTEMPT_FAILED"`: The payment process has started and there has been at least one unsuccessful payment attempt.
3264
+ * + `"FAILED"`: The payment process has failed and there are no more retries.
3265
+ * + `"CANCELED"`: The payment process has been stopped because the related subscription has been canceled.
3266
+ * @readonly
2899
3267
  */
2900
- itemsToDelete?: string[] | null;
2901
- }
2902
- declare enum UpdateAction {
2903
- NONE = "NONE",
2904
- /** Update subscription immediately, please note proration for updates changing price are not yet supported */
2905
- IMMEDIATELY = "IMMEDIATELY",
2906
- /** Request updates that will take affect only at the start of the next billing cycle. */
2907
- NEXT_BILLING_CYCLE = "NEXT_BILLING_CYCLE",
2908
- /** Reset all pending updates */
2909
- RESET_PENDING_UPDATES = "RESET_PENDING_UPDATES",
2910
- /** Request updates that will take affect only at a specific date. */
2911
- SPECIFIC_DATE = "SPECIFIC_DATE"
2912
- }
2913
- /** @enumType */
2914
- type UpdateActionWithLiterals = UpdateAction | 'NONE' | 'IMMEDIATELY' | 'NEXT_BILLING_CYCLE' | 'RESET_PENDING_UPDATES' | 'SPECIFIC_DATE';
2915
- interface UpdateSubscriptionItemsResponse {
2916
- subscription?: Subscription;
2917
- }
2918
- interface BulkUpdateSubscriptionItemsByFilterRequest {
3268
+ status?: InvoiceStatusWithLiterals;
2919
3269
  /**
2920
- * Filter to identify the subscriptions for which items are updated. For
2921
- * supported fields see
2922
- * [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).
2923
- * Sending an empty subscription filter results in a validation error.
2924
- * In case you pass `{"updateAction": "RESET_PENDING_UPDATES"}`, use only the
2925
- * `subscriptionId` field inside this filter. Passing any other filter results
2926
- * in a failed validation error.
3270
+ * 3-letter currency code of the invoice in
3271
+ * [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
3272
+ * @format CURRENCY
2927
3273
  */
2928
- subscriptionFilter?: Record<string, any> | null;
3274
+ currency?: string;
3275
+ /** Information about the customer. */
3276
+ customer?: Customer;
2929
3277
  /**
2930
- * Filter to specify which subscription items are updated. Make sure to use
2931
- * the catalog item ID and not the item's unique ID. All subscription items
2932
- * with matching `items.catalogReference.catalogItemId` are updated.
3278
+ * Whether the payment is processed through Wix and whether the customer must provide some input.
2933
3279
  *
2934
- * Max: `100` reference catalog item IDs
3280
+ * + `"UNKNOWN"`: There is no information about the collection method.
3281
+ * + `"AUTO_CHARGE"`: The customer pays automatically through Wix.
3282
+ * + `"SEND_INVOICE"`: The customer pays through Wix, but some manual input is required.
3283
+ * + `"OFFLINE"`: The customer pays outside of Wix.
3284
+ */
3285
+ collectionMethod?: CollectionMethodWithLiterals;
3286
+ /**
3287
+ * ID of the
3288
+ * [payment method](https://bo.wix.com/wix-docs/rest/wix-cashier/settings/payment-method-type/payment-method-type-object).
3289
+ * Not available for the first payment of a subscription and all offline
3290
+ * payments.
2935
3291
  * @format GUID
2936
- * @maxSize 100
2937
3292
  */
2938
- catalogReferenceIds?: string[] | null;
3293
+ paymentMethodId?: string | null;
2939
3294
  /**
2940
- * Information about the update timing and update type.
2941
- *
2942
- * + `"IMMEDIATELY"`: The updates become effective immediately.
2943
- * + `"NEXT_BILLING_CYCLE"`: The updates are scheduled for the beginning of the next billing cycle.
2944
- * + `"SPECIFIC_DATE"`: The updates are scheduled for the date specified in `scheduleAdditionalInfo.specificDate`.
2945
- * + `"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.
3295
+ * Cashier [Order ID](https://dev.wix.com/docs/rest/payments/wix-cashier/pay/order#order-object)
3296
+ * for the corresponding payment.
3297
+ * @format GUID
3298
+ * @readonly
2946
3299
  */
2947
- updateAction?: UpdateActionWithLiterals;
3300
+ paymentOrderId?: string | null;
3301
+ /** Information about a discount. Available only for invoices that include a discount. */
3302
+ discount?: InvoiceDiscount;
3303
+ /** Billing address. */
3304
+ billingAddress?: FullAddressDetails;
3305
+ /** Shipping address. Available only for `"PHYSICAL"` line items. */
3306
+ shippingAddress?: FullAddressDetails;
2948
3307
  /**
2949
- * Additional information for updates. Currently, only supported for
2950
- * `{"updateAction": "SPECIFIC_DATE"}`.
3308
+ * Shipping fee in `0.00` format.
3309
+ * @format DECIMAL_VALUE
2951
3310
  */
2952
- scheduleAdditionalInfo?: ScheduleAdditionalInfo;
3311
+ shippingFee?: string | null;
2953
3312
  /**
2954
- * Update details for the susbcription items that match the filtering.
2955
- * Currently, you can update only the item price, quantity, and tax. Note
2956
- * that all item properties are updated to the same values. In case you want set
2957
- * different values for individual items, you must call
2958
- * _Bulk Update Subscription Items By Filter_ multiple times, once per unique update.
3313
+ * Information about the invoice's totals.
3314
+ * @readonly
2959
3315
  */
2960
- bulkItemUpdateData?: BulkItemChange;
3316
+ totals?: Totals;
3317
+ /** Line items belonging to the invoice. */
3318
+ invoiceItems?: InvoiceItem[];
2961
3319
  /**
2962
- * __Not implemented yet__. Items to add to the subscriptions matching the filtering.
2963
- * @maxSize 99
3320
+ * Whether the invoice is used to validate payment details.
3321
+ *
3322
+ * + `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.
3323
+ * + `false`: Standard invoice.
2964
3324
  */
2965
- itemsToAdd?: Item[];
2966
- }
2967
- interface BulkItemChange {
2968
- /** Information about the new item price. */
2969
- pricingModel?: PricingModel;
3325
+ isAuthorization?: boolean | null;
3326
+ /** Whether the invoice's `totals.totalPrice` includes tax. */
3327
+ isTaxInclusive?: boolean | null;
2970
3328
  /**
2971
- * New item quantity.
3329
+ * Information about the invoice creation process.
2972
3330
  *
2973
- * Min: `1`
2974
- * @min 1
3331
+ * + `"UNKNOWN"`: There is no information about how BASS created the invoice.
3332
+ * + `"SYSTEM"`: BASS automatically created the invoice.
3333
+ * + `"MANUAL"`: A BASS system admin manually created the invoice.
3334
+ * @internal
2975
3335
  */
2976
- quantity?: number | null;
2977
- /** Information about the new item tax. */
2978
- tax?: Tax;
3336
+ creationMode?: CreationModeWithLiterals;
3337
+ /** Details of the latest payment attempt. */
3338
+ latestPaymentAttempt?: LatestPaymentAttempt;
3339
+ /** List of charges and credits that adjust the invoice's `totals.totalPrice`. */
3340
+ adjustments?: PriceAdjustment[];
3341
+ /**
3342
+ * Invoice Number.
3343
+ * @maxLength 10
3344
+ * @readonly
3345
+ */
3346
+ invoiceNumber?: string | null;
3347
+ /**
3348
+ * Shipping charges for the invoice.
3349
+ * Supports only one discount without cycles.
3350
+ * Discounts with cycles (repeated discounts across different billing cycles) are not supported for shipping
3351
+ */
3352
+ shippingCharges?: InvoiceShippingCharges;
3353
+ /** Information about the invoice tax */
3354
+ taxData?: TaxData;
3355
+ /** Business address. */
3356
+ businessAddress?: Address;
3357
+ /**
3358
+ * ID of the billing order that created this invoice.
3359
+ * @format GUID
3360
+ */
3361
+ orderId?: string | null;
3362
+ /**
3363
+ * Platform origin the invoice is originated from.
3364
+ * @format GUID
3365
+ */
3366
+ platformOriginAppId?: string | null;
3367
+ /**
3368
+ * Refund information, provided that there are refunds for this invoice.
3369
+ * @readonly
3370
+ */
3371
+ refundInfo?: RefundInfo;
2979
3372
  }
2980
- interface BulkUpdateSubscriptionItemsByFilterResponse {
3373
+ interface BusinessOriginData {
2981
3374
  /**
2982
- * ID of your bulk job. You can use
2983
- * [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)
2984
- * to retrieve information about the job status.
3375
+ * ID of the app for which BASS has created the invoice. For example,
3376
+ * `"1380b703-ce81-ff05-f115-39571d94dfcd"` for the Wix eCommerce app.
3377
+ * @format GUID
2985
3378
  */
2986
- jobId?: string;
3379
+ appId?: string;
3380
+ /**
3381
+ * [Instance ID](https://dev.wix.com/api/rest/app-management/apps/app-instance/get-app-instance)
3382
+ * of the app for which BASS has created the invoice.
3383
+ * @format GUID
3384
+ */
3385
+ instanceId?: string;
3386
+ /**
3387
+ * ID of the entity that triggered the invoice creation. For example, the ID of a
3388
+ * [pricing plan](https://dev.wix.com/docs/rest/payments/pricing-plans/pricing-plans/plan#plan-object).
3389
+ * @format GUID
3390
+ */
3391
+ entityId?: string;
2987
3392
  }
2988
- interface DeleteSubscriptionRequest {
2989
- /** @format GUID */
2990
- id?: string;
2991
- revision?: string;
3393
+ declare enum InvoiceStatus {
3394
+ UNKNOWN = "UNKNOWN",
3395
+ OPEN = "OPEN",
3396
+ PAID = "PAID",
3397
+ FAILED = "FAILED",
3398
+ ATTEMPT_FAILED = "ATTEMPT_FAILED",
3399
+ CANCELED = "CANCELED",
3400
+ REFUNDED = "REFUNDED",
3401
+ CHARGEBACKED = "CHARGEBACKED"
2992
3402
  }
2993
- interface DeleteSubscriptionResponse {
3403
+ /** @enumType */
3404
+ type InvoiceStatusWithLiterals = InvoiceStatus | 'UNKNOWN' | 'OPEN' | 'PAID' | 'FAILED' | 'ATTEMPT_FAILED' | 'CANCELED' | 'REFUNDED' | 'CHARGEBACKED';
3405
+ declare enum CollectionMethod {
3406
+ UNKNOWN = "UNKNOWN",
3407
+ AUTO_CHARGE = "AUTO_CHARGE",
3408
+ OFFLINE = "OFFLINE",
3409
+ SEND_INVOICE = "SEND_INVOICE"
2994
3410
  }
2995
- interface CancelSubscriptionRequest {
2996
- /** @format GUID */
2997
- id: string;
2998
- actionContext: ActionContext;
3411
+ /** @enumType */
3412
+ type CollectionMethodWithLiterals = CollectionMethod | 'UNKNOWN' | 'AUTO_CHARGE' | 'OFFLINE' | 'SEND_INVOICE';
3413
+ declare enum CreationMode {
3414
+ UNKNOWN = "UNKNOWN",
3415
+ SYSTEM = "SYSTEM",
3416
+ MANUAL = "MANUAL"
2999
3417
  }
3000
- interface ActionContext {
3001
- initiator?: ActionInitiatorWithLiterals;
3002
- /** Optional action reason message */
3003
- reason?: string | null;
3418
+ /** @enumType */
3419
+ type CreationModeWithLiterals = CreationMode | 'UNKNOWN' | 'SYSTEM' | 'MANUAL';
3420
+ interface LatestPaymentAttempt {
3421
+ /**
3422
+ * ID of the latest payment attempt.
3423
+ * @format GUID
3424
+ * @readonly
3425
+ */
3426
+ paymentAttemptId?: string;
3427
+ /**
3428
+ * Date and time of the latest payment attempt in `YYYY-MM-DDThh:mm.sssZ` format.
3429
+ * @readonly
3430
+ */
3431
+ dateAttempt?: Date | null;
3432
+ /** Number of the latest payment attempt. */
3433
+ attemptNumber?: number;
3434
+ /**
3435
+ * Status of the latest payment attempt.
3436
+ *
3437
+ * + `"UNKNOWN"`: There is no information about the status of the latest payment attempt.
3438
+ * + `"SCHEDULED"`: The latest payment attempt is scheduled but hasn't started yet.
3439
+ * + `"IN_PROGRESS"`: The latest payment attempt is in progress.
3440
+ * + `"PAID"`: The latest payment attempt resulted in a successful payment.
3441
+ * + `"DECLINED"`: The latest payment attempt has been declined.
3442
+ * + `"TECHNICAL_FAILURE"`: The latest payment attempt couldn't be process due to a technical failure.
3443
+ * + `"CANCELED"`: The latest payment attempt has been canceled by BASS.
3444
+ * @readonly
3445
+ */
3446
+ status?: PaymentAttemptStatusWithLiterals;
3447
+ /**
3448
+ * Whether BASS tries to collect the payment another time. Available only when
3449
+ * `latestPaymentAttempt.status` is set to `"DECLINED"`.
3450
+ */
3451
+ retryable?: boolean;
3452
+ /**
3453
+ * Platform fee that was collected on this transaction.
3454
+ * @format DECIMAL_VALUE
3455
+ * @decimalValue options { gte:0.00, maxScale:2 }
3456
+ * @readonly
3457
+ */
3458
+ appliedPlatformFee?: string | null;
3004
3459
  }
3005
- interface CancelSubscriptionResponse {
3006
- subscription?: Subscription;
3460
+ declare enum PaymentAttemptStatus {
3461
+ UNKNOWN = "UNKNOWN",
3462
+ SCHEDULED = "SCHEDULED",
3463
+ IN_PROGRESS = "IN_PROGRESS",
3464
+ PAID = "PAID",
3465
+ DECLINED = "DECLINED",
3466
+ TECHNICAL_FAILURE = "TECHNICAL_FAILURE",
3467
+ CANCELED = "CANCELED",
3468
+ PENDING = "PENDING",
3469
+ REFUNDED = "REFUNDED",
3470
+ CHARGEBACKED = "CHARGEBACKED"
3007
3471
  }
3008
- interface PauseSubscriptionRequest {
3009
- /** @format GUID */
3010
- id: string;
3011
- pausePolicy?: PausePolicyWithLiterals;
3012
- pauseAt?: PauseAtWithLiterals;
3013
- /** contains additional scheduling information for certain pause_at options (for example: SPECIFIC_DATE & NUMBER_OF_CYCLES_FROM_TODAY) */
3014
- pauseAtSchedule?: ScheduleAdditionalInfo;
3015
- /** contains additional scheduling information for certain auto_resume_at either specific date */
3016
- autoResumeAtSchedule?: ScheduleAdditionalInfo;
3017
- actionContext: ActionContext;
3018
- }
3019
- interface PauseSubscriptionResponse {
3020
- subscription?: Subscription;
3021
- }
3022
- interface SubscriptionPaused {
3023
- subscription?: Subscription;
3024
- pausePolicy?: PausePolicyWithLiterals;
3025
- actionDetails?: ActionDetails;
3026
- }
3027
- interface PauseSubscriptionRequested {
3028
- subscription?: Subscription;
3029
- pauseAt?: PauseAtWithLiterals;
3030
- pausePolicy?: PausePolicyWithLiterals;
3031
- actionDetails?: ActionDetails;
3032
- }
3033
- interface ScheduledPauseCanceled {
3034
- subscription?: Subscription;
3035
- actionDetails?: ActionDetails;
3036
- }
3037
- interface ResumeSubscriptionRequest {
3038
- /** @format GUID */
3039
- id: string;
3040
- resumeAt?: ResumeAtWithLiterals;
3041
- /** contains additional scheduling information for certain resume_at options (for example: SPECIFIC_DATE) */
3042
- resumeAtSchedule?: ScheduleAdditionalInfo;
3043
- actionContext: ActionContext;
3044
- }
3045
- interface ResumeSubscriptionResponse {
3046
- subscription?: Subscription;
3047
- }
3048
- interface SubscriptionResumed {
3049
- subscription?: Subscription;
3050
- actionDetails?: ActionDetails;
3051
- pauseInfo?: PauseInfo;
3052
- }
3053
- interface ResumeSubscriptionRequested {
3054
- subscription?: Subscription;
3055
- resumeAt?: ResumeAtWithLiterals;
3056
- actionDetails?: ActionDetails;
3057
- }
3058
- interface ScheduledResumeCanceled {
3059
- subscription?: Subscription;
3060
- actionDetails?: ActionDetails;
3061
- }
3062
- interface SearchSubscriptionsRequest extends SearchSubscriptionsRequestPagingMethodOneOf {
3063
- /** Limit number of results and enable to skip rows. The default limit is 25. */
3064
- paging?: Paging;
3065
- /** A Cursor option for efficient paging. Pass this field from the previous search response to continue to the next page. */
3066
- cursor?: CursorPaging;
3067
- /** A filter object */
3068
- filter?: any;
3069
- /** A Sorting option by field name and order. */
3070
- sorting?: SortingClauses;
3472
+ /** @enumType */
3473
+ type PaymentAttemptStatusWithLiterals = PaymentAttemptStatus | 'UNKNOWN' | 'SCHEDULED' | 'IN_PROGRESS' | 'PAID' | 'DECLINED' | 'TECHNICAL_FAILURE' | 'CANCELED' | 'PENDING' | 'REFUNDED' | 'CHARGEBACKED';
3474
+ interface PriceAdjustment extends PriceAdjustmentAdjustmentTypeOneOf {
3475
+ /** Adjustment that increases the price. */
3476
+ charge?: PriceAdjustmentValue;
3477
+ /** Adjustment that lowers the price. */
3478
+ credit?: PriceAdjustmentValue;
3479
+ /** Reason for this price adjustment. Used to categorize proration adjustments. */
3480
+ reason?: PriceAdjustmentReasonWithLiterals;
3071
3481
  }
3072
3482
  /** @oneof */
3073
- interface SearchSubscriptionsRequestPagingMethodOneOf {
3074
- /** Limit number of results and enable to skip rows. The default limit is 25. */
3075
- paging?: Paging;
3076
- /** A Cursor option for efficient paging. Pass this field from the previous search response to continue to the next page. */
3077
- cursor?: CursorPaging;
3078
- }
3079
- interface SortingClauses {
3080
- sorting?: Sorting[];
3081
- }
3082
- interface SearchSubscriptionsResponse {
3083
- subscriptions?: Subscription[];
3084
- cursor?: CursorPaging;
3085
- pagingMetadata?: CursorPagingMetadata;
3086
- }
3087
- interface CursorPagingMetadata {
3088
- /** Total number of items matching the filter. Available only on the first page of *Search* */
3089
- total?: number | null;
3090
- }
3091
- interface TurnOnSubscriptionAutoRenewalRequest {
3092
- /** @format GUID */
3093
- id: string;
3094
- actionContext: ActionContext;
3095
- }
3096
- interface TurnOnSubscriptionAutoRenewalResponse {
3097
- subscription?: Subscription;
3098
- }
3099
- interface SubscriptionAutoRenewalTurnedOn {
3100
- subscription?: Subscription;
3101
- actionDetails?: ActionDetails;
3102
- }
3103
- interface TurnOffSubscriptionAutoRenewalRequest {
3104
- /** @format GUID */
3105
- id: string;
3106
- actionContext: ActionContext;
3107
- }
3108
- interface TurnOffSubscriptionAutoRenewalResponse {
3109
- subscription?: Subscription;
3110
- }
3111
- interface SubscriptionAutoRenewalTurnedOff {
3112
- subscription?: Subscription;
3113
- actionDetails?: ActionDetails;
3114
- }
3115
- interface MarkLatestInvoiceAsPaidRequest {
3116
- /**
3117
- * The ID of the offline subscription to mark as paid its latest invoice
3118
- * @format GUID
3119
- */
3120
- subscriptionId: string;
3121
- }
3122
- interface MarkLatestInvoiceAsPaidResponse {
3123
- subscription?: Subscription;
3124
- }
3125
- interface LatestInvoiceMarkedAsPaid {
3126
- subscription?: Subscription;
3483
+ interface PriceAdjustmentAdjustmentTypeOneOf {
3484
+ /** Adjustment that increases the price. */
3485
+ charge?: PriceAdjustmentValue;
3486
+ /** Adjustment that lowers the price. */
3487
+ credit?: PriceAdjustmentValue;
3127
3488
  }
3128
- interface MultipleSubscriptionsOnOrdersInvoice {
3489
+ interface PriceAdjustmentValue extends PriceAdjustmentValueAdjustmentValueTypeOneOf {
3129
3490
  /**
3130
- * the invoice id of the affected subscription
3131
- * @format GUID
3491
+ * Absolute amount that adjusts the price.
3492
+ *
3493
+ * Min: `0.01`
3494
+ * @decimalValue options { gt:0.00 }
3132
3495
  */
3133
- invoiceId?: string;
3496
+ amount?: string;
3134
3497
  /**
3135
- * the order id of the affected subscription
3136
- * @format GUID
3498
+ * Relative factor that adjusts the price. For example, setting
3499
+ * `multiplier` to:
3500
+ * - `0.50` results in a price adjustment of 50% of the original value.
3501
+ * - `0.75` results in a price adjustment of 75% of the original value.
3502
+ * - `1.00` results in a price adjustment of 100% of the original value.
3503
+ *
3504
+ * Min: `0.01`
3505
+ * Max: `1.00`
3506
+ * @decimalValue options { gt:0.00, lte:1 }
3137
3507
  */
3138
- orderId?: string;
3508
+ multiplier?: string;
3139
3509
  }
3140
- interface MarkBillingCycleAsPaidRequest {
3510
+ /** @oneof */
3511
+ interface PriceAdjustmentValueAdjustmentValueTypeOneOf {
3141
3512
  /**
3142
- * The ID of the subscription to mark as paid its invoice.
3143
- * @format GUID
3513
+ * Absolute amount that adjusts the price.
3514
+ *
3515
+ * Min: `0.01`
3516
+ * @decimalValue options { gt:0.00 }
3144
3517
  */
3145
- subscriptionId: string;
3518
+ amount?: string;
3146
3519
  /**
3147
- * The subscription cycle for which the invoice is to be marked as paid.
3148
- * If left empty, the most recent cycle will be selected.
3149
- * @min 1
3520
+ * Relative factor that adjusts the price. For example, setting
3521
+ * `multiplier` to:
3522
+ * - `0.50` results in a price adjustment of 50% of the original value.
3523
+ * - `0.75` results in a price adjustment of 75% of the original value.
3524
+ * - `1.00` results in a price adjustment of 100% of the original value.
3525
+ *
3526
+ * Min: `0.01`
3527
+ * Max: `1.00`
3528
+ * @decimalValue options { gt:0.00, lte:1 }
3150
3529
  */
3151
- paidCycle?: number | null;
3152
- }
3153
- interface MarkBillingCycleAsPaidResponse {
3154
- subscription?: Subscription;
3530
+ multiplier?: string;
3155
3531
  }
3156
- interface GetSubscriptionsStatsRequest {
3532
+ /** Reason for a price adjustment. Categorizes different types of proration adjustments. */
3533
+ declare enum PriceAdjustmentReason {
3534
+ /** Default value. Used for adjustments without a specific categorization. */
3535
+ PRICE_ADJUSTMENT_REASON_UNSPECIFIED = "PRICE_ADJUSTMENT_REASON_UNSPECIFIED",
3536
+ /** Adjustment due to a billing date change. */
3537
+ BILLING_DATE_CHANGE = "BILLING_DATE_CHANGE",
3538
+ /** Proration adjustment from changing the subscription plan. */
3539
+ PLAN_CHANGE_PRORATION = "PLAN_CHANGE_PRORATION",
3540
+ /** Proration adjustment from changing the billing cycle (e.g., monthly to yearly). */
3541
+ CYCLE_CHANGE_PRORATION = "CYCLE_CHANGE_PRORATION",
3542
+ /** Proration adjustment from changing the subscription quantity. */
3543
+ QUANTITY_CHANGE_PRORATION = "QUANTITY_CHANGE_PRORATION",
3544
+ /** Custom adjustment provided by the caller. */
3545
+ CUSTOM_PRICE_ADJUSTMENT = "CUSTOM_PRICE_ADJUSTMENT"
3157
3546
  }
3158
- interface GetSubscriptionsStatsResponse {
3159
- amountByStatuses?: AmountByStatus[];
3160
- total?: number;
3547
+ /** @enumType */
3548
+ type PriceAdjustmentReasonWithLiterals = PriceAdjustmentReason | 'PRICE_ADJUSTMENT_REASON_UNSPECIFIED' | 'BILLING_DATE_CHANGE' | 'PLAN_CHANGE_PRORATION' | 'CYCLE_CHANGE_PRORATION' | 'QUANTITY_CHANGE_PRORATION' | 'CUSTOM_PRICE_ADJUSTMENT';
3549
+ interface InvoiceShippingCharges {
3550
+ /**
3551
+ * Amount of the shipping fee in `0.00` format.
3552
+ *
3553
+ * Min: `0.01`
3554
+ * @decimalValue options { gte:0.00, maxScale:2 }
3555
+ */
3556
+ amount?: string;
3557
+ /** Tax of the shipping fee */
3558
+ tax?: Tax;
3559
+ /** Information about the shipping charges tax data */
3560
+ taxData?: ItemTaxData;
3561
+ discount?: Discount;
3161
3562
  }
3162
- interface AmountByStatus {
3163
- status?: SubscriptionStatusEnumSubscriptionStatusWithLiterals;
3164
- amount?: number;
3563
+ /** Tax data from all items */
3564
+ interface TaxData {
3565
+ /** Aggregated tax data from all items */
3566
+ taxSummary?: TaxSummary;
3165
3567
  }
3166
- interface ExtendSubscriptionRequest extends ExtendSubscriptionRequestExtendPolicyOneOf {
3167
- /** User won't be charged for additional period added on top of subscription end date. */
3168
- extensionPeriod?: Duration;
3568
+ interface TaxSummary {
3169
3569
  /**
3170
- * user will be charged for billing cycles added
3171
- * @min 1
3570
+ * Aggregated from tax_breakdowns with exemptions excluded from amount
3571
+ * @format DECIMAL_VALUE
3172
3572
  */
3173
- extensionBillingCycles?: number;
3573
+ aggregatedTaxAmount?: string;
3174
3574
  /**
3175
- * The ID of the subscription to be extended
3176
- * @format GUID
3575
+ * Array of each tax applied, grouped by `"jurisdiction"`, `"jurisdiction_type"`, `"tax_type"`, `"tax_name"` and `"tax_rate"`.
3576
+ * @maxSize 50
3177
3577
  */
3178
- id: string;
3179
- actionContext: ActionContext;
3180
- }
3181
- /** @oneof */
3182
- interface ExtendSubscriptionRequestExtendPolicyOneOf {
3183
- /** User won't be charged for additional period added on top of subscription end date. */
3184
- extensionPeriod?: Duration;
3578
+ aggregatedTaxBreakdowns?: AggregatedTaxBreakdown[];
3185
3579
  /**
3186
- * user will be charged for billing cycles added
3187
- * @min 1
3580
+ * Tax amount the merchant is NOT collecting because the customer is responsible for paying the authority directly (reverse charge / exempt). Optional; absence is treated as zero.
3581
+ * @format DECIMAL_VALUE
3582
+ * @decimalValue options { maxScale:4 }
3188
3583
  */
3189
- extensionBillingCycles?: number;
3190
- }
3191
- interface ExtendSubscriptionResponse {
3192
- /** The now extended subscription */
3193
- subscription?: Subscription;
3584
+ exemptAmount?: string | null;
3194
3585
  }
3195
- interface AllowedActionsRequest {
3196
- /** @format GUID */
3197
- id: string;
3586
+ interface AggregatedTaxBreakdown {
3198
3587
  /**
3199
- * List of additional fields to be included in the response.
3200
- * @maxSize 1
3588
+ * Name of the tax that was calculated.
3589
+ * @maxLength 200
3201
3590
  */
3202
- fields?: RequestedFieldsWithLiterals[];
3203
- }
3204
- declare enum RequestedFields {
3205
- /** Include unsupported action list, including the reasons for the lack of support */
3206
- UNSUPPORTED_ACTION = "UNSUPPORTED_ACTION"
3207
- }
3208
- /** @enumType */
3209
- type RequestedFieldsWithLiterals = RequestedFields | 'UNSUPPORTED_ACTION';
3210
- interface AllowedActionsResponse {
3211
- /** List of actions that are allowed. */
3212
- actions?: Action[];
3591
+ taxName?: string;
3213
3592
  /**
3214
- * List of actions that are not supported, included only if requested. Provides reasons for each unsupported action.
3215
- * @maxSize 20
3593
+ * Type of tax that was calculated.
3594
+ * @maxLength 200
3216
3595
  */
3217
- unsupportedActions?: UnsupportedAction[];
3596
+ taxType?: string;
3597
+ /**
3598
+ * Jurisdiction that taxes were calculated for.
3599
+ * @maxLength 200
3600
+ */
3601
+ jurisdiction?: string;
3602
+ /** Type of jurisdiction that taxes were calculated for. */
3603
+ jurisdictionType?: string;
3604
+ /**
3605
+ * Tax rate used for this jurisdiction, as a decimal. For example, 10% tax is `"0.1000"` and 200% tax is `"2.0000"`.
3606
+ * @decimalValue options { gte:0, maxScale:6 }
3607
+ */
3608
+ rate?: string;
3609
+ /**
3610
+ * Total amount of this tax for this jurisdiction.
3611
+ * @format DECIMAL_VALUE
3612
+ * @decimalValue options { maxScale:4 }
3613
+ */
3614
+ aggregatedTaxAmount?: string;
3615
+ /**
3616
+ * Total taxable amount of this tax
3617
+ * @internal
3618
+ * @format DECIMAL_VALUE
3619
+ * @decimalValue options { maxScale:4 }
3620
+ */
3621
+ aggregatedTaxableAmount?: string;
3218
3622
  }
3219
- interface UnsupportedAction {
3220
- actionType?: ActionTypeWithLiterals;
3623
+ interface RefundInfo {
3221
3624
  /**
3222
- * Provides detailed reasons for the unsupported action. Each `UnsupportedReason` includes a code and a message explaining why the action is not allowed.
3625
+ * If refunds are present, this will include the total amount refunded.
3626
+ * @format DECIMAL_VALUE
3627
+ * @decimalValue options { gte:0.00, maxScale:2 }
3628
+ */
3629
+ totalRefundAmount?: string | null;
3630
+ /**
3631
+ * The refunds that have been applied to this invoice
3223
3632
  * @maxSize 20
3224
3633
  */
3225
- reasons?: UnsupportedReason[];
3226
- }
3227
- interface UnsupportedReason {
3228
- code?: string;
3229
- description?: string | null;
3634
+ refunds?: Refund[];
3230
3635
  }
3231
- interface ListUpcomingChargesRequest {
3636
+ interface Refund {
3232
3637
  /**
3233
- * Subscription id charges to be previewed for
3638
+ * refund amount
3639
+ * @format DECIMAL_VALUE
3640
+ * @decimalValue options { gt:0.00, maxScale:2 }
3641
+ */
3642
+ amount?: string;
3643
+ /** the date of the refund transaction */
3644
+ transactionDate?: Date | null;
3645
+ /**
3646
+ * the transaction id associated with this refund
3234
3647
  * @format GUID
3235
3648
  */
3236
- subscriptionId: string;
3237
- /** Period of time to provide charged for. If not provided,then only next charge will be returned. */
3238
- customDuration?: Duration;
3649
+ transactionId?: string;
3650
+ /** a reason for the refund */
3651
+ reason?: RefundReasonWithLiterals;
3239
3652
  /**
3240
- * Date of the next billing cycle so that the upcoming charges will be calculated accordingly.
3241
- * If not provided, the upcoming charges will be calculated according to the existing next billing date.
3653
+ * a description of the refund - this is a free text field for the initiator
3654
+ * @maxLength 255
3242
3655
  */
3243
- nextBillingDate?: Date | null;
3244
- }
3245
- interface ListUpcomingChargesResponse {
3246
- upcomingCharges?: SubscriptionCharge[];
3247
- }
3248
- interface PreviewSubscriptionChargesRequest extends PreviewSubscriptionChargesRequestSubscriptionOneOf {
3249
- /** Information about a non-existing subscription. */
3250
- subscriptionInfo?: SubscriptionInfo;
3656
+ description?: string | null;
3251
3657
  }
3252
- /** @oneof */
3253
- interface PreviewSubscriptionChargesRequestSubscriptionOneOf {
3254
- /** Information about a non-existing subscription. */
3255
- subscriptionInfo?: SubscriptionInfo;
3658
+ declare enum RefundReason {
3659
+ DUPLICATE_CHARGE = "DUPLICATE_CHARGE",
3660
+ FRAUDULENT = "FRAUDULENT",
3661
+ CUSTOMER_REQUEST = "CUSTOMER_REQUEST",
3662
+ PROVISION_FAILED = "PROVISION_FAILED",
3663
+ OTHER = "OTHER"
3256
3664
  }
3257
- /** Subscription information to use for calculating the preview of charges for a subscription. */
3258
- interface SubscriptionInfo {
3259
- billingSettings?: BillingSettings;
3260
- items?: Item[];
3261
- startDate?: Date | null;
3665
+ /** @enumType */
3666
+ type RefundReasonWithLiterals = RefundReason | 'DUPLICATE_CHARGE' | 'FRAUDULENT' | 'CUSTOMER_REQUEST' | 'PROVISION_FAILED' | 'OTHER';
3667
+ interface ChangeSubscriptionRequest {
3668
+ /**
3669
+ * ID of the subscription to change
3670
+ * @format GUID
3671
+ */
3672
+ subscriptionId?: string;
3673
+ /**
3674
+ * Item-level changes. Each entry targets one existing item by ID.
3675
+ * Caller passes CONCRETE new values (price, quantity, name) — BASS does not resolve pricing.
3676
+ * BASS uses these for proration: old values (from subscription) vs new values (from here).
3677
+ */
3678
+ itemChanges?: SubscriptionItemChange[];
3679
+ /**
3680
+ * Subscription-level: new billing cycle (e.g., monthly to yearly).
3681
+ * Affects the billing period for ALL items.
3682
+ * When changing cycle, caller MUST also pass new prices in item_changes.
3683
+ */
3684
+ newCycle?: Duration;
3685
+ /** When the change takes effect. */
3686
+ effectiveTime?: ChangeEffectiveTimeWithLiterals;
3687
+ /** How to handle proration for immediate changes. Ignored for AT_NEXT_RENEWAL. */
3688
+ prorationBehavior?: ProrationBehaviorEnumProrationBehaviorWithLiterals;
3689
+ /** Payment context for immediate changes without checkout flow. */
3690
+ paymentContext?: ChangePaymentContext;
3262
3691
  }
3263
- interface PreviewSubscriptionChargesResponse {
3264
- /** Charges for subscription. */
3265
- charges?: Charge[];
3692
+ declare enum ProrationBehaviorEnumProrationBehavior {
3693
+ UNKNOWN = "UNKNOWN",
3694
+ /** Credit unused time + charge new prorated price (default for upgrades) */
3695
+ PRORATE_AND_CHARGE = "PRORATE_AND_CHARGE",
3696
+ /** Credit unused time + refund to payment method (downgrades) */
3697
+ PRORATE_AND_REFUND = "PRORATE_AND_REFUND",
3698
+ /** Convert unused value to extra days, no financial transaction */
3699
+ PRORATE_AND_EXTEND = "PRORATE_AND_EXTEND",
3700
+ /** Immediate switch with no financial adjustment */
3701
+ NO_PRORATION = "NO_PRORATION"
3266
3702
  }
3267
- /** Represents a charge applicable to a subscription. */
3268
- interface Charge {
3269
- /** The cycle number from which the charge starts. */
3270
- cycleFrom?: number;
3271
- /** The number of cycles for which the charge is applicable. */
3272
- cycleCount?: number | null;
3273
- /** The breakdown of the charge */
3274
- totals?: Totals;
3275
- /** The billing date from which the charge starts */
3276
- cycleBillingDate?: Date | null;
3703
+ /** @enumType */
3704
+ type ProrationBehaviorEnumProrationBehaviorWithLiterals = ProrationBehaviorEnumProrationBehavior | 'UNKNOWN' | 'PRORATE_AND_CHARGE' | 'PRORATE_AND_REFUND' | 'PRORATE_AND_EXTEND' | 'NO_PRORATION';
3705
+ /** Payment context for immediate subscription changes without the checkout flow. */
3706
+ interface ChangePaymentContext {
3707
+ /** Payment settings override for this change */
3708
+ paymentSettings?: PaymentSettings;
3277
3709
  }
3278
- interface PreviewSubscriptionsChargesRequest {
3710
+ interface ChangeSubscriptionResponse {
3711
+ /** Updated subscription */
3712
+ subscription?: Subscription;
3713
+ /** Proration calculation result. Present for immediate changes with proration. */
3714
+ prorationResult?: V1ProrationResult;
3279
3715
  /**
3280
- * Information required to calculate the preview charges for the subscriptions, including an identifier.
3281
- * @minSize 1
3282
- * @maxSize 10
3716
+ * ID of the adjustment invoice created for the proration charge or refund.
3717
+ * @format GUID
3283
3718
  */
3284
- subscriptionsBillingDetails?: SubscriptionBillingDetails[];
3719
+ adjustmentInvoiceId?: string | null;
3720
+ }
3721
+ /** Result of a proration calculation applied during a subscription change. */
3722
+ interface V1ProrationResult {
3285
3723
  /**
3286
- * Specifies the number of upcoming billing charges to preview for all subscriptions in the order.
3287
- * For instance, if a subscription costs $10 for the first 3 cycles, $12 for cycles 4 through 7,
3288
- * $15 for cycles 8 through 10, and $20 for cycle 11 onwards:
3289
- * - Sending "1" will calculate and return charges for cycles 4 through 7 since it's the first charge in the future.
3290
- * - Sending "2" will provide a response with charges for cycles 4 through 7 and cycles 8 through 10.
3291
- * - Sending "3" or more will include totals for cycles 4 through 7, cycles 8 through 10, and from cycle 11 onwards.
3292
- * If no value is provided, the response will include charges for all upcoming cycles, including the existing one,
3293
- * in this case, charges for cycle 1 through 3.
3294
- * If there is a single charge for a subscription, meaning that subscription price remains consistent across all cycles,
3295
- * then even if future_charges_count is set, it will be ignored and the only charge this subscription has will be returned.
3296
- * @min 1
3297
- * @max 10
3724
+ * Credit amount for unused time on the current plan
3725
+ * @format DECIMAL_VALUE
3298
3726
  */
3299
- numberOfNextRecurringCharges?: number | null;
3300
- }
3301
- interface SubscriptionBillingDetails {
3727
+ creditAmount?: string;
3302
3728
  /**
3303
- * External identifier of the subscription
3304
- * @format GUID
3729
+ * Charge amount for the new plan's prorated price
3730
+ * @format DECIMAL_VALUE
3305
3731
  */
3306
- externalId?: string | null;
3307
- /** Billing details parameters including schedule, currency, etc. */
3308
- billingSettings?: BillingSettings;
3732
+ chargeAmount?: string;
3309
3733
  /**
3310
- * Items, minSize is 1, maxSize is 100
3311
- * @minSize 1
3312
- * @maxSize 100
3734
+ * Net amount (charge minus credit). Positive means customer pays, negative means refund.
3735
+ * @format DECIMAL_VALUE
3313
3736
  */
3314
- items?: Item[];
3315
- /** Subscription start date, now if not set */
3316
- startDate?: Date | null;
3317
- /** Shipping address associated with subscription. At the moment used only for payments. Optional. */
3318
- shippingAddress?: FullAddressDetails;
3319
- }
3320
- interface PreviewSubscriptionsChargesResponse {
3321
- /** Charges for the subscriptions, including an identifier. */
3322
- subscriptionsCharges?: SubscriptionCharges[];
3737
+ netAmount?: string;
3738
+ /** Date when the proration was calculated */
3739
+ prorationDate?: Date | null;
3740
+ /** Remaining seconds in the current billing period at time of change */
3741
+ remainingSeconds?: string;
3742
+ /** Total seconds in the current billing cycle */
3743
+ totalCycleSeconds?: string;
3323
3744
  }
3324
- interface SubscriptionCharges {
3745
+ interface PreviewChangeSubscriptionRequest {
3325
3746
  /**
3326
- * External identifier of the subscription
3747
+ * ID of the subscription to preview the change for
3327
3748
  * @format GUID
3328
3749
  */
3329
- externalId?: string | null;
3330
- /** Charges for subscription. */
3331
- charges?: Charge[];
3750
+ subscriptionId?: string;
3751
+ /** Item-level changes to preview. Same structure as ChangeSubscriptionRequest. */
3752
+ itemChanges?: SubscriptionItemChange[];
3753
+ /** Subscription-level: preview a cycle change. */
3754
+ newCycle?: Duration;
3755
+ /** When the change would take effect. */
3756
+ effectiveTime?: ChangeEffectiveTimeWithLiterals;
3757
+ /** How proration would be handled for immediate changes. */
3758
+ prorationBehavior?: ProrationBehaviorEnumProrationBehaviorWithLiterals;
3332
3759
  }
3333
- interface CreateSubscriptionForOrderRequest {
3334
- /** Subscription needs to be created */
3335
- subscription?: Subscription;
3760
+ interface CancelPendingChangeRequest {
3336
3761
  /**
3337
- * Optional unique identifier for this request in order to prevent subscription duplications
3762
+ * ID of the subscription to cancel the pending change for
3338
3763
  * @format GUID
3339
3764
  */
3340
- idempotencyKey?: string | null;
3765
+ subscriptionId?: string;
3341
3766
  }
3342
- interface CreateSubscriptionForOrderResponse {
3343
- /** Created subscription */
3767
+ interface CancelPendingChangeResponse {
3768
+ /** Updated subscription with cleared pending data */
3344
3769
  subscription?: Subscription;
3345
- /** Non-persistent invoice */
3346
- invoice?: Invoice;
3347
3770
  }
3348
- /** An invoice includes information about the subscription and the customer. */
3349
- interface Invoice {
3771
+ interface ChangeSubscriptionForOrderRequest {
3772
+ /** The new subscription definition from the order (items, billing settings). */
3773
+ subscription?: Subscription;
3774
+ /** Context of the change: source subscription, change type, proration behavior. */
3775
+ changeContext?: ChangeContext;
3776
+ }
3777
+ /**
3778
+ * Context for subscription changes within the order/checkout flow.
3779
+ * Carries the source subscription reference and change parameters.
3780
+ * Present on an OrderSubscription when it represents a modification of an
3781
+ * existing subscription rather than a new purchase.
3782
+ */
3783
+ interface ChangeContext {
3350
3784
  /**
3351
- * Invoice ID.
3785
+ * ID of the existing subscription being changed.
3352
3786
  * @format GUID
3353
- * @readonly
3354
3787
  */
3355
- id?: string | null;
3788
+ sourceSubscriptionId?: string;
3789
+ /** Type of change being performed. */
3790
+ changeType?: ChangeTypeWithLiterals;
3791
+ /** How proration should be handled. */
3792
+ prorationBehavior?: ProrationBehaviorWithLiterals;
3356
3793
  /**
3357
- * Date and time the invoice was created.
3358
- * @readonly
3359
- */
3360
- createdDate?: Date | null;
3361
- /**
3362
- * Date and time the invoice was last updated.
3363
- * @readonly
3364
- */
3365
- updatedDate?: Date | null;
3366
- /**
3367
- * Revision number, which increments by 1 each time the invoice is updated.
3368
- * To prevent conflicting changes,
3369
- * the current revision must be passed when updating the invoice.
3370
- *
3371
- * Ignored when creating a invoice.
3372
- * @readonly
3373
- */
3374
- revision?: string | null;
3375
- /** Information about the invoice origin. */
3376
- origin?: BusinessOriginData;
3377
- /**
3378
- * Invoice status.
3379
- *
3380
- * + `"UNKNOWN"`: There is no information about the invoice status.
3381
- * + `"OPEN"`: BASS has created the invoice but hasn't initiated the payment process.
3382
- * + `"PAID"`: The customer has successfully paid for the invoice.
3383
- * + `"ATTEMPT_FAILED"`: The payment process has started and there has been at least one unsuccessful payment attempt.
3384
- * + `"FAILED"`: The payment process has failed and there are no more retries.
3385
- * + `"CANCELED"`: The payment process has been stopped because the related subscription has been canceled.
3386
- * @readonly
3794
+ * System-populated: proration result after calculation.
3795
+ * Populated by billing-subscriptions during order processing.
3387
3796
  */
3388
- status?: InvoiceStatusWithLiterals;
3797
+ prorationResult?: ProrationResult;
3798
+ }
3799
+ declare enum ChangeType {
3800
+ CHANGE_TYPE_UNKNOWN = "CHANGE_TYPE_UNKNOWN",
3801
+ UPGRADE = "UPGRADE",
3802
+ DOWNGRADE = "DOWNGRADE",
3803
+ CYCLE_CHANGE = "CYCLE_CHANGE",
3804
+ QUANTITY_CHANGE = "QUANTITY_CHANGE"
3805
+ }
3806
+ /** @enumType */
3807
+ type ChangeTypeWithLiterals = ChangeType | 'CHANGE_TYPE_UNKNOWN' | 'UPGRADE' | 'DOWNGRADE' | 'CYCLE_CHANGE' | 'QUANTITY_CHANGE';
3808
+ declare enum ProrationBehavior {
3809
+ PRORATION_BEHAVIOR_UNKNOWN = "PRORATION_BEHAVIOR_UNKNOWN",
3810
+ /** Credit unused time + charge new prorated price (default for upgrades) */
3811
+ PRORATE_AND_CHARGE = "PRORATE_AND_CHARGE",
3812
+ /** Credit unused time + refund to payment method (downgrades) */
3813
+ PRORATE_AND_REFUND = "PRORATE_AND_REFUND",
3814
+ /** Convert unused value to extra days, no financial transaction */
3815
+ PRORATE_AND_EXTEND = "PRORATE_AND_EXTEND",
3816
+ /** Immediate switch with no financial adjustment */
3817
+ NO_PRORATION = "NO_PRORATION"
3818
+ }
3819
+ /** @enumType */
3820
+ type ProrationBehaviorWithLiterals = ProrationBehavior | 'PRORATION_BEHAVIOR_UNKNOWN' | 'PRORATE_AND_CHARGE' | 'PRORATE_AND_REFUND' | 'PRORATE_AND_EXTEND' | 'NO_PRORATION';
3821
+ /**
3822
+ * Result of a proration calculation. Contains the credit, charge, and net amounts
3823
+ * computed during a subscription change.
3824
+ */
3825
+ interface ProrationResult {
3389
3826
  /**
3390
- * 3-letter currency code of the invoice in
3391
- * [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
3392
- * @format CURRENCY
3827
+ * Credit amount for unused time on the current plan
3828
+ * @format DECIMAL_VALUE
3393
3829
  */
3394
- currency?: string;
3395
- /** Information about the customer. */
3396
- customer?: Customer;
3830
+ creditAmount?: string;
3397
3831
  /**
3398
- * Whether the payment is processed through Wix and whether the customer must provide some input.
3399
- *
3400
- * + `"UNKNOWN"`: There is no information about the collection method.
3401
- * + `"AUTO_CHARGE"`: The customer pays automatically through Wix.
3402
- * + `"SEND_INVOICE"`: The customer pays through Wix, but some manual input is required.
3403
- * + `"OFFLINE"`: The customer pays outside of Wix.
3832
+ * Charge amount for the new plan's prorated price
3833
+ * @format DECIMAL_VALUE
3404
3834
  */
3405
- collectionMethod?: CollectionMethodWithLiterals;
3835
+ chargeAmount?: string;
3406
3836
  /**
3407
- * ID of the
3408
- * [payment method](https://bo.wix.com/wix-docs/rest/wix-cashier/settings/payment-method-type/payment-method-type-object).
3409
- * Not available for the first payment of a subscription and all offline
3410
- * payments.
3411
- * @format GUID
3837
+ * Net amount (charge minus credit). Positive means customer pays, negative means refund.
3838
+ * @format DECIMAL_VALUE
3412
3839
  */
3413
- paymentMethodId?: string | null;
3840
+ netAmount?: string;
3841
+ /** Date when the proration was calculated */
3842
+ prorationDate?: Date | null;
3843
+ /** Remaining seconds in the current billing period at time of change */
3844
+ remainingSeconds?: string;
3845
+ /** Total seconds in the current billing cycle */
3846
+ totalCycleSeconds?: string;
3847
+ }
3848
+ interface ChangeSubscriptionForOrderResponse {
3849
+ /** The source subscription (unchanged, for reference). */
3850
+ subscription?: Subscription;
3851
+ /** Non-persistent invoice with proration adjustments. */
3852
+ invoice?: Invoice;
3853
+ /** Calculated proration result. */
3854
+ prorationResult?: ProrationResult;
3855
+ }
3856
+ interface Task {
3857
+ key?: TaskKey;
3858
+ executeAt?: Date | null;
3859
+ payload?: string | null;
3860
+ }
3861
+ interface TaskKey {
3862
+ appId?: string;
3863
+ instanceId?: string;
3864
+ subjectId?: string | null;
3865
+ }
3866
+ interface TaskAction extends TaskActionActionOneOf {
3867
+ complete?: Complete;
3868
+ cancel?: Cancel;
3869
+ reschedule?: Reschedule;
3870
+ }
3871
+ /** @oneof */
3872
+ interface TaskActionActionOneOf {
3873
+ complete?: Complete;
3874
+ cancel?: Cancel;
3875
+ reschedule?: Reschedule;
3876
+ }
3877
+ interface Complete {
3878
+ }
3879
+ interface Cancel {
3880
+ }
3881
+ interface Reschedule {
3882
+ executeAt?: Date | null;
3883
+ payload?: string | null;
3884
+ }
3885
+ interface Empty {
3886
+ }
3887
+ interface V1SubscriptionEvent extends V1SubscriptionEventEventOneOf {
3888
+ /** A subscriptions was created */
3889
+ created?: V1SubscriptionCreated;
3890
+ /** Subscription is considered active and will be visible to site owners and members */
3891
+ activated?: V1SubscriptionActivated;
3414
3892
  /**
3415
- * Cashier [Order ID](https://dev.wix.com/docs/rest/payments/wix-cashier/pay/order#order-object)
3416
- * for the corresponding payment.
3417
- * @format GUID
3418
- * @readonly
3893
+ * Subscription was canceled either by cancellation request with requested expiration date NOW or by payment provider.
3894
+ * If cancelled by payment provider subscription will be valid until the date calculated depending on how many cycles it was already paid for.
3419
3895
  */
3420
- paymentOrderId?: string | null;
3421
- /** Information about a discount. Available only for invoices that include a discount. */
3422
- discount?: InvoiceDiscount;
3423
- /** Billing address. */
3424
- billingAddress?: FullAddressDetails;
3425
- /** Shipping address. Available only for `"PHYSICAL"` line items. */
3426
- shippingAddress?: FullAddressDetails;
3896
+ canceled?: V1SubscriptionCanceled;
3897
+ /** Subscription was updated. Currently the only possible change is valid_until date */
3898
+ updated?: V1SubscriptionUpdated;
3899
+ /** Subscription cycle has started. Currently the cycle starts when a payment is received. */
3900
+ cycleTriggered?: SubscriptionCycleTriggered;
3901
+ /** Offline subscription was marked as paid */
3902
+ markedAsPaid?: SubscriptionMarkedAsPaid;
3427
3903
  /**
3428
- * Shipping fee in `0.00` format.
3429
- * @format DECIMAL_VALUE
3904
+ * Subscription cancellation for the future date was requested.
3905
+ * Subscription will stay in pending cancellation status until the date calculated depending on free trial and the next payment date.
3430
3906
  */
3431
- shippingFee?: string | null;
3907
+ cancellationRequested?: SubscriptionCancellationRequested;
3908
+ /** Subscription and it's payment schedule (for recurring) was suspended */
3909
+ suspended?: SubscriptionSuspended;
3910
+ /** Previously suspended subscription and it's payment schedule (for recurring) was resumed */
3911
+ resumed?: V1SubscriptionResumed;
3912
+ /** Subscription expired according to valid_until expiration date. */
3913
+ expired?: SubscriptionExpired;
3914
+ /** Subscription initial purchase completed */
3915
+ initialPurchaseCompleted?: V1SubscriptionInitialPurchaseCompleted;
3916
+ }
3917
+ /** @oneof */
3918
+ interface V1SubscriptionEventEventOneOf {
3919
+ /** A subscriptions was created */
3920
+ created?: V1SubscriptionCreated;
3921
+ /** Subscription is considered active and will be visible to site owners and members */
3922
+ activated?: V1SubscriptionActivated;
3432
3923
  /**
3433
- * Information about the invoice's totals.
3434
- * @readonly
3924
+ * Subscription was canceled either by cancellation request with requested expiration date NOW or by payment provider.
3925
+ * If cancelled by payment provider subscription will be valid until the date calculated depending on how many cycles it was already paid for.
3435
3926
  */
3436
- totals?: Totals;
3437
- /** Line items belonging to the invoice. */
3438
- invoiceItems?: InvoiceItem[];
3927
+ canceled?: V1SubscriptionCanceled;
3928
+ /** Subscription was updated. Currently the only possible change is valid_until date */
3929
+ updated?: V1SubscriptionUpdated;
3930
+ /** Subscription cycle has started. Currently the cycle starts when a payment is received. */
3931
+ cycleTriggered?: SubscriptionCycleTriggered;
3932
+ /** Offline subscription was marked as paid */
3933
+ markedAsPaid?: SubscriptionMarkedAsPaid;
3439
3934
  /**
3440
- * Whether the invoice is used to validate payment details.
3441
- *
3442
- * + `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.
3443
- * + `false`: Standard invoice.
3935
+ * Subscription cancellation for the future date was requested.
3936
+ * Subscription will stay in pending cancellation status until the date calculated depending on free trial and the next payment date.
3444
3937
  */
3445
- isAuthorization?: boolean | null;
3446
- /** Whether the invoice's `totals.totalPrice` includes tax. */
3447
- isTaxInclusive?: boolean | null;
3448
- /** Details of the latest payment attempt. */
3449
- latestPaymentAttempt?: LatestPaymentAttempt;
3450
- /** List of charges and credits that adjust the invoice's `totals.totalPrice`. */
3451
- adjustments?: PriceAdjustment[];
3938
+ cancellationRequested?: SubscriptionCancellationRequested;
3939
+ /** Subscription and it's payment schedule (for recurring) was suspended */
3940
+ suspended?: SubscriptionSuspended;
3941
+ /** Previously suspended subscription and it's payment schedule (for recurring) was resumed */
3942
+ resumed?: V1SubscriptionResumed;
3943
+ /** Subscription expired according to valid_until expiration date. */
3944
+ expired?: SubscriptionExpired;
3945
+ /** Subscription initial purchase completed */
3946
+ initialPurchaseCompleted?: V1SubscriptionInitialPurchaseCompleted;
3947
+ }
3948
+ interface V1SubscriptionCreated {
3949
+ subscription?: V1Subscription;
3950
+ }
3951
+ interface V1Subscription {
3452
3952
  /**
3453
- * Invoice Number.
3454
- * @maxLength 10
3953
+ * ID of the subscription
3954
+ * @format GUID
3455
3955
  * @readonly
3456
3956
  */
3457
- invoiceNumber?: string | null;
3458
- /**
3459
- * Shipping charges for the invoice.
3460
- * Supports only one discount without cycles.
3461
- * Discounts with cycles (repeated discounts across different billing cycles) are not supported for shipping
3462
- */
3463
- shippingCharges?: InvoiceShippingCharges;
3464
- /** Information about the invoice tax */
3465
- taxData?: TaxData;
3466
- /** Business address. */
3467
- businessAddress?: Address;
3957
+ id?: string;
3468
3958
  /**
3469
- * ID of the billing order that created this invoice.
3959
+ * ID of the app which created the subscription
3470
3960
  * @format GUID
3471
3961
  */
3472
- orderId?: string | null;
3962
+ wixAppId?: string;
3473
3963
  /**
3474
- * Platform origin the invoice is originated from.
3964
+ * Instance ID of the Subscriptions app
3475
3965
  * @format GUID
3476
3966
  */
3477
- platformOriginAppId?: string | null;
3967
+ tenantId?: string;
3478
3968
  /**
3479
- * Refund information, provided that there are refunds for this invoice.
3480
- * @readonly
3969
+ * ID of entity in app (e.g. a cart in stores/order in paid plans)
3970
+ * @format GUID
3481
3971
  */
3482
- refundInfo?: RefundInfo;
3483
- }
3484
- interface BusinessOriginData {
3972
+ originEntityId?: string;
3973
+ /** Site member or a contact who bought the subscription */
3974
+ subscriber?: Subscriber;
3485
3975
  /**
3486
- * ID of the app for which BASS has created the invoice. For example,
3487
- * `"1380b703-ce81-ff05-f115-39571d94dfcd"` for the Wix eCommerce app.
3976
+ * Wix Pay order ID, is empty for free subscriptions
3488
3977
  * @format GUID
3489
3978
  */
3490
- appId?: string;
3979
+ wixPayOrderId?: string | null;
3491
3980
  /**
3492
- * [Instance ID](https://dev.wix.com/api/rest/app-management/apps/app-instance/get-app-instance)
3493
- * of the app for which BASS has created the invoice.
3494
- * @format GUID
3981
+ * Subscription name (e.g. a product or subscription package name)
3982
+ * @maxLength 150
3495
3983
  */
3496
- instanceId?: string;
3984
+ name?: string;
3497
3985
  /**
3498
- * ID of the entity that triggered the invoice creation. For example, the ID of a
3499
- * [pricing plan](https://dev.wix.com/docs/rest/payments/pricing-plans/pricing-plans/plan#plan-object).
3500
- * @format GUID
3986
+ * Optional additional subscription description
3987
+ * @maxLength 500
3501
3988
  */
3502
- entityId?: string;
3503
- }
3504
- declare enum InvoiceStatus {
3505
- UNKNOWN = "UNKNOWN",
3506
- OPEN = "OPEN",
3507
- PAID = "PAID",
3508
- FAILED = "FAILED",
3509
- ATTEMPT_FAILED = "ATTEMPT_FAILED",
3510
- CANCELED = "CANCELED",
3511
- REFUNDED = "REFUNDED",
3512
- CHARGEBACKED = "CHARGEBACKED"
3513
- }
3514
- /** @enumType */
3515
- type InvoiceStatusWithLiterals = InvoiceStatus | 'UNKNOWN' | 'OPEN' | 'PAID' | 'FAILED' | 'ATTEMPT_FAILED' | 'CANCELED' | 'REFUNDED' | 'CHARGEBACKED';
3516
- declare enum CollectionMethod {
3517
- UNKNOWN = "UNKNOWN",
3518
- AUTO_CHARGE = "AUTO_CHARGE",
3519
- OFFLINE = "OFFLINE",
3520
- SEND_INVOICE = "SEND_INVOICE"
3521
- }
3522
- /** @enumType */
3523
- type CollectionMethodWithLiterals = CollectionMethod | 'UNKNOWN' | 'AUTO_CHARGE' | 'OFFLINE' | 'SEND_INVOICE';
3524
- declare enum CreationMode {
3525
- UNKNOWN = "UNKNOWN",
3526
- SYSTEM = "SYSTEM",
3527
- MANUAL = "MANUAL"
3989
+ description?: string;
3990
+ /** Amount to be paid for a single scheduled payment */
3991
+ price?: Money;
3992
+ /** True if the subscription is recurring, false for a single payment subscription */
3993
+ recurring?: boolean;
3994
+ /** Online (paid by subscriber using wix pay) or offline (need to manually mark as paid) */
3995
+ subscriptionType?: SubscriptionTypeWithLiterals;
3996
+ /** Active, expired, canceled, etc. */
3997
+ subscriptionStatus?: V1SubscriptionStatusEnumSubscriptionStatusWithLiterals;
3998
+ /** Subscription start date (may differ from creation date) */
3999
+ validFrom?: Date | null;
4000
+ /** Subscription expiration date */
4001
+ validUntil?: Date | null;
4002
+ /** Status of last payment associated with this subscription */
4003
+ lastPaymentStatus?: PaymentStatusEnumPaymentStatusWithLiterals;
4004
+ /** Payment schedule in the wix pay format. Exists for recurring subscriptions only. */
4005
+ billingProfile?: V2Subscription;
4006
+ /** Owner, member, etc. - present if subscription is canceled */
4007
+ cancellationInitiator?: CancellationInitiatorWithLiterals;
4008
+ /** Optional, present if subscription is canceled */
4009
+ cancellationReason?: string | null;
4010
+ /** Can be used for arbitrary app-specific map<string, string> data */
4011
+ externalData?: Record<string, string>;
4012
+ /** Date when subscription was created (not related to payment dates) */
4013
+ dateCreated?: Date | null;
4014
+ /** Restrictions on possible subscription actions. Default policy has all restrictions enabled. */
4015
+ policy?: SubscriptionPolicy;
4016
+ /** List of subscription suspension periods */
4017
+ suspensions?: Suspension[];
4018
+ /** Initial subscription expiration date that was calculated on the subscription purchase plus duration of suspensions */
4019
+ validUntilDateWithSuspensions?: Date | null;
4020
+ /** Duration of single payment subscription (instead of billing_profile) */
4021
+ singlePaymentDuration?: V1Duration;
4022
+ /** @format GUID */
4023
+ originInstanceId?: string | null;
3528
4024
  }
3529
- /** @enumType */
3530
- type CreationModeWithLiterals = CreationMode | 'UNKNOWN' | 'SYSTEM' | 'MANUAL';
3531
- interface LatestPaymentAttempt {
4025
+ interface Subscriber {
3532
4026
  /**
3533
- * ID of the latest payment attempt.
4027
+ * Member or contact ID
3534
4028
  * @format GUID
3535
- * @readonly
3536
- */
3537
- paymentAttemptId?: string;
3538
- /**
3539
- * Date and time of the latest payment attempt in `YYYY-MM-DDThh:mm.sssZ` format.
3540
- * @readonly
3541
- */
3542
- dateAttempt?: Date | null;
3543
- /** Number of the latest payment attempt. */
3544
- attemptNumber?: number;
3545
- /**
3546
- * Status of the latest payment attempt.
3547
- *
3548
- * + `"UNKNOWN"`: There is no information about the status of the latest payment attempt.
3549
- * + `"SCHEDULED"`: The latest payment attempt is scheduled but hasn't started yet.
3550
- * + `"IN_PROGRESS"`: The latest payment attempt is in progress.
3551
- * + `"PAID"`: The latest payment attempt resulted in a successful payment.
3552
- * + `"DECLINED"`: The latest payment attempt has been declined.
3553
- * + `"TECHNICAL_FAILURE"`: The latest payment attempt couldn't be process due to a technical failure.
3554
- * + `"CANCELED"`: The latest payment attempt has been canceled by BASS.
3555
- * @readonly
3556
4029
  */
3557
- status?: PaymentAttemptStatusWithLiterals;
4030
+ id?: string;
4031
+ /** Member or contact */
4032
+ identityType?: IdentityTypeWithLiterals;
4033
+ }
4034
+ declare enum IdentityType {
4035
+ /** Identity type undefined */
4036
+ UNDEFINED = "UNDEFINED",
4037
+ /** Subscription is associated with a member ID */
4038
+ MEMBER = "MEMBER",
4039
+ /** Subscriptions is associated with a contact ID */
4040
+ CONTACT = "CONTACT"
4041
+ }
4042
+ /** @enumType */
4043
+ type IdentityTypeWithLiterals = IdentityType | 'UNDEFINED' | 'MEMBER' | 'CONTACT';
4044
+ /** Price of a payment. Includes amount and currency. */
4045
+ interface Money {
3558
4046
  /**
3559
- * Whether BASS tries to collect the payment another time. Available only when
3560
- * `latestPaymentAttempt.status` is set to `"DECLINED"`.
4047
+ * Monetary amount i.e. 3.99.
4048
+ * @format DECIMAL_VALUE
3561
4049
  */
3562
- retryable?: boolean;
4050
+ amount?: string;
3563
4051
  /**
3564
- * Platform fee that was collected on this transaction.
3565
- * @format DECIMAL_VALUE
3566
- * @decimalValue options { gte:0.00, maxScale:2 }
3567
- * @readonly
4052
+ * Currency in ISO 4217 format i.e. USD.
4053
+ * @minLength 3
4054
+ * @maxLength 3
3568
4055
  */
3569
- appliedPlatformFee?: string | null;
4056
+ currency?: string;
3570
4057
  }
3571
- declare enum PaymentAttemptStatus {
3572
- UNKNOWN = "UNKNOWN",
3573
- SCHEDULED = "SCHEDULED",
3574
- IN_PROGRESS = "IN_PROGRESS",
3575
- PAID = "PAID",
3576
- DECLINED = "DECLINED",
3577
- TECHNICAL_FAILURE = "TECHNICAL_FAILURE",
3578
- CANCELED = "CANCELED",
3579
- PENDING = "PENDING",
3580
- REFUNDED = "REFUNDED",
3581
- CHARGEBACKED = "CHARGEBACKED"
4058
+ declare enum SubscriptionType {
4059
+ UNDEFINED = "UNDEFINED",
4060
+ /** Payments made by the subscriber */
4061
+ ONLINE = "ONLINE",
4062
+ /** Payments managed manually by the site owner */
4063
+ OFFLINE = "OFFLINE"
3582
4064
  }
3583
4065
  /** @enumType */
3584
- type PaymentAttemptStatusWithLiterals = PaymentAttemptStatus | 'UNKNOWN' | 'SCHEDULED' | 'IN_PROGRESS' | 'PAID' | 'DECLINED' | 'TECHNICAL_FAILURE' | 'CANCELED' | 'PENDING' | 'REFUNDED' | 'CHARGEBACKED';
3585
- interface PriceAdjustment extends PriceAdjustmentAdjustmentTypeOneOf {
3586
- /** Adjustment that increases the price. */
3587
- charge?: PriceAdjustmentValue;
3588
- /** Adjustment that lowers the price. */
3589
- credit?: PriceAdjustmentValue;
3590
- /** Reason for this price adjustment. Used to categorize proration adjustments. */
3591
- reason?: PriceAdjustmentReasonWithLiterals;
4066
+ type SubscriptionTypeWithLiterals = SubscriptionType | 'UNDEFINED' | 'ONLINE' | 'OFFLINE';
4067
+ declare enum V1SubscriptionStatusEnumSubscriptionStatus {
4068
+ /** Subscription status undefined */
4069
+ UNDEFINED = "UNDEFINED",
4070
+ /** Subscription created, but hasn't been paid for yet. This status if filtered out in ListSubscriptions response by default. */
4071
+ DRAFT = "DRAFT",
4072
+ /** Subscription has been paid for, but the start date is in the future */
4073
+ PENDING = "PENDING",
4074
+ /** Subscription is active */
4075
+ ACTIVE = "ACTIVE",
4076
+ /** Subscription has expired */
4077
+ EXPIRED = "EXPIRED",
4078
+ /** Subscription has been canceled */
4079
+ CANCELED = "CANCELED",
4080
+ /** Subscription has been set to be canceled at a future date */
4081
+ PENDING_CANCELLATION = "PENDING_CANCELLATION",
4082
+ /** Subscription is suspended */
4083
+ SUSPENDED = "SUSPENDED"
3592
4084
  }
3593
- /** @oneof */
3594
- interface PriceAdjustmentAdjustmentTypeOneOf {
3595
- /** Adjustment that increases the price. */
3596
- charge?: PriceAdjustmentValue;
3597
- /** Adjustment that lowers the price. */
3598
- credit?: PriceAdjustmentValue;
4085
+ /** @enumType */
4086
+ type V1SubscriptionStatusEnumSubscriptionStatusWithLiterals = V1SubscriptionStatusEnumSubscriptionStatus | 'UNDEFINED' | 'DRAFT' | 'PENDING' | 'ACTIVE' | 'EXPIRED' | 'CANCELED' | 'PENDING_CANCELLATION' | 'SUSPENDED';
4087
+ declare enum PaymentStatusEnumPaymentStatus {
4088
+ /** Payment status undefined */
4089
+ UNDEFINED = "UNDEFINED",
4090
+ /** Payment has been paid */
4091
+ PAID = "PAID",
4092
+ /** Payment has been refunded */
4093
+ REFUNDED = "REFUNDED",
4094
+ /** Recurring payment has failed */
4095
+ FAILED = "FAILED",
4096
+ /** Payment has not been paid */
4097
+ UNPAID = "UNPAID",
4098
+ /** Billing has been initialized, but actual charge is yet to be made. Can happen for free trial and PayPal */
4099
+ PENDING = "PENDING"
3599
4100
  }
3600
- interface PriceAdjustmentValue extends PriceAdjustmentValueAdjustmentValueTypeOneOf {
4101
+ /** @enumType */
4102
+ type PaymentStatusEnumPaymentStatusWithLiterals = PaymentStatusEnumPaymentStatus | 'UNDEFINED' | 'PAID' | 'REFUNDED' | 'FAILED' | 'UNPAID' | 'PENDING';
4103
+ /**
4104
+ * Recurring payment is described by `frequency` (day, week, month) and `interval`.
4105
+ *
4106
+ * For example, to create a recurring payment every 14 days, just set `interval` to 14 and frequency to `DAY`.
4107
+ *
4108
+ * In some cases there should be a trial period for the order, after which payments start to occur.
4109
+ * Trial period is also defined as `frequency` and `interval` pair.
4110
+ *
4111
+ * So one can define a monthly 'subscription' with a 14 days trial period.
4112
+ */
4113
+ interface V2Subscription {
4114
+ /** frequency of recurring payment (required) */
4115
+ frequency?: SubscriptionFrequencyWithLiterals;
4116
+ /** interval of recurring payment (required) */
4117
+ interval?: number;
4118
+ /** trial period for recurring payment (optional) */
4119
+ trial?: SubscriptionTrialPeriod;
3601
4120
  /**
3602
- * Absolute amount that adjusts the price.
3603
- *
3604
- * Min: `0.01`
3605
- * @decimalValue options { gt:0.00 }
4121
+ * how many billing cycles should be done before subscription finishes
4122
+ * (optional, 0 by default means endless subscription)
3606
4123
  */
3607
- amount?: string;
4124
+ billingCycles?: number;
3608
4125
  /**
3609
- * Relative factor that adjusts the price. For example, setting
3610
- * `multiplier` to:
3611
- * - `0.50` results in a price adjustment of 50% of the original value.
3612
- * - `0.75` results in a price adjustment of 75% of the original value.
3613
- * - `1.00` results in a price adjustment of 100% of the original value.
3614
- *
3615
- * Min: `0.01`
3616
- * Max: `1.00`
3617
- * @decimalValue options { gt:0.00, lte:1 }
4126
+ * date in the future or in the past when the first billing cycle begins
4127
+ * (the first off-session payment is performed when it ends)
3618
4128
  */
3619
- multiplier?: string;
4129
+ firstCycleStartDate?: Date | null;
3620
4130
  }
3621
- /** @oneof */
3622
- interface PriceAdjustmentValueAdjustmentValueTypeOneOf {
3623
- /**
3624
- * Absolute amount that adjusts the price.
3625
- *
3626
- * Min: `0.01`
3627
- * @decimalValue options { gt:0.00 }
3628
- */
3629
- amount?: string;
3630
- /**
3631
- * Relative factor that adjusts the price. For example, setting
3632
- * `multiplier` to:
3633
- * - `0.50` results in a price adjustment of 50% of the original value.
3634
- * - `0.75` results in a price adjustment of 75% of the original value.
3635
- * - `1.00` results in a price adjustment of 100% of the original value.
3636
- *
3637
- * Min: `0.01`
3638
- * Max: `1.00`
3639
- * @decimalValue options { gt:0.00, lte:1 }
3640
- */
3641
- multiplier?: string;
4131
+ /** Frequency unit of recurring payment */
4132
+ declare enum SubscriptionFrequency {
4133
+ UNDEFINED = "UNDEFINED",
4134
+ DAY = "DAY",
4135
+ WEEK = "WEEK",
4136
+ MONTH = "MONTH",
4137
+ YEAR = "YEAR"
3642
4138
  }
3643
- /** Reason for a price adjustment. Categorizes different types of proration adjustments. */
3644
- declare enum PriceAdjustmentReason {
3645
- /** Default value. Used for adjustments without a specific categorization. */
3646
- PRICE_ADJUSTMENT_REASON_UNSPECIFIED = "PRICE_ADJUSTMENT_REASON_UNSPECIFIED",
3647
- /** Adjustment due to a billing date change. */
3648
- BILLING_DATE_CHANGE = "BILLING_DATE_CHANGE",
3649
- /** Proration adjustment from changing the subscription plan. */
3650
- PLAN_CHANGE_PRORATION = "PLAN_CHANGE_PRORATION",
3651
- /** Proration adjustment from changing the billing cycle (e.g., monthly to yearly). */
3652
- CYCLE_CHANGE_PRORATION = "CYCLE_CHANGE_PRORATION",
3653
- /** Proration adjustment from changing the subscription quantity. */
3654
- QUANTITY_CHANGE_PRORATION = "QUANTITY_CHANGE_PRORATION",
3655
- /** Custom adjustment provided by the caller. */
3656
- CUSTOM_PRICE_ADJUSTMENT = "CUSTOM_PRICE_ADJUSTMENT"
4139
+ /** @enumType */
4140
+ type SubscriptionFrequencyWithLiterals = SubscriptionFrequency | 'UNDEFINED' | 'DAY' | 'WEEK' | 'MONTH' | 'YEAR';
4141
+ /** Trial period of subscription */
4142
+ interface SubscriptionTrialPeriod {
4143
+ /** trial period in units (required) */
4144
+ period?: number;
4145
+ /** units in which trial period is described (optional, default DAY) */
4146
+ unit?: SubscriptionFrequencyWithLiterals;
4147
+ }
4148
+ declare enum CancellationInitiator {
4149
+ /** Cancellation initiator undefined */
4150
+ UNDEFINED = "UNDEFINED",
4151
+ /** Subscription was canceled by site owner (default if canceled by user or service identity) */
4152
+ OWNER = "OWNER",
4153
+ /** Subscription was canceled by member (default if canceled by member identity) */
4154
+ MEMBER = "MEMBER",
4155
+ /** Subscription was canceled because of payment failure */
4156
+ PAYMENT_FAILURE = "PAYMENT_FAILURE",
4157
+ /** Subscription was canceled because of payment setup failure */
4158
+ SETUP_FAILURE = "SETUP_FAILURE"
3657
4159
  }
3658
4160
  /** @enumType */
3659
- type PriceAdjustmentReasonWithLiterals = PriceAdjustmentReason | 'PRICE_ADJUSTMENT_REASON_UNSPECIFIED' | 'BILLING_DATE_CHANGE' | 'PLAN_CHANGE_PRORATION' | 'CYCLE_CHANGE_PRORATION' | 'QUANTITY_CHANGE_PRORATION' | 'CUSTOM_PRICE_ADJUSTMENT';
3660
- interface InvoiceShippingCharges {
3661
- /**
3662
- * Amount of the shipping fee in `0.00` format.
3663
- *
3664
- * Min: `0.01`
3665
- * @decimalValue options { gte:0.00, maxScale:2 }
3666
- */
3667
- amount?: string;
3668
- /** Tax of the shipping fee */
3669
- tax?: Tax;
3670
- /** Information about the shipping charges tax data */
3671
- taxData?: ItemTaxData;
3672
- discount?: Discount;
4161
+ type CancellationInitiatorWithLiterals = CancellationInitiator | 'UNDEFINED' | 'OWNER' | 'MEMBER' | 'PAYMENT_FAILURE' | 'SETUP_FAILURE';
4162
+ interface SubscriptionPolicy {
4163
+ /** Subscription expiration date can be updated */
4164
+ expiryDateChangeable?: boolean;
4165
+ /** Subscription can be cancelled by the member who bought it (when memberId == subscriberId) */
4166
+ cancellableByMember?: boolean;
4167
+ /** Subscription expiration date on cancellation can be set to next payment date */
4168
+ cancellableAtNextPaymentCycle?: boolean;
3673
4169
  }
3674
- /** Tax data from all items */
3675
- interface TaxData {
3676
- /** Aggregated tax data from all items */
3677
- taxSummary?: TaxSummary;
4170
+ interface Suspension {
4171
+ status?: StatusWithLiterals;
4172
+ /** Beginning of the suspended period */
4173
+ startsAt?: Date | null;
4174
+ /** End of the suspended period */
4175
+ endsAt?: Date | null;
3678
4176
  }
3679
- interface TaxSummary {
3680
- /**
3681
- * Aggregated from tax_breakdowns with exemptions excluded from amount
3682
- * @format DECIMAL_VALUE
3683
- */
3684
- aggregatedTaxAmount?: string;
3685
- /**
3686
- * Array of each tax applied, grouped by `"jurisdiction"`, `"jurisdiction_type"`, `"tax_type"`, `"tax_name"` and `"tax_rate"`.
3687
- * @maxSize 50
3688
- */
3689
- aggregatedTaxBreakdowns?: AggregatedTaxBreakdown[];
4177
+ declare enum Status {
4178
+ UNDEFINED = "UNDEFINED",
4179
+ ACTIVE = "ACTIVE",
4180
+ ENDED = "ENDED"
3690
4181
  }
3691
- interface AggregatedTaxBreakdown {
3692
- /**
3693
- * Name of the tax that was calculated.
3694
- * @maxLength 200
3695
- */
3696
- taxName?: string;
3697
- /**
3698
- * Type of tax that was calculated.
3699
- * @maxLength 200
3700
- */
3701
- taxType?: string;
3702
- /**
3703
- * Jurisdiction that taxes were calculated for.
3704
- * @maxLength 200
3705
- */
3706
- jurisdiction?: string;
3707
- /** Type of jurisdiction that taxes were calculated for. */
3708
- jurisdictionType?: string;
3709
- /**
3710
- * Tax rate used for this jurisdiction, as a decimal. For example, 10% tax is `"0.1000"` and 200% tax is `"2.0000"`.
3711
- * @decimalValue options { gte:0, maxScale:6 }
3712
- */
3713
- rate?: string;
3714
- /**
3715
- * Total amount of this tax for this jurisdiction.
3716
- * @format DECIMAL_VALUE
3717
- * @decimalValue options { maxScale:4 }
3718
- */
3719
- aggregatedTaxAmount?: string;
4182
+ /** @enumType */
4183
+ type StatusWithLiterals = Status | 'UNDEFINED' | 'ACTIVE' | 'ENDED';
4184
+ /** A duration expressed in amount of time units. */
4185
+ interface V1Duration {
4186
+ /** Amount of the unit */
4187
+ amount?: number;
4188
+ /** Day, Week, Month, Year. */
4189
+ unit?: SubscriptionFrequencyWithLiterals;
3720
4190
  }
3721
- interface RefundInfo {
3722
- /**
3723
- * If refunds are present, this will include the total amount refunded.
3724
- * @format DECIMAL_VALUE
3725
- * @decimalValue options { gte:0.00, maxScale:2 }
3726
- */
3727
- totalRefundAmount?: string | null;
3728
- /**
3729
- * The refunds that have been applied to this invoice
3730
- * @maxSize 20
3731
- */
3732
- refunds?: Refund[];
4191
+ interface V1SubscriptionActivated {
4192
+ subscription?: V1Subscription;
3733
4193
  }
3734
- interface Refund {
3735
- /**
3736
- * refund amount
3737
- * @format DECIMAL_VALUE
3738
- * @decimalValue options { gt:0.00, maxScale:2 }
3739
- */
3740
- amount?: string;
3741
- /** the date of the refund transaction */
3742
- transactionDate?: Date | null;
4194
+ interface V1SubscriptionCanceled {
4195
+ subscription?: V1Subscription;
4196
+ }
4197
+ interface V1SubscriptionUpdated {
4198
+ subscription?: V1Subscription;
4199
+ }
4200
+ interface SubscriptionCycleTriggered {
4201
+ subscription?: V1Subscription;
4202
+ billingCycle?: number;
3743
4203
  /**
3744
- * the transaction id associated with this refund
4204
+ * Wix Pay transaction id, optional. Exists if event was triggered by a payment.
3745
4205
  * @format GUID
3746
4206
  */
3747
- transactionId?: string;
3748
- /** a reason for the refund */
3749
- reason?: RefundReasonWithLiterals;
3750
- /**
3751
- * a description of the refund - this is a free text field for the initiator
3752
- * @maxLength 255
3753
- */
3754
- description?: string | null;
4207
+ transactionId?: string | null;
3755
4208
  }
3756
- declare enum RefundReason {
3757
- DUPLICATE_CHARGE = "DUPLICATE_CHARGE",
3758
- FRAUDULENT = "FRAUDULENT",
3759
- CUSTOMER_REQUEST = "CUSTOMER_REQUEST",
3760
- PROVISION_FAILED = "PROVISION_FAILED",
3761
- OTHER = "OTHER"
4209
+ interface SubscriptionMarkedAsPaid {
4210
+ subscription?: V1Subscription;
4211
+ /** A number indicating which payment (cycle) was marked as paid. For recurring subscriptions only. */
4212
+ billingCycle?: number | null;
4213
+ }
4214
+ interface SubscriptionCancellationRequested {
4215
+ subscription?: V1Subscription;
4216
+ }
4217
+ interface SubscriptionSuspended {
4218
+ subscription?: V1Subscription;
4219
+ }
4220
+ interface V1SubscriptionResumed {
4221
+ subscription?: V1Subscription;
4222
+ }
4223
+ interface SubscriptionExpired {
4224
+ subscription?: V1Subscription;
4225
+ }
4226
+ interface V1SubscriptionInitialPurchaseCompleted {
4227
+ subscription?: V1Subscription;
4228
+ }
4229
+ interface CreateSubscriptionInStateRequest extends CreateSubscriptionInStateRequestModeOneOf {
4230
+ activeSubscription?: CreateSubscriptionRequest;
4231
+ }
4232
+ /** @oneof */
4233
+ interface CreateSubscriptionInStateRequestModeOneOf {
4234
+ activeSubscription?: CreateSubscriptionRequest;
4235
+ }
4236
+ interface CreateSubscriptionInStateResponse {
4237
+ /** @format GUID */
4238
+ subscriptionId?: string;
4239
+ }
4240
+ interface PayCycleRequest {
4241
+ /** @format GUID */
4242
+ subscriptionId?: string;
4243
+ paymentTestMode?: PaymentTestModeWithLiterals;
4244
+ /** @format GUID */
4245
+ tenantId?: string;
4246
+ }
4247
+ declare enum PaymentTestMode {
4248
+ REGULAR = "REGULAR",
4249
+ FAIL_TECHNICAL = "FAIL_TECHNICAL",
4250
+ FAIL_DECLINE = "FAIL_DECLINE",
4251
+ FAIL_RETRYABLE_DECLINE = "FAIL_RETRYABLE_DECLINE"
3762
4252
  }
3763
4253
  /** @enumType */
3764
- type RefundReasonWithLiterals = RefundReason | 'DUPLICATE_CHARGE' | 'FRAUDULENT' | 'CUSTOMER_REQUEST' | 'PROVISION_FAILED' | 'OTHER';
3765
- interface ChangeSubscriptionRequest {
3766
- /**
3767
- * ID of the subscription to change
3768
- * @format GUID
3769
- */
4254
+ type PaymentTestModeWithLiterals = PaymentTestMode | 'REGULAR' | 'FAIL_TECHNICAL' | 'FAIL_DECLINE' | 'FAIL_RETRYABLE_DECLINE';
4255
+ interface PayCycleResponse {
4256
+ /** @format GUID */
4257
+ invoiceId?: string;
4258
+ /** @format GUID */
4259
+ paymentOrderId?: string | null;
4260
+ subscription?: Subscription;
4261
+ }
4262
+ interface GetFullSubscriptionDataRequest {
4263
+ /** @format GUID */
4264
+ id?: string;
4265
+ }
4266
+ interface GetFullSubscriptionDataResponse {
4267
+ subscription?: Subscription;
4268
+ internalSubscriptionData?: InternalSubscriptionData;
4269
+ }
4270
+ interface InternalSubscriptionData {
4271
+ /** @format GUID */
4272
+ originInstanceId?: string;
4273
+ source?: string | null;
4274
+ billingType?: string;
4275
+ isOneTime?: boolean;
4276
+ migrationDetails?: MigrationDetails;
4277
+ pausePaidDuration?: string | null;
4278
+ authorizationPaymentData?: PaymentData;
4279
+ currentCyclePausePeriods?: PausePeriod[];
4280
+ }
4281
+ interface MigrationDetails {
4282
+ /** system (application) where the Subscription has been created */
4283
+ originSystem?: string;
4284
+ /** date when the Subscription started to be managed in BASS */
4285
+ shiftManagementDate?: Date | null;
4286
+ }
4287
+ interface PausePeriod {
4288
+ startDate?: Date | null;
4289
+ endDate?: Date | null;
4290
+ }
4291
+ interface GetSubscriptionAndInternalDataRequest {
4292
+ /** @format GUID */
3770
4293
  subscriptionId?: string;
3771
- /**
3772
- * Item-level changes. Each entry targets one existing item by ID.
3773
- * Caller passes CONCRETE new values (price, quantity, name) — BASS does not resolve pricing.
3774
- * BASS uses these for proration: old values (from subscription) vs new values (from here).
3775
- */
3776
- itemChanges?: SubscriptionItemChange[];
3777
- /**
3778
- * Subscription-level: new billing cycle (e.g., monthly to yearly).
3779
- * Affects the billing period for ALL items.
3780
- * When changing cycle, caller MUST also pass new prices in item_changes.
3781
- */
3782
- newCycle?: Duration;
3783
- /** When the change takes effect. */
3784
- effectiveTime?: ChangeEffectiveTimeWithLiterals;
3785
- /** How to handle proration for immediate changes. Ignored for AT_NEXT_RENEWAL. */
3786
- prorationBehavior?: ProrationBehaviorWithLiterals;
3787
- /** Payment context for immediate changes without checkout flow. */
3788
- paymentContext?: ChangePaymentContext;
4294
+ /** @format GUID */
4295
+ tenantId?: string;
3789
4296
  }
3790
- /**
3791
- * Describes a change to a single subscription item.
3792
- * The caller (BG/CVS) resolves pricing from their catalog and passes concrete values.
3793
- */
3794
- interface SubscriptionItemChange {
3795
- /**
3796
- * Which item to change. Must match an existing item ID in the subscription.
3797
- * @format GUID
3798
- */
3799
- itemId?: string;
3800
- /**
3801
- * New price per unit. Caller resolves this from their product catalog.
3802
- * Required when changing product/plan. Optional for quantity-only changes (uses current price).
3803
- * @decimalValue options { gte:0.00, maxScale:2 }
3804
- */
3805
- newPrice?: string | null;
4297
+ interface GetSubscriptionAndInternalDataResponse {
4298
+ subscription?: Subscription;
4299
+ internalSubscriptionData?: InternalSubscriptionData;
4300
+ }
4301
+ interface SearchSubscriptionRequest {
4302
+ /** @format GUID */
4303
+ id?: string;
4304
+ /** @format GUID */
4305
+ tenantId?: string;
4306
+ }
4307
+ interface SearchSubscriptionResponse {
4308
+ subscription?: Subscription;
4309
+ }
4310
+ interface UpdatePausePaidDurationRequest {
4311
+ /** @format GUID */
4312
+ subscriptionId?: string;
3806
4313
  /**
3807
- * New quantity (seats/licenses). Optional — unchanged if not set.
3808
4314
  * @min 1
4315
+ * @max 10000000
3809
4316
  */
3810
- newQuantity?: number | null;
3811
- /**
3812
- * New catalog reference. Optional — set when changing to a different product.
3813
- * This is metadata for the caller's tracking; BASS does not use it for pricing.
3814
- */
3815
- newCatalogReference?: CatalogReference;
3816
- /**
3817
- * New item name. Optional — set when changing to a different product.
3818
- * @maxLength 200
3819
- */
3820
- newName?: string | null;
4317
+ pausePaidDurationSeconds?: string;
4318
+ /** @format GUID */
4319
+ tenantId?: string;
4320
+ }
4321
+ interface UpdatePausePaidDurationResponse {
4322
+ }
4323
+ interface UpdateStatusRequest {
4324
+ /** @format GUID */
4325
+ subscriptionId?: string;
4326
+ /** @format GUID */
4327
+ tenantId?: string;
4328
+ status?: SubscriptionStatusEnumSubscriptionStatusWithLiterals;
4329
+ }
4330
+ interface UpdateStatusResponse {
4331
+ subscription?: Subscription;
4332
+ }
4333
+ interface UpdatePaymentStatusRequest {
4334
+ /** @format GUID */
4335
+ subscriptionId?: string;
4336
+ /** @format GUID */
4337
+ tenantId?: string;
4338
+ paymentStatus?: PaymentStatusWithLiterals;
4339
+ }
4340
+ interface UpdatePaymentStatusResponse {
4341
+ subscription?: Subscription;
4342
+ }
4343
+ interface RemoveCancellationInfoRequest {
4344
+ /** @format GUID */
4345
+ subscriptionId?: string;
4346
+ /** @format GUID */
4347
+ tenantId?: string;
4348
+ }
4349
+ interface RemoveCancellationInfoResponse {
4350
+ subscription?: Subscription;
4351
+ }
4352
+ interface RemovePauseInfoRequest {
4353
+ /** @format GUID */
4354
+ subscriptionId?: string;
4355
+ /** @format GUID */
4356
+ tenantId?: string;
4357
+ }
4358
+ interface RemovePauseInfoResponse {
4359
+ subscription?: Subscription;
4360
+ }
4361
+ interface ReviveSubscriptionRequest {
4362
+ /** @format GUID */
4363
+ tenantId?: string;
4364
+ /** @format GUID */
4365
+ subscriptionId?: string;
4366
+ revivePolicy?: RevivePolicyWithLiterals;
4367
+ isTestRun?: boolean;
4368
+ }
4369
+ declare enum RevivePolicy {
4370
+ SIMPLE = "SIMPLE",
4371
+ RESUME = "RESUME"
4372
+ }
4373
+ /** @enumType */
4374
+ type RevivePolicyWithLiterals = RevivePolicy | 'SIMPLE' | 'RESUME';
4375
+ interface ReviveSubscriptionResponse {
4376
+ subscription?: Subscription;
4377
+ }
4378
+ interface ConvertSapiRequest {
4379
+ /** @format GUID */
4380
+ subscriptionId?: string;
4381
+ }
4382
+ interface ConvertSapiResponse {
4383
+ subscription?: Subscription;
4384
+ }
4385
+ interface GetSubscriptionInvoicesRequest {
4386
+ /** @format GUID */
4387
+ id?: string;
3821
4388
  }
3822
- declare enum ChangeEffectiveTime {
3823
- UNKNOWN = "UNKNOWN",
3824
- /** Apply change immediately with proration */
3825
- IMMEDIATELY = "IMMEDIATELY",
3826
- /** Schedule change for the next billing cycle */
3827
- AT_NEXT_RENEWAL = "AT_NEXT_RENEWAL"
4389
+ interface GetSubscriptionInvoicesResponse {
4390
+ invoices?: SubscriptionInvoice[];
3828
4391
  }
3829
- /** @enumType */
3830
- type ChangeEffectiveTimeWithLiterals = ChangeEffectiveTime | 'UNKNOWN' | 'IMMEDIATELY' | 'AT_NEXT_RENEWAL';
3831
- declare enum ProrationBehavior {
3832
- UNKNOWN = "UNKNOWN",
3833
- /** Credit unused time + charge new prorated price (default for upgrades) */
3834
- PRORATE_AND_CHARGE = "PRORATE_AND_CHARGE",
3835
- /** Credit unused time + refund to payment method (downgrades) */
3836
- PRORATE_AND_REFUND = "PRORATE_AND_REFUND",
3837
- /** Convert unused value to extra days, no financial transaction */
3838
- PRORATE_AND_EXTEND = "PRORATE_AND_EXTEND",
3839
- /** Immediate switch with no financial adjustment */
3840
- NO_PRORATION = "NO_PRORATION"
4392
+ interface SubscriptionInvoice {
4393
+ /** @format GUID */
4394
+ id?: string;
4395
+ subscriptionCycle?: number;
4396
+ createdDate?: Date | null;
3841
4397
  }
3842
- /** @enumType */
3843
- type ProrationBehaviorWithLiterals = ProrationBehavior | 'UNKNOWN' | 'PRORATE_AND_CHARGE' | 'PRORATE_AND_REFUND' | 'PRORATE_AND_EXTEND' | 'NO_PRORATION';
3844
- /** Payment context for immediate subscription changes without the checkout flow. */
3845
- interface ChangePaymentContext {
3846
- /** Payment settings override for this change */
3847
- paymentSettings?: PaymentSettings;
4398
+ interface FinishFreeTrialNowRequest {
4399
+ /** @format GUID */
4400
+ subscriptionId?: string;
4401
+ /** @format GUID */
4402
+ tenantId?: string;
3848
4403
  }
3849
- interface ChangeSubscriptionResponse {
3850
- /** Updated subscription */
4404
+ interface FinishFreeTrialNowResponse {
3851
4405
  subscription?: Subscription;
3852
- /** Proration calculation result. Present for immediate changes with proration. */
3853
- prorationResult?: ProrationResult;
3854
- /**
3855
- * ID of the adjustment invoice created for the proration charge or refund.
3856
- * @format GUID
3857
- */
3858
- adjustmentInvoiceId?: string | null;
3859
4406
  }
3860
- /** Result of a proration calculation applied during a subscription change. */
3861
- interface ProrationResult {
3862
- /**
3863
- * Credit amount for unused time on the current plan
3864
- * @format DECIMAL_VALUE
3865
- */
3866
- creditAmount?: string;
3867
- /**
3868
- * Charge amount for the new plan's prorated price
3869
- * @format DECIMAL_VALUE
3870
- */
3871
- chargeAmount?: string;
3872
- /**
3873
- * Net amount (charge minus credit). Positive means customer pays, negative means refund.
3874
- * @format DECIMAL_VALUE
3875
- */
3876
- netAmount?: string;
3877
- /** Date when the proration was calculated */
3878
- prorationDate?: Date | null;
3879
- /** Remaining seconds in the current billing period at time of change */
3880
- remainingSeconds?: string;
3881
- /** Total seconds in the current billing cycle */
3882
- totalCycleSeconds?: string;
4407
+ interface FixSubscriptionTimeCapsuleTasksRequest {
4408
+ /** @format GUID */
4409
+ subscriptionId?: string;
4410
+ /** @format GUID */
4411
+ tenantId?: string;
3883
4412
  }
3884
- interface PreviewChangeSubscriptionRequest {
3885
- /**
3886
- * ID of the subscription to preview the change for
3887
- * @format GUID
3888
- */
4413
+ interface FixSubscriptionTimeCapsuleTasksResponse {
4414
+ }
4415
+ interface SendTimeCapsuleTaskCanceledBIRequest {
4416
+ /** @format GUID */
4417
+ tenantId?: string;
4418
+ /** @format GUID */
3889
4419
  subscriptionId?: string;
3890
- /** Item-level changes to preview. Same structure as ChangeSubscriptionRequest. */
3891
- itemChanges?: SubscriptionItemChange[];
3892
- /** Subscription-level: preview a cycle change. */
3893
- newCycle?: Duration;
3894
- /** When the change would take effect. */
3895
- effectiveTime?: ChangeEffectiveTimeWithLiterals;
3896
- /** How proration would be handled for immediate changes. */
3897
- prorationBehavior?: ProrationBehaviorWithLiterals;
4420
+ /** @minLength 1 */
4421
+ taskType?: string;
3898
4422
  }
3899
- interface PreviewChangeSubscriptionResponse {
3900
- /** Summary of the current subscription state */
3901
- current?: SubscriptionChangeSummary;
3902
- /** Summary of the proposed subscription state after the change */
3903
- proposed?: SubscriptionChangeSummary;
3904
- /** Proration preview details. Present only for immediate changes. */
3905
- proration?: ProrationPreview;
3906
- /** Renewal preview. Present only for changes at next renewal. */
3907
- renewalPreview?: RenewalPreview;
4423
+ interface ScheduleTimeCapsuleTaskRequest {
4424
+ /** @format GUID */
4425
+ subscriptionId?: string;
4426
+ /** @minLength 1 */
4427
+ taskType?: string;
4428
+ executionTime?: Date | null;
4429
+ /** @format GUID */
4430
+ tenantId?: string;
3908
4431
  }
3909
- /** Summary of a subscription's state, used in change previews. */
3910
- interface SubscriptionChangeSummary {
3911
- /** Product ID */
3912
- productId?: string;
3913
- /** Product name */
3914
- productName?: string;
3915
- /** Billing cycle duration */
3916
- cycle?: Duration;
3917
- /** Number of units */
3918
- quantity?: number;
3919
- /**
3920
- * Price per unit
3921
- * @format DECIMAL_VALUE
3922
- */
3923
- pricePerUnit?: string;
3924
- /**
3925
- * Total price (price_per_unit * quantity)
3926
- * @format DECIMAL_VALUE
3927
- */
3928
- totalPrice?: string;
3929
- /**
3930
- * Currency code (ISO 4217)
3931
- * @format CURRENCY
3932
- */
3933
- currency?: string;
3934
- /** Current billing period start */
3935
- periodStart?: Date | null;
3936
- /** Current billing period end */
3937
- periodEnd?: Date | null;
4432
+ interface CancelTimeCapsuleTaskRequest {
4433
+ /** @format GUID */
4434
+ tenantId?: string;
4435
+ /** @format GUID */
4436
+ subscriptionId?: string;
4437
+ /** @minLength 1 */
4438
+ taskType?: string;
3938
4439
  }
3939
- /** Preview of proration amounts for a proposed subscription change. */
3940
- interface ProrationPreview {
3941
- /**
3942
- * Credit amount for unused time on the current plan
3943
- * @format DECIMAL_VALUE
3944
- */
3945
- creditAmount?: string;
3946
- /**
3947
- * Charge amount for the new plan's prorated price
3948
- * @format DECIMAL_VALUE
3949
- */
3950
- chargeAmount?: string;
3951
- /**
3952
- * Net amount (charge minus credit)
3953
- * @format DECIMAL_VALUE
3954
- */
3955
- netAmount?: string;
3956
- /**
3957
- * Tax amount on the net proration
3958
- * @format DECIMAL_VALUE
3959
- */
3960
- taxAmount?: string;
3961
- /**
3962
- * Total amount including tax
3963
- * @format DECIMAL_VALUE
3964
- */
3965
- totalAmount?: string;
3966
- /** Remaining seconds in the current billing period */
3967
- remainingSeconds?: string;
3968
- /** Total seconds in the current billing cycle */
3969
- totalCycleSeconds?: string;
3970
- /** New period end date. Present when proration_behavior is PRORATE_AND_EXTEND. */
3971
- newPeriodEnd?: Date | null;
3972
- /** Number of days added to the billing period. Present when proration_behavior is PRORATE_AND_EXTEND. */
3973
- daysAdded?: number;
3974
- /** The proration action that would be taken */
3975
- action?: ProrationActionWithLiterals;
4440
+ interface UpdateFullSubscriptionRequest {
4441
+ /** @format GUID */
4442
+ tenantId?: string;
4443
+ subscription?: Subscription;
3976
4444
  }
3977
- declare enum ProrationAction {
3978
- UNKNOWN = "UNKNOWN",
3979
- /** Net charge to customer */
3980
- CHARGE = "CHARGE",
3981
- /** Net refund to customer */
3982
- REFUND = "REFUND",
3983
- /** Extend billing period instead of refund */
3984
- EXTEND_PERIOD = "EXTEND_PERIOD",
3985
- /** No financial change needed */
3986
- NO_CHANGE = "NO_CHANGE"
4445
+ interface UpdateFullSubscriptionResponse {
4446
+ subscription?: Subscription;
3987
4447
  }
3988
- /** @enumType */
3989
- type ProrationActionWithLiterals = ProrationAction | 'UNKNOWN' | 'CHARGE' | 'REFUND' | 'EXTEND_PERIOD' | 'NO_CHANGE';
3990
- /** Preview of what the next renewal will look like after a change. */
3991
- interface RenewalPreview {
4448
+ interface PatchSubscriptionRequest {
3992
4449
  /**
3993
- * New price per unit at next renewal
3994
- * @format DECIMAL_VALUE
4450
+ * Tenant ID (instance ID) of the subscription
4451
+ * @format GUID
3995
4452
  */
3996
- newPrice?: string;
4453
+ tenantId?: string;
3997
4454
  /**
3998
- * New total at next renewal (price * quantity)
3999
- * @format DECIMAL_VALUE
4455
+ * Subscription ID to patch
4456
+ * @format GUID
4000
4457
  */
4001
- newTotal?: string;
4002
- /** Date of the next renewal */
4003
- nextRenewalDate?: Date | null;
4458
+ subscriptionId?: string;
4459
+ /** Partial subscription with updated values */
4460
+ subscription?: Subscription;
4461
+ /** Fields to update (e.g., "name", "billing_settings.collection_method") */
4462
+ fieldMask?: string[];
4463
+ }
4464
+ interface PatchSubscriptionResponse {
4465
+ /** The updated subscription */
4466
+ subscription?: Subscription;
4467
+ }
4468
+ interface UpdateSubscriptionInvoiceCycleRequest {
4469
+ /** @format GUID */
4470
+ subscriptionId?: string;
4471
+ /** @format GUID */
4472
+ tenantId?: string;
4473
+ /** @format GUID */
4474
+ invoiceId?: string;
4475
+ subscriptionCycle?: number;
4476
+ }
4477
+ interface UpdateSubscriptionInvoiceCycleResponse {
4478
+ subscriptionInvoice?: SubscriptionInvoice;
4479
+ }
4480
+ interface AddPausePeriodRequest {
4481
+ /** @format GUID */
4482
+ tenantId?: string;
4483
+ /** @format GUID */
4484
+ subscriptionId?: string;
4485
+ pauseStartDate?: Date | null;
4486
+ pauseEndDate?: Date | null;
4487
+ }
4488
+ interface AddPausePeriodResponse {
4489
+ subscription?: Subscription;
4490
+ }
4491
+ interface RunTimeCapsuleTaskNowRequest {
4492
+ /** @format GUID */
4493
+ tenantId?: string;
4494
+ /** @format GUID */
4495
+ subscriptionId?: string;
4496
+ /** @minLength 1 */
4497
+ taskType?: string;
4004
4498
  }
4005
- interface CancelPendingChangeRequest {
4006
- /**
4007
- * ID of the subscription to cancel the pending change for
4008
- * @format GUID
4009
- */
4499
+ interface CreateRecurringInvoiceBORequest {
4500
+ /** @format GUID */
4010
4501
  subscriptionId?: string;
4502
+ /** @format GUID */
4503
+ tenantId?: string;
4504
+ /** @min 2 */
4505
+ cycleNumber?: number;
4011
4506
  }
4012
- interface CancelPendingChangeResponse {
4013
- /** Updated subscription with cleared pending data */
4014
- subscription?: Subscription;
4507
+ interface CreateRecurringInvoiceBOResponse {
4508
+ invoiceId?: string;
4015
4509
  }
4016
- interface Task {
4017
- key?: TaskKey;
4018
- executeAt?: Date | null;
4019
- payload?: string | null;
4510
+ interface SetShiftingDataRequest {
4511
+ /** @format GUID */
4512
+ subscriptionId?: string;
4513
+ /** @format GUID */
4514
+ tenantId?: string;
4515
+ isBassManaged?: boolean;
4516
+ shiftManagementDate?: Date | null;
4020
4517
  }
4021
- interface TaskKey {
4022
- appId?: string;
4023
- instanceId?: string;
4024
- subjectId?: string | null;
4518
+ interface SetShiftingDataResponse {
4519
+ subscription?: Subscription;
4025
4520
  }
4026
- interface TaskAction extends TaskActionActionOneOf {
4027
- complete?: Complete;
4028
- cancel?: Cancel;
4029
- reschedule?: Reschedule;
4521
+ interface FixSubscriptionInvoicesRequest extends FixSubscriptionInvoicesRequestModeOneOf {
4522
+ attachInvoice?: AttachInvoice;
4523
+ detachInvoice?: DetachInvoice;
4524
+ /** @format GUID */
4525
+ tenantId?: string;
4526
+ /** @format GUID */
4527
+ subscriptionId?: string;
4030
4528
  }
4031
4529
  /** @oneof */
4032
- interface TaskActionActionOneOf {
4033
- complete?: Complete;
4034
- cancel?: Cancel;
4035
- reschedule?: Reschedule;
4036
- }
4037
- interface Complete {
4530
+ interface FixSubscriptionInvoicesRequestModeOneOf {
4531
+ attachInvoice?: AttachInvoice;
4532
+ detachInvoice?: DetachInvoice;
4038
4533
  }
4039
- interface Cancel {
4534
+ interface AttachInvoice {
4535
+ /** @format GUID */
4536
+ invoiceId?: string;
4040
4537
  }
4041
- interface Reschedule {
4042
- executeAt?: Date | null;
4043
- payload?: string | null;
4538
+ interface DetachInvoice {
4539
+ /** @format GUID */
4540
+ invoiceId?: string;
4044
4541
  }
4045
- interface V1SubscriptionEvent extends V1SubscriptionEventEventOneOf {
4046
- /** A subscriptions was created */
4047
- created?: V1SubscriptionCreated;
4048
- /** Subscription is considered active and will be visible to site owners and members */
4049
- activated?: V1SubscriptionActivated;
4050
- /**
4051
- * Subscription was canceled either by cancellation request with requested expiration date NOW or by payment provider.
4052
- * If cancelled by payment provider subscription will be valid until the date calculated depending on how many cycles it was already paid for.
4053
- */
4054
- canceled?: V1SubscriptionCanceled;
4055
- /** Subscription was updated. Currently the only possible change is valid_until date */
4056
- updated?: V1SubscriptionUpdated;
4057
- /** Subscription cycle has started. Currently the cycle starts when a payment is received. */
4058
- cycleTriggered?: SubscriptionCycleTriggered;
4059
- /** Offline subscription was marked as paid */
4060
- markedAsPaid?: SubscriptionMarkedAsPaid;
4061
- /**
4062
- * Subscription cancellation for the future date was requested.
4063
- * Subscription will stay in pending cancellation status until the date calculated depending on free trial and the next payment date.
4064
- */
4065
- cancellationRequested?: SubscriptionCancellationRequested;
4066
- /** Subscription and it's payment schedule (for recurring) was suspended */
4067
- suspended?: SubscriptionSuspended;
4068
- /** Previously suspended subscription and it's payment schedule (for recurring) was resumed */
4069
- resumed?: V1SubscriptionResumed;
4070
- /** Subscription expired according to valid_until expiration date. */
4071
- expired?: SubscriptionExpired;
4072
- /** Subscription initial purchase completed */
4073
- initialPurchaseCompleted?: V1SubscriptionInitialPurchaseCompleted;
4542
+ interface FixSubscriptionInvoicesResponse {
4543
+ invoices?: SubscriptionInvoice[];
4074
4544
  }
4075
- /** @oneof */
4076
- interface V1SubscriptionEventEventOneOf {
4077
- /** A subscriptions was created */
4078
- created?: V1SubscriptionCreated;
4079
- /** Subscription is considered active and will be visible to site owners and members */
4080
- activated?: V1SubscriptionActivated;
4081
- /**
4082
- * Subscription was canceled either by cancellation request with requested expiration date NOW or by payment provider.
4083
- * If cancelled by payment provider subscription will be valid until the date calculated depending on how many cycles it was already paid for.
4084
- */
4085
- canceled?: V1SubscriptionCanceled;
4086
- /** Subscription was updated. Currently the only possible change is valid_until date */
4087
- updated?: V1SubscriptionUpdated;
4088
- /** Subscription cycle has started. Currently the cycle starts when a payment is received. */
4089
- cycleTriggered?: SubscriptionCycleTriggered;
4090
- /** Offline subscription was marked as paid */
4091
- markedAsPaid?: SubscriptionMarkedAsPaid;
4092
- /**
4093
- * Subscription cancellation for the future date was requested.
4094
- * Subscription will stay in pending cancellation status until the date calculated depending on free trial and the next payment date.
4095
- */
4096
- cancellationRequested?: SubscriptionCancellationRequested;
4097
- /** Subscription and it's payment schedule (for recurring) was suspended */
4098
- suspended?: SubscriptionSuspended;
4099
- /** Previously suspended subscription and it's payment schedule (for recurring) was resumed */
4100
- resumed?: V1SubscriptionResumed;
4101
- /** Subscription expired according to valid_until expiration date. */
4102
- expired?: SubscriptionExpired;
4103
- /** Subscription initial purchase completed */
4104
- initialPurchaseCompleted?: V1SubscriptionInitialPurchaseCompleted;
4545
+ interface RestoreDraftSubscriptionRequest {
4546
+ /** @format GUID */
4547
+ tenantId?: string;
4548
+ /** @format GUID */
4549
+ subscriptionId?: string;
4105
4550
  }
4106
- interface V1SubscriptionCreated {
4107
- subscription?: V1Subscription;
4551
+ interface RestoreDraftSubscriptionResponse {
4552
+ subscription?: Subscription;
4108
4553
  }
4109
- interface V1Subscription {
4110
- /**
4111
- * ID of the subscription
4112
- * @format GUID
4113
- * @readonly
4114
- */
4115
- id?: string;
4116
- /**
4117
- * ID of the app which created the subscription
4118
- * @format GUID
4119
- */
4120
- wixAppId?: string;
4121
- /**
4122
- * Instance ID of the Subscriptions app
4123
- * @format GUID
4124
- */
4554
+ interface DeleteDraftSubscriptionRequest {
4555
+ /** @format GUID */
4125
4556
  tenantId?: string;
4126
- /**
4127
- * ID of entity in app (e.g. a cart in stores/order in paid plans)
4128
- * @format GUID
4129
- */
4130
- originEntityId?: string;
4131
- /** Site member or a contact who bought the subscription */
4132
- subscriber?: Subscriber;
4133
- /**
4134
- * Wix Pay order ID, is empty for free subscriptions
4135
- * @format GUID
4136
- */
4137
- wixPayOrderId?: string | null;
4138
- /**
4139
- * Subscription name (e.g. a product or subscription package name)
4140
- * @maxLength 150
4141
- */
4142
- name?: string;
4143
- /**
4144
- * Optional additional subscription description
4145
- * @maxLength 500
4146
- */
4147
- description?: string;
4148
- /** Amount to be paid for a single scheduled payment */
4149
- price?: Money;
4150
- /** True if the subscription is recurring, false for a single payment subscription */
4151
- recurring?: boolean;
4152
- /** Online (paid by subscriber using wix pay) or offline (need to manually mark as paid) */
4153
- subscriptionType?: SubscriptionTypeWithLiterals;
4154
- /** Active, expired, canceled, etc. */
4155
- subscriptionStatus?: V1SubscriptionStatusEnumSubscriptionStatusWithLiterals;
4156
- /** Subscription start date (may differ from creation date) */
4157
- validFrom?: Date | null;
4158
- /** Subscription expiration date */
4159
- validUntil?: Date | null;
4160
- /** Status of last payment associated with this subscription */
4161
- lastPaymentStatus?: PaymentStatusEnumPaymentStatusWithLiterals;
4162
- /** Payment schedule in the wix pay format. Exists for recurring subscriptions only. */
4163
- billingProfile?: V2Subscription;
4164
- /** Owner, member, etc. - present if subscription is canceled */
4165
- cancellationInitiator?: CancellationInitiatorWithLiterals;
4166
- /** Optional, present if subscription is canceled */
4167
- cancellationReason?: string | null;
4168
- /** Can be used for arbitrary app-specific map<string, string> data */
4169
- externalData?: Record<string, string>;
4170
- /** Date when subscription was created (not related to payment dates) */
4171
- dateCreated?: Date | null;
4172
- /** Restrictions on possible subscription actions. Default policy has all restrictions enabled. */
4173
- policy?: SubscriptionPolicy;
4174
- /** List of subscription suspension periods */
4175
- suspensions?: Suspension[];
4176
- /** Initial subscription expiration date that was calculated on the subscription purchase plus duration of suspensions */
4177
- validUntilDateWithSuspensions?: Date | null;
4178
- /** Duration of single payment subscription (instead of billing_profile) */
4179
- singlePaymentDuration?: V1Duration;
4180
4557
  /** @format GUID */
4181
- originInstanceId?: string | null;
4558
+ subscriptionId?: string;
4182
4559
  }
4183
- interface Subscriber {
4184
- /**
4185
- * Member or contact ID
4186
- * @format GUID
4187
- */
4188
- id?: string;
4189
- /** Member or contact */
4190
- identityType?: IdentityTypeWithLiterals;
4560
+ interface DeleteDraftSubscriptionResponse {
4561
+ subscription?: Subscription;
4191
4562
  }
4192
- declare enum IdentityType {
4193
- /** Identity type undefined */
4194
- UNDEFINED = "UNDEFINED",
4195
- /** Subscription is associated with a member ID */
4196
- MEMBER = "MEMBER",
4197
- /** Subscriptions is associated with a contact ID */
4198
- CONTACT = "CONTACT"
4563
+ interface DeleteSubscriptionBORequest {
4564
+ /** @format GUID */
4565
+ tenantId?: string;
4566
+ /** @format GUID */
4567
+ subscriptionId?: string;
4199
4568
  }
4200
- /** @enumType */
4201
- type IdentityTypeWithLiterals = IdentityType | 'UNDEFINED' | 'MEMBER' | 'CONTACT';
4202
- /** Price of a payment. Includes amount and currency. */
4203
- interface Money {
4204
- /**
4205
- * Monetary amount i.e. 3.99.
4206
- * @format DECIMAL_VALUE
4207
- */
4208
- amount?: string;
4209
- /**
4210
- * Currency in ISO 4217 format i.e. USD.
4211
- * @minLength 3
4212
- * @maxLength 3
4213
- */
4214
- currency?: string;
4569
+ interface DeleteSubscriptionBOResponse {
4570
+ subscription?: Subscription;
4215
4571
  }
4216
- declare enum SubscriptionType {
4217
- UNDEFINED = "UNDEFINED",
4218
- /** Payments made by the subscriber */
4219
- ONLINE = "ONLINE",
4220
- /** Payments managed manually by the site owner */
4221
- OFFLINE = "OFFLINE"
4572
+ interface CancelSubscriptionBORequest {
4573
+ /** @format GUID */
4574
+ tenantId?: string;
4575
+ /** @format GUID */
4576
+ subscriptionId?: string;
4577
+ initiator?: ActionInitiatorWithLiterals;
4578
+ reason?: string | null;
4222
4579
  }
4223
- /** @enumType */
4224
- type SubscriptionTypeWithLiterals = SubscriptionType | 'UNDEFINED' | 'ONLINE' | 'OFFLINE';
4225
- declare enum V1SubscriptionStatusEnumSubscriptionStatus {
4226
- /** Subscription status undefined */
4227
- UNDEFINED = "UNDEFINED",
4228
- /** Subscription created, but hasn't been paid for yet. This status if filtered out in ListSubscriptions response by default. */
4229
- DRAFT = "DRAFT",
4230
- /** Subscription has been paid for, but the start date is in the future */
4231
- PENDING = "PENDING",
4232
- /** Subscription is active */
4233
- ACTIVE = "ACTIVE",
4234
- /** Subscription has expired */
4235
- EXPIRED = "EXPIRED",
4236
- /** Subscription has been canceled */
4237
- CANCELED = "CANCELED",
4238
- /** Subscription has been set to be canceled at a future date */
4239
- PENDING_CANCELLATION = "PENDING_CANCELLATION",
4240
- /** Subscription is suspended */
4241
- SUSPENDED = "SUSPENDED"
4580
+ interface CancelSubscriptionBOResponse {
4581
+ subscription?: Subscription;
4242
4582
  }
4243
- /** @enumType */
4244
- type V1SubscriptionStatusEnumSubscriptionStatusWithLiterals = V1SubscriptionStatusEnumSubscriptionStatus | 'UNDEFINED' | 'DRAFT' | 'PENDING' | 'ACTIVE' | 'EXPIRED' | 'CANCELED' | 'PENDING_CANCELLATION' | 'SUSPENDED';
4245
- declare enum PaymentStatusEnumPaymentStatus {
4246
- /** Payment status undefined */
4247
- UNDEFINED = "UNDEFINED",
4248
- /** Payment has been paid */
4249
- PAID = "PAID",
4250
- /** Payment has been refunded */
4251
- REFUNDED = "REFUNDED",
4252
- /** Recurring payment has failed */
4253
- FAILED = "FAILED",
4254
- /** Payment has not been paid */
4255
- UNPAID = "UNPAID",
4256
- /** Billing has been initialized, but actual charge is yet to be made. Can happen for free trial and PayPal */
4257
- PENDING = "PENDING"
4583
+ interface UpdatePaymentMethodBORequest {
4584
+ /** @format GUID */
4585
+ tenantId?: string;
4586
+ /** @format GUID */
4587
+ subscriptionId?: string;
4588
+ /** @format GUID */
4589
+ paymentMethodId?: string;
4258
4590
  }
4259
- /** @enumType */
4260
- type PaymentStatusEnumPaymentStatusWithLiterals = PaymentStatusEnumPaymentStatus | 'UNDEFINED' | 'PAID' | 'REFUNDED' | 'FAILED' | 'UNPAID' | 'PENDING';
4261
- /**
4262
- * Recurring payment is described by `frequency` (day, week, month) and `interval`.
4263
- *
4264
- * For example, to create a recurring payment every 14 days, just set `interval` to 14 and frequency to `DAY`.
4265
- *
4266
- * In some cases there should be a trial period for the order, after which payments start to occur.
4267
- * Trial period is also defined as `frequency` and `interval` pair.
4268
- *
4269
- * So one can define a monthly 'subscription' with a 14 days trial period.
4270
- */
4271
- interface V2Subscription {
4272
- /** frequency of recurring payment (required) */
4273
- frequency?: SubscriptionFrequencyWithLiterals;
4274
- /** interval of recurring payment (required) */
4275
- interval?: number;
4276
- /** trial period for recurring payment (optional) */
4277
- trial?: SubscriptionTrialPeriod;
4278
- /**
4279
- * how many billing cycles should be done before subscription finishes
4280
- * (optional, 0 by default means endless subscription)
4281
- */
4282
- billingCycles?: number;
4283
- /**
4284
- * date in the future or in the past when the first billing cycle begins
4285
- * (the first off-session payment is performed when it ends)
4286
- */
4287
- firstCycleStartDate?: Date | null;
4591
+ interface UpdatePaymentMethodBOResponse {
4592
+ subscription?: Subscription;
4288
4593
  }
4289
- /** Frequency unit of recurring payment */
4290
- declare enum SubscriptionFrequency {
4291
- UNDEFINED = "UNDEFINED",
4292
- DAY = "DAY",
4293
- WEEK = "WEEK",
4294
- MONTH = "MONTH",
4295
- YEAR = "YEAR"
4594
+ interface SendSubscriptionActionEventBORequest extends SendSubscriptionActionEventBORequestEventOneOf {
4595
+ billingCycleStarted?: SubscriptionBillingCycleStarted;
4596
+ /** @format GUID */
4597
+ tenantId?: string;
4598
+ /** @format GUID */
4599
+ subscriptionId?: string;
4296
4600
  }
4297
- /** @enumType */
4298
- type SubscriptionFrequencyWithLiterals = SubscriptionFrequency | 'UNDEFINED' | 'DAY' | 'WEEK' | 'MONTH' | 'YEAR';
4299
- /** Trial period of subscription */
4300
- interface SubscriptionTrialPeriod {
4301
- /** trial period in units (required) */
4302
- period?: number;
4303
- /** units in which trial period is described (optional, default DAY) */
4304
- unit?: SubscriptionFrequencyWithLiterals;
4601
+ /** @oneof */
4602
+ interface SendSubscriptionActionEventBORequestEventOneOf {
4603
+ billingCycleStarted?: SubscriptionBillingCycleStarted;
4305
4604
  }
4306
- declare enum CancellationInitiator {
4307
- /** Cancellation initiator undefined */
4308
- UNDEFINED = "UNDEFINED",
4309
- /** Subscription was canceled by site owner (default if canceled by user or service identity) */
4310
- OWNER = "OWNER",
4311
- /** Subscription was canceled by member (default if canceled by member identity) */
4312
- MEMBER = "MEMBER",
4313
- /** Subscription was canceled because of payment failure */
4314
- PAYMENT_FAILURE = "PAYMENT_FAILURE",
4315
- /** Subscription was canceled because of payment setup failure */
4316
- SETUP_FAILURE = "SETUP_FAILURE"
4605
+ interface SendSubscriptionActionEventResponse {
4317
4606
  }
4318
- /** @enumType */
4319
- type CancellationInitiatorWithLiterals = CancellationInitiator | 'UNDEFINED' | 'OWNER' | 'MEMBER' | 'PAYMENT_FAILURE' | 'SETUP_FAILURE';
4320
- interface SubscriptionPolicy {
4321
- /** Subscription expiration date can be updated */
4322
- expiryDateChangeable?: boolean;
4323
- /** Subscription can be cancelled by the member who bought it (when memberId == subscriberId) */
4324
- cancellableByMember?: boolean;
4325
- /** Subscription expiration date on cancellation can be set to next payment date */
4326
- cancellableAtNextPaymentCycle?: boolean;
4607
+ interface HandleSubscriptionAfterInvoiceMarkedAsPaidRequest {
4608
+ /** @format GUID */
4609
+ tenantId?: string;
4610
+ /** @format GUID */
4611
+ subscriptionId?: string;
4612
+ transactionId?: string;
4327
4613
  }
4328
- interface Suspension {
4329
- status?: StatusWithLiterals;
4330
- /** Beginning of the suspended period */
4331
- startsAt?: Date | null;
4332
- /** End of the suspended period */
4333
- endsAt?: Date | null;
4614
+ interface PauseSubscriptionBORequest {
4615
+ /** @format GUID */
4616
+ tenantId?: string;
4617
+ /** @format GUID */
4618
+ subscriptionId?: string;
4619
+ pausePolicy?: PausePolicyWithLiterals;
4620
+ pauseAt?: PauseAtWithLiterals;
4621
+ initiator?: ActionInitiatorWithLiterals;
4622
+ /** @maxLength 500 */
4623
+ reason?: string | null;
4334
4624
  }
4335
- declare enum Status {
4336
- UNDEFINED = "UNDEFINED",
4337
- ACTIVE = "ACTIVE",
4338
- ENDED = "ENDED"
4625
+ interface PauseSubscriptionBOResponse {
4626
+ subscription?: Subscription;
4339
4627
  }
4340
- /** @enumType */
4341
- type StatusWithLiterals = Status | 'UNDEFINED' | 'ACTIVE' | 'ENDED';
4342
- /** A duration expressed in amount of time units. */
4343
- interface V1Duration {
4344
- /** Amount of the unit */
4345
- amount?: number;
4346
- /** Day, Week, Month, Year. */
4347
- unit?: SubscriptionFrequencyWithLiterals;
4628
+ interface FixSubscriptionInvoicesConsistencyRequest {
4629
+ /** @format GUID */
4630
+ tenantId?: string;
4631
+ /** @format GUID */
4632
+ subscriptionId?: string;
4348
4633
  }
4349
- interface V1SubscriptionActivated {
4350
- subscription?: V1Subscription;
4634
+ interface FixSubscriptionInvoicesConsistencyResponse {
4351
4635
  }
4352
- interface V1SubscriptionCanceled {
4353
- subscription?: V1Subscription;
4636
+ interface FixSubscriptionPaymentStatusRequest {
4637
+ /** @format GUID */
4638
+ tenantId?: string;
4639
+ /** @format GUID */
4640
+ subscriptionId?: string;
4641
+ /** When true, verify and report the would-be fix without mutating anything. */
4642
+ dryRun?: boolean;
4354
4643
  }
4355
- interface V1SubscriptionUpdated {
4356
- subscription?: V1Subscription;
4644
+ interface FixSubscriptionPaymentStatusResponse {
4645
+ /** The invoice is PAID but the (DRAFT) subscription never processed the paid event. */
4646
+ mismatchDetected?: boolean;
4647
+ /** A real mismatch was found and the invoice-paid activation was re-driven (always false in dry-run). */
4648
+ fixed?: boolean;
4649
+ /**
4650
+ * Subscription status after the re-drive (ACTIVE / PENDING); in dry-run, the predicted status; "" when no fix ran.
4651
+ * @maxLength 50
4652
+ */
4653
+ resultingStatus?: string;
4654
+ /**
4655
+ * Human-readable summary of the decision and action.
4656
+ * @maxLength 500
4657
+ */
4658
+ detail?: string;
4357
4659
  }
4358
- interface SubscriptionCycleTriggered {
4359
- subscription?: V1Subscription;
4360
- billingCycle?: number;
4660
+ interface UpdateSubscriptionCurrencyRequest {
4361
4661
  /**
4362
- * Wix Pay transaction id, optional. Exists if event was triggered by a payment.
4662
+ * Tenant ID (instance ID) of the subscription
4363
4663
  * @format GUID
4364
4664
  */
4365
- transactionId?: string | null;
4366
- }
4367
- interface SubscriptionMarkedAsPaid {
4368
- subscription?: V1Subscription;
4369
- /** A number indicating which payment (cycle) was marked as paid. For recurring subscriptions only. */
4370
- billingCycle?: number | null;
4371
- }
4372
- interface SubscriptionCancellationRequested {
4373
- subscription?: V1Subscription;
4374
- }
4375
- interface SubscriptionSuspended {
4376
- subscription?: V1Subscription;
4665
+ tenantId?: string;
4666
+ /**
4667
+ * Subscription ID to update currency for
4668
+ * @format GUID
4669
+ */
4670
+ subscriptionId?: string;
4671
+ /**
4672
+ * New currency code (e.g., "USD", "EUR") - ISO 4217 format
4673
+ * @format CURRENCY
4674
+ */
4675
+ newCurrency?: string;
4676
+ /**
4677
+ * Exchange rate from current currency to new currency (newAmount = oldAmount * exchangeRate)
4678
+ * @decimalValue options { gt:0.00, maxScale:6 }
4679
+ */
4680
+ exchangeRate?: string;
4377
4681
  }
4378
- interface V1SubscriptionResumed {
4379
- subscription?: V1Subscription;
4682
+ interface UpdateSubscriptionCurrencyResponse {
4683
+ /** The updated subscription with new currency and converted amounts */
4684
+ subscription?: Subscription;
4380
4685
  }
4381
- interface SubscriptionExpired {
4382
- subscription?: V1Subscription;
4686
+ interface UpdateSubscriptionPlatformOriginRequest {
4687
+ /**
4688
+ * Subscription ID to update platform origin for
4689
+ * @format GUID
4690
+ */
4691
+ subscriptionId?: string;
4692
+ /**
4693
+ * Tenant ID (instance ID) of the subscription
4694
+ * @format GUID
4695
+ */
4696
+ tenantId?: string;
4697
+ /** New platform origin (appId and entityId) */
4698
+ platformOrigin?: PlatformOrigin;
4383
4699
  }
4384
- interface V1SubscriptionInitialPurchaseCompleted {
4385
- subscription?: V1Subscription;
4700
+ interface UpdateSubscriptionPlatformOriginResponse {
4701
+ /** The updated subscription with new platform origin */
4702
+ subscription?: Subscription;
4386
4703
  }
4387
4704
  interface ListSubscriptionHistoryRequest {
4388
4705
  /** @format GUID */
@@ -4449,6 +4766,8 @@ interface SubscriptionEvent extends SubscriptionEventPayloadOneOf {
4449
4766
  billingCyclePaid?: SubscriptionBillingCyclePaid;
4450
4767
  initiatePaymentMethodSetup?: InitiatedPaymentMethodSetup;
4451
4768
  futurePriceUpdatesRequested?: FuturePriceUpdatesRequested;
4769
+ /** Fired once when an offline subscription purchase is completed (BILL-534). */
4770
+ offlinePurchaseCompleted?: SubscriptionOfflinePurchaseCompleted;
4452
4771
  subscriptionBoAction?: SubscriptionBackOfficeAction;
4453
4772
  unknown?: UnknownSubscriptionEvent;
4454
4773
  }
@@ -4487,6 +4806,8 @@ interface SubscriptionEventPayloadOneOf {
4487
4806
  billingCyclePaid?: SubscriptionBillingCyclePaid;
4488
4807
  initiatePaymentMethodSetup?: InitiatedPaymentMethodSetup;
4489
4808
  futurePriceUpdatesRequested?: FuturePriceUpdatesRequested;
4809
+ /** Fired once when an offline subscription purchase is completed (BILL-534). */
4810
+ offlinePurchaseCompleted?: SubscriptionOfflinePurchaseCompleted;
4490
4811
  subscriptionBoAction?: SubscriptionBackOfficeAction;
4491
4812
  unknown?: UnknownSubscriptionEvent;
4492
4813
  }
@@ -4560,6 +4881,10 @@ interface FuturePriceUpdatesRequested {
4560
4881
  subscription?: Subscription;
4561
4882
  requestedUpdateData?: SubscriptionUpdateData;
4562
4883
  }
4884
+ interface SubscriptionOfflinePurchaseCompleted {
4885
+ subscription?: Subscription;
4886
+ actionDetails?: ActionDetails;
4887
+ }
4563
4888
  interface SubscriptionBackOfficeAction {
4564
4889
  subscription?: Subscription;
4565
4890
  /** The backoffice method name */
@@ -4680,6 +5005,16 @@ type CustomerUpdateBillingDateApplicationErrors = {
4680
5005
  data?: Record<string, any>;
4681
5006
  };
4682
5007
  /** @docsIgnore */
5008
+ type CustomerChangeSubscriptionApplicationErrors = {
5009
+ code?: 'CUSTOMER_ACTION_NOT_ENABLED';
5010
+ description?: string;
5011
+ data?: Record<string, any>;
5012
+ } | {
5013
+ code?: 'CUSTOMER_TIMING_RESTRICTION';
5014
+ description?: string;
5015
+ data?: Record<string, any>;
5016
+ };
5017
+ /** @docsIgnore */
4683
5018
  type UpdateSubscriptionBillingDateApplicationErrors = {
4684
5019
  code?: 'OPERATION_NOT_SUPPORTED_FOR_STATUS';
4685
5020
  description?: string;
@@ -4806,9 +5141,15 @@ declare function customerCancelScheduledPause(): __PublicMethodMetaInfo<'POST',
4806
5141
  declare function customerUpdateBillingDate(): __PublicMethodMetaInfo<'POST', {
4807
5142
  id: string;
4808
5143
  }, CustomerUpdateBillingDateRequest$1, CustomerUpdateBillingDateRequest, CustomerUpdateBillingDateResponse$1, CustomerUpdateBillingDateResponse>;
4809
- declare function payCycle(): __PublicMethodMetaInfo<'POST', {
5144
+ declare function customerChangeSubscription(): __PublicMethodMetaInfo<'POST', {
5145
+ subscriptionId: string;
5146
+ }, CustomerChangeSubscriptionRequest$1, CustomerChangeSubscriptionRequest, CustomerChangeSubscriptionResponse$1, CustomerChangeSubscriptionResponse>;
5147
+ declare function customerPreviewChangeSubscription(): __PublicMethodMetaInfo<'POST', {
5148
+ subscriptionId: string;
5149
+ }, CustomerPreviewChangeSubscriptionRequest$1, CustomerPreviewChangeSubscriptionRequest, CustomerPreviewChangeSubscriptionResponse$1, CustomerPreviewChangeSubscriptionResponse>;
5150
+ declare function customerCancelPendingChange(): __PublicMethodMetaInfo<'POST', {
4810
5151
  subscriptionId: string;
4811
- }, PayCycleRequest$1, PayCycleRequest, PayCycleResponse$1, PayCycleResponse>;
5152
+ }, CustomerCancelPendingChangeRequest$1, CustomerCancelPendingChangeRequest, CustomerCancelPendingChangeResponse$1, CustomerCancelPendingChangeResponse>;
4812
5153
  declare function getSubscription(): __PublicMethodMetaInfo<'GET', {
4813
5154
  id: string;
4814
5155
  }, GetSubscriptionRequest$1, GetSubscriptionRequest, GetSubscriptionResponse$1, GetSubscriptionResponse>;
@@ -4864,4 +5205,4 @@ declare function listSubscriptionHistory(): __PublicMethodMetaInfo<'GET', {
4864
5205
  subscriptionId: string;
4865
5206
  }, ListSubscriptionHistoryRequest$1, ListSubscriptionHistoryRequest, ListSubscriptionHistoryResponse$1, ListSubscriptionHistoryResponse>;
4866
5207
 
4867
- export { type AbsorbFeeConfig as AbsorbFeeConfigOriginal, type AbsorbFeeConfigValueOneOf as AbsorbFeeConfigValueOneOfOriginal, type AccountInfo as AccountInfoOriginal, type ActionContext as ActionContextOriginal, type ActionDetails as ActionDetailsOriginal, type ActionEvent as ActionEventOriginal, ActionInitiator as ActionInitiatorOriginal, type ActionInitiatorWithLiterals as ActionInitiatorWithLiteralsOriginal, type Action as ActionOriginal, ActionType as ActionTypeOriginal, type ActionTypeWithLiterals as ActionTypeWithLiteralsOriginal, type AddPausePeriodRequest as AddPausePeriodRequestOriginal, type AddPausePeriodResponse as AddPausePeriodResponseOriginal, type AdditionalFee as AdditionalFeeOriginal, AdditionalFeeTrigger as AdditionalFeeTriggerOriginal, type AdditionalFeeTriggerWithLiterals as AdditionalFeeTriggerWithLiteralsOriginal, type Address as AddressOriginal, type AddressStreetOneOf as AddressStreetOneOfOriginal, type AggregatedTaxBreakdown as AggregatedTaxBreakdownOriginal, type AllowedActionsRequest as AllowedActionsRequestOriginal, type AllowedActionsResponse as AllowedActionsResponseOriginal, type AmountByStatus as AmountByStatusOriginal, type ApplicationFee as ApplicationFeeOriginal, type ApplicationFeeValueOneOf as ApplicationFeeValueOneOfOriginal, type AttachInvoice as AttachInvoiceOriginal, type AutomaticRetryData as AutomaticRetryDataOriginal, type BassToSapiPaypalMigrationRequest as BassToSapiPaypalMigrationRequestOriginal, type BassToSapiPaypalMigrationResponse as BassToSapiPaypalMigrationResponseOriginal, type BillingSettings as BillingSettingsOriginal, type BillingStatus as BillingStatusOriginal, type BulkItemChange as BulkItemChangeOriginal, type BulkUpdateSubscriptionItemsByFilterRequest as BulkUpdateSubscriptionItemsByFilterRequestOriginal, type BulkUpdateSubscriptionItemsByFilterResponse as BulkUpdateSubscriptionItemsByFilterResponseOriginal, type BusinessOriginData as BusinessOriginDataOriginal, type BusinessOrigin as BusinessOriginOriginal, type CancelActionConfiguration as CancelActionConfigurationOriginal, type CancelActionSettings as CancelActionSettingsOriginal, type Cancel as CancelOriginal, type CancelPendingChangeRequest as CancelPendingChangeRequestOriginal, type CancelPendingChangeResponse as CancelPendingChangeResponseOriginal, type CancelSubscriptionApplicationErrors as CancelSubscriptionApplicationErrorsOriginal, type CancelSubscriptionBORequest as CancelSubscriptionBORequestOriginal, type CancelSubscriptionBOResponse as CancelSubscriptionBOResponseOriginal, type CancelSubscriptionRequest as CancelSubscriptionRequestOriginal, type CancelSubscriptionResponse as CancelSubscriptionResponseOriginal, type CancelTimeCapsuleTaskRequest as CancelTimeCapsuleTaskRequestOriginal, type CancellationInfo as CancellationInfoOriginal, CancellationInitiator as CancellationInitiatorOriginal, type CancellationInitiatorWithLiterals as CancellationInitiatorWithLiteralsOriginal, type CatalogReference as CatalogReferenceOriginal, ChangeEffectiveTime as ChangeEffectiveTimeOriginal, type ChangeEffectiveTimeWithLiterals as ChangeEffectiveTimeWithLiteralsOriginal, type ChangePaymentContext as ChangePaymentContextOriginal, type ChangeSubscriptionRequest as ChangeSubscriptionRequestOriginal, type ChangeSubscriptionResponse as ChangeSubscriptionResponseOriginal, type Charge as ChargeOriginal, CollectionMethodEnumCollectionMethod as CollectionMethodEnumCollectionMethodOriginal, type CollectionMethodEnumCollectionMethodWithLiterals as CollectionMethodEnumCollectionMethodWithLiteralsOriginal, CollectionMethod as CollectionMethodOriginal, type CollectionMethodWithLiterals as CollectionMethodWithLiteralsOriginal, type Complete as CompleteOriginal, type ConvertSapiRequest as ConvertSapiRequestOriginal, type ConvertSapiResponse as ConvertSapiResponseOriginal, type CountByStatus as CountByStatusOriginal, type CountSubscriptionFilter as CountSubscriptionFilterOriginal, type CountSubscriptionFilterStatusOneOf as CountSubscriptionFilterStatusOneOfOriginal, type CountSubscriptionsRequest as CountSubscriptionsRequestOriginal, type CountSubscriptionsResponse as CountSubscriptionsResponseOriginal, type CreateRecurringInvoiceBORequest as CreateRecurringInvoiceBORequestOriginal, type CreateRecurringInvoiceBOResponse as CreateRecurringInvoiceBOResponseOriginal, type CreateSubscriptionForOrderRequest as CreateSubscriptionForOrderRequestOriginal, type CreateSubscriptionForOrderResponse as CreateSubscriptionForOrderResponseOriginal, type CreateSubscriptionInStateRequestModeOneOf as CreateSubscriptionInStateRequestModeOneOfOriginal, type CreateSubscriptionInStateRequest as CreateSubscriptionInStateRequestOriginal, type CreateSubscriptionInStateResponse as CreateSubscriptionInStateResponseOriginal, type CreateSubscriptionRequest as CreateSubscriptionRequestOriginal, type CreateSubscriptionResponse as CreateSubscriptionResponseOriginal, CreationMode as CreationModeOriginal, type CreationModeWithLiterals as CreationModeWithLiteralsOriginal, type CursorPagingMetadata as CursorPagingMetadataOriginal, type CursorPaging as CursorPagingOriginal, type Cursors as CursorsOriginal, type CustomBillingSchedule as CustomBillingScheduleOriginal, type CustomProrationAmountOneOf as CustomProrationAmountOneOfOriginal, type CustomProration as CustomProrationOriginal, type CustomerActionConfigurationOneOf as CustomerActionConfigurationOneOfOriginal, type CustomerAction as CustomerActionOriginal, type CustomerActionSettings as CustomerActionSettingsOriginal, type CustomerAllowedActionsRequest as CustomerAllowedActionsRequestOriginal, type CustomerAllowedActionsResponse as CustomerAllowedActionsResponseOriginal, type CustomerCancelConfiguration as CustomerCancelConfigurationOriginal, type CustomerCancelScheduledPauseApplicationErrors as CustomerCancelScheduledPauseApplicationErrorsOriginal, type CustomerCancelScheduledPauseRequest as CustomerCancelScheduledPauseRequestOriginal, type CustomerCancelScheduledPauseResponse as CustomerCancelScheduledPauseResponseOriginal, type CustomerCancelScheduledSkipApplicationErrors as CustomerCancelScheduledSkipApplicationErrorsOriginal, type CustomerCancelScheduledSkipRequest as CustomerCancelScheduledSkipRequestOriginal, type CustomerCancelScheduledSkipResponse as CustomerCancelScheduledSkipResponseOriginal, type CustomerCancelSubscriptionApplicationErrors as CustomerCancelSubscriptionApplicationErrorsOriginal, type CustomerCancelSubscriptionRequest as CustomerCancelSubscriptionRequestOriginal, type CustomerCancelSubscriptionResponse as CustomerCancelSubscriptionResponseOriginal, type CustomerExtendSubscriptionApplicationErrors as CustomerExtendSubscriptionApplicationErrorsOriginal, type CustomerExtendSubscriptionRequest as CustomerExtendSubscriptionRequestOriginal, type CustomerExtendSubscriptionResponse as CustomerExtendSubscriptionResponseOriginal, type CustomerIdOneOf as CustomerIdOneOfOriginal, type CustomerListUpcomingChargesRequest as CustomerListUpcomingChargesRequestOriginal, type CustomerListUpcomingChargesResponse as CustomerListUpcomingChargesResponseOriginal, type Customer as CustomerOriginal, type CustomerPauseResumeConfiguration as CustomerPauseResumeConfigurationOriginal, type CustomerPauseSubscriptionApplicationErrors as CustomerPauseSubscriptionApplicationErrorsOriginal, type CustomerPauseSubscriptionRequest as CustomerPauseSubscriptionRequestOriginal, type CustomerPauseSubscriptionResponse as CustomerPauseSubscriptionResponseOriginal, type CustomerResumeSubscriptionApplicationErrors as CustomerResumeSubscriptionApplicationErrorsOriginal, type CustomerResumeSubscriptionRequest as CustomerResumeSubscriptionRequestOriginal, type CustomerResumeSubscriptionResponse as CustomerResumeSubscriptionResponseOriginal, type CustomerSkipConfiguration as CustomerSkipConfigurationOriginal, type CustomerSkipCycleApplicationErrors as CustomerSkipCycleApplicationErrorsOriginal, type CustomerSkipCycleRequest as CustomerSkipCycleRequestOriginal, type CustomerSkipCycleResponse as CustomerSkipCycleResponseOriginal, type CustomerTurnOffAutoRenewalRequest as CustomerTurnOffAutoRenewalRequestOriginal, type CustomerTurnOffAutoRenewalResponse as CustomerTurnOffAutoRenewalResponseOriginal, type CustomerTurnOffSubscriptionAutoRenewalApplicationErrors as CustomerTurnOffSubscriptionAutoRenewalApplicationErrorsOriginal, type CustomerTurnOnAutoRenewalRequest as CustomerTurnOnAutoRenewalRequestOriginal, type CustomerTurnOnAutoRenewalResponse as CustomerTurnOnAutoRenewalResponseOriginal, type CustomerTurnOnSubscriptionAutoRenewalApplicationErrors as CustomerTurnOnSubscriptionAutoRenewalApplicationErrorsOriginal, type CustomerUpdateBillingDateApplicationErrors as CustomerUpdateBillingDateApplicationErrorsOriginal, type CustomerUpdateBillingDateConfiguration as CustomerUpdateBillingDateConfigurationOriginal, type CustomerUpdateBillingDateRequest as CustomerUpdateBillingDateRequestOriginal, type CustomerUpdateBillingDateResponse as CustomerUpdateBillingDateResponseOriginal, type Cycles as CyclesOriginal, type DeleteDraftSubscriptionRequest as DeleteDraftSubscriptionRequestOriginal, type DeleteDraftSubscriptionResponse as DeleteDraftSubscriptionResponseOriginal, type DeleteSubscriptionBORequest as DeleteSubscriptionBORequestOriginal, type DeleteSubscriptionBOResponse as DeleteSubscriptionBOResponseOriginal, type DeleteSubscriptionRequest as DeleteSubscriptionRequestOriginal, type DeleteSubscriptionResponse as DeleteSubscriptionResponseOriginal, type DetachInvoice as DetachInvoiceOriginal, type DiscountCycles as DiscountCyclesOriginal, type DiscountOrigin as DiscountOriginOriginal, type Discount as DiscountOriginal, type DiscountValueOneOf as DiscountValueOneOfOriginal, type DomainEventBodyOneOf as DomainEventBodyOneOfOriginal, type DomainEvent as DomainEventOriginal, type Duration as DurationOriginal, DurationUnit as DurationUnitOriginal, type DurationUnitWithLiterals as DurationUnitWithLiteralsOriginal, type DynamicTax as DynamicTaxOriginal, type Empty as EmptyOriginal, type EntityCreatedEvent as EntityCreatedEventOriginal, type EntityDeletedEvent as EntityDeletedEventOriginal, type EntityUpdatedEvent as EntityUpdatedEventOriginal, ExtendPolicyType as ExtendPolicyTypeOriginal, type ExtendPolicyTypeWithLiterals as ExtendPolicyTypeWithLiteralsOriginal, type ExtendSubscriptionApplicationErrors as ExtendSubscriptionApplicationErrorsOriginal, type ExtendSubscriptionRequestExtendPolicyOneOf as ExtendSubscriptionRequestExtendPolicyOneOfOriginal, type ExtendSubscriptionRequest as ExtendSubscriptionRequestOriginal, type ExtendSubscriptionResponse as ExtendSubscriptionResponseOriginal, type ExternalCollectionDetails as ExternalCollectionDetailsOriginal, type ExternalPriceConfig as ExternalPriceConfigOriginal, type ExternalPrice as ExternalPriceOriginal, type FinishFreeTrialNowRequest as FinishFreeTrialNowRequestOriginal, type FinishFreeTrialNowResponse as FinishFreeTrialNowResponseOriginal, type FixSubscriptionInvoicesConsistencyRequest as FixSubscriptionInvoicesConsistencyRequestOriginal, type FixSubscriptionInvoicesConsistencyResponse as FixSubscriptionInvoicesConsistencyResponseOriginal, type FixSubscriptionInvoicesRequestModeOneOf as FixSubscriptionInvoicesRequestModeOneOfOriginal, type FixSubscriptionInvoicesRequest as FixSubscriptionInvoicesRequestOriginal, type FixSubscriptionInvoicesResponse as FixSubscriptionInvoicesResponseOriginal, type FixSubscriptionTimeCapsuleTasksRequest as FixSubscriptionTimeCapsuleTasksRequestOriginal, type FixSubscriptionTimeCapsuleTasksResponse as FixSubscriptionTimeCapsuleTasksResponseOriginal, type FixedAmountFee as FixedAmountFeeOriginal, type FixedPriceConfig as FixedPriceConfigOriginal, type FixedPrice as FixedPriceOriginal, type FreeTrailEnded as FreeTrailEndedOriginal, type FreeTrailStarted as FreeTrailStartedOriginal, type FreeTrialData as FreeTrialDataOriginal, type FullAddressContactDetails as FullAddressContactDetailsOriginal, type FullAddressDetails as FullAddressDetailsOriginal, type FuturePriceUpdatesRequested as FuturePriceUpdatesRequestedOriginal, type FutureUpdatesRequested as FutureUpdatesRequestedOriginal, type GetFullSubscriptionDataRequest as GetFullSubscriptionDataRequestOriginal, type GetFullSubscriptionDataResponse as GetFullSubscriptionDataResponseOriginal, type GetSubscriptionAndInternalDataRequest as GetSubscriptionAndInternalDataRequestOriginal, type GetSubscriptionAndInternalDataResponse as GetSubscriptionAndInternalDataResponseOriginal, type GetSubscriptionInvoicesRequest as GetSubscriptionInvoicesRequestOriginal, type GetSubscriptionInvoicesResponse as GetSubscriptionInvoicesResponseOriginal, type GetSubscriptionRequest as GetSubscriptionRequestOriginal, type GetSubscriptionResponse as GetSubscriptionResponseOriginal, type GetSubscriptionsStatsRequest as GetSubscriptionsStatsRequestOriginal, type GetSubscriptionsStatsResponse as GetSubscriptionsStatsResponseOriginal, type GracePeriodData as GracePeriodDataOriginal, type GracePeriodEnded as GracePeriodEndedOriginal, type GracePeriodStarted as GracePeriodStartedOriginal, type HandleSubscriptionAfterInvoiceMarkedAsPaidRequest as HandleSubscriptionAfterInvoiceMarkedAsPaidRequestOriginal, HistoryActionInitiator as HistoryActionInitiatorOriginal, type HistoryActionInitiatorWithLiterals as HistoryActionInitiatorWithLiteralsOriginal, HistoryViewMode as HistoryViewModeOriginal, type HistoryViewModeWithLiterals as HistoryViewModeWithLiteralsOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, IdentityType as IdentityTypeOriginal, type IdentityTypeWithLiterals as IdentityTypeWithLiteralsOriginal, type InitiatePaymentMethodSetupRequest as InitiatePaymentMethodSetupRequestOriginal, type InitiatePaymentMethodSetupResponse as InitiatePaymentMethodSetupResponseOriginal, type InitiatedPaymentMethodSetup as InitiatedPaymentMethodSetupOriginal, type InternalSubscriptionData as InternalSubscriptionDataOriginal, type InvoiceActionActionTypeOneOf as InvoiceActionActionTypeOneOfOriginal, type InvoiceAction as InvoiceActionOriginal, type InvoiceApplicationFee as InvoiceApplicationFeeOriginal, type InvoiceApplicationFeeValueOneOf as InvoiceApplicationFeeValueOneOfOriginal, type InvoiceDiscount as InvoiceDiscountOriginal, type InvoiceDiscountValueOneOf as InvoiceDiscountValueOneOfOriginal, type InvoiceItem as InvoiceItemOriginal, type InvoiceItemPaymentTypeOneOf as InvoiceItemPaymentTypeOneOfOriginal, type InvoiceItemPricingModelOneOf as InvoiceItemPricingModelOneOfOriginal, type Invoice as InvoiceOriginal, type InvoicePlatformFeeFeeModelOneOf as InvoicePlatformFeeFeeModelOneOfOriginal, type InvoicePlatformFee as InvoicePlatformFeeOriginal, type InvoiceShippingCharges as InvoiceShippingChargesOriginal, InvoiceStatus as InvoiceStatusOriginal, type InvoiceStatusWithLiterals as InvoiceStatusWithLiteralsOriginal, ItemCategory as ItemCategoryOriginal, type ItemCategoryWithLiterals as ItemCategoryWithLiteralsOriginal, type ItemChange as ItemChangeOriginal, type Item as ItemOriginal, type ItemTaxData as ItemTaxDataOriginal, type LatestInvoiceMarkedAsPaid as LatestInvoiceMarkedAsPaidOriginal, type LatestPaymentAttempt as LatestPaymentAttemptOriginal, type LineItemTaxSummary as LineItemTaxSummaryOriginal, type ListSubscriptionHistoryRequest as ListSubscriptionHistoryRequestOriginal, type ListSubscriptionHistoryResponse as ListSubscriptionHistoryResponseOriginal, type ListUpcomingChargesRequest as ListUpcomingChargesRequestOriginal, type ListUpcomingChargesResponse as ListUpcomingChargesResponseOriginal, type MarkBillingCycleAsPaidApplicationErrors as MarkBillingCycleAsPaidApplicationErrorsOriginal, type MarkBillingCycleAsPaidRequest as MarkBillingCycleAsPaidRequestOriginal, type MarkBillingCycleAsPaidResponse as MarkBillingCycleAsPaidResponseOriginal, type MarkLatestInvoiceAsPaidApplicationErrors as MarkLatestInvoiceAsPaidApplicationErrorsOriginal, type MarkLatestInvoiceAsPaidRequest as MarkLatestInvoiceAsPaidRequestOriginal, type MarkLatestInvoiceAsPaidResponse as MarkLatestInvoiceAsPaidResponseOriginal, type MessageEnvelope as MessageEnvelopeOriginal, type MigrationDetails as MigrationDetailsOriginal, type Money as MoneyOriginal, type MultipleSubscriptionsOnOrdersInvoice as MultipleSubscriptionsOnOrdersInvoiceOriginal, type OneTime as OneTimeOriginal, OrderMethod as OrderMethodOriginal, type OrderMethodWithLiterals as OrderMethodWithLiteralsOriginal, type Origin as OriginOriginal, type OriginOverride as OriginOverrideOriginal, type PagingMetadataV2 as PagingMetadataV2Original, type Paging as PagingOriginal, type PassOnFeeConfig as PassOnFeeConfigOriginal, type PassOnFeeConfigValueOneOf as PassOnFeeConfigValueOneOfOriginal, type PatchSubscriptionRequest as PatchSubscriptionRequestOriginal, type PatchSubscriptionResponse as PatchSubscriptionResponseOriginal, PauseAt as PauseAtOriginal, type PauseAtWithLiterals as PauseAtWithLiteralsOriginal, type PauseInfo as PauseInfoOriginal, type PausePeriod as PausePeriodOriginal, PausePolicy as PausePolicyOriginal, type PausePolicyWithLiterals as PausePolicyWithLiteralsOriginal, type PauseResumeActionConfiguration as PauseResumeActionConfigurationOriginal, type PauseResumeActionSettings as PauseResumeActionSettingsOriginal, type PauseSubscriptionApplicationErrors as PauseSubscriptionApplicationErrorsOriginal, type PauseSubscriptionBORequest as PauseSubscriptionBORequestOriginal, type PauseSubscriptionBOResponse as PauseSubscriptionBOResponseOriginal, type PauseSubscriptionRequest as PauseSubscriptionRequestOriginal, type PauseSubscriptionRequested as PauseSubscriptionRequestedOriginal, type PauseSubscriptionResponse as PauseSubscriptionResponseOriginal, type PayCycleRequest as PayCycleRequestOriginal, type PayCycleResponse as PayCycleResponseOriginal, type PayRecurringInvoice as PayRecurringInvoiceOriginal, PaymentAttemptStatus as PaymentAttemptStatusOriginal, type PaymentAttemptStatusWithLiterals as PaymentAttemptStatusWithLiteralsOriginal, type PaymentData as PaymentDataOriginal, type PaymentMethod as PaymentMethodOriginal, type PaymentMethodUpdated as PaymentMethodUpdatedOriginal, PaymentMode as PaymentModeOriginal, type PaymentModeWithLiterals as PaymentModeWithLiteralsOriginal, type PaymentOrigin as PaymentOriginOriginal, type PaymentSettings as PaymentSettingsOriginal, PaymentSettlementMethod as PaymentSettlementMethodOriginal, type PaymentSettlementMethodWithLiterals as PaymentSettlementMethodWithLiteralsOriginal, PaymentStatusEnumPaymentStatus as PaymentStatusEnumPaymentStatusOriginal, type PaymentStatusEnumPaymentStatusWithLiterals as PaymentStatusEnumPaymentStatusWithLiteralsOriginal, PaymentStatus as PaymentStatusOriginal, type PaymentStatusWithLiterals as PaymentStatusWithLiteralsOriginal, type PaymentTaxData as PaymentTaxDataOriginal, PaymentTestMode as PaymentTestModeOriginal, type PaymentTestModeWithLiterals as PaymentTestModeWithLiteralsOriginal, type PercentageFee as PercentageFeeOriginal, type PlatformOrigin as PlatformOriginOriginal, type PreviewChangeSubscriptionRequest as PreviewChangeSubscriptionRequestOriginal, type PreviewChangeSubscriptionResponse as PreviewChangeSubscriptionResponseOriginal, type PreviewSubscriptionChargesRequest as PreviewSubscriptionChargesRequestOriginal, type PreviewSubscriptionChargesRequestSubscriptionOneOf as PreviewSubscriptionChargesRequestSubscriptionOneOfOriginal, type PreviewSubscriptionChargesResponse as PreviewSubscriptionChargesResponseOriginal, type PreviewSubscriptionsChargesRequest as PreviewSubscriptionsChargesRequestOriginal, type PreviewSubscriptionsChargesResponse as PreviewSubscriptionsChargesResponseOriginal, type PriceAdjustmentAdjustmentTypeOneOf as PriceAdjustmentAdjustmentTypeOneOfOriginal, type PriceAdjustment as PriceAdjustmentOriginal, PriceAdjustmentReason as PriceAdjustmentReasonOriginal, type PriceAdjustmentReasonWithLiterals as PriceAdjustmentReasonWithLiteralsOriginal, type PriceAdjustmentValueAdjustmentValueTypeOneOf as PriceAdjustmentValueAdjustmentValueTypeOneOfOriginal, type PriceAdjustmentValue as PriceAdjustmentValueOriginal, type PriceDetails as PriceDetailsOriginal, type PricingModelModelOneOf as PricingModelModelOneOfOriginal, type PricingModel as PricingModelOriginal, ProrationAction as ProrationActionOriginal, type ProrationActionWithLiterals as ProrationActionWithLiteralsOriginal, ProrationBehavior as ProrationBehaviorOriginal, type ProrationBehaviorWithLiterals as ProrationBehaviorWithLiteralsOriginal, type Proration as ProrationOriginal, type ProrationPreview as ProrationPreviewOriginal, type ProrationResult as ProrationResultOriginal, type ProrationTypeOneOf as ProrationTypeOneOfOriginal, type QuerySubscriptionsRequest as QuerySubscriptionsRequestOriginal, type QuerySubscriptionsResponse as QuerySubscriptionsResponseOriginal, type QueryV2 as QueryV2Original, type QueryV2PagingMethodOneOf as QueryV2PagingMethodOneOfOriginal, type Recurring as RecurringOriginal, type RedirectUrls as RedirectUrlsOriginal, type RefundInfo as RefundInfoOriginal, type Refund as RefundOriginal, RefundReason as RefundReasonOriginal, type RefundReasonWithLiterals as RefundReasonWithLiteralsOriginal, type RemoveCancellationInfoRequest as RemoveCancellationInfoRequestOriginal, type RemoveCancellationInfoResponse as RemoveCancellationInfoResponseOriginal, type RemovePauseInfoRequest as RemovePauseInfoRequestOriginal, type RemovePauseInfoResponse as RemovePauseInfoResponseOriginal, type RenewalPreview as RenewalPreviewOriginal, RequestedFields as RequestedFieldsOriginal, type RequestedFieldsWithLiterals as RequestedFieldsWithLiteralsOriginal, type Reschedule as RescheduleOriginal, type ResetPendingUpdates as ResetPendingUpdatesOriginal, type RestoreDraftSubscriptionRequest as RestoreDraftSubscriptionRequestOriginal, type RestoreDraftSubscriptionResponse as RestoreDraftSubscriptionResponseOriginal, type RestoreInfo as RestoreInfoOriginal, ResumeAt as ResumeAtOriginal, type ResumeAtWithLiterals as ResumeAtWithLiteralsOriginal, type ResumeSubscriptionApplicationErrors as ResumeSubscriptionApplicationErrorsOriginal, type ResumeSubscriptionRequest as ResumeSubscriptionRequestOriginal, type ResumeSubscriptionRequested as ResumeSubscriptionRequestedOriginal, type ResumeSubscriptionResponse as ResumeSubscriptionResponseOriginal, type ReviseSubscriptionRequest as ReviseSubscriptionRequestOriginal, type ReviseSubscriptionResponse as ReviseSubscriptionResponseOriginal, RevivePolicy as RevivePolicyOriginal, type RevivePolicyWithLiterals as RevivePolicyWithLiteralsOriginal, type ReviveSubscriptionRequest as ReviveSubscriptionRequestOriginal, type ReviveSubscriptionResponse as ReviveSubscriptionResponseOriginal, type RunTimeCapsuleTaskNowRequest as RunTimeCapsuleTaskNowRequestOriginal, type ScheduleAdditionalInfo as ScheduleAdditionalInfoOriginal, type ScheduleAdditionalInfoParamOneOf as ScheduleAdditionalInfoParamOneOfOriginal, type ScheduleTimeCapsuleTaskRequest as ScheduleTimeCapsuleTaskRequestOriginal, type ScheduledPauseCanceled as ScheduledPauseCanceledOriginal, type ScheduledResumeCanceled as ScheduledResumeCanceledOriginal, type SearchSubscriptionRequest as SearchSubscriptionRequestOriginal, type SearchSubscriptionResponse as SearchSubscriptionResponseOriginal, type SearchSubscriptionsRequest as SearchSubscriptionsRequestOriginal, type SearchSubscriptionsRequestPagingMethodOneOf as SearchSubscriptionsRequestPagingMethodOneOfOriginal, type SearchSubscriptionsResponse as SearchSubscriptionsResponseOriginal, type SendSubscriptionActionEventBORequestEventOneOf as SendSubscriptionActionEventBORequestEventOneOfOriginal, type SendSubscriptionActionEventBORequest as SendSubscriptionActionEventBORequestOriginal, type SendSubscriptionActionEventResponse as SendSubscriptionActionEventResponseOriginal, type SendTimeCapsuleTaskCanceledBIRequest as SendTimeCapsuleTaskCanceledBIRequestOriginal, type SetIsMigratedEvent as SetIsMigratedEventOriginal, type SetShiftingDataRequest as SetShiftingDataRequestOriginal, type SetShiftingDataResponse as SetShiftingDataResponseOriginal, type ShippingCharges as ShippingChargesOriginal, type SkipActionConfiguration as SkipActionConfigurationOriginal, type SkipActionSettings as SkipActionSettingsOriginal, SortOrder as SortOrderOriginal, type SortOrderWithLiterals as SortOrderWithLiteralsOriginal, type SortingClauses as SortingClausesOriginal, type Sorting as SortingOriginal, type SpecificDateSubscriptionUpdateData as SpecificDateSubscriptionUpdateDataOriginal, Status as StatusOriginal, type StatusWithLiterals as StatusWithLiteralsOriginal, type StreetAddress as StreetAddressOriginal, type Subscriber as SubscriberOriginal, type SubscriptionActivated as SubscriptionActivatedOriginal, type SubscriptionAutoRenewalTurnedOff as SubscriptionAutoRenewalTurnedOffOriginal, type SubscriptionAutoRenewalTurnedOn as SubscriptionAutoRenewalTurnedOnOriginal, type SubscriptionBackOfficeAction as SubscriptionBackOfficeActionOriginal, type SubscriptionBillingCyclePaid as SubscriptionBillingCyclePaidOriginal, type SubscriptionBillingCycleStarted as SubscriptionBillingCycleStartedOriginal, type SubscriptionBillingDateUpdated as SubscriptionBillingDateUpdatedOriginal, type SubscriptionBillingDetails as SubscriptionBillingDetailsOriginal, type SubscriptionCanceled as SubscriptionCanceledOriginal, type SubscriptionCancellationRequested as SubscriptionCancellationRequestedOriginal, type SubscriptionChangeSummary as SubscriptionChangeSummaryOriginal, type SubscriptionCharge as SubscriptionChargeOriginal, type SubscriptionCharges as SubscriptionChargesOriginal, type SubscriptionCollectionMethodUpdated as SubscriptionCollectionMethodUpdatedOriginal, type SubscriptionCreated as SubscriptionCreatedOriginal, type SubscriptionCycleReadyToPay as SubscriptionCycleReadyToPayOriginal, type SubscriptionCycleTriggered as SubscriptionCycleTriggeredOriginal, type SubscriptionDelayedSyncEvent as SubscriptionDelayedSyncEventOriginal, type SubscriptionDeleted as SubscriptionDeletedOriginal, type SubscriptionDiff as SubscriptionDiffOriginal, type SubscriptionEnded as SubscriptionEndedOriginal, type SubscriptionEvent as SubscriptionEventOriginal, type SubscriptionEventPayloadOneOf as SubscriptionEventPayloadOneOfOriginal, type SubscriptionExpired as SubscriptionExpiredOriginal, type SubscriptionExtendedExtendPolicyOneOf as SubscriptionExtendedExtendPolicyOneOfOriginal, type SubscriptionExtended as SubscriptionExtendedOriginal, SubscriptionFrequency as SubscriptionFrequencyOriginal, type SubscriptionFrequencyWithLiterals as SubscriptionFrequencyWithLiteralsOriginal, type SubscriptionHistoryEntry as SubscriptionHistoryEntryOriginal, type SubscriptionInfo as SubscriptionInfoOriginal, type SubscriptionInitialPurchaseCompleted as SubscriptionInitialPurchaseCompletedOriginal, type SubscriptionInvoice as SubscriptionInvoiceOriginal, type SubscriptionItemChange as SubscriptionItemChangeOriginal, type SubscriptionMarkedAsPaid as SubscriptionMarkedAsPaidOriginal, type Subscription as SubscriptionOriginal, type SubscriptionPaused as SubscriptionPausedOriginal, type SubscriptionPolicies as SubscriptionPoliciesOriginal, type SubscriptionPolicy as SubscriptionPolicyOriginal, type SubscriptionResumed as SubscriptionResumedOriginal, type SubscriptionRevived as SubscriptionRevivedOriginal, SubscriptionStatusEnumSubscriptionStatus as SubscriptionStatusEnumSubscriptionStatusOriginal, type SubscriptionStatusEnumSubscriptionStatusWithLiterals as SubscriptionStatusEnumSubscriptionStatusWithLiteralsOriginal, SubscriptionStatusGroup as SubscriptionStatusGroupOriginal, type SubscriptionStatusGroupWithLiterals as SubscriptionStatusGroupWithLiteralsOriginal, type SubscriptionStatus as SubscriptionStatusOriginal, type SubscriptionSuspended as SubscriptionSuspendedOriginal, type SubscriptionTrialPeriod as SubscriptionTrialPeriodOriginal, SubscriptionType as SubscriptionTypeOriginal, type SubscriptionTypeWithLiterals as SubscriptionTypeWithLiteralsOriginal, type SubscriptionUpdateData as SubscriptionUpdateDataOriginal, type SubscriptionUpdated as SubscriptionUpdatedOriginal, type Suspension as SuspensionOriginal, type TaskActionActionOneOf as TaskActionActionOneOfOriginal, type TaskAction as TaskActionOriginal, type TaskKey as TaskKeyOriginal, type Task as TaskOriginal, type TaxBreakdown as TaxBreakdownOriginal, type TaxData as TaxDataOriginal, type Tax as TaxOriginal, type TaxSettings as TaxSettingsOriginal, type TaxSummary as TaxSummaryOriginal, type TaxValueOneOf as TaxValueOneOfOriginal, TaxableAddressType as TaxableAddressTypeOriginal, type TaxableAddressTypeWithLiterals as TaxableAddressTypeWithLiteralsOriginal, type TimeBasedProration as TimeBasedProrationOriginal, type Totals as TotalsOriginal, type TurnOffSubscriptionAutoRenewalApplicationErrors as TurnOffSubscriptionAutoRenewalApplicationErrorsOriginal, type TurnOffSubscriptionAutoRenewalRequest as TurnOffSubscriptionAutoRenewalRequestOriginal, type TurnOffSubscriptionAutoRenewalResponse as TurnOffSubscriptionAutoRenewalResponseOriginal, type TurnOnSubscriptionAutoRenewalApplicationErrors as TurnOnSubscriptionAutoRenewalApplicationErrorsOriginal, type TurnOnSubscriptionAutoRenewalRequest as TurnOnSubscriptionAutoRenewalRequestOriginal, type TurnOnSubscriptionAutoRenewalResponse as TurnOnSubscriptionAutoRenewalResponseOriginal, type UnknownSubscriptionEvent as UnknownSubscriptionEventOriginal, type UnsupportedAction as UnsupportedActionOriginal, type UnsupportedReason as UnsupportedReasonOriginal, UpdateAction as UpdateActionOriginal, type UpdateActionWithLiterals as UpdateActionWithLiteralsOriginal, type UpdateBillingDateActionConfiguration as UpdateBillingDateActionConfigurationOriginal, type UpdateBillingDateActionSettings as UpdateBillingDateActionSettingsOriginal, type UpdateBillingDateData as UpdateBillingDateDataOriginal, type UpdateFullSubscriptionRequest as UpdateFullSubscriptionRequestOriginal, type UpdateFullSubscriptionResponse as UpdateFullSubscriptionResponseOriginal, type UpdatePausePaidDurationRequest as UpdatePausePaidDurationRequestOriginal, type UpdatePausePaidDurationResponse as UpdatePausePaidDurationResponseOriginal, type UpdatePaymentMethodBORequest as UpdatePaymentMethodBORequestOriginal, type UpdatePaymentMethodBOResponse as UpdatePaymentMethodBOResponseOriginal, type UpdatePaymentStatusRequest as UpdatePaymentStatusRequestOriginal, type UpdatePaymentStatusResponse as UpdatePaymentStatusResponseOriginal, type UpdateStatusRequest as UpdateStatusRequestOriginal, type UpdateStatusResponse as UpdateStatusResponseOriginal, type UpdateSubscriptionBillingDateApplicationErrors as UpdateSubscriptionBillingDateApplicationErrorsOriginal, type UpdateSubscriptionBillingDateRequest as UpdateSubscriptionBillingDateRequestOriginal, type UpdateSubscriptionBillingDateResponse as UpdateSubscriptionBillingDateResponseOriginal, type UpdateSubscriptionCurrencyRequest as UpdateSubscriptionCurrencyRequestOriginal, type UpdateSubscriptionCurrencyResponse as UpdateSubscriptionCurrencyResponseOriginal, type UpdateSubscriptionInvoiceCycleRequest as UpdateSubscriptionInvoiceCycleRequestOriginal, type UpdateSubscriptionInvoiceCycleResponse as UpdateSubscriptionInvoiceCycleResponseOriginal, type UpdateSubscriptionItemsRequest as UpdateSubscriptionItemsRequestOriginal, type UpdateSubscriptionItemsResponse as UpdateSubscriptionItemsResponseOriginal, type UpdateSubscriptionOriginRequest as UpdateSubscriptionOriginRequestOriginal, type UpdateSubscriptionOriginResponse as UpdateSubscriptionOriginResponseOriginal, type UpdateSubscriptionPaymentMethodRequest as UpdateSubscriptionPaymentMethodRequestOriginal, type UpdateSubscriptionPaymentMethodResponse as UpdateSubscriptionPaymentMethodResponseOriginal, type UpdateSubscriptionPlatformOriginRequest as UpdateSubscriptionPlatformOriginRequestOriginal, type UpdateSubscriptionPlatformOriginResponse as UpdateSubscriptionPlatformOriginResponseOriginal, type UpdateSubscriptionPoliciesRequest as UpdateSubscriptionPoliciesRequestOriginal, type UpdateSubscriptionPoliciesResponse as UpdateSubscriptionPoliciesResponseOriginal, type UpdateSubscriptionRequest as UpdateSubscriptionRequestOriginal, type UpdateSubscriptionResponse as UpdateSubscriptionResponseOriginal, type UpdateSubscriptionStartDateRequest as UpdateSubscriptionStartDateRequestOriginal, type UpdateSubscriptionStartDateResponse as UpdateSubscriptionStartDateResponseOriginal, type UpdatesApplied as UpdatesAppliedOriginal, type UpmActionSettings as UpmActionSettingsOriginal, type V1Duration as V1DurationOriginal, type V1SubscriptionActivated as V1SubscriptionActivatedOriginal, type V1SubscriptionCanceled as V1SubscriptionCanceledOriginal, type V1SubscriptionCreated as V1SubscriptionCreatedOriginal, type V1SubscriptionEventEventOneOf as V1SubscriptionEventEventOneOfOriginal, type V1SubscriptionEvent as V1SubscriptionEventOriginal, type V1SubscriptionInitialPurchaseCompleted as V1SubscriptionInitialPurchaseCompletedOriginal, type V1Subscription as V1SubscriptionOriginal, type V1SubscriptionResumed as V1SubscriptionResumedOriginal, V1SubscriptionStatusEnumSubscriptionStatus as V1SubscriptionStatusEnumSubscriptionStatusOriginal, type V1SubscriptionStatusEnumSubscriptionStatusWithLiterals as V1SubscriptionStatusEnumSubscriptionStatusWithLiteralsOriginal, type V1SubscriptionUpdated as V1SubscriptionUpdatedOriginal, type V2Subscription as V2SubscriptionOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, allowedActions, cancelSubscription, countSubscriptions, customerAllowedActions, customerCancelScheduledPause, customerCancelScheduledSkip, customerCancelSubscription, customerExtendSubscription, customerGetSubscription, customerInitiatePaymentMethodSetup, customerListUpcomingCharges, customerPauseSubscription, customerQuerySubscriptions, customerResumeSubscription, customerSkipCycle, customerTurnOffSubscriptionAutoRenewal, customerTurnOnSubscriptionAutoRenewal, customerUpdateBillingDate, customerUpdateSubscriptionPaymentMethod, extendSubscription, getSubscription, getSubscriptionsStats, initiatePaymentMethodSetup, listSubscriptionHistory, listUpcomingCharges, markBillingCycleAsPaid, markLatestInvoiceAsPaid, pauseSubscription, payCycle, previewSubscriptionCharges, previewSubscriptionsCharges, querySubscriptions, resumeSubscription, reviseSubscription, searchSubscriptions, turnOffSubscriptionAutoRenewal, turnOnSubscriptionAutoRenewal, updateSubscriptionBillingDate, updateSubscriptionPaymentMethod };
5208
+ export { type AbsorbFeeConfig as AbsorbFeeConfigOriginal, type AbsorbFeeConfigValueOneOf as AbsorbFeeConfigValueOneOfOriginal, type AccountInfo as AccountInfoOriginal, type ActionContext as ActionContextOriginal, type ActionDetails as ActionDetailsOriginal, type ActionEvent as ActionEventOriginal, ActionInitiator as ActionInitiatorOriginal, type ActionInitiatorWithLiterals as ActionInitiatorWithLiteralsOriginal, type Action as ActionOriginal, ActionType as ActionTypeOriginal, type ActionTypeWithLiterals as ActionTypeWithLiteralsOriginal, type AddPausePeriodRequest as AddPausePeriodRequestOriginal, type AddPausePeriodResponse as AddPausePeriodResponseOriginal, type AdditionalFee as AdditionalFeeOriginal, AdditionalFeeTrigger as AdditionalFeeTriggerOriginal, type AdditionalFeeTriggerWithLiterals as AdditionalFeeTriggerWithLiteralsOriginal, type AddressLocation as AddressLocationOriginal, type Address as AddressOriginal, type AddressStreetOneOf as AddressStreetOneOfOriginal, type AggregatedTaxBreakdown as AggregatedTaxBreakdownOriginal, type AllowedActionsRequest as AllowedActionsRequestOriginal, type AllowedActionsResponse as AllowedActionsResponseOriginal, type AmountByStatus as AmountByStatusOriginal, type ApplicationFee as ApplicationFeeOriginal, type ApplicationFeeValueOneOf as ApplicationFeeValueOneOfOriginal, type AttachInvoice as AttachInvoiceOriginal, type AutomaticRetryData as AutomaticRetryDataOriginal, type BassToSapiPaypalMigrationRequest as BassToSapiPaypalMigrationRequestOriginal, type BassToSapiPaypalMigrationResponse as BassToSapiPaypalMigrationResponseOriginal, type BillingSettings as BillingSettingsOriginal, type BillingStatus as BillingStatusOriginal, type BulkItemChange as BulkItemChangeOriginal, type BulkUpdateSubscriptionItemsByFilterRequest as BulkUpdateSubscriptionItemsByFilterRequestOriginal, type BulkUpdateSubscriptionItemsByFilterResponse as BulkUpdateSubscriptionItemsByFilterResponseOriginal, type BusinessOriginData as BusinessOriginDataOriginal, type BusinessOrigin as BusinessOriginOriginal, type CancelActionConfiguration as CancelActionConfigurationOriginal, type CancelActionSettings as CancelActionSettingsOriginal, type Cancel as CancelOriginal, type CancelPendingChangeRequest as CancelPendingChangeRequestOriginal, type CancelPendingChangeResponse as CancelPendingChangeResponseOriginal, type CancelSubscriptionApplicationErrors as CancelSubscriptionApplicationErrorsOriginal, type CancelSubscriptionBORequest as CancelSubscriptionBORequestOriginal, type CancelSubscriptionBOResponse as CancelSubscriptionBOResponseOriginal, type CancelSubscriptionRequest as CancelSubscriptionRequestOriginal, type CancelSubscriptionResponse as CancelSubscriptionResponseOriginal, type CancelTimeCapsuleTaskRequest as CancelTimeCapsuleTaskRequestOriginal, type CancellationInfo as CancellationInfoOriginal, CancellationInitiator as CancellationInitiatorOriginal, type CancellationInitiatorWithLiterals as CancellationInitiatorWithLiteralsOriginal, type CatalogReference as CatalogReferenceOriginal, type ChangeContext as ChangeContextOriginal, ChangeEffectiveTime as ChangeEffectiveTimeOriginal, type ChangeEffectiveTimeWithLiterals as ChangeEffectiveTimeWithLiteralsOriginal, type ChangePaymentContext as ChangePaymentContextOriginal, type ChangeSubscriptionForOrderRequest as ChangeSubscriptionForOrderRequestOriginal, type ChangeSubscriptionForOrderResponse as ChangeSubscriptionForOrderResponseOriginal, type ChangeSubscriptionRequest as ChangeSubscriptionRequestOriginal, type ChangeSubscriptionResponse as ChangeSubscriptionResponseOriginal, ChangeType as ChangeTypeOriginal, type ChangeTypeWithLiterals as ChangeTypeWithLiteralsOriginal, type Charge as ChargeOriginal, CollectionMethodEnumCollectionMethod as CollectionMethodEnumCollectionMethodOriginal, type CollectionMethodEnumCollectionMethodWithLiterals as CollectionMethodEnumCollectionMethodWithLiteralsOriginal, CollectionMethod as CollectionMethodOriginal, type CollectionMethodWithLiterals as CollectionMethodWithLiteralsOriginal, type Complete as CompleteOriginal, type ConvertSapiRequest as ConvertSapiRequestOriginal, type ConvertSapiResponse as ConvertSapiResponseOriginal, type CountByStatus as CountByStatusOriginal, type CountSubscriptionFilter as CountSubscriptionFilterOriginal, type CountSubscriptionFilterStatusOneOf as CountSubscriptionFilterStatusOneOfOriginal, type CountSubscriptionsRequest as CountSubscriptionsRequestOriginal, type CountSubscriptionsResponse as CountSubscriptionsResponseOriginal, type CreateRecurringInvoiceBORequest as CreateRecurringInvoiceBORequestOriginal, type CreateRecurringInvoiceBOResponse as CreateRecurringInvoiceBOResponseOriginal, type CreateSubscriptionForOrderRequest as CreateSubscriptionForOrderRequestOriginal, type CreateSubscriptionForOrderResponse as CreateSubscriptionForOrderResponseOriginal, type CreateSubscriptionInStateRequestModeOneOf as CreateSubscriptionInStateRequestModeOneOfOriginal, type CreateSubscriptionInStateRequest as CreateSubscriptionInStateRequestOriginal, type CreateSubscriptionInStateResponse as CreateSubscriptionInStateResponseOriginal, type CreateSubscriptionRequest as CreateSubscriptionRequestOriginal, type CreateSubscriptionResponse as CreateSubscriptionResponseOriginal, CreationMode as CreationModeOriginal, type CreationModeWithLiterals as CreationModeWithLiteralsOriginal, type CursorPagingMetadata as CursorPagingMetadataOriginal, type CursorPaging as CursorPagingOriginal, type Cursors as CursorsOriginal, type CustomBillingSchedule as CustomBillingScheduleOriginal, type CustomProrationAmountOneOf as CustomProrationAmountOneOfOriginal, type CustomProration as CustomProrationOriginal, type CustomerActionConfigurationOneOf as CustomerActionConfigurationOneOfOriginal, type CustomerActionCounters as CustomerActionCountersOriginal, type CustomerAction as CustomerActionOriginal, type CustomerActionSettings as CustomerActionSettingsOriginal, type CustomerAllowedActionsRequest as CustomerAllowedActionsRequestOriginal, type CustomerAllowedActionsResponse as CustomerAllowedActionsResponseOriginal, type CustomerCancelConfiguration as CustomerCancelConfigurationOriginal, type CustomerCancelPendingChangeRequest as CustomerCancelPendingChangeRequestOriginal, type CustomerCancelPendingChangeResponse as CustomerCancelPendingChangeResponseOriginal, type CustomerCancelScheduledPauseApplicationErrors as CustomerCancelScheduledPauseApplicationErrorsOriginal, type CustomerCancelScheduledPauseRequest as CustomerCancelScheduledPauseRequestOriginal, type CustomerCancelScheduledPauseResponse as CustomerCancelScheduledPauseResponseOriginal, type CustomerCancelScheduledSkipApplicationErrors as CustomerCancelScheduledSkipApplicationErrorsOriginal, type CustomerCancelScheduledSkipRequest as CustomerCancelScheduledSkipRequestOriginal, type CustomerCancelScheduledSkipResponse as CustomerCancelScheduledSkipResponseOriginal, type CustomerCancelSubscriptionApplicationErrors as CustomerCancelSubscriptionApplicationErrorsOriginal, type CustomerCancelSubscriptionRequest as CustomerCancelSubscriptionRequestOriginal, type CustomerCancelSubscriptionResponse as CustomerCancelSubscriptionResponseOriginal, type CustomerChangeSubscriptionApplicationErrors as CustomerChangeSubscriptionApplicationErrorsOriginal, type CustomerChangeSubscriptionRequest as CustomerChangeSubscriptionRequestOriginal, type CustomerChangeSubscriptionResponse as CustomerChangeSubscriptionResponseOriginal, type CustomerExtendSubscriptionApplicationErrors as CustomerExtendSubscriptionApplicationErrorsOriginal, type CustomerExtendSubscriptionRequest as CustomerExtendSubscriptionRequestOriginal, type CustomerExtendSubscriptionResponse as CustomerExtendSubscriptionResponseOriginal, type CustomerIdOneOf as CustomerIdOneOfOriginal, type CustomerListUpcomingChargesRequest as CustomerListUpcomingChargesRequestOriginal, type CustomerListUpcomingChargesResponse as CustomerListUpcomingChargesResponseOriginal, type Customer as CustomerOriginal, type CustomerPauseResumeConfiguration as CustomerPauseResumeConfigurationOriginal, type CustomerPauseSubscriptionApplicationErrors as CustomerPauseSubscriptionApplicationErrorsOriginal, type CustomerPauseSubscriptionRequest as CustomerPauseSubscriptionRequestOriginal, type CustomerPauseSubscriptionResponse as CustomerPauseSubscriptionResponseOriginal, type CustomerPreviewChangeSubscriptionRequest as CustomerPreviewChangeSubscriptionRequestOriginal, type CustomerPreviewChangeSubscriptionResponse as CustomerPreviewChangeSubscriptionResponseOriginal, type CustomerResumeSubscriptionApplicationErrors as CustomerResumeSubscriptionApplicationErrorsOriginal, type CustomerResumeSubscriptionRequest as CustomerResumeSubscriptionRequestOriginal, type CustomerResumeSubscriptionResponse as CustomerResumeSubscriptionResponseOriginal, type CustomerSkipConfiguration as CustomerSkipConfigurationOriginal, type CustomerSkipCycleApplicationErrors as CustomerSkipCycleApplicationErrorsOriginal, type CustomerSkipCycleRequest as CustomerSkipCycleRequestOriginal, type CustomerSkipCycleResponse as CustomerSkipCycleResponseOriginal, type CustomerTurnOffAutoRenewalRequest as CustomerTurnOffAutoRenewalRequestOriginal, type CustomerTurnOffAutoRenewalResponse as CustomerTurnOffAutoRenewalResponseOriginal, type CustomerTurnOffSubscriptionAutoRenewalApplicationErrors as CustomerTurnOffSubscriptionAutoRenewalApplicationErrorsOriginal, type CustomerTurnOnAutoRenewalRequest as CustomerTurnOnAutoRenewalRequestOriginal, type CustomerTurnOnAutoRenewalResponse as CustomerTurnOnAutoRenewalResponseOriginal, type CustomerTurnOnSubscriptionAutoRenewalApplicationErrors as CustomerTurnOnSubscriptionAutoRenewalApplicationErrorsOriginal, type CustomerUpdateBillingDateApplicationErrors as CustomerUpdateBillingDateApplicationErrorsOriginal, type CustomerUpdateBillingDateConfiguration as CustomerUpdateBillingDateConfigurationOriginal, type CustomerUpdateBillingDateRequest as CustomerUpdateBillingDateRequestOriginal, type CustomerUpdateBillingDateResponse as CustomerUpdateBillingDateResponseOriginal, type Cycles as CyclesOriginal, type DeleteDraftSubscriptionRequest as DeleteDraftSubscriptionRequestOriginal, type DeleteDraftSubscriptionResponse as DeleteDraftSubscriptionResponseOriginal, type DeleteSubscriptionBORequest as DeleteSubscriptionBORequestOriginal, type DeleteSubscriptionBOResponse as DeleteSubscriptionBOResponseOriginal, type DeleteSubscriptionRequest as DeleteSubscriptionRequestOriginal, type DeleteSubscriptionResponse as DeleteSubscriptionResponseOriginal, type DetachInvoice as DetachInvoiceOriginal, type DiscountCycles as DiscountCyclesOriginal, type DiscountOrigin as DiscountOriginOriginal, type Discount as DiscountOriginal, type DiscountValueOneOf as DiscountValueOneOfOriginal, type DomainEventBodyOneOf as DomainEventBodyOneOfOriginal, type DomainEvent as DomainEventOriginal, type Duration as DurationOriginal, DurationUnit as DurationUnitOriginal, type DurationUnitWithLiterals as DurationUnitWithLiteralsOriginal, type DynamicTax as DynamicTaxOriginal, type Empty as EmptyOriginal, type EntityCreatedEvent as EntityCreatedEventOriginal, type EntityDeletedEvent as EntityDeletedEventOriginal, type EntityUpdatedEvent as EntityUpdatedEventOriginal, ExtendPolicyType as ExtendPolicyTypeOriginal, type ExtendPolicyTypeWithLiterals as ExtendPolicyTypeWithLiteralsOriginal, type ExtendSubscriptionApplicationErrors as ExtendSubscriptionApplicationErrorsOriginal, type ExtendSubscriptionRequestExtendPolicyOneOf as ExtendSubscriptionRequestExtendPolicyOneOfOriginal, type ExtendSubscriptionRequest as ExtendSubscriptionRequestOriginal, type ExtendSubscriptionResponse as ExtendSubscriptionResponseOriginal, type ExternalCollectionDetails as ExternalCollectionDetailsOriginal, type ExternalPriceConfig as ExternalPriceConfigOriginal, type ExternalPrice as ExternalPriceOriginal, type FinishFreeTrialNowRequest as FinishFreeTrialNowRequestOriginal, type FinishFreeTrialNowResponse as FinishFreeTrialNowResponseOriginal, type FixSubscriptionInvoicesConsistencyRequest as FixSubscriptionInvoicesConsistencyRequestOriginal, type FixSubscriptionInvoicesConsistencyResponse as FixSubscriptionInvoicesConsistencyResponseOriginal, type FixSubscriptionInvoicesRequestModeOneOf as FixSubscriptionInvoicesRequestModeOneOfOriginal, type FixSubscriptionInvoicesRequest as FixSubscriptionInvoicesRequestOriginal, type FixSubscriptionInvoicesResponse as FixSubscriptionInvoicesResponseOriginal, type FixSubscriptionPaymentStatusRequest as FixSubscriptionPaymentStatusRequestOriginal, type FixSubscriptionPaymentStatusResponse as FixSubscriptionPaymentStatusResponseOriginal, type FixSubscriptionTimeCapsuleTasksRequest as FixSubscriptionTimeCapsuleTasksRequestOriginal, type FixSubscriptionTimeCapsuleTasksResponse as FixSubscriptionTimeCapsuleTasksResponseOriginal, type FixedAmountFee as FixedAmountFeeOriginal, type FixedPriceConfig as FixedPriceConfigOriginal, type FixedPrice as FixedPriceOriginal, type FreeTrailEnded as FreeTrailEndedOriginal, type FreeTrailStarted as FreeTrailStartedOriginal, type FreeTrialData as FreeTrialDataOriginal, type FullAddressContactDetails as FullAddressContactDetailsOriginal, type FullAddressDetails as FullAddressDetailsOriginal, type FuturePriceUpdatesRequested as FuturePriceUpdatesRequestedOriginal, type FutureUpdatesRequested as FutureUpdatesRequestedOriginal, type GetFullSubscriptionDataRequest as GetFullSubscriptionDataRequestOriginal, type GetFullSubscriptionDataResponse as GetFullSubscriptionDataResponseOriginal, type GetSubscriptionAndInternalDataRequest as GetSubscriptionAndInternalDataRequestOriginal, type GetSubscriptionAndInternalDataResponse as GetSubscriptionAndInternalDataResponseOriginal, type GetSubscriptionInvoicesRequest as GetSubscriptionInvoicesRequestOriginal, type GetSubscriptionInvoicesResponse as GetSubscriptionInvoicesResponseOriginal, type GetSubscriptionRequest as GetSubscriptionRequestOriginal, type GetSubscriptionResponse as GetSubscriptionResponseOriginal, type GetSubscriptionsStatsRequest as GetSubscriptionsStatsRequestOriginal, type GetSubscriptionsStatsResponse as GetSubscriptionsStatsResponseOriginal, type GracePeriodData as GracePeriodDataOriginal, type GracePeriodEnded as GracePeriodEndedOriginal, type GracePeriodStarted as GracePeriodStartedOriginal, type HandleSubscriptionAfterInvoiceMarkedAsPaidRequest as HandleSubscriptionAfterInvoiceMarkedAsPaidRequestOriginal, HistoryActionInitiator as HistoryActionInitiatorOriginal, type HistoryActionInitiatorWithLiterals as HistoryActionInitiatorWithLiteralsOriginal, HistoryViewMode as HistoryViewModeOriginal, type HistoryViewModeWithLiterals as HistoryViewModeWithLiteralsOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, IdentityType as IdentityTypeOriginal, type IdentityTypeWithLiterals as IdentityTypeWithLiteralsOriginal, type InitiatePaymentMethodSetupRequest as InitiatePaymentMethodSetupRequestOriginal, type InitiatePaymentMethodSetupResponse as InitiatePaymentMethodSetupResponseOriginal, type InitiatedPaymentMethodSetup as InitiatedPaymentMethodSetupOriginal, type InternalSubscriptionData as InternalSubscriptionDataOriginal, type InvoiceActionActionTypeOneOf as InvoiceActionActionTypeOneOfOriginal, type InvoiceAction as InvoiceActionOriginal, type InvoiceApplicationFee as InvoiceApplicationFeeOriginal, type InvoiceApplicationFeeValueOneOf as InvoiceApplicationFeeValueOneOfOriginal, type InvoiceDiscount as InvoiceDiscountOriginal, type InvoiceDiscountValueOneOf as InvoiceDiscountValueOneOfOriginal, type InvoiceItem as InvoiceItemOriginal, type InvoiceItemPaymentTypeOneOf as InvoiceItemPaymentTypeOneOfOriginal, type InvoiceItemPricingModelOneOf as InvoiceItemPricingModelOneOfOriginal, type Invoice as InvoiceOriginal, type InvoicePlatformFeeFeeModelOneOf as InvoicePlatformFeeFeeModelOneOfOriginal, type InvoicePlatformFee as InvoicePlatformFeeOriginal, type InvoiceShippingCharges as InvoiceShippingChargesOriginal, InvoiceStatus as InvoiceStatusOriginal, type InvoiceStatusWithLiterals as InvoiceStatusWithLiteralsOriginal, ItemCategory as ItemCategoryOriginal, type ItemCategoryWithLiterals as ItemCategoryWithLiteralsOriginal, type ItemChange as ItemChangeOriginal, type Item as ItemOriginal, type ItemTaxData as ItemTaxDataOriginal, type LatestInvoiceMarkedAsPaid as LatestInvoiceMarkedAsPaidOriginal, type LatestPaymentAttempt as LatestPaymentAttemptOriginal, type LineItemTaxSummary as LineItemTaxSummaryOriginal, type ListSubscriptionHistoryRequest as ListSubscriptionHistoryRequestOriginal, type ListSubscriptionHistoryResponse as ListSubscriptionHistoryResponseOriginal, type ListUpcomingChargesRequest as ListUpcomingChargesRequestOriginal, type ListUpcomingChargesResponse as ListUpcomingChargesResponseOriginal, type MarkBillingCycleAsPaidApplicationErrors as MarkBillingCycleAsPaidApplicationErrorsOriginal, type MarkBillingCycleAsPaidRequest as MarkBillingCycleAsPaidRequestOriginal, type MarkBillingCycleAsPaidResponse as MarkBillingCycleAsPaidResponseOriginal, type MarkLatestInvoiceAsPaidApplicationErrors as MarkLatestInvoiceAsPaidApplicationErrorsOriginal, type MarkLatestInvoiceAsPaidRequest as MarkLatestInvoiceAsPaidRequestOriginal, type MarkLatestInvoiceAsPaidResponse as MarkLatestInvoiceAsPaidResponseOriginal, type MessageEnvelope as MessageEnvelopeOriginal, type MigrationDetails as MigrationDetailsOriginal, MissingPreviousBillingDateResumeStrategy as MissingPreviousBillingDateResumeStrategyOriginal, type MissingPreviousBillingDateResumeStrategyWithLiterals as MissingPreviousBillingDateResumeStrategyWithLiteralsOriginal, type Money as MoneyOriginal, type MultipleSubscriptionsOnOrdersInvoice as MultipleSubscriptionsOnOrdersInvoiceOriginal, type OneTime as OneTimeOriginal, OrderMethod as OrderMethodOriginal, type OrderMethodWithLiterals as OrderMethodWithLiteralsOriginal, type Origin as OriginOriginal, type OriginOverride as OriginOverrideOriginal, type PagingMetadataV2 as PagingMetadataV2Original, type Paging as PagingOriginal, type PassOnFeeConfig as PassOnFeeConfigOriginal, type PassOnFeeConfigValueOneOf as PassOnFeeConfigValueOneOfOriginal, type PatchSubscriptionRequest as PatchSubscriptionRequestOriginal, type PatchSubscriptionResponse as PatchSubscriptionResponseOriginal, PauseAt as PauseAtOriginal, type PauseAtWithLiterals as PauseAtWithLiteralsOriginal, type PauseInfo as PauseInfoOriginal, type PausePeriod as PausePeriodOriginal, PausePolicy as PausePolicyOriginal, type PausePolicyWithLiterals as PausePolicyWithLiteralsOriginal, type PauseResumeActionConfiguration as PauseResumeActionConfigurationOriginal, type PauseResumeActionSettings as PauseResumeActionSettingsOriginal, type PauseSubscriptionApplicationErrors as PauseSubscriptionApplicationErrorsOriginal, type PauseSubscriptionBORequest as PauseSubscriptionBORequestOriginal, type PauseSubscriptionBOResponse as PauseSubscriptionBOResponseOriginal, type PauseSubscriptionRequest as PauseSubscriptionRequestOriginal, type PauseSubscriptionRequested as PauseSubscriptionRequestedOriginal, type PauseSubscriptionResponse as PauseSubscriptionResponseOriginal, type PayCycleRequest as PayCycleRequestOriginal, type PayCycleResponse as PayCycleResponseOriginal, type PayRecurringInvoice as PayRecurringInvoiceOriginal, PaymentAttemptStatus as PaymentAttemptStatusOriginal, type PaymentAttemptStatusWithLiterals as PaymentAttemptStatusWithLiteralsOriginal, type PaymentData as PaymentDataOriginal, type PaymentMethod as PaymentMethodOriginal, type PaymentMethodUpdated as PaymentMethodUpdatedOriginal, PaymentMode as PaymentModeOriginal, type PaymentModeWithLiterals as PaymentModeWithLiteralsOriginal, type PaymentOrigin as PaymentOriginOriginal, type PaymentSettings as PaymentSettingsOriginal, PaymentSettlementMethod as PaymentSettlementMethodOriginal, type PaymentSettlementMethodWithLiterals as PaymentSettlementMethodWithLiteralsOriginal, PaymentStatusEnumPaymentStatus as PaymentStatusEnumPaymentStatusOriginal, type PaymentStatusEnumPaymentStatusWithLiterals as PaymentStatusEnumPaymentStatusWithLiteralsOriginal, PaymentStatus as PaymentStatusOriginal, type PaymentStatusWithLiterals as PaymentStatusWithLiteralsOriginal, type PaymentTaxData as PaymentTaxDataOriginal, PaymentTestMode as PaymentTestModeOriginal, type PaymentTestModeWithLiterals as PaymentTestModeWithLiteralsOriginal, type PercentageFee as PercentageFeeOriginal, type PlatformOrigin as PlatformOriginOriginal, type PreviewChangeSubscriptionRequest as PreviewChangeSubscriptionRequestOriginal, type PreviewChangeSubscriptionResponse as PreviewChangeSubscriptionResponseOriginal, type PreviewSubscriptionChargesRequest as PreviewSubscriptionChargesRequestOriginal, type PreviewSubscriptionChargesRequestSubscriptionOneOf as PreviewSubscriptionChargesRequestSubscriptionOneOfOriginal, type PreviewSubscriptionChargesResponse as PreviewSubscriptionChargesResponseOriginal, type PreviewSubscriptionsChargesRequest as PreviewSubscriptionsChargesRequestOriginal, type PreviewSubscriptionsChargesResponse as PreviewSubscriptionsChargesResponseOriginal, type PriceAdjustmentAdjustmentTypeOneOf as PriceAdjustmentAdjustmentTypeOneOfOriginal, type PriceAdjustment as PriceAdjustmentOriginal, PriceAdjustmentReason as PriceAdjustmentReasonOriginal, type PriceAdjustmentReasonWithLiterals as PriceAdjustmentReasonWithLiteralsOriginal, type PriceAdjustmentValueAdjustmentValueTypeOneOf as PriceAdjustmentValueAdjustmentValueTypeOneOfOriginal, type PriceAdjustmentValue as PriceAdjustmentValueOriginal, type PriceDetails as PriceDetailsOriginal, type PricingModelModelOneOf as PricingModelModelOneOfOriginal, type PricingModel as PricingModelOriginal, ProrationAction as ProrationActionOriginal, type ProrationActionWithLiterals as ProrationActionWithLiteralsOriginal, ProrationBehaviorEnumProrationBehavior as ProrationBehaviorEnumProrationBehaviorOriginal, type ProrationBehaviorEnumProrationBehaviorWithLiterals as ProrationBehaviorEnumProrationBehaviorWithLiteralsOriginal, ProrationBehavior as ProrationBehaviorOriginal, type ProrationBehaviorWithLiterals as ProrationBehaviorWithLiteralsOriginal, type Proration as ProrationOriginal, type ProrationPreview as ProrationPreviewOriginal, type ProrationResult as ProrationResultOriginal, type ProrationTypeOneOf as ProrationTypeOneOfOriginal, type QuerySubscriptionsRequest as QuerySubscriptionsRequestOriginal, type QuerySubscriptionsResponse as QuerySubscriptionsResponseOriginal, type QueryV2 as QueryV2Original, type QueryV2PagingMethodOneOf as QueryV2PagingMethodOneOfOriginal, type Recurring as RecurringOriginal, type RedirectUrls as RedirectUrlsOriginal, type RefundInfo as RefundInfoOriginal, type Refund as RefundOriginal, RefundReason as RefundReasonOriginal, type RefundReasonWithLiterals as RefundReasonWithLiteralsOriginal, type RemoveCancellationInfoRequest as RemoveCancellationInfoRequestOriginal, type RemoveCancellationInfoResponse as RemoveCancellationInfoResponseOriginal, type RemovePauseInfoRequest as RemovePauseInfoRequestOriginal, type RemovePauseInfoResponse as RemovePauseInfoResponseOriginal, type RenewalPreview as RenewalPreviewOriginal, RequestedFields as RequestedFieldsOriginal, type RequestedFieldsWithLiterals as RequestedFieldsWithLiteralsOriginal, type Reschedule as RescheduleOriginal, type ResetPendingUpdates as ResetPendingUpdatesOriginal, type RestoreDraftSubscriptionRequest as RestoreDraftSubscriptionRequestOriginal, type RestoreDraftSubscriptionResponse as RestoreDraftSubscriptionResponseOriginal, type RestoreInfo as RestoreInfoOriginal, ResumeAt as ResumeAtOriginal, type ResumeAtWithLiterals as ResumeAtWithLiteralsOriginal, type ResumeSubscriptionApplicationErrors as ResumeSubscriptionApplicationErrorsOriginal, type ResumeSubscriptionRequest as ResumeSubscriptionRequestOriginal, type ResumeSubscriptionRequested as ResumeSubscriptionRequestedOriginal, type ResumeSubscriptionResponse as ResumeSubscriptionResponseOriginal, type ReviseSubscriptionRequest as ReviseSubscriptionRequestOriginal, type ReviseSubscriptionResponse as ReviseSubscriptionResponseOriginal, RevivePolicy as RevivePolicyOriginal, type RevivePolicyWithLiterals as RevivePolicyWithLiteralsOriginal, type ReviveSubscriptionRequest as ReviveSubscriptionRequestOriginal, type ReviveSubscriptionResponse as ReviveSubscriptionResponseOriginal, type RunTimeCapsuleTaskNowRequest as RunTimeCapsuleTaskNowRequestOriginal, type ScheduleAdditionalInfo as ScheduleAdditionalInfoOriginal, type ScheduleAdditionalInfoParamOneOf as ScheduleAdditionalInfoParamOneOfOriginal, type ScheduleTimeCapsuleTaskRequest as ScheduleTimeCapsuleTaskRequestOriginal, type ScheduledPauseCanceled as ScheduledPauseCanceledOriginal, type ScheduledResumeCanceled as ScheduledResumeCanceledOriginal, type SearchSubscriptionRequest as SearchSubscriptionRequestOriginal, type SearchSubscriptionResponse as SearchSubscriptionResponseOriginal, type SearchSubscriptionsRequest as SearchSubscriptionsRequestOriginal, type SearchSubscriptionsRequestPagingMethodOneOf as SearchSubscriptionsRequestPagingMethodOneOfOriginal, type SearchSubscriptionsResponse as SearchSubscriptionsResponseOriginal, type SendSubscriptionActionEventBORequestEventOneOf as SendSubscriptionActionEventBORequestEventOneOfOriginal, type SendSubscriptionActionEventBORequest as SendSubscriptionActionEventBORequestOriginal, type SendSubscriptionActionEventResponse as SendSubscriptionActionEventResponseOriginal, type SendTimeCapsuleTaskCanceledBIRequest as SendTimeCapsuleTaskCanceledBIRequestOriginal, type SetIsMigratedEvent as SetIsMigratedEventOriginal, type SetShiftingDataRequest as SetShiftingDataRequestOriginal, type SetShiftingDataResponse as SetShiftingDataResponseOriginal, type ShippingCharges as ShippingChargesOriginal, type SkipActionConfiguration as SkipActionConfigurationOriginal, type SkipActionSettings as SkipActionSettingsOriginal, SortOrder as SortOrderOriginal, type SortOrderWithLiterals as SortOrderWithLiteralsOriginal, type SortingClauses as SortingClausesOriginal, type Sorting as SortingOriginal, type SpecificDateSubscriptionUpdateData as SpecificDateSubscriptionUpdateDataOriginal, Status as StatusOriginal, type StatusWithLiterals as StatusWithLiteralsOriginal, type StreetAddress as StreetAddressOriginal, type Subscriber as SubscriberOriginal, type SubscriptionActivated as SubscriptionActivatedOriginal, type SubscriptionAutoRenewalTurnedOff as SubscriptionAutoRenewalTurnedOffOriginal, type SubscriptionAutoRenewalTurnedOn as SubscriptionAutoRenewalTurnedOnOriginal, type SubscriptionBackOfficeAction as SubscriptionBackOfficeActionOriginal, type SubscriptionBillingCyclePaid as SubscriptionBillingCyclePaidOriginal, type SubscriptionBillingCycleStarted as SubscriptionBillingCycleStartedOriginal, type SubscriptionBillingDateUpdated as SubscriptionBillingDateUpdatedOriginal, type SubscriptionBillingDetails as SubscriptionBillingDetailsOriginal, type SubscriptionCanceled as SubscriptionCanceledOriginal, type SubscriptionCancellationRequested as SubscriptionCancellationRequestedOriginal, type SubscriptionChangeSummary as SubscriptionChangeSummaryOriginal, type SubscriptionCharge as SubscriptionChargeOriginal, type SubscriptionCharges as SubscriptionChargesOriginal, type SubscriptionCollectionMethodUpdated as SubscriptionCollectionMethodUpdatedOriginal, type SubscriptionCreated as SubscriptionCreatedOriginal, type SubscriptionCycleReadyToPay as SubscriptionCycleReadyToPayOriginal, type SubscriptionCycleTriggered as SubscriptionCycleTriggeredOriginal, type SubscriptionDelayedSyncEvent as SubscriptionDelayedSyncEventOriginal, type SubscriptionDeleted as SubscriptionDeletedOriginal, type SubscriptionDiff as SubscriptionDiffOriginal, type SubscriptionEnded as SubscriptionEndedOriginal, type SubscriptionEvent as SubscriptionEventOriginal, type SubscriptionEventPayloadOneOf as SubscriptionEventPayloadOneOfOriginal, type SubscriptionExpired as SubscriptionExpiredOriginal, type SubscriptionExtendedExtendPolicyOneOf as SubscriptionExtendedExtendPolicyOneOfOriginal, type SubscriptionExtended as SubscriptionExtendedOriginal, SubscriptionFrequency as SubscriptionFrequencyOriginal, type SubscriptionFrequencyWithLiterals as SubscriptionFrequencyWithLiteralsOriginal, type SubscriptionHistoryEntry as SubscriptionHistoryEntryOriginal, type SubscriptionInfo as SubscriptionInfoOriginal, type SubscriptionInitialPurchaseCompleted as SubscriptionInitialPurchaseCompletedOriginal, type SubscriptionInvoice as SubscriptionInvoiceOriginal, type SubscriptionItemChange as SubscriptionItemChangeOriginal, type SubscriptionMarkedAsPaid as SubscriptionMarkedAsPaidOriginal, type SubscriptionOfflinePurchaseCompleted as SubscriptionOfflinePurchaseCompletedOriginal, type Subscription as SubscriptionOriginal, type SubscriptionPaused as SubscriptionPausedOriginal, type SubscriptionPolicies as SubscriptionPoliciesOriginal, type SubscriptionPolicy as SubscriptionPolicyOriginal, type SubscriptionResumed as SubscriptionResumedOriginal, type SubscriptionRevived as SubscriptionRevivedOriginal, SubscriptionStatusEnumSubscriptionStatus as SubscriptionStatusEnumSubscriptionStatusOriginal, type SubscriptionStatusEnumSubscriptionStatusWithLiterals as SubscriptionStatusEnumSubscriptionStatusWithLiteralsOriginal, SubscriptionStatusGroup as SubscriptionStatusGroupOriginal, type SubscriptionStatusGroupWithLiterals as SubscriptionStatusGroupWithLiteralsOriginal, type SubscriptionStatus as SubscriptionStatusOriginal, type SubscriptionSuspended as SubscriptionSuspendedOriginal, type SubscriptionTrialPeriod as SubscriptionTrialPeriodOriginal, SubscriptionType as SubscriptionTypeOriginal, type SubscriptionTypeWithLiterals as SubscriptionTypeWithLiteralsOriginal, type SubscriptionUpdateData as SubscriptionUpdateDataOriginal, type SubscriptionUpdated as SubscriptionUpdatedOriginal, type Suspension as SuspensionOriginal, type TaskActionActionOneOf as TaskActionActionOneOfOriginal, type TaskAction as TaskActionOriginal, type TaskKey as TaskKeyOriginal, type Task as TaskOriginal, type TaxBreakdown as TaxBreakdownOriginal, type TaxData as TaxDataOriginal, type Tax as TaxOriginal, type TaxSettings as TaxSettingsOriginal, type TaxSummary as TaxSummaryOriginal, type TaxValueOneOf as TaxValueOneOfOriginal, TaxableAddressType as TaxableAddressTypeOriginal, type TaxableAddressTypeWithLiterals as TaxableAddressTypeWithLiteralsOriginal, type TimeBasedProration as TimeBasedProrationOriginal, type Totals as TotalsOriginal, type TurnOffSubscriptionAutoRenewalApplicationErrors as TurnOffSubscriptionAutoRenewalApplicationErrorsOriginal, type TurnOffSubscriptionAutoRenewalRequest as TurnOffSubscriptionAutoRenewalRequestOriginal, type TurnOffSubscriptionAutoRenewalResponse as TurnOffSubscriptionAutoRenewalResponseOriginal, type TurnOnSubscriptionAutoRenewalApplicationErrors as TurnOnSubscriptionAutoRenewalApplicationErrorsOriginal, type TurnOnSubscriptionAutoRenewalRequest as TurnOnSubscriptionAutoRenewalRequestOriginal, type TurnOnSubscriptionAutoRenewalResponse as TurnOnSubscriptionAutoRenewalResponseOriginal, type UnknownSubscriptionEvent as UnknownSubscriptionEventOriginal, type UnsupportedAction as UnsupportedActionOriginal, type UnsupportedReason as UnsupportedReasonOriginal, UpdateAction as UpdateActionOriginal, type UpdateActionWithLiterals as UpdateActionWithLiteralsOriginal, type UpdateBillingDateActionConfiguration as UpdateBillingDateActionConfigurationOriginal, type UpdateBillingDateActionSettings as UpdateBillingDateActionSettingsOriginal, type UpdateBillingDateData as UpdateBillingDateDataOriginal, type UpdateFullSubscriptionRequest as UpdateFullSubscriptionRequestOriginal, type UpdateFullSubscriptionResponse as UpdateFullSubscriptionResponseOriginal, type UpdatePausePaidDurationRequest as UpdatePausePaidDurationRequestOriginal, type UpdatePausePaidDurationResponse as UpdatePausePaidDurationResponseOriginal, type UpdatePaymentMethodBORequest as UpdatePaymentMethodBORequestOriginal, type UpdatePaymentMethodBOResponse as UpdatePaymentMethodBOResponseOriginal, type UpdatePaymentStatusRequest as UpdatePaymentStatusRequestOriginal, type UpdatePaymentStatusResponse as UpdatePaymentStatusResponseOriginal, type UpdateStatusRequest as UpdateStatusRequestOriginal, type UpdateStatusResponse as UpdateStatusResponseOriginal, type UpdateSubscriptionBillingDateApplicationErrors as UpdateSubscriptionBillingDateApplicationErrorsOriginal, type UpdateSubscriptionBillingDateRequest as UpdateSubscriptionBillingDateRequestOriginal, type UpdateSubscriptionBillingDateResponse as UpdateSubscriptionBillingDateResponseOriginal, type UpdateSubscriptionCurrencyRequest as UpdateSubscriptionCurrencyRequestOriginal, type UpdateSubscriptionCurrencyResponse as UpdateSubscriptionCurrencyResponseOriginal, type UpdateSubscriptionInvoiceCycleRequest as UpdateSubscriptionInvoiceCycleRequestOriginal, type UpdateSubscriptionInvoiceCycleResponse as UpdateSubscriptionInvoiceCycleResponseOriginal, type UpdateSubscriptionItemsRequest as UpdateSubscriptionItemsRequestOriginal, type UpdateSubscriptionItemsResponse as UpdateSubscriptionItemsResponseOriginal, type UpdateSubscriptionOriginRequest as UpdateSubscriptionOriginRequestOriginal, type UpdateSubscriptionOriginResponse as UpdateSubscriptionOriginResponseOriginal, type UpdateSubscriptionPaymentMethodRequest as UpdateSubscriptionPaymentMethodRequestOriginal, type UpdateSubscriptionPaymentMethodResponse as UpdateSubscriptionPaymentMethodResponseOriginal, type UpdateSubscriptionPlatformOriginRequest as UpdateSubscriptionPlatformOriginRequestOriginal, type UpdateSubscriptionPlatformOriginResponse as UpdateSubscriptionPlatformOriginResponseOriginal, type UpdateSubscriptionPoliciesRequest as UpdateSubscriptionPoliciesRequestOriginal, type UpdateSubscriptionPoliciesResponse as UpdateSubscriptionPoliciesResponseOriginal, type UpdateSubscriptionRequest as UpdateSubscriptionRequestOriginal, type UpdateSubscriptionResponse as UpdateSubscriptionResponseOriginal, type UpdateSubscriptionStartDateRequest as UpdateSubscriptionStartDateRequestOriginal, type UpdateSubscriptionStartDateResponse as UpdateSubscriptionStartDateResponseOriginal, type UpdatesApplied as UpdatesAppliedOriginal, type UpmActionSettings as UpmActionSettingsOriginal, type V1Duration as V1DurationOriginal, type V1ProrationResult as V1ProrationResultOriginal, type V1SubscriptionActivated as V1SubscriptionActivatedOriginal, type V1SubscriptionCanceled as V1SubscriptionCanceledOriginal, type V1SubscriptionCreated as V1SubscriptionCreatedOriginal, type V1SubscriptionEventEventOneOf as V1SubscriptionEventEventOneOfOriginal, type V1SubscriptionEvent as V1SubscriptionEventOriginal, type V1SubscriptionInitialPurchaseCompleted as V1SubscriptionInitialPurchaseCompletedOriginal, type V1Subscription as V1SubscriptionOriginal, type V1SubscriptionResumed as V1SubscriptionResumedOriginal, V1SubscriptionStatusEnumSubscriptionStatus as V1SubscriptionStatusEnumSubscriptionStatusOriginal, type V1SubscriptionStatusEnumSubscriptionStatusWithLiterals as V1SubscriptionStatusEnumSubscriptionStatusWithLiteralsOriginal, type V1SubscriptionUpdated as V1SubscriptionUpdatedOriginal, type V2Subscription as V2SubscriptionOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, allowedActions, cancelSubscription, countSubscriptions, customerAllowedActions, customerCancelPendingChange, customerCancelScheduledPause, customerCancelScheduledSkip, customerCancelSubscription, customerChangeSubscription, customerExtendSubscription, customerGetSubscription, customerInitiatePaymentMethodSetup, customerListUpcomingCharges, customerPauseSubscription, customerPreviewChangeSubscription, customerQuerySubscriptions, customerResumeSubscription, customerSkipCycle, customerTurnOffSubscriptionAutoRenewal, customerTurnOnSubscriptionAutoRenewal, customerUpdateBillingDate, customerUpdateSubscriptionPaymentMethod, extendSubscription, getSubscription, getSubscriptionsStats, initiatePaymentMethodSetup, listSubscriptionHistory, listUpcomingCharges, markBillingCycleAsPaid, markLatestInvoiceAsPaid, pauseSubscription, previewSubscriptionCharges, previewSubscriptionsCharges, querySubscriptions, resumeSubscription, reviseSubscription, searchSubscriptions, turnOffSubscriptionAutoRenewal, turnOnSubscriptionAutoRenewal, updateSubscriptionBillingDate, updateSubscriptionPaymentMethod };