autumn-js 1.2.39 → 1.2.41
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/dist/backend/adapters/express.d.mts +1 -1
- package/dist/backend/adapters/express.d.ts +1 -1
- package/dist/backend/adapters/express.js +10792 -6387
- package/dist/backend/adapters/express.mjs +5 -5
- package/dist/backend/adapters/fetch.d.mts +1 -1
- package/dist/backend/adapters/fetch.d.ts +1 -1
- package/dist/backend/adapters/fetch.js +10792 -6387
- package/dist/backend/adapters/fetch.mjs +5 -5
- package/dist/backend/adapters/hono.d.mts +1 -1
- package/dist/backend/adapters/hono.d.ts +1 -1
- package/dist/backend/adapters/hono.js +10792 -6387
- package/dist/backend/adapters/hono.mjs +5 -5
- package/dist/backend/adapters/index.d.mts +1 -1
- package/dist/backend/adapters/index.d.ts +1 -1
- package/dist/backend/adapters/index.js +10792 -6387
- package/dist/backend/adapters/index.mjs +8 -8
- package/dist/backend/adapters/next.d.mts +1 -1
- package/dist/backend/adapters/next.d.ts +1 -1
- package/dist/backend/adapters/next.js +10792 -6387
- package/dist/backend/adapters/next.mjs +5 -5
- package/dist/backend/{authTypes-jU7ON-I5.d.mts → authTypes-B2FK_0xh.d.mts} +4 -0
- package/dist/backend/{authTypes-jU7ON-I5.d.ts → authTypes-B2FK_0xh.d.ts} +4 -0
- package/dist/backend/{chunk-5IUIFE55.mjs → chunk-2VGKOWXH.mjs} +1 -1
- package/dist/backend/{chunk-MSMJS42G.mjs → chunk-5FKCJ3TB.mjs} +9204 -6330
- package/dist/backend/{chunk-V32P22RC.mjs → chunk-6IRM5YOA.mjs} +2 -2
- package/dist/backend/{chunk-NHBJ3QDV.mjs → chunk-6WHGF4WX.mjs} +1626 -95
- package/dist/backend/{chunk-GL2SBEQ5.mjs → chunk-CHL34LQO.mjs} +1 -1
- package/dist/backend/{chunk-KJP3DHPM.mjs → chunk-FS2XS32M.mjs} +1 -1
- package/dist/backend/{chunk-UMTASWZL.mjs → chunk-QKLYHQFJ.mjs} +1 -1
- package/dist/backend/{chunk-KM5AXZWJ.mjs → chunk-UD2T3GKC.mjs} +2 -2
- package/dist/backend/core/handlers/coreHandler.d.mts +2 -2
- package/dist/backend/core/handlers/coreHandler.d.ts +2 -2
- package/dist/backend/core/handlers/coreHandler.js +10792 -6387
- package/dist/backend/core/handlers/coreHandler.mjs +3 -3
- package/dist/backend/core/handlers/executeRoute.d.mts +2 -2
- package/dist/backend/core/handlers/executeRoute.d.ts +2 -2
- package/dist/backend/core/handlers/handleRouteByName.d.mts +1 -1
- package/dist/backend/core/handlers/handleRouteByName.d.ts +1 -1
- package/dist/backend/core/handlers/handleRouteByName.js +10792 -6387
- package/dist/backend/core/handlers/handleRouteByName.mjs +3 -3
- package/dist/backend/core/handlers/index.d.mts +2 -2
- package/dist/backend/core/handlers/index.d.ts +2 -2
- package/dist/backend/core/handlers/index.js +10792 -6387
- package/dist/backend/core/handlers/index.mjs +4 -4
- package/dist/backend/core/handlers/resolveIdentity.d.mts +1 -1
- package/dist/backend/core/handlers/resolveIdentity.d.ts +1 -1
- package/dist/backend/core/index.d.mts +2 -2
- package/dist/backend/core/index.d.ts +2 -2
- package/dist/backend/core/index.js +10792 -6387
- package/dist/backend/core/index.mjs +4 -4
- package/dist/backend/core/routes/index.d.mts +2 -2
- package/dist/backend/core/routes/index.d.ts +2 -2
- package/dist/backend/core/routes/index.js +1626 -95
- package/dist/backend/core/routes/index.mjs +1 -1
- package/dist/backend/core/routes/routeBuilder.d.mts +2 -2
- package/dist/backend/core/routes/routeBuilder.d.ts +2 -2
- package/dist/backend/core/routes/routeConfigs.d.mts +2 -2
- package/dist/backend/core/routes/routeConfigs.d.ts +2 -2
- package/dist/backend/core/routes/routeConfigs.js +1626 -95
- package/dist/backend/core/routes/routeConfigs.mjs +1 -1
- package/dist/backend/core/types/authTypes.d.mts +1 -1
- package/dist/backend/core/types/authTypes.d.ts +1 -1
- package/dist/backend/core/types/handlerTypes.d.mts +2 -2
- package/dist/backend/core/types/handlerTypes.d.ts +2 -2
- package/dist/backend/core/types/index.d.mts +2 -2
- package/dist/backend/core/types/index.d.ts +2 -2
- package/dist/backend/core/types/routeTypes.d.mts +2 -2
- package/dist/backend/core/types/routeTypes.d.ts +2 -2
- package/dist/backend/index.d.mts +4 -4
- package/dist/backend/index.d.ts +4 -4
- package/dist/backend/index.js +10792 -6387
- package/dist/backend/index.mjs +4 -4
- package/dist/backend/{routeTypes-CIqS7yVo.d.mts → routeTypes-6y6WfqD1.d.mts} +3750 -548
- package/dist/backend/{routeTypes-uWaE8YYa.d.ts → routeTypes-Bqeo1-G5.d.ts} +3750 -548
- package/dist/better-auth/{chunk-LLBM6UQN.mjs → chunk-CICEUVIO.mjs} +9205 -6331
- package/dist/better-auth/{chunk-DG2IPLR6.mjs → chunk-PQ5Y4SBX.mjs} +1626 -95
- package/dist/better-auth/{chunk-7NGK7FWC.mjs → chunk-UGW5CGCL.mjs} +1 -1
- package/dist/better-auth/index.js +10715 -6310
- package/dist/better-auth/index.mjs +3 -3
- package/dist/better-auth/types.d.mts +4 -0
- package/dist/better-auth/types.d.ts +4 -0
- package/dist/better-auth/utils/createAutumnEndpoint.js +1626 -95
- package/dist/better-auth/utils/createAutumnEndpoint.mjs +2 -2
- package/dist/better-auth/utils/handleBetterAuthRoute.js +10792 -6387
- package/dist/better-auth/utils/handleBetterAuthRoute.mjs +2 -2
- package/dist/better-auth/utils/index.js +10715 -6310
- package/dist/better-auth/utils/index.mjs +3 -3
- package/dist/react/AutumnContext.d.mts +4 -4
- package/dist/react/AutumnContext.d.ts +4 -4
- package/dist/react/client/AutumnClient.d.mts +4 -4
- package/dist/react/client/AutumnClient.d.ts +4 -4
- package/dist/react/client/IAutumnClient.d.mts +4 -4
- package/dist/react/client/IAutumnClient.d.ts +4 -4
- package/dist/react/client/index.d.mts +4 -4
- package/dist/react/client/index.d.ts +4 -4
- package/dist/react/{customer-DM044m1a.d.mts → customer-BD_JdC0O.d.mts} +35 -1
- package/dist/react/{customer-CrxRrY4o.d.ts → customer-C95I_yQG.d.ts} +35 -1
- package/dist/react/hooks/index.d.mts +4 -4
- package/dist/react/hooks/index.d.ts +4 -4
- package/dist/react/hooks/internal/check/balanceToAllowed.d.mts +2 -2
- package/dist/react/hooks/internal/check/balanceToAllowed.d.ts +2 -2
- package/dist/react/hooks/internal/check/customerToFeatures.d.mts +2 -2
- package/dist/react/hooks/internal/check/customerToFeatures.d.ts +2 -2
- package/dist/react/hooks/internal/check/findCreditSystemsByFeature.d.mts +2 -2
- package/dist/react/hooks/internal/check/findCreditSystemsByFeature.d.ts +2 -2
- package/dist/react/hooks/internal/check/getCreditCost.d.mts +2 -2
- package/dist/react/hooks/internal/check/getCreditCost.d.ts +2 -2
- package/dist/react/hooks/internal/getLocalCheckResponse.d.mts +3 -3
- package/dist/react/hooks/internal/getLocalCheckResponse.d.ts +3 -3
- package/dist/react/hooks/internal/useCustomerActions.d.mts +4 -4
- package/dist/react/hooks/internal/useCustomerActions.d.ts +4 -4
- package/dist/react/hooks/useAggregateEvents.d.mts +2 -2
- package/dist/react/hooks/useAggregateEvents.d.ts +2 -2
- package/dist/react/hooks/useCustomer.d.mts +3 -3
- package/dist/react/hooks/useCustomer.d.ts +3 -3
- package/dist/react/hooks/useEntity.d.mts +2 -2
- package/dist/react/hooks/useEntity.d.ts +2 -2
- package/dist/react/hooks/useListEvents.d.mts +2 -2
- package/dist/react/hooks/useListEvents.d.ts +2 -2
- package/dist/react/hooks/useListPlans.d.mts +3 -3
- package/dist/react/hooks/useListPlans.d.ts +3 -3
- package/dist/react/hooks/useReferrals.d.mts +2 -2
- package/dist/react/hooks/useReferrals.d.ts +2 -2
- package/dist/react/index.d.mts +4 -4
- package/dist/react/index.d.ts +4 -4
- package/dist/react/{list-plans-op-DvXyRegM.d.mts → list-plans-op--w_i80gy.d.mts} +73 -1
- package/dist/react/{list-plans-op-Cwb5iIdA.d.ts → list-plans-op-BdOxN1FS.d.ts} +73 -1
- package/dist/react/{params-B-1vi9za.d.ts → params-Dk9XX3Ql.d.mts} +2736 -473
- package/dist/react/{params-Bf18ATYi.d.mts → params-_Bb3H0_F.d.ts} +2736 -473
- package/dist/react/{plan-CUExbmy9.d.mts → plan--HshF-xs.d.mts} +86 -0
- package/dist/react/{plan-CUExbmy9.d.ts → plan--HshF-xs.d.ts} +86 -0
- package/dist/sdk/index.d.mts +4648 -22
- package/dist/sdk/index.d.ts +4648 -22
- package/dist/sdk/index.js +10662 -6296
- package/dist/sdk/index.mjs +10234 -6296
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as ClosedEnum, O as OpenEnum, a as Balance, P as Plan } from './plan-
|
|
1
|
+
import { C as ClosedEnum, O as OpenEnum, a as Balance, P as Plan } from './plan--HshF-xs.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Time range to aggregate events for. Either range or custom_range must be provided
|
|
@@ -154,6 +154,16 @@ declare const AttachPriceInterval: {
|
|
|
154
154
|
* Billing interval (e.g. 'month', 'year').
|
|
155
155
|
*/
|
|
156
156
|
type AttachPriceInterval = ClosedEnum<typeof AttachPriceInterval>;
|
|
157
|
+
type AttachAdditionalCurrency = {
|
|
158
|
+
/**
|
|
159
|
+
* Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
|
|
160
|
+
*/
|
|
161
|
+
currency: string;
|
|
162
|
+
/**
|
|
163
|
+
* Price amount in this currency. Set explicitly per currency, not converted from the base amount.
|
|
164
|
+
*/
|
|
165
|
+
amount: number;
|
|
166
|
+
};
|
|
157
167
|
/**
|
|
158
168
|
* Base price configuration for a plan.
|
|
159
169
|
*/
|
|
@@ -170,6 +180,10 @@ type AttachBasePrice = {
|
|
|
170
180
|
* Number of intervals per billing cycle. Defaults to 1.
|
|
171
181
|
*/
|
|
172
182
|
intervalCount?: number | undefined;
|
|
183
|
+
/**
|
|
184
|
+
* Base price amounts in additional currencies. The base 'amount' is in the org's default currency.
|
|
185
|
+
*/
|
|
186
|
+
additionalCurrencies?: Array<AttachAdditionalCurrency> | undefined;
|
|
173
187
|
};
|
|
174
188
|
/**
|
|
175
189
|
* Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
|
|
@@ -202,10 +216,38 @@ type AttachItemReset = {
|
|
|
202
216
|
*/
|
|
203
217
|
intervalCount?: number | undefined;
|
|
204
218
|
};
|
|
219
|
+
type AttachItemAdditionalCurrency = {
|
|
220
|
+
/**
|
|
221
|
+
* Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
|
|
222
|
+
*/
|
|
223
|
+
currency: string;
|
|
224
|
+
/**
|
|
225
|
+
* Price amount in this currency. Set explicitly per currency, not converted from the base amount.
|
|
226
|
+
*/
|
|
227
|
+
amount: number;
|
|
228
|
+
};
|
|
229
|
+
type AttachItemTierAdditionalCurrency = {
|
|
230
|
+
/**
|
|
231
|
+
* Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
|
|
232
|
+
*/
|
|
233
|
+
currency: string;
|
|
234
|
+
/**
|
|
235
|
+
* Per-unit amount for this tier in this currency.
|
|
236
|
+
*/
|
|
237
|
+
amount?: number | undefined;
|
|
238
|
+
/**
|
|
239
|
+
* Flat amount for this tier in this currency, if the tier uses one.
|
|
240
|
+
*/
|
|
241
|
+
flatAmount?: number | undefined;
|
|
242
|
+
};
|
|
205
243
|
type AttachItemTier = {
|
|
206
244
|
to: number | string;
|
|
207
245
|
amount?: number | undefined;
|
|
208
246
|
flatAmount?: number | undefined;
|
|
247
|
+
/**
|
|
248
|
+
* Per-currency amounts for this tier. Tier boundaries ('to') are shared across all currencies.
|
|
249
|
+
*/
|
|
250
|
+
additionalCurrencies?: Array<AttachItemTierAdditionalCurrency> | undefined;
|
|
209
251
|
};
|
|
210
252
|
declare const AttachItemTierBehavior: {
|
|
211
253
|
readonly Graduated: "graduated";
|
|
@@ -246,6 +288,10 @@ type AttachItemPrice = {
|
|
|
246
288
|
* Price per billing_units after included usage. Either 'amount' or 'tiers' is required.
|
|
247
289
|
*/
|
|
248
290
|
amount?: number | undefined;
|
|
291
|
+
/**
|
|
292
|
+
* Amounts in additional currencies for this flat price. The base 'amount' is in the org's default currency. Only valid with 'amount', not 'tiers'.
|
|
293
|
+
*/
|
|
294
|
+
additionalCurrencies?: Array<AttachItemAdditionalCurrency> | undefined;
|
|
249
295
|
/**
|
|
250
296
|
* Tiered pricing. Either 'amount' or 'tiers' is required.
|
|
251
297
|
*/
|
|
@@ -408,10 +454,38 @@ type AttachAddItemReset = {
|
|
|
408
454
|
*/
|
|
409
455
|
intervalCount?: number | undefined;
|
|
410
456
|
};
|
|
457
|
+
type AttachAddItemAdditionalCurrency = {
|
|
458
|
+
/**
|
|
459
|
+
* Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
|
|
460
|
+
*/
|
|
461
|
+
currency: string;
|
|
462
|
+
/**
|
|
463
|
+
* Price amount in this currency. Set explicitly per currency, not converted from the base amount.
|
|
464
|
+
*/
|
|
465
|
+
amount: number;
|
|
466
|
+
};
|
|
467
|
+
type AttachAddItemTierAdditionalCurrency = {
|
|
468
|
+
/**
|
|
469
|
+
* Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
|
|
470
|
+
*/
|
|
471
|
+
currency: string;
|
|
472
|
+
/**
|
|
473
|
+
* Per-unit amount for this tier in this currency.
|
|
474
|
+
*/
|
|
475
|
+
amount?: number | undefined;
|
|
476
|
+
/**
|
|
477
|
+
* Flat amount for this tier in this currency, if the tier uses one.
|
|
478
|
+
*/
|
|
479
|
+
flatAmount?: number | undefined;
|
|
480
|
+
};
|
|
411
481
|
type AttachAddItemTier = {
|
|
412
482
|
to: number | string;
|
|
413
483
|
amount?: number | undefined;
|
|
414
484
|
flatAmount?: number | undefined;
|
|
485
|
+
/**
|
|
486
|
+
* Per-currency amounts for this tier. Tier boundaries ('to') are shared across all currencies.
|
|
487
|
+
*/
|
|
488
|
+
additionalCurrencies?: Array<AttachAddItemTierAdditionalCurrency> | undefined;
|
|
415
489
|
};
|
|
416
490
|
declare const AttachAddItemTierBehavior: {
|
|
417
491
|
readonly Graduated: "graduated";
|
|
@@ -452,6 +526,10 @@ type AttachAddItemPrice = {
|
|
|
452
526
|
* Price per billing_units after included usage. Either 'amount' or 'tiers' is required.
|
|
453
527
|
*/
|
|
454
528
|
amount?: number | undefined;
|
|
529
|
+
/**
|
|
530
|
+
* Amounts in additional currencies for this flat price. The base 'amount' is in the org's default currency. Only valid with 'amount', not 'tiers'.
|
|
531
|
+
*/
|
|
532
|
+
additionalCurrencies?: Array<AttachAddItemAdditionalCurrency> | undefined;
|
|
455
533
|
/**
|
|
456
534
|
* Tiered pricing. Either 'amount' or 'tiers' is required.
|
|
457
535
|
*/
|
|
@@ -883,157 +961,508 @@ type AttachBillingControls = {
|
|
|
883
961
|
overageAllowed?: Array<AttachOverageAllowed> | undefined;
|
|
884
962
|
};
|
|
885
963
|
/**
|
|
886
|
-
*
|
|
964
|
+
* Billing interval (e.g. 'month', 'year').
|
|
887
965
|
*/
|
|
888
|
-
|
|
966
|
+
declare const AttachPriceUpsertLicenseInterval: {
|
|
967
|
+
readonly OneOff: "one_off";
|
|
968
|
+
readonly Week: "week";
|
|
969
|
+
readonly Month: "month";
|
|
970
|
+
readonly Quarter: "quarter";
|
|
971
|
+
readonly SemiAnnual: "semi_annual";
|
|
972
|
+
readonly Year: "year";
|
|
973
|
+
};
|
|
974
|
+
/**
|
|
975
|
+
* Billing interval (e.g. 'month', 'year').
|
|
976
|
+
*/
|
|
977
|
+
type AttachPriceUpsertLicenseInterval = ClosedEnum<typeof AttachPriceUpsertLicenseInterval>;
|
|
978
|
+
type AttachUpsertLicenseAdditionalCurrency = {
|
|
889
979
|
/**
|
|
890
|
-
*
|
|
980
|
+
* Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
|
|
891
981
|
*/
|
|
892
|
-
|
|
982
|
+
currency: string;
|
|
893
983
|
/**
|
|
894
|
-
*
|
|
984
|
+
* Price amount in this currency. Set explicitly per currency, not converted from the base amount.
|
|
895
985
|
*/
|
|
896
|
-
|
|
986
|
+
amount: number;
|
|
987
|
+
};
|
|
988
|
+
/**
|
|
989
|
+
* Base price configuration for a plan.
|
|
990
|
+
*/
|
|
991
|
+
type AttachUpsertLicenseBasePrice = {
|
|
897
992
|
/**
|
|
898
|
-
*
|
|
993
|
+
* Base price amount for the plan.
|
|
899
994
|
*/
|
|
900
|
-
|
|
995
|
+
amount: number;
|
|
901
996
|
/**
|
|
902
|
-
*
|
|
997
|
+
* Billing interval (e.g. 'month', 'year').
|
|
903
998
|
*/
|
|
904
|
-
|
|
999
|
+
interval: AttachPriceUpsertLicenseInterval;
|
|
905
1000
|
/**
|
|
906
|
-
*
|
|
1001
|
+
* Number of intervals per billing cycle. Defaults to 1.
|
|
907
1002
|
*/
|
|
908
|
-
|
|
1003
|
+
intervalCount?: number | undefined;
|
|
909
1004
|
/**
|
|
910
|
-
*
|
|
1005
|
+
* Base price amounts in additional currencies. The base 'amount' is in the org's default currency.
|
|
911
1006
|
*/
|
|
912
|
-
|
|
1007
|
+
additionalCurrencies?: Array<AttachUpsertLicenseAdditionalCurrency> | undefined;
|
|
913
1008
|
};
|
|
914
1009
|
/**
|
|
915
|
-
*
|
|
1010
|
+
* Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
|
|
916
1011
|
*/
|
|
917
|
-
|
|
1012
|
+
declare const AttachUpsertLicenseResetInterval: {
|
|
1013
|
+
readonly OneOff: "one_off";
|
|
1014
|
+
readonly Minute: "minute";
|
|
1015
|
+
readonly Hour: "hour";
|
|
1016
|
+
readonly Day: "day";
|
|
1017
|
+
readonly Week: "week";
|
|
1018
|
+
readonly Month: "month";
|
|
1019
|
+
readonly Quarter: "quarter";
|
|
1020
|
+
readonly SemiAnnual: "semi_annual";
|
|
1021
|
+
readonly Year: "year";
|
|
1022
|
+
};
|
|
1023
|
+
/**
|
|
1024
|
+
* Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
|
|
1025
|
+
*/
|
|
1026
|
+
type AttachUpsertLicenseResetInterval = ClosedEnum<typeof AttachUpsertLicenseResetInterval>;
|
|
1027
|
+
/**
|
|
1028
|
+
* Reset configuration for consumable features. Omit for non-consumable features like seats.
|
|
1029
|
+
*/
|
|
1030
|
+
type AttachUpsertLicenseReset = {
|
|
918
1031
|
/**
|
|
919
|
-
*
|
|
1032
|
+
* Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
|
|
920
1033
|
*/
|
|
921
|
-
|
|
1034
|
+
interval: AttachUpsertLicenseResetInterval;
|
|
922
1035
|
/**
|
|
923
|
-
*
|
|
1036
|
+
* Number of intervals between resets. Defaults to 1.
|
|
924
1037
|
*/
|
|
925
|
-
|
|
1038
|
+
intervalCount?: number | undefined;
|
|
1039
|
+
};
|
|
1040
|
+
type AttachUpsertLicenseAddItemAdditionalCurrency = {
|
|
926
1041
|
/**
|
|
927
|
-
*
|
|
1042
|
+
* Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
|
|
928
1043
|
*/
|
|
929
|
-
|
|
1044
|
+
currency: string;
|
|
930
1045
|
/**
|
|
931
|
-
*
|
|
1046
|
+
* Price amount in this currency. Set explicitly per currency, not converted from the base amount.
|
|
932
1047
|
*/
|
|
933
|
-
|
|
1048
|
+
amount: number;
|
|
1049
|
+
};
|
|
1050
|
+
type AttachUpsertLicenseTier = {
|
|
1051
|
+
to?: any | undefined;
|
|
1052
|
+
amount?: number | undefined;
|
|
1053
|
+
flatAmount?: number | undefined;
|
|
934
1054
|
/**
|
|
935
|
-
*
|
|
1055
|
+
* Per-currency amounts for this tier. Tier boundaries ('to') are shared across all currencies.
|
|
936
1056
|
*/
|
|
937
|
-
|
|
1057
|
+
additionalCurrencies?: Array<any> | undefined;
|
|
938
1058
|
};
|
|
1059
|
+
declare const AttachUpsertLicenseTierBehavior: {
|
|
1060
|
+
readonly Graduated: "graduated";
|
|
1061
|
+
readonly Volume: "volume";
|
|
1062
|
+
};
|
|
1063
|
+
type AttachUpsertLicenseTierBehavior = ClosedEnum<typeof AttachUpsertLicenseTierBehavior>;
|
|
939
1064
|
/**
|
|
940
|
-
*
|
|
1065
|
+
* Billing interval. For consumable features, should match reset.interval.
|
|
941
1066
|
*/
|
|
942
|
-
declare const
|
|
943
|
-
readonly
|
|
944
|
-
readonly
|
|
1067
|
+
declare const AttachUpsertLicenseAddItemPriceInterval: {
|
|
1068
|
+
readonly OneOff: "one_off";
|
|
1069
|
+
readonly Week: "week";
|
|
1070
|
+
readonly Month: "month";
|
|
1071
|
+
readonly Quarter: "quarter";
|
|
1072
|
+
readonly SemiAnnual: "semi_annual";
|
|
1073
|
+
readonly Year: "year";
|
|
945
1074
|
};
|
|
946
1075
|
/**
|
|
947
|
-
*
|
|
1076
|
+
* Billing interval. For consumable features, should match reset.interval.
|
|
948
1077
|
*/
|
|
949
|
-
type
|
|
1078
|
+
type AttachUpsertLicenseAddItemPriceInterval = ClosedEnum<typeof AttachUpsertLicenseAddItemPriceInterval>;
|
|
950
1079
|
/**
|
|
951
|
-
*
|
|
1080
|
+
* 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
|
|
952
1081
|
*/
|
|
953
|
-
declare const
|
|
954
|
-
readonly
|
|
955
|
-
readonly
|
|
956
|
-
readonly Never: "never";
|
|
1082
|
+
declare const AttachUpsertLicenseAddItemBillingMethod: {
|
|
1083
|
+
readonly Prepaid: "prepaid";
|
|
1084
|
+
readonly UsageBased: "usage_based";
|
|
957
1085
|
};
|
|
958
1086
|
/**
|
|
959
|
-
*
|
|
1087
|
+
* 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
|
|
960
1088
|
*/
|
|
961
|
-
type
|
|
1089
|
+
type AttachUpsertLicenseAddItemBillingMethod = ClosedEnum<typeof AttachUpsertLicenseAddItemBillingMethod>;
|
|
962
1090
|
/**
|
|
963
|
-
*
|
|
1091
|
+
* Pricing for usage beyond included units. Omit for free features.
|
|
964
1092
|
*/
|
|
965
|
-
type
|
|
1093
|
+
type AttachUpsertLicensePrice = {
|
|
966
1094
|
/**
|
|
967
|
-
*
|
|
1095
|
+
* Price per billing_units after included usage. Either 'amount' or 'tiers' is required.
|
|
968
1096
|
*/
|
|
969
|
-
|
|
1097
|
+
amount?: number | undefined;
|
|
970
1098
|
/**
|
|
971
|
-
* The
|
|
1099
|
+
* Amounts in additional currencies for this flat price. The base 'amount' is in the org's default currency. Only valid with 'amount', not 'tiers'.
|
|
972
1100
|
*/
|
|
973
|
-
|
|
1101
|
+
additionalCurrencies?: Array<AttachUpsertLicenseAddItemAdditionalCurrency> | undefined;
|
|
1102
|
+
/**
|
|
1103
|
+
* Tiered pricing. Either 'amount' or 'tiers' is required.
|
|
1104
|
+
*/
|
|
1105
|
+
tiers?: Array<AttachUpsertLicenseTier> | undefined;
|
|
1106
|
+
tierBehavior?: AttachUpsertLicenseTierBehavior | undefined;
|
|
1107
|
+
/**
|
|
1108
|
+
* Billing interval. For consumable features, should match reset.interval.
|
|
1109
|
+
*/
|
|
1110
|
+
interval: AttachUpsertLicenseAddItemPriceInterval;
|
|
1111
|
+
/**
|
|
1112
|
+
* Number of intervals per billing cycle. Defaults to 1.
|
|
1113
|
+
*/
|
|
1114
|
+
intervalCount?: number | undefined;
|
|
1115
|
+
/**
|
|
1116
|
+
* Units per price increment. Usage is rounded UP when billed (e.g. billing_units=100 means 101 rounds to 200).
|
|
1117
|
+
*/
|
|
1118
|
+
billingUnits?: number | undefined;
|
|
1119
|
+
/**
|
|
1120
|
+
* 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
|
|
1121
|
+
*/
|
|
1122
|
+
billingMethod: AttachUpsertLicenseAddItemBillingMethod;
|
|
1123
|
+
/**
|
|
1124
|
+
* Max units purchasable beyond included. E.g. included=100, max_purchase=300 allows 400 total. Null for no limit.
|
|
1125
|
+
*/
|
|
1126
|
+
maxPurchase?: number | null | undefined;
|
|
974
1127
|
};
|
|
975
1128
|
/**
|
|
976
|
-
*
|
|
1129
|
+
* Billing behavior when quantity increases mid-cycle.
|
|
977
1130
|
*/
|
|
978
|
-
declare const
|
|
979
|
-
readonly
|
|
980
|
-
readonly
|
|
1131
|
+
declare const AttachUpsertLicenseOnIncrease: {
|
|
1132
|
+
readonly BillImmediately: "bill_immediately";
|
|
1133
|
+
readonly ProrateImmediately: "prorate_immediately";
|
|
1134
|
+
readonly ProrateNextCycle: "prorate_next_cycle";
|
|
1135
|
+
readonly BillNextCycle: "bill_next_cycle";
|
|
981
1136
|
};
|
|
982
1137
|
/**
|
|
983
|
-
*
|
|
1138
|
+
* Billing behavior when quantity increases mid-cycle.
|
|
984
1139
|
*/
|
|
985
|
-
type
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
1140
|
+
type AttachUpsertLicenseOnIncrease = ClosedEnum<typeof AttachUpsertLicenseOnIncrease>;
|
|
1141
|
+
/**
|
|
1142
|
+
* Credit behavior when quantity decreases mid-cycle.
|
|
1143
|
+
*/
|
|
1144
|
+
declare const AttachUpsertLicenseOnDecrease: {
|
|
1145
|
+
readonly Prorate: "prorate";
|
|
1146
|
+
readonly ProrateImmediately: "prorate_immediately";
|
|
1147
|
+
readonly ProrateNextCycle: "prorate_next_cycle";
|
|
1148
|
+
readonly None: "none";
|
|
1149
|
+
readonly NoProrations: "no_prorations";
|
|
995
1150
|
};
|
|
996
1151
|
/**
|
|
997
|
-
*
|
|
1152
|
+
* Credit behavior when quantity decreases mid-cycle.
|
|
998
1153
|
*/
|
|
999
|
-
type
|
|
1154
|
+
type AttachUpsertLicenseOnDecrease = ClosedEnum<typeof AttachUpsertLicenseOnDecrease>;
|
|
1155
|
+
/**
|
|
1156
|
+
* Proration settings for prepaid features. Controls mid-cycle quantity change billing.
|
|
1157
|
+
*/
|
|
1158
|
+
type AttachUpsertLicenseProration = {
|
|
1000
1159
|
/**
|
|
1001
|
-
*
|
|
1160
|
+
* Billing behavior when quantity increases mid-cycle.
|
|
1002
1161
|
*/
|
|
1003
|
-
|
|
1162
|
+
onIncrease: AttachUpsertLicenseOnIncrease;
|
|
1004
1163
|
/**
|
|
1005
|
-
*
|
|
1164
|
+
* Credit behavior when quantity decreases mid-cycle.
|
|
1006
1165
|
*/
|
|
1007
|
-
|
|
1166
|
+
onDecrease: AttachUpsertLicenseOnDecrease;
|
|
1008
1167
|
};
|
|
1009
1168
|
/**
|
|
1010
|
-
*
|
|
1169
|
+
* When rolled over units expire.
|
|
1011
1170
|
*/
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
*/
|
|
1016
|
-
enabled: boolean;
|
|
1017
|
-
/**
|
|
1018
|
-
* The IDs of the features to carry over usages for. If left undefined, all consumable features will be carried over.
|
|
1019
|
-
*/
|
|
1020
|
-
featureIds?: Array<string> | undefined;
|
|
1171
|
+
declare const AttachUpsertLicenseExpiryDurationType: {
|
|
1172
|
+
readonly Month: "month";
|
|
1173
|
+
readonly Forever: "forever";
|
|
1021
1174
|
};
|
|
1022
|
-
|
|
1175
|
+
/**
|
|
1176
|
+
* When rolled over units expire.
|
|
1177
|
+
*/
|
|
1178
|
+
type AttachUpsertLicenseExpiryDurationType = ClosedEnum<typeof AttachUpsertLicenseExpiryDurationType>;
|
|
1179
|
+
/**
|
|
1180
|
+
* Rollover config for unused units. If set, unused included units carry over.
|
|
1181
|
+
*/
|
|
1182
|
+
type AttachUpsertLicenseRollover = {
|
|
1023
1183
|
/**
|
|
1024
|
-
*
|
|
1184
|
+
* Max rollover units. Omit for unlimited rollover.
|
|
1025
1185
|
*/
|
|
1026
|
-
|
|
1186
|
+
max?: number | undefined;
|
|
1027
1187
|
/**
|
|
1028
|
-
*
|
|
1188
|
+
* Maximum rollover as a percentage (0-100) of included + prepaid grant. Mutually exclusive with max.
|
|
1029
1189
|
*/
|
|
1030
|
-
|
|
1190
|
+
maxPercentage?: number | undefined;
|
|
1031
1191
|
/**
|
|
1032
|
-
*
|
|
1192
|
+
* When rolled over units expire.
|
|
1033
1193
|
*/
|
|
1034
|
-
|
|
1194
|
+
expiryDurationType: AttachUpsertLicenseExpiryDurationType;
|
|
1035
1195
|
/**
|
|
1036
|
-
*
|
|
1196
|
+
* Number of periods before expiry.
|
|
1197
|
+
*/
|
|
1198
|
+
expiryDurationLength?: number | undefined;
|
|
1199
|
+
};
|
|
1200
|
+
/**
|
|
1201
|
+
* Configuration for a feature item in a plan, including usage limits, pricing, and rollover settings.
|
|
1202
|
+
*/
|
|
1203
|
+
type AttachUpsertLicensePlanItem = {
|
|
1204
|
+
/**
|
|
1205
|
+
* The ID of the feature to configure.
|
|
1206
|
+
*/
|
|
1207
|
+
featureId: string;
|
|
1208
|
+
/**
|
|
1209
|
+
* Number of free units included. Balance resets to this each interval for consumable features.
|
|
1210
|
+
*/
|
|
1211
|
+
included?: number | undefined;
|
|
1212
|
+
/**
|
|
1213
|
+
* If true, customer has unlimited access to this feature.
|
|
1214
|
+
*/
|
|
1215
|
+
unlimited?: boolean | undefined;
|
|
1216
|
+
/**
|
|
1217
|
+
* Reset configuration for consumable features. Omit for non-consumable features like seats.
|
|
1218
|
+
*/
|
|
1219
|
+
reset?: AttachUpsertLicenseReset | undefined;
|
|
1220
|
+
/**
|
|
1221
|
+
* Pricing for usage beyond included units. Omit for free features.
|
|
1222
|
+
*/
|
|
1223
|
+
price?: AttachUpsertLicensePrice | undefined;
|
|
1224
|
+
/**
|
|
1225
|
+
* Proration settings for prepaid features. Controls mid-cycle quantity change billing.
|
|
1226
|
+
*/
|
|
1227
|
+
proration?: AttachUpsertLicenseProration | undefined;
|
|
1228
|
+
/**
|
|
1229
|
+
* Rollover config for unused units. If set, unused included units carry over.
|
|
1230
|
+
*/
|
|
1231
|
+
rollover?: AttachUpsertLicenseRollover | undefined;
|
|
1232
|
+
};
|
|
1233
|
+
/**
|
|
1234
|
+
* Match items with this billing method (prepaid or usage_based).
|
|
1235
|
+
*/
|
|
1236
|
+
declare const AttachUpsertLicenseRemoveItemBillingMethod: {
|
|
1237
|
+
readonly Prepaid: "prepaid";
|
|
1238
|
+
readonly UsageBased: "usage_based";
|
|
1239
|
+
};
|
|
1240
|
+
/**
|
|
1241
|
+
* Match items with this billing method (prepaid or usage_based).
|
|
1242
|
+
*/
|
|
1243
|
+
type AttachUpsertLicenseRemoveItemBillingMethod = ClosedEnum<typeof AttachUpsertLicenseRemoveItemBillingMethod>;
|
|
1244
|
+
declare const AttachIntervalUpsertLicenseRemoveItemEnum2: {
|
|
1245
|
+
readonly OneOff: "one_off";
|
|
1246
|
+
readonly Minute: "minute";
|
|
1247
|
+
readonly Hour: "hour";
|
|
1248
|
+
readonly Day: "day";
|
|
1249
|
+
readonly Week: "week";
|
|
1250
|
+
readonly Month: "month";
|
|
1251
|
+
readonly Quarter: "quarter";
|
|
1252
|
+
readonly SemiAnnual: "semi_annual";
|
|
1253
|
+
readonly Year: "year";
|
|
1254
|
+
};
|
|
1255
|
+
type AttachIntervalUpsertLicenseRemoveItemEnum2 = ClosedEnum<typeof AttachIntervalUpsertLicenseRemoveItemEnum2>;
|
|
1256
|
+
declare const AttachIntervalUpsertLicenseRemoveItemEnum1: {
|
|
1257
|
+
readonly OneOff: "one_off";
|
|
1258
|
+
readonly Week: "week";
|
|
1259
|
+
readonly Month: "month";
|
|
1260
|
+
readonly Quarter: "quarter";
|
|
1261
|
+
readonly SemiAnnual: "semi_annual";
|
|
1262
|
+
readonly Year: "year";
|
|
1263
|
+
};
|
|
1264
|
+
type AttachIntervalUpsertLicenseRemoveItemEnum1 = ClosedEnum<typeof AttachIntervalUpsertLicenseRemoveItemEnum1>;
|
|
1265
|
+
/**
|
|
1266
|
+
* Filter for matching plan items. All provided fields must match (AND).
|
|
1267
|
+
*/
|
|
1268
|
+
type AttachUpsertLicensePlanItemFilter = {
|
|
1269
|
+
/**
|
|
1270
|
+
* Match items linked to this feature.
|
|
1271
|
+
*/
|
|
1272
|
+
featureId?: string | undefined;
|
|
1273
|
+
/**
|
|
1274
|
+
* Match items with this billing method (prepaid or usage_based).
|
|
1275
|
+
*/
|
|
1276
|
+
billingMethod?: AttachUpsertLicenseRemoveItemBillingMethod | undefined;
|
|
1277
|
+
/**
|
|
1278
|
+
* Match items with this interval. Accepts either a BillingInterval (price-side) or a ResetInterval (reset-side, includes day/hour/minute) so price-less items keyed by reset.interval can be disambiguated.
|
|
1279
|
+
*/
|
|
1280
|
+
interval?: AttachIntervalUpsertLicenseRemoveItemEnum1 | AttachIntervalUpsertLicenseRemoveItemEnum2 | undefined;
|
|
1281
|
+
/**
|
|
1282
|
+
* Match items with this interval_count. Disambiguates between items that share an interval but differ in count.
|
|
1283
|
+
*/
|
|
1284
|
+
intervalCount?: number | undefined;
|
|
1285
|
+
};
|
|
1286
|
+
type AttachUpsertLicenseCustomize = {
|
|
1287
|
+
price?: AttachUpsertLicenseBasePrice | null | undefined;
|
|
1288
|
+
addItems?: Array<AttachUpsertLicensePlanItem> | undefined;
|
|
1289
|
+
removeItems?: Array<AttachUpsertLicensePlanItemFilter> | undefined;
|
|
1290
|
+
};
|
|
1291
|
+
type AttachUpsertLicense = {
|
|
1292
|
+
licensePlanId: string;
|
|
1293
|
+
included?: number | undefined;
|
|
1294
|
+
prepaidOnly?: boolean | undefined;
|
|
1295
|
+
customize?: AttachUpsertLicenseCustomize | null | undefined;
|
|
1296
|
+
metadata?: {
|
|
1297
|
+
[k: string]: any;
|
|
1298
|
+
} | undefined;
|
|
1299
|
+
};
|
|
1300
|
+
/**
|
|
1301
|
+
* Customize the plan to attach. Can override the price, items, licenses, free trial, or a combination.
|
|
1302
|
+
*/
|
|
1303
|
+
type AttachCustomize = {
|
|
1304
|
+
/**
|
|
1305
|
+
* Override the base price of the plan. Pass null to remove the base price.
|
|
1306
|
+
*/
|
|
1307
|
+
price?: AttachBasePrice | null | undefined;
|
|
1308
|
+
/**
|
|
1309
|
+
* Override the items in the plan (PUT-style — replaces all existing items). Mutually exclusive with add_items / remove_items / deprecated update_items.
|
|
1310
|
+
*/
|
|
1311
|
+
items?: Array<AttachItemPlanItem> | undefined;
|
|
1312
|
+
/**
|
|
1313
|
+
* Items to add to the plan.
|
|
1314
|
+
*/
|
|
1315
|
+
addItems?: Array<AttachAddItemPlanItem> | undefined;
|
|
1316
|
+
/**
|
|
1317
|
+
* Filters selecting items to remove from the plan.
|
|
1318
|
+
*/
|
|
1319
|
+
removeItems?: Array<AttachPlanItemFilter> | undefined;
|
|
1320
|
+
/**
|
|
1321
|
+
* Override the plan's default free trial. Pass an object to set a custom trial, or null to remove the trial entirely.
|
|
1322
|
+
*/
|
|
1323
|
+
freeTrial?: AttachFreeTrialParams | null | undefined;
|
|
1324
|
+
/**
|
|
1325
|
+
* Override the plan's billing controls (auto top-ups, spend limits, usage limits, usage alerts, overage allowed) for this customer.
|
|
1326
|
+
*/
|
|
1327
|
+
billingControls?: AttachBillingControls | undefined;
|
|
1328
|
+
/**
|
|
1329
|
+
* License links to add or override for this customer, keyed by license_plan_id. Omitted fields inherit the plan catalog link (included defaults to 1 when the license is not in the catalog). A bare entry restores the license to pure catalog inheritance.
|
|
1330
|
+
*/
|
|
1331
|
+
upsertLicenses?: Array<AttachUpsertLicense> | undefined;
|
|
1332
|
+
};
|
|
1333
|
+
/**
|
|
1334
|
+
* Invoice mode creates a draft or open invoice and sends it to the customer, instead of charging their card immediately. This uses Stripe's send_invoice collection method.
|
|
1335
|
+
*/
|
|
1336
|
+
type AttachInvoiceMode = {
|
|
1337
|
+
/**
|
|
1338
|
+
* When true, creates an invoice and sends it to the customer instead of charging their card immediately. Uses Stripe's send_invoice collection method.
|
|
1339
|
+
*/
|
|
1340
|
+
enabled: boolean;
|
|
1341
|
+
/**
|
|
1342
|
+
* If true, enables the plan immediately even though the invoice is not paid yet.
|
|
1343
|
+
*/
|
|
1344
|
+
enablePlanImmediately?: boolean | undefined;
|
|
1345
|
+
/**
|
|
1346
|
+
* If true, finalizes the invoice so it can be sent to the customer. If false, keeps it as a draft for manual review.
|
|
1347
|
+
*/
|
|
1348
|
+
finalize?: boolean | undefined;
|
|
1349
|
+
/**
|
|
1350
|
+
* ID of an invoice template (configured in billing settings) whose footer (e.g. bank details) is applied to the invoice.
|
|
1351
|
+
*/
|
|
1352
|
+
invoiceTemplateId?: string | undefined;
|
|
1353
|
+
/**
|
|
1354
|
+
* Number of days the customer has to pay the invoice before it is due (Stripe days_until_due).
|
|
1355
|
+
*/
|
|
1356
|
+
netTermsDays?: number | undefined;
|
|
1357
|
+
};
|
|
1358
|
+
/**
|
|
1359
|
+
* How to handle proration when updating an existing subscription. 'prorate_immediately' charges/credits prorated amounts now, 'none' skips creating any charges.
|
|
1360
|
+
*/
|
|
1361
|
+
declare const AttachProrationBehavior: {
|
|
1362
|
+
readonly ProrateImmediately: "prorate_immediately";
|
|
1363
|
+
readonly None: "none";
|
|
1364
|
+
};
|
|
1365
|
+
/**
|
|
1366
|
+
* How to handle proration when updating an existing subscription. 'prorate_immediately' charges/credits prorated amounts now, 'none' skips creating any charges.
|
|
1367
|
+
*/
|
|
1368
|
+
type AttachProrationBehavior = ClosedEnum<typeof AttachProrationBehavior>;
|
|
1369
|
+
/**
|
|
1370
|
+
* Controls when to return a checkout URL. 'always' returns a URL even if payment succeeds, 'if_required' only when payment action is needed, 'never' disables redirects.
|
|
1371
|
+
*/
|
|
1372
|
+
declare const AttachRedirectMode: {
|
|
1373
|
+
readonly Always: "always";
|
|
1374
|
+
readonly IfRequired: "if_required";
|
|
1375
|
+
readonly Never: "never";
|
|
1376
|
+
};
|
|
1377
|
+
/**
|
|
1378
|
+
* Controls when to return a checkout URL. 'always' returns a URL even if payment succeeds, 'if_required' only when payment action is needed, 'never' disables redirects.
|
|
1379
|
+
*/
|
|
1380
|
+
type AttachRedirectMode = ClosedEnum<typeof AttachRedirectMode>;
|
|
1381
|
+
/**
|
|
1382
|
+
* A discount to apply. Can be either a reward ID or a promotion code.
|
|
1383
|
+
*/
|
|
1384
|
+
type AttachAttachDiscount = {
|
|
1385
|
+
/**
|
|
1386
|
+
* The ID of the reward to apply as a discount.
|
|
1387
|
+
*/
|
|
1388
|
+
rewardId?: string | undefined;
|
|
1389
|
+
/**
|
|
1390
|
+
* The promotion code to apply as a discount.
|
|
1391
|
+
*/
|
|
1392
|
+
promotionCode?: string | undefined;
|
|
1393
|
+
};
|
|
1394
|
+
/**
|
|
1395
|
+
* When the plan change should take effect. 'immediate' applies now, 'end_of_cycle' schedules for the end of the current billing cycle. By default, upgrades are immediate and downgrades are scheduled.
|
|
1396
|
+
*/
|
|
1397
|
+
declare const AttachPlanSchedule: {
|
|
1398
|
+
readonly Immediate: "immediate";
|
|
1399
|
+
readonly EndOfCycle: "end_of_cycle";
|
|
1400
|
+
};
|
|
1401
|
+
/**
|
|
1402
|
+
* When the plan change should take effect. 'immediate' applies now, 'end_of_cycle' schedules for the end of the current billing cycle. By default, upgrades are immediate and downgrades are scheduled.
|
|
1403
|
+
*/
|
|
1404
|
+
type AttachPlanSchedule = ClosedEnum<typeof AttachPlanSchedule>;
|
|
1405
|
+
type AttachCustomLineItem = {
|
|
1406
|
+
/**
|
|
1407
|
+
* Amount in dollars for this line item (e.g. 10.50). Can be negative for credits.
|
|
1408
|
+
*/
|
|
1409
|
+
amount: number;
|
|
1410
|
+
/**
|
|
1411
|
+
* Description for the line item.
|
|
1412
|
+
*/
|
|
1413
|
+
description: string;
|
|
1414
|
+
};
|
|
1415
|
+
/**
|
|
1416
|
+
* Whether to carry over balances from the previous plan.
|
|
1417
|
+
*/
|
|
1418
|
+
type AttachCarryOverBalances = {
|
|
1419
|
+
/**
|
|
1420
|
+
* Whether to carry over balances from the previous plan.
|
|
1421
|
+
*/
|
|
1422
|
+
enabled: boolean;
|
|
1423
|
+
/**
|
|
1424
|
+
* The IDs of the features to carry over balances from. If left undefined, all features will be carried over.
|
|
1425
|
+
*/
|
|
1426
|
+
featureIds?: Array<string> | undefined;
|
|
1427
|
+
};
|
|
1428
|
+
/**
|
|
1429
|
+
* Whether to carry over usages from the previous plan.
|
|
1430
|
+
*/
|
|
1431
|
+
type AttachCarryOverUsages = {
|
|
1432
|
+
/**
|
|
1433
|
+
* Whether to carry over usages from the previous plan.
|
|
1434
|
+
*/
|
|
1435
|
+
enabled: boolean;
|
|
1436
|
+
/**
|
|
1437
|
+
* The IDs of the features to carry over usages for. If left undefined, all consumable features will be carried over.
|
|
1438
|
+
*/
|
|
1439
|
+
featureIds?: Array<string> | undefined;
|
|
1440
|
+
};
|
|
1441
|
+
type AttachLicenseQuantity = {
|
|
1442
|
+
/**
|
|
1443
|
+
* The license plan to set seat quantity for.
|
|
1444
|
+
*/
|
|
1445
|
+
licensePlanId: string;
|
|
1446
|
+
/**
|
|
1447
|
+
* Total seats for the license, inclusive of the plan's included amount — seats beyond it are paid.
|
|
1448
|
+
*/
|
|
1449
|
+
quantity: number;
|
|
1450
|
+
};
|
|
1451
|
+
type AttachParams = {
|
|
1452
|
+
/**
|
|
1453
|
+
* The ID of the customer to attach the plan to.
|
|
1454
|
+
*/
|
|
1455
|
+
customerId: string;
|
|
1456
|
+
/**
|
|
1457
|
+
* The ID of the entity to attach the plan to.
|
|
1458
|
+
*/
|
|
1459
|
+
entityId?: string | undefined;
|
|
1460
|
+
/**
|
|
1461
|
+
* The ID of the plan.
|
|
1462
|
+
*/
|
|
1463
|
+
planId: string;
|
|
1464
|
+
/**
|
|
1465
|
+
* If this plan contains prepaid features, use this field to specify the quantity of each prepaid feature. This quantity includes the included amount and billing units defined when setting up the plan.
|
|
1037
1466
|
*/
|
|
1038
1467
|
featureQuantities?: Array<AttachFeatureQuantity> | undefined;
|
|
1039
1468
|
/**
|
|
@@ -1041,7 +1470,7 @@ type AttachParams = {
|
|
|
1041
1470
|
*/
|
|
1042
1471
|
version?: number | undefined;
|
|
1043
1472
|
/**
|
|
1044
|
-
* Customize the plan to attach. Can override the price, items, free trial, or a combination.
|
|
1473
|
+
* Customize the plan to attach. Can override the price, items, licenses, free trial, or a combination.
|
|
1045
1474
|
*/
|
|
1046
1475
|
customize?: AttachCustomize | undefined;
|
|
1047
1476
|
/**
|
|
@@ -1114,6 +1543,10 @@ type AttachParams = {
|
|
|
1114
1543
|
* Whether to carry over usages from the previous plan.
|
|
1115
1544
|
*/
|
|
1116
1545
|
carryOverUsages?: AttachCarryOverUsages | undefined;
|
|
1546
|
+
/**
|
|
1547
|
+
* Seat quantities for the plan's licenses, keyed by license plan.
|
|
1548
|
+
*/
|
|
1549
|
+
licenseQuantities?: Array<AttachLicenseQuantity> | undefined;
|
|
1117
1550
|
/**
|
|
1118
1551
|
* Key-value metadata to attach to the Stripe subscription, invoice, and checkout session created during this attach flow. Keys prefixed with 'autumn_' are reserved and will be stripped.
|
|
1119
1552
|
*/
|
|
@@ -1132,6 +1565,10 @@ type AttachParams = {
|
|
|
1132
1565
|
* Stripe tax rate ID (txr_...) to apply as the default tax rate on the created subscription, invoice, or checkout session line items.
|
|
1133
1566
|
*/
|
|
1134
1567
|
taxRateId?: string | undefined;
|
|
1568
|
+
/**
|
|
1569
|
+
* Currency to bill this attach in (e.g. usd, eur). Must match the customer's currency if they are already locked to one, and the plan must offer a paid price in it. Defaults to the customer's currency, then the org default.
|
|
1570
|
+
*/
|
|
1571
|
+
currency?: string | undefined;
|
|
1135
1572
|
};
|
|
1136
1573
|
/**
|
|
1137
1574
|
* Invoice details if an invoice was created. Only present when a charge was made.
|
|
@@ -1242,6 +1679,16 @@ declare const BillingUpdatePriceInterval: {
|
|
|
1242
1679
|
* Billing interval (e.g. 'month', 'year').
|
|
1243
1680
|
*/
|
|
1244
1681
|
type BillingUpdatePriceInterval = ClosedEnum<typeof BillingUpdatePriceInterval>;
|
|
1682
|
+
type BillingUpdateAdditionalCurrency = {
|
|
1683
|
+
/**
|
|
1684
|
+
* Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
|
|
1685
|
+
*/
|
|
1686
|
+
currency: string;
|
|
1687
|
+
/**
|
|
1688
|
+
* Price amount in this currency. Set explicitly per currency, not converted from the base amount.
|
|
1689
|
+
*/
|
|
1690
|
+
amount: number;
|
|
1691
|
+
};
|
|
1245
1692
|
/**
|
|
1246
1693
|
* Base price configuration for a plan.
|
|
1247
1694
|
*/
|
|
@@ -1258,6 +1705,10 @@ type BillingUpdateBasePrice = {
|
|
|
1258
1705
|
* Number of intervals per billing cycle. Defaults to 1.
|
|
1259
1706
|
*/
|
|
1260
1707
|
intervalCount?: number | undefined;
|
|
1708
|
+
/**
|
|
1709
|
+
* Base price amounts in additional currencies. The base 'amount' is in the org's default currency.
|
|
1710
|
+
*/
|
|
1711
|
+
additionalCurrencies?: Array<BillingUpdateAdditionalCurrency> | undefined;
|
|
1261
1712
|
};
|
|
1262
1713
|
/**
|
|
1263
1714
|
* Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
|
|
@@ -1290,10 +1741,38 @@ type BillingUpdateItemReset = {
|
|
|
1290
1741
|
*/
|
|
1291
1742
|
intervalCount?: number | undefined;
|
|
1292
1743
|
};
|
|
1293
|
-
type
|
|
1294
|
-
|
|
1295
|
-
|
|
1744
|
+
type BillingUpdateItemAdditionalCurrency = {
|
|
1745
|
+
/**
|
|
1746
|
+
* Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
|
|
1747
|
+
*/
|
|
1748
|
+
currency: string;
|
|
1749
|
+
/**
|
|
1750
|
+
* Price amount in this currency. Set explicitly per currency, not converted from the base amount.
|
|
1751
|
+
*/
|
|
1752
|
+
amount: number;
|
|
1753
|
+
};
|
|
1754
|
+
type BillingUpdateItemTierAdditionalCurrency = {
|
|
1755
|
+
/**
|
|
1756
|
+
* Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
|
|
1757
|
+
*/
|
|
1758
|
+
currency: string;
|
|
1759
|
+
/**
|
|
1760
|
+
* Per-unit amount for this tier in this currency.
|
|
1761
|
+
*/
|
|
1762
|
+
amount?: number | undefined;
|
|
1763
|
+
/**
|
|
1764
|
+
* Flat amount for this tier in this currency, if the tier uses one.
|
|
1765
|
+
*/
|
|
1766
|
+
flatAmount?: number | undefined;
|
|
1767
|
+
};
|
|
1768
|
+
type BillingUpdateItemTier = {
|
|
1769
|
+
to: number | string;
|
|
1770
|
+
amount?: number | undefined;
|
|
1296
1771
|
flatAmount?: number | undefined;
|
|
1772
|
+
/**
|
|
1773
|
+
* Per-currency amounts for this tier. Tier boundaries ('to') are shared across all currencies.
|
|
1774
|
+
*/
|
|
1775
|
+
additionalCurrencies?: Array<BillingUpdateItemTierAdditionalCurrency> | undefined;
|
|
1297
1776
|
};
|
|
1298
1777
|
declare const BillingUpdateItemTierBehavior: {
|
|
1299
1778
|
readonly Graduated: "graduated";
|
|
@@ -1334,6 +1813,10 @@ type BillingUpdateItemPrice = {
|
|
|
1334
1813
|
* Price per billing_units after included usage. Either 'amount' or 'tiers' is required.
|
|
1335
1814
|
*/
|
|
1336
1815
|
amount?: number | undefined;
|
|
1816
|
+
/**
|
|
1817
|
+
* Amounts in additional currencies for this flat price. The base 'amount' is in the org's default currency. Only valid with 'amount', not 'tiers'.
|
|
1818
|
+
*/
|
|
1819
|
+
additionalCurrencies?: Array<BillingUpdateItemAdditionalCurrency> | undefined;
|
|
1337
1820
|
/**
|
|
1338
1821
|
* Tiered pricing. Either 'amount' or 'tiers' is required.
|
|
1339
1822
|
*/
|
|
@@ -1496,10 +1979,38 @@ type BillingUpdateAddItemReset = {
|
|
|
1496
1979
|
*/
|
|
1497
1980
|
intervalCount?: number | undefined;
|
|
1498
1981
|
};
|
|
1982
|
+
type BillingUpdateAddItemAdditionalCurrency = {
|
|
1983
|
+
/**
|
|
1984
|
+
* Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
|
|
1985
|
+
*/
|
|
1986
|
+
currency: string;
|
|
1987
|
+
/**
|
|
1988
|
+
* Price amount in this currency. Set explicitly per currency, not converted from the base amount.
|
|
1989
|
+
*/
|
|
1990
|
+
amount: number;
|
|
1991
|
+
};
|
|
1992
|
+
type BillingUpdateAddItemTierAdditionalCurrency = {
|
|
1993
|
+
/**
|
|
1994
|
+
* Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
|
|
1995
|
+
*/
|
|
1996
|
+
currency: string;
|
|
1997
|
+
/**
|
|
1998
|
+
* Per-unit amount for this tier in this currency.
|
|
1999
|
+
*/
|
|
2000
|
+
amount?: number | undefined;
|
|
2001
|
+
/**
|
|
2002
|
+
* Flat amount for this tier in this currency, if the tier uses one.
|
|
2003
|
+
*/
|
|
2004
|
+
flatAmount?: number | undefined;
|
|
2005
|
+
};
|
|
1499
2006
|
type BillingUpdateAddItemTier = {
|
|
1500
2007
|
to: number | string;
|
|
1501
2008
|
amount?: number | undefined;
|
|
1502
2009
|
flatAmount?: number | undefined;
|
|
2010
|
+
/**
|
|
2011
|
+
* Per-currency amounts for this tier. Tier boundaries ('to') are shared across all currencies.
|
|
2012
|
+
*/
|
|
2013
|
+
additionalCurrencies?: Array<BillingUpdateAddItemTierAdditionalCurrency> | undefined;
|
|
1503
2014
|
};
|
|
1504
2015
|
declare const BillingUpdateAddItemTierBehavior: {
|
|
1505
2016
|
readonly Graduated: "graduated";
|
|
@@ -1540,6 +2051,10 @@ type BillingUpdateAddItemPrice = {
|
|
|
1540
2051
|
* Price per billing_units after included usage. Either 'amount' or 'tiers' is required.
|
|
1541
2052
|
*/
|
|
1542
2053
|
amount?: number | undefined;
|
|
2054
|
+
/**
|
|
2055
|
+
* Amounts in additional currencies for this flat price. The base 'amount' is in the org's default currency. Only valid with 'amount', not 'tiers'.
|
|
2056
|
+
*/
|
|
2057
|
+
additionalCurrencies?: Array<BillingUpdateAddItemAdditionalCurrency> | undefined;
|
|
1543
2058
|
/**
|
|
1544
2059
|
* Tiered pricing. Either 'amount' or 'tiers' is required.
|
|
1545
2060
|
*/
|
|
@@ -1971,163 +2486,514 @@ type BillingUpdateBillingControls = {
|
|
|
1971
2486
|
overageAllowed?: Array<BillingUpdateOverageAllowed> | undefined;
|
|
1972
2487
|
};
|
|
1973
2488
|
/**
|
|
1974
|
-
*
|
|
2489
|
+
* Billing interval (e.g. 'month', 'year').
|
|
1975
2490
|
*/
|
|
1976
|
-
|
|
2491
|
+
declare const BillingUpdatePriceUpsertLicenseInterval: {
|
|
2492
|
+
readonly OneOff: "one_off";
|
|
2493
|
+
readonly Week: "week";
|
|
2494
|
+
readonly Month: "month";
|
|
2495
|
+
readonly Quarter: "quarter";
|
|
2496
|
+
readonly SemiAnnual: "semi_annual";
|
|
2497
|
+
readonly Year: "year";
|
|
2498
|
+
};
|
|
2499
|
+
/**
|
|
2500
|
+
* Billing interval (e.g. 'month', 'year').
|
|
2501
|
+
*/
|
|
2502
|
+
type BillingUpdatePriceUpsertLicenseInterval = ClosedEnum<typeof BillingUpdatePriceUpsertLicenseInterval>;
|
|
2503
|
+
type BillingUpdateUpsertLicenseAdditionalCurrency = {
|
|
1977
2504
|
/**
|
|
1978
|
-
*
|
|
2505
|
+
* Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
|
|
1979
2506
|
*/
|
|
1980
|
-
|
|
2507
|
+
currency: string;
|
|
1981
2508
|
/**
|
|
1982
|
-
*
|
|
2509
|
+
* Price amount in this currency. Set explicitly per currency, not converted from the base amount.
|
|
1983
2510
|
*/
|
|
1984
|
-
|
|
2511
|
+
amount: number;
|
|
2512
|
+
};
|
|
2513
|
+
/**
|
|
2514
|
+
* Base price configuration for a plan.
|
|
2515
|
+
*/
|
|
2516
|
+
type BillingUpdateUpsertLicenseBasePrice = {
|
|
1985
2517
|
/**
|
|
1986
|
-
*
|
|
2518
|
+
* Base price amount for the plan.
|
|
1987
2519
|
*/
|
|
1988
|
-
|
|
2520
|
+
amount: number;
|
|
1989
2521
|
/**
|
|
1990
|
-
*
|
|
2522
|
+
* Billing interval (e.g. 'month', 'year').
|
|
1991
2523
|
*/
|
|
1992
|
-
|
|
2524
|
+
interval: BillingUpdatePriceUpsertLicenseInterval;
|
|
1993
2525
|
/**
|
|
1994
|
-
*
|
|
2526
|
+
* Number of intervals per billing cycle. Defaults to 1.
|
|
1995
2527
|
*/
|
|
1996
|
-
|
|
2528
|
+
intervalCount?: number | undefined;
|
|
1997
2529
|
/**
|
|
1998
|
-
*
|
|
2530
|
+
* Base price amounts in additional currencies. The base 'amount' is in the org's default currency.
|
|
1999
2531
|
*/
|
|
2000
|
-
|
|
2532
|
+
additionalCurrencies?: Array<BillingUpdateUpsertLicenseAdditionalCurrency> | undefined;
|
|
2001
2533
|
};
|
|
2002
2534
|
/**
|
|
2003
|
-
*
|
|
2535
|
+
* Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
|
|
2004
2536
|
*/
|
|
2005
|
-
|
|
2537
|
+
declare const BillingUpdateUpsertLicenseResetInterval: {
|
|
2538
|
+
readonly OneOff: "one_off";
|
|
2539
|
+
readonly Minute: "minute";
|
|
2540
|
+
readonly Hour: "hour";
|
|
2541
|
+
readonly Day: "day";
|
|
2542
|
+
readonly Week: "week";
|
|
2543
|
+
readonly Month: "month";
|
|
2544
|
+
readonly Quarter: "quarter";
|
|
2545
|
+
readonly SemiAnnual: "semi_annual";
|
|
2546
|
+
readonly Year: "year";
|
|
2547
|
+
};
|
|
2548
|
+
/**
|
|
2549
|
+
* Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
|
|
2550
|
+
*/
|
|
2551
|
+
type BillingUpdateUpsertLicenseResetInterval = ClosedEnum<typeof BillingUpdateUpsertLicenseResetInterval>;
|
|
2552
|
+
/**
|
|
2553
|
+
* Reset configuration for consumable features. Omit for non-consumable features like seats.
|
|
2554
|
+
*/
|
|
2555
|
+
type BillingUpdateUpsertLicenseReset = {
|
|
2006
2556
|
/**
|
|
2007
|
-
*
|
|
2557
|
+
* Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
|
|
2008
2558
|
*/
|
|
2009
|
-
|
|
2559
|
+
interval: BillingUpdateUpsertLicenseResetInterval;
|
|
2010
2560
|
/**
|
|
2011
|
-
*
|
|
2561
|
+
* Number of intervals between resets. Defaults to 1.
|
|
2012
2562
|
*/
|
|
2013
|
-
|
|
2563
|
+
intervalCount?: number | undefined;
|
|
2564
|
+
};
|
|
2565
|
+
type BillingUpdateUpsertLicenseAddItemAdditionalCurrency = {
|
|
2014
2566
|
/**
|
|
2015
|
-
*
|
|
2567
|
+
* Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
|
|
2016
2568
|
*/
|
|
2017
|
-
|
|
2569
|
+
currency: string;
|
|
2018
2570
|
/**
|
|
2019
|
-
*
|
|
2571
|
+
* Price amount in this currency. Set explicitly per currency, not converted from the base amount.
|
|
2020
2572
|
*/
|
|
2021
|
-
|
|
2573
|
+
amount: number;
|
|
2574
|
+
};
|
|
2575
|
+
type BillingUpdateUpsertLicenseTier = {
|
|
2576
|
+
to?: any | undefined;
|
|
2577
|
+
amount?: number | undefined;
|
|
2578
|
+
flatAmount?: number | undefined;
|
|
2022
2579
|
/**
|
|
2023
|
-
*
|
|
2580
|
+
* Per-currency amounts for this tier. Tier boundaries ('to') are shared across all currencies.
|
|
2024
2581
|
*/
|
|
2025
|
-
|
|
2582
|
+
additionalCurrencies?: Array<any> | undefined;
|
|
2583
|
+
};
|
|
2584
|
+
declare const BillingUpdateUpsertLicenseTierBehavior: {
|
|
2585
|
+
readonly Graduated: "graduated";
|
|
2586
|
+
readonly Volume: "volume";
|
|
2026
2587
|
};
|
|
2588
|
+
type BillingUpdateUpsertLicenseTierBehavior = ClosedEnum<typeof BillingUpdateUpsertLicenseTierBehavior>;
|
|
2027
2589
|
/**
|
|
2028
|
-
*
|
|
2590
|
+
* Billing interval. For consumable features, should match reset.interval.
|
|
2029
2591
|
*/
|
|
2030
|
-
declare const
|
|
2031
|
-
readonly
|
|
2032
|
-
readonly
|
|
2592
|
+
declare const BillingUpdateUpsertLicenseAddItemPriceInterval: {
|
|
2593
|
+
readonly OneOff: "one_off";
|
|
2594
|
+
readonly Week: "week";
|
|
2595
|
+
readonly Month: "month";
|
|
2596
|
+
readonly Quarter: "quarter";
|
|
2597
|
+
readonly SemiAnnual: "semi_annual";
|
|
2598
|
+
readonly Year: "year";
|
|
2033
2599
|
};
|
|
2034
2600
|
/**
|
|
2035
|
-
*
|
|
2601
|
+
* Billing interval. For consumable features, should match reset.interval.
|
|
2036
2602
|
*/
|
|
2037
|
-
type
|
|
2603
|
+
type BillingUpdateUpsertLicenseAddItemPriceInterval = ClosedEnum<typeof BillingUpdateUpsertLicenseAddItemPriceInterval>;
|
|
2038
2604
|
/**
|
|
2039
|
-
*
|
|
2605
|
+
* 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
|
|
2040
2606
|
*/
|
|
2041
|
-
declare const
|
|
2042
|
-
readonly
|
|
2043
|
-
readonly
|
|
2044
|
-
readonly Never: "never";
|
|
2607
|
+
declare const BillingUpdateUpsertLicenseAddItemBillingMethod: {
|
|
2608
|
+
readonly Prepaid: "prepaid";
|
|
2609
|
+
readonly UsageBased: "usage_based";
|
|
2045
2610
|
};
|
|
2046
2611
|
/**
|
|
2047
|
-
*
|
|
2612
|
+
* 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
|
|
2048
2613
|
*/
|
|
2049
|
-
type
|
|
2614
|
+
type BillingUpdateUpsertLicenseAddItemBillingMethod = ClosedEnum<typeof BillingUpdateUpsertLicenseAddItemBillingMethod>;
|
|
2050
2615
|
/**
|
|
2051
|
-
*
|
|
2616
|
+
* Pricing for usage beyond included units. Omit for free features.
|
|
2052
2617
|
*/
|
|
2053
|
-
type
|
|
2618
|
+
type BillingUpdateUpsertLicensePrice = {
|
|
2054
2619
|
/**
|
|
2055
|
-
*
|
|
2620
|
+
* Price per billing_units after included usage. Either 'amount' or 'tiers' is required.
|
|
2056
2621
|
*/
|
|
2057
|
-
|
|
2622
|
+
amount?: number | undefined;
|
|
2058
2623
|
/**
|
|
2059
|
-
* The
|
|
2624
|
+
* Amounts in additional currencies for this flat price. The base 'amount' is in the org's default currency. Only valid with 'amount', not 'tiers'.
|
|
2060
2625
|
*/
|
|
2061
|
-
|
|
2626
|
+
additionalCurrencies?: Array<BillingUpdateUpsertLicenseAddItemAdditionalCurrency> | undefined;
|
|
2627
|
+
/**
|
|
2628
|
+
* Tiered pricing. Either 'amount' or 'tiers' is required.
|
|
2629
|
+
*/
|
|
2630
|
+
tiers?: Array<BillingUpdateUpsertLicenseTier> | undefined;
|
|
2631
|
+
tierBehavior?: BillingUpdateUpsertLicenseTierBehavior | undefined;
|
|
2632
|
+
/**
|
|
2633
|
+
* Billing interval. For consumable features, should match reset.interval.
|
|
2634
|
+
*/
|
|
2635
|
+
interval: BillingUpdateUpsertLicenseAddItemPriceInterval;
|
|
2636
|
+
/**
|
|
2637
|
+
* Number of intervals per billing cycle. Defaults to 1.
|
|
2638
|
+
*/
|
|
2639
|
+
intervalCount?: number | undefined;
|
|
2640
|
+
/**
|
|
2641
|
+
* Units per price increment. Usage is rounded UP when billed (e.g. billing_units=100 means 101 rounds to 200).
|
|
2642
|
+
*/
|
|
2643
|
+
billingUnits?: number | undefined;
|
|
2644
|
+
/**
|
|
2645
|
+
* 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
|
|
2646
|
+
*/
|
|
2647
|
+
billingMethod: BillingUpdateUpsertLicenseAddItemBillingMethod;
|
|
2648
|
+
/**
|
|
2649
|
+
* Max units purchasable beyond included. E.g. included=100, max_purchase=300 allows 400 total. Null for no limit.
|
|
2650
|
+
*/
|
|
2651
|
+
maxPurchase?: number | null | undefined;
|
|
2062
2652
|
};
|
|
2063
2653
|
/**
|
|
2064
|
-
*
|
|
2654
|
+
* Billing behavior when quantity increases mid-cycle.
|
|
2065
2655
|
*/
|
|
2066
|
-
declare const
|
|
2067
|
-
readonly
|
|
2068
|
-
readonly
|
|
2069
|
-
readonly
|
|
2656
|
+
declare const BillingUpdateUpsertLicenseOnIncrease: {
|
|
2657
|
+
readonly BillImmediately: "bill_immediately";
|
|
2658
|
+
readonly ProrateImmediately: "prorate_immediately";
|
|
2659
|
+
readonly ProrateNextCycle: "prorate_next_cycle";
|
|
2660
|
+
readonly BillNextCycle: "bill_next_cycle";
|
|
2070
2661
|
};
|
|
2071
2662
|
/**
|
|
2072
|
-
*
|
|
2663
|
+
* Billing behavior when quantity increases mid-cycle.
|
|
2073
2664
|
*/
|
|
2074
|
-
type
|
|
2665
|
+
type BillingUpdateUpsertLicenseOnIncrease = ClosedEnum<typeof BillingUpdateUpsertLicenseOnIncrease>;
|
|
2075
2666
|
/**
|
|
2076
|
-
*
|
|
2667
|
+
* Credit behavior when quantity decreases mid-cycle.
|
|
2077
2668
|
*/
|
|
2078
|
-
declare const
|
|
2079
|
-
readonly
|
|
2080
|
-
readonly
|
|
2669
|
+
declare const BillingUpdateUpsertLicenseOnDecrease: {
|
|
2670
|
+
readonly Prorate: "prorate";
|
|
2671
|
+
readonly ProrateImmediately: "prorate_immediately";
|
|
2672
|
+
readonly ProrateNextCycle: "prorate_next_cycle";
|
|
2673
|
+
readonly None: "none";
|
|
2674
|
+
readonly NoProrations: "no_prorations";
|
|
2081
2675
|
};
|
|
2082
2676
|
/**
|
|
2083
|
-
*
|
|
2677
|
+
* Credit behavior when quantity decreases mid-cycle.
|
|
2084
2678
|
*/
|
|
2085
|
-
type
|
|
2679
|
+
type BillingUpdateUpsertLicenseOnDecrease = ClosedEnum<typeof BillingUpdateUpsertLicenseOnDecrease>;
|
|
2086
2680
|
/**
|
|
2087
|
-
*
|
|
2681
|
+
* Proration settings for prepaid features. Controls mid-cycle quantity change billing.
|
|
2088
2682
|
*/
|
|
2089
|
-
type
|
|
2683
|
+
type BillingUpdateUpsertLicenseProration = {
|
|
2090
2684
|
/**
|
|
2091
|
-
*
|
|
2685
|
+
* Billing behavior when quantity increases mid-cycle.
|
|
2092
2686
|
*/
|
|
2093
|
-
|
|
2687
|
+
onIncrease: BillingUpdateUpsertLicenseOnIncrease;
|
|
2688
|
+
/**
|
|
2689
|
+
* Credit behavior when quantity decreases mid-cycle.
|
|
2690
|
+
*/
|
|
2691
|
+
onDecrease: BillingUpdateUpsertLicenseOnDecrease;
|
|
2094
2692
|
};
|
|
2095
2693
|
/**
|
|
2096
|
-
*
|
|
2694
|
+
* When rolled over units expire.
|
|
2097
2695
|
*/
|
|
2098
|
-
|
|
2696
|
+
declare const BillingUpdateUpsertLicenseExpiryDurationType: {
|
|
2697
|
+
readonly Month: "month";
|
|
2698
|
+
readonly Forever: "forever";
|
|
2699
|
+
};
|
|
2700
|
+
/**
|
|
2701
|
+
* When rolled over units expire.
|
|
2702
|
+
*/
|
|
2703
|
+
type BillingUpdateUpsertLicenseExpiryDurationType = ClosedEnum<typeof BillingUpdateUpsertLicenseExpiryDurationType>;
|
|
2704
|
+
/**
|
|
2705
|
+
* Rollover config for unused units. If set, unused included units carry over.
|
|
2706
|
+
*/
|
|
2707
|
+
type BillingUpdateUpsertLicenseRollover = {
|
|
2099
2708
|
/**
|
|
2100
|
-
*
|
|
2709
|
+
* Max rollover units. Omit for unlimited rollover.
|
|
2101
2710
|
*/
|
|
2102
|
-
|
|
2711
|
+
max?: number | undefined;
|
|
2103
2712
|
/**
|
|
2104
|
-
*
|
|
2713
|
+
* Maximum rollover as a percentage (0-100) of included + prepaid grant. Mutually exclusive with max.
|
|
2105
2714
|
*/
|
|
2106
|
-
|
|
2107
|
-
};
|
|
2108
|
-
type UpdateSubscriptionParams = {
|
|
2715
|
+
maxPercentage?: number | undefined;
|
|
2109
2716
|
/**
|
|
2110
|
-
*
|
|
2717
|
+
* When rolled over units expire.
|
|
2111
2718
|
*/
|
|
2112
|
-
|
|
2719
|
+
expiryDurationType: BillingUpdateUpsertLicenseExpiryDurationType;
|
|
2113
2720
|
/**
|
|
2114
|
-
*
|
|
2721
|
+
* Number of periods before expiry.
|
|
2115
2722
|
*/
|
|
2116
|
-
|
|
2723
|
+
expiryDurationLength?: number | undefined;
|
|
2724
|
+
};
|
|
2725
|
+
/**
|
|
2726
|
+
* Configuration for a feature item in a plan, including usage limits, pricing, and rollover settings.
|
|
2727
|
+
*/
|
|
2728
|
+
type BillingUpdateUpsertLicensePlanItem = {
|
|
2117
2729
|
/**
|
|
2118
|
-
* The ID of the
|
|
2730
|
+
* The ID of the feature to configure.
|
|
2119
2731
|
*/
|
|
2120
|
-
|
|
2732
|
+
featureId: string;
|
|
2121
2733
|
/**
|
|
2122
|
-
*
|
|
2734
|
+
* Number of free units included. Balance resets to this each interval for consumable features.
|
|
2123
2735
|
*/
|
|
2124
|
-
|
|
2736
|
+
included?: number | undefined;
|
|
2125
2737
|
/**
|
|
2126
|
-
*
|
|
2738
|
+
* If true, customer has unlimited access to this feature.
|
|
2127
2739
|
*/
|
|
2128
|
-
|
|
2740
|
+
unlimited?: boolean | undefined;
|
|
2129
2741
|
/**
|
|
2130
|
-
*
|
|
2742
|
+
* Reset configuration for consumable features. Omit for non-consumable features like seats.
|
|
2743
|
+
*/
|
|
2744
|
+
reset?: BillingUpdateUpsertLicenseReset | undefined;
|
|
2745
|
+
/**
|
|
2746
|
+
* Pricing for usage beyond included units. Omit for free features.
|
|
2747
|
+
*/
|
|
2748
|
+
price?: BillingUpdateUpsertLicensePrice | undefined;
|
|
2749
|
+
/**
|
|
2750
|
+
* Proration settings for prepaid features. Controls mid-cycle quantity change billing.
|
|
2751
|
+
*/
|
|
2752
|
+
proration?: BillingUpdateUpsertLicenseProration | undefined;
|
|
2753
|
+
/**
|
|
2754
|
+
* Rollover config for unused units. If set, unused included units carry over.
|
|
2755
|
+
*/
|
|
2756
|
+
rollover?: BillingUpdateUpsertLicenseRollover | undefined;
|
|
2757
|
+
};
|
|
2758
|
+
/**
|
|
2759
|
+
* Match items with this billing method (prepaid or usage_based).
|
|
2760
|
+
*/
|
|
2761
|
+
declare const BillingUpdateUpsertLicenseRemoveItemBillingMethod: {
|
|
2762
|
+
readonly Prepaid: "prepaid";
|
|
2763
|
+
readonly UsageBased: "usage_based";
|
|
2764
|
+
};
|
|
2765
|
+
/**
|
|
2766
|
+
* Match items with this billing method (prepaid or usage_based).
|
|
2767
|
+
*/
|
|
2768
|
+
type BillingUpdateUpsertLicenseRemoveItemBillingMethod = ClosedEnum<typeof BillingUpdateUpsertLicenseRemoveItemBillingMethod>;
|
|
2769
|
+
declare const BillingUpdateIntervalUpsertLicenseRemoveItemEnum2: {
|
|
2770
|
+
readonly OneOff: "one_off";
|
|
2771
|
+
readonly Minute: "minute";
|
|
2772
|
+
readonly Hour: "hour";
|
|
2773
|
+
readonly Day: "day";
|
|
2774
|
+
readonly Week: "week";
|
|
2775
|
+
readonly Month: "month";
|
|
2776
|
+
readonly Quarter: "quarter";
|
|
2777
|
+
readonly SemiAnnual: "semi_annual";
|
|
2778
|
+
readonly Year: "year";
|
|
2779
|
+
};
|
|
2780
|
+
type BillingUpdateIntervalUpsertLicenseRemoveItemEnum2 = ClosedEnum<typeof BillingUpdateIntervalUpsertLicenseRemoveItemEnum2>;
|
|
2781
|
+
declare const BillingUpdateIntervalUpsertLicenseRemoveItemEnum1: {
|
|
2782
|
+
readonly OneOff: "one_off";
|
|
2783
|
+
readonly Week: "week";
|
|
2784
|
+
readonly Month: "month";
|
|
2785
|
+
readonly Quarter: "quarter";
|
|
2786
|
+
readonly SemiAnnual: "semi_annual";
|
|
2787
|
+
readonly Year: "year";
|
|
2788
|
+
};
|
|
2789
|
+
type BillingUpdateIntervalUpsertLicenseRemoveItemEnum1 = ClosedEnum<typeof BillingUpdateIntervalUpsertLicenseRemoveItemEnum1>;
|
|
2790
|
+
/**
|
|
2791
|
+
* Filter for matching plan items. All provided fields must match (AND).
|
|
2792
|
+
*/
|
|
2793
|
+
type BillingUpdateUpsertLicensePlanItemFilter = {
|
|
2794
|
+
/**
|
|
2795
|
+
* Match items linked to this feature.
|
|
2796
|
+
*/
|
|
2797
|
+
featureId?: string | undefined;
|
|
2798
|
+
/**
|
|
2799
|
+
* Match items with this billing method (prepaid or usage_based).
|
|
2800
|
+
*/
|
|
2801
|
+
billingMethod?: BillingUpdateUpsertLicenseRemoveItemBillingMethod | undefined;
|
|
2802
|
+
/**
|
|
2803
|
+
* Match items with this interval. Accepts either a BillingInterval (price-side) or a ResetInterval (reset-side, includes day/hour/minute) so price-less items keyed by reset.interval can be disambiguated.
|
|
2804
|
+
*/
|
|
2805
|
+
interval?: BillingUpdateIntervalUpsertLicenseRemoveItemEnum1 | BillingUpdateIntervalUpsertLicenseRemoveItemEnum2 | undefined;
|
|
2806
|
+
/**
|
|
2807
|
+
* Match items with this interval_count. Disambiguates between items that share an interval but differ in count.
|
|
2808
|
+
*/
|
|
2809
|
+
intervalCount?: number | undefined;
|
|
2810
|
+
};
|
|
2811
|
+
type BillingUpdateUpsertLicenseCustomize = {
|
|
2812
|
+
price?: BillingUpdateUpsertLicenseBasePrice | null | undefined;
|
|
2813
|
+
addItems?: Array<BillingUpdateUpsertLicensePlanItem> | undefined;
|
|
2814
|
+
removeItems?: Array<BillingUpdateUpsertLicensePlanItemFilter> | undefined;
|
|
2815
|
+
};
|
|
2816
|
+
type BillingUpdateUpsertLicense = {
|
|
2817
|
+
licensePlanId: string;
|
|
2818
|
+
included?: number | undefined;
|
|
2819
|
+
prepaidOnly?: boolean | undefined;
|
|
2820
|
+
customize?: BillingUpdateUpsertLicenseCustomize | null | undefined;
|
|
2821
|
+
metadata?: {
|
|
2822
|
+
[k: string]: any;
|
|
2823
|
+
} | undefined;
|
|
2824
|
+
};
|
|
2825
|
+
/**
|
|
2826
|
+
* Customize the plan to attach. Can override the price, items, licenses, free trial, or a combination.
|
|
2827
|
+
*/
|
|
2828
|
+
type BillingUpdateCustomize = {
|
|
2829
|
+
/**
|
|
2830
|
+
* Override the base price of the plan. Pass null to remove the base price.
|
|
2831
|
+
*/
|
|
2832
|
+
price?: BillingUpdateBasePrice | null | undefined;
|
|
2833
|
+
/**
|
|
2834
|
+
* Override the items in the plan (PUT-style — replaces all existing items). Mutually exclusive with add_items / remove_items / deprecated update_items.
|
|
2835
|
+
*/
|
|
2836
|
+
items?: Array<BillingUpdateItemPlanItem> | undefined;
|
|
2837
|
+
/**
|
|
2838
|
+
* Items to add to the plan.
|
|
2839
|
+
*/
|
|
2840
|
+
addItems?: Array<BillingUpdateAddItemPlanItem> | undefined;
|
|
2841
|
+
/**
|
|
2842
|
+
* Filters selecting items to remove from the plan.
|
|
2843
|
+
*/
|
|
2844
|
+
removeItems?: Array<BillingUpdatePlanItemFilter> | undefined;
|
|
2845
|
+
/**
|
|
2846
|
+
* Override the plan's default free trial. Pass an object to set a custom trial, or null to remove the trial entirely.
|
|
2847
|
+
*/
|
|
2848
|
+
freeTrial?: BillingUpdateFreeTrialParams | null | undefined;
|
|
2849
|
+
/**
|
|
2850
|
+
* Override the plan's billing controls (auto top-ups, spend limits, usage limits, usage alerts, overage allowed) for this customer.
|
|
2851
|
+
*/
|
|
2852
|
+
billingControls?: BillingUpdateBillingControls | undefined;
|
|
2853
|
+
/**
|
|
2854
|
+
* License links to add or override for this customer, keyed by license_plan_id. Omitted fields inherit the plan catalog link (included defaults to 1 when the license is not in the catalog). A bare entry restores the license to pure catalog inheritance.
|
|
2855
|
+
*/
|
|
2856
|
+
upsertLicenses?: Array<BillingUpdateUpsertLicense> | undefined;
|
|
2857
|
+
};
|
|
2858
|
+
/**
|
|
2859
|
+
* Invoice mode creates a draft or open invoice and sends it to the customer, instead of charging their card immediately. This uses Stripe's send_invoice collection method.
|
|
2860
|
+
*/
|
|
2861
|
+
type BillingUpdateInvoiceMode = {
|
|
2862
|
+
/**
|
|
2863
|
+
* When true, creates an invoice and sends it to the customer instead of charging their card immediately. Uses Stripe's send_invoice collection method.
|
|
2864
|
+
*/
|
|
2865
|
+
enabled: boolean;
|
|
2866
|
+
/**
|
|
2867
|
+
* If true, enables the plan immediately even though the invoice is not paid yet.
|
|
2868
|
+
*/
|
|
2869
|
+
enablePlanImmediately?: boolean | undefined;
|
|
2870
|
+
/**
|
|
2871
|
+
* If true, finalizes the invoice so it can be sent to the customer. If false, keeps it as a draft for manual review.
|
|
2872
|
+
*/
|
|
2873
|
+
finalize?: boolean | undefined;
|
|
2874
|
+
/**
|
|
2875
|
+
* ID of an invoice template (configured in billing settings) whose footer (e.g. bank details) is applied to the invoice.
|
|
2876
|
+
*/
|
|
2877
|
+
invoiceTemplateId?: string | undefined;
|
|
2878
|
+
/**
|
|
2879
|
+
* Number of days the customer has to pay the invoice before it is due (Stripe days_until_due).
|
|
2880
|
+
*/
|
|
2881
|
+
netTermsDays?: number | undefined;
|
|
2882
|
+
};
|
|
2883
|
+
/**
|
|
2884
|
+
* How to handle proration when updating an existing subscription. 'prorate_immediately' charges/credits prorated amounts now, 'none' skips creating any charges.
|
|
2885
|
+
*/
|
|
2886
|
+
declare const BillingUpdateProrationBehavior: {
|
|
2887
|
+
readonly ProrateImmediately: "prorate_immediately";
|
|
2888
|
+
readonly None: "none";
|
|
2889
|
+
};
|
|
2890
|
+
/**
|
|
2891
|
+
* How to handle proration when updating an existing subscription. 'prorate_immediately' charges/credits prorated amounts now, 'none' skips creating any charges.
|
|
2892
|
+
*/
|
|
2893
|
+
type BillingUpdateProrationBehavior = ClosedEnum<typeof BillingUpdateProrationBehavior>;
|
|
2894
|
+
/**
|
|
2895
|
+
* Controls when to return a checkout URL. 'always' returns a URL even if payment succeeds, 'if_required' only when payment action is needed, 'never' disables redirects.
|
|
2896
|
+
*/
|
|
2897
|
+
declare const BillingUpdateRedirectMode: {
|
|
2898
|
+
readonly Always: "always";
|
|
2899
|
+
readonly IfRequired: "if_required";
|
|
2900
|
+
readonly Never: "never";
|
|
2901
|
+
};
|
|
2902
|
+
/**
|
|
2903
|
+
* Controls when to return a checkout URL. 'always' returns a URL even if payment succeeds, 'if_required' only when payment action is needed, 'never' disables redirects.
|
|
2904
|
+
*/
|
|
2905
|
+
type BillingUpdateRedirectMode = ClosedEnum<typeof BillingUpdateRedirectMode>;
|
|
2906
|
+
/**
|
|
2907
|
+
* A discount to apply. Can be either a reward ID or a promotion code.
|
|
2908
|
+
*/
|
|
2909
|
+
type BillingUpdateAttachDiscount = {
|
|
2910
|
+
/**
|
|
2911
|
+
* The ID of the reward to apply as a discount.
|
|
2912
|
+
*/
|
|
2913
|
+
rewardId?: string | undefined;
|
|
2914
|
+
/**
|
|
2915
|
+
* The promotion code to apply as a discount.
|
|
2916
|
+
*/
|
|
2917
|
+
promotionCode?: string | undefined;
|
|
2918
|
+
};
|
|
2919
|
+
/**
|
|
2920
|
+
* Action to perform for cancellation. 'cancel_immediately' cancels now with prorated refund, 'cancel_end_of_cycle' cancels at period end, 'uncancel' reverses a pending cancellation.
|
|
2921
|
+
*/
|
|
2922
|
+
declare const BillingUpdateCancelAction: {
|
|
2923
|
+
readonly CancelImmediately: "cancel_immediately";
|
|
2924
|
+
readonly CancelEndOfCycle: "cancel_end_of_cycle";
|
|
2925
|
+
readonly Uncancel: "uncancel";
|
|
2926
|
+
};
|
|
2927
|
+
/**
|
|
2928
|
+
* Action to perform for cancellation. 'cancel_immediately' cancels now with prorated refund, 'cancel_end_of_cycle' cancels at period end, 'uncancel' reverses a pending cancellation.
|
|
2929
|
+
*/
|
|
2930
|
+
type BillingUpdateCancelAction = ClosedEnum<typeof BillingUpdateCancelAction>;
|
|
2931
|
+
/**
|
|
2932
|
+
* Controls how the last payment is refunded on immediate cancellation. 'prorated' refunds the unused portion, 'full' refunds the entire last payment.
|
|
2933
|
+
*/
|
|
2934
|
+
declare const BillingUpdateRefundLastPayment: {
|
|
2935
|
+
readonly Prorated: "prorated";
|
|
2936
|
+
readonly Full: "full";
|
|
2937
|
+
};
|
|
2938
|
+
/**
|
|
2939
|
+
* Controls how the last payment is refunded on immediate cancellation. 'prorated' refunds the unused portion, 'full' refunds the entire last payment.
|
|
2940
|
+
*/
|
|
2941
|
+
type BillingUpdateRefundLastPayment = ClosedEnum<typeof BillingUpdateRefundLastPayment>;
|
|
2942
|
+
/**
|
|
2943
|
+
* Controls whether balances should be recalculated during the subscription update.
|
|
2944
|
+
*/
|
|
2945
|
+
type BillingUpdateRecalculateBalances = {
|
|
2946
|
+
/**
|
|
2947
|
+
* If true, recalculates balances during the subscription update. Only applicable when updating feature quantities.
|
|
2948
|
+
*/
|
|
2949
|
+
enabled: boolean;
|
|
2950
|
+
};
|
|
2951
|
+
/**
|
|
2952
|
+
* Whether to carry over usages from the previous plan.
|
|
2953
|
+
*/
|
|
2954
|
+
type BillingUpdateCarryOverUsages = {
|
|
2955
|
+
/**
|
|
2956
|
+
* Whether to carry over usages from the previous plan.
|
|
2957
|
+
*/
|
|
2958
|
+
enabled: boolean;
|
|
2959
|
+
/**
|
|
2960
|
+
* The IDs of the features to carry over usages for. If left undefined, all consumable features will be carried over.
|
|
2961
|
+
*/
|
|
2962
|
+
featureIds?: Array<string> | undefined;
|
|
2963
|
+
};
|
|
2964
|
+
type BillingUpdateLicenseQuantity = {
|
|
2965
|
+
/**
|
|
2966
|
+
* The license plan to set seat quantity for.
|
|
2967
|
+
*/
|
|
2968
|
+
licensePlanId: string;
|
|
2969
|
+
/**
|
|
2970
|
+
* Total seats for the license, inclusive of the plan's included amount — seats beyond it are paid.
|
|
2971
|
+
*/
|
|
2972
|
+
quantity: number;
|
|
2973
|
+
};
|
|
2974
|
+
type UpdateSubscriptionParams = {
|
|
2975
|
+
/**
|
|
2976
|
+
* The ID of the customer to attach the plan to.
|
|
2977
|
+
*/
|
|
2978
|
+
customerId: string;
|
|
2979
|
+
/**
|
|
2980
|
+
* The ID of the entity to attach the plan to.
|
|
2981
|
+
*/
|
|
2982
|
+
entityId?: string | undefined;
|
|
2983
|
+
/**
|
|
2984
|
+
* The ID of the plan to update. Optional if subscription_id is provided, or if the customer has only one product.
|
|
2985
|
+
*/
|
|
2986
|
+
planId?: string | undefined;
|
|
2987
|
+
/**
|
|
2988
|
+
* If this plan contains prepaid features, use this field to specify the quantity of each prepaid feature. This quantity includes the included amount and billing units defined when setting up the plan.
|
|
2989
|
+
*/
|
|
2990
|
+
featureQuantities?: Array<BillingUpdateFeatureQuantity> | undefined;
|
|
2991
|
+
/**
|
|
2992
|
+
* The version of the plan to attach.
|
|
2993
|
+
*/
|
|
2994
|
+
version?: number | undefined;
|
|
2995
|
+
/**
|
|
2996
|
+
* Customize the plan to attach. Can override the price, items, licenses, free trial, or a combination.
|
|
2131
2997
|
*/
|
|
2132
2998
|
customize?: BillingUpdateCustomize | undefined;
|
|
2133
2999
|
/**
|
|
@@ -2174,6 +3040,10 @@ type UpdateSubscriptionParams = {
|
|
|
2174
3040
|
* Whether to carry over usages from the previous plan.
|
|
2175
3041
|
*/
|
|
2176
3042
|
carryOverUsages?: BillingUpdateCarryOverUsages | undefined;
|
|
3043
|
+
/**
|
|
3044
|
+
* Total seat quantities (inclusive of the license's included count) per license plan offered by this plan. Licenses not listed keep their current paid quantity.
|
|
3045
|
+
*/
|
|
3046
|
+
licenseQuantities?: Array<BillingUpdateLicenseQuantity> | undefined;
|
|
2177
3047
|
};
|
|
2178
3048
|
/**
|
|
2179
3049
|
* Invoice details if an invoice was created. Only present when a charge was made.
|
|
@@ -3952,6 +4822,10 @@ type CustomerData = {
|
|
|
3952
4822
|
* Whether to send email receipts to this customer
|
|
3953
4823
|
*/
|
|
3954
4824
|
sendEmailReceipts?: boolean | undefined;
|
|
4825
|
+
/**
|
|
4826
|
+
* Currency to bill this customer in (e.g. usd, eur). Defaults to the organization's default currency.
|
|
4827
|
+
*/
|
|
4828
|
+
currency?: string | null | undefined;
|
|
3955
4829
|
/**
|
|
3956
4830
|
* Billing controls for the customer (auto top-ups, etc.)
|
|
3957
4831
|
*/
|
|
@@ -4690,6 +5564,16 @@ declare const MultiAttachPriceInterval: {
|
|
|
4690
5564
|
* Billing interval (e.g. 'month', 'year').
|
|
4691
5565
|
*/
|
|
4692
5566
|
type MultiAttachPriceInterval = ClosedEnum<typeof MultiAttachPriceInterval>;
|
|
5567
|
+
type MultiAttachAdditionalCurrency = {
|
|
5568
|
+
/**
|
|
5569
|
+
* Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
|
|
5570
|
+
*/
|
|
5571
|
+
currency: string;
|
|
5572
|
+
/**
|
|
5573
|
+
* Price amount in this currency. Set explicitly per currency, not converted from the base amount.
|
|
5574
|
+
*/
|
|
5575
|
+
amount: number;
|
|
5576
|
+
};
|
|
4693
5577
|
/**
|
|
4694
5578
|
* Base price configuration for a plan.
|
|
4695
5579
|
*/
|
|
@@ -4706,6 +5590,10 @@ type MultiAttachBasePrice = {
|
|
|
4706
5590
|
* Number of intervals per billing cycle. Defaults to 1.
|
|
4707
5591
|
*/
|
|
4708
5592
|
intervalCount?: number | undefined;
|
|
5593
|
+
/**
|
|
5594
|
+
* Base price amounts in additional currencies. The base 'amount' is in the org's default currency.
|
|
5595
|
+
*/
|
|
5596
|
+
additionalCurrencies?: Array<MultiAttachAdditionalCurrency> | undefined;
|
|
4709
5597
|
};
|
|
4710
5598
|
/**
|
|
4711
5599
|
* Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
|
|
@@ -4738,10 +5626,29 @@ type MultiAttachReset = {
|
|
|
4738
5626
|
*/
|
|
4739
5627
|
intervalCount?: number | undefined;
|
|
4740
5628
|
};
|
|
5629
|
+
type MultiAttachItemAdditionalCurrency = {
|
|
5630
|
+
/**
|
|
5631
|
+
* Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
|
|
5632
|
+
*/
|
|
5633
|
+
currency: string;
|
|
5634
|
+
/**
|
|
5635
|
+
* Price amount in this currency. Set explicitly per currency, not converted from the base amount.
|
|
5636
|
+
*/
|
|
5637
|
+
amount: number;
|
|
5638
|
+
};
|
|
5639
|
+
type MultiAttachTierAdditionalCurrency = {
|
|
5640
|
+
currency?: any | undefined;
|
|
5641
|
+
amount?: any | undefined;
|
|
5642
|
+
flatAmount?: any | undefined;
|
|
5643
|
+
};
|
|
4741
5644
|
type MultiAttachTier = {
|
|
4742
5645
|
to: number | string;
|
|
4743
5646
|
amount?: number | undefined;
|
|
4744
5647
|
flatAmount?: number | undefined;
|
|
5648
|
+
/**
|
|
5649
|
+
* Per-currency amounts for this tier. Tier boundaries ('to') are shared across all currencies.
|
|
5650
|
+
*/
|
|
5651
|
+
additionalCurrencies?: Array<MultiAttachTierAdditionalCurrency> | undefined;
|
|
4745
5652
|
};
|
|
4746
5653
|
declare const MultiAttachTierBehavior: {
|
|
4747
5654
|
readonly Graduated: "graduated";
|
|
@@ -4782,6 +5689,10 @@ type MultiAttachPrice = {
|
|
|
4782
5689
|
* Price per billing_units after included usage. Either 'amount' or 'tiers' is required.
|
|
4783
5690
|
*/
|
|
4784
5691
|
amount?: number | undefined;
|
|
5692
|
+
/**
|
|
5693
|
+
* Amounts in additional currencies for this flat price. The base 'amount' is in the org's default currency. Only valid with 'amount', not 'tiers'.
|
|
5694
|
+
*/
|
|
5695
|
+
additionalCurrencies?: Array<MultiAttachItemAdditionalCurrency> | undefined;
|
|
4785
5696
|
/**
|
|
4786
5697
|
* Tiered pricing. Either 'amount' or 'tiers' is required.
|
|
4787
5698
|
*/
|
|
@@ -4914,7 +5825,7 @@ type MultiAttachPlanItem = {
|
|
|
4914
5825
|
rollover?: MultiAttachRollover | undefined;
|
|
4915
5826
|
};
|
|
4916
5827
|
/**
|
|
4917
|
-
* Customize the plan to attach. Can override the price or
|
|
5828
|
+
* Customize the plan to attach. Can override the price, items, or licenses.
|
|
4918
5829
|
*/
|
|
4919
5830
|
type MultiAttachCustomize = {
|
|
4920
5831
|
/**
|
|
@@ -4949,7 +5860,7 @@ type MultiAttachPlan = {
|
|
|
4949
5860
|
*/
|
|
4950
5861
|
planId: string;
|
|
4951
5862
|
/**
|
|
4952
|
-
* Customize the plan to attach. Can override the price or
|
|
5863
|
+
* Customize the plan to attach. Can override the price, items, or licenses.
|
|
4953
5864
|
*/
|
|
4954
5865
|
customize?: MultiAttachCustomize | undefined;
|
|
4955
5866
|
/**
|
|
@@ -5232,6 +6143,10 @@ type MultiAttachParams = {
|
|
|
5232
6143
|
* Free trial configuration applied to all plans. Pass an object to set a custom trial, or null to remove any trial.
|
|
5233
6144
|
*/
|
|
5234
6145
|
freeTrial?: MultiAttachFreeTrialParams | null | undefined;
|
|
6146
|
+
/**
|
|
6147
|
+
* Currency to bill this multi-attach in (e.g. usd, eur). Must match the customer's currency if they are already locked to one, and every plan must offer a paid price in it. Defaults to the customer's currency, then the org default.
|
|
6148
|
+
*/
|
|
6149
|
+
currency?: string | undefined;
|
|
5235
6150
|
/**
|
|
5236
6151
|
* Invoice mode creates a draft or open invoice and sends it to the customer, instead of charging their card immediately.
|
|
5237
6152
|
*/
|
|
@@ -5405,9 +6320,19 @@ declare const PreviewAttachPriceInterval: {
|
|
|
5405
6320
|
* Billing interval (e.g. 'month', 'year').
|
|
5406
6321
|
*/
|
|
5407
6322
|
type PreviewAttachPriceInterval = ClosedEnum<typeof PreviewAttachPriceInterval>;
|
|
5408
|
-
|
|
5409
|
-
|
|
5410
|
-
|
|
6323
|
+
type PreviewAttachAdditionalCurrency = {
|
|
6324
|
+
/**
|
|
6325
|
+
* Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
|
|
6326
|
+
*/
|
|
6327
|
+
currency: string;
|
|
6328
|
+
/**
|
|
6329
|
+
* Price amount in this currency. Set explicitly per currency, not converted from the base amount.
|
|
6330
|
+
*/
|
|
6331
|
+
amount: number;
|
|
6332
|
+
};
|
|
6333
|
+
/**
|
|
6334
|
+
* Base price configuration for a plan.
|
|
6335
|
+
*/
|
|
5411
6336
|
type PreviewAttachBasePrice = {
|
|
5412
6337
|
/**
|
|
5413
6338
|
* Base price amount for the plan.
|
|
@@ -5421,6 +6346,10 @@ type PreviewAttachBasePrice = {
|
|
|
5421
6346
|
* Number of intervals per billing cycle. Defaults to 1.
|
|
5422
6347
|
*/
|
|
5423
6348
|
intervalCount?: number | undefined;
|
|
6349
|
+
/**
|
|
6350
|
+
* Base price amounts in additional currencies. The base 'amount' is in the org's default currency.
|
|
6351
|
+
*/
|
|
6352
|
+
additionalCurrencies?: Array<PreviewAttachAdditionalCurrency> | undefined;
|
|
5424
6353
|
};
|
|
5425
6354
|
/**
|
|
5426
6355
|
* Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
|
|
@@ -5453,10 +6382,38 @@ type PreviewAttachItemReset = {
|
|
|
5453
6382
|
*/
|
|
5454
6383
|
intervalCount?: number | undefined;
|
|
5455
6384
|
};
|
|
6385
|
+
type PreviewAttachItemAdditionalCurrency = {
|
|
6386
|
+
/**
|
|
6387
|
+
* Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
|
|
6388
|
+
*/
|
|
6389
|
+
currency: string;
|
|
6390
|
+
/**
|
|
6391
|
+
* Price amount in this currency. Set explicitly per currency, not converted from the base amount.
|
|
6392
|
+
*/
|
|
6393
|
+
amount: number;
|
|
6394
|
+
};
|
|
6395
|
+
type PreviewAttachItemTierAdditionalCurrency = {
|
|
6396
|
+
/**
|
|
6397
|
+
* Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
|
|
6398
|
+
*/
|
|
6399
|
+
currency: string;
|
|
6400
|
+
/**
|
|
6401
|
+
* Per-unit amount for this tier in this currency.
|
|
6402
|
+
*/
|
|
6403
|
+
amount?: number | undefined;
|
|
6404
|
+
/**
|
|
6405
|
+
* Flat amount for this tier in this currency, if the tier uses one.
|
|
6406
|
+
*/
|
|
6407
|
+
flatAmount?: number | undefined;
|
|
6408
|
+
};
|
|
5456
6409
|
type PreviewAttachItemTier = {
|
|
5457
6410
|
to: number | string;
|
|
5458
6411
|
amount?: number | undefined;
|
|
5459
6412
|
flatAmount?: number | undefined;
|
|
6413
|
+
/**
|
|
6414
|
+
* Per-currency amounts for this tier. Tier boundaries ('to') are shared across all currencies.
|
|
6415
|
+
*/
|
|
6416
|
+
additionalCurrencies?: Array<PreviewAttachItemTierAdditionalCurrency> | undefined;
|
|
5460
6417
|
};
|
|
5461
6418
|
declare const PreviewAttachItemTierBehavior: {
|
|
5462
6419
|
readonly Graduated: "graduated";
|
|
@@ -5497,6 +6454,10 @@ type PreviewAttachItemPrice = {
|
|
|
5497
6454
|
* Price per billing_units after included usage. Either 'amount' or 'tiers' is required.
|
|
5498
6455
|
*/
|
|
5499
6456
|
amount?: number | undefined;
|
|
6457
|
+
/**
|
|
6458
|
+
* Amounts in additional currencies for this flat price. The base 'amount' is in the org's default currency. Only valid with 'amount', not 'tiers'.
|
|
6459
|
+
*/
|
|
6460
|
+
additionalCurrencies?: Array<PreviewAttachItemAdditionalCurrency> | undefined;
|
|
5500
6461
|
/**
|
|
5501
6462
|
* Tiered pricing. Either 'amount' or 'tiers' is required.
|
|
5502
6463
|
*/
|
|
@@ -5659,10 +6620,38 @@ type PreviewAttachAddItemReset = {
|
|
|
5659
6620
|
*/
|
|
5660
6621
|
intervalCount?: number | undefined;
|
|
5661
6622
|
};
|
|
6623
|
+
type PreviewAttachAddItemAdditionalCurrency = {
|
|
6624
|
+
/**
|
|
6625
|
+
* Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
|
|
6626
|
+
*/
|
|
6627
|
+
currency: string;
|
|
6628
|
+
/**
|
|
6629
|
+
* Price amount in this currency. Set explicitly per currency, not converted from the base amount.
|
|
6630
|
+
*/
|
|
6631
|
+
amount: number;
|
|
6632
|
+
};
|
|
6633
|
+
type PreviewAttachAddItemTierAdditionalCurrency = {
|
|
6634
|
+
/**
|
|
6635
|
+
* Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
|
|
6636
|
+
*/
|
|
6637
|
+
currency: string;
|
|
6638
|
+
/**
|
|
6639
|
+
* Per-unit amount for this tier in this currency.
|
|
6640
|
+
*/
|
|
6641
|
+
amount?: number | undefined;
|
|
6642
|
+
/**
|
|
6643
|
+
* Flat amount for this tier in this currency, if the tier uses one.
|
|
6644
|
+
*/
|
|
6645
|
+
flatAmount?: number | undefined;
|
|
6646
|
+
};
|
|
5662
6647
|
type PreviewAttachAddItemTier = {
|
|
5663
6648
|
to: number | string;
|
|
5664
6649
|
amount?: number | undefined;
|
|
5665
6650
|
flatAmount?: number | undefined;
|
|
6651
|
+
/**
|
|
6652
|
+
* Per-currency amounts for this tier. Tier boundaries ('to') are shared across all currencies.
|
|
6653
|
+
*/
|
|
6654
|
+
additionalCurrencies?: Array<PreviewAttachAddItemTierAdditionalCurrency> | undefined;
|
|
5666
6655
|
};
|
|
5667
6656
|
declare const PreviewAttachAddItemTierBehavior: {
|
|
5668
6657
|
readonly Graduated: "graduated";
|
|
@@ -5703,6 +6692,10 @@ type PreviewAttachAddItemPrice = {
|
|
|
5703
6692
|
* Price per billing_units after included usage. Either 'amount' or 'tiers' is required.
|
|
5704
6693
|
*/
|
|
5705
6694
|
amount?: number | undefined;
|
|
6695
|
+
/**
|
|
6696
|
+
* Amounts in additional currencies for this flat price. The base 'amount' is in the org's default currency. Only valid with 'amount', not 'tiers'.
|
|
6697
|
+
*/
|
|
6698
|
+
additionalCurrencies?: Array<PreviewAttachAddItemAdditionalCurrency> | undefined;
|
|
5706
6699
|
/**
|
|
5707
6700
|
* Tiered pricing. Either 'amount' or 'tiers' is required.
|
|
5708
6701
|
*/
|
|
@@ -6134,153 +7127,504 @@ type PreviewAttachBillingControls = {
|
|
|
6134
7127
|
overageAllowed?: Array<PreviewAttachOverageAllowed> | undefined;
|
|
6135
7128
|
};
|
|
6136
7129
|
/**
|
|
6137
|
-
*
|
|
7130
|
+
* Billing interval (e.g. 'month', 'year').
|
|
6138
7131
|
*/
|
|
6139
|
-
|
|
7132
|
+
declare const PreviewAttachPriceUpsertLicenseInterval: {
|
|
7133
|
+
readonly OneOff: "one_off";
|
|
7134
|
+
readonly Week: "week";
|
|
7135
|
+
readonly Month: "month";
|
|
7136
|
+
readonly Quarter: "quarter";
|
|
7137
|
+
readonly SemiAnnual: "semi_annual";
|
|
7138
|
+
readonly Year: "year";
|
|
7139
|
+
};
|
|
7140
|
+
/**
|
|
7141
|
+
* Billing interval (e.g. 'month', 'year').
|
|
7142
|
+
*/
|
|
7143
|
+
type PreviewAttachPriceUpsertLicenseInterval = ClosedEnum<typeof PreviewAttachPriceUpsertLicenseInterval>;
|
|
7144
|
+
type PreviewAttachUpsertLicenseAdditionalCurrency = {
|
|
6140
7145
|
/**
|
|
6141
|
-
*
|
|
7146
|
+
* Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
|
|
6142
7147
|
*/
|
|
6143
|
-
|
|
7148
|
+
currency: string;
|
|
6144
7149
|
/**
|
|
6145
|
-
*
|
|
7150
|
+
* Price amount in this currency. Set explicitly per currency, not converted from the base amount.
|
|
6146
7151
|
*/
|
|
6147
|
-
|
|
7152
|
+
amount: number;
|
|
7153
|
+
};
|
|
7154
|
+
/**
|
|
7155
|
+
* Base price configuration for a plan.
|
|
7156
|
+
*/
|
|
7157
|
+
type PreviewAttachUpsertLicenseBasePrice = {
|
|
6148
7158
|
/**
|
|
6149
|
-
*
|
|
7159
|
+
* Base price amount for the plan.
|
|
6150
7160
|
*/
|
|
6151
|
-
|
|
7161
|
+
amount: number;
|
|
6152
7162
|
/**
|
|
6153
|
-
*
|
|
7163
|
+
* Billing interval (e.g. 'month', 'year').
|
|
6154
7164
|
*/
|
|
6155
|
-
|
|
7165
|
+
interval: PreviewAttachPriceUpsertLicenseInterval;
|
|
6156
7166
|
/**
|
|
6157
|
-
*
|
|
7167
|
+
* Number of intervals per billing cycle. Defaults to 1.
|
|
6158
7168
|
*/
|
|
6159
|
-
|
|
7169
|
+
intervalCount?: number | undefined;
|
|
6160
7170
|
/**
|
|
6161
|
-
*
|
|
7171
|
+
* Base price amounts in additional currencies. The base 'amount' is in the org's default currency.
|
|
6162
7172
|
*/
|
|
6163
|
-
|
|
7173
|
+
additionalCurrencies?: Array<PreviewAttachUpsertLicenseAdditionalCurrency> | undefined;
|
|
6164
7174
|
};
|
|
6165
7175
|
/**
|
|
6166
|
-
*
|
|
7176
|
+
* Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
|
|
6167
7177
|
*/
|
|
6168
|
-
|
|
7178
|
+
declare const PreviewAttachUpsertLicenseResetInterval: {
|
|
7179
|
+
readonly OneOff: "one_off";
|
|
7180
|
+
readonly Minute: "minute";
|
|
7181
|
+
readonly Hour: "hour";
|
|
7182
|
+
readonly Day: "day";
|
|
7183
|
+
readonly Week: "week";
|
|
7184
|
+
readonly Month: "month";
|
|
7185
|
+
readonly Quarter: "quarter";
|
|
7186
|
+
readonly SemiAnnual: "semi_annual";
|
|
7187
|
+
readonly Year: "year";
|
|
7188
|
+
};
|
|
7189
|
+
/**
|
|
7190
|
+
* Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
|
|
7191
|
+
*/
|
|
7192
|
+
type PreviewAttachUpsertLicenseResetInterval = ClosedEnum<typeof PreviewAttachUpsertLicenseResetInterval>;
|
|
7193
|
+
/**
|
|
7194
|
+
* Reset configuration for consumable features. Omit for non-consumable features like seats.
|
|
7195
|
+
*/
|
|
7196
|
+
type PreviewAttachUpsertLicenseReset = {
|
|
6169
7197
|
/**
|
|
6170
|
-
*
|
|
7198
|
+
* Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
|
|
6171
7199
|
*/
|
|
6172
|
-
|
|
7200
|
+
interval: PreviewAttachUpsertLicenseResetInterval;
|
|
6173
7201
|
/**
|
|
6174
|
-
*
|
|
7202
|
+
* Number of intervals between resets. Defaults to 1.
|
|
6175
7203
|
*/
|
|
6176
|
-
|
|
7204
|
+
intervalCount?: number | undefined;
|
|
7205
|
+
};
|
|
7206
|
+
type PreviewAttachUpsertLicenseAddItemAdditionalCurrency = {
|
|
6177
7207
|
/**
|
|
6178
|
-
*
|
|
7208
|
+
* Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
|
|
6179
7209
|
*/
|
|
6180
|
-
|
|
7210
|
+
currency: string;
|
|
6181
7211
|
/**
|
|
6182
|
-
*
|
|
7212
|
+
* Price amount in this currency. Set explicitly per currency, not converted from the base amount.
|
|
6183
7213
|
*/
|
|
6184
|
-
|
|
7214
|
+
amount: number;
|
|
7215
|
+
};
|
|
7216
|
+
type PreviewAttachUpsertLicenseTier = {
|
|
7217
|
+
to?: any | undefined;
|
|
7218
|
+
amount?: number | undefined;
|
|
7219
|
+
flatAmount?: number | undefined;
|
|
6185
7220
|
/**
|
|
6186
|
-
*
|
|
7221
|
+
* Per-currency amounts for this tier. Tier boundaries ('to') are shared across all currencies.
|
|
6187
7222
|
*/
|
|
6188
|
-
|
|
7223
|
+
additionalCurrencies?: Array<any> | undefined;
|
|
7224
|
+
};
|
|
7225
|
+
declare const PreviewAttachUpsertLicenseTierBehavior: {
|
|
7226
|
+
readonly Graduated: "graduated";
|
|
7227
|
+
readonly Volume: "volume";
|
|
6189
7228
|
};
|
|
7229
|
+
type PreviewAttachUpsertLicenseTierBehavior = ClosedEnum<typeof PreviewAttachUpsertLicenseTierBehavior>;
|
|
6190
7230
|
/**
|
|
6191
|
-
*
|
|
7231
|
+
* Billing interval. For consumable features, should match reset.interval.
|
|
6192
7232
|
*/
|
|
6193
|
-
declare const
|
|
6194
|
-
readonly
|
|
6195
|
-
readonly
|
|
7233
|
+
declare const PreviewAttachUpsertLicenseAddItemPriceInterval: {
|
|
7234
|
+
readonly OneOff: "one_off";
|
|
7235
|
+
readonly Week: "week";
|
|
7236
|
+
readonly Month: "month";
|
|
7237
|
+
readonly Quarter: "quarter";
|
|
7238
|
+
readonly SemiAnnual: "semi_annual";
|
|
7239
|
+
readonly Year: "year";
|
|
6196
7240
|
};
|
|
6197
7241
|
/**
|
|
6198
|
-
*
|
|
7242
|
+
* Billing interval. For consumable features, should match reset.interval.
|
|
6199
7243
|
*/
|
|
6200
|
-
type
|
|
7244
|
+
type PreviewAttachUpsertLicenseAddItemPriceInterval = ClosedEnum<typeof PreviewAttachUpsertLicenseAddItemPriceInterval>;
|
|
6201
7245
|
/**
|
|
6202
|
-
*
|
|
7246
|
+
* 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
|
|
6203
7247
|
*/
|
|
6204
|
-
declare const
|
|
6205
|
-
readonly
|
|
6206
|
-
readonly
|
|
6207
|
-
readonly Never: "never";
|
|
7248
|
+
declare const PreviewAttachUpsertLicenseAddItemBillingMethod: {
|
|
7249
|
+
readonly Prepaid: "prepaid";
|
|
7250
|
+
readonly UsageBased: "usage_based";
|
|
6208
7251
|
};
|
|
6209
7252
|
/**
|
|
6210
|
-
*
|
|
7253
|
+
* 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
|
|
6211
7254
|
*/
|
|
6212
|
-
type
|
|
7255
|
+
type PreviewAttachUpsertLicenseAddItemBillingMethod = ClosedEnum<typeof PreviewAttachUpsertLicenseAddItemBillingMethod>;
|
|
6213
7256
|
/**
|
|
6214
|
-
*
|
|
7257
|
+
* Pricing for usage beyond included units. Omit for free features.
|
|
6215
7258
|
*/
|
|
6216
|
-
type
|
|
7259
|
+
type PreviewAttachUpsertLicensePrice = {
|
|
6217
7260
|
/**
|
|
6218
|
-
*
|
|
7261
|
+
* Price per billing_units after included usage. Either 'amount' or 'tiers' is required.
|
|
6219
7262
|
*/
|
|
6220
|
-
|
|
7263
|
+
amount?: number | undefined;
|
|
6221
7264
|
/**
|
|
6222
|
-
* The
|
|
7265
|
+
* Amounts in additional currencies for this flat price. The base 'amount' is in the org's default currency. Only valid with 'amount', not 'tiers'.
|
|
6223
7266
|
*/
|
|
6224
|
-
|
|
7267
|
+
additionalCurrencies?: Array<PreviewAttachUpsertLicenseAddItemAdditionalCurrency> | undefined;
|
|
7268
|
+
/**
|
|
7269
|
+
* Tiered pricing. Either 'amount' or 'tiers' is required.
|
|
7270
|
+
*/
|
|
7271
|
+
tiers?: Array<PreviewAttachUpsertLicenseTier> | undefined;
|
|
7272
|
+
tierBehavior?: PreviewAttachUpsertLicenseTierBehavior | undefined;
|
|
7273
|
+
/**
|
|
7274
|
+
* Billing interval. For consumable features, should match reset.interval.
|
|
7275
|
+
*/
|
|
7276
|
+
interval: PreviewAttachUpsertLicenseAddItemPriceInterval;
|
|
7277
|
+
/**
|
|
7278
|
+
* Number of intervals per billing cycle. Defaults to 1.
|
|
7279
|
+
*/
|
|
7280
|
+
intervalCount?: number | undefined;
|
|
7281
|
+
/**
|
|
7282
|
+
* Units per price increment. Usage is rounded UP when billed (e.g. billing_units=100 means 101 rounds to 200).
|
|
7283
|
+
*/
|
|
7284
|
+
billingUnits?: number | undefined;
|
|
7285
|
+
/**
|
|
7286
|
+
* 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
|
|
7287
|
+
*/
|
|
7288
|
+
billingMethod: PreviewAttachUpsertLicenseAddItemBillingMethod;
|
|
7289
|
+
/**
|
|
7290
|
+
* Max units purchasable beyond included. E.g. included=100, max_purchase=300 allows 400 total. Null for no limit.
|
|
7291
|
+
*/
|
|
7292
|
+
maxPurchase?: number | null | undefined;
|
|
6225
7293
|
};
|
|
6226
7294
|
/**
|
|
6227
|
-
*
|
|
7295
|
+
* Billing behavior when quantity increases mid-cycle.
|
|
6228
7296
|
*/
|
|
6229
|
-
declare const
|
|
6230
|
-
readonly
|
|
6231
|
-
readonly
|
|
7297
|
+
declare const PreviewAttachUpsertLicenseOnIncrease: {
|
|
7298
|
+
readonly BillImmediately: "bill_immediately";
|
|
7299
|
+
readonly ProrateImmediately: "prorate_immediately";
|
|
7300
|
+
readonly ProrateNextCycle: "prorate_next_cycle";
|
|
7301
|
+
readonly BillNextCycle: "bill_next_cycle";
|
|
6232
7302
|
};
|
|
6233
7303
|
/**
|
|
6234
|
-
*
|
|
7304
|
+
* Billing behavior when quantity increases mid-cycle.
|
|
6235
7305
|
*/
|
|
6236
|
-
type
|
|
6237
|
-
|
|
6238
|
-
|
|
6239
|
-
|
|
6240
|
-
|
|
6241
|
-
|
|
6242
|
-
|
|
6243
|
-
|
|
6244
|
-
|
|
6245
|
-
|
|
7306
|
+
type PreviewAttachUpsertLicenseOnIncrease = ClosedEnum<typeof PreviewAttachUpsertLicenseOnIncrease>;
|
|
7307
|
+
/**
|
|
7308
|
+
* Credit behavior when quantity decreases mid-cycle.
|
|
7309
|
+
*/
|
|
7310
|
+
declare const PreviewAttachUpsertLicenseOnDecrease: {
|
|
7311
|
+
readonly Prorate: "prorate";
|
|
7312
|
+
readonly ProrateImmediately: "prorate_immediately";
|
|
7313
|
+
readonly ProrateNextCycle: "prorate_next_cycle";
|
|
7314
|
+
readonly None: "none";
|
|
7315
|
+
readonly NoProrations: "no_prorations";
|
|
6246
7316
|
};
|
|
6247
7317
|
/**
|
|
6248
|
-
*
|
|
7318
|
+
* Credit behavior when quantity decreases mid-cycle.
|
|
6249
7319
|
*/
|
|
6250
|
-
type
|
|
7320
|
+
type PreviewAttachUpsertLicenseOnDecrease = ClosedEnum<typeof PreviewAttachUpsertLicenseOnDecrease>;
|
|
7321
|
+
/**
|
|
7322
|
+
* Proration settings for prepaid features. Controls mid-cycle quantity change billing.
|
|
7323
|
+
*/
|
|
7324
|
+
type PreviewAttachUpsertLicenseProration = {
|
|
6251
7325
|
/**
|
|
6252
|
-
*
|
|
7326
|
+
* Billing behavior when quantity increases mid-cycle.
|
|
6253
7327
|
*/
|
|
6254
|
-
|
|
7328
|
+
onIncrease: PreviewAttachUpsertLicenseOnIncrease;
|
|
6255
7329
|
/**
|
|
6256
|
-
*
|
|
7330
|
+
* Credit behavior when quantity decreases mid-cycle.
|
|
6257
7331
|
*/
|
|
6258
|
-
|
|
7332
|
+
onDecrease: PreviewAttachUpsertLicenseOnDecrease;
|
|
6259
7333
|
};
|
|
6260
7334
|
/**
|
|
6261
|
-
*
|
|
7335
|
+
* When rolled over units expire.
|
|
6262
7336
|
*/
|
|
6263
|
-
|
|
7337
|
+
declare const PreviewAttachUpsertLicenseExpiryDurationType: {
|
|
7338
|
+
readonly Month: "month";
|
|
7339
|
+
readonly Forever: "forever";
|
|
7340
|
+
};
|
|
7341
|
+
/**
|
|
7342
|
+
* When rolled over units expire.
|
|
7343
|
+
*/
|
|
7344
|
+
type PreviewAttachUpsertLicenseExpiryDurationType = ClosedEnum<typeof PreviewAttachUpsertLicenseExpiryDurationType>;
|
|
7345
|
+
/**
|
|
7346
|
+
* Rollover config for unused units. If set, unused included units carry over.
|
|
7347
|
+
*/
|
|
7348
|
+
type PreviewAttachUpsertLicenseRollover = {
|
|
6264
7349
|
/**
|
|
6265
|
-
*
|
|
7350
|
+
* Max rollover units. Omit for unlimited rollover.
|
|
6266
7351
|
*/
|
|
6267
|
-
|
|
7352
|
+
max?: number | undefined;
|
|
6268
7353
|
/**
|
|
6269
|
-
*
|
|
7354
|
+
* Maximum rollover as a percentage (0-100) of included + prepaid grant. Mutually exclusive with max.
|
|
6270
7355
|
*/
|
|
6271
|
-
|
|
6272
|
-
};
|
|
6273
|
-
type PreviewAttachParams = {
|
|
7356
|
+
maxPercentage?: number | undefined;
|
|
6274
7357
|
/**
|
|
6275
|
-
*
|
|
7358
|
+
* When rolled over units expire.
|
|
6276
7359
|
*/
|
|
6277
|
-
|
|
7360
|
+
expiryDurationType: PreviewAttachUpsertLicenseExpiryDurationType;
|
|
6278
7361
|
/**
|
|
6279
|
-
*
|
|
7362
|
+
* Number of periods before expiry.
|
|
6280
7363
|
*/
|
|
6281
|
-
|
|
6282
|
-
|
|
6283
|
-
|
|
7364
|
+
expiryDurationLength?: number | undefined;
|
|
7365
|
+
};
|
|
7366
|
+
/**
|
|
7367
|
+
* Configuration for a feature item in a plan, including usage limits, pricing, and rollover settings.
|
|
7368
|
+
*/
|
|
7369
|
+
type PreviewAttachUpsertLicensePlanItem = {
|
|
7370
|
+
/**
|
|
7371
|
+
* The ID of the feature to configure.
|
|
7372
|
+
*/
|
|
7373
|
+
featureId: string;
|
|
7374
|
+
/**
|
|
7375
|
+
* Number of free units included. Balance resets to this each interval for consumable features.
|
|
7376
|
+
*/
|
|
7377
|
+
included?: number | undefined;
|
|
7378
|
+
/**
|
|
7379
|
+
* If true, customer has unlimited access to this feature.
|
|
7380
|
+
*/
|
|
7381
|
+
unlimited?: boolean | undefined;
|
|
7382
|
+
/**
|
|
7383
|
+
* Reset configuration for consumable features. Omit for non-consumable features like seats.
|
|
7384
|
+
*/
|
|
7385
|
+
reset?: PreviewAttachUpsertLicenseReset | undefined;
|
|
7386
|
+
/**
|
|
7387
|
+
* Pricing for usage beyond included units. Omit for free features.
|
|
7388
|
+
*/
|
|
7389
|
+
price?: PreviewAttachUpsertLicensePrice | undefined;
|
|
7390
|
+
/**
|
|
7391
|
+
* Proration settings for prepaid features. Controls mid-cycle quantity change billing.
|
|
7392
|
+
*/
|
|
7393
|
+
proration?: PreviewAttachUpsertLicenseProration | undefined;
|
|
7394
|
+
/**
|
|
7395
|
+
* Rollover config for unused units. If set, unused included units carry over.
|
|
7396
|
+
*/
|
|
7397
|
+
rollover?: PreviewAttachUpsertLicenseRollover | undefined;
|
|
7398
|
+
};
|
|
7399
|
+
/**
|
|
7400
|
+
* Match items with this billing method (prepaid or usage_based).
|
|
7401
|
+
*/
|
|
7402
|
+
declare const PreviewAttachUpsertLicenseRemoveItemBillingMethod: {
|
|
7403
|
+
readonly Prepaid: "prepaid";
|
|
7404
|
+
readonly UsageBased: "usage_based";
|
|
7405
|
+
};
|
|
7406
|
+
/**
|
|
7407
|
+
* Match items with this billing method (prepaid or usage_based).
|
|
7408
|
+
*/
|
|
7409
|
+
type PreviewAttachUpsertLicenseRemoveItemBillingMethod = ClosedEnum<typeof PreviewAttachUpsertLicenseRemoveItemBillingMethod>;
|
|
7410
|
+
declare const PreviewAttachIntervalUpsertLicenseRemoveItemEnum2: {
|
|
7411
|
+
readonly OneOff: "one_off";
|
|
7412
|
+
readonly Minute: "minute";
|
|
7413
|
+
readonly Hour: "hour";
|
|
7414
|
+
readonly Day: "day";
|
|
7415
|
+
readonly Week: "week";
|
|
7416
|
+
readonly Month: "month";
|
|
7417
|
+
readonly Quarter: "quarter";
|
|
7418
|
+
readonly SemiAnnual: "semi_annual";
|
|
7419
|
+
readonly Year: "year";
|
|
7420
|
+
};
|
|
7421
|
+
type PreviewAttachIntervalUpsertLicenseRemoveItemEnum2 = ClosedEnum<typeof PreviewAttachIntervalUpsertLicenseRemoveItemEnum2>;
|
|
7422
|
+
declare const PreviewAttachIntervalUpsertLicenseRemoveItemEnum1: {
|
|
7423
|
+
readonly OneOff: "one_off";
|
|
7424
|
+
readonly Week: "week";
|
|
7425
|
+
readonly Month: "month";
|
|
7426
|
+
readonly Quarter: "quarter";
|
|
7427
|
+
readonly SemiAnnual: "semi_annual";
|
|
7428
|
+
readonly Year: "year";
|
|
7429
|
+
};
|
|
7430
|
+
type PreviewAttachIntervalUpsertLicenseRemoveItemEnum1 = ClosedEnum<typeof PreviewAttachIntervalUpsertLicenseRemoveItemEnum1>;
|
|
7431
|
+
/**
|
|
7432
|
+
* Filter for matching plan items. All provided fields must match (AND).
|
|
7433
|
+
*/
|
|
7434
|
+
type PreviewAttachUpsertLicensePlanItemFilter = {
|
|
7435
|
+
/**
|
|
7436
|
+
* Match items linked to this feature.
|
|
7437
|
+
*/
|
|
7438
|
+
featureId?: string | undefined;
|
|
7439
|
+
/**
|
|
7440
|
+
* Match items with this billing method (prepaid or usage_based).
|
|
7441
|
+
*/
|
|
7442
|
+
billingMethod?: PreviewAttachUpsertLicenseRemoveItemBillingMethod | undefined;
|
|
7443
|
+
/**
|
|
7444
|
+
* Match items with this interval. Accepts either a BillingInterval (price-side) or a ResetInterval (reset-side, includes day/hour/minute) so price-less items keyed by reset.interval can be disambiguated.
|
|
7445
|
+
*/
|
|
7446
|
+
interval?: PreviewAttachIntervalUpsertLicenseRemoveItemEnum1 | PreviewAttachIntervalUpsertLicenseRemoveItemEnum2 | undefined;
|
|
7447
|
+
/**
|
|
7448
|
+
* Match items with this interval_count. Disambiguates between items that share an interval but differ in count.
|
|
7449
|
+
*/
|
|
7450
|
+
intervalCount?: number | undefined;
|
|
7451
|
+
};
|
|
7452
|
+
type PreviewAttachUpsertLicenseCustomize = {
|
|
7453
|
+
price?: PreviewAttachUpsertLicenseBasePrice | null | undefined;
|
|
7454
|
+
addItems?: Array<PreviewAttachUpsertLicensePlanItem> | undefined;
|
|
7455
|
+
removeItems?: Array<PreviewAttachUpsertLicensePlanItemFilter> | undefined;
|
|
7456
|
+
};
|
|
7457
|
+
type PreviewAttachUpsertLicense = {
|
|
7458
|
+
licensePlanId: string;
|
|
7459
|
+
included?: number | undefined;
|
|
7460
|
+
prepaidOnly?: boolean | undefined;
|
|
7461
|
+
customize?: PreviewAttachUpsertLicenseCustomize | null | undefined;
|
|
7462
|
+
metadata?: {
|
|
7463
|
+
[k: string]: any;
|
|
7464
|
+
} | undefined;
|
|
7465
|
+
};
|
|
7466
|
+
/**
|
|
7467
|
+
* Customize the plan to attach. Can override the price, items, licenses, free trial, or a combination.
|
|
7468
|
+
*/
|
|
7469
|
+
type PreviewAttachCustomize = {
|
|
7470
|
+
/**
|
|
7471
|
+
* Override the base price of the plan. Pass null to remove the base price.
|
|
7472
|
+
*/
|
|
7473
|
+
price?: PreviewAttachBasePrice | null | undefined;
|
|
7474
|
+
/**
|
|
7475
|
+
* Override the items in the plan (PUT-style — replaces all existing items). Mutually exclusive with add_items / remove_items / deprecated update_items.
|
|
7476
|
+
*/
|
|
7477
|
+
items?: Array<PreviewAttachItemPlanItem> | undefined;
|
|
7478
|
+
/**
|
|
7479
|
+
* Items to add to the plan.
|
|
7480
|
+
*/
|
|
7481
|
+
addItems?: Array<PreviewAttachAddItemPlanItem> | undefined;
|
|
7482
|
+
/**
|
|
7483
|
+
* Filters selecting items to remove from the plan.
|
|
7484
|
+
*/
|
|
7485
|
+
removeItems?: Array<PreviewAttachPlanItemFilter> | undefined;
|
|
7486
|
+
/**
|
|
7487
|
+
* Override the plan's default free trial. Pass an object to set a custom trial, or null to remove the trial entirely.
|
|
7488
|
+
*/
|
|
7489
|
+
freeTrial?: PreviewAttachFreeTrialParams | null | undefined;
|
|
7490
|
+
/**
|
|
7491
|
+
* Override the plan's billing controls (auto top-ups, spend limits, usage limits, usage alerts, overage allowed) for this customer.
|
|
7492
|
+
*/
|
|
7493
|
+
billingControls?: PreviewAttachBillingControls | undefined;
|
|
7494
|
+
/**
|
|
7495
|
+
* License links to add or override for this customer, keyed by license_plan_id. Omitted fields inherit the plan catalog link (included defaults to 1 when the license is not in the catalog). A bare entry restores the license to pure catalog inheritance.
|
|
7496
|
+
*/
|
|
7497
|
+
upsertLicenses?: Array<PreviewAttachUpsertLicense> | undefined;
|
|
7498
|
+
};
|
|
7499
|
+
/**
|
|
7500
|
+
* Invoice mode creates a draft or open invoice and sends it to the customer, instead of charging their card immediately. This uses Stripe's send_invoice collection method.
|
|
7501
|
+
*/
|
|
7502
|
+
type PreviewAttachInvoiceMode = {
|
|
7503
|
+
/**
|
|
7504
|
+
* When true, creates an invoice and sends it to the customer instead of charging their card immediately. Uses Stripe's send_invoice collection method.
|
|
7505
|
+
*/
|
|
7506
|
+
enabled: boolean;
|
|
7507
|
+
/**
|
|
7508
|
+
* If true, enables the plan immediately even though the invoice is not paid yet.
|
|
7509
|
+
*/
|
|
7510
|
+
enablePlanImmediately?: boolean | undefined;
|
|
7511
|
+
/**
|
|
7512
|
+
* If true, finalizes the invoice so it can be sent to the customer. If false, keeps it as a draft for manual review.
|
|
7513
|
+
*/
|
|
7514
|
+
finalize?: boolean | undefined;
|
|
7515
|
+
/**
|
|
7516
|
+
* ID of an invoice template (configured in billing settings) whose footer (e.g. bank details) is applied to the invoice.
|
|
7517
|
+
*/
|
|
7518
|
+
invoiceTemplateId?: string | undefined;
|
|
7519
|
+
/**
|
|
7520
|
+
* Number of days the customer has to pay the invoice before it is due (Stripe days_until_due).
|
|
7521
|
+
*/
|
|
7522
|
+
netTermsDays?: number | undefined;
|
|
7523
|
+
};
|
|
7524
|
+
/**
|
|
7525
|
+
* How to handle proration when updating an existing subscription. 'prorate_immediately' charges/credits prorated amounts now, 'none' skips creating any charges.
|
|
7526
|
+
*/
|
|
7527
|
+
declare const PreviewAttachProrationBehavior: {
|
|
7528
|
+
readonly ProrateImmediately: "prorate_immediately";
|
|
7529
|
+
readonly None: "none";
|
|
7530
|
+
};
|
|
7531
|
+
/**
|
|
7532
|
+
* How to handle proration when updating an existing subscription. 'prorate_immediately' charges/credits prorated amounts now, 'none' skips creating any charges.
|
|
7533
|
+
*/
|
|
7534
|
+
type PreviewAttachProrationBehavior = ClosedEnum<typeof PreviewAttachProrationBehavior>;
|
|
7535
|
+
/**
|
|
7536
|
+
* Controls when to return a checkout URL. 'always' returns a URL even if payment succeeds, 'if_required' only when payment action is needed, 'never' disables redirects.
|
|
7537
|
+
*/
|
|
7538
|
+
declare const PreviewAttachRedirectMode: {
|
|
7539
|
+
readonly Always: "always";
|
|
7540
|
+
readonly IfRequired: "if_required";
|
|
7541
|
+
readonly Never: "never";
|
|
7542
|
+
};
|
|
7543
|
+
/**
|
|
7544
|
+
* Controls when to return a checkout URL. 'always' returns a URL even if payment succeeds, 'if_required' only when payment action is needed, 'never' disables redirects.
|
|
7545
|
+
*/
|
|
7546
|
+
type PreviewAttachRedirectMode = ClosedEnum<typeof PreviewAttachRedirectMode>;
|
|
7547
|
+
/**
|
|
7548
|
+
* A discount to apply. Can be either a reward ID or a promotion code.
|
|
7549
|
+
*/
|
|
7550
|
+
type PreviewAttachAttachDiscount = {
|
|
7551
|
+
/**
|
|
7552
|
+
* The ID of the reward to apply as a discount.
|
|
7553
|
+
*/
|
|
7554
|
+
rewardId?: string | undefined;
|
|
7555
|
+
/**
|
|
7556
|
+
* The promotion code to apply as a discount.
|
|
7557
|
+
*/
|
|
7558
|
+
promotionCode?: string | undefined;
|
|
7559
|
+
};
|
|
7560
|
+
/**
|
|
7561
|
+
* When the plan change should take effect. 'immediate' applies now, 'end_of_cycle' schedules for the end of the current billing cycle. By default, upgrades are immediate and downgrades are scheduled.
|
|
7562
|
+
*/
|
|
7563
|
+
declare const PreviewAttachPlanSchedule: {
|
|
7564
|
+
readonly Immediate: "immediate";
|
|
7565
|
+
readonly EndOfCycle: "end_of_cycle";
|
|
7566
|
+
};
|
|
7567
|
+
/**
|
|
7568
|
+
* When the plan change should take effect. 'immediate' applies now, 'end_of_cycle' schedules for the end of the current billing cycle. By default, upgrades are immediate and downgrades are scheduled.
|
|
7569
|
+
*/
|
|
7570
|
+
type PreviewAttachPlanSchedule = ClosedEnum<typeof PreviewAttachPlanSchedule>;
|
|
7571
|
+
type PreviewAttachCustomLineItem = {
|
|
7572
|
+
/**
|
|
7573
|
+
* Amount in dollars for this line item (e.g. 10.50). Can be negative for credits.
|
|
7574
|
+
*/
|
|
7575
|
+
amount: number;
|
|
7576
|
+
/**
|
|
7577
|
+
* Description for the line item.
|
|
7578
|
+
*/
|
|
7579
|
+
description: string;
|
|
7580
|
+
};
|
|
7581
|
+
/**
|
|
7582
|
+
* Whether to carry over balances from the previous plan.
|
|
7583
|
+
*/
|
|
7584
|
+
type PreviewAttachCarryOverBalances = {
|
|
7585
|
+
/**
|
|
7586
|
+
* Whether to carry over balances from the previous plan.
|
|
7587
|
+
*/
|
|
7588
|
+
enabled: boolean;
|
|
7589
|
+
/**
|
|
7590
|
+
* The IDs of the features to carry over balances from. If left undefined, all features will be carried over.
|
|
7591
|
+
*/
|
|
7592
|
+
featureIds?: Array<string> | undefined;
|
|
7593
|
+
};
|
|
7594
|
+
/**
|
|
7595
|
+
* Whether to carry over usages from the previous plan.
|
|
7596
|
+
*/
|
|
7597
|
+
type PreviewAttachCarryOverUsages = {
|
|
7598
|
+
/**
|
|
7599
|
+
* Whether to carry over usages from the previous plan.
|
|
7600
|
+
*/
|
|
7601
|
+
enabled: boolean;
|
|
7602
|
+
/**
|
|
7603
|
+
* The IDs of the features to carry over usages for. If left undefined, all consumable features will be carried over.
|
|
7604
|
+
*/
|
|
7605
|
+
featureIds?: Array<string> | undefined;
|
|
7606
|
+
};
|
|
7607
|
+
type PreviewAttachLicenseQuantity = {
|
|
7608
|
+
/**
|
|
7609
|
+
* The license plan to set seat quantity for.
|
|
7610
|
+
*/
|
|
7611
|
+
licensePlanId: string;
|
|
7612
|
+
/**
|
|
7613
|
+
* Total seats for the license, inclusive of the plan's included amount — seats beyond it are paid.
|
|
7614
|
+
*/
|
|
7615
|
+
quantity: number;
|
|
7616
|
+
};
|
|
7617
|
+
type PreviewAttachParams = {
|
|
7618
|
+
/**
|
|
7619
|
+
* The ID of the customer to attach the plan to.
|
|
7620
|
+
*/
|
|
7621
|
+
customerId: string;
|
|
7622
|
+
/**
|
|
7623
|
+
* The ID of the entity to attach the plan to.
|
|
7624
|
+
*/
|
|
7625
|
+
entityId?: string | undefined;
|
|
7626
|
+
/**
|
|
7627
|
+
* The ID of the plan.
|
|
6284
7628
|
*/
|
|
6285
7629
|
planId: string;
|
|
6286
7630
|
/**
|
|
@@ -6292,7 +7636,7 @@ type PreviewAttachParams = {
|
|
|
6292
7636
|
*/
|
|
6293
7637
|
version?: number | undefined;
|
|
6294
7638
|
/**
|
|
6295
|
-
* Customize the plan to attach. Can override the price, items, free trial, or a combination.
|
|
7639
|
+
* Customize the plan to attach. Can override the price, items, licenses, free trial, or a combination.
|
|
6296
7640
|
*/
|
|
6297
7641
|
customize?: PreviewAttachCustomize | undefined;
|
|
6298
7642
|
/**
|
|
@@ -6365,6 +7709,10 @@ type PreviewAttachParams = {
|
|
|
6365
7709
|
* Whether to carry over usages from the previous plan.
|
|
6366
7710
|
*/
|
|
6367
7711
|
carryOverUsages?: PreviewAttachCarryOverUsages | undefined;
|
|
7712
|
+
/**
|
|
7713
|
+
* Seat quantities for the plan's licenses, keyed by license plan.
|
|
7714
|
+
*/
|
|
7715
|
+
licenseQuantities?: Array<PreviewAttachLicenseQuantity> | undefined;
|
|
6368
7716
|
/**
|
|
6369
7717
|
* Key-value metadata to attach to the Stripe subscription, invoice, and checkout session created during this attach flow. Keys prefixed with 'autumn_' are reserved and will be stripped.
|
|
6370
7718
|
*/
|
|
@@ -6383,6 +7731,10 @@ type PreviewAttachParams = {
|
|
|
6383
7731
|
* Stripe tax rate ID (txr_...) to apply as the default tax rate on the created subscription, invoice, or checkout session line items.
|
|
6384
7732
|
*/
|
|
6385
7733
|
taxRateId?: string | undefined;
|
|
7734
|
+
/**
|
|
7735
|
+
* Currency to bill this attach in (e.g. usd, eur). Must match the customer's currency if they are already locked to one, and the plan must offer a paid price in it. Defaults to the customer's currency, then the org default.
|
|
7736
|
+
*/
|
|
7737
|
+
currency?: string | undefined;
|
|
6386
7738
|
};
|
|
6387
7739
|
type PreviewAttachDiscount = {
|
|
6388
7740
|
amountOff: number;
|
|
@@ -6744,6 +8096,16 @@ declare const PreviewMultiAttachPriceInterval: {
|
|
|
6744
8096
|
* Billing interval (e.g. 'month', 'year').
|
|
6745
8097
|
*/
|
|
6746
8098
|
type PreviewMultiAttachPriceInterval = ClosedEnum<typeof PreviewMultiAttachPriceInterval>;
|
|
8099
|
+
type PreviewMultiAttachAdditionalCurrency = {
|
|
8100
|
+
/**
|
|
8101
|
+
* Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
|
|
8102
|
+
*/
|
|
8103
|
+
currency: string;
|
|
8104
|
+
/**
|
|
8105
|
+
* Price amount in this currency. Set explicitly per currency, not converted from the base amount.
|
|
8106
|
+
*/
|
|
8107
|
+
amount: number;
|
|
8108
|
+
};
|
|
6747
8109
|
/**
|
|
6748
8110
|
* Base price configuration for a plan.
|
|
6749
8111
|
*/
|
|
@@ -6760,6 +8122,10 @@ type PreviewMultiAttachBasePrice = {
|
|
|
6760
8122
|
* Number of intervals per billing cycle. Defaults to 1.
|
|
6761
8123
|
*/
|
|
6762
8124
|
intervalCount?: number | undefined;
|
|
8125
|
+
/**
|
|
8126
|
+
* Base price amounts in additional currencies. The base 'amount' is in the org's default currency.
|
|
8127
|
+
*/
|
|
8128
|
+
additionalCurrencies?: Array<PreviewMultiAttachAdditionalCurrency> | undefined;
|
|
6763
8129
|
};
|
|
6764
8130
|
/**
|
|
6765
8131
|
* Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
|
|
@@ -6792,10 +8158,29 @@ type PreviewMultiAttachReset = {
|
|
|
6792
8158
|
*/
|
|
6793
8159
|
intervalCount?: number | undefined;
|
|
6794
8160
|
};
|
|
8161
|
+
type PreviewMultiAttachItemAdditionalCurrency = {
|
|
8162
|
+
/**
|
|
8163
|
+
* Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
|
|
8164
|
+
*/
|
|
8165
|
+
currency: string;
|
|
8166
|
+
/**
|
|
8167
|
+
* Price amount in this currency. Set explicitly per currency, not converted from the base amount.
|
|
8168
|
+
*/
|
|
8169
|
+
amount: number;
|
|
8170
|
+
};
|
|
8171
|
+
type PreviewMultiAttachTierAdditionalCurrency = {
|
|
8172
|
+
currency?: any | undefined;
|
|
8173
|
+
amount?: any | undefined;
|
|
8174
|
+
flatAmount?: any | undefined;
|
|
8175
|
+
};
|
|
6795
8176
|
type PreviewMultiAttachTier = {
|
|
6796
8177
|
to: number | string;
|
|
6797
8178
|
amount?: number | undefined;
|
|
6798
8179
|
flatAmount?: number | undefined;
|
|
8180
|
+
/**
|
|
8181
|
+
* Per-currency amounts for this tier. Tier boundaries ('to') are shared across all currencies.
|
|
8182
|
+
*/
|
|
8183
|
+
additionalCurrencies?: Array<PreviewMultiAttachTierAdditionalCurrency> | undefined;
|
|
6799
8184
|
};
|
|
6800
8185
|
declare const PreviewMultiAttachTierBehavior: {
|
|
6801
8186
|
readonly Graduated: "graduated";
|
|
@@ -6836,6 +8221,10 @@ type PreviewMultiAttachPrice = {
|
|
|
6836
8221
|
* Price per billing_units after included usage. Either 'amount' or 'tiers' is required.
|
|
6837
8222
|
*/
|
|
6838
8223
|
amount?: number | undefined;
|
|
8224
|
+
/**
|
|
8225
|
+
* Amounts in additional currencies for this flat price. The base 'amount' is in the org's default currency. Only valid with 'amount', not 'tiers'.
|
|
8226
|
+
*/
|
|
8227
|
+
additionalCurrencies?: Array<PreviewMultiAttachItemAdditionalCurrency> | undefined;
|
|
6839
8228
|
/**
|
|
6840
8229
|
* Tiered pricing. Either 'amount' or 'tiers' is required.
|
|
6841
8230
|
*/
|
|
@@ -6968,7 +8357,7 @@ type PreviewMultiAttachPlanItem = {
|
|
|
6968
8357
|
rollover?: PreviewMultiAttachRollover | undefined;
|
|
6969
8358
|
};
|
|
6970
8359
|
/**
|
|
6971
|
-
* Customize the plan to attach. Can override the price or
|
|
8360
|
+
* Customize the plan to attach. Can override the price, items, or licenses.
|
|
6972
8361
|
*/
|
|
6973
8362
|
type PreviewMultiAttachCustomize = {
|
|
6974
8363
|
/**
|
|
@@ -7003,7 +8392,7 @@ type PreviewMultiAttachPlan = {
|
|
|
7003
8392
|
*/
|
|
7004
8393
|
planId: string;
|
|
7005
8394
|
/**
|
|
7006
|
-
* Customize the plan to attach. Can override the price or
|
|
8395
|
+
* Customize the plan to attach. Can override the price, items, or licenses.
|
|
7007
8396
|
*/
|
|
7008
8397
|
customize?: PreviewMultiAttachCustomize | undefined;
|
|
7009
8398
|
/**
|
|
@@ -7286,6 +8675,10 @@ type PreviewMultiAttachParams = {
|
|
|
7286
8675
|
* Free trial configuration applied to all plans. Pass an object to set a custom trial, or null to remove any trial.
|
|
7287
8676
|
*/
|
|
7288
8677
|
freeTrial?: PreviewMultiAttachFreeTrialParams | null | undefined;
|
|
8678
|
+
/**
|
|
8679
|
+
* Currency to bill this multi-attach in (e.g. usd, eur). Must match the customer's currency if they are already locked to one, and every plan must offer a paid price in it. Defaults to the customer's currency, then the org default.
|
|
8680
|
+
*/
|
|
8681
|
+
currency?: string | undefined;
|
|
7289
8682
|
/**
|
|
7290
8683
|
* Invoice mode creates a draft or open invoice and sends it to the customer, instead of charging their card immediately.
|
|
7291
8684
|
*/
|
|
@@ -7699,6 +9092,16 @@ declare const PreviewUpdatePriceInterval: {
|
|
|
7699
9092
|
* Billing interval (e.g. 'month', 'year').
|
|
7700
9093
|
*/
|
|
7701
9094
|
type PreviewUpdatePriceInterval = ClosedEnum<typeof PreviewUpdatePriceInterval>;
|
|
9095
|
+
type PreviewUpdateAdditionalCurrency = {
|
|
9096
|
+
/**
|
|
9097
|
+
* Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
|
|
9098
|
+
*/
|
|
9099
|
+
currency: string;
|
|
9100
|
+
/**
|
|
9101
|
+
* Price amount in this currency. Set explicitly per currency, not converted from the base amount.
|
|
9102
|
+
*/
|
|
9103
|
+
amount: number;
|
|
9104
|
+
};
|
|
7702
9105
|
/**
|
|
7703
9106
|
* Base price configuration for a plan.
|
|
7704
9107
|
*/
|
|
@@ -7715,6 +9118,10 @@ type PreviewUpdateBasePrice = {
|
|
|
7715
9118
|
* Number of intervals per billing cycle. Defaults to 1.
|
|
7716
9119
|
*/
|
|
7717
9120
|
intervalCount?: number | undefined;
|
|
9121
|
+
/**
|
|
9122
|
+
* Base price amounts in additional currencies. The base 'amount' is in the org's default currency.
|
|
9123
|
+
*/
|
|
9124
|
+
additionalCurrencies?: Array<PreviewUpdateAdditionalCurrency> | undefined;
|
|
7718
9125
|
};
|
|
7719
9126
|
/**
|
|
7720
9127
|
* Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
|
|
@@ -7747,10 +9154,38 @@ type PreviewUpdateItemReset = {
|
|
|
7747
9154
|
*/
|
|
7748
9155
|
intervalCount?: number | undefined;
|
|
7749
9156
|
};
|
|
9157
|
+
type PreviewUpdateItemAdditionalCurrency = {
|
|
9158
|
+
/**
|
|
9159
|
+
* Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
|
|
9160
|
+
*/
|
|
9161
|
+
currency: string;
|
|
9162
|
+
/**
|
|
9163
|
+
* Price amount in this currency. Set explicitly per currency, not converted from the base amount.
|
|
9164
|
+
*/
|
|
9165
|
+
amount: number;
|
|
9166
|
+
};
|
|
9167
|
+
type PreviewUpdateItemTierAdditionalCurrency = {
|
|
9168
|
+
/**
|
|
9169
|
+
* Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
|
|
9170
|
+
*/
|
|
9171
|
+
currency: string;
|
|
9172
|
+
/**
|
|
9173
|
+
* Per-unit amount for this tier in this currency.
|
|
9174
|
+
*/
|
|
9175
|
+
amount?: number | undefined;
|
|
9176
|
+
/**
|
|
9177
|
+
* Flat amount for this tier in this currency, if the tier uses one.
|
|
9178
|
+
*/
|
|
9179
|
+
flatAmount?: number | undefined;
|
|
9180
|
+
};
|
|
7750
9181
|
type PreviewUpdateItemTier = {
|
|
7751
9182
|
to: number | string;
|
|
7752
9183
|
amount?: number | undefined;
|
|
7753
9184
|
flatAmount?: number | undefined;
|
|
9185
|
+
/**
|
|
9186
|
+
* Per-currency amounts for this tier. Tier boundaries ('to') are shared across all currencies.
|
|
9187
|
+
*/
|
|
9188
|
+
additionalCurrencies?: Array<PreviewUpdateItemTierAdditionalCurrency> | undefined;
|
|
7754
9189
|
};
|
|
7755
9190
|
declare const PreviewUpdateItemTierBehavior: {
|
|
7756
9191
|
readonly Graduated: "graduated";
|
|
@@ -7791,6 +9226,10 @@ type PreviewUpdateItemPrice = {
|
|
|
7791
9226
|
* Price per billing_units after included usage. Either 'amount' or 'tiers' is required.
|
|
7792
9227
|
*/
|
|
7793
9228
|
amount?: number | undefined;
|
|
9229
|
+
/**
|
|
9230
|
+
* Amounts in additional currencies for this flat price. The base 'amount' is in the org's default currency. Only valid with 'amount', not 'tiers'.
|
|
9231
|
+
*/
|
|
9232
|
+
additionalCurrencies?: Array<PreviewUpdateItemAdditionalCurrency> | undefined;
|
|
7794
9233
|
/**
|
|
7795
9234
|
* Tiered pricing. Either 'amount' or 'tiers' is required.
|
|
7796
9235
|
*/
|
|
@@ -7953,10 +9392,38 @@ type PreviewUpdateAddItemReset = {
|
|
|
7953
9392
|
*/
|
|
7954
9393
|
intervalCount?: number | undefined;
|
|
7955
9394
|
};
|
|
9395
|
+
type PreviewUpdateAddItemAdditionalCurrency = {
|
|
9396
|
+
/**
|
|
9397
|
+
* Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
|
|
9398
|
+
*/
|
|
9399
|
+
currency: string;
|
|
9400
|
+
/**
|
|
9401
|
+
* Price amount in this currency. Set explicitly per currency, not converted from the base amount.
|
|
9402
|
+
*/
|
|
9403
|
+
amount: number;
|
|
9404
|
+
};
|
|
9405
|
+
type PreviewUpdateAddItemTierAdditionalCurrency = {
|
|
9406
|
+
/**
|
|
9407
|
+
* Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
|
|
9408
|
+
*/
|
|
9409
|
+
currency: string;
|
|
9410
|
+
/**
|
|
9411
|
+
* Per-unit amount for this tier in this currency.
|
|
9412
|
+
*/
|
|
9413
|
+
amount?: number | undefined;
|
|
9414
|
+
/**
|
|
9415
|
+
* Flat amount for this tier in this currency, if the tier uses one.
|
|
9416
|
+
*/
|
|
9417
|
+
flatAmount?: number | undefined;
|
|
9418
|
+
};
|
|
7956
9419
|
type PreviewUpdateAddItemTier = {
|
|
7957
9420
|
to: number | string;
|
|
7958
9421
|
amount?: number | undefined;
|
|
7959
9422
|
flatAmount?: number | undefined;
|
|
9423
|
+
/**
|
|
9424
|
+
* Per-currency amounts for this tier. Tier boundaries ('to') are shared across all currencies.
|
|
9425
|
+
*/
|
|
9426
|
+
additionalCurrencies?: Array<PreviewUpdateAddItemTierAdditionalCurrency> | undefined;
|
|
7960
9427
|
};
|
|
7961
9428
|
declare const PreviewUpdateAddItemTierBehavior: {
|
|
7962
9429
|
readonly Graduated: "graduated";
|
|
@@ -7997,6 +9464,10 @@ type PreviewUpdateAddItemPrice = {
|
|
|
7997
9464
|
* Price per billing_units after included usage. Either 'amount' or 'tiers' is required.
|
|
7998
9465
|
*/
|
|
7999
9466
|
amount?: number | undefined;
|
|
9467
|
+
/**
|
|
9468
|
+
* Amounts in additional currencies for this flat price. The base 'amount' is in the org's default currency. Only valid with 'amount', not 'tiers'.
|
|
9469
|
+
*/
|
|
9470
|
+
additionalCurrencies?: Array<PreviewUpdateAddItemAdditionalCurrency> | undefined;
|
|
8000
9471
|
/**
|
|
8001
9472
|
* Tiered pricing. Either 'amount' or 'tiers' is required.
|
|
8002
9473
|
*/
|
|
@@ -8428,155 +9899,506 @@ type PreviewUpdateBillingControls = {
|
|
|
8428
9899
|
overageAllowed?: Array<PreviewUpdateOverageAllowed> | undefined;
|
|
8429
9900
|
};
|
|
8430
9901
|
/**
|
|
8431
|
-
*
|
|
9902
|
+
* Billing interval (e.g. 'month', 'year').
|
|
8432
9903
|
*/
|
|
8433
|
-
|
|
9904
|
+
declare const PreviewUpdatePriceUpsertLicenseInterval: {
|
|
9905
|
+
readonly OneOff: "one_off";
|
|
9906
|
+
readonly Week: "week";
|
|
9907
|
+
readonly Month: "month";
|
|
9908
|
+
readonly Quarter: "quarter";
|
|
9909
|
+
readonly SemiAnnual: "semi_annual";
|
|
9910
|
+
readonly Year: "year";
|
|
9911
|
+
};
|
|
9912
|
+
/**
|
|
9913
|
+
* Billing interval (e.g. 'month', 'year').
|
|
9914
|
+
*/
|
|
9915
|
+
type PreviewUpdatePriceUpsertLicenseInterval = ClosedEnum<typeof PreviewUpdatePriceUpsertLicenseInterval>;
|
|
9916
|
+
type PreviewUpdateUpsertLicenseAdditionalCurrency = {
|
|
8434
9917
|
/**
|
|
8435
|
-
*
|
|
9918
|
+
* Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
|
|
8436
9919
|
*/
|
|
8437
|
-
|
|
9920
|
+
currency: string;
|
|
8438
9921
|
/**
|
|
8439
|
-
*
|
|
9922
|
+
* Price amount in this currency. Set explicitly per currency, not converted from the base amount.
|
|
8440
9923
|
*/
|
|
8441
|
-
|
|
9924
|
+
amount: number;
|
|
9925
|
+
};
|
|
9926
|
+
/**
|
|
9927
|
+
* Base price configuration for a plan.
|
|
9928
|
+
*/
|
|
9929
|
+
type PreviewUpdateUpsertLicenseBasePrice = {
|
|
8442
9930
|
/**
|
|
8443
|
-
*
|
|
9931
|
+
* Base price amount for the plan.
|
|
8444
9932
|
*/
|
|
8445
|
-
|
|
9933
|
+
amount: number;
|
|
8446
9934
|
/**
|
|
8447
|
-
*
|
|
9935
|
+
* Billing interval (e.g. 'month', 'year').
|
|
8448
9936
|
*/
|
|
8449
|
-
|
|
9937
|
+
interval: PreviewUpdatePriceUpsertLicenseInterval;
|
|
8450
9938
|
/**
|
|
8451
|
-
*
|
|
9939
|
+
* Number of intervals per billing cycle. Defaults to 1.
|
|
8452
9940
|
*/
|
|
8453
|
-
|
|
9941
|
+
intervalCount?: number | undefined;
|
|
8454
9942
|
/**
|
|
8455
|
-
*
|
|
9943
|
+
* Base price amounts in additional currencies. The base 'amount' is in the org's default currency.
|
|
8456
9944
|
*/
|
|
8457
|
-
|
|
9945
|
+
additionalCurrencies?: Array<PreviewUpdateUpsertLicenseAdditionalCurrency> | undefined;
|
|
8458
9946
|
};
|
|
8459
9947
|
/**
|
|
8460
|
-
*
|
|
9948
|
+
* Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
|
|
8461
9949
|
*/
|
|
8462
|
-
|
|
9950
|
+
declare const PreviewUpdateUpsertLicenseResetInterval: {
|
|
9951
|
+
readonly OneOff: "one_off";
|
|
9952
|
+
readonly Minute: "minute";
|
|
9953
|
+
readonly Hour: "hour";
|
|
9954
|
+
readonly Day: "day";
|
|
9955
|
+
readonly Week: "week";
|
|
9956
|
+
readonly Month: "month";
|
|
9957
|
+
readonly Quarter: "quarter";
|
|
9958
|
+
readonly SemiAnnual: "semi_annual";
|
|
9959
|
+
readonly Year: "year";
|
|
9960
|
+
};
|
|
9961
|
+
/**
|
|
9962
|
+
* Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
|
|
9963
|
+
*/
|
|
9964
|
+
type PreviewUpdateUpsertLicenseResetInterval = ClosedEnum<typeof PreviewUpdateUpsertLicenseResetInterval>;
|
|
9965
|
+
/**
|
|
9966
|
+
* Reset configuration for consumable features. Omit for non-consumable features like seats.
|
|
9967
|
+
*/
|
|
9968
|
+
type PreviewUpdateUpsertLicenseReset = {
|
|
8463
9969
|
/**
|
|
8464
|
-
*
|
|
9970
|
+
* Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
|
|
8465
9971
|
*/
|
|
8466
|
-
|
|
9972
|
+
interval: PreviewUpdateUpsertLicenseResetInterval;
|
|
8467
9973
|
/**
|
|
8468
|
-
*
|
|
9974
|
+
* Number of intervals between resets. Defaults to 1.
|
|
8469
9975
|
*/
|
|
8470
|
-
|
|
9976
|
+
intervalCount?: number | undefined;
|
|
9977
|
+
};
|
|
9978
|
+
type PreviewUpdateUpsertLicenseAddItemAdditionalCurrency = {
|
|
8471
9979
|
/**
|
|
8472
|
-
*
|
|
9980
|
+
* Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
|
|
8473
9981
|
*/
|
|
8474
|
-
|
|
9982
|
+
currency: string;
|
|
8475
9983
|
/**
|
|
8476
|
-
*
|
|
9984
|
+
* Price amount in this currency. Set explicitly per currency, not converted from the base amount.
|
|
8477
9985
|
*/
|
|
8478
|
-
|
|
9986
|
+
amount: number;
|
|
9987
|
+
};
|
|
9988
|
+
type PreviewUpdateUpsertLicenseTier = {
|
|
9989
|
+
to?: any | undefined;
|
|
9990
|
+
amount?: number | undefined;
|
|
9991
|
+
flatAmount?: number | undefined;
|
|
8479
9992
|
/**
|
|
8480
|
-
*
|
|
9993
|
+
* Per-currency amounts for this tier. Tier boundaries ('to') are shared across all currencies.
|
|
8481
9994
|
*/
|
|
8482
|
-
|
|
9995
|
+
additionalCurrencies?: Array<any> | undefined;
|
|
9996
|
+
};
|
|
9997
|
+
declare const PreviewUpdateUpsertLicenseTierBehavior: {
|
|
9998
|
+
readonly Graduated: "graduated";
|
|
9999
|
+
readonly Volume: "volume";
|
|
8483
10000
|
};
|
|
10001
|
+
type PreviewUpdateUpsertLicenseTierBehavior = ClosedEnum<typeof PreviewUpdateUpsertLicenseTierBehavior>;
|
|
8484
10002
|
/**
|
|
8485
|
-
*
|
|
10003
|
+
* Billing interval. For consumable features, should match reset.interval.
|
|
8486
10004
|
*/
|
|
8487
|
-
declare const
|
|
8488
|
-
readonly
|
|
8489
|
-
readonly
|
|
10005
|
+
declare const PreviewUpdateUpsertLicenseAddItemPriceInterval: {
|
|
10006
|
+
readonly OneOff: "one_off";
|
|
10007
|
+
readonly Week: "week";
|
|
10008
|
+
readonly Month: "month";
|
|
10009
|
+
readonly Quarter: "quarter";
|
|
10010
|
+
readonly SemiAnnual: "semi_annual";
|
|
10011
|
+
readonly Year: "year";
|
|
8490
10012
|
};
|
|
8491
10013
|
/**
|
|
8492
|
-
*
|
|
10014
|
+
* Billing interval. For consumable features, should match reset.interval.
|
|
8493
10015
|
*/
|
|
8494
|
-
type
|
|
10016
|
+
type PreviewUpdateUpsertLicenseAddItemPriceInterval = ClosedEnum<typeof PreviewUpdateUpsertLicenseAddItemPriceInterval>;
|
|
8495
10017
|
/**
|
|
8496
|
-
*
|
|
10018
|
+
* 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
|
|
8497
10019
|
*/
|
|
8498
|
-
declare const
|
|
8499
|
-
readonly
|
|
8500
|
-
readonly
|
|
8501
|
-
readonly Never: "never";
|
|
10020
|
+
declare const PreviewUpdateUpsertLicenseAddItemBillingMethod: {
|
|
10021
|
+
readonly Prepaid: "prepaid";
|
|
10022
|
+
readonly UsageBased: "usage_based";
|
|
8502
10023
|
};
|
|
8503
10024
|
/**
|
|
8504
|
-
*
|
|
10025
|
+
* 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
|
|
8505
10026
|
*/
|
|
8506
|
-
type
|
|
10027
|
+
type PreviewUpdateUpsertLicenseAddItemBillingMethod = ClosedEnum<typeof PreviewUpdateUpsertLicenseAddItemBillingMethod>;
|
|
8507
10028
|
/**
|
|
8508
|
-
*
|
|
10029
|
+
* Pricing for usage beyond included units. Omit for free features.
|
|
8509
10030
|
*/
|
|
8510
|
-
type
|
|
10031
|
+
type PreviewUpdateUpsertLicensePrice = {
|
|
8511
10032
|
/**
|
|
8512
|
-
*
|
|
10033
|
+
* Price per billing_units after included usage. Either 'amount' or 'tiers' is required.
|
|
8513
10034
|
*/
|
|
8514
|
-
|
|
10035
|
+
amount?: number | undefined;
|
|
8515
10036
|
/**
|
|
8516
|
-
* The
|
|
10037
|
+
* Amounts in additional currencies for this flat price. The base 'amount' is in the org's default currency. Only valid with 'amount', not 'tiers'.
|
|
8517
10038
|
*/
|
|
8518
|
-
|
|
10039
|
+
additionalCurrencies?: Array<PreviewUpdateUpsertLicenseAddItemAdditionalCurrency> | undefined;
|
|
10040
|
+
/**
|
|
10041
|
+
* Tiered pricing. Either 'amount' or 'tiers' is required.
|
|
10042
|
+
*/
|
|
10043
|
+
tiers?: Array<PreviewUpdateUpsertLicenseTier> | undefined;
|
|
10044
|
+
tierBehavior?: PreviewUpdateUpsertLicenseTierBehavior | undefined;
|
|
10045
|
+
/**
|
|
10046
|
+
* Billing interval. For consumable features, should match reset.interval.
|
|
10047
|
+
*/
|
|
10048
|
+
interval: PreviewUpdateUpsertLicenseAddItemPriceInterval;
|
|
10049
|
+
/**
|
|
10050
|
+
* Number of intervals per billing cycle. Defaults to 1.
|
|
10051
|
+
*/
|
|
10052
|
+
intervalCount?: number | undefined;
|
|
10053
|
+
/**
|
|
10054
|
+
* Units per price increment. Usage is rounded UP when billed (e.g. billing_units=100 means 101 rounds to 200).
|
|
10055
|
+
*/
|
|
10056
|
+
billingUnits?: number | undefined;
|
|
10057
|
+
/**
|
|
10058
|
+
* 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
|
|
10059
|
+
*/
|
|
10060
|
+
billingMethod: PreviewUpdateUpsertLicenseAddItemBillingMethod;
|
|
10061
|
+
/**
|
|
10062
|
+
* Max units purchasable beyond included. E.g. included=100, max_purchase=300 allows 400 total. Null for no limit.
|
|
10063
|
+
*/
|
|
10064
|
+
maxPurchase?: number | null | undefined;
|
|
8519
10065
|
};
|
|
8520
10066
|
/**
|
|
8521
|
-
*
|
|
10067
|
+
* Billing behavior when quantity increases mid-cycle.
|
|
8522
10068
|
*/
|
|
8523
|
-
declare const
|
|
8524
|
-
readonly
|
|
8525
|
-
readonly
|
|
8526
|
-
readonly
|
|
10069
|
+
declare const PreviewUpdateUpsertLicenseOnIncrease: {
|
|
10070
|
+
readonly BillImmediately: "bill_immediately";
|
|
10071
|
+
readonly ProrateImmediately: "prorate_immediately";
|
|
10072
|
+
readonly ProrateNextCycle: "prorate_next_cycle";
|
|
10073
|
+
readonly BillNextCycle: "bill_next_cycle";
|
|
8527
10074
|
};
|
|
8528
10075
|
/**
|
|
8529
|
-
*
|
|
10076
|
+
* Billing behavior when quantity increases mid-cycle.
|
|
8530
10077
|
*/
|
|
8531
|
-
type
|
|
10078
|
+
type PreviewUpdateUpsertLicenseOnIncrease = ClosedEnum<typeof PreviewUpdateUpsertLicenseOnIncrease>;
|
|
8532
10079
|
/**
|
|
8533
|
-
*
|
|
10080
|
+
* Credit behavior when quantity decreases mid-cycle.
|
|
8534
10081
|
*/
|
|
8535
|
-
declare const
|
|
8536
|
-
readonly
|
|
8537
|
-
readonly
|
|
10082
|
+
declare const PreviewUpdateUpsertLicenseOnDecrease: {
|
|
10083
|
+
readonly Prorate: "prorate";
|
|
10084
|
+
readonly ProrateImmediately: "prorate_immediately";
|
|
10085
|
+
readonly ProrateNextCycle: "prorate_next_cycle";
|
|
10086
|
+
readonly None: "none";
|
|
10087
|
+
readonly NoProrations: "no_prorations";
|
|
8538
10088
|
};
|
|
8539
10089
|
/**
|
|
8540
|
-
*
|
|
10090
|
+
* Credit behavior when quantity decreases mid-cycle.
|
|
8541
10091
|
*/
|
|
8542
|
-
type
|
|
10092
|
+
type PreviewUpdateUpsertLicenseOnDecrease = ClosedEnum<typeof PreviewUpdateUpsertLicenseOnDecrease>;
|
|
8543
10093
|
/**
|
|
8544
|
-
*
|
|
10094
|
+
* Proration settings for prepaid features. Controls mid-cycle quantity change billing.
|
|
8545
10095
|
*/
|
|
8546
|
-
type
|
|
10096
|
+
type PreviewUpdateUpsertLicenseProration = {
|
|
8547
10097
|
/**
|
|
8548
|
-
*
|
|
10098
|
+
* Billing behavior when quantity increases mid-cycle.
|
|
8549
10099
|
*/
|
|
8550
|
-
|
|
10100
|
+
onIncrease: PreviewUpdateUpsertLicenseOnIncrease;
|
|
10101
|
+
/**
|
|
10102
|
+
* Credit behavior when quantity decreases mid-cycle.
|
|
10103
|
+
*/
|
|
10104
|
+
onDecrease: PreviewUpdateUpsertLicenseOnDecrease;
|
|
8551
10105
|
};
|
|
8552
10106
|
/**
|
|
8553
|
-
*
|
|
10107
|
+
* When rolled over units expire.
|
|
8554
10108
|
*/
|
|
8555
|
-
|
|
8556
|
-
|
|
8557
|
-
|
|
8558
|
-
*/
|
|
8559
|
-
enabled: boolean;
|
|
8560
|
-
/**
|
|
8561
|
-
* The IDs of the features to carry over usages for. If left undefined, all consumable features will be carried over.
|
|
8562
|
-
*/
|
|
8563
|
-
featureIds?: Array<string> | undefined;
|
|
10109
|
+
declare const PreviewUpdateUpsertLicenseExpiryDurationType: {
|
|
10110
|
+
readonly Month: "month";
|
|
10111
|
+
readonly Forever: "forever";
|
|
8564
10112
|
};
|
|
8565
|
-
|
|
10113
|
+
/**
|
|
10114
|
+
* When rolled over units expire.
|
|
10115
|
+
*/
|
|
10116
|
+
type PreviewUpdateUpsertLicenseExpiryDurationType = ClosedEnum<typeof PreviewUpdateUpsertLicenseExpiryDurationType>;
|
|
10117
|
+
/**
|
|
10118
|
+
* Rollover config for unused units. If set, unused included units carry over.
|
|
10119
|
+
*/
|
|
10120
|
+
type PreviewUpdateUpsertLicenseRollover = {
|
|
8566
10121
|
/**
|
|
8567
|
-
*
|
|
10122
|
+
* Max rollover units. Omit for unlimited rollover.
|
|
8568
10123
|
*/
|
|
8569
|
-
|
|
10124
|
+
max?: number | undefined;
|
|
8570
10125
|
/**
|
|
8571
|
-
*
|
|
10126
|
+
* Maximum rollover as a percentage (0-100) of included + prepaid grant. Mutually exclusive with max.
|
|
8572
10127
|
*/
|
|
8573
|
-
|
|
10128
|
+
maxPercentage?: number | undefined;
|
|
8574
10129
|
/**
|
|
8575
|
-
*
|
|
10130
|
+
* When rolled over units expire.
|
|
8576
10131
|
*/
|
|
8577
|
-
|
|
10132
|
+
expiryDurationType: PreviewUpdateUpsertLicenseExpiryDurationType;
|
|
8578
10133
|
/**
|
|
8579
|
-
*
|
|
10134
|
+
* Number of periods before expiry.
|
|
10135
|
+
*/
|
|
10136
|
+
expiryDurationLength?: number | undefined;
|
|
10137
|
+
};
|
|
10138
|
+
/**
|
|
10139
|
+
* Configuration for a feature item in a plan, including usage limits, pricing, and rollover settings.
|
|
10140
|
+
*/
|
|
10141
|
+
type PreviewUpdateUpsertLicensePlanItem = {
|
|
10142
|
+
/**
|
|
10143
|
+
* The ID of the feature to configure.
|
|
10144
|
+
*/
|
|
10145
|
+
featureId: string;
|
|
10146
|
+
/**
|
|
10147
|
+
* Number of free units included. Balance resets to this each interval for consumable features.
|
|
10148
|
+
*/
|
|
10149
|
+
included?: number | undefined;
|
|
10150
|
+
/**
|
|
10151
|
+
* If true, customer has unlimited access to this feature.
|
|
10152
|
+
*/
|
|
10153
|
+
unlimited?: boolean | undefined;
|
|
10154
|
+
/**
|
|
10155
|
+
* Reset configuration for consumable features. Omit for non-consumable features like seats.
|
|
10156
|
+
*/
|
|
10157
|
+
reset?: PreviewUpdateUpsertLicenseReset | undefined;
|
|
10158
|
+
/**
|
|
10159
|
+
* Pricing for usage beyond included units. Omit for free features.
|
|
10160
|
+
*/
|
|
10161
|
+
price?: PreviewUpdateUpsertLicensePrice | undefined;
|
|
10162
|
+
/**
|
|
10163
|
+
* Proration settings for prepaid features. Controls mid-cycle quantity change billing.
|
|
10164
|
+
*/
|
|
10165
|
+
proration?: PreviewUpdateUpsertLicenseProration | undefined;
|
|
10166
|
+
/**
|
|
10167
|
+
* Rollover config for unused units. If set, unused included units carry over.
|
|
10168
|
+
*/
|
|
10169
|
+
rollover?: PreviewUpdateUpsertLicenseRollover | undefined;
|
|
10170
|
+
};
|
|
10171
|
+
/**
|
|
10172
|
+
* Match items with this billing method (prepaid or usage_based).
|
|
10173
|
+
*/
|
|
10174
|
+
declare const PreviewUpdateUpsertLicenseRemoveItemBillingMethod: {
|
|
10175
|
+
readonly Prepaid: "prepaid";
|
|
10176
|
+
readonly UsageBased: "usage_based";
|
|
10177
|
+
};
|
|
10178
|
+
/**
|
|
10179
|
+
* Match items with this billing method (prepaid or usage_based).
|
|
10180
|
+
*/
|
|
10181
|
+
type PreviewUpdateUpsertLicenseRemoveItemBillingMethod = ClosedEnum<typeof PreviewUpdateUpsertLicenseRemoveItemBillingMethod>;
|
|
10182
|
+
declare const PreviewUpdateIntervalUpsertLicenseRemoveItemEnum2: {
|
|
10183
|
+
readonly OneOff: "one_off";
|
|
10184
|
+
readonly Minute: "minute";
|
|
10185
|
+
readonly Hour: "hour";
|
|
10186
|
+
readonly Day: "day";
|
|
10187
|
+
readonly Week: "week";
|
|
10188
|
+
readonly Month: "month";
|
|
10189
|
+
readonly Quarter: "quarter";
|
|
10190
|
+
readonly SemiAnnual: "semi_annual";
|
|
10191
|
+
readonly Year: "year";
|
|
10192
|
+
};
|
|
10193
|
+
type PreviewUpdateIntervalUpsertLicenseRemoveItemEnum2 = ClosedEnum<typeof PreviewUpdateIntervalUpsertLicenseRemoveItemEnum2>;
|
|
10194
|
+
declare const PreviewUpdateIntervalUpsertLicenseRemoveItemEnum1: {
|
|
10195
|
+
readonly OneOff: "one_off";
|
|
10196
|
+
readonly Week: "week";
|
|
10197
|
+
readonly Month: "month";
|
|
10198
|
+
readonly Quarter: "quarter";
|
|
10199
|
+
readonly SemiAnnual: "semi_annual";
|
|
10200
|
+
readonly Year: "year";
|
|
10201
|
+
};
|
|
10202
|
+
type PreviewUpdateIntervalUpsertLicenseRemoveItemEnum1 = ClosedEnum<typeof PreviewUpdateIntervalUpsertLicenseRemoveItemEnum1>;
|
|
10203
|
+
/**
|
|
10204
|
+
* Filter for matching plan items. All provided fields must match (AND).
|
|
10205
|
+
*/
|
|
10206
|
+
type PreviewUpdateUpsertLicensePlanItemFilter = {
|
|
10207
|
+
/**
|
|
10208
|
+
* Match items linked to this feature.
|
|
10209
|
+
*/
|
|
10210
|
+
featureId?: string | undefined;
|
|
10211
|
+
/**
|
|
10212
|
+
* Match items with this billing method (prepaid or usage_based).
|
|
10213
|
+
*/
|
|
10214
|
+
billingMethod?: PreviewUpdateUpsertLicenseRemoveItemBillingMethod | undefined;
|
|
10215
|
+
/**
|
|
10216
|
+
* Match items with this interval. Accepts either a BillingInterval (price-side) or a ResetInterval (reset-side, includes day/hour/minute) so price-less items keyed by reset.interval can be disambiguated.
|
|
10217
|
+
*/
|
|
10218
|
+
interval?: PreviewUpdateIntervalUpsertLicenseRemoveItemEnum1 | PreviewUpdateIntervalUpsertLicenseRemoveItemEnum2 | undefined;
|
|
10219
|
+
/**
|
|
10220
|
+
* Match items with this interval_count. Disambiguates between items that share an interval but differ in count.
|
|
10221
|
+
*/
|
|
10222
|
+
intervalCount?: number | undefined;
|
|
10223
|
+
};
|
|
10224
|
+
type PreviewUpdateUpsertLicenseCustomize = {
|
|
10225
|
+
price?: PreviewUpdateUpsertLicenseBasePrice | null | undefined;
|
|
10226
|
+
addItems?: Array<PreviewUpdateUpsertLicensePlanItem> | undefined;
|
|
10227
|
+
removeItems?: Array<PreviewUpdateUpsertLicensePlanItemFilter> | undefined;
|
|
10228
|
+
};
|
|
10229
|
+
type PreviewUpdateUpsertLicense = {
|
|
10230
|
+
licensePlanId: string;
|
|
10231
|
+
included?: number | undefined;
|
|
10232
|
+
prepaidOnly?: boolean | undefined;
|
|
10233
|
+
customize?: PreviewUpdateUpsertLicenseCustomize | null | undefined;
|
|
10234
|
+
metadata?: {
|
|
10235
|
+
[k: string]: any;
|
|
10236
|
+
} | undefined;
|
|
10237
|
+
};
|
|
10238
|
+
/**
|
|
10239
|
+
* Customize the plan to attach. Can override the price, items, licenses, free trial, or a combination.
|
|
10240
|
+
*/
|
|
10241
|
+
type PreviewUpdateCustomize = {
|
|
10242
|
+
/**
|
|
10243
|
+
* Override the base price of the plan. Pass null to remove the base price.
|
|
10244
|
+
*/
|
|
10245
|
+
price?: PreviewUpdateBasePrice | null | undefined;
|
|
10246
|
+
/**
|
|
10247
|
+
* Override the items in the plan (PUT-style — replaces all existing items). Mutually exclusive with add_items / remove_items / deprecated update_items.
|
|
10248
|
+
*/
|
|
10249
|
+
items?: Array<PreviewUpdateItemPlanItem> | undefined;
|
|
10250
|
+
/**
|
|
10251
|
+
* Items to add to the plan.
|
|
10252
|
+
*/
|
|
10253
|
+
addItems?: Array<PreviewUpdateAddItemPlanItem> | undefined;
|
|
10254
|
+
/**
|
|
10255
|
+
* Filters selecting items to remove from the plan.
|
|
10256
|
+
*/
|
|
10257
|
+
removeItems?: Array<PreviewUpdatePlanItemFilter> | undefined;
|
|
10258
|
+
/**
|
|
10259
|
+
* Override the plan's default free trial. Pass an object to set a custom trial, or null to remove the trial entirely.
|
|
10260
|
+
*/
|
|
10261
|
+
freeTrial?: PreviewUpdateFreeTrialParams | null | undefined;
|
|
10262
|
+
/**
|
|
10263
|
+
* Override the plan's billing controls (auto top-ups, spend limits, usage limits, usage alerts, overage allowed) for this customer.
|
|
10264
|
+
*/
|
|
10265
|
+
billingControls?: PreviewUpdateBillingControls | undefined;
|
|
10266
|
+
/**
|
|
10267
|
+
* License links to add or override for this customer, keyed by license_plan_id. Omitted fields inherit the plan catalog link (included defaults to 1 when the license is not in the catalog). A bare entry restores the license to pure catalog inheritance.
|
|
10268
|
+
*/
|
|
10269
|
+
upsertLicenses?: Array<PreviewUpdateUpsertLicense> | undefined;
|
|
10270
|
+
};
|
|
10271
|
+
/**
|
|
10272
|
+
* Invoice mode creates a draft or open invoice and sends it to the customer, instead of charging their card immediately. This uses Stripe's send_invoice collection method.
|
|
10273
|
+
*/
|
|
10274
|
+
type PreviewUpdateInvoiceMode = {
|
|
10275
|
+
/**
|
|
10276
|
+
* When true, creates an invoice and sends it to the customer instead of charging their card immediately. Uses Stripe's send_invoice collection method.
|
|
10277
|
+
*/
|
|
10278
|
+
enabled: boolean;
|
|
10279
|
+
/**
|
|
10280
|
+
* If true, enables the plan immediately even though the invoice is not paid yet.
|
|
10281
|
+
*/
|
|
10282
|
+
enablePlanImmediately?: boolean | undefined;
|
|
10283
|
+
/**
|
|
10284
|
+
* If true, finalizes the invoice so it can be sent to the customer. If false, keeps it as a draft for manual review.
|
|
10285
|
+
*/
|
|
10286
|
+
finalize?: boolean | undefined;
|
|
10287
|
+
/**
|
|
10288
|
+
* ID of an invoice template (configured in billing settings) whose footer (e.g. bank details) is applied to the invoice.
|
|
10289
|
+
*/
|
|
10290
|
+
invoiceTemplateId?: string | undefined;
|
|
10291
|
+
/**
|
|
10292
|
+
* Number of days the customer has to pay the invoice before it is due (Stripe days_until_due).
|
|
10293
|
+
*/
|
|
10294
|
+
netTermsDays?: number | undefined;
|
|
10295
|
+
};
|
|
10296
|
+
/**
|
|
10297
|
+
* How to handle proration when updating an existing subscription. 'prorate_immediately' charges/credits prorated amounts now, 'none' skips creating any charges.
|
|
10298
|
+
*/
|
|
10299
|
+
declare const PreviewUpdateProrationBehavior: {
|
|
10300
|
+
readonly ProrateImmediately: "prorate_immediately";
|
|
10301
|
+
readonly None: "none";
|
|
10302
|
+
};
|
|
10303
|
+
/**
|
|
10304
|
+
* How to handle proration when updating an existing subscription. 'prorate_immediately' charges/credits prorated amounts now, 'none' skips creating any charges.
|
|
10305
|
+
*/
|
|
10306
|
+
type PreviewUpdateProrationBehavior = ClosedEnum<typeof PreviewUpdateProrationBehavior>;
|
|
10307
|
+
/**
|
|
10308
|
+
* Controls when to return a checkout URL. 'always' returns a URL even if payment succeeds, 'if_required' only when payment action is needed, 'never' disables redirects.
|
|
10309
|
+
*/
|
|
10310
|
+
declare const PreviewUpdateRedirectMode: {
|
|
10311
|
+
readonly Always: "always";
|
|
10312
|
+
readonly IfRequired: "if_required";
|
|
10313
|
+
readonly Never: "never";
|
|
10314
|
+
};
|
|
10315
|
+
/**
|
|
10316
|
+
* Controls when to return a checkout URL. 'always' returns a URL even if payment succeeds, 'if_required' only when payment action is needed, 'never' disables redirects.
|
|
10317
|
+
*/
|
|
10318
|
+
type PreviewUpdateRedirectMode = ClosedEnum<typeof PreviewUpdateRedirectMode>;
|
|
10319
|
+
/**
|
|
10320
|
+
* A discount to apply. Can be either a reward ID or a promotion code.
|
|
10321
|
+
*/
|
|
10322
|
+
type PreviewUpdateAttachDiscount = {
|
|
10323
|
+
/**
|
|
10324
|
+
* The ID of the reward to apply as a discount.
|
|
10325
|
+
*/
|
|
10326
|
+
rewardId?: string | undefined;
|
|
10327
|
+
/**
|
|
10328
|
+
* The promotion code to apply as a discount.
|
|
10329
|
+
*/
|
|
10330
|
+
promotionCode?: string | undefined;
|
|
10331
|
+
};
|
|
10332
|
+
/**
|
|
10333
|
+
* Action to perform for cancellation. 'cancel_immediately' cancels now with prorated refund, 'cancel_end_of_cycle' cancels at period end, 'uncancel' reverses a pending cancellation.
|
|
10334
|
+
*/
|
|
10335
|
+
declare const PreviewUpdateCancelAction: {
|
|
10336
|
+
readonly CancelImmediately: "cancel_immediately";
|
|
10337
|
+
readonly CancelEndOfCycle: "cancel_end_of_cycle";
|
|
10338
|
+
readonly Uncancel: "uncancel";
|
|
10339
|
+
};
|
|
10340
|
+
/**
|
|
10341
|
+
* Action to perform for cancellation. 'cancel_immediately' cancels now with prorated refund, 'cancel_end_of_cycle' cancels at period end, 'uncancel' reverses a pending cancellation.
|
|
10342
|
+
*/
|
|
10343
|
+
type PreviewUpdateCancelAction = ClosedEnum<typeof PreviewUpdateCancelAction>;
|
|
10344
|
+
/**
|
|
10345
|
+
* Controls how the last payment is refunded on immediate cancellation. 'prorated' refunds the unused portion, 'full' refunds the entire last payment.
|
|
10346
|
+
*/
|
|
10347
|
+
declare const PreviewUpdateRefundLastPayment: {
|
|
10348
|
+
readonly Prorated: "prorated";
|
|
10349
|
+
readonly Full: "full";
|
|
10350
|
+
};
|
|
10351
|
+
/**
|
|
10352
|
+
* Controls how the last payment is refunded on immediate cancellation. 'prorated' refunds the unused portion, 'full' refunds the entire last payment.
|
|
10353
|
+
*/
|
|
10354
|
+
type PreviewUpdateRefundLastPayment = ClosedEnum<typeof PreviewUpdateRefundLastPayment>;
|
|
10355
|
+
/**
|
|
10356
|
+
* Controls whether balances should be recalculated during the subscription update.
|
|
10357
|
+
*/
|
|
10358
|
+
type PreviewUpdateRecalculateBalances = {
|
|
10359
|
+
/**
|
|
10360
|
+
* If true, recalculates balances during the subscription update. Only applicable when updating feature quantities.
|
|
10361
|
+
*/
|
|
10362
|
+
enabled: boolean;
|
|
10363
|
+
};
|
|
10364
|
+
/**
|
|
10365
|
+
* Whether to carry over usages from the previous plan.
|
|
10366
|
+
*/
|
|
10367
|
+
type PreviewUpdateCarryOverUsages = {
|
|
10368
|
+
/**
|
|
10369
|
+
* Whether to carry over usages from the previous plan.
|
|
10370
|
+
*/
|
|
10371
|
+
enabled: boolean;
|
|
10372
|
+
/**
|
|
10373
|
+
* The IDs of the features to carry over usages for. If left undefined, all consumable features will be carried over.
|
|
10374
|
+
*/
|
|
10375
|
+
featureIds?: Array<string> | undefined;
|
|
10376
|
+
};
|
|
10377
|
+
type PreviewUpdateLicenseQuantity = {
|
|
10378
|
+
/**
|
|
10379
|
+
* The license plan to set seat quantity for.
|
|
10380
|
+
*/
|
|
10381
|
+
licensePlanId: string;
|
|
10382
|
+
/**
|
|
10383
|
+
* Total seats for the license, inclusive of the plan's included amount — seats beyond it are paid.
|
|
10384
|
+
*/
|
|
10385
|
+
quantity: number;
|
|
10386
|
+
};
|
|
10387
|
+
type PreviewUpdateParams = {
|
|
10388
|
+
/**
|
|
10389
|
+
* The ID of the customer to attach the plan to.
|
|
10390
|
+
*/
|
|
10391
|
+
customerId: string;
|
|
10392
|
+
/**
|
|
10393
|
+
* The ID of the entity to attach the plan to.
|
|
10394
|
+
*/
|
|
10395
|
+
entityId?: string | undefined;
|
|
10396
|
+
/**
|
|
10397
|
+
* The ID of the plan to update. Optional if subscription_id is provided, or if the customer has only one product.
|
|
10398
|
+
*/
|
|
10399
|
+
planId?: string | undefined;
|
|
10400
|
+
/**
|
|
10401
|
+
* If this plan contains prepaid features, use this field to specify the quantity of each prepaid feature. This quantity includes the included amount and billing units defined when setting up the plan.
|
|
8580
10402
|
*/
|
|
8581
10403
|
featureQuantities?: Array<PreviewUpdateFeatureQuantityRequest> | undefined;
|
|
8582
10404
|
/**
|
|
@@ -8584,7 +10406,7 @@ type PreviewUpdateParams = {
|
|
|
8584
10406
|
*/
|
|
8585
10407
|
version?: number | undefined;
|
|
8586
10408
|
/**
|
|
8587
|
-
* Customize the plan to attach. Can override the price, items, free trial, or a combination.
|
|
10409
|
+
* Customize the plan to attach. Can override the price, items, licenses, free trial, or a combination.
|
|
8588
10410
|
*/
|
|
8589
10411
|
customize?: PreviewUpdateCustomize | undefined;
|
|
8590
10412
|
/**
|
|
@@ -8631,6 +10453,10 @@ type PreviewUpdateParams = {
|
|
|
8631
10453
|
* Whether to carry over usages from the previous plan.
|
|
8632
10454
|
*/
|
|
8633
10455
|
carryOverUsages?: PreviewUpdateCarryOverUsages | undefined;
|
|
10456
|
+
/**
|
|
10457
|
+
* Total seat quantities (inclusive of the license's included count) per license plan offered by this plan. Licenses not listed keep their current paid quantity.
|
|
10458
|
+
*/
|
|
10459
|
+
licenseQuantities?: Array<PreviewUpdateLicenseQuantity> | undefined;
|
|
8634
10460
|
};
|
|
8635
10461
|
type PreviewUpdateDiscount = {
|
|
8636
10462
|
amountOff: number;
|
|
@@ -9037,6 +10863,16 @@ declare const SetupPaymentPriceInterval: {
|
|
|
9037
10863
|
* Billing interval (e.g. 'month', 'year').
|
|
9038
10864
|
*/
|
|
9039
10865
|
type SetupPaymentPriceInterval = ClosedEnum<typeof SetupPaymentPriceInterval>;
|
|
10866
|
+
type SetupPaymentAdditionalCurrency = {
|
|
10867
|
+
/**
|
|
10868
|
+
* Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
|
|
10869
|
+
*/
|
|
10870
|
+
currency: string;
|
|
10871
|
+
/**
|
|
10872
|
+
* Price amount in this currency. Set explicitly per currency, not converted from the base amount.
|
|
10873
|
+
*/
|
|
10874
|
+
amount: number;
|
|
10875
|
+
};
|
|
9040
10876
|
/**
|
|
9041
10877
|
* Base price configuration for a plan.
|
|
9042
10878
|
*/
|
|
@@ -9053,6 +10889,10 @@ type SetupPaymentBasePrice = {
|
|
|
9053
10889
|
* Number of intervals per billing cycle. Defaults to 1.
|
|
9054
10890
|
*/
|
|
9055
10891
|
intervalCount?: number | undefined;
|
|
10892
|
+
/**
|
|
10893
|
+
* Base price amounts in additional currencies. The base 'amount' is in the org's default currency.
|
|
10894
|
+
*/
|
|
10895
|
+
additionalCurrencies?: Array<SetupPaymentAdditionalCurrency> | undefined;
|
|
9056
10896
|
};
|
|
9057
10897
|
/**
|
|
9058
10898
|
* Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
|
|
@@ -9085,13 +10925,41 @@ type SetupPaymentItemReset = {
|
|
|
9085
10925
|
*/
|
|
9086
10926
|
intervalCount?: number | undefined;
|
|
9087
10927
|
};
|
|
9088
|
-
type
|
|
9089
|
-
|
|
9090
|
-
|
|
9091
|
-
|
|
9092
|
-
|
|
9093
|
-
|
|
9094
|
-
|
|
10928
|
+
type SetupPaymentItemAdditionalCurrency = {
|
|
10929
|
+
/**
|
|
10930
|
+
* Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
|
|
10931
|
+
*/
|
|
10932
|
+
currency: string;
|
|
10933
|
+
/**
|
|
10934
|
+
* Price amount in this currency. Set explicitly per currency, not converted from the base amount.
|
|
10935
|
+
*/
|
|
10936
|
+
amount: number;
|
|
10937
|
+
};
|
|
10938
|
+
type SetupPaymentItemTierAdditionalCurrency = {
|
|
10939
|
+
/**
|
|
10940
|
+
* Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
|
|
10941
|
+
*/
|
|
10942
|
+
currency: string;
|
|
10943
|
+
/**
|
|
10944
|
+
* Per-unit amount for this tier in this currency.
|
|
10945
|
+
*/
|
|
10946
|
+
amount?: number | undefined;
|
|
10947
|
+
/**
|
|
10948
|
+
* Flat amount for this tier in this currency, if the tier uses one.
|
|
10949
|
+
*/
|
|
10950
|
+
flatAmount?: number | undefined;
|
|
10951
|
+
};
|
|
10952
|
+
type SetupPaymentItemTier = {
|
|
10953
|
+
to: number | string;
|
|
10954
|
+
amount?: number | undefined;
|
|
10955
|
+
flatAmount?: number | undefined;
|
|
10956
|
+
/**
|
|
10957
|
+
* Per-currency amounts for this tier. Tier boundaries ('to') are shared across all currencies.
|
|
10958
|
+
*/
|
|
10959
|
+
additionalCurrencies?: Array<SetupPaymentItemTierAdditionalCurrency> | undefined;
|
|
10960
|
+
};
|
|
10961
|
+
declare const SetupPaymentItemTierBehavior: {
|
|
10962
|
+
readonly Graduated: "graduated";
|
|
9095
10963
|
readonly Volume: "volume";
|
|
9096
10964
|
};
|
|
9097
10965
|
type SetupPaymentItemTierBehavior = ClosedEnum<typeof SetupPaymentItemTierBehavior>;
|
|
@@ -9129,6 +10997,10 @@ type SetupPaymentItemPrice = {
|
|
|
9129
10997
|
* Price per billing_units after included usage. Either 'amount' or 'tiers' is required.
|
|
9130
10998
|
*/
|
|
9131
10999
|
amount?: number | undefined;
|
|
11000
|
+
/**
|
|
11001
|
+
* Amounts in additional currencies for this flat price. The base 'amount' is in the org's default currency. Only valid with 'amount', not 'tiers'.
|
|
11002
|
+
*/
|
|
11003
|
+
additionalCurrencies?: Array<SetupPaymentItemAdditionalCurrency> | undefined;
|
|
9132
11004
|
/**
|
|
9133
11005
|
* Tiered pricing. Either 'amount' or 'tiers' is required.
|
|
9134
11006
|
*/
|
|
@@ -9291,10 +11163,38 @@ type SetupPaymentAddItemReset = {
|
|
|
9291
11163
|
*/
|
|
9292
11164
|
intervalCount?: number | undefined;
|
|
9293
11165
|
};
|
|
11166
|
+
type SetupPaymentAddItemAdditionalCurrency = {
|
|
11167
|
+
/**
|
|
11168
|
+
* Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
|
|
11169
|
+
*/
|
|
11170
|
+
currency: string;
|
|
11171
|
+
/**
|
|
11172
|
+
* Price amount in this currency. Set explicitly per currency, not converted from the base amount.
|
|
11173
|
+
*/
|
|
11174
|
+
amount: number;
|
|
11175
|
+
};
|
|
11176
|
+
type SetupPaymentAddItemTierAdditionalCurrency = {
|
|
11177
|
+
/**
|
|
11178
|
+
* Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
|
|
11179
|
+
*/
|
|
11180
|
+
currency: string;
|
|
11181
|
+
/**
|
|
11182
|
+
* Per-unit amount for this tier in this currency.
|
|
11183
|
+
*/
|
|
11184
|
+
amount?: number | undefined;
|
|
11185
|
+
/**
|
|
11186
|
+
* Flat amount for this tier in this currency, if the tier uses one.
|
|
11187
|
+
*/
|
|
11188
|
+
flatAmount?: number | undefined;
|
|
11189
|
+
};
|
|
9294
11190
|
type SetupPaymentAddItemTier = {
|
|
9295
11191
|
to: number | string;
|
|
9296
11192
|
amount?: number | undefined;
|
|
9297
11193
|
flatAmount?: number | undefined;
|
|
11194
|
+
/**
|
|
11195
|
+
* Per-currency amounts for this tier. Tier boundaries ('to') are shared across all currencies.
|
|
11196
|
+
*/
|
|
11197
|
+
additionalCurrencies?: Array<SetupPaymentAddItemTierAdditionalCurrency> | undefined;
|
|
9298
11198
|
};
|
|
9299
11199
|
declare const SetupPaymentAddItemTierBehavior: {
|
|
9300
11200
|
readonly Graduated: "graduated";
|
|
@@ -9335,6 +11235,10 @@ type SetupPaymentAddItemPrice = {
|
|
|
9335
11235
|
* Price per billing_units after included usage. Either 'amount' or 'tiers' is required.
|
|
9336
11236
|
*/
|
|
9337
11237
|
amount?: number | undefined;
|
|
11238
|
+
/**
|
|
11239
|
+
* Amounts in additional currencies for this flat price. The base 'amount' is in the org's default currency. Only valid with 'amount', not 'tiers'.
|
|
11240
|
+
*/
|
|
11241
|
+
additionalCurrencies?: Array<SetupPaymentAddItemAdditionalCurrency> | undefined;
|
|
9338
11242
|
/**
|
|
9339
11243
|
* Tiered pricing. Either 'amount' or 'tiers' is required.
|
|
9340
11244
|
*/
|
|
@@ -9555,218 +11459,555 @@ type SetupPaymentFreeTrialParams = {
|
|
|
9555
11459
|
*/
|
|
9556
11460
|
durationType?: SetupPaymentDurationType | undefined;
|
|
9557
11461
|
/**
|
|
9558
|
-
* If true, payment method required to start trial. Customer is charged after trial ends.
|
|
11462
|
+
* If true, payment method required to start trial. Customer is charged after trial ends.
|
|
11463
|
+
*/
|
|
11464
|
+
cardRequired?: boolean | undefined;
|
|
11465
|
+
/**
|
|
11466
|
+
* Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
|
|
11467
|
+
*/
|
|
11468
|
+
onEnd?: SetupPaymentOnEnd | undefined;
|
|
11469
|
+
};
|
|
11470
|
+
/**
|
|
11471
|
+
* The time interval for the purchase limit window.
|
|
11472
|
+
*/
|
|
11473
|
+
declare const SetupPaymentPurchaseLimitInterval: {
|
|
11474
|
+
readonly Hour: "hour";
|
|
11475
|
+
readonly Day: "day";
|
|
11476
|
+
readonly Week: "week";
|
|
11477
|
+
readonly Month: "month";
|
|
11478
|
+
};
|
|
11479
|
+
/**
|
|
11480
|
+
* The time interval for the purchase limit window.
|
|
11481
|
+
*/
|
|
11482
|
+
type SetupPaymentPurchaseLimitInterval = ClosedEnum<typeof SetupPaymentPurchaseLimitInterval>;
|
|
11483
|
+
/**
|
|
11484
|
+
* Optional rate limit to cap how often auto top-ups occur.
|
|
11485
|
+
*/
|
|
11486
|
+
type SetupPaymentPurchaseLimit = {
|
|
11487
|
+
/**
|
|
11488
|
+
* The time interval for the purchase limit window.
|
|
11489
|
+
*/
|
|
11490
|
+
interval: SetupPaymentPurchaseLimitInterval;
|
|
11491
|
+
/**
|
|
11492
|
+
* Number of intervals in the purchase limit window.
|
|
11493
|
+
*/
|
|
11494
|
+
intervalCount?: number | undefined;
|
|
11495
|
+
/**
|
|
11496
|
+
* Maximum number of auto top-ups allowed within the interval.
|
|
11497
|
+
*/
|
|
11498
|
+
limit: number;
|
|
11499
|
+
};
|
|
11500
|
+
type SetupPaymentAutoTopup = {
|
|
11501
|
+
/**
|
|
11502
|
+
* The ID of the feature (credit balance) to auto top-up.
|
|
11503
|
+
*/
|
|
11504
|
+
featureId: string;
|
|
11505
|
+
/**
|
|
11506
|
+
* Whether auto top-up is enabled.
|
|
11507
|
+
*/
|
|
11508
|
+
enabled?: boolean | undefined;
|
|
11509
|
+
/**
|
|
11510
|
+
* When the balance drops below this threshold, an auto top-up will be purchased.
|
|
11511
|
+
*/
|
|
11512
|
+
threshold: number;
|
|
11513
|
+
/**
|
|
11514
|
+
* Amount of credits to add per auto top-up.
|
|
11515
|
+
*/
|
|
11516
|
+
quantity: number;
|
|
11517
|
+
/**
|
|
11518
|
+
* Optional rate limit to cap how often auto top-ups occur.
|
|
11519
|
+
*/
|
|
11520
|
+
purchaseLimit?: SetupPaymentPurchaseLimit | undefined;
|
|
11521
|
+
/**
|
|
11522
|
+
* When true, auto top-up creates a send_invoice invoice instead of auto-charging.
|
|
11523
|
+
*/
|
|
11524
|
+
invoiceMode?: boolean | undefined;
|
|
11525
|
+
};
|
|
11526
|
+
/**
|
|
11527
|
+
* How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
|
|
11528
|
+
*/
|
|
11529
|
+
declare const SetupPaymentLimitType: {
|
|
11530
|
+
readonly Absolute: "absolute";
|
|
11531
|
+
readonly UsagePercentage: "usage_percentage";
|
|
11532
|
+
};
|
|
11533
|
+
/**
|
|
11534
|
+
* How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
|
|
11535
|
+
*/
|
|
11536
|
+
type SetupPaymentLimitType = ClosedEnum<typeof SetupPaymentLimitType>;
|
|
11537
|
+
type SetupPaymentSpendLimit = {
|
|
11538
|
+
/**
|
|
11539
|
+
* Optional feature ID this spend limit applies to.
|
|
11540
|
+
*/
|
|
11541
|
+
featureId?: string | undefined;
|
|
11542
|
+
/**
|
|
11543
|
+
* Whether the overage spend limit is enabled.
|
|
11544
|
+
*/
|
|
11545
|
+
enabled?: boolean | undefined;
|
|
11546
|
+
/**
|
|
11547
|
+
* How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
|
|
11548
|
+
*/
|
|
11549
|
+
limitType?: SetupPaymentLimitType | undefined;
|
|
11550
|
+
/**
|
|
11551
|
+
* Overage cap for the feature: absolute units, or a percent (e.g. 120) when limit_type is usage_percentage.
|
|
11552
|
+
*/
|
|
11553
|
+
overageLimit?: number | undefined;
|
|
11554
|
+
/**
|
|
11555
|
+
* When true, overage for this feature is not posted to Stripe. Usage tracking and balance resets still behave normally.
|
|
11556
|
+
*/
|
|
11557
|
+
skipOverageBilling?: boolean | undefined;
|
|
11558
|
+
};
|
|
11559
|
+
/**
|
|
11560
|
+
* Interval for the cap, aligned to the customer's billing cycle.
|
|
11561
|
+
*/
|
|
11562
|
+
declare const SetupPaymentUsageLimitInterval: {
|
|
11563
|
+
readonly Day: "day";
|
|
11564
|
+
readonly Week: "week";
|
|
11565
|
+
readonly Month: "month";
|
|
11566
|
+
readonly Year: "year";
|
|
11567
|
+
};
|
|
11568
|
+
/**
|
|
11569
|
+
* Interval for the cap, aligned to the customer's billing cycle.
|
|
11570
|
+
*/
|
|
11571
|
+
type SetupPaymentUsageLimitInterval = ClosedEnum<typeof SetupPaymentUsageLimitInterval>;
|
|
11572
|
+
/**
|
|
11573
|
+
* When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
|
|
11574
|
+
*/
|
|
11575
|
+
type SetupPaymentFilter = {
|
|
11576
|
+
properties: {
|
|
11577
|
+
[k: string]: string | number | boolean;
|
|
11578
|
+
};
|
|
11579
|
+
};
|
|
11580
|
+
type SetupPaymentUsageLimit = {
|
|
11581
|
+
/**
|
|
11582
|
+
* The feature this usage limit applies to.
|
|
11583
|
+
*/
|
|
11584
|
+
featureId: string;
|
|
11585
|
+
/**
|
|
11586
|
+
* Whether this usage limit is enabled.
|
|
11587
|
+
*/
|
|
11588
|
+
enabled?: boolean | undefined;
|
|
11589
|
+
/**
|
|
11590
|
+
* Maximum units allowed per interval.
|
|
11591
|
+
*/
|
|
11592
|
+
limit: number;
|
|
11593
|
+
/**
|
|
11594
|
+
* Interval for the cap, aligned to the customer's billing cycle.
|
|
11595
|
+
*/
|
|
11596
|
+
interval: SetupPaymentUsageLimitInterval;
|
|
11597
|
+
/**
|
|
11598
|
+
* When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
|
|
11599
|
+
*/
|
|
11600
|
+
filter?: SetupPaymentFilter | undefined;
|
|
11601
|
+
};
|
|
11602
|
+
/**
|
|
11603
|
+
* Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
|
|
11604
|
+
*/
|
|
11605
|
+
declare const SetupPaymentThresholdType: {
|
|
11606
|
+
readonly Usage: "usage";
|
|
11607
|
+
readonly UsagePercentage: "usage_percentage";
|
|
11608
|
+
readonly Remaining: "remaining";
|
|
11609
|
+
readonly RemainingPercentage: "remaining_percentage";
|
|
11610
|
+
};
|
|
11611
|
+
/**
|
|
11612
|
+
* Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
|
|
11613
|
+
*/
|
|
11614
|
+
type SetupPaymentThresholdType = ClosedEnum<typeof SetupPaymentThresholdType>;
|
|
11615
|
+
type SetupPaymentUsageAlert = {
|
|
11616
|
+
/**
|
|
11617
|
+
* The feature ID this alert applies to.
|
|
11618
|
+
*/
|
|
11619
|
+
featureId?: string | undefined;
|
|
11620
|
+
/**
|
|
11621
|
+
* Whether this usage alert is enabled.
|
|
11622
|
+
*/
|
|
11623
|
+
enabled?: boolean | undefined;
|
|
11624
|
+
/**
|
|
11625
|
+
* The threshold value that triggers the alert. For usage or remaining, this is an absolute count. For usage_percentage or remaining_percentage, this is a percentage (0-100).
|
|
11626
|
+
*/
|
|
11627
|
+
threshold: number;
|
|
11628
|
+
/**
|
|
11629
|
+
* Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
|
|
11630
|
+
*/
|
|
11631
|
+
thresholdType: SetupPaymentThresholdType;
|
|
11632
|
+
/**
|
|
11633
|
+
* Optional user-defined label to distinguish multiple alerts on the same feature.
|
|
11634
|
+
*/
|
|
11635
|
+
name?: string | undefined;
|
|
11636
|
+
};
|
|
11637
|
+
type SetupPaymentOverageAllowed = {
|
|
11638
|
+
/**
|
|
11639
|
+
* The feature ID this overage allowed control applies to.
|
|
11640
|
+
*/
|
|
11641
|
+
featureId: string;
|
|
11642
|
+
/**
|
|
11643
|
+
* Whether overage is allowed for this feature.
|
|
11644
|
+
*/
|
|
11645
|
+
enabled?: boolean | undefined;
|
|
11646
|
+
};
|
|
11647
|
+
/**
|
|
11648
|
+
* Override the plan's billing controls (auto top-ups, spend limits, usage limits, usage alerts, overage allowed) for this customer.
|
|
11649
|
+
*/
|
|
11650
|
+
type SetupPaymentBillingControls = {
|
|
11651
|
+
/**
|
|
11652
|
+
* List of auto top-up configurations per feature.
|
|
11653
|
+
*/
|
|
11654
|
+
autoTopups?: Array<SetupPaymentAutoTopup> | undefined;
|
|
11655
|
+
/**
|
|
11656
|
+
* List of overage spend limits per feature (caps overage spend).
|
|
11657
|
+
*/
|
|
11658
|
+
spendLimits?: Array<SetupPaymentSpendLimit> | undefined;
|
|
11659
|
+
/**
|
|
11660
|
+
* List of hard usage caps per feature (max units per interval).
|
|
11661
|
+
*/
|
|
11662
|
+
usageLimits?: Array<SetupPaymentUsageLimit> | undefined;
|
|
11663
|
+
/**
|
|
11664
|
+
* List of usage alert configurations per feature.
|
|
11665
|
+
*/
|
|
11666
|
+
usageAlerts?: Array<SetupPaymentUsageAlert> | undefined;
|
|
11667
|
+
/**
|
|
11668
|
+
* List of overage allowed controls per feature. When enabled, usage can exceed balance.
|
|
11669
|
+
*/
|
|
11670
|
+
overageAllowed?: Array<SetupPaymentOverageAllowed> | undefined;
|
|
11671
|
+
};
|
|
11672
|
+
/**
|
|
11673
|
+
* Billing interval (e.g. 'month', 'year').
|
|
11674
|
+
*/
|
|
11675
|
+
declare const SetupPaymentPriceUpsertLicenseInterval: {
|
|
11676
|
+
readonly OneOff: "one_off";
|
|
11677
|
+
readonly Week: "week";
|
|
11678
|
+
readonly Month: "month";
|
|
11679
|
+
readonly Quarter: "quarter";
|
|
11680
|
+
readonly SemiAnnual: "semi_annual";
|
|
11681
|
+
readonly Year: "year";
|
|
11682
|
+
};
|
|
11683
|
+
/**
|
|
11684
|
+
* Billing interval (e.g. 'month', 'year').
|
|
11685
|
+
*/
|
|
11686
|
+
type SetupPaymentPriceUpsertLicenseInterval = ClosedEnum<typeof SetupPaymentPriceUpsertLicenseInterval>;
|
|
11687
|
+
type SetupPaymentUpsertLicenseAdditionalCurrency = {
|
|
11688
|
+
/**
|
|
11689
|
+
* Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
|
|
11690
|
+
*/
|
|
11691
|
+
currency: string;
|
|
11692
|
+
/**
|
|
11693
|
+
* Price amount in this currency. Set explicitly per currency, not converted from the base amount.
|
|
11694
|
+
*/
|
|
11695
|
+
amount: number;
|
|
11696
|
+
};
|
|
11697
|
+
/**
|
|
11698
|
+
* Base price configuration for a plan.
|
|
11699
|
+
*/
|
|
11700
|
+
type SetupPaymentUpsertLicenseBasePrice = {
|
|
11701
|
+
/**
|
|
11702
|
+
* Base price amount for the plan.
|
|
11703
|
+
*/
|
|
11704
|
+
amount: number;
|
|
11705
|
+
/**
|
|
11706
|
+
* Billing interval (e.g. 'month', 'year').
|
|
11707
|
+
*/
|
|
11708
|
+
interval: SetupPaymentPriceUpsertLicenseInterval;
|
|
11709
|
+
/**
|
|
11710
|
+
* Number of intervals per billing cycle. Defaults to 1.
|
|
11711
|
+
*/
|
|
11712
|
+
intervalCount?: number | undefined;
|
|
11713
|
+
/**
|
|
11714
|
+
* Base price amounts in additional currencies. The base 'amount' is in the org's default currency.
|
|
11715
|
+
*/
|
|
11716
|
+
additionalCurrencies?: Array<SetupPaymentUpsertLicenseAdditionalCurrency> | undefined;
|
|
11717
|
+
};
|
|
11718
|
+
/**
|
|
11719
|
+
* Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
|
|
11720
|
+
*/
|
|
11721
|
+
declare const SetupPaymentUpsertLicenseResetInterval: {
|
|
11722
|
+
readonly OneOff: "one_off";
|
|
11723
|
+
readonly Minute: "minute";
|
|
11724
|
+
readonly Hour: "hour";
|
|
11725
|
+
readonly Day: "day";
|
|
11726
|
+
readonly Week: "week";
|
|
11727
|
+
readonly Month: "month";
|
|
11728
|
+
readonly Quarter: "quarter";
|
|
11729
|
+
readonly SemiAnnual: "semi_annual";
|
|
11730
|
+
readonly Year: "year";
|
|
11731
|
+
};
|
|
11732
|
+
/**
|
|
11733
|
+
* Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
|
|
11734
|
+
*/
|
|
11735
|
+
type SetupPaymentUpsertLicenseResetInterval = ClosedEnum<typeof SetupPaymentUpsertLicenseResetInterval>;
|
|
11736
|
+
/**
|
|
11737
|
+
* Reset configuration for consumable features. Omit for non-consumable features like seats.
|
|
11738
|
+
*/
|
|
11739
|
+
type SetupPaymentUpsertLicenseReset = {
|
|
11740
|
+
/**
|
|
11741
|
+
* Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
|
|
11742
|
+
*/
|
|
11743
|
+
interval: SetupPaymentUpsertLicenseResetInterval;
|
|
11744
|
+
/**
|
|
11745
|
+
* Number of intervals between resets. Defaults to 1.
|
|
11746
|
+
*/
|
|
11747
|
+
intervalCount?: number | undefined;
|
|
11748
|
+
};
|
|
11749
|
+
type SetupPaymentUpsertLicenseAddItemAdditionalCurrency = {
|
|
11750
|
+
/**
|
|
11751
|
+
* Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
|
|
11752
|
+
*/
|
|
11753
|
+
currency: string;
|
|
11754
|
+
/**
|
|
11755
|
+
* Price amount in this currency. Set explicitly per currency, not converted from the base amount.
|
|
9559
11756
|
*/
|
|
9560
|
-
|
|
11757
|
+
amount: number;
|
|
11758
|
+
};
|
|
11759
|
+
type SetupPaymentUpsertLicenseTier = {
|
|
11760
|
+
to?: any | undefined;
|
|
11761
|
+
amount?: number | undefined;
|
|
11762
|
+
flatAmount?: number | undefined;
|
|
9561
11763
|
/**
|
|
9562
|
-
*
|
|
11764
|
+
* Per-currency amounts for this tier. Tier boundaries ('to') are shared across all currencies.
|
|
9563
11765
|
*/
|
|
9564
|
-
|
|
11766
|
+
additionalCurrencies?: Array<any> | undefined;
|
|
11767
|
+
};
|
|
11768
|
+
declare const SetupPaymentUpsertLicenseTierBehavior: {
|
|
11769
|
+
readonly Graduated: "graduated";
|
|
11770
|
+
readonly Volume: "volume";
|
|
9565
11771
|
};
|
|
11772
|
+
type SetupPaymentUpsertLicenseTierBehavior = ClosedEnum<typeof SetupPaymentUpsertLicenseTierBehavior>;
|
|
9566
11773
|
/**
|
|
9567
|
-
*
|
|
11774
|
+
* Billing interval. For consumable features, should match reset.interval.
|
|
9568
11775
|
*/
|
|
9569
|
-
declare const
|
|
9570
|
-
readonly
|
|
9571
|
-
readonly Day: "day";
|
|
11776
|
+
declare const SetupPaymentUpsertLicenseAddItemPriceInterval: {
|
|
11777
|
+
readonly OneOff: "one_off";
|
|
9572
11778
|
readonly Week: "week";
|
|
9573
11779
|
readonly Month: "month";
|
|
11780
|
+
readonly Quarter: "quarter";
|
|
11781
|
+
readonly SemiAnnual: "semi_annual";
|
|
11782
|
+
readonly Year: "year";
|
|
9574
11783
|
};
|
|
9575
11784
|
/**
|
|
9576
|
-
*
|
|
11785
|
+
* Billing interval. For consumable features, should match reset.interval.
|
|
9577
11786
|
*/
|
|
9578
|
-
type
|
|
11787
|
+
type SetupPaymentUpsertLicenseAddItemPriceInterval = ClosedEnum<typeof SetupPaymentUpsertLicenseAddItemPriceInterval>;
|
|
9579
11788
|
/**
|
|
9580
|
-
*
|
|
11789
|
+
* 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
|
|
9581
11790
|
*/
|
|
9582
|
-
|
|
9583
|
-
|
|
9584
|
-
|
|
9585
|
-
|
|
9586
|
-
|
|
11791
|
+
declare const SetupPaymentUpsertLicenseAddItemBillingMethod: {
|
|
11792
|
+
readonly Prepaid: "prepaid";
|
|
11793
|
+
readonly UsageBased: "usage_based";
|
|
11794
|
+
};
|
|
11795
|
+
/**
|
|
11796
|
+
* 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
|
|
11797
|
+
*/
|
|
11798
|
+
type SetupPaymentUpsertLicenseAddItemBillingMethod = ClosedEnum<typeof SetupPaymentUpsertLicenseAddItemBillingMethod>;
|
|
11799
|
+
/**
|
|
11800
|
+
* Pricing for usage beyond included units. Omit for free features.
|
|
11801
|
+
*/
|
|
11802
|
+
type SetupPaymentUpsertLicensePrice = {
|
|
9587
11803
|
/**
|
|
9588
|
-
*
|
|
11804
|
+
* Price per billing_units after included usage. Either 'amount' or 'tiers' is required.
|
|
9589
11805
|
*/
|
|
9590
|
-
|
|
11806
|
+
amount?: number | undefined;
|
|
9591
11807
|
/**
|
|
9592
|
-
*
|
|
11808
|
+
* Amounts in additional currencies for this flat price. The base 'amount' is in the org's default currency. Only valid with 'amount', not 'tiers'.
|
|
9593
11809
|
*/
|
|
9594
|
-
|
|
9595
|
-
};
|
|
9596
|
-
type SetupPaymentAutoTopup = {
|
|
11810
|
+
additionalCurrencies?: Array<SetupPaymentUpsertLicenseAddItemAdditionalCurrency> | undefined;
|
|
9597
11811
|
/**
|
|
9598
|
-
*
|
|
11812
|
+
* Tiered pricing. Either 'amount' or 'tiers' is required.
|
|
9599
11813
|
*/
|
|
9600
|
-
|
|
11814
|
+
tiers?: Array<SetupPaymentUpsertLicenseTier> | undefined;
|
|
11815
|
+
tierBehavior?: SetupPaymentUpsertLicenseTierBehavior | undefined;
|
|
9601
11816
|
/**
|
|
9602
|
-
*
|
|
11817
|
+
* Billing interval. For consumable features, should match reset.interval.
|
|
9603
11818
|
*/
|
|
9604
|
-
|
|
11819
|
+
interval: SetupPaymentUpsertLicenseAddItemPriceInterval;
|
|
9605
11820
|
/**
|
|
9606
|
-
*
|
|
11821
|
+
* Number of intervals per billing cycle. Defaults to 1.
|
|
9607
11822
|
*/
|
|
9608
|
-
|
|
11823
|
+
intervalCount?: number | undefined;
|
|
9609
11824
|
/**
|
|
9610
|
-
*
|
|
11825
|
+
* Units per price increment. Usage is rounded UP when billed (e.g. billing_units=100 means 101 rounds to 200).
|
|
9611
11826
|
*/
|
|
9612
|
-
|
|
11827
|
+
billingUnits?: number | undefined;
|
|
9613
11828
|
/**
|
|
9614
|
-
*
|
|
11829
|
+
* 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
|
|
9615
11830
|
*/
|
|
9616
|
-
|
|
11831
|
+
billingMethod: SetupPaymentUpsertLicenseAddItemBillingMethod;
|
|
9617
11832
|
/**
|
|
9618
|
-
*
|
|
11833
|
+
* Max units purchasable beyond included. E.g. included=100, max_purchase=300 allows 400 total. Null for no limit.
|
|
9619
11834
|
*/
|
|
9620
|
-
|
|
11835
|
+
maxPurchase?: number | null | undefined;
|
|
9621
11836
|
};
|
|
9622
11837
|
/**
|
|
9623
|
-
*
|
|
11838
|
+
* Billing behavior when quantity increases mid-cycle.
|
|
9624
11839
|
*/
|
|
9625
|
-
declare const
|
|
9626
|
-
readonly
|
|
9627
|
-
readonly
|
|
11840
|
+
declare const SetupPaymentUpsertLicenseOnIncrease: {
|
|
11841
|
+
readonly BillImmediately: "bill_immediately";
|
|
11842
|
+
readonly ProrateImmediately: "prorate_immediately";
|
|
11843
|
+
readonly ProrateNextCycle: "prorate_next_cycle";
|
|
11844
|
+
readonly BillNextCycle: "bill_next_cycle";
|
|
9628
11845
|
};
|
|
9629
11846
|
/**
|
|
9630
|
-
*
|
|
11847
|
+
* Billing behavior when quantity increases mid-cycle.
|
|
9631
11848
|
*/
|
|
9632
|
-
type
|
|
9633
|
-
|
|
9634
|
-
|
|
9635
|
-
|
|
9636
|
-
|
|
9637
|
-
|
|
9638
|
-
|
|
9639
|
-
|
|
9640
|
-
|
|
9641
|
-
|
|
9642
|
-
|
|
9643
|
-
|
|
9644
|
-
|
|
9645
|
-
|
|
11849
|
+
type SetupPaymentUpsertLicenseOnIncrease = ClosedEnum<typeof SetupPaymentUpsertLicenseOnIncrease>;
|
|
11850
|
+
/**
|
|
11851
|
+
* Credit behavior when quantity decreases mid-cycle.
|
|
11852
|
+
*/
|
|
11853
|
+
declare const SetupPaymentUpsertLicenseOnDecrease: {
|
|
11854
|
+
readonly Prorate: "prorate";
|
|
11855
|
+
readonly ProrateImmediately: "prorate_immediately";
|
|
11856
|
+
readonly ProrateNextCycle: "prorate_next_cycle";
|
|
11857
|
+
readonly None: "none";
|
|
11858
|
+
readonly NoProrations: "no_prorations";
|
|
11859
|
+
};
|
|
11860
|
+
/**
|
|
11861
|
+
* Credit behavior when quantity decreases mid-cycle.
|
|
11862
|
+
*/
|
|
11863
|
+
type SetupPaymentUpsertLicenseOnDecrease = ClosedEnum<typeof SetupPaymentUpsertLicenseOnDecrease>;
|
|
11864
|
+
/**
|
|
11865
|
+
* Proration settings for prepaid features. Controls mid-cycle quantity change billing.
|
|
11866
|
+
*/
|
|
11867
|
+
type SetupPaymentUpsertLicenseProration = {
|
|
9646
11868
|
/**
|
|
9647
|
-
*
|
|
11869
|
+
* Billing behavior when quantity increases mid-cycle.
|
|
9648
11870
|
*/
|
|
9649
|
-
|
|
11871
|
+
onIncrease: SetupPaymentUpsertLicenseOnIncrease;
|
|
9650
11872
|
/**
|
|
9651
|
-
*
|
|
11873
|
+
* Credit behavior when quantity decreases mid-cycle.
|
|
9652
11874
|
*/
|
|
9653
|
-
|
|
11875
|
+
onDecrease: SetupPaymentUpsertLicenseOnDecrease;
|
|
9654
11876
|
};
|
|
9655
11877
|
/**
|
|
9656
|
-
*
|
|
11878
|
+
* When rolled over units expire.
|
|
9657
11879
|
*/
|
|
9658
|
-
declare const
|
|
9659
|
-
readonly Day: "day";
|
|
9660
|
-
readonly Week: "week";
|
|
11880
|
+
declare const SetupPaymentUpsertLicenseExpiryDurationType: {
|
|
9661
11881
|
readonly Month: "month";
|
|
9662
|
-
readonly
|
|
11882
|
+
readonly Forever: "forever";
|
|
9663
11883
|
};
|
|
9664
11884
|
/**
|
|
9665
|
-
*
|
|
11885
|
+
* When rolled over units expire.
|
|
9666
11886
|
*/
|
|
9667
|
-
type
|
|
11887
|
+
type SetupPaymentUpsertLicenseExpiryDurationType = ClosedEnum<typeof SetupPaymentUpsertLicenseExpiryDurationType>;
|
|
9668
11888
|
/**
|
|
9669
|
-
*
|
|
11889
|
+
* Rollover config for unused units. If set, unused included units carry over.
|
|
9670
11890
|
*/
|
|
9671
|
-
type
|
|
9672
|
-
properties: {
|
|
9673
|
-
[k: string]: string | number | boolean;
|
|
9674
|
-
};
|
|
9675
|
-
};
|
|
9676
|
-
type SetupPaymentUsageLimit = {
|
|
9677
|
-
/**
|
|
9678
|
-
* The feature this usage limit applies to.
|
|
9679
|
-
*/
|
|
9680
|
-
featureId: string;
|
|
11891
|
+
type SetupPaymentUpsertLicenseRollover = {
|
|
9681
11892
|
/**
|
|
9682
|
-
*
|
|
11893
|
+
* Max rollover units. Omit for unlimited rollover.
|
|
9683
11894
|
*/
|
|
9684
|
-
|
|
11895
|
+
max?: number | undefined;
|
|
9685
11896
|
/**
|
|
9686
|
-
* Maximum
|
|
11897
|
+
* Maximum rollover as a percentage (0-100) of included + prepaid grant. Mutually exclusive with max.
|
|
9687
11898
|
*/
|
|
9688
|
-
|
|
11899
|
+
maxPercentage?: number | undefined;
|
|
9689
11900
|
/**
|
|
9690
|
-
*
|
|
11901
|
+
* When rolled over units expire.
|
|
9691
11902
|
*/
|
|
9692
|
-
|
|
11903
|
+
expiryDurationType: SetupPaymentUpsertLicenseExpiryDurationType;
|
|
9693
11904
|
/**
|
|
9694
|
-
*
|
|
11905
|
+
* Number of periods before expiry.
|
|
9695
11906
|
*/
|
|
9696
|
-
|
|
9697
|
-
};
|
|
9698
|
-
/**
|
|
9699
|
-
* Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
|
|
9700
|
-
*/
|
|
9701
|
-
declare const SetupPaymentThresholdType: {
|
|
9702
|
-
readonly Usage: "usage";
|
|
9703
|
-
readonly UsagePercentage: "usage_percentage";
|
|
9704
|
-
readonly Remaining: "remaining";
|
|
9705
|
-
readonly RemainingPercentage: "remaining_percentage";
|
|
11907
|
+
expiryDurationLength?: number | undefined;
|
|
9706
11908
|
};
|
|
9707
11909
|
/**
|
|
9708
|
-
*
|
|
11910
|
+
* Configuration for a feature item in a plan, including usage limits, pricing, and rollover settings.
|
|
9709
11911
|
*/
|
|
9710
|
-
type
|
|
9711
|
-
type SetupPaymentUsageAlert = {
|
|
11912
|
+
type SetupPaymentUpsertLicensePlanItem = {
|
|
9712
11913
|
/**
|
|
9713
|
-
* The
|
|
11914
|
+
* The ID of the feature to configure.
|
|
9714
11915
|
*/
|
|
9715
|
-
featureId
|
|
11916
|
+
featureId: string;
|
|
9716
11917
|
/**
|
|
9717
|
-
*
|
|
11918
|
+
* Number of free units included. Balance resets to this each interval for consumable features.
|
|
9718
11919
|
*/
|
|
9719
|
-
|
|
11920
|
+
included?: number | undefined;
|
|
9720
11921
|
/**
|
|
9721
|
-
*
|
|
11922
|
+
* If true, customer has unlimited access to this feature.
|
|
9722
11923
|
*/
|
|
9723
|
-
|
|
11924
|
+
unlimited?: boolean | undefined;
|
|
9724
11925
|
/**
|
|
9725
|
-
*
|
|
11926
|
+
* Reset configuration for consumable features. Omit for non-consumable features like seats.
|
|
9726
11927
|
*/
|
|
9727
|
-
|
|
11928
|
+
reset?: SetupPaymentUpsertLicenseReset | undefined;
|
|
9728
11929
|
/**
|
|
9729
|
-
*
|
|
11930
|
+
* Pricing for usage beyond included units. Omit for free features.
|
|
9730
11931
|
*/
|
|
9731
|
-
|
|
9732
|
-
};
|
|
9733
|
-
type SetupPaymentOverageAllowed = {
|
|
11932
|
+
price?: SetupPaymentUpsertLicensePrice | undefined;
|
|
9734
11933
|
/**
|
|
9735
|
-
*
|
|
11934
|
+
* Proration settings for prepaid features. Controls mid-cycle quantity change billing.
|
|
9736
11935
|
*/
|
|
9737
|
-
|
|
11936
|
+
proration?: SetupPaymentUpsertLicenseProration | undefined;
|
|
9738
11937
|
/**
|
|
9739
|
-
*
|
|
11938
|
+
* Rollover config for unused units. If set, unused included units carry over.
|
|
9740
11939
|
*/
|
|
9741
|
-
|
|
11940
|
+
rollover?: SetupPaymentUpsertLicenseRollover | undefined;
|
|
9742
11941
|
};
|
|
9743
11942
|
/**
|
|
9744
|
-
*
|
|
11943
|
+
* Match items with this billing method (prepaid or usage_based).
|
|
9745
11944
|
*/
|
|
9746
|
-
|
|
9747
|
-
|
|
9748
|
-
|
|
9749
|
-
|
|
9750
|
-
|
|
11945
|
+
declare const SetupPaymentUpsertLicenseRemoveItemBillingMethod: {
|
|
11946
|
+
readonly Prepaid: "prepaid";
|
|
11947
|
+
readonly UsageBased: "usage_based";
|
|
11948
|
+
};
|
|
11949
|
+
/**
|
|
11950
|
+
* Match items with this billing method (prepaid or usage_based).
|
|
11951
|
+
*/
|
|
11952
|
+
type SetupPaymentUpsertLicenseRemoveItemBillingMethod = ClosedEnum<typeof SetupPaymentUpsertLicenseRemoveItemBillingMethod>;
|
|
11953
|
+
declare const SetupPaymentIntervalUpsertLicenseRemoveItemEnum2: {
|
|
11954
|
+
readonly OneOff: "one_off";
|
|
11955
|
+
readonly Minute: "minute";
|
|
11956
|
+
readonly Hour: "hour";
|
|
11957
|
+
readonly Day: "day";
|
|
11958
|
+
readonly Week: "week";
|
|
11959
|
+
readonly Month: "month";
|
|
11960
|
+
readonly Quarter: "quarter";
|
|
11961
|
+
readonly SemiAnnual: "semi_annual";
|
|
11962
|
+
readonly Year: "year";
|
|
11963
|
+
};
|
|
11964
|
+
type SetupPaymentIntervalUpsertLicenseRemoveItemEnum2 = ClosedEnum<typeof SetupPaymentIntervalUpsertLicenseRemoveItemEnum2>;
|
|
11965
|
+
declare const SetupPaymentIntervalUpsertLicenseRemoveItemEnum1: {
|
|
11966
|
+
readonly OneOff: "one_off";
|
|
11967
|
+
readonly Week: "week";
|
|
11968
|
+
readonly Month: "month";
|
|
11969
|
+
readonly Quarter: "quarter";
|
|
11970
|
+
readonly SemiAnnual: "semi_annual";
|
|
11971
|
+
readonly Year: "year";
|
|
11972
|
+
};
|
|
11973
|
+
type SetupPaymentIntervalUpsertLicenseRemoveItemEnum1 = ClosedEnum<typeof SetupPaymentIntervalUpsertLicenseRemoveItemEnum1>;
|
|
11974
|
+
/**
|
|
11975
|
+
* Filter for matching plan items. All provided fields must match (AND).
|
|
11976
|
+
*/
|
|
11977
|
+
type SetupPaymentUpsertLicensePlanItemFilter = {
|
|
9751
11978
|
/**
|
|
9752
|
-
*
|
|
11979
|
+
* Match items linked to this feature.
|
|
9753
11980
|
*/
|
|
9754
|
-
|
|
11981
|
+
featureId?: string | undefined;
|
|
9755
11982
|
/**
|
|
9756
|
-
*
|
|
11983
|
+
* Match items with this billing method (prepaid or usage_based).
|
|
9757
11984
|
*/
|
|
9758
|
-
|
|
11985
|
+
billingMethod?: SetupPaymentUpsertLicenseRemoveItemBillingMethod | undefined;
|
|
9759
11986
|
/**
|
|
9760
|
-
*
|
|
11987
|
+
* Match items with this interval. Accepts either a BillingInterval (price-side) or a ResetInterval (reset-side, includes day/hour/minute) so price-less items keyed by reset.interval can be disambiguated.
|
|
9761
11988
|
*/
|
|
9762
|
-
|
|
11989
|
+
interval?: SetupPaymentIntervalUpsertLicenseRemoveItemEnum1 | SetupPaymentIntervalUpsertLicenseRemoveItemEnum2 | undefined;
|
|
9763
11990
|
/**
|
|
9764
|
-
*
|
|
11991
|
+
* Match items with this interval_count. Disambiguates between items that share an interval but differ in count.
|
|
9765
11992
|
*/
|
|
9766
|
-
|
|
11993
|
+
intervalCount?: number | undefined;
|
|
11994
|
+
};
|
|
11995
|
+
type SetupPaymentUpsertLicenseCustomize = {
|
|
11996
|
+
price?: SetupPaymentUpsertLicenseBasePrice | null | undefined;
|
|
11997
|
+
addItems?: Array<SetupPaymentUpsertLicensePlanItem> | undefined;
|
|
11998
|
+
removeItems?: Array<SetupPaymentUpsertLicensePlanItemFilter> | undefined;
|
|
11999
|
+
};
|
|
12000
|
+
type SetupPaymentUpsertLicense = {
|
|
12001
|
+
licensePlanId: string;
|
|
12002
|
+
included?: number | undefined;
|
|
12003
|
+
prepaidOnly?: boolean | undefined;
|
|
12004
|
+
customize?: SetupPaymentUpsertLicenseCustomize | null | undefined;
|
|
12005
|
+
metadata?: {
|
|
12006
|
+
[k: string]: any;
|
|
12007
|
+
} | undefined;
|
|
9767
12008
|
};
|
|
9768
12009
|
/**
|
|
9769
|
-
* Customize the plan to attach. Can override the price, items, free trial, or a combination.
|
|
12010
|
+
* Customize the plan to attach. Can override the price, items, licenses, free trial, or a combination.
|
|
9770
12011
|
*/
|
|
9771
12012
|
type SetupPaymentCustomize = {
|
|
9772
12013
|
/**
|
|
@@ -9793,6 +12034,10 @@ type SetupPaymentCustomize = {
|
|
|
9793
12034
|
* Override the plan's billing controls (auto top-ups, spend limits, usage limits, usage alerts, overage allowed) for this customer.
|
|
9794
12035
|
*/
|
|
9795
12036
|
billingControls?: SetupPaymentBillingControls | undefined;
|
|
12037
|
+
/**
|
|
12038
|
+
* License links to add or override for this customer, keyed by license_plan_id. Omitted fields inherit the plan catalog link (included defaults to 1 when the license is not in the catalog). A bare entry restores the license to pure catalog inheritance.
|
|
12039
|
+
*/
|
|
12040
|
+
upsertLicenses?: Array<SetupPaymentUpsertLicense> | undefined;
|
|
9796
12041
|
};
|
|
9797
12042
|
/**
|
|
9798
12043
|
* How to handle proration when updating an existing subscription. 'prorate_immediately' charges/credits prorated amounts now, 'none' skips creating any charges.
|
|
@@ -9854,6 +12099,16 @@ type SetupPaymentCarryOverUsages = {
|
|
|
9854
12099
|
*/
|
|
9855
12100
|
featureIds?: Array<string> | undefined;
|
|
9856
12101
|
};
|
|
12102
|
+
type SetupPaymentLicenseQuantity = {
|
|
12103
|
+
/**
|
|
12104
|
+
* The license plan to set seat quantity for.
|
|
12105
|
+
*/
|
|
12106
|
+
licensePlanId: string;
|
|
12107
|
+
/**
|
|
12108
|
+
* Total seats for the license, inclusive of the plan's included amount — seats beyond it are paid.
|
|
12109
|
+
*/
|
|
12110
|
+
quantity: number;
|
|
12111
|
+
};
|
|
9857
12112
|
type SetupPaymentParams = {
|
|
9858
12113
|
/**
|
|
9859
12114
|
* The ID of the customer to attach the plan to.
|
|
@@ -9876,7 +12131,7 @@ type SetupPaymentParams = {
|
|
|
9876
12131
|
*/
|
|
9877
12132
|
version?: number | undefined;
|
|
9878
12133
|
/**
|
|
9879
|
-
* Customize the plan to attach. Can override the price, items, free trial, or a combination.
|
|
12134
|
+
* Customize the plan to attach. Can override the price, items, licenses, free trial, or a combination.
|
|
9880
12135
|
*/
|
|
9881
12136
|
customize?: SetupPaymentCustomize | undefined;
|
|
9882
12137
|
/**
|
|
@@ -9929,6 +12184,10 @@ type SetupPaymentParams = {
|
|
|
9929
12184
|
* Whether to carry over usages from the previous plan.
|
|
9930
12185
|
*/
|
|
9931
12186
|
carryOverUsages?: SetupPaymentCarryOverUsages | undefined;
|
|
12187
|
+
/**
|
|
12188
|
+
* Seat quantities for the plan's licenses, keyed by license plan.
|
|
12189
|
+
*/
|
|
12190
|
+
licenseQuantities?: Array<SetupPaymentLicenseQuantity> | undefined;
|
|
9932
12191
|
/**
|
|
9933
12192
|
* Key-value metadata to attach to the Stripe subscription, invoice, and checkout session created during this attach flow. Keys prefixed with 'autumn_' are reserved and will be stripped.
|
|
9934
12193
|
*/
|
|
@@ -9947,6 +12206,10 @@ type SetupPaymentParams = {
|
|
|
9947
12206
|
* Stripe tax rate ID (txr_...) to apply as the default tax rate on the created subscription, invoice, or checkout session line items.
|
|
9948
12207
|
*/
|
|
9949
12208
|
taxRateId?: string | undefined;
|
|
12209
|
+
/**
|
|
12210
|
+
* Currency to bill this attach in (e.g. usd, eur). Must match the customer's currency if they are already locked to one, and the plan must offer a paid price in it. Defaults to the customer's currency, then the org default.
|
|
12211
|
+
*/
|
|
12212
|
+
currency?: string | undefined;
|
|
9950
12213
|
};
|
|
9951
12214
|
/**
|
|
9952
12215
|
* OK
|