@wix/auto_sdk_subscription_subscriptions 1.0.46 → 1.0.48

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 +197 -222
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +1962 -1734
  5. package/build/cjs/index.typings.js +153 -171
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +1933 -1722
  8. package/build/cjs/meta.js +143 -146
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +3 -11
  11. package/build/es/index.mjs +194 -221
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +1962 -1734
  14. package/build/es/index.typings.mjs +150 -170
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +1933 -1722
  17. package/build/es/meta.mjs +140 -145
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +3 -11
  20. package/build/internal/cjs/index.typings.d.ts +2021 -1732
  21. package/build/internal/cjs/meta.d.ts +1875 -1552
  22. package/build/internal/es/index.d.mts +3 -11
  23. package/build/internal/es/index.typings.d.mts +2021 -1732
  24. package/build/internal/es/meta.d.mts +1875 -1552
  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.mjs';
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, 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.mjs';
2
2
  import '@wix/sdk-types';
3
3
 
4
4
  interface Subscription {
@@ -652,6 +652,13 @@ interface Totals {
652
652
  * @readonly
653
653
  */
654
654
  tax?: string | null;
655
+ /**
656
+ * Tax-exempt amount.
657
+ * @format DECIMAL_VALUE
658
+ * @decimalValue options { gte:0.00, maxScale:2 }
659
+ * @readonly
660
+ */
661
+ exempt?: string | null;
655
662
  /**
656
663
  * Total discount.
657
664
  * @format DECIMAL_VALUE
@@ -854,11 +861,16 @@ interface SubscriptionPolicies {
854
861
  /** Subscription can be canceled not only immediately, but also at end of billing cycle by turning off auto-renew */
855
862
  allowEndOfCycleCancellation?: boolean;
856
863
  /**
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.
864
+ * Deprecated. Never in production. BASS does not read or write this field; UoU gates use
865
+ * `CustomerSettingsResolver` BBS `customer_settings_by_app_def_id` or Legacy booleans above.
866
+ * @deprecated
860
867
  */
861
868
  customerActionSettings?: CustomerActionSettings;
869
+ /**
870
+ * Number of self-service actions already used on this subscription.
871
+ * @readonly
872
+ */
873
+ customerActionCounters?: CustomerActionCounters;
862
874
  }
863
875
  /**
864
876
  * Per-action merchant configuration for customer self-service actions.
@@ -975,6 +987,18 @@ interface UpdateBillingDateActionConfiguration {
975
987
  /** Whether to allow advancing billing date for weekly subscriptions */
976
988
  allowAdvanceForWeekly?: boolean | null;
977
989
  }
990
+ interface CustomerActionCounters {
991
+ /**
992
+ * Number of self-service skips already used. Unset means zero.
993
+ * @readonly
994
+ */
995
+ skipCount?: number | null;
996
+ /**
997
+ * Number of self-service pauses already used. Unset means zero.
998
+ * @readonly
999
+ */
1000
+ pauseCount?: number | null;
1001
+ }
978
1002
  interface PauseInfo {
979
1003
  pausePolicy?: PausePolicyWithLiterals;
980
1004
  pauseAt?: PauseAtWithLiterals;
@@ -1345,6 +1369,11 @@ interface Sorting {
1345
1369
  fieldName?: string;
1346
1370
  /** Sort order. */
1347
1371
  order?: SortOrderWithLiterals;
1372
+ /**
1373
+ * Origin point for geo-distance sorting on a GEO field
1374
+ * results are ordered by distance from this point (ASC = nearest first, DESC = farthest first).
1375
+ */
1376
+ origin?: AddressLocation;
1348
1377
  }
1349
1378
  declare enum SortOrder {
1350
1379
  ASC = "ASC",
@@ -1352,6 +1381,12 @@ declare enum SortOrder {
1352
1381
  }
1353
1382
  /** @enumType */
1354
1383
  type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
1384
+ interface AddressLocation {
1385
+ /** Address latitude. */
1386
+ latitude?: number | null;
1387
+ /** Address longitude. */
1388
+ longitude?: number | null;
1389
+ }
1355
1390
  interface Paging {
1356
1391
  /** Number of items to load. */
1357
1392
  limit?: number | null;
@@ -1516,10 +1551,11 @@ declare enum ActionType {
1516
1551
  UPDATE_BILLING_DATE = "UPDATE_BILLING_DATE",
1517
1552
  UPDATE_COLLECTION_METHOD = "UPDATE_COLLECTION_METHOD",
1518
1553
  SKIP_CYCLE = "SKIP_CYCLE",
1519
- CUSTOMER_UPDATE_BILLING_DATE = "CUSTOMER_UPDATE_BILLING_DATE"
1554
+ CUSTOMER_UPDATE_BILLING_DATE = "CUSTOMER_UPDATE_BILLING_DATE",
1555
+ CHANGE_SUBSCRIPTION = "CHANGE_SUBSCRIPTION"
1520
1556
  }
1521
1557
  /** @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';
1558
+ 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
1559
  declare enum ExtendPolicyType {
1524
1560
  PERIOD = "PERIOD",
1525
1561
  BILLING_CYCLE = "BILLING_CYCLE"
@@ -1853,6 +1889,12 @@ interface LineItemTaxSummary {
1853
1889
  * @decimalValue options { maxScale:4 }
1854
1890
  */
1855
1891
  finalTaxAmount?: string | null;
1892
+ /**
1893
+ * 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.
1894
+ * @format DECIMAL_VALUE
1895
+ * @decimalValue options { maxScale:4 }
1896
+ */
1897
+ exemptAmount?: string | null;
1856
1898
  }
1857
1899
  interface FixedPriceConfig {
1858
1900
  }
@@ -2090,7 +2132,7 @@ interface DomainEvent extends DomainEventBodyOneOf {
2090
2132
  /** If present, indicates the action that triggered the event. */
2091
2133
  originatedFrom?: string | null;
2092
2134
  /**
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.
2135
+ * 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
2136
  * 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
2137
  */
2096
2138
  entityEventSequence?: string | null;
@@ -2216,12 +2258,64 @@ interface AccountInfo {
2216
2258
  */
2217
2259
  siteId?: string | null;
2218
2260
  }
2219
- interface CreateSubscriptionInStateRequest extends CreateSubscriptionInStateRequestModeOneOf {
2220
- activeSubscription?: CreateSubscriptionRequest;
2261
+ interface SetIsMigratedEvent {
2262
+ /** @format GUID */
2263
+ subscriptionId?: string;
2264
+ }
2265
+ interface SubscriptionDelayedSyncEvent {
2266
+ /** @format GUID */
2267
+ subscriptionId?: string;
2268
+ }
2269
+ interface InvoiceAction extends InvoiceActionActionTypeOneOf {
2270
+ payRecurring?: PayRecurringInvoice;
2221
2271
  }
2222
2272
  /** @oneof */
2223
- interface CreateSubscriptionInStateRequestModeOneOf {
2224
- activeSubscription?: CreateSubscriptionRequest;
2273
+ interface InvoiceActionActionTypeOneOf {
2274
+ payRecurring?: PayRecurringInvoice;
2275
+ }
2276
+ interface PayRecurringInvoice {
2277
+ /** @format GUID */
2278
+ invoiceId?: string;
2279
+ }
2280
+ /**
2281
+ * Sent each time a subscription status has been set to Active
2282
+ * Active shows that a subscription is live and operational.
2283
+ * For example:
2284
+ * * For subscription with free trial, free trial start date is also the activation date.
2285
+ * * For a subscription with future start date, the start date is also the activation date.
2286
+ * * When a subscription is resumed from a pause status, the resume date is also the activation date.
2287
+ */
2288
+ interface SubscriptionActivated {
2289
+ subscription?: Subscription;
2290
+ }
2291
+ /**
2292
+ * Sent each time a subscription status has been set to Ended
2293
+ * Ended shows that a subscription reached its end date and ended its life cycle as a result of the agreement.
2294
+ * This is different from a Canceled subscription which ends the subscription before a designated end date.
2295
+ * Therefore, Ended and Canceled are mutually exclusive.
2296
+ */
2297
+ interface SubscriptionEnded {
2298
+ subscription?: Subscription;
2299
+ }
2300
+ interface SubscriptionInitialPurchaseCompleted {
2301
+ subscription?: Subscription;
2302
+ actionDetails?: ActionDetails;
2303
+ /** @format GUID */
2304
+ paymentTransactionId?: string | null;
2305
+ }
2306
+ interface SubscriptionCycleReadyToPay {
2307
+ subscription?: Subscription;
2308
+ }
2309
+ interface SubscriptionBillingCycleStarted {
2310
+ subscription?: Subscription;
2311
+ /**
2312
+ * Wix Pay transaction id, optional. Exists if event was triggered by a payment.
2313
+ * @format GUID
2314
+ */
2315
+ paymentTransactionId?: string | null;
2316
+ }
2317
+ interface SubscriptionRevived {
2318
+ subscription?: Subscription;
2225
2319
  }
2226
2320
  interface CreateSubscriptionRequest {
2227
2321
  subscription?: Subscription;
@@ -2241,2118 +2335,2230 @@ interface OriginOverride {
2241
2335
  /** @format GUID */
2242
2336
  instanceId?: string;
2243
2337
  }
2244
- interface CreateSubscriptionInStateResponse {
2245
- /** @format GUID */
2246
- subscriptionId?: string;
2247
- }
2248
- interface PayCycleRequest {
2249
- /** @format GUID */
2250
- subscriptionId: string;
2251
- paymentTestMode?: PaymentTestModeWithLiterals;
2252
- /** @format GUID */
2253
- tenantId: string;
2254
- }
2255
- declare enum PaymentTestMode {
2256
- REGULAR = "REGULAR",
2257
- FAIL_TECHNICAL = "FAIL_TECHNICAL",
2258
- FAIL_DECLINE = "FAIL_DECLINE",
2259
- FAIL_RETRYABLE_DECLINE = "FAIL_RETRYABLE_DECLINE"
2260
- }
2261
- /** @enumType */
2262
- type PaymentTestModeWithLiterals = PaymentTestMode | 'REGULAR' | 'FAIL_TECHNICAL' | 'FAIL_DECLINE' | 'FAIL_RETRYABLE_DECLINE';
2263
- interface PayCycleResponse {
2264
- /** @format GUID */
2265
- invoiceId?: string;
2266
- /** @format GUID */
2267
- paymentOrderId?: string | null;
2338
+ interface CreateSubscriptionResponse {
2268
2339
  subscription?: Subscription;
2340
+ /**
2341
+ * Payments order that should be paid (or authorize card) in order to activate subscription. Empty for free subscriptions.
2342
+ * @format GUID
2343
+ */
2344
+ paymentOrderId?: string | null;
2269
2345
  }
2270
- interface GetFullSubscriptionDataRequest {
2271
- /** @format GUID */
2272
- id?: string;
2273
- }
2274
- interface GetFullSubscriptionDataResponse {
2346
+ interface UpdateSubscriptionRequest {
2347
+ /** Revision is validated if Subscription.revision is set */
2275
2348
  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[];
2349
+ /** Supported fields: customer, metadata */
2350
+ fieldMask?: string[];
2288
2351
  }
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;
2352
+ interface UpdateSubscriptionResponse {
2353
+ subscription?: Subscription;
2294
2354
  }
2295
- interface PausePeriod {
2355
+ interface UpdateSubscriptionStartDateRequest {
2356
+ /**
2357
+ * Subscription ID
2358
+ * @format GUID
2359
+ */
2360
+ id?: string;
2361
+ /**
2362
+ * Can be updated only if Subscription is in Draft state
2363
+ * By setting start_date in the future, end_date will be recalculated for termed Subscriptions
2364
+ * cycles_to_pay_on_creation will be set to 1 if no free trial is set
2365
+ */
2296
2366
  startDate?: Date | null;
2297
- endDate?: Date | null;
2298
2367
  }
2299
- interface GetSubscriptionAndInternalDataRequest {
2300
- /** @format GUID */
2301
- subscriptionId?: string;
2302
- /** @format GUID */
2303
- tenantId?: string;
2304
- }
2305
- interface GetSubscriptionAndInternalDataResponse {
2368
+ interface UpdateSubscriptionStartDateResponse {
2306
2369
  subscription?: Subscription;
2307
- internalSubscriptionData?: InternalSubscriptionData;
2308
2370
  }
2309
- interface SearchSubscriptionRequest {
2310
- /** @format GUID */
2371
+ interface BassToSapiPaypalMigrationRequest {
2372
+ /**
2373
+ * Subscription ID
2374
+ * @format GUID
2375
+ */
2311
2376
  id?: string;
2312
- /** @format GUID */
2313
- tenantId?: string;
2377
+ collectionMethod?: CollectionMethodEnumCollectionMethodWithLiterals;
2314
2378
  }
2315
- interface SearchSubscriptionResponse {
2379
+ interface BassToSapiPaypalMigrationResponse {
2316
2380
  subscription?: Subscription;
2317
2381
  }
2318
- interface UpdatePausePaidDurationRequest {
2319
- /** @format GUID */
2320
- subscriptionId?: string;
2382
+ interface UpdateSubscriptionPoliciesRequest {
2321
2383
  /**
2322
- * @min 1
2323
- * @max 10000000
2384
+ * Subscription ID
2385
+ * @format GUID
2324
2386
  */
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;
2387
+ id?: string;
2388
+ cancellableByCustomer?: boolean | null;
2337
2389
  }
2338
- interface UpdateStatusResponse {
2339
- subscription?: Subscription;
2390
+ interface UpdateSubscriptionPoliciesResponse {
2391
+ /** Updated policies of the subscription */
2392
+ policies?: SubscriptionPolicies;
2340
2393
  }
2341
- interface UpdatePaymentStatusRequest {
2342
- /** @format GUID */
2343
- subscriptionId?: string;
2344
- /** @format GUID */
2345
- tenantId?: string;
2346
- paymentStatus?: PaymentStatusWithLiterals;
2394
+ interface UpdateSubscriptionBillingDateRequest {
2395
+ /**
2396
+ * ID of the subscription to update the billing date for.
2397
+ * @format GUID
2398
+ */
2399
+ id: string;
2400
+ /** New billing date in `YYYY-MM-DDThh:mm:ss:sssZ` format. */
2401
+ billingDate: Date | null;
2402
+ /**
2403
+ * Information about how BASS adjusts the total of the next invoice. Extending
2404
+ * the current billing cycle results in a higher payment, while shortening it
2405
+ * leads to a lower payment. BASS offers automatic calculation of the proration
2406
+ * amount based on the number of days added to or removed from the current billing
2407
+ * cycle. Alternatively, you can use your own custom method to calculate the
2408
+ * proration amount. The custom proration amount can't exceed the total of the
2409
+ * current billing cycle.
2410
+ */
2411
+ proration?: Proration;
2347
2412
  }
2348
- interface UpdatePaymentStatusResponse {
2413
+ interface UpdateSubscriptionBillingDateResponse {
2414
+ /** Updated subscription. */
2349
2415
  subscription?: Subscription;
2350
2416
  }
2351
- interface RemoveCancellationInfoRequest {
2352
- /** @format GUID */
2353
- subscriptionId?: string;
2354
- /** @format GUID */
2355
- tenantId?: string;
2356
- }
2357
- interface RemoveCancellationInfoResponse {
2417
+ interface SubscriptionBillingDateUpdated {
2358
2418
  subscription?: Subscription;
2419
+ billingDate?: Date | null;
2420
+ proration?: Proration;
2359
2421
  }
2360
- interface RemovePauseInfoRequest {
2361
- /** @format GUID */
2362
- subscriptionId?: string;
2363
- /** @format GUID */
2364
- tenantId?: string;
2422
+ interface UpdateSubscriptionOriginRequest {
2423
+ /**
2424
+ * ID of the subscription to update origin.
2425
+ * @format GUID
2426
+ */
2427
+ id?: string;
2428
+ /**
2429
+ * Origin entity ID of the subscription to update.
2430
+ * @format GUID
2431
+ */
2432
+ entityId?: string;
2365
2433
  }
2366
- interface RemovePauseInfoResponse {
2434
+ interface UpdateSubscriptionOriginResponse {
2435
+ /** Updated subscription. */
2367
2436
  subscription?: Subscription;
2368
2437
  }
2369
- interface ReviveSubscriptionRequest {
2370
- /** @format GUID */
2371
- tenantId?: string;
2372
- /** @format GUID */
2373
- subscriptionId?: string;
2374
- revivePolicy?: RevivePolicyWithLiterals;
2375
- isTestRun?: boolean;
2438
+ interface ReviseSubscriptionRequest {
2439
+ /**
2440
+ * Subscription ID
2441
+ * @format GUID
2442
+ */
2443
+ id: string;
2444
+ /**
2445
+ * 0 for no revision, maxSize is 100
2446
+ * @maxSize 100
2447
+ */
2448
+ items?: Item[];
2376
2449
  }
2377
- declare enum RevivePolicy {
2378
- SIMPLE = "SIMPLE",
2379
- RESUME = "RESUME"
2450
+ interface ReviseSubscriptionResponse {
2451
+ subscription?: Subscription;
2452
+ }
2453
+ interface UpdateSubscriptionItemsRequest {
2454
+ /**
2455
+ * Subscription ID
2456
+ * @format GUID
2457
+ */
2458
+ id?: string;
2459
+ /** Update action. For RESET_PENDING_UPDATES, nothing but the subscription ID should be defined in the request. */
2460
+ updateAction?: UpdateActionWithLiterals;
2461
+ /** Updates execution date. Relevant only for UpdateAction.SPECIFIC_DATE. Only specific date is supported. */
2462
+ scheduleAdditionalInfo?: ScheduleAdditionalInfo;
2463
+ /**
2464
+ * Existing items to update
2465
+ * @maxSize 100
2466
+ */
2467
+ itemsToUpdate?: ItemChange[];
2468
+ /**
2469
+ * Items to add
2470
+ * @maxSize 99
2471
+ */
2472
+ itemsToAdd?: Item[];
2473
+ /**
2474
+ * Existing items to delete
2475
+ * @format GUID
2476
+ * @maxSize 99
2477
+ */
2478
+ itemsToDelete?: string[] | null;
2479
+ }
2480
+ declare enum UpdateAction {
2481
+ NONE = "NONE",
2482
+ /** Update subscription immediately, please note proration for updates changing price are not yet supported */
2483
+ IMMEDIATELY = "IMMEDIATELY",
2484
+ /** Request updates that will take affect only at the start of the next billing cycle. */
2485
+ NEXT_BILLING_CYCLE = "NEXT_BILLING_CYCLE",
2486
+ /** Reset all pending updates */
2487
+ RESET_PENDING_UPDATES = "RESET_PENDING_UPDATES",
2488
+ /** Request updates that will take affect only at a specific date. */
2489
+ SPECIFIC_DATE = "SPECIFIC_DATE"
2380
2490
  }
2381
2491
  /** @enumType */
2382
- type RevivePolicyWithLiterals = RevivePolicy | 'SIMPLE' | 'RESUME';
2383
- interface ReviveSubscriptionResponse {
2492
+ type UpdateActionWithLiterals = UpdateAction | 'NONE' | 'IMMEDIATELY' | 'NEXT_BILLING_CYCLE' | 'RESET_PENDING_UPDATES' | 'SPECIFIC_DATE';
2493
+ interface UpdateSubscriptionItemsResponse {
2384
2494
  subscription?: Subscription;
2385
2495
  }
2386
- interface ConvertSapiRequest {
2387
- /** @format GUID */
2388
- subscriptionId?: string;
2496
+ interface BulkUpdateSubscriptionItemsByFilterRequest {
2497
+ /**
2498
+ * Filter to identify the subscriptions for which items are updated. For
2499
+ * supported fields see
2500
+ * [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).
2501
+ * Sending an empty subscription filter results in a validation error.
2502
+ * In case you pass `{"updateAction": "RESET_PENDING_UPDATES"}`, use only the
2503
+ * `subscriptionId` field inside this filter. Passing any other filter results
2504
+ * in a failed validation error.
2505
+ */
2506
+ subscriptionFilter?: Record<string, any> | null;
2507
+ /**
2508
+ * Filter to specify which subscription items are updated. Make sure to use
2509
+ * the catalog item ID and not the item's unique ID. All subscription items
2510
+ * with matching `items.catalogReference.catalogItemId` are updated.
2511
+ *
2512
+ * Max: `100` reference catalog item IDs
2513
+ * @format GUID
2514
+ * @maxSize 100
2515
+ */
2516
+ catalogReferenceIds?: string[] | null;
2517
+ /**
2518
+ * Information about the update timing and update type.
2519
+ *
2520
+ * + `"IMMEDIATELY"`: The updates become effective immediately.
2521
+ * + `"NEXT_BILLING_CYCLE"`: The updates are scheduled for the beginning of the next billing cycle.
2522
+ * + `"SPECIFIC_DATE"`: The updates are scheduled for the date specified in `scheduleAdditionalInfo.specificDate`.
2523
+ * + `"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.
2524
+ */
2525
+ updateAction?: UpdateActionWithLiterals;
2526
+ /**
2527
+ * Additional information for updates. Currently, only supported for
2528
+ * `{"updateAction": "SPECIFIC_DATE"}`.
2529
+ */
2530
+ scheduleAdditionalInfo?: ScheduleAdditionalInfo;
2531
+ /**
2532
+ * Update details for the susbcription items that match the filtering.
2533
+ * Currently, you can update only the item price, quantity, and tax. Note
2534
+ * that all item properties are updated to the same values. In case you want set
2535
+ * different values for individual items, you must call
2536
+ * _Bulk Update Subscription Items By Filter_ multiple times, once per unique update.
2537
+ */
2538
+ bulkItemUpdateData?: BulkItemChange;
2539
+ /**
2540
+ * __Not implemented yet__. Items to add to the subscriptions matching the filtering.
2541
+ * @maxSize 99
2542
+ */
2543
+ itemsToAdd?: Item[];
2389
2544
  }
2390
- interface ConvertSapiResponse {
2391
- subscription?: Subscription;
2545
+ interface BulkItemChange {
2546
+ /** Information about the new item price. */
2547
+ pricingModel?: PricingModel;
2548
+ /**
2549
+ * New item quantity.
2550
+ *
2551
+ * Min: `1`
2552
+ * @min 1
2553
+ */
2554
+ quantity?: number | null;
2555
+ /** Information about the new item tax. */
2556
+ tax?: Tax;
2392
2557
  }
2393
- interface GetSubscriptionInvoicesRequest {
2558
+ interface BulkUpdateSubscriptionItemsByFilterResponse {
2559
+ /**
2560
+ * ID of your bulk job. You can use
2561
+ * [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)
2562
+ * to retrieve information about the job status.
2563
+ */
2564
+ jobId?: string;
2565
+ }
2566
+ interface DeleteSubscriptionRequest {
2394
2567
  /** @format GUID */
2395
2568
  id?: string;
2569
+ revision?: string;
2396
2570
  }
2397
- interface GetSubscriptionInvoicesResponse {
2398
- invoices?: SubscriptionInvoice[];
2571
+ interface DeleteSubscriptionResponse {
2399
2572
  }
2400
- interface SubscriptionInvoice {
2573
+ interface CancelSubscriptionRequest {
2401
2574
  /** @format GUID */
2402
- id?: string;
2403
- subscriptionCycle?: number;
2404
- createdDate?: Date | null;
2575
+ id: string;
2576
+ actionContext: ActionContext;
2405
2577
  }
2406
- interface FinishFreeTrialNowRequest {
2407
- /** @format GUID */
2408
- subscriptionId?: string;
2409
- /** @format GUID */
2410
- tenantId?: string;
2578
+ interface ActionContext {
2579
+ initiator?: ActionInitiatorWithLiterals;
2580
+ /** Optional action reason message */
2581
+ reason?: string | null;
2411
2582
  }
2412
- interface FinishFreeTrialNowResponse {
2583
+ declare enum ActionInitiator {
2584
+ UNDEFINED = "UNDEFINED",
2585
+ BUSINESS = "BUSINESS",
2586
+ CUSTOMER = "CUSTOMER",
2587
+ SYSTEM = "SYSTEM"
2588
+ }
2589
+ /** @enumType */
2590
+ type ActionInitiatorWithLiterals = ActionInitiator | 'UNDEFINED' | 'BUSINESS' | 'CUSTOMER' | 'SYSTEM';
2591
+ interface CancelSubscriptionResponse {
2413
2592
  subscription?: Subscription;
2414
2593
  }
2415
- interface FixSubscriptionTimeCapsuleTasksRequest {
2416
- /** @format GUID */
2417
- subscriptionId?: string;
2594
+ interface PauseSubscriptionRequest {
2418
2595
  /** @format GUID */
2419
- tenantId?: string;
2596
+ id: string;
2597
+ pausePolicy?: PausePolicyWithLiterals;
2598
+ pauseAt?: PauseAtWithLiterals;
2599
+ /** contains additional scheduling information for certain pause_at options (for example: SPECIFIC_DATE & NUMBER_OF_CYCLES_FROM_TODAY) */
2600
+ pauseAtSchedule?: ScheduleAdditionalInfo;
2601
+ /** contains additional scheduling information for certain auto_resume_at either specific date */
2602
+ autoResumeAtSchedule?: ScheduleAdditionalInfo;
2603
+ actionContext: ActionContext;
2420
2604
  }
2421
- interface FixSubscriptionTimeCapsuleTasksResponse {
2605
+ interface PauseSubscriptionResponse {
2606
+ subscription?: Subscription;
2422
2607
  }
2423
- interface SendTimeCapsuleTaskCanceledBIRequest {
2424
- /** @format GUID */
2425
- tenantId?: string;
2426
- /** @format GUID */
2427
- subscriptionId?: string;
2428
- /** @minLength 1 */
2429
- taskType?: string;
2608
+ interface SubscriptionPaused {
2609
+ subscription?: Subscription;
2610
+ pausePolicy?: PausePolicyWithLiterals;
2611
+ actionDetails?: ActionDetails;
2430
2612
  }
2431
- interface Empty {
2613
+ interface PauseSubscriptionRequested {
2614
+ subscription?: Subscription;
2615
+ pauseAt?: PauseAtWithLiterals;
2616
+ pausePolicy?: PausePolicyWithLiterals;
2617
+ actionDetails?: ActionDetails;
2432
2618
  }
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;
2619
+ interface ScheduledPauseCanceled {
2620
+ subscription?: Subscription;
2621
+ actionDetails?: ActionDetails;
2441
2622
  }
2442
- interface CancelTimeCapsuleTaskRequest {
2443
- /** @format GUID */
2444
- tenantId?: string;
2623
+ interface ResumeSubscriptionRequest {
2445
2624
  /** @format GUID */
2446
- subscriptionId?: string;
2447
- /** @minLength 1 */
2448
- taskType?: string;
2625
+ id: string;
2626
+ resumeAt?: ResumeAtWithLiterals;
2627
+ /** contains additional scheduling information for certain resume_at options (for example: SPECIFIC_DATE) */
2628
+ resumeAtSchedule?: ScheduleAdditionalInfo;
2629
+ actionContext: ActionContext;
2630
+ /** Strategy for resuming a migrated paused subscription when the previous billing date is missing. */
2631
+ missingPreviousBillingDateResumeStrategy?: MissingPreviousBillingDateResumeStrategyWithLiterals;
2449
2632
  }
2450
- interface UpdateFullSubscriptionRequest {
2451
- /** @format GUID */
2452
- tenantId?: string;
2453
- subscription?: Subscription;
2633
+ declare enum MissingPreviousBillingDateResumeStrategy {
2634
+ UNKNOWN = "UNKNOWN",
2635
+ /** Use a fallback that makes the next billing date resolve to now. */
2636
+ START_BILLING_IMMEDIATELY = "START_BILLING_IMMEDIATELY",
2637
+ /** Use a fallback that makes the next billing date resolve to one full cycle from now. */
2638
+ START_BILLING_AFTER_ONE_FULL_CYCLE = "START_BILLING_AFTER_ONE_FULL_CYCLE"
2454
2639
  }
2455
- interface UpdateFullSubscriptionResponse {
2640
+ /** @enumType */
2641
+ type MissingPreviousBillingDateResumeStrategyWithLiterals = MissingPreviousBillingDateResumeStrategy | 'UNKNOWN' | 'START_BILLING_IMMEDIATELY' | 'START_BILLING_AFTER_ONE_FULL_CYCLE';
2642
+ interface ResumeSubscriptionResponse {
2456
2643
  subscription?: Subscription;
2457
2644
  }
2458
- interface PatchSubscriptionRequest {
2459
- /**
2460
- * Tenant ID (instance ID) of the subscription
2461
- * @format GUID
2462
- */
2463
- tenantId?: string;
2464
- /**
2465
- * Subscription ID to patch
2466
- * @format GUID
2467
- */
2468
- subscriptionId?: string;
2469
- /** Partial subscription with updated values */
2645
+ interface SubscriptionResumed {
2470
2646
  subscription?: Subscription;
2471
- /** Fields to update (e.g., "name", "billing_settings.collection_method") */
2472
- fieldMask?: string[];
2647
+ actionDetails?: ActionDetails;
2648
+ pauseInfo?: PauseInfo;
2473
2649
  }
2474
- interface PatchSubscriptionResponse {
2475
- /** The updated subscription */
2650
+ interface ResumeSubscriptionRequested {
2476
2651
  subscription?: Subscription;
2652
+ resumeAt?: ResumeAtWithLiterals;
2653
+ actionDetails?: ActionDetails;
2477
2654
  }
2478
- interface UpdateSubscriptionInvoiceCycleRequest {
2479
- /** @format GUID */
2480
- subscriptionId?: string;
2481
- /** @format GUID */
2482
- tenantId?: string;
2483
- /** @format GUID */
2484
- invoiceId?: string;
2485
- subscriptionCycle?: number;
2486
- }
2487
- interface UpdateSubscriptionInvoiceCycleResponse {
2488
- subscriptionInvoice?: SubscriptionInvoice;
2489
- }
2490
- interface AddPausePeriodRequest {
2491
- /** @format GUID */
2492
- tenantId?: string;
2493
- /** @format GUID */
2494
- subscriptionId?: string;
2495
- pauseStartDate?: Date | null;
2496
- pauseEndDate?: Date | null;
2497
- }
2498
- interface AddPausePeriodResponse {
2499
- subscription?: Subscription;
2500
- }
2501
- interface RunTimeCapsuleTaskNowRequest {
2502
- /** @format GUID */
2503
- tenantId?: string;
2504
- /** @format GUID */
2505
- subscriptionId?: string;
2506
- /** @minLength 1 */
2507
- taskType?: string;
2508
- }
2509
- interface CreateRecurringInvoiceBORequest {
2510
- /** @format GUID */
2511
- subscriptionId?: string;
2512
- /** @format GUID */
2513
- tenantId?: string;
2514
- /** @min 2 */
2515
- cycleNumber?: number;
2516
- }
2517
- interface CreateRecurringInvoiceBOResponse {
2518
- invoiceId?: string;
2519
- }
2520
- interface SetShiftingDataRequest {
2521
- /** @format GUID */
2522
- subscriptionId?: string;
2523
- /** @format GUID */
2524
- tenantId?: string;
2525
- isBassManaged?: boolean;
2526
- shiftManagementDate?: Date | null;
2527
- }
2528
- interface SetShiftingDataResponse {
2655
+ interface ScheduledResumeCanceled {
2529
2656
  subscription?: Subscription;
2657
+ actionDetails?: ActionDetails;
2530
2658
  }
2531
- interface FixSubscriptionInvoicesRequest extends FixSubscriptionInvoicesRequestModeOneOf {
2532
- attachInvoice?: AttachInvoice;
2533
- detachInvoice?: DetachInvoice;
2534
- /** @format GUID */
2535
- tenantId?: string;
2536
- /** @format GUID */
2537
- subscriptionId?: string;
2659
+ interface SearchSubscriptionsRequest extends SearchSubscriptionsRequestPagingMethodOneOf {
2660
+ /** Limit number of results and enable to skip rows. The default limit is 25. */
2661
+ paging?: Paging;
2662
+ /** A Cursor option for efficient paging. Pass this field from the previous search response to continue to the next page. */
2663
+ cursor?: CursorPaging;
2664
+ /** A filter object */
2665
+ filter?: any;
2666
+ /** A Sorting option by field name and order. */
2667
+ sorting?: SortingClauses;
2538
2668
  }
2539
2669
  /** @oneof */
2540
- interface FixSubscriptionInvoicesRequestModeOneOf {
2541
- attachInvoice?: AttachInvoice;
2542
- detachInvoice?: DetachInvoice;
2543
- }
2544
- interface AttachInvoice {
2545
- /** @format GUID */
2546
- invoiceId?: string;
2547
- }
2548
- interface DetachInvoice {
2549
- /** @format GUID */
2550
- invoiceId?: string;
2670
+ interface SearchSubscriptionsRequestPagingMethodOneOf {
2671
+ /** Limit number of results and enable to skip rows. The default limit is 25. */
2672
+ paging?: Paging;
2673
+ /** A Cursor option for efficient paging. Pass this field from the previous search response to continue to the next page. */
2674
+ cursor?: CursorPaging;
2551
2675
  }
2552
- interface FixSubscriptionInvoicesResponse {
2553
- invoices?: SubscriptionInvoice[];
2676
+ interface SortingClauses {
2677
+ sorting?: Sorting[];
2554
2678
  }
2555
- interface RestoreDraftSubscriptionRequest {
2556
- /** @format GUID */
2557
- tenantId?: string;
2558
- /** @format GUID */
2559
- subscriptionId?: string;
2679
+ interface SearchSubscriptionsResponse {
2680
+ subscriptions?: Subscription[];
2681
+ cursor?: CursorPaging;
2682
+ pagingMetadata?: CursorPagingMetadata;
2560
2683
  }
2561
- interface RestoreDraftSubscriptionResponse {
2562
- subscription?: Subscription;
2684
+ interface CursorPagingMetadata {
2685
+ /** Total number of items matching the filter. Available only on the first page of *Search* */
2686
+ total?: number | null;
2563
2687
  }
2564
- interface DeleteDraftSubscriptionRequest {
2565
- /** @format GUID */
2566
- tenantId?: string;
2688
+ interface TurnOnSubscriptionAutoRenewalRequest {
2567
2689
  /** @format GUID */
2568
- subscriptionId?: string;
2690
+ id: string;
2691
+ actionContext: ActionContext;
2569
2692
  }
2570
- interface DeleteDraftSubscriptionResponse {
2693
+ interface TurnOnSubscriptionAutoRenewalResponse {
2571
2694
  subscription?: Subscription;
2572
2695
  }
2573
- interface DeleteSubscriptionBORequest {
2574
- /** @format GUID */
2575
- tenantId?: string;
2576
- /** @format GUID */
2577
- subscriptionId?: string;
2578
- }
2579
- interface DeleteSubscriptionBOResponse {
2696
+ interface SubscriptionAutoRenewalTurnedOn {
2580
2697
  subscription?: Subscription;
2698
+ actionDetails?: ActionDetails;
2581
2699
  }
2582
- interface CancelSubscriptionBORequest {
2583
- /** @format GUID */
2584
- tenantId?: string;
2700
+ interface TurnOffSubscriptionAutoRenewalRequest {
2585
2701
  /** @format GUID */
2586
- subscriptionId?: string;
2587
- initiator?: ActionInitiatorWithLiterals;
2588
- reason?: string | null;
2589
- }
2590
- declare enum ActionInitiator {
2591
- UNDEFINED = "UNDEFINED",
2592
- BUSINESS = "BUSINESS",
2593
- CUSTOMER = "CUSTOMER",
2594
- SYSTEM = "SYSTEM"
2702
+ id: string;
2703
+ actionContext: ActionContext;
2595
2704
  }
2596
- /** @enumType */
2597
- type ActionInitiatorWithLiterals = ActionInitiator | 'UNDEFINED' | 'BUSINESS' | 'CUSTOMER' | 'SYSTEM';
2598
- interface CancelSubscriptionBOResponse {
2705
+ interface TurnOffSubscriptionAutoRenewalResponse {
2599
2706
  subscription?: Subscription;
2600
2707
  }
2601
- interface UpdatePaymentMethodBORequest {
2602
- /** @format GUID */
2603
- tenantId?: string;
2604
- /** @format GUID */
2605
- subscriptionId?: string;
2606
- /** @format GUID */
2607
- paymentMethodId?: string;
2608
- }
2609
- interface UpdatePaymentMethodBOResponse {
2708
+ interface SubscriptionAutoRenewalTurnedOff {
2610
2709
  subscription?: Subscription;
2710
+ actionDetails?: ActionDetails;
2611
2711
  }
2612
- interface SendSubscriptionActionEventBORequest extends SendSubscriptionActionEventBORequestEventOneOf {
2613
- billingCycleStarted?: SubscriptionBillingCycleStarted;
2614
- /** @format GUID */
2615
- tenantId?: string;
2616
- /** @format GUID */
2617
- subscriptionId?: string;
2618
- }
2619
- /** @oneof */
2620
- interface SendSubscriptionActionEventBORequestEventOneOf {
2621
- billingCycleStarted?: SubscriptionBillingCycleStarted;
2622
- }
2623
- interface SubscriptionBillingCycleStarted {
2624
- subscription?: Subscription;
2712
+ interface MarkLatestInvoiceAsPaidRequest {
2625
2713
  /**
2626
- * Wix Pay transaction id, optional. Exists if event was triggered by a payment.
2714
+ * The ID of the offline subscription to mark as paid its latest invoice
2627
2715
  * @format GUID
2628
2716
  */
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;
2717
+ subscriptionId: string;
2650
2718
  }
2651
- interface PauseSubscriptionBOResponse {
2719
+ interface MarkLatestInvoiceAsPaidResponse {
2652
2720
  subscription?: Subscription;
2653
2721
  }
2654
- interface FixSubscriptionInvoicesConsistencyRequest {
2655
- /** @format GUID */
2656
- tenantId?: string;
2657
- /** @format GUID */
2658
- subscriptionId?: string;
2659
- }
2660
- interface FixSubscriptionInvoicesConsistencyResponse {
2722
+ interface LatestInvoiceMarkedAsPaid {
2723
+ subscription?: Subscription;
2661
2724
  }
2662
- interface UpdateSubscriptionCurrencyRequest {
2725
+ interface MultipleSubscriptionsOnOrdersInvoice {
2663
2726
  /**
2664
- * Tenant ID (instance ID) of the subscription
2727
+ * the invoice id of the affected subscription
2665
2728
  * @format GUID
2666
2729
  */
2667
- tenantId?: string;
2730
+ invoiceId?: string;
2668
2731
  /**
2669
- * Subscription ID to update currency for
2732
+ * the order id of the affected subscription
2670
2733
  * @format GUID
2671
2734
  */
2672
- subscriptionId?: string;
2735
+ orderId?: string;
2736
+ }
2737
+ interface MarkBillingCycleAsPaidRequest {
2673
2738
  /**
2674
- * New currency code (e.g., "USD", "EUR") - ISO 4217 format
2675
- * @format CURRENCY
2739
+ * The ID of the subscription to mark as paid its invoice.
2740
+ * @format GUID
2676
2741
  */
2677
- newCurrency?: string;
2742
+ subscriptionId: string;
2678
2743
  /**
2679
- * Exchange rate from current currency to new currency (newAmount = oldAmount * exchangeRate)
2680
- * @decimalValue options { gt:0.00, maxScale:6 }
2744
+ * The subscription cycle for which the invoice is to be marked as paid.
2745
+ * If left empty, the most recent cycle will be selected.
2746
+ * @min 1
2681
2747
  */
2682
- exchangeRate?: string;
2748
+ paidCycle?: number | null;
2683
2749
  }
2684
- interface UpdateSubscriptionCurrencyResponse {
2685
- /** The updated subscription with new currency and converted amounts */
2750
+ interface MarkBillingCycleAsPaidResponse {
2686
2751
  subscription?: Subscription;
2687
2752
  }
2688
- interface UpdateSubscriptionPlatformOriginRequest {
2753
+ interface GetSubscriptionsStatsRequest {
2754
+ }
2755
+ interface GetSubscriptionsStatsResponse {
2756
+ amountByStatuses?: AmountByStatus[];
2757
+ total?: number;
2758
+ }
2759
+ interface AmountByStatus {
2760
+ status?: SubscriptionStatusEnumSubscriptionStatusWithLiterals;
2761
+ amount?: number;
2762
+ }
2763
+ interface ExtendSubscriptionRequest extends ExtendSubscriptionRequestExtendPolicyOneOf {
2764
+ /** User won't be charged for additional period added on top of subscription end date. */
2765
+ extensionPeriod?: Duration;
2689
2766
  /**
2690
- * Subscription ID to update platform origin for
2691
- * @format GUID
2767
+ * user will be charged for billing cycles added
2768
+ * @min 1
2692
2769
  */
2693
- subscriptionId?: string;
2770
+ extensionBillingCycles?: number;
2694
2771
  /**
2695
- * Tenant ID (instance ID) of the subscription
2772
+ * The ID of the subscription to be extended
2696
2773
  * @format GUID
2697
2774
  */
2698
- tenantId?: string;
2699
- /** New platform origin (appId and entityId) */
2700
- platformOrigin?: PlatformOrigin;
2701
- }
2702
- interface UpdateSubscriptionPlatformOriginResponse {
2703
- /** The updated subscription with new platform origin */
2704
- subscription?: Subscription;
2705
- }
2706
- interface SetIsMigratedEvent {
2707
- /** @format GUID */
2708
- subscriptionId?: string;
2709
- }
2710
- interface SubscriptionDelayedSyncEvent {
2711
- /** @format GUID */
2712
- subscriptionId?: string;
2713
- }
2714
- interface InvoiceAction extends InvoiceActionActionTypeOneOf {
2715
- payRecurring?: PayRecurringInvoice;
2775
+ id: string;
2776
+ actionContext: ActionContext;
2716
2777
  }
2717
2778
  /** @oneof */
2718
- interface InvoiceActionActionTypeOneOf {
2719
- payRecurring?: PayRecurringInvoice;
2720
- }
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;
2779
+ interface ExtendSubscriptionRequestExtendPolicyOneOf {
2780
+ /** User won't be charged for additional period added on top of subscription end date. */
2781
+ extensionPeriod?: Duration;
2782
+ /**
2783
+ * user will be charged for billing cycles added
2784
+ * @min 1
2785
+ */
2786
+ extensionBillingCycles?: number;
2735
2787
  }
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 {
2788
+ interface ExtendSubscriptionResponse {
2789
+ /** The now extended subscription */
2743
2790
  subscription?: Subscription;
2744
2791
  }
2745
- interface SubscriptionInitialPurchaseCompleted {
2746
- subscription?: Subscription;
2747
- actionDetails?: ActionDetails;
2792
+ interface AllowedActionsRequest {
2748
2793
  /** @format GUID */
2749
- paymentTransactionId?: string | null;
2750
- }
2751
- interface SubscriptionCycleReadyToPay {
2752
- subscription?: Subscription;
2794
+ id: string;
2795
+ /**
2796
+ * List of additional fields to be included in the response.
2797
+ * @maxSize 1
2798
+ */
2799
+ fields?: RequestedFieldsWithLiterals[];
2753
2800
  }
2754
- interface SubscriptionRevived {
2755
- subscription?: Subscription;
2801
+ declare enum RequestedFields {
2802
+ /** Include unsupported action list, including the reasons for the lack of support */
2803
+ UNSUPPORTED_ACTION = "UNSUPPORTED_ACTION"
2756
2804
  }
2757
- interface CreateSubscriptionResponse {
2758
- subscription?: Subscription;
2805
+ /** @enumType */
2806
+ type RequestedFieldsWithLiterals = RequestedFields | 'UNSUPPORTED_ACTION';
2807
+ interface AllowedActionsResponse {
2808
+ /** List of actions that are allowed. */
2809
+ actions?: Action[];
2759
2810
  /**
2760
- * Payments order that should be paid (or authorize card) in order to activate subscription. Empty for free subscriptions.
2761
- * @format GUID
2811
+ * List of actions that are not supported, included only if requested. Provides reasons for each unsupported action.
2812
+ * @maxSize 20
2762
2813
  */
2763
- paymentOrderId?: string | null;
2814
+ unsupportedActions?: UnsupportedAction[];
2764
2815
  }
2765
- interface UpdateSubscriptionRequest {
2766
- /** Revision is validated if Subscription.revision is set */
2767
- subscription?: Subscription;
2816
+ interface UnsupportedAction {
2817
+ actionType?: ActionTypeWithLiterals;
2768
2818
  /**
2769
- * Supported field: start_date
2770
- * Can be updated only if Subscription is in Draft state
2819
+ * Provides detailed reasons for the unsupported action. Each `UnsupportedReason` includes a code and a message explaining why the action is not allowed.
2820
+ * @maxSize 20
2771
2821
  */
2772
- fieldMask?: string[];
2822
+ reasons?: UnsupportedReason[];
2773
2823
  }
2774
- interface UpdateSubscriptionResponse {
2775
- subscription?: Subscription;
2824
+ interface UnsupportedReason {
2825
+ code?: string;
2826
+ description?: string | null;
2776
2827
  }
2777
- interface UpdateSubscriptionStartDateRequest {
2828
+ interface ListUpcomingChargesRequest {
2778
2829
  /**
2779
- * Subscription ID
2830
+ * Subscription id charges to be previewed for
2780
2831
  * @format GUID
2781
2832
  */
2782
- id?: string;
2833
+ subscriptionId: string;
2834
+ /** Period of time to provide charged for. If not provided,then only next charge will be returned. */
2835
+ customDuration?: Duration;
2783
2836
  /**
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
2837
+ * Date of the next billing cycle so that the upcoming charges will be calculated accordingly.
2838
+ * If not provided, the upcoming charges will be calculated according to the existing next billing date.
2787
2839
  */
2788
- startDate?: Date | null;
2840
+ nextBillingDate?: Date | null;
2789
2841
  }
2790
- interface UpdateSubscriptionStartDateResponse {
2791
- subscription?: Subscription;
2842
+ interface ListUpcomingChargesResponse {
2843
+ upcomingCharges?: SubscriptionCharge[];
2792
2844
  }
2793
- interface BassToSapiPaypalMigrationRequest {
2794
- /**
2795
- * Subscription ID
2796
- * @format GUID
2797
- */
2798
- id?: string;
2799
- collectionMethod?: CollectionMethodEnumCollectionMethodWithLiterals;
2845
+ interface PreviewSubscriptionChargesRequest extends PreviewSubscriptionChargesRequestSubscriptionOneOf {
2846
+ /** Information about a non-existing subscription. */
2847
+ subscriptionInfo?: SubscriptionInfo;
2800
2848
  }
2801
- interface BassToSapiPaypalMigrationResponse {
2802
- subscription?: Subscription;
2849
+ /** @oneof */
2850
+ interface PreviewSubscriptionChargesRequestSubscriptionOneOf {
2851
+ /** Information about a non-existing subscription. */
2852
+ subscriptionInfo?: SubscriptionInfo;
2803
2853
  }
2804
- interface UpdateSubscriptionPoliciesRequest {
2854
+ /** Subscription information to use for calculating the preview of charges for a subscription. */
2855
+ interface SubscriptionInfo {
2856
+ billingSettings?: BillingSettings;
2857
+ items?: Item[];
2858
+ startDate?: Date | null;
2805
2859
  /**
2806
- * Subscription ID
2807
- * @format GUID
2860
+ * Customer the subscription belongs to. When provided, used for accurate tax calculation.
2861
+ * Optional for backward compatibility; if omitted, a synthetic id is used (legacy behavior)
2862
+ * and customer-specific tax rules (VAT exemptions, tax IDs) will not apply.
2808
2863
  */
2809
- id?: string;
2810
- cancellableByCustomer?: boolean | null;
2864
+ customer?: Customer;
2811
2865
  }
2812
- interface UpdateSubscriptionPoliciesResponse {
2813
- /** Updated policies of the subscription */
2814
- policies?: SubscriptionPolicies;
2866
+ interface PreviewSubscriptionChargesResponse {
2867
+ /** Charges for subscription. */
2868
+ charges?: Charge[];
2815
2869
  }
2816
- interface UpdateSubscriptionBillingDateRequest {
2870
+ /** Represents a charge applicable to a subscription. */
2871
+ interface Charge {
2872
+ /** The cycle number from which the charge starts. */
2873
+ cycleFrom?: number;
2874
+ /** The number of cycles for which the charge is applicable. */
2875
+ cycleCount?: number | null;
2876
+ /** The breakdown of the charge */
2877
+ totals?: Totals;
2878
+ /** The billing date from which the charge starts */
2879
+ cycleBillingDate?: Date | null;
2880
+ }
2881
+ interface PreviewSubscriptionsChargesRequest {
2817
2882
  /**
2818
- * ID of the subscription to update the billing date for.
2819
- * @format GUID
2883
+ * Information required to calculate the preview charges for the subscriptions, including an identifier.
2884
+ * @minSize 1
2885
+ * @maxSize 10
2820
2886
  */
2821
- id: string;
2822
- /** New billing date in `YYYY-MM-DDThh:mm:ss:sssZ` format. */
2823
- billingDate: Date | null;
2887
+ subscriptionsBillingDetails?: SubscriptionBillingDetails[];
2824
2888
  /**
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.
2889
+ * Specifies the number of upcoming billing charges to preview for all subscriptions in the order.
2890
+ * For instance, if a subscription costs $10 for the first 3 cycles, $12 for cycles 4 through 7,
2891
+ * $15 for cycles 8 through 10, and $20 for cycle 11 onwards:
2892
+ * - Sending "1" will calculate and return charges for cycles 4 through 7 since it's the first charge in the future.
2893
+ * - Sending "2" will provide a response with charges for cycles 4 through 7 and cycles 8 through 10.
2894
+ * - Sending "3" or more will include totals for cycles 4 through 7, cycles 8 through 10, and from cycle 11 onwards.
2895
+ * If no value is provided, the response will include charges for all upcoming cycles, including the existing one,
2896
+ * in this case, charges for cycle 1 through 3.
2897
+ * If there is a single charge for a subscription, meaning that subscription price remains consistent across all cycles,
2898
+ * then even if future_charges_count is set, it will be ignored and the only charge this subscription has will be returned.
2899
+ * @min 1
2900
+ * @max 10
2832
2901
  */
2833
- proration?: Proration;
2834
- }
2835
- interface UpdateSubscriptionBillingDateResponse {
2836
- /** Updated subscription. */
2837
- subscription?: Subscription;
2838
- }
2839
- interface SubscriptionBillingDateUpdated {
2840
- subscription?: Subscription;
2841
- billingDate?: Date | null;
2842
- proration?: Proration;
2902
+ numberOfNextRecurringCharges?: number | null;
2843
2903
  }
2844
- interface UpdateSubscriptionOriginRequest {
2904
+ interface SubscriptionBillingDetails {
2845
2905
  /**
2846
- * ID of the subscription to update origin.
2906
+ * External identifier of the subscription
2847
2907
  * @format GUID
2848
2908
  */
2849
- id?: string;
2909
+ externalId?: string | null;
2910
+ /** Billing details parameters including schedule, currency, etc. */
2911
+ billingSettings?: BillingSettings;
2850
2912
  /**
2851
- * Origin entity ID of the subscription to update.
2852
- * @format GUID
2913
+ * Items, minSize is 1, maxSize is 100
2914
+ * @minSize 1
2915
+ * @maxSize 100
2853
2916
  */
2854
- entityId?: string;
2917
+ items?: Item[];
2918
+ /** Subscription start date, now if not set */
2919
+ startDate?: Date | null;
2920
+ /** Shipping address associated with subscription. At the moment used only for payments. Optional. */
2921
+ shippingAddress?: FullAddressDetails;
2922
+ /**
2923
+ * Customer the subscription belongs to. When provided, used for accurate tax calculation.
2924
+ * Optional for backward compatibility; if omitted, a synthetic id is used (legacy behavior).
2925
+ */
2926
+ customer?: Customer;
2855
2927
  }
2856
- interface UpdateSubscriptionOriginResponse {
2857
- /** Updated subscription. */
2858
- subscription?: Subscription;
2928
+ interface PreviewSubscriptionsChargesResponse {
2929
+ /** Charges for the subscriptions, including an identifier. */
2930
+ subscriptionsCharges?: SubscriptionCharges[];
2859
2931
  }
2860
- interface ReviseSubscriptionRequest {
2932
+ interface SubscriptionCharges {
2861
2933
  /**
2862
- * Subscription ID
2934
+ * External identifier of the subscription
2863
2935
  * @format GUID
2864
2936
  */
2865
- id: string;
2937
+ externalId?: string | null;
2938
+ /** Charges for subscription. */
2939
+ charges?: Charge[];
2940
+ }
2941
+ interface CreateSubscriptionForOrderRequest {
2942
+ /** Subscription needs to be created */
2943
+ subscription?: Subscription;
2866
2944
  /**
2867
- * 0 for no revision, maxSize is 100
2868
- * @maxSize 100
2945
+ * Optional unique identifier for this request in order to prevent subscription duplications
2946
+ * @format GUID
2869
2947
  */
2870
- items?: Item[];
2948
+ idempotencyKey?: string | null;
2871
2949
  }
2872
- interface ReviseSubscriptionResponse {
2950
+ interface CreateSubscriptionForOrderResponse {
2951
+ /** Created subscription */
2873
2952
  subscription?: Subscription;
2953
+ /** Non-persistent invoice */
2954
+ invoice?: Invoice;
2874
2955
  }
2875
- interface UpdateSubscriptionItemsRequest {
2956
+ /** An invoice includes information about the subscription and the customer. */
2957
+ interface Invoice {
2876
2958
  /**
2877
- * Subscription ID
2959
+ * Invoice ID.
2878
2960
  * @format GUID
2961
+ * @readonly
2879
2962
  */
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;
2963
+ id?: string | null;
2885
2964
  /**
2886
- * Existing items to update
2887
- * @maxSize 100
2965
+ * Date and time the invoice was created.
2966
+ * @readonly
2888
2967
  */
2889
- itemsToUpdate?: ItemChange[];
2968
+ createdDate?: Date | null;
2890
2969
  /**
2891
- * Items to add
2892
- * @maxSize 99
2970
+ * Date and time the invoice was last updated.
2971
+ * @readonly
2893
2972
  */
2894
- itemsToAdd?: Item[];
2973
+ updatedDate?: Date | null;
2895
2974
  /**
2896
- * Existing items to delete
2897
- * @format GUID
2898
- * @maxSize 99
2975
+ * Revision number, which increments by 1 each time the invoice is updated.
2976
+ * To prevent conflicting changes,
2977
+ * the current revision must be passed when updating the invoice.
2978
+ *
2979
+ * Ignored when creating a invoice.
2980
+ * @readonly
2899
2981
  */
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 {
2982
+ revision?: string | null;
2983
+ /** Information about the invoice origin. */
2984
+ origin?: BusinessOriginData;
2919
2985
  /**
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.
2986
+ * Invoice status.
2987
+ *
2988
+ * + `"UNKNOWN"`: There is no information about the invoice status.
2989
+ * + `"OPEN"`: BASS has created the invoice but hasn't initiated the payment process.
2990
+ * + `"PAID"`: The customer has successfully paid for the invoice.
2991
+ * + `"ATTEMPT_FAILED"`: The payment process has started and there has been at least one unsuccessful payment attempt.
2992
+ * + `"FAILED"`: The payment process has failed and there are no more retries.
2993
+ * + `"CANCELED"`: The payment process has been stopped because the related subscription has been canceled.
2994
+ * @readonly
2927
2995
  */
2928
- subscriptionFilter?: Record<string, any> | null;
2996
+ status?: InvoiceStatusWithLiterals;
2929
2997
  /**
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.
2998
+ * 3-letter currency code of the invoice in
2999
+ * [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
3000
+ * @format CURRENCY
3001
+ */
3002
+ currency?: string;
3003
+ /** Information about the customer. */
3004
+ customer?: Customer;
3005
+ /**
3006
+ * Whether the payment is processed through Wix and whether the customer must provide some input.
2933
3007
  *
2934
- * Max: `100` reference catalog item IDs
3008
+ * + `"UNKNOWN"`: There is no information about the collection method.
3009
+ * + `"AUTO_CHARGE"`: The customer pays automatically through Wix.
3010
+ * + `"SEND_INVOICE"`: The customer pays through Wix, but some manual input is required.
3011
+ * + `"OFFLINE"`: The customer pays outside of Wix.
3012
+ */
3013
+ collectionMethod?: CollectionMethodWithLiterals;
3014
+ /**
3015
+ * ID of the
3016
+ * [payment method](https://bo.wix.com/wix-docs/rest/wix-cashier/settings/payment-method-type/payment-method-type-object).
3017
+ * Not available for the first payment of a subscription and all offline
3018
+ * payments.
2935
3019
  * @format GUID
2936
- * @maxSize 100
2937
3020
  */
2938
- catalogReferenceIds?: string[] | null;
3021
+ paymentMethodId?: string | null;
2939
3022
  /**
2940
- * Information about the update timing and update type.
3023
+ * Cashier [Order ID](https://dev.wix.com/docs/rest/payments/wix-cashier/pay/order#order-object)
3024
+ * for the corresponding payment.
3025
+ * @format GUID
3026
+ * @readonly
3027
+ */
3028
+ paymentOrderId?: string | null;
3029
+ /** Information about a discount. Available only for invoices that include a discount. */
3030
+ discount?: InvoiceDiscount;
3031
+ /** Billing address. */
3032
+ billingAddress?: FullAddressDetails;
3033
+ /** Shipping address. Available only for `"PHYSICAL"` line items. */
3034
+ shippingAddress?: FullAddressDetails;
3035
+ /**
3036
+ * Shipping fee in `0.00` format.
3037
+ * @format DECIMAL_VALUE
3038
+ */
3039
+ shippingFee?: string | null;
3040
+ /**
3041
+ * Information about the invoice's totals.
3042
+ * @readonly
3043
+ */
3044
+ totals?: Totals;
3045
+ /** Line items belonging to the invoice. */
3046
+ invoiceItems?: InvoiceItem[];
3047
+ /**
3048
+ * Whether the invoice is used to validate payment details.
2941
3049
  *
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.
3050
+ * + `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.
3051
+ * + `false`: Standard invoice.
2946
3052
  */
2947
- updateAction?: UpdateActionWithLiterals;
3053
+ isAuthorization?: boolean | null;
3054
+ /** Whether the invoice's `totals.totalPrice` includes tax. */
3055
+ isTaxInclusive?: boolean | null;
3056
+ /** Details of the latest payment attempt. */
3057
+ latestPaymentAttempt?: LatestPaymentAttempt;
3058
+ /** List of charges and credits that adjust the invoice's `totals.totalPrice`. */
3059
+ adjustments?: PriceAdjustment[];
2948
3060
  /**
2949
- * Additional information for updates. Currently, only supported for
2950
- * `{"updateAction": "SPECIFIC_DATE"}`.
3061
+ * Invoice Number.
3062
+ * @maxLength 10
3063
+ * @readonly
2951
3064
  */
2952
- scheduleAdditionalInfo?: ScheduleAdditionalInfo;
3065
+ invoiceNumber?: string | null;
2953
3066
  /**
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.
3067
+ * Shipping charges for the invoice.
3068
+ * Supports only one discount without cycles.
3069
+ * Discounts with cycles (repeated discounts across different billing cycles) are not supported for shipping
2959
3070
  */
2960
- bulkItemUpdateData?: BulkItemChange;
3071
+ shippingCharges?: InvoiceShippingCharges;
3072
+ /** Information about the invoice tax */
3073
+ taxData?: TaxData;
3074
+ /** Business address. */
3075
+ businessAddress?: Address;
2961
3076
  /**
2962
- * __Not implemented yet__. Items to add to the subscriptions matching the filtering.
2963
- * @maxSize 99
3077
+ * ID of the billing order that created this invoice.
3078
+ * @format GUID
2964
3079
  */
2965
- itemsToAdd?: Item[];
2966
- }
2967
- interface BulkItemChange {
2968
- /** Information about the new item price. */
2969
- pricingModel?: PricingModel;
3080
+ orderId?: string | null;
2970
3081
  /**
2971
- * New item quantity.
2972
- *
2973
- * Min: `1`
2974
- * @min 1
3082
+ * Platform origin the invoice is originated from.
3083
+ * @format GUID
2975
3084
  */
2976
- quantity?: number | null;
2977
- /** Information about the new item tax. */
2978
- tax?: Tax;
2979
- }
2980
- interface BulkUpdateSubscriptionItemsByFilterResponse {
3085
+ platformOriginAppId?: string | null;
2981
3086
  /**
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.
3087
+ * Refund information, provided that there are refunds for this invoice.
3088
+ * @readonly
2985
3089
  */
2986
- jobId?: string;
2987
- }
2988
- interface DeleteSubscriptionRequest {
2989
- /** @format GUID */
2990
- id?: string;
2991
- revision?: string;
2992
- }
2993
- interface DeleteSubscriptionResponse {
2994
- }
2995
- interface CancelSubscriptionRequest {
2996
- /** @format GUID */
2997
- id: string;
2998
- actionContext: ActionContext;
3090
+ refundInfo?: RefundInfo;
2999
3091
  }
3000
- interface ActionContext {
3001
- initiator?: ActionInitiatorWithLiterals;
3002
- /** Optional action reason message */
3003
- reason?: string | null;
3092
+ interface BusinessOriginData {
3093
+ /**
3094
+ * ID of the app for which BASS has created the invoice. For example,
3095
+ * `"1380b703-ce81-ff05-f115-39571d94dfcd"` for the Wix eCommerce app.
3096
+ * @format GUID
3097
+ */
3098
+ appId?: string;
3099
+ /**
3100
+ * [Instance ID](https://dev.wix.com/api/rest/app-management/apps/app-instance/get-app-instance)
3101
+ * of the app for which BASS has created the invoice.
3102
+ * @format GUID
3103
+ */
3104
+ instanceId?: string;
3105
+ /**
3106
+ * ID of the entity that triggered the invoice creation. For example, the ID of a
3107
+ * [pricing plan](https://dev.wix.com/docs/rest/payments/pricing-plans/pricing-plans/plan#plan-object).
3108
+ * @format GUID
3109
+ */
3110
+ entityId?: string;
3004
3111
  }
3005
- interface CancelSubscriptionResponse {
3006
- subscription?: Subscription;
3112
+ declare enum InvoiceStatus {
3113
+ UNKNOWN = "UNKNOWN",
3114
+ OPEN = "OPEN",
3115
+ PAID = "PAID",
3116
+ FAILED = "FAILED",
3117
+ ATTEMPT_FAILED = "ATTEMPT_FAILED",
3118
+ CANCELED = "CANCELED",
3119
+ REFUNDED = "REFUNDED",
3120
+ CHARGEBACKED = "CHARGEBACKED"
3007
3121
  }
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;
3122
+ /** @enumType */
3123
+ type InvoiceStatusWithLiterals = InvoiceStatus | 'UNKNOWN' | 'OPEN' | 'PAID' | 'FAILED' | 'ATTEMPT_FAILED' | 'CANCELED' | 'REFUNDED' | 'CHARGEBACKED';
3124
+ declare enum CollectionMethod {
3125
+ UNKNOWN = "UNKNOWN",
3126
+ AUTO_CHARGE = "AUTO_CHARGE",
3127
+ OFFLINE = "OFFLINE",
3128
+ SEND_INVOICE = "SEND_INVOICE"
3018
3129
  }
3019
- interface PauseSubscriptionResponse {
3020
- subscription?: Subscription;
3130
+ /** @enumType */
3131
+ type CollectionMethodWithLiterals = CollectionMethod | 'UNKNOWN' | 'AUTO_CHARGE' | 'OFFLINE' | 'SEND_INVOICE';
3132
+ declare enum CreationMode {
3133
+ UNKNOWN = "UNKNOWN",
3134
+ SYSTEM = "SYSTEM",
3135
+ MANUAL = "MANUAL"
3021
3136
  }
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;
3071
- }
3072
- /** @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 {
3137
+ /** @enumType */
3138
+ type CreationModeWithLiterals = CreationMode | 'UNKNOWN' | 'SYSTEM' | 'MANUAL';
3139
+ interface LatestPaymentAttempt {
3116
3140
  /**
3117
- * The ID of the offline subscription to mark as paid its latest invoice
3141
+ * ID of the latest payment attempt.
3118
3142
  * @format GUID
3143
+ * @readonly
3119
3144
  */
3120
- subscriptionId: string;
3121
- }
3122
- interface MarkLatestInvoiceAsPaidResponse {
3123
- subscription?: Subscription;
3124
- }
3125
- interface LatestInvoiceMarkedAsPaid {
3126
- subscription?: Subscription;
3127
- }
3128
- interface MultipleSubscriptionsOnOrdersInvoice {
3145
+ paymentAttemptId?: string;
3129
3146
  /**
3130
- * the invoice id of the affected subscription
3131
- * @format GUID
3147
+ * Date and time of the latest payment attempt in `YYYY-MM-DDThh:mm.sssZ` format.
3148
+ * @readonly
3132
3149
  */
3133
- invoiceId?: string;
3150
+ dateAttempt?: Date | null;
3151
+ /** Number of the latest payment attempt. */
3152
+ attemptNumber?: number;
3134
3153
  /**
3135
- * the order id of the affected subscription
3136
- * @format GUID
3154
+ * Status of the latest payment attempt.
3155
+ *
3156
+ * + `"UNKNOWN"`: There is no information about the status of the latest payment attempt.
3157
+ * + `"SCHEDULED"`: The latest payment attempt is scheduled but hasn't started yet.
3158
+ * + `"IN_PROGRESS"`: The latest payment attempt is in progress.
3159
+ * + `"PAID"`: The latest payment attempt resulted in a successful payment.
3160
+ * + `"DECLINED"`: The latest payment attempt has been declined.
3161
+ * + `"TECHNICAL_FAILURE"`: The latest payment attempt couldn't be process due to a technical failure.
3162
+ * + `"CANCELED"`: The latest payment attempt has been canceled by BASS.
3163
+ * @readonly
3137
3164
  */
3138
- orderId?: string;
3139
- }
3140
- interface MarkBillingCycleAsPaidRequest {
3165
+ status?: PaymentAttemptStatusWithLiterals;
3141
3166
  /**
3142
- * The ID of the subscription to mark as paid its invoice.
3143
- * @format GUID
3167
+ * Whether BASS tries to collect the payment another time. Available only when
3168
+ * `latestPaymentAttempt.status` is set to `"DECLINED"`.
3144
3169
  */
3145
- subscriptionId: string;
3170
+ retryable?: boolean;
3146
3171
  /**
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
3172
+ * Platform fee that was collected on this transaction.
3173
+ * @format DECIMAL_VALUE
3174
+ * @decimalValue options { gte:0.00, maxScale:2 }
3175
+ * @readonly
3150
3176
  */
3151
- paidCycle?: number | null;
3152
- }
3153
- interface MarkBillingCycleAsPaidResponse {
3154
- subscription?: Subscription;
3177
+ appliedPlatformFee?: string | null;
3155
3178
  }
3156
- interface GetSubscriptionsStatsRequest {
3179
+ declare enum PaymentAttemptStatus {
3180
+ UNKNOWN = "UNKNOWN",
3181
+ SCHEDULED = "SCHEDULED",
3182
+ IN_PROGRESS = "IN_PROGRESS",
3183
+ PAID = "PAID",
3184
+ DECLINED = "DECLINED",
3185
+ TECHNICAL_FAILURE = "TECHNICAL_FAILURE",
3186
+ CANCELED = "CANCELED",
3187
+ PENDING = "PENDING",
3188
+ REFUNDED = "REFUNDED",
3189
+ CHARGEBACKED = "CHARGEBACKED"
3157
3190
  }
3158
- interface GetSubscriptionsStatsResponse {
3159
- amountByStatuses?: AmountByStatus[];
3160
- total?: number;
3191
+ /** @enumType */
3192
+ type PaymentAttemptStatusWithLiterals = PaymentAttemptStatus | 'UNKNOWN' | 'SCHEDULED' | 'IN_PROGRESS' | 'PAID' | 'DECLINED' | 'TECHNICAL_FAILURE' | 'CANCELED' | 'PENDING' | 'REFUNDED' | 'CHARGEBACKED';
3193
+ interface PriceAdjustment extends PriceAdjustmentAdjustmentTypeOneOf {
3194
+ /** Adjustment that increases the price. */
3195
+ charge?: PriceAdjustmentValue;
3196
+ /** Adjustment that lowers the price. */
3197
+ credit?: PriceAdjustmentValue;
3198
+ /** Reason for this price adjustment. Used to categorize proration adjustments. */
3199
+ reason?: PriceAdjustmentReasonWithLiterals;
3161
3200
  }
3162
- interface AmountByStatus {
3163
- status?: SubscriptionStatusEnumSubscriptionStatusWithLiterals;
3164
- amount?: number;
3201
+ /** @oneof */
3202
+ interface PriceAdjustmentAdjustmentTypeOneOf {
3203
+ /** Adjustment that increases the price. */
3204
+ charge?: PriceAdjustmentValue;
3205
+ /** Adjustment that lowers the price. */
3206
+ credit?: PriceAdjustmentValue;
3165
3207
  }
3166
- interface ExtendSubscriptionRequest extends ExtendSubscriptionRequestExtendPolicyOneOf {
3167
- /** User won't be charged for additional period added on top of subscription end date. */
3168
- extensionPeriod?: Duration;
3208
+ interface PriceAdjustmentValue extends PriceAdjustmentValueAdjustmentValueTypeOneOf {
3169
3209
  /**
3170
- * user will be charged for billing cycles added
3171
- * @min 1
3210
+ * Absolute amount that adjusts the price.
3211
+ *
3212
+ * Min: `0.01`
3213
+ * @decimalValue options { gt:0.00 }
3172
3214
  */
3173
- extensionBillingCycles?: number;
3215
+ amount?: string;
3174
3216
  /**
3175
- * The ID of the subscription to be extended
3176
- * @format GUID
3217
+ * Relative factor that adjusts the price. For example, setting
3218
+ * `multiplier` to:
3219
+ * - `0.50` results in a price adjustment of 50% of the original value.
3220
+ * - `0.75` results in a price adjustment of 75% of the original value.
3221
+ * - `1.00` results in a price adjustment of 100% of the original value.
3222
+ *
3223
+ * Min: `0.01`
3224
+ * Max: `1.00`
3225
+ * @decimalValue options { gt:0.00, lte:1 }
3177
3226
  */
3178
- id: string;
3179
- actionContext: ActionContext;
3227
+ multiplier?: string;
3180
3228
  }
3181
3229
  /** @oneof */
3182
- interface ExtendSubscriptionRequestExtendPolicyOneOf {
3183
- /** User won't be charged for additional period added on top of subscription end date. */
3184
- extensionPeriod?: Duration;
3230
+ interface PriceAdjustmentValueAdjustmentValueTypeOneOf {
3185
3231
  /**
3186
- * user will be charged for billing cycles added
3187
- * @min 1
3232
+ * Absolute amount that adjusts the price.
3233
+ *
3234
+ * Min: `0.01`
3235
+ * @decimalValue options { gt:0.00 }
3188
3236
  */
3189
- extensionBillingCycles?: number;
3190
- }
3191
- interface ExtendSubscriptionResponse {
3192
- /** The now extended subscription */
3193
- subscription?: Subscription;
3194
- }
3195
- interface AllowedActionsRequest {
3196
- /** @format GUID */
3197
- id: string;
3237
+ amount?: string;
3198
3238
  /**
3199
- * List of additional fields to be included in the response.
3200
- * @maxSize 1
3239
+ * Relative factor that adjusts the price. For example, setting
3240
+ * `multiplier` to:
3241
+ * - `0.50` results in a price adjustment of 50% of the original value.
3242
+ * - `0.75` results in a price adjustment of 75% of the original value.
3243
+ * - `1.00` results in a price adjustment of 100% of the original value.
3244
+ *
3245
+ * Min: `0.01`
3246
+ * Max: `1.00`
3247
+ * @decimalValue options { gt:0.00, lte:1 }
3201
3248
  */
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"
3249
+ multiplier?: string;
3207
3250
  }
3208
- /** @enumType */
3209
- type RequestedFieldsWithLiterals = RequestedFields | 'UNSUPPORTED_ACTION';
3210
- interface AllowedActionsResponse {
3211
- /** List of actions that are allowed. */
3212
- actions?: Action[];
3213
- /**
3214
- * List of actions that are not supported, included only if requested. Provides reasons for each unsupported action.
3215
- * @maxSize 20
3216
- */
3217
- unsupportedActions?: UnsupportedAction[];
3251
+ /** Reason for a price adjustment. Categorizes different types of proration adjustments. */
3252
+ declare enum PriceAdjustmentReason {
3253
+ /** Default value. Used for adjustments without a specific categorization. */
3254
+ PRICE_ADJUSTMENT_REASON_UNSPECIFIED = "PRICE_ADJUSTMENT_REASON_UNSPECIFIED",
3255
+ /** Adjustment due to a billing date change. */
3256
+ BILLING_DATE_CHANGE = "BILLING_DATE_CHANGE",
3257
+ /** Proration adjustment from changing the subscription plan. */
3258
+ PLAN_CHANGE_PRORATION = "PLAN_CHANGE_PRORATION",
3259
+ /** Proration adjustment from changing the billing cycle (e.g., monthly to yearly). */
3260
+ CYCLE_CHANGE_PRORATION = "CYCLE_CHANGE_PRORATION",
3261
+ /** Proration adjustment from changing the subscription quantity. */
3262
+ QUANTITY_CHANGE_PRORATION = "QUANTITY_CHANGE_PRORATION",
3263
+ /** Custom adjustment provided by the caller. */
3264
+ CUSTOM_PRICE_ADJUSTMENT = "CUSTOM_PRICE_ADJUSTMENT"
3218
3265
  }
3219
- interface UnsupportedAction {
3220
- actionType?: ActionTypeWithLiterals;
3266
+ /** @enumType */
3267
+ type PriceAdjustmentReasonWithLiterals = PriceAdjustmentReason | 'PRICE_ADJUSTMENT_REASON_UNSPECIFIED' | 'BILLING_DATE_CHANGE' | 'PLAN_CHANGE_PRORATION' | 'CYCLE_CHANGE_PRORATION' | 'QUANTITY_CHANGE_PRORATION' | 'CUSTOM_PRICE_ADJUSTMENT';
3268
+ interface InvoiceShippingCharges {
3221
3269
  /**
3222
- * Provides detailed reasons for the unsupported action. Each `UnsupportedReason` includes a code and a message explaining why the action is not allowed.
3223
- * @maxSize 20
3270
+ * Amount of the shipping fee in `0.00` format.
3271
+ *
3272
+ * Min: `0.01`
3273
+ * @decimalValue options { gte:0.00, maxScale:2 }
3224
3274
  */
3225
- reasons?: UnsupportedReason[];
3275
+ amount?: string;
3276
+ /** Tax of the shipping fee */
3277
+ tax?: Tax;
3278
+ /** Information about the shipping charges tax data */
3279
+ taxData?: ItemTaxData;
3280
+ discount?: Discount;
3226
3281
  }
3227
- interface UnsupportedReason {
3228
- code?: string;
3229
- description?: string | null;
3282
+ /** Tax data from all items */
3283
+ interface TaxData {
3284
+ /** Aggregated tax data from all items */
3285
+ taxSummary?: TaxSummary;
3230
3286
  }
3231
- interface ListUpcomingChargesRequest {
3287
+ interface TaxSummary {
3232
3288
  /**
3233
- * Subscription id charges to be previewed for
3234
- * @format GUID
3289
+ * Aggregated from tax_breakdowns with exemptions excluded from amount
3290
+ * @format DECIMAL_VALUE
3235
3291
  */
3236
- subscriptionId: string;
3237
- /** Period of time to provide charged for. If not provided,then only next charge will be returned. */
3238
- customDuration?: Duration;
3292
+ aggregatedTaxAmount?: string;
3239
3293
  /**
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.
3294
+ * Array of each tax applied, grouped by `"jurisdiction"`, `"jurisdiction_type"`, `"tax_type"`, `"tax_name"` and `"tax_rate"`.
3295
+ * @maxSize 50
3242
3296
  */
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;
3251
- }
3252
- /** @oneof */
3253
- interface PreviewSubscriptionChargesRequestSubscriptionOneOf {
3254
- /** Information about a non-existing subscription. */
3255
- subscriptionInfo?: SubscriptionInfo;
3256
- }
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;
3262
- }
3263
- interface PreviewSubscriptionChargesResponse {
3264
- /** Charges for subscription. */
3265
- charges?: Charge[];
3266
- }
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;
3297
+ aggregatedTaxBreakdowns?: AggregatedTaxBreakdown[];
3298
+ /**
3299
+ * 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.
3300
+ * @format DECIMAL_VALUE
3301
+ * @decimalValue options { maxScale:4 }
3302
+ */
3303
+ exemptAmount?: string | null;
3277
3304
  }
3278
- interface PreviewSubscriptionsChargesRequest {
3305
+ interface AggregatedTaxBreakdown {
3279
3306
  /**
3280
- * Information required to calculate the preview charges for the subscriptions, including an identifier.
3281
- * @minSize 1
3282
- * @maxSize 10
3307
+ * Name of the tax that was calculated.
3308
+ * @maxLength 200
3283
3309
  */
3284
- subscriptionsBillingDetails?: SubscriptionBillingDetails[];
3310
+ taxName?: string;
3285
3311
  /**
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
3312
+ * Type of tax that was calculated.
3313
+ * @maxLength 200
3298
3314
  */
3299
- numberOfNextRecurringCharges?: number | null;
3300
- }
3301
- interface SubscriptionBillingDetails {
3315
+ taxType?: string;
3302
3316
  /**
3303
- * External identifier of the subscription
3304
- * @format GUID
3317
+ * Jurisdiction that taxes were calculated for.
3318
+ * @maxLength 200
3305
3319
  */
3306
- externalId?: string | null;
3307
- /** Billing details parameters including schedule, currency, etc. */
3308
- billingSettings?: BillingSettings;
3320
+ jurisdiction?: string;
3321
+ /** Type of jurisdiction that taxes were calculated for. */
3322
+ jurisdictionType?: string;
3309
3323
  /**
3310
- * Items, minSize is 1, maxSize is 100
3311
- * @minSize 1
3312
- * @maxSize 100
3324
+ * Tax rate used for this jurisdiction, as a decimal. For example, 10% tax is `"0.1000"` and 200% tax is `"2.0000"`.
3325
+ * @decimalValue options { gte:0, maxScale:6 }
3313
3326
  */
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[];
3327
+ rate?: string;
3328
+ /**
3329
+ * Total amount of this tax for this jurisdiction.
3330
+ * @format DECIMAL_VALUE
3331
+ * @decimalValue options { maxScale:4 }
3332
+ */
3333
+ aggregatedTaxAmount?: string;
3323
3334
  }
3324
- interface SubscriptionCharges {
3335
+ interface RefundInfo {
3325
3336
  /**
3326
- * External identifier of the subscription
3327
- * @format GUID
3337
+ * If refunds are present, this will include the total amount refunded.
3338
+ * @format DECIMAL_VALUE
3339
+ * @decimalValue options { gte:0.00, maxScale:2 }
3328
3340
  */
3329
- externalId?: string | null;
3330
- /** Charges for subscription. */
3331
- charges?: Charge[];
3341
+ totalRefundAmount?: string | null;
3342
+ /**
3343
+ * The refunds that have been applied to this invoice
3344
+ * @maxSize 20
3345
+ */
3346
+ refunds?: Refund[];
3332
3347
  }
3333
- interface CreateSubscriptionForOrderRequest {
3334
- /** Subscription needs to be created */
3335
- subscription?: Subscription;
3348
+ interface Refund {
3336
3349
  /**
3337
- * Optional unique identifier for this request in order to prevent subscription duplications
3350
+ * refund amount
3351
+ * @format DECIMAL_VALUE
3352
+ * @decimalValue options { gt:0.00, maxScale:2 }
3353
+ */
3354
+ amount?: string;
3355
+ /** the date of the refund transaction */
3356
+ transactionDate?: Date | null;
3357
+ /**
3358
+ * the transaction id associated with this refund
3338
3359
  * @format GUID
3339
3360
  */
3340
- idempotencyKey?: string | null;
3361
+ transactionId?: string;
3362
+ /** a reason for the refund */
3363
+ reason?: RefundReasonWithLiterals;
3364
+ /**
3365
+ * a description of the refund - this is a free text field for the initiator
3366
+ * @maxLength 255
3367
+ */
3368
+ description?: string | null;
3341
3369
  }
3342
- interface CreateSubscriptionForOrderResponse {
3343
- /** Created subscription */
3344
- subscription?: Subscription;
3345
- /** Non-persistent invoice */
3346
- invoice?: Invoice;
3370
+ declare enum RefundReason {
3371
+ DUPLICATE_CHARGE = "DUPLICATE_CHARGE",
3372
+ FRAUDULENT = "FRAUDULENT",
3373
+ CUSTOMER_REQUEST = "CUSTOMER_REQUEST",
3374
+ PROVISION_FAILED = "PROVISION_FAILED",
3375
+ OTHER = "OTHER"
3347
3376
  }
3348
- /** An invoice includes information about the subscription and the customer. */
3349
- interface Invoice {
3377
+ /** @enumType */
3378
+ type RefundReasonWithLiterals = RefundReason | 'DUPLICATE_CHARGE' | 'FRAUDULENT' | 'CUSTOMER_REQUEST' | 'PROVISION_FAILED' | 'OTHER';
3379
+ interface ChangeSubscriptionRequest {
3350
3380
  /**
3351
- * Invoice ID.
3381
+ * ID of the subscription to change
3352
3382
  * @format GUID
3353
- * @readonly
3354
3383
  */
3355
- id?: string | null;
3384
+ subscriptionId?: string;
3356
3385
  /**
3357
- * Date and time the invoice was created.
3358
- * @readonly
3386
+ * Item-level changes. Each entry targets one existing item by ID.
3387
+ * Caller passes CONCRETE new values (price, quantity, name) — BASS does not resolve pricing.
3388
+ * BASS uses these for proration: old values (from subscription) vs new values (from here).
3359
3389
  */
3360
- createdDate?: Date | null;
3390
+ itemChanges?: SubscriptionItemChange[];
3361
3391
  /**
3362
- * Date and time the invoice was last updated.
3363
- * @readonly
3392
+ * Subscription-level: new billing cycle (e.g., monthly to yearly).
3393
+ * Affects the billing period for ALL items.
3394
+ * When changing cycle, caller MUST also pass new prices in item_changes.
3364
3395
  */
3365
- updatedDate?: Date | null;
3396
+ newCycle?: Duration;
3397
+ /** When the change takes effect. */
3398
+ effectiveTime?: ChangeEffectiveTimeWithLiterals;
3399
+ /** How to handle proration for immediate changes. Ignored for AT_NEXT_RENEWAL. */
3400
+ prorationBehavior?: ProrationBehaviorEnumProrationBehaviorWithLiterals;
3401
+ /** Payment context for immediate changes without checkout flow. */
3402
+ paymentContext?: ChangePaymentContext;
3403
+ }
3404
+ /**
3405
+ * Describes a change to a single subscription item.
3406
+ * The caller (BG/CVS) resolves pricing from their catalog and passes concrete values.
3407
+ */
3408
+ interface SubscriptionItemChange {
3366
3409
  /**
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
3410
+ * Which item to change. Must match an existing item ID in the subscription.
3411
+ * @format GUID
3373
3412
  */
3374
- revision?: string | null;
3375
- /** Information about the invoice origin. */
3376
- origin?: BusinessOriginData;
3413
+ itemId?: string;
3377
3414
  /**
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
3415
+ * New price per unit. Caller resolves this from their product catalog.
3416
+ * Required when changing product/plan. Optional for quantity-only changes (uses current price).
3417
+ * @decimalValue options { gte:0.00, maxScale:2 }
3387
3418
  */
3388
- status?: InvoiceStatusWithLiterals;
3419
+ newPrice?: string | null;
3389
3420
  /**
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
3421
+ * New quantity (seats/licenses). Optional unchanged if not set.
3422
+ * @min 1
3393
3423
  */
3394
- currency?: string;
3395
- /** Information about the customer. */
3396
- customer?: Customer;
3424
+ newQuantity?: number | null;
3397
3425
  /**
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.
3426
+ * New catalog reference. Optional set when changing to a different product.
3427
+ * This is metadata for the caller's tracking; BASS does not use it for pricing.
3404
3428
  */
3405
- collectionMethod?: CollectionMethodWithLiterals;
3429
+ newCatalogReference?: CatalogReference;
3406
3430
  /**
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
3431
+ * New item name. Optional — set when changing to a different product.
3432
+ * @maxLength 200
3412
3433
  */
3413
- paymentMethodId?: string | null;
3434
+ newName?: string | null;
3435
+ }
3436
+ declare enum ChangeEffectiveTime {
3437
+ UNKNOWN = "UNKNOWN",
3438
+ /** Apply change immediately with proration */
3439
+ IMMEDIATELY = "IMMEDIATELY",
3440
+ /** Schedule change for the next billing cycle */
3441
+ AT_NEXT_RENEWAL = "AT_NEXT_RENEWAL"
3442
+ }
3443
+ /** @enumType */
3444
+ type ChangeEffectiveTimeWithLiterals = ChangeEffectiveTime | 'UNKNOWN' | 'IMMEDIATELY' | 'AT_NEXT_RENEWAL';
3445
+ declare enum ProrationBehaviorEnumProrationBehavior {
3446
+ UNKNOWN = "UNKNOWN",
3447
+ /** Credit unused time + charge new prorated price (default for upgrades) */
3448
+ PRORATE_AND_CHARGE = "PRORATE_AND_CHARGE",
3449
+ /** Credit unused time + refund to payment method (downgrades) */
3450
+ PRORATE_AND_REFUND = "PRORATE_AND_REFUND",
3451
+ /** Convert unused value to extra days, no financial transaction */
3452
+ PRORATE_AND_EXTEND = "PRORATE_AND_EXTEND",
3453
+ /** Immediate switch with no financial adjustment */
3454
+ NO_PRORATION = "NO_PRORATION"
3455
+ }
3456
+ /** @enumType */
3457
+ type ProrationBehaviorEnumProrationBehaviorWithLiterals = ProrationBehaviorEnumProrationBehavior | 'UNKNOWN' | 'PRORATE_AND_CHARGE' | 'PRORATE_AND_REFUND' | 'PRORATE_AND_EXTEND' | 'NO_PRORATION';
3458
+ /** Payment context for immediate subscription changes without the checkout flow. */
3459
+ interface ChangePaymentContext {
3460
+ /** Payment settings override for this change */
3461
+ paymentSettings?: PaymentSettings;
3462
+ }
3463
+ interface ChangeSubscriptionResponse {
3464
+ /** Updated subscription */
3465
+ subscription?: Subscription;
3466
+ /** Proration calculation result. Present for immediate changes with proration. */
3467
+ prorationResult?: V1ProrationResult;
3414
3468
  /**
3415
- * Cashier [Order ID](https://dev.wix.com/docs/rest/payments/wix-cashier/pay/order#order-object)
3416
- * for the corresponding payment.
3469
+ * ID of the adjustment invoice created for the proration charge or refund.
3417
3470
  * @format GUID
3418
- * @readonly
3419
3471
  */
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;
3472
+ adjustmentInvoiceId?: string | null;
3473
+ }
3474
+ /** Result of a proration calculation applied during a subscription change. */
3475
+ interface V1ProrationResult {
3427
3476
  /**
3428
- * Shipping fee in `0.00` format.
3477
+ * Credit amount for unused time on the current plan
3429
3478
  * @format DECIMAL_VALUE
3430
3479
  */
3431
- shippingFee?: string | null;
3480
+ creditAmount?: string;
3432
3481
  /**
3433
- * Information about the invoice's totals.
3434
- * @readonly
3482
+ * Charge amount for the new plan's prorated price
3483
+ * @format DECIMAL_VALUE
3435
3484
  */
3436
- totals?: Totals;
3437
- /** Line items belonging to the invoice. */
3438
- invoiceItems?: InvoiceItem[];
3485
+ chargeAmount?: string;
3439
3486
  /**
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.
3487
+ * Net amount (charge minus credit). Positive means customer pays, negative means refund.
3488
+ * @format DECIMAL_VALUE
3444
3489
  */
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[];
3490
+ netAmount?: string;
3491
+ /** Date when the proration was calculated */
3492
+ prorationDate?: Date | null;
3493
+ /** Remaining seconds in the current billing period at time of change */
3494
+ remainingSeconds?: string;
3495
+ /** Total seconds in the current billing cycle */
3496
+ totalCycleSeconds?: string;
3497
+ }
3498
+ interface PreviewChangeSubscriptionRequest {
3452
3499
  /**
3453
- * Invoice Number.
3454
- * @maxLength 10
3455
- * @readonly
3500
+ * ID of the subscription to preview the change for
3501
+ * @format GUID
3456
3502
  */
3457
- invoiceNumber?: string | null;
3503
+ subscriptionId?: string;
3504
+ /** Item-level changes to preview. Same structure as ChangeSubscriptionRequest. */
3505
+ itemChanges?: SubscriptionItemChange[];
3506
+ /** Subscription-level: preview a cycle change. */
3507
+ newCycle?: Duration;
3508
+ /** When the change would take effect. */
3509
+ effectiveTime?: ChangeEffectiveTimeWithLiterals;
3510
+ /** How proration would be handled for immediate changes. */
3511
+ prorationBehavior?: ProrationBehaviorEnumProrationBehaviorWithLiterals;
3512
+ }
3513
+ interface PreviewChangeSubscriptionResponse {
3514
+ /** Summary of the current subscription state */
3515
+ current?: SubscriptionChangeSummary;
3516
+ /** Summary of the proposed subscription state after the change */
3517
+ proposed?: SubscriptionChangeSummary;
3518
+ /** Proration preview details. Present only for immediate changes. */
3519
+ proration?: ProrationPreview;
3520
+ /** Renewal preview. Present only for changes at next renewal. */
3521
+ renewalPreview?: RenewalPreview;
3522
+ }
3523
+ /** Summary of a subscription's state, used in change previews. */
3524
+ interface SubscriptionChangeSummary {
3525
+ /** Product ID */
3526
+ productId?: string;
3527
+ /** Product name */
3528
+ productName?: string;
3529
+ /** Billing cycle duration */
3530
+ cycle?: Duration;
3531
+ /** Number of units */
3532
+ quantity?: number;
3458
3533
  /**
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
3534
+ * Price per unit
3535
+ * @format DECIMAL_VALUE
3462
3536
  */
3463
- shippingCharges?: InvoiceShippingCharges;
3464
- /** Information about the invoice tax */
3465
- taxData?: TaxData;
3466
- /** Business address. */
3467
- businessAddress?: Address;
3537
+ pricePerUnit?: string;
3468
3538
  /**
3469
- * ID of the billing order that created this invoice.
3470
- * @format GUID
3539
+ * Total price (price_per_unit * quantity)
3540
+ * @format DECIMAL_VALUE
3471
3541
  */
3472
- orderId?: string | null;
3542
+ totalPrice?: string;
3473
3543
  /**
3474
- * Platform origin the invoice is originated from.
3475
- * @format GUID
3544
+ * Currency code (ISO 4217)
3545
+ * @format CURRENCY
3476
3546
  */
3477
- platformOriginAppId?: string | null;
3547
+ currency?: string;
3548
+ /** Current billing period start */
3549
+ periodStart?: Date | null;
3550
+ /** Current billing period end */
3551
+ periodEnd?: Date | null;
3552
+ }
3553
+ /** Preview of proration amounts for a proposed subscription change. */
3554
+ interface ProrationPreview {
3478
3555
  /**
3479
- * Refund information, provided that there are refunds for this invoice.
3480
- * @readonly
3556
+ * Credit amount for unused time on the current plan
3557
+ * @format DECIMAL_VALUE
3481
3558
  */
3482
- refundInfo?: RefundInfo;
3483
- }
3484
- interface BusinessOriginData {
3559
+ creditAmount?: string;
3485
3560
  /**
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.
3488
- * @format GUID
3561
+ * Charge amount for the new plan's prorated price
3562
+ * @format DECIMAL_VALUE
3489
3563
  */
3490
- appId?: string;
3564
+ chargeAmount?: string;
3491
3565
  /**
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
3566
+ * Net amount (charge minus credit)
3567
+ * @format DECIMAL_VALUE
3495
3568
  */
3496
- instanceId?: string;
3569
+ netAmount?: string;
3497
3570
  /**
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
3571
+ * Tax amount on the net proration
3572
+ * @format DECIMAL_VALUE
3501
3573
  */
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"
3574
+ taxAmount?: string;
3575
+ /**
3576
+ * Total amount including tax
3577
+ * @format DECIMAL_VALUE
3578
+ */
3579
+ totalAmount?: string;
3580
+ /** Remaining seconds in the current billing period */
3581
+ remainingSeconds?: string;
3582
+ /** Total seconds in the current billing cycle */
3583
+ totalCycleSeconds?: string;
3584
+ /** New period end date. Present when proration_behavior is PRORATE_AND_EXTEND. */
3585
+ newPeriodEnd?: Date | null;
3586
+ /** Number of days added to the billing period. Present when proration_behavior is PRORATE_AND_EXTEND. */
3587
+ daysAdded?: number;
3588
+ /** The proration action that would be taken */
3589
+ action?: ProrationActionWithLiterals;
3521
3590
  }
3522
- /** @enumType */
3523
- type CollectionMethodWithLiterals = CollectionMethod | 'UNKNOWN' | 'AUTO_CHARGE' | 'OFFLINE' | 'SEND_INVOICE';
3524
- declare enum CreationMode {
3591
+ declare enum ProrationAction {
3525
3592
  UNKNOWN = "UNKNOWN",
3526
- SYSTEM = "SYSTEM",
3527
- MANUAL = "MANUAL"
3593
+ /** Net charge to customer */
3594
+ CHARGE = "CHARGE",
3595
+ /** Net refund to customer */
3596
+ REFUND = "REFUND",
3597
+ /** Extend billing period instead of refund */
3598
+ EXTEND_PERIOD = "EXTEND_PERIOD",
3599
+ /** No financial change needed */
3600
+ NO_CHANGE = "NO_CHANGE"
3528
3601
  }
3529
3602
  /** @enumType */
3530
- type CreationModeWithLiterals = CreationMode | 'UNKNOWN' | 'SYSTEM' | 'MANUAL';
3531
- interface LatestPaymentAttempt {
3603
+ type ProrationActionWithLiterals = ProrationAction | 'UNKNOWN' | 'CHARGE' | 'REFUND' | 'EXTEND_PERIOD' | 'NO_CHANGE';
3604
+ /** Preview of what the next renewal will look like after a change. */
3605
+ interface RenewalPreview {
3532
3606
  /**
3533
- * ID of the latest payment attempt.
3534
- * @format GUID
3535
- * @readonly
3607
+ * New price per unit at next renewal
3608
+ * @format DECIMAL_VALUE
3536
3609
  */
3537
- paymentAttemptId?: string;
3610
+ newPrice?: string;
3538
3611
  /**
3539
- * Date and time of the latest payment attempt in `YYYY-MM-DDThh:mm.sssZ` format.
3540
- * @readonly
3612
+ * New total at next renewal (price * quantity)
3613
+ * @format DECIMAL_VALUE
3541
3614
  */
3542
- dateAttempt?: Date | null;
3543
- /** Number of the latest payment attempt. */
3544
- attemptNumber?: number;
3615
+ newTotal?: string;
3616
+ /** Date of the next renewal */
3617
+ nextRenewalDate?: Date | null;
3618
+ }
3619
+ interface CancelPendingChangeRequest {
3545
3620
  /**
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
- */
3557
- status?: PaymentAttemptStatusWithLiterals;
3558
- /**
3559
- * Whether BASS tries to collect the payment another time. Available only when
3560
- * `latestPaymentAttempt.status` is set to `"DECLINED"`.
3561
- */
3562
- retryable?: boolean;
3563
- /**
3564
- * Platform fee that was collected on this transaction.
3565
- * @format DECIMAL_VALUE
3566
- * @decimalValue options { gte:0.00, maxScale:2 }
3567
- * @readonly
3621
+ * ID of the subscription to cancel the pending change for
3622
+ * @format GUID
3568
3623
  */
3569
- appliedPlatformFee?: string | null;
3570
- }
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"
3624
+ subscriptionId?: string;
3582
3625
  }
3583
- /** @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;
3626
+ interface CancelPendingChangeResponse {
3627
+ /** Updated subscription with cleared pending data */
3628
+ subscription?: Subscription;
3592
3629
  }
3593
- /** @oneof */
3594
- interface PriceAdjustmentAdjustmentTypeOneOf {
3595
- /** Adjustment that increases the price. */
3596
- charge?: PriceAdjustmentValue;
3597
- /** Adjustment that lowers the price. */
3598
- credit?: PriceAdjustmentValue;
3630
+ interface ChangeSubscriptionForOrderRequest {
3631
+ /** The new subscription definition from the order (items, billing settings). */
3632
+ subscription?: Subscription;
3633
+ /** Context of the change: source subscription, change type, proration behavior. */
3634
+ changeContext?: ChangeContext;
3599
3635
  }
3600
- interface PriceAdjustmentValue extends PriceAdjustmentValueAdjustmentValueTypeOneOf {
3636
+ /**
3637
+ * Context for subscription changes within the order/checkout flow.
3638
+ * Carries the source subscription reference and change parameters.
3639
+ * Present on an OrderSubscription when it represents a modification of an
3640
+ * existing subscription rather than a new purchase.
3641
+ */
3642
+ interface ChangeContext {
3601
3643
  /**
3602
- * Absolute amount that adjusts the price.
3603
- *
3604
- * Min: `0.01`
3605
- * @decimalValue options { gt:0.00 }
3644
+ * ID of the existing subscription being changed.
3645
+ * @format GUID
3606
3646
  */
3607
- amount?: string;
3647
+ sourceSubscriptionId?: string;
3648
+ /** Type of change being performed. */
3649
+ changeType?: ChangeTypeWithLiterals;
3650
+ /** How proration should be handled. */
3651
+ prorationBehavior?: ProrationBehaviorWithLiterals;
3608
3652
  /**
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 }
3653
+ * System-populated: proration result after calculation.
3654
+ * Populated by billing-subscriptions during order processing.
3618
3655
  */
3619
- multiplier?: string;
3656
+ prorationResult?: ProrationResult;
3620
3657
  }
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;
3658
+ declare enum ChangeType {
3659
+ CHANGE_TYPE_UNKNOWN = "CHANGE_TYPE_UNKNOWN",
3660
+ UPGRADE = "UPGRADE",
3661
+ DOWNGRADE = "DOWNGRADE",
3662
+ CYCLE_CHANGE = "CYCLE_CHANGE",
3663
+ QUANTITY_CHANGE = "QUANTITY_CHANGE"
3642
3664
  }
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"
3665
+ /** @enumType */
3666
+ type ChangeTypeWithLiterals = ChangeType | 'CHANGE_TYPE_UNKNOWN' | 'UPGRADE' | 'DOWNGRADE' | 'CYCLE_CHANGE' | 'QUANTITY_CHANGE';
3667
+ declare enum ProrationBehavior {
3668
+ PRORATION_BEHAVIOR_UNKNOWN = "PRORATION_BEHAVIOR_UNKNOWN",
3669
+ /** Credit unused time + charge new prorated price (default for upgrades) */
3670
+ PRORATE_AND_CHARGE = "PRORATE_AND_CHARGE",
3671
+ /** Credit unused time + refund to payment method (downgrades) */
3672
+ PRORATE_AND_REFUND = "PRORATE_AND_REFUND",
3673
+ /** Convert unused value to extra days, no financial transaction */
3674
+ PRORATE_AND_EXTEND = "PRORATE_AND_EXTEND",
3675
+ /** Immediate switch with no financial adjustment */
3676
+ NO_PRORATION = "NO_PRORATION"
3657
3677
  }
3658
3678
  /** @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 {
3679
+ type ProrationBehaviorWithLiterals = ProrationBehavior | 'PRORATION_BEHAVIOR_UNKNOWN' | 'PRORATE_AND_CHARGE' | 'PRORATE_AND_REFUND' | 'PRORATE_AND_EXTEND' | 'NO_PRORATION';
3680
+ /**
3681
+ * Result of a proration calculation. Contains the credit, charge, and net amounts
3682
+ * computed during a subscription change.
3683
+ */
3684
+ interface ProrationResult {
3661
3685
  /**
3662
- * Amount of the shipping fee in `0.00` format.
3663
- *
3664
- * Min: `0.01`
3665
- * @decimalValue options { gte:0.00, maxScale:2 }
3686
+ * Credit amount for unused time on the current plan
3687
+ * @format DECIMAL_VALUE
3666
3688
  */
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;
3673
- }
3674
- /** Tax data from all items */
3675
- interface TaxData {
3676
- /** Aggregated tax data from all items */
3677
- taxSummary?: TaxSummary;
3678
- }
3679
- interface TaxSummary {
3689
+ creditAmount?: string;
3680
3690
  /**
3681
- * Aggregated from tax_breakdowns with exemptions excluded from amount
3691
+ * Charge amount for the new plan's prorated price
3682
3692
  * @format DECIMAL_VALUE
3683
3693
  */
3684
- aggregatedTaxAmount?: string;
3694
+ chargeAmount?: string;
3685
3695
  /**
3686
- * Array of each tax applied, grouped by `"jurisdiction"`, `"jurisdiction_type"`, `"tax_type"`, `"tax_name"` and `"tax_rate"`.
3687
- * @maxSize 50
3696
+ * Net amount (charge minus credit). Positive means customer pays, negative means refund.
3697
+ * @format DECIMAL_VALUE
3688
3698
  */
3689
- aggregatedTaxBreakdowns?: AggregatedTaxBreakdown[];
3699
+ netAmount?: string;
3700
+ /** Date when the proration was calculated */
3701
+ prorationDate?: Date | null;
3702
+ /** Remaining seconds in the current billing period at time of change */
3703
+ remainingSeconds?: string;
3704
+ /** Total seconds in the current billing cycle */
3705
+ totalCycleSeconds?: string;
3690
3706
  }
3691
- interface AggregatedTaxBreakdown {
3707
+ interface ChangeSubscriptionForOrderResponse {
3708
+ /** The source subscription (unchanged, for reference). */
3709
+ subscription?: Subscription;
3710
+ /** Non-persistent invoice with proration adjustments. */
3711
+ invoice?: Invoice;
3712
+ /** Calculated proration result. */
3713
+ prorationResult?: ProrationResult;
3714
+ }
3715
+ interface Task {
3716
+ key?: TaskKey;
3717
+ executeAt?: Date | null;
3718
+ payload?: string | null;
3719
+ }
3720
+ interface TaskKey {
3721
+ appId?: string;
3722
+ instanceId?: string;
3723
+ subjectId?: string | null;
3724
+ }
3725
+ interface TaskAction extends TaskActionActionOneOf {
3726
+ complete?: Complete;
3727
+ cancel?: Cancel;
3728
+ reschedule?: Reschedule;
3729
+ }
3730
+ /** @oneof */
3731
+ interface TaskActionActionOneOf {
3732
+ complete?: Complete;
3733
+ cancel?: Cancel;
3734
+ reschedule?: Reschedule;
3735
+ }
3736
+ interface Complete {
3737
+ }
3738
+ interface Cancel {
3739
+ }
3740
+ interface Reschedule {
3741
+ executeAt?: Date | null;
3742
+ payload?: string | null;
3743
+ }
3744
+ interface Empty {
3745
+ }
3746
+ interface V1SubscriptionEvent extends V1SubscriptionEventEventOneOf {
3747
+ /** A subscriptions was created */
3748
+ created?: V1SubscriptionCreated;
3749
+ /** Subscription is considered active and will be visible to site owners and members */
3750
+ activated?: V1SubscriptionActivated;
3692
3751
  /**
3693
- * Name of the tax that was calculated.
3694
- * @maxLength 200
3752
+ * Subscription was canceled either by cancellation request with requested expiration date NOW or by payment provider.
3753
+ * If cancelled by payment provider subscription will be valid until the date calculated depending on how many cycles it was already paid for.
3695
3754
  */
3696
- taxName?: string;
3755
+ canceled?: V1SubscriptionCanceled;
3756
+ /** Subscription was updated. Currently the only possible change is valid_until date */
3757
+ updated?: V1SubscriptionUpdated;
3758
+ /** Subscription cycle has started. Currently the cycle starts when a payment is received. */
3759
+ cycleTriggered?: SubscriptionCycleTriggered;
3760
+ /** Offline subscription was marked as paid */
3761
+ markedAsPaid?: SubscriptionMarkedAsPaid;
3697
3762
  /**
3698
- * Type of tax that was calculated.
3699
- * @maxLength 200
3763
+ * Subscription cancellation for the future date was requested.
3764
+ * Subscription will stay in pending cancellation status until the date calculated depending on free trial and the next payment date.
3700
3765
  */
3701
- taxType?: string;
3766
+ cancellationRequested?: SubscriptionCancellationRequested;
3767
+ /** Subscription and it's payment schedule (for recurring) was suspended */
3768
+ suspended?: SubscriptionSuspended;
3769
+ /** Previously suspended subscription and it's payment schedule (for recurring) was resumed */
3770
+ resumed?: V1SubscriptionResumed;
3771
+ /** Subscription expired according to valid_until expiration date. */
3772
+ expired?: SubscriptionExpired;
3773
+ /** Subscription initial purchase completed */
3774
+ initialPurchaseCompleted?: V1SubscriptionInitialPurchaseCompleted;
3775
+ }
3776
+ /** @oneof */
3777
+ interface V1SubscriptionEventEventOneOf {
3778
+ /** A subscriptions was created */
3779
+ created?: V1SubscriptionCreated;
3780
+ /** Subscription is considered active and will be visible to site owners and members */
3781
+ activated?: V1SubscriptionActivated;
3702
3782
  /**
3703
- * Jurisdiction that taxes were calculated for.
3704
- * @maxLength 200
3783
+ * Subscription was canceled either by cancellation request with requested expiration date NOW or by payment provider.
3784
+ * If cancelled by payment provider subscription will be valid until the date calculated depending on how many cycles it was already paid for.
3705
3785
  */
3706
- jurisdiction?: string;
3707
- /** Type of jurisdiction that taxes were calculated for. */
3708
- jurisdictionType?: string;
3786
+ canceled?: V1SubscriptionCanceled;
3787
+ /** Subscription was updated. Currently the only possible change is valid_until date */
3788
+ updated?: V1SubscriptionUpdated;
3789
+ /** Subscription cycle has started. Currently the cycle starts when a payment is received. */
3790
+ cycleTriggered?: SubscriptionCycleTriggered;
3791
+ /** Offline subscription was marked as paid */
3792
+ markedAsPaid?: SubscriptionMarkedAsPaid;
3709
3793
  /**
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 }
3794
+ * Subscription cancellation for the future date was requested.
3795
+ * Subscription will stay in pending cancellation status until the date calculated depending on free trial and the next payment date.
3712
3796
  */
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;
3797
+ cancellationRequested?: SubscriptionCancellationRequested;
3798
+ /** Subscription and it's payment schedule (for recurring) was suspended */
3799
+ suspended?: SubscriptionSuspended;
3800
+ /** Previously suspended subscription and it's payment schedule (for recurring) was resumed */
3801
+ resumed?: V1SubscriptionResumed;
3802
+ /** Subscription expired according to valid_until expiration date. */
3803
+ expired?: SubscriptionExpired;
3804
+ /** Subscription initial purchase completed */
3805
+ initialPurchaseCompleted?: V1SubscriptionInitialPurchaseCompleted;
3720
3806
  }
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[];
3807
+ interface V1SubscriptionCreated {
3808
+ subscription?: V1Subscription;
3733
3809
  }
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;
3810
+ interface V1Subscription {
3743
3811
  /**
3744
- * the transaction id associated with this refund
3812
+ * ID of the subscription
3745
3813
  * @format GUID
3814
+ * @readonly
3746
3815
  */
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;
3755
- }
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"
3762
- }
3763
- /** @enumType */
3764
- type RefundReasonWithLiterals = RefundReason | 'DUPLICATE_CHARGE' | 'FRAUDULENT' | 'CUSTOMER_REQUEST' | 'PROVISION_FAILED' | 'OTHER';
3765
- interface ChangeSubscriptionRequest {
3816
+ id?: string;
3766
3817
  /**
3767
- * ID of the subscription to change
3818
+ * ID of the app which created the subscription
3768
3819
  * @format GUID
3769
3820
  */
3770
- subscriptionId?: string;
3771
- /** New product ID. Set to change the subscription plan. */
3772
- newProductId?: string | null;
3773
- /** New billing cycle duration. Set to change the billing cycle (e.g., monthly to yearly). */
3774
- newCycle?: Duration;
3821
+ wixAppId?: string;
3775
3822
  /**
3776
- * New quantity. Set to change the number of units (seats/licenses).
3777
- * @min 1
3823
+ * Instance ID of the Subscriptions app
3824
+ * @format GUID
3778
3825
  */
3779
- newQuantity?: number | null;
3780
- /** When the change takes effect. */
3781
- effectiveTime?: ChangeEffectiveTimeWithLiterals;
3782
- /** How to handle proration for immediate changes. Ignored for AT_NEXT_RENEWAL. */
3783
- prorationBehavior?: ProrationBehaviorWithLiterals;
3784
- /** Payment context for immediate changes without checkout flow. */
3785
- paymentContext?: ChangePaymentContext;
3786
- }
3787
- declare enum ChangeEffectiveTime {
3788
- UNKNOWN = "UNKNOWN",
3789
- /** Apply change immediately with proration */
3790
- IMMEDIATELY = "IMMEDIATELY",
3791
- /** Schedule change for the next billing cycle */
3792
- AT_NEXT_RENEWAL = "AT_NEXT_RENEWAL"
3793
- }
3794
- /** @enumType */
3795
- type ChangeEffectiveTimeWithLiterals = ChangeEffectiveTime | 'UNKNOWN' | 'IMMEDIATELY' | 'AT_NEXT_RENEWAL';
3796
- declare enum ProrationBehavior {
3797
- UNKNOWN = "UNKNOWN",
3798
- /** Credit unused time + charge new prorated price (default for upgrades) */
3799
- PRORATE_AND_CHARGE = "PRORATE_AND_CHARGE",
3800
- /** Credit unused time + refund to payment method (downgrades) */
3801
- PRORATE_AND_REFUND = "PRORATE_AND_REFUND",
3802
- /** Convert unused value to extra days, no financial transaction */
3803
- PRORATE_AND_EXTEND = "PRORATE_AND_EXTEND",
3804
- /** Immediate switch with no financial adjustment */
3805
- NO_PRORATION = "NO_PRORATION"
3806
- }
3807
- /** @enumType */
3808
- type ProrationBehaviorWithLiterals = ProrationBehavior | 'UNKNOWN' | 'PRORATE_AND_CHARGE' | 'PRORATE_AND_REFUND' | 'PRORATE_AND_EXTEND' | 'NO_PRORATION';
3809
- /** Payment context for immediate subscription changes without the checkout flow. */
3810
- interface ChangePaymentContext {
3811
- /** Payment settings override for this change */
3812
- paymentSettings?: PaymentSettings;
3813
- }
3814
- interface ChangeSubscriptionResponse {
3815
- /** Updated subscription */
3816
- subscription?: Subscription;
3817
- /** Proration calculation result. Present for immediate changes with proration. */
3818
- prorationResult?: ProrationResult;
3826
+ tenantId?: string;
3819
3827
  /**
3820
- * ID of the adjustment invoice created for the proration charge or refund.
3828
+ * ID of entity in app (e.g. a cart in stores/order in paid plans)
3821
3829
  * @format GUID
3822
3830
  */
3823
- adjustmentInvoiceId?: string | null;
3824
- }
3825
- /** Result of a proration calculation applied during a subscription change. */
3826
- interface ProrationResult {
3831
+ originEntityId?: string;
3832
+ /** Site member or a contact who bought the subscription */
3833
+ subscriber?: Subscriber;
3827
3834
  /**
3828
- * Credit amount for unused time on the current plan
3829
- * @format DECIMAL_VALUE
3835
+ * Wix Pay order ID, is empty for free subscriptions
3836
+ * @format GUID
3830
3837
  */
3831
- creditAmount?: string;
3838
+ wixPayOrderId?: string | null;
3832
3839
  /**
3833
- * Charge amount for the new plan's prorated price
3834
- * @format DECIMAL_VALUE
3840
+ * Subscription name (e.g. a product or subscription package name)
3841
+ * @maxLength 150
3835
3842
  */
3836
- chargeAmount?: string;
3843
+ name?: string;
3837
3844
  /**
3838
- * Net amount (charge minus credit). Positive means customer pays, negative means refund.
3839
- * @format DECIMAL_VALUE
3845
+ * Optional additional subscription description
3846
+ * @maxLength 500
3840
3847
  */
3841
- netAmount?: string;
3842
- /** Date when the proration was calculated */
3843
- prorationDate?: Date | null;
3844
- /** Remaining seconds in the current billing period at time of change */
3845
- remainingSeconds?: string;
3846
- /** Total seconds in the current billing cycle */
3847
- totalCycleSeconds?: string;
3848
+ description?: string;
3849
+ /** Amount to be paid for a single scheduled payment */
3850
+ price?: Money;
3851
+ /** True if the subscription is recurring, false for a single payment subscription */
3852
+ recurring?: boolean;
3853
+ /** Online (paid by subscriber using wix pay) or offline (need to manually mark as paid) */
3854
+ subscriptionType?: SubscriptionTypeWithLiterals;
3855
+ /** Active, expired, canceled, etc. */
3856
+ subscriptionStatus?: V1SubscriptionStatusEnumSubscriptionStatusWithLiterals;
3857
+ /** Subscription start date (may differ from creation date) */
3858
+ validFrom?: Date | null;
3859
+ /** Subscription expiration date */
3860
+ validUntil?: Date | null;
3861
+ /** Status of last payment associated with this subscription */
3862
+ lastPaymentStatus?: PaymentStatusEnumPaymentStatusWithLiterals;
3863
+ /** Payment schedule in the wix pay format. Exists for recurring subscriptions only. */
3864
+ billingProfile?: V2Subscription;
3865
+ /** Owner, member, etc. - present if subscription is canceled */
3866
+ cancellationInitiator?: CancellationInitiatorWithLiterals;
3867
+ /** Optional, present if subscription is canceled */
3868
+ cancellationReason?: string | null;
3869
+ /** Can be used for arbitrary app-specific map<string, string> data */
3870
+ externalData?: Record<string, string>;
3871
+ /** Date when subscription was created (not related to payment dates) */
3872
+ dateCreated?: Date | null;
3873
+ /** Restrictions on possible subscription actions. Default policy has all restrictions enabled. */
3874
+ policy?: SubscriptionPolicy;
3875
+ /** List of subscription suspension periods */
3876
+ suspensions?: Suspension[];
3877
+ /** Initial subscription expiration date that was calculated on the subscription purchase plus duration of suspensions */
3878
+ validUntilDateWithSuspensions?: Date | null;
3879
+ /** Duration of single payment subscription (instead of billing_profile) */
3880
+ singlePaymentDuration?: V1Duration;
3881
+ /** @format GUID */
3882
+ originInstanceId?: string | null;
3848
3883
  }
3849
- interface PreviewChangeSubscriptionRequest {
3884
+ interface Subscriber {
3850
3885
  /**
3851
- * ID of the subscription to preview the change for
3886
+ * Member or contact ID
3852
3887
  * @format GUID
3853
3888
  */
3854
- subscriptionId?: string;
3855
- /** New product ID. Set to preview a plan change. */
3856
- newProductId?: string | null;
3857
- /** New billing cycle duration. Set to preview a cycle change. */
3858
- newCycle?: Duration;
3859
- /**
3860
- * New quantity. Set to preview a quantity change.
3861
- * @min 1
3862
- */
3863
- newQuantity?: number | null;
3864
- /** When the change would take effect. */
3865
- effectiveTime?: ChangeEffectiveTimeWithLiterals;
3866
- /** How proration would be handled for immediate changes. */
3867
- prorationBehavior?: ProrationBehaviorWithLiterals;
3889
+ id?: string;
3890
+ /** Member or contact */
3891
+ identityType?: IdentityTypeWithLiterals;
3868
3892
  }
3869
- interface PreviewChangeSubscriptionResponse {
3870
- /** Summary of the current subscription state */
3871
- current?: SubscriptionChangeSummary;
3872
- /** Summary of the proposed subscription state after the change */
3873
- proposed?: SubscriptionChangeSummary;
3874
- /** Proration preview details. Present only for immediate changes. */
3875
- proration?: ProrationPreview;
3876
- /** Renewal preview. Present only for changes at next renewal. */
3877
- renewalPreview?: RenewalPreview;
3893
+ declare enum IdentityType {
3894
+ /** Identity type undefined */
3895
+ UNDEFINED = "UNDEFINED",
3896
+ /** Subscription is associated with a member ID */
3897
+ MEMBER = "MEMBER",
3898
+ /** Subscriptions is associated with a contact ID */
3899
+ CONTACT = "CONTACT"
3878
3900
  }
3879
- /** Summary of a subscription's state, used in change previews. */
3880
- interface SubscriptionChangeSummary {
3881
- /** Product ID */
3882
- productId?: string;
3883
- /** Product name */
3884
- productName?: string;
3885
- /** Billing cycle duration */
3886
- cycle?: Duration;
3887
- /** Number of units */
3888
- quantity?: number;
3889
- /**
3890
- * Price per unit
3891
- * @format DECIMAL_VALUE
3892
- */
3893
- pricePerUnit?: string;
3901
+ /** @enumType */
3902
+ type IdentityTypeWithLiterals = IdentityType | 'UNDEFINED' | 'MEMBER' | 'CONTACT';
3903
+ /** Price of a payment. Includes amount and currency. */
3904
+ interface Money {
3894
3905
  /**
3895
- * Total price (price_per_unit * quantity)
3906
+ * Monetary amount i.e. 3.99.
3896
3907
  * @format DECIMAL_VALUE
3897
3908
  */
3898
- totalPrice?: string;
3909
+ amount?: string;
3899
3910
  /**
3900
- * Currency code (ISO 4217)
3901
- * @format CURRENCY
3911
+ * Currency in ISO 4217 format i.e. USD.
3912
+ * @minLength 3
3913
+ * @maxLength 3
3902
3914
  */
3903
3915
  currency?: string;
3904
- /** Current billing period start */
3905
- periodStart?: Date | null;
3906
- /** Current billing period end */
3907
- periodEnd?: Date | null;
3908
3916
  }
3909
- /** Preview of proration amounts for a proposed subscription change. */
3910
- interface ProrationPreview {
3911
- /**
3912
- * Credit amount for unused time on the current plan
3913
- * @format DECIMAL_VALUE
3914
- */
3915
- creditAmount?: string;
3916
- /**
3917
- * Charge amount for the new plan's prorated price
3918
- * @format DECIMAL_VALUE
3919
- */
3920
- chargeAmount?: string;
3921
- /**
3922
- * Net amount (charge minus credit)
3923
- * @format DECIMAL_VALUE
3924
- */
3925
- netAmount?: string;
3926
- /**
3927
- * Tax amount on the net proration
3928
- * @format DECIMAL_VALUE
3929
- */
3930
- taxAmount?: string;
3931
- /**
3932
- * Total amount including tax
3933
- * @format DECIMAL_VALUE
3934
- */
3935
- totalAmount?: string;
3936
- /** Remaining seconds in the current billing period */
3937
- remainingSeconds?: string;
3938
- /** Total seconds in the current billing cycle */
3939
- totalCycleSeconds?: string;
3940
- /** New period end date. Present when proration_behavior is PRORATE_AND_EXTEND. */
3941
- newPeriodEnd?: Date | null;
3942
- /** Number of days added to the billing period. Present when proration_behavior is PRORATE_AND_EXTEND. */
3943
- daysAdded?: number;
3944
- /** The proration action that would be taken */
3945
- action?: ProrationActionWithLiterals;
3917
+ declare enum SubscriptionType {
3918
+ UNDEFINED = "UNDEFINED",
3919
+ /** Payments made by the subscriber */
3920
+ ONLINE = "ONLINE",
3921
+ /** Payments managed manually by the site owner */
3922
+ OFFLINE = "OFFLINE"
3946
3923
  }
3947
- declare enum ProrationAction {
3948
- UNKNOWN = "UNKNOWN",
3949
- /** Net charge to customer */
3950
- CHARGE = "CHARGE",
3951
- /** Net refund to customer */
3952
- REFUND = "REFUND",
3953
- /** Extend billing period instead of refund */
3954
- EXTEND_PERIOD = "EXTEND_PERIOD",
3955
- /** No financial change needed */
3956
- NO_CHANGE = "NO_CHANGE"
3924
+ /** @enumType */
3925
+ type SubscriptionTypeWithLiterals = SubscriptionType | 'UNDEFINED' | 'ONLINE' | 'OFFLINE';
3926
+ declare enum V1SubscriptionStatusEnumSubscriptionStatus {
3927
+ /** Subscription status undefined */
3928
+ UNDEFINED = "UNDEFINED",
3929
+ /** Subscription created, but hasn't been paid for yet. This status if filtered out in ListSubscriptions response by default. */
3930
+ DRAFT = "DRAFT",
3931
+ /** Subscription has been paid for, but the start date is in the future */
3932
+ PENDING = "PENDING",
3933
+ /** Subscription is active */
3934
+ ACTIVE = "ACTIVE",
3935
+ /** Subscription has expired */
3936
+ EXPIRED = "EXPIRED",
3937
+ /** Subscription has been canceled */
3938
+ CANCELED = "CANCELED",
3939
+ /** Subscription has been set to be canceled at a future date */
3940
+ PENDING_CANCELLATION = "PENDING_CANCELLATION",
3941
+ /** Subscription is suspended */
3942
+ SUSPENDED = "SUSPENDED"
3957
3943
  }
3958
3944
  /** @enumType */
3959
- type ProrationActionWithLiterals = ProrationAction | 'UNKNOWN' | 'CHARGE' | 'REFUND' | 'EXTEND_PERIOD' | 'NO_CHANGE';
3960
- /** Preview of what the next renewal will look like after a change. */
3961
- interface RenewalPreview {
3945
+ type V1SubscriptionStatusEnumSubscriptionStatusWithLiterals = V1SubscriptionStatusEnumSubscriptionStatus | 'UNDEFINED' | 'DRAFT' | 'PENDING' | 'ACTIVE' | 'EXPIRED' | 'CANCELED' | 'PENDING_CANCELLATION' | 'SUSPENDED';
3946
+ declare enum PaymentStatusEnumPaymentStatus {
3947
+ /** Payment status undefined */
3948
+ UNDEFINED = "UNDEFINED",
3949
+ /** Payment has been paid */
3950
+ PAID = "PAID",
3951
+ /** Payment has been refunded */
3952
+ REFUNDED = "REFUNDED",
3953
+ /** Recurring payment has failed */
3954
+ FAILED = "FAILED",
3955
+ /** Payment has not been paid */
3956
+ UNPAID = "UNPAID",
3957
+ /** Billing has been initialized, but actual charge is yet to be made. Can happen for free trial and PayPal */
3958
+ PENDING = "PENDING"
3959
+ }
3960
+ /** @enumType */
3961
+ type PaymentStatusEnumPaymentStatusWithLiterals = PaymentStatusEnumPaymentStatus | 'UNDEFINED' | 'PAID' | 'REFUNDED' | 'FAILED' | 'UNPAID' | 'PENDING';
3962
+ /**
3963
+ * Recurring payment is described by `frequency` (day, week, month) and `interval`.
3964
+ *
3965
+ * For example, to create a recurring payment every 14 days, just set `interval` to 14 and frequency to `DAY`.
3966
+ *
3967
+ * In some cases there should be a trial period for the order, after which payments start to occur.
3968
+ * Trial period is also defined as `frequency` and `interval` pair.
3969
+ *
3970
+ * So one can define a monthly 'subscription' with a 14 days trial period.
3971
+ */
3972
+ interface V2Subscription {
3973
+ /** frequency of recurring payment (required) */
3974
+ frequency?: SubscriptionFrequencyWithLiterals;
3975
+ /** interval of recurring payment (required) */
3976
+ interval?: number;
3977
+ /** trial period for recurring payment (optional) */
3978
+ trial?: SubscriptionTrialPeriod;
3962
3979
  /**
3963
- * New price per unit at next renewal
3964
- * @format DECIMAL_VALUE
3980
+ * how many billing cycles should be done before subscription finishes
3981
+ * (optional, 0 by default means endless subscription)
3965
3982
  */
3966
- newPrice?: string;
3983
+ billingCycles?: number;
3967
3984
  /**
3968
- * New total at next renewal (price * quantity)
3969
- * @format DECIMAL_VALUE
3985
+ * date in the future or in the past when the first billing cycle begins
3986
+ * (the first off-session payment is performed when it ends)
3970
3987
  */
3971
- newTotal?: string;
3972
- /** Date of the next renewal */
3973
- nextRenewalDate?: Date | null;
3988
+ firstCycleStartDate?: Date | null;
3974
3989
  }
3975
- interface CancelPendingChangeRequest {
3976
- /**
3977
- * ID of the subscription to cancel the pending change for
3978
- * @format GUID
3979
- */
3980
- subscriptionId?: string;
3990
+ /** Frequency unit of recurring payment */
3991
+ declare enum SubscriptionFrequency {
3992
+ UNDEFINED = "UNDEFINED",
3993
+ DAY = "DAY",
3994
+ WEEK = "WEEK",
3995
+ MONTH = "MONTH",
3996
+ YEAR = "YEAR"
3981
3997
  }
3982
- interface CancelPendingChangeResponse {
3983
- /** Updated subscription with cleared pending data */
3984
- subscription?: Subscription;
3998
+ /** @enumType */
3999
+ type SubscriptionFrequencyWithLiterals = SubscriptionFrequency | 'UNDEFINED' | 'DAY' | 'WEEK' | 'MONTH' | 'YEAR';
4000
+ /** Trial period of subscription */
4001
+ interface SubscriptionTrialPeriod {
4002
+ /** trial period in units (required) */
4003
+ period?: number;
4004
+ /** units in which trial period is described (optional, default DAY) */
4005
+ unit?: SubscriptionFrequencyWithLiterals;
3985
4006
  }
3986
- interface Task {
3987
- key?: TaskKey;
3988
- executeAt?: Date | null;
3989
- payload?: string | null;
4007
+ declare enum CancellationInitiator {
4008
+ /** Cancellation initiator undefined */
4009
+ UNDEFINED = "UNDEFINED",
4010
+ /** Subscription was canceled by site owner (default if canceled by user or service identity) */
4011
+ OWNER = "OWNER",
4012
+ /** Subscription was canceled by member (default if canceled by member identity) */
4013
+ MEMBER = "MEMBER",
4014
+ /** Subscription was canceled because of payment failure */
4015
+ PAYMENT_FAILURE = "PAYMENT_FAILURE",
4016
+ /** Subscription was canceled because of payment setup failure */
4017
+ SETUP_FAILURE = "SETUP_FAILURE"
3990
4018
  }
3991
- interface TaskKey {
3992
- appId?: string;
3993
- instanceId?: string;
3994
- subjectId?: string | null;
4019
+ /** @enumType */
4020
+ type CancellationInitiatorWithLiterals = CancellationInitiator | 'UNDEFINED' | 'OWNER' | 'MEMBER' | 'PAYMENT_FAILURE' | 'SETUP_FAILURE';
4021
+ interface SubscriptionPolicy {
4022
+ /** Subscription expiration date can be updated */
4023
+ expiryDateChangeable?: boolean;
4024
+ /** Subscription can be cancelled by the member who bought it (when memberId == subscriberId) */
4025
+ cancellableByMember?: boolean;
4026
+ /** Subscription expiration date on cancellation can be set to next payment date */
4027
+ cancellableAtNextPaymentCycle?: boolean;
3995
4028
  }
3996
- interface TaskAction extends TaskActionActionOneOf {
3997
- complete?: Complete;
3998
- cancel?: Cancel;
3999
- reschedule?: Reschedule;
4029
+ interface Suspension {
4030
+ status?: StatusWithLiterals;
4031
+ /** Beginning of the suspended period */
4032
+ startsAt?: Date | null;
4033
+ /** End of the suspended period */
4034
+ endsAt?: Date | null;
4000
4035
  }
4001
- /** @oneof */
4002
- interface TaskActionActionOneOf {
4003
- complete?: Complete;
4004
- cancel?: Cancel;
4005
- reschedule?: Reschedule;
4036
+ declare enum Status {
4037
+ UNDEFINED = "UNDEFINED",
4038
+ ACTIVE = "ACTIVE",
4039
+ ENDED = "ENDED"
4006
4040
  }
4007
- interface Complete {
4041
+ /** @enumType */
4042
+ type StatusWithLiterals = Status | 'UNDEFINED' | 'ACTIVE' | 'ENDED';
4043
+ /** A duration expressed in amount of time units. */
4044
+ interface V1Duration {
4045
+ /** Amount of the unit */
4046
+ amount?: number;
4047
+ /** Day, Week, Month, Year. */
4048
+ unit?: SubscriptionFrequencyWithLiterals;
4008
4049
  }
4009
- interface Cancel {
4050
+ interface V1SubscriptionActivated {
4051
+ subscription?: V1Subscription;
4010
4052
  }
4011
- interface Reschedule {
4012
- executeAt?: Date | null;
4013
- payload?: string | null;
4053
+ interface V1SubscriptionCanceled {
4054
+ subscription?: V1Subscription;
4014
4055
  }
4015
- interface V1SubscriptionEvent extends V1SubscriptionEventEventOneOf {
4016
- /** A subscriptions was created */
4017
- created?: V1SubscriptionCreated;
4018
- /** Subscription is considered active and will be visible to site owners and members */
4019
- activated?: V1SubscriptionActivated;
4020
- /**
4021
- * Subscription was canceled either by cancellation request with requested expiration date NOW or by payment provider.
4022
- * If cancelled by payment provider subscription will be valid until the date calculated depending on how many cycles it was already paid for.
4023
- */
4024
- canceled?: V1SubscriptionCanceled;
4025
- /** Subscription was updated. Currently the only possible change is valid_until date */
4026
- updated?: V1SubscriptionUpdated;
4027
- /** Subscription cycle has started. Currently the cycle starts when a payment is received. */
4028
- cycleTriggered?: SubscriptionCycleTriggered;
4029
- /** Offline subscription was marked as paid */
4030
- markedAsPaid?: SubscriptionMarkedAsPaid;
4056
+ interface V1SubscriptionUpdated {
4057
+ subscription?: V1Subscription;
4058
+ }
4059
+ interface SubscriptionCycleTriggered {
4060
+ subscription?: V1Subscription;
4061
+ billingCycle?: number;
4031
4062
  /**
4032
- * Subscription cancellation for the future date was requested.
4033
- * Subscription will stay in pending cancellation status until the date calculated depending on free trial and the next payment date.
4063
+ * Wix Pay transaction id, optional. Exists if event was triggered by a payment.
4064
+ * @format GUID
4034
4065
  */
4035
- cancellationRequested?: SubscriptionCancellationRequested;
4036
- /** Subscription and it's payment schedule (for recurring) was suspended */
4037
- suspended?: SubscriptionSuspended;
4038
- /** Previously suspended subscription and it's payment schedule (for recurring) was resumed */
4039
- resumed?: V1SubscriptionResumed;
4040
- /** Subscription expired according to valid_until expiration date. */
4041
- expired?: SubscriptionExpired;
4042
- /** Subscription initial purchase completed */
4043
- initialPurchaseCompleted?: V1SubscriptionInitialPurchaseCompleted;
4066
+ transactionId?: string | null;
4067
+ }
4068
+ interface SubscriptionMarkedAsPaid {
4069
+ subscription?: V1Subscription;
4070
+ /** A number indicating which payment (cycle) was marked as paid. For recurring subscriptions only. */
4071
+ billingCycle?: number | null;
4072
+ }
4073
+ interface SubscriptionCancellationRequested {
4074
+ subscription?: V1Subscription;
4075
+ }
4076
+ interface SubscriptionSuspended {
4077
+ subscription?: V1Subscription;
4078
+ }
4079
+ interface V1SubscriptionResumed {
4080
+ subscription?: V1Subscription;
4081
+ }
4082
+ interface SubscriptionExpired {
4083
+ subscription?: V1Subscription;
4084
+ }
4085
+ interface V1SubscriptionInitialPurchaseCompleted {
4086
+ subscription?: V1Subscription;
4087
+ }
4088
+ interface CreateSubscriptionInStateRequest extends CreateSubscriptionInStateRequestModeOneOf {
4089
+ activeSubscription?: CreateSubscriptionRequest;
4044
4090
  }
4045
4091
  /** @oneof */
4046
- interface V1SubscriptionEventEventOneOf {
4047
- /** A subscriptions was created */
4048
- created?: V1SubscriptionCreated;
4049
- /** Subscription is considered active and will be visible to site owners and members */
4050
- activated?: V1SubscriptionActivated;
4051
- /**
4052
- * Subscription was canceled either by cancellation request with requested expiration date NOW or by payment provider.
4053
- * If cancelled by payment provider subscription will be valid until the date calculated depending on how many cycles it was already paid for.
4054
- */
4055
- canceled?: V1SubscriptionCanceled;
4056
- /** Subscription was updated. Currently the only possible change is valid_until date */
4057
- updated?: V1SubscriptionUpdated;
4058
- /** Subscription cycle has started. Currently the cycle starts when a payment is received. */
4059
- cycleTriggered?: SubscriptionCycleTriggered;
4060
- /** Offline subscription was marked as paid */
4061
- markedAsPaid?: SubscriptionMarkedAsPaid;
4062
- /**
4063
- * Subscription cancellation for the future date was requested.
4064
- * Subscription will stay in pending cancellation status until the date calculated depending on free trial and the next payment date.
4065
- */
4066
- cancellationRequested?: SubscriptionCancellationRequested;
4067
- /** Subscription and it's payment schedule (for recurring) was suspended */
4068
- suspended?: SubscriptionSuspended;
4069
- /** Previously suspended subscription and it's payment schedule (for recurring) was resumed */
4070
- resumed?: V1SubscriptionResumed;
4071
- /** Subscription expired according to valid_until expiration date. */
4072
- expired?: SubscriptionExpired;
4073
- /** Subscription initial purchase completed */
4074
- initialPurchaseCompleted?: V1SubscriptionInitialPurchaseCompleted;
4092
+ interface CreateSubscriptionInStateRequestModeOneOf {
4093
+ activeSubscription?: CreateSubscriptionRequest;
4075
4094
  }
4076
- interface V1SubscriptionCreated {
4077
- subscription?: V1Subscription;
4095
+ interface CreateSubscriptionInStateResponse {
4096
+ /** @format GUID */
4097
+ subscriptionId?: string;
4078
4098
  }
4079
- interface V1Subscription {
4080
- /**
4081
- * ID of the subscription
4082
- * @format GUID
4083
- * @readonly
4084
- */
4099
+ interface PayCycleRequest {
4100
+ /** @format GUID */
4101
+ subscriptionId?: string;
4102
+ paymentTestMode?: PaymentTestModeWithLiterals;
4103
+ /** @format GUID */
4104
+ tenantId?: string;
4105
+ }
4106
+ declare enum PaymentTestMode {
4107
+ REGULAR = "REGULAR",
4108
+ FAIL_TECHNICAL = "FAIL_TECHNICAL",
4109
+ FAIL_DECLINE = "FAIL_DECLINE",
4110
+ FAIL_RETRYABLE_DECLINE = "FAIL_RETRYABLE_DECLINE"
4111
+ }
4112
+ /** @enumType */
4113
+ type PaymentTestModeWithLiterals = PaymentTestMode | 'REGULAR' | 'FAIL_TECHNICAL' | 'FAIL_DECLINE' | 'FAIL_RETRYABLE_DECLINE';
4114
+ interface PayCycleResponse {
4115
+ /** @format GUID */
4116
+ invoiceId?: string;
4117
+ /** @format GUID */
4118
+ paymentOrderId?: string | null;
4119
+ subscription?: Subscription;
4120
+ }
4121
+ interface GetFullSubscriptionDataRequest {
4122
+ /** @format GUID */
4085
4123
  id?: string;
4124
+ }
4125
+ interface GetFullSubscriptionDataResponse {
4126
+ subscription?: Subscription;
4127
+ internalSubscriptionData?: InternalSubscriptionData;
4128
+ }
4129
+ interface InternalSubscriptionData {
4130
+ /** @format GUID */
4131
+ originInstanceId?: string;
4132
+ source?: string | null;
4133
+ billingType?: string;
4134
+ isOneTime?: boolean;
4135
+ migrationDetails?: MigrationDetails;
4136
+ pausePaidDuration?: string | null;
4137
+ authorizationPaymentData?: PaymentData;
4138
+ currentCyclePausePeriods?: PausePeriod[];
4139
+ }
4140
+ interface MigrationDetails {
4141
+ /** system (application) where the Subscription has been created */
4142
+ originSystem?: string;
4143
+ /** date when the Subscription started to be managed in BASS */
4144
+ shiftManagementDate?: Date | null;
4145
+ }
4146
+ interface PausePeriod {
4147
+ startDate?: Date | null;
4148
+ endDate?: Date | null;
4149
+ }
4150
+ interface GetSubscriptionAndInternalDataRequest {
4151
+ /** @format GUID */
4152
+ subscriptionId?: string;
4153
+ /** @format GUID */
4154
+ tenantId?: string;
4155
+ }
4156
+ interface GetSubscriptionAndInternalDataResponse {
4157
+ subscription?: Subscription;
4158
+ internalSubscriptionData?: InternalSubscriptionData;
4159
+ }
4160
+ interface SearchSubscriptionRequest {
4161
+ /** @format GUID */
4162
+ id?: string;
4163
+ /** @format GUID */
4164
+ tenantId?: string;
4165
+ }
4166
+ interface SearchSubscriptionResponse {
4167
+ subscription?: Subscription;
4168
+ }
4169
+ interface UpdatePausePaidDurationRequest {
4170
+ /** @format GUID */
4171
+ subscriptionId?: string;
4086
4172
  /**
4087
- * ID of the app which created the subscription
4088
- * @format GUID
4089
- */
4090
- wixAppId?: string;
4091
- /**
4092
- * Instance ID of the Subscriptions app
4093
- * @format GUID
4173
+ * @min 1
4174
+ * @max 10000000
4094
4175
  */
4176
+ pausePaidDurationSeconds?: string;
4177
+ /** @format GUID */
4178
+ tenantId?: string;
4179
+ }
4180
+ interface UpdatePausePaidDurationResponse {
4181
+ }
4182
+ interface UpdateStatusRequest {
4183
+ /** @format GUID */
4184
+ subscriptionId?: string;
4185
+ /** @format GUID */
4186
+ tenantId?: string;
4187
+ status?: SubscriptionStatusEnumSubscriptionStatusWithLiterals;
4188
+ }
4189
+ interface UpdateStatusResponse {
4190
+ subscription?: Subscription;
4191
+ }
4192
+ interface UpdatePaymentStatusRequest {
4193
+ /** @format GUID */
4194
+ subscriptionId?: string;
4195
+ /** @format GUID */
4196
+ tenantId?: string;
4197
+ paymentStatus?: PaymentStatusWithLiterals;
4198
+ }
4199
+ interface UpdatePaymentStatusResponse {
4200
+ subscription?: Subscription;
4201
+ }
4202
+ interface RemoveCancellationInfoRequest {
4203
+ /** @format GUID */
4204
+ subscriptionId?: string;
4205
+ /** @format GUID */
4206
+ tenantId?: string;
4207
+ }
4208
+ interface RemoveCancellationInfoResponse {
4209
+ subscription?: Subscription;
4210
+ }
4211
+ interface RemovePauseInfoRequest {
4212
+ /** @format GUID */
4213
+ subscriptionId?: string;
4214
+ /** @format GUID */
4215
+ tenantId?: string;
4216
+ }
4217
+ interface RemovePauseInfoResponse {
4218
+ subscription?: Subscription;
4219
+ }
4220
+ interface ReviveSubscriptionRequest {
4221
+ /** @format GUID */
4095
4222
  tenantId?: string;
4223
+ /** @format GUID */
4224
+ subscriptionId?: string;
4225
+ revivePolicy?: RevivePolicyWithLiterals;
4226
+ isTestRun?: boolean;
4227
+ }
4228
+ declare enum RevivePolicy {
4229
+ SIMPLE = "SIMPLE",
4230
+ RESUME = "RESUME"
4231
+ }
4232
+ /** @enumType */
4233
+ type RevivePolicyWithLiterals = RevivePolicy | 'SIMPLE' | 'RESUME';
4234
+ interface ReviveSubscriptionResponse {
4235
+ subscription?: Subscription;
4236
+ }
4237
+ interface ConvertSapiRequest {
4238
+ /** @format GUID */
4239
+ subscriptionId?: string;
4240
+ }
4241
+ interface ConvertSapiResponse {
4242
+ subscription?: Subscription;
4243
+ }
4244
+ interface GetSubscriptionInvoicesRequest {
4245
+ /** @format GUID */
4246
+ id?: string;
4247
+ }
4248
+ interface GetSubscriptionInvoicesResponse {
4249
+ invoices?: SubscriptionInvoice[];
4250
+ }
4251
+ interface SubscriptionInvoice {
4252
+ /** @format GUID */
4253
+ id?: string;
4254
+ subscriptionCycle?: number;
4255
+ createdDate?: Date | null;
4256
+ }
4257
+ interface FinishFreeTrialNowRequest {
4258
+ /** @format GUID */
4259
+ subscriptionId?: string;
4260
+ /** @format GUID */
4261
+ tenantId?: string;
4262
+ }
4263
+ interface FinishFreeTrialNowResponse {
4264
+ subscription?: Subscription;
4265
+ }
4266
+ interface FixSubscriptionTimeCapsuleTasksRequest {
4267
+ /** @format GUID */
4268
+ subscriptionId?: string;
4269
+ /** @format GUID */
4270
+ tenantId?: string;
4271
+ }
4272
+ interface FixSubscriptionTimeCapsuleTasksResponse {
4273
+ }
4274
+ interface SendTimeCapsuleTaskCanceledBIRequest {
4275
+ /** @format GUID */
4276
+ tenantId?: string;
4277
+ /** @format GUID */
4278
+ subscriptionId?: string;
4279
+ /** @minLength 1 */
4280
+ taskType?: string;
4281
+ }
4282
+ interface ScheduleTimeCapsuleTaskRequest {
4283
+ /** @format GUID */
4284
+ subscriptionId?: string;
4285
+ /** @minLength 1 */
4286
+ taskType?: string;
4287
+ executionTime?: Date | null;
4288
+ /** @format GUID */
4289
+ tenantId?: string;
4290
+ }
4291
+ interface CancelTimeCapsuleTaskRequest {
4292
+ /** @format GUID */
4293
+ tenantId?: string;
4294
+ /** @format GUID */
4295
+ subscriptionId?: string;
4296
+ /** @minLength 1 */
4297
+ taskType?: string;
4298
+ }
4299
+ interface UpdateFullSubscriptionRequest {
4300
+ /** @format GUID */
4301
+ tenantId?: string;
4302
+ subscription?: Subscription;
4303
+ }
4304
+ interface UpdateFullSubscriptionResponse {
4305
+ subscription?: Subscription;
4306
+ }
4307
+ interface PatchSubscriptionRequest {
4096
4308
  /**
4097
- * ID of entity in app (e.g. a cart in stores/order in paid plans)
4309
+ * Tenant ID (instance ID) of the subscription
4098
4310
  * @format GUID
4099
4311
  */
4100
- originEntityId?: string;
4101
- /** Site member or a contact who bought the subscription */
4102
- subscriber?: Subscriber;
4312
+ tenantId?: string;
4103
4313
  /**
4104
- * Wix Pay order ID, is empty for free subscriptions
4314
+ * Subscription ID to patch
4105
4315
  * @format GUID
4106
4316
  */
4107
- wixPayOrderId?: string | null;
4108
- /**
4109
- * Subscription name (e.g. a product or subscription package name)
4110
- * @maxLength 150
4111
- */
4112
- name?: string;
4113
- /**
4114
- * Optional additional subscription description
4115
- * @maxLength 500
4116
- */
4117
- description?: string;
4118
- /** Amount to be paid for a single scheduled payment */
4119
- price?: Money;
4120
- /** True if the subscription is recurring, false for a single payment subscription */
4121
- recurring?: boolean;
4122
- /** Online (paid by subscriber using wix pay) or offline (need to manually mark as paid) */
4123
- subscriptionType?: SubscriptionTypeWithLiterals;
4124
- /** Active, expired, canceled, etc. */
4125
- subscriptionStatus?: V1SubscriptionStatusEnumSubscriptionStatusWithLiterals;
4126
- /** Subscription start date (may differ from creation date) */
4127
- validFrom?: Date | null;
4128
- /** Subscription expiration date */
4129
- validUntil?: Date | null;
4130
- /** Status of last payment associated with this subscription */
4131
- lastPaymentStatus?: PaymentStatusEnumPaymentStatusWithLiterals;
4132
- /** Payment schedule in the wix pay format. Exists for recurring subscriptions only. */
4133
- billingProfile?: V2Subscription;
4134
- /** Owner, member, etc. - present if subscription is canceled */
4135
- cancellationInitiator?: CancellationInitiatorWithLiterals;
4136
- /** Optional, present if subscription is canceled */
4137
- cancellationReason?: string | null;
4138
- /** Can be used for arbitrary app-specific map<string, string> data */
4139
- externalData?: Record<string, string>;
4140
- /** Date when subscription was created (not related to payment dates) */
4141
- dateCreated?: Date | null;
4142
- /** Restrictions on possible subscription actions. Default policy has all restrictions enabled. */
4143
- policy?: SubscriptionPolicy;
4144
- /** List of subscription suspension periods */
4145
- suspensions?: Suspension[];
4146
- /** Initial subscription expiration date that was calculated on the subscription purchase plus duration of suspensions */
4147
- validUntilDateWithSuspensions?: Date | null;
4148
- /** Duration of single payment subscription (instead of billing_profile) */
4149
- singlePaymentDuration?: V1Duration;
4317
+ subscriptionId?: string;
4318
+ /** Partial subscription with updated values */
4319
+ subscription?: Subscription;
4320
+ /** Fields to update (e.g., "name", "billing_settings.collection_method") */
4321
+ fieldMask?: string[];
4322
+ }
4323
+ interface PatchSubscriptionResponse {
4324
+ /** The updated subscription */
4325
+ subscription?: Subscription;
4326
+ }
4327
+ interface UpdateSubscriptionInvoiceCycleRequest {
4150
4328
  /** @format GUID */
4151
- originInstanceId?: string | null;
4329
+ subscriptionId?: string;
4330
+ /** @format GUID */
4331
+ tenantId?: string;
4332
+ /** @format GUID */
4333
+ invoiceId?: string;
4334
+ subscriptionCycle?: number;
4152
4335
  }
4153
- interface Subscriber {
4154
- /**
4155
- * Member or contact ID
4156
- * @format GUID
4157
- */
4158
- id?: string;
4159
- /** Member or contact */
4160
- identityType?: IdentityTypeWithLiterals;
4336
+ interface UpdateSubscriptionInvoiceCycleResponse {
4337
+ subscriptionInvoice?: SubscriptionInvoice;
4161
4338
  }
4162
- declare enum IdentityType {
4163
- /** Identity type undefined */
4164
- UNDEFINED = "UNDEFINED",
4165
- /** Subscription is associated with a member ID */
4166
- MEMBER = "MEMBER",
4167
- /** Subscriptions is associated with a contact ID */
4168
- CONTACT = "CONTACT"
4339
+ interface AddPausePeriodRequest {
4340
+ /** @format GUID */
4341
+ tenantId?: string;
4342
+ /** @format GUID */
4343
+ subscriptionId?: string;
4344
+ pauseStartDate?: Date | null;
4345
+ pauseEndDate?: Date | null;
4169
4346
  }
4170
- /** @enumType */
4171
- type IdentityTypeWithLiterals = IdentityType | 'UNDEFINED' | 'MEMBER' | 'CONTACT';
4172
- /** Price of a payment. Includes amount and currency. */
4173
- interface Money {
4174
- /**
4175
- * Monetary amount i.e. 3.99.
4176
- * @format DECIMAL_VALUE
4177
- */
4178
- amount?: string;
4179
- /**
4180
- * Currency in ISO 4217 format i.e. USD.
4181
- * @minLength 3
4182
- * @maxLength 3
4183
- */
4184
- currency?: string;
4347
+ interface AddPausePeriodResponse {
4348
+ subscription?: Subscription;
4349
+ }
4350
+ interface RunTimeCapsuleTaskNowRequest {
4351
+ /** @format GUID */
4352
+ tenantId?: string;
4353
+ /** @format GUID */
4354
+ subscriptionId?: string;
4355
+ /** @minLength 1 */
4356
+ taskType?: string;
4357
+ }
4358
+ interface CreateRecurringInvoiceBORequest {
4359
+ /** @format GUID */
4360
+ subscriptionId?: string;
4361
+ /** @format GUID */
4362
+ tenantId?: string;
4363
+ /** @min 2 */
4364
+ cycleNumber?: number;
4365
+ }
4366
+ interface CreateRecurringInvoiceBOResponse {
4367
+ invoiceId?: string;
4368
+ }
4369
+ interface SetShiftingDataRequest {
4370
+ /** @format GUID */
4371
+ subscriptionId?: string;
4372
+ /** @format GUID */
4373
+ tenantId?: string;
4374
+ isBassManaged?: boolean;
4375
+ shiftManagementDate?: Date | null;
4376
+ }
4377
+ interface SetShiftingDataResponse {
4378
+ subscription?: Subscription;
4379
+ }
4380
+ interface FixSubscriptionInvoicesRequest extends FixSubscriptionInvoicesRequestModeOneOf {
4381
+ attachInvoice?: AttachInvoice;
4382
+ detachInvoice?: DetachInvoice;
4383
+ /** @format GUID */
4384
+ tenantId?: string;
4385
+ /** @format GUID */
4386
+ subscriptionId?: string;
4387
+ }
4388
+ /** @oneof */
4389
+ interface FixSubscriptionInvoicesRequestModeOneOf {
4390
+ attachInvoice?: AttachInvoice;
4391
+ detachInvoice?: DetachInvoice;
4392
+ }
4393
+ interface AttachInvoice {
4394
+ /** @format GUID */
4395
+ invoiceId?: string;
4396
+ }
4397
+ interface DetachInvoice {
4398
+ /** @format GUID */
4399
+ invoiceId?: string;
4400
+ }
4401
+ interface FixSubscriptionInvoicesResponse {
4402
+ invoices?: SubscriptionInvoice[];
4403
+ }
4404
+ interface RestoreDraftSubscriptionRequest {
4405
+ /** @format GUID */
4406
+ tenantId?: string;
4407
+ /** @format GUID */
4408
+ subscriptionId?: string;
4409
+ }
4410
+ interface RestoreDraftSubscriptionResponse {
4411
+ subscription?: Subscription;
4412
+ }
4413
+ interface DeleteDraftSubscriptionRequest {
4414
+ /** @format GUID */
4415
+ tenantId?: string;
4416
+ /** @format GUID */
4417
+ subscriptionId?: string;
4418
+ }
4419
+ interface DeleteDraftSubscriptionResponse {
4420
+ subscription?: Subscription;
4421
+ }
4422
+ interface DeleteSubscriptionBORequest {
4423
+ /** @format GUID */
4424
+ tenantId?: string;
4425
+ /** @format GUID */
4426
+ subscriptionId?: string;
4185
4427
  }
4186
- declare enum SubscriptionType {
4187
- UNDEFINED = "UNDEFINED",
4188
- /** Payments made by the subscriber */
4189
- ONLINE = "ONLINE",
4190
- /** Payments managed manually by the site owner */
4191
- OFFLINE = "OFFLINE"
4428
+ interface DeleteSubscriptionBOResponse {
4429
+ subscription?: Subscription;
4192
4430
  }
4193
- /** @enumType */
4194
- type SubscriptionTypeWithLiterals = SubscriptionType | 'UNDEFINED' | 'ONLINE' | 'OFFLINE';
4195
- declare enum V1SubscriptionStatusEnumSubscriptionStatus {
4196
- /** Subscription status undefined */
4197
- UNDEFINED = "UNDEFINED",
4198
- /** Subscription created, but hasn't been paid for yet. This status if filtered out in ListSubscriptions response by default. */
4199
- DRAFT = "DRAFT",
4200
- /** Subscription has been paid for, but the start date is in the future */
4201
- PENDING = "PENDING",
4202
- /** Subscription is active */
4203
- ACTIVE = "ACTIVE",
4204
- /** Subscription has expired */
4205
- EXPIRED = "EXPIRED",
4206
- /** Subscription has been canceled */
4207
- CANCELED = "CANCELED",
4208
- /** Subscription has been set to be canceled at a future date */
4209
- PENDING_CANCELLATION = "PENDING_CANCELLATION",
4210
- /** Subscription is suspended */
4211
- SUSPENDED = "SUSPENDED"
4431
+ interface CancelSubscriptionBORequest {
4432
+ /** @format GUID */
4433
+ tenantId?: string;
4434
+ /** @format GUID */
4435
+ subscriptionId?: string;
4436
+ initiator?: ActionInitiatorWithLiterals;
4437
+ reason?: string | null;
4212
4438
  }
4213
- /** @enumType */
4214
- type V1SubscriptionStatusEnumSubscriptionStatusWithLiterals = V1SubscriptionStatusEnumSubscriptionStatus | 'UNDEFINED' | 'DRAFT' | 'PENDING' | 'ACTIVE' | 'EXPIRED' | 'CANCELED' | 'PENDING_CANCELLATION' | 'SUSPENDED';
4215
- declare enum PaymentStatusEnumPaymentStatus {
4216
- /** Payment status undefined */
4217
- UNDEFINED = "UNDEFINED",
4218
- /** Payment has been paid */
4219
- PAID = "PAID",
4220
- /** Payment has been refunded */
4221
- REFUNDED = "REFUNDED",
4222
- /** Recurring payment has failed */
4223
- FAILED = "FAILED",
4224
- /** Payment has not been paid */
4225
- UNPAID = "UNPAID",
4226
- /** Billing has been initialized, but actual charge is yet to be made. Can happen for free trial and PayPal */
4227
- PENDING = "PENDING"
4439
+ interface CancelSubscriptionBOResponse {
4440
+ subscription?: Subscription;
4228
4441
  }
4229
- /** @enumType */
4230
- type PaymentStatusEnumPaymentStatusWithLiterals = PaymentStatusEnumPaymentStatus | 'UNDEFINED' | 'PAID' | 'REFUNDED' | 'FAILED' | 'UNPAID' | 'PENDING';
4231
- /**
4232
- * Recurring payment is described by `frequency` (day, week, month) and `interval`.
4233
- *
4234
- * For example, to create a recurring payment every 14 days, just set `interval` to 14 and frequency to `DAY`.
4235
- *
4236
- * In some cases there should be a trial period for the order, after which payments start to occur.
4237
- * Trial period is also defined as `frequency` and `interval` pair.
4238
- *
4239
- * So one can define a monthly 'subscription' with a 14 days trial period.
4240
- */
4241
- interface V2Subscription {
4242
- /** frequency of recurring payment (required) */
4243
- frequency?: SubscriptionFrequencyWithLiterals;
4244
- /** interval of recurring payment (required) */
4245
- interval?: number;
4246
- /** trial period for recurring payment (optional) */
4247
- trial?: SubscriptionTrialPeriod;
4248
- /**
4249
- * how many billing cycles should be done before subscription finishes
4250
- * (optional, 0 by default means endless subscription)
4251
- */
4252
- billingCycles?: number;
4253
- /**
4254
- * date in the future or in the past when the first billing cycle begins
4255
- * (the first off-session payment is performed when it ends)
4256
- */
4257
- firstCycleStartDate?: Date | null;
4442
+ interface UpdatePaymentMethodBORequest {
4443
+ /** @format GUID */
4444
+ tenantId?: string;
4445
+ /** @format GUID */
4446
+ subscriptionId?: string;
4447
+ /** @format GUID */
4448
+ paymentMethodId?: string;
4258
4449
  }
4259
- /** Frequency unit of recurring payment */
4260
- declare enum SubscriptionFrequency {
4261
- UNDEFINED = "UNDEFINED",
4262
- DAY = "DAY",
4263
- WEEK = "WEEK",
4264
- MONTH = "MONTH",
4265
- YEAR = "YEAR"
4450
+ interface UpdatePaymentMethodBOResponse {
4451
+ subscription?: Subscription;
4266
4452
  }
4267
- /** @enumType */
4268
- type SubscriptionFrequencyWithLiterals = SubscriptionFrequency | 'UNDEFINED' | 'DAY' | 'WEEK' | 'MONTH' | 'YEAR';
4269
- /** Trial period of subscription */
4270
- interface SubscriptionTrialPeriod {
4271
- /** trial period in units (required) */
4272
- period?: number;
4273
- /** units in which trial period is described (optional, default DAY) */
4274
- unit?: SubscriptionFrequencyWithLiterals;
4453
+ interface SendSubscriptionActionEventBORequest extends SendSubscriptionActionEventBORequestEventOneOf {
4454
+ billingCycleStarted?: SubscriptionBillingCycleStarted;
4455
+ /** @format GUID */
4456
+ tenantId?: string;
4457
+ /** @format GUID */
4458
+ subscriptionId?: string;
4275
4459
  }
4276
- declare enum CancellationInitiator {
4277
- /** Cancellation initiator undefined */
4278
- UNDEFINED = "UNDEFINED",
4279
- /** Subscription was canceled by site owner (default if canceled by user or service identity) */
4280
- OWNER = "OWNER",
4281
- /** Subscription was canceled by member (default if canceled by member identity) */
4282
- MEMBER = "MEMBER",
4283
- /** Subscription was canceled because of payment failure */
4284
- PAYMENT_FAILURE = "PAYMENT_FAILURE",
4285
- /** Subscription was canceled because of payment setup failure */
4286
- SETUP_FAILURE = "SETUP_FAILURE"
4460
+ /** @oneof */
4461
+ interface SendSubscriptionActionEventBORequestEventOneOf {
4462
+ billingCycleStarted?: SubscriptionBillingCycleStarted;
4287
4463
  }
4288
- /** @enumType */
4289
- type CancellationInitiatorWithLiterals = CancellationInitiator | 'UNDEFINED' | 'OWNER' | 'MEMBER' | 'PAYMENT_FAILURE' | 'SETUP_FAILURE';
4290
- interface SubscriptionPolicy {
4291
- /** Subscription expiration date can be updated */
4292
- expiryDateChangeable?: boolean;
4293
- /** Subscription can be cancelled by the member who bought it (when memberId == subscriberId) */
4294
- cancellableByMember?: boolean;
4295
- /** Subscription expiration date on cancellation can be set to next payment date */
4296
- cancellableAtNextPaymentCycle?: boolean;
4464
+ interface SendSubscriptionActionEventResponse {
4297
4465
  }
4298
- interface Suspension {
4299
- status?: StatusWithLiterals;
4300
- /** Beginning of the suspended period */
4301
- startsAt?: Date | null;
4302
- /** End of the suspended period */
4303
- endsAt?: Date | null;
4466
+ interface HandleSubscriptionAfterInvoiceMarkedAsPaidRequest {
4467
+ /** @format GUID */
4468
+ tenantId?: string;
4469
+ /** @format GUID */
4470
+ subscriptionId?: string;
4471
+ transactionId?: string;
4304
4472
  }
4305
- declare enum Status {
4306
- UNDEFINED = "UNDEFINED",
4307
- ACTIVE = "ACTIVE",
4308
- ENDED = "ENDED"
4473
+ interface PauseSubscriptionBORequest {
4474
+ /** @format GUID */
4475
+ tenantId?: string;
4476
+ /** @format GUID */
4477
+ subscriptionId?: string;
4478
+ pausePolicy?: PausePolicyWithLiterals;
4479
+ pauseAt?: PauseAtWithLiterals;
4480
+ initiator?: ActionInitiatorWithLiterals;
4481
+ /** @maxLength 500 */
4482
+ reason?: string | null;
4309
4483
  }
4310
- /** @enumType */
4311
- type StatusWithLiterals = Status | 'UNDEFINED' | 'ACTIVE' | 'ENDED';
4312
- /** A duration expressed in amount of time units. */
4313
- interface V1Duration {
4314
- /** Amount of the unit */
4315
- amount?: number;
4316
- /** Day, Week, Month, Year. */
4317
- unit?: SubscriptionFrequencyWithLiterals;
4484
+ interface PauseSubscriptionBOResponse {
4485
+ subscription?: Subscription;
4318
4486
  }
4319
- interface V1SubscriptionActivated {
4320
- subscription?: V1Subscription;
4487
+ interface FixSubscriptionInvoicesConsistencyRequest {
4488
+ /** @format GUID */
4489
+ tenantId?: string;
4490
+ /** @format GUID */
4491
+ subscriptionId?: string;
4321
4492
  }
4322
- interface V1SubscriptionCanceled {
4323
- subscription?: V1Subscription;
4493
+ interface FixSubscriptionInvoicesConsistencyResponse {
4324
4494
  }
4325
- interface V1SubscriptionUpdated {
4326
- subscription?: V1Subscription;
4495
+ interface FixSubscriptionPaymentStatusRequest {
4496
+ /** @format GUID */
4497
+ tenantId?: string;
4498
+ /** @format GUID */
4499
+ subscriptionId?: string;
4500
+ /** When true, verify and report the would-be fix without mutating anything. */
4501
+ dryRun?: boolean;
4327
4502
  }
4328
- interface SubscriptionCycleTriggered {
4329
- subscription?: V1Subscription;
4330
- billingCycle?: number;
4503
+ interface FixSubscriptionPaymentStatusResponse {
4504
+ /** The invoice is PAID but the (DRAFT) subscription never processed the paid event. */
4505
+ mismatchDetected?: boolean;
4506
+ /** A real mismatch was found and the invoice-paid activation was re-driven (always false in dry-run). */
4507
+ fixed?: boolean;
4331
4508
  /**
4332
- * Wix Pay transaction id, optional. Exists if event was triggered by a payment.
4333
- * @format GUID
4509
+ * Subscription status after the re-drive (ACTIVE / PENDING); in dry-run, the predicted status; "" when no fix ran.
4510
+ * @maxLength 50
4334
4511
  */
4335
- transactionId?: string | null;
4336
- }
4337
- interface SubscriptionMarkedAsPaid {
4338
- subscription?: V1Subscription;
4339
- /** A number indicating which payment (cycle) was marked as paid. For recurring subscriptions only. */
4340
- billingCycle?: number | null;
4341
- }
4342
- interface SubscriptionCancellationRequested {
4343
- subscription?: V1Subscription;
4512
+ resultingStatus?: string;
4513
+ /**
4514
+ * Human-readable summary of the decision and action.
4515
+ * @maxLength 500
4516
+ */
4517
+ detail?: string;
4344
4518
  }
4345
- interface SubscriptionSuspended {
4346
- subscription?: V1Subscription;
4519
+ interface UpdateSubscriptionCurrencyRequest {
4520
+ /**
4521
+ * Tenant ID (instance ID) of the subscription
4522
+ * @format GUID
4523
+ */
4524
+ tenantId?: string;
4525
+ /**
4526
+ * Subscription ID to update currency for
4527
+ * @format GUID
4528
+ */
4529
+ subscriptionId?: string;
4530
+ /**
4531
+ * New currency code (e.g., "USD", "EUR") - ISO 4217 format
4532
+ * @format CURRENCY
4533
+ */
4534
+ newCurrency?: string;
4535
+ /**
4536
+ * Exchange rate from current currency to new currency (newAmount = oldAmount * exchangeRate)
4537
+ * @decimalValue options { gt:0.00, maxScale:6 }
4538
+ */
4539
+ exchangeRate?: string;
4347
4540
  }
4348
- interface V1SubscriptionResumed {
4349
- subscription?: V1Subscription;
4541
+ interface UpdateSubscriptionCurrencyResponse {
4542
+ /** The updated subscription with new currency and converted amounts */
4543
+ subscription?: Subscription;
4350
4544
  }
4351
- interface SubscriptionExpired {
4352
- subscription?: V1Subscription;
4545
+ interface UpdateSubscriptionPlatformOriginRequest {
4546
+ /**
4547
+ * Subscription ID to update platform origin for
4548
+ * @format GUID
4549
+ */
4550
+ subscriptionId?: string;
4551
+ /**
4552
+ * Tenant ID (instance ID) of the subscription
4553
+ * @format GUID
4554
+ */
4555
+ tenantId?: string;
4556
+ /** New platform origin (appId and entityId) */
4557
+ platformOrigin?: PlatformOrigin;
4353
4558
  }
4354
- interface V1SubscriptionInitialPurchaseCompleted {
4355
- subscription?: V1Subscription;
4559
+ interface UpdateSubscriptionPlatformOriginResponse {
4560
+ /** The updated subscription with new platform origin */
4561
+ subscription?: Subscription;
4356
4562
  }
4357
4563
  interface ListSubscriptionHistoryRequest {
4358
4564
  /** @format GUID */
@@ -4419,6 +4625,8 @@ interface SubscriptionEvent extends SubscriptionEventPayloadOneOf {
4419
4625
  billingCyclePaid?: SubscriptionBillingCyclePaid;
4420
4626
  initiatePaymentMethodSetup?: InitiatedPaymentMethodSetup;
4421
4627
  futurePriceUpdatesRequested?: FuturePriceUpdatesRequested;
4628
+ /** Fired once when an offline subscription purchase is completed (BILL-534). */
4629
+ offlinePurchaseCompleted?: SubscriptionOfflinePurchaseCompleted;
4422
4630
  subscriptionBoAction?: SubscriptionBackOfficeAction;
4423
4631
  unknown?: UnknownSubscriptionEvent;
4424
4632
  }
@@ -4457,6 +4665,8 @@ interface SubscriptionEventPayloadOneOf {
4457
4665
  billingCyclePaid?: SubscriptionBillingCyclePaid;
4458
4666
  initiatePaymentMethodSetup?: InitiatedPaymentMethodSetup;
4459
4667
  futurePriceUpdatesRequested?: FuturePriceUpdatesRequested;
4668
+ /** Fired once when an offline subscription purchase is completed (BILL-534). */
4669
+ offlinePurchaseCompleted?: SubscriptionOfflinePurchaseCompleted;
4460
4670
  subscriptionBoAction?: SubscriptionBackOfficeAction;
4461
4671
  unknown?: UnknownSubscriptionEvent;
4462
4672
  }
@@ -4530,6 +4740,10 @@ interface FuturePriceUpdatesRequested {
4530
4740
  subscription?: Subscription;
4531
4741
  requestedUpdateData?: SubscriptionUpdateData;
4532
4742
  }
4743
+ interface SubscriptionOfflinePurchaseCompleted {
4744
+ subscription?: Subscription;
4745
+ actionDetails?: ActionDetails;
4746
+ }
4533
4747
  interface SubscriptionBackOfficeAction {
4534
4748
  subscription?: Subscription;
4535
4749
  /** The backoffice method name */
@@ -4776,9 +4990,6 @@ declare function customerCancelScheduledPause(): __PublicMethodMetaInfo<'POST',
4776
4990
  declare function customerUpdateBillingDate(): __PublicMethodMetaInfo<'POST', {
4777
4991
  id: string;
4778
4992
  }, CustomerUpdateBillingDateRequest$1, CustomerUpdateBillingDateRequest, CustomerUpdateBillingDateResponse$1, CustomerUpdateBillingDateResponse>;
4779
- declare function payCycle(): __PublicMethodMetaInfo<'POST', {
4780
- subscriptionId: string;
4781
- }, PayCycleRequest$1, PayCycleRequest, PayCycleResponse$1, PayCycleResponse>;
4782
4993
  declare function getSubscription(): __PublicMethodMetaInfo<'GET', {
4783
4994
  id: string;
4784
4995
  }, GetSubscriptionRequest$1, GetSubscriptionRequest, GetSubscriptionResponse$1, GetSubscriptionResponse>;
@@ -4834,4 +5045,4 @@ declare function listSubscriptionHistory(): __PublicMethodMetaInfo<'GET', {
4834
5045
  subscriptionId: string;
4835
5046
  }, ListSubscriptionHistoryRequest$1, ListSubscriptionHistoryRequest, ListSubscriptionHistoryResponse$1, ListSubscriptionHistoryResponse>;
4836
5047
 
4837
- 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 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 };
5048
+ 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 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 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, customerCancelScheduledPause, customerCancelScheduledSkip, customerCancelSubscription, customerExtendSubscription, customerGetSubscription, customerInitiatePaymentMethodSetup, customerListUpcomingCharges, customerPauseSubscription, 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 };