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