dodopayments 2.42.2 → 2.43.0
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/CHANGELOG.md +8 -0
- package/package.json +1 -1
- package/resources/checkout-sessions.d.mts +17 -1
- package/resources/checkout-sessions.d.mts.map +1 -1
- package/resources/checkout-sessions.d.ts +17 -1
- package/resources/checkout-sessions.d.ts.map +1 -1
- package/resources/credit-entitlements/balances.d.mts +3 -1
- package/resources/credit-entitlements/balances.d.mts.map +1 -1
- package/resources/credit-entitlements/balances.d.ts +3 -1
- package/resources/credit-entitlements/balances.d.ts.map +1 -1
- package/resources/discounts.d.mts +155 -6
- package/resources/discounts.d.mts.map +1 -1
- package/resources/discounts.d.ts +155 -6
- package/resources/discounts.d.ts.map +1 -1
- package/resources/discounts.js +1 -1
- package/resources/discounts.mjs +1 -1
- package/resources/payments.d.mts +51 -1
- package/resources/payments.d.mts.map +1 -1
- package/resources/payments.d.ts +51 -1
- package/resources/payments.d.ts.map +1 -1
- package/resources/products/products.d.mts +10 -0
- package/resources/products/products.d.mts.map +1 -1
- package/resources/products/products.d.ts +10 -0
- package/resources/products/products.d.ts.map +1 -1
- package/resources/products/products.js.map +1 -1
- package/resources/products/products.mjs.map +1 -1
- package/resources/subscriptions.d.mts +17 -0
- package/resources/subscriptions.d.mts.map +1 -1
- package/resources/subscriptions.d.ts +17 -0
- package/resources/subscriptions.d.ts.map +1 -1
- package/src/resources/checkout-sessions.ts +19 -1
- package/src/resources/credit-entitlements/balances.ts +3 -1
- package/src/resources/discounts.ts +179 -6
- package/src/resources/payments.ts +231 -1
- package/src/resources/products/products.ts +12 -0
- package/src/resources/subscriptions.ts +20 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -42,7 +42,7 @@ export class Discounts extends APIResource {
|
|
|
42
42
|
* ```ts
|
|
43
43
|
* const discount = await client.discounts.create({
|
|
44
44
|
* amount: 0,
|
|
45
|
-
* type: '
|
|
45
|
+
* type: 'flat',
|
|
46
46
|
* });
|
|
47
47
|
* ```
|
|
48
48
|
*/
|
|
@@ -133,6 +133,11 @@ export interface Discount {
|
|
|
133
133
|
*/
|
|
134
134
|
created_at: string;
|
|
135
135
|
|
|
136
|
+
/**
|
|
137
|
+
* Who may redeem this discount code.
|
|
138
|
+
*/
|
|
139
|
+
customer_eligibility: 'any' | 'first_time' | 'existing' | 'specific';
|
|
140
|
+
|
|
136
141
|
/**
|
|
137
142
|
* The unique discount ID
|
|
138
143
|
*/
|
|
@@ -160,10 +165,16 @@ export interface Discount {
|
|
|
160
165
|
times_used: number;
|
|
161
166
|
|
|
162
167
|
/**
|
|
163
|
-
* The type of discount
|
|
168
|
+
* The type of discount (`percentage` or `flat`).
|
|
164
169
|
*/
|
|
165
170
|
type: DiscountType;
|
|
166
171
|
|
|
172
|
+
/**
|
|
173
|
+
* Per-currency options (flat deduction / percentage cap + minimum subtotal). Empty
|
|
174
|
+
* for discounts without any configured currency options.
|
|
175
|
+
*/
|
|
176
|
+
currency_options?: Array<Discount.CurrencyOption>;
|
|
177
|
+
|
|
167
178
|
/**
|
|
168
179
|
* Optional date/time after which discount is expired.
|
|
169
180
|
*/
|
|
@@ -174,6 +185,17 @@ export interface Discount {
|
|
|
174
185
|
*/
|
|
175
186
|
name?: string | null;
|
|
176
187
|
|
|
188
|
+
/**
|
|
189
|
+
* Maximum number of times a single customer may redeem this discount, if any.
|
|
190
|
+
*/
|
|
191
|
+
per_customer_usage_limit?: number | null;
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Optional date/time before which the discount is not yet active. NULL = active
|
|
195
|
+
* immediately.
|
|
196
|
+
*/
|
|
197
|
+
starts_at?: string | null;
|
|
198
|
+
|
|
177
199
|
/**
|
|
178
200
|
* Number of subscription billing cycles this discount is valid for. If not
|
|
179
201
|
* provided, the discount will be applied indefinitely to all recurring payments
|
|
@@ -187,6 +209,35 @@ export interface Discount {
|
|
|
187
209
|
usage_limit?: number | null;
|
|
188
210
|
}
|
|
189
211
|
|
|
212
|
+
export namespace Discount {
|
|
213
|
+
/**
|
|
214
|
+
* A per-currency discount option (response shape). `max_amount_possible` mirrors
|
|
215
|
+
* the DB column of the same name.
|
|
216
|
+
*/
|
|
217
|
+
export interface CurrencyOption {
|
|
218
|
+
/**
|
|
219
|
+
* The currency this option applies to.
|
|
220
|
+
*/
|
|
221
|
+
currency: MiscAPI.Currency;
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Whether this is the default row FX conversions pivot from.
|
|
225
|
+
*/
|
|
226
|
+
is_default: boolean;
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* Eligible-cart threshold in this currency's subunits (0 = no minimum).
|
|
230
|
+
*/
|
|
231
|
+
minimum_subtotal: number;
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* The most this code discounts in this currency's subunits (flat deduction or
|
|
235
|
+
* percentage cap).
|
|
236
|
+
*/
|
|
237
|
+
max_amount_possible?: number | null;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
190
241
|
/**
|
|
191
242
|
* Response struct for a discount with its position in a stack and optional
|
|
192
243
|
* cycle-tracking information (for subscriptions).
|
|
@@ -274,11 +325,13 @@ export interface DiscountDetail {
|
|
|
274
325
|
usage_limit?: number | null;
|
|
275
326
|
}
|
|
276
327
|
|
|
277
|
-
export type DiscountType = 'percentage';
|
|
328
|
+
export type DiscountType = 'flat' | 'percentage';
|
|
278
329
|
|
|
279
330
|
export interface DiscountListParams extends DefaultPageNumberPaginationParams {
|
|
280
331
|
/**
|
|
281
|
-
* Filter by active status
|
|
332
|
+
* Filter by active status. `true` = currently redeemable (started, not expired,
|
|
333
|
+
* not usage-exhausted). `false` = not currently redeemable (expired,
|
|
334
|
+
* usage-exhausted, or pending a future `starts_at`).
|
|
282
335
|
*/
|
|
283
336
|
active?: boolean;
|
|
284
337
|
|
|
@@ -308,7 +361,7 @@ export interface DiscountCreateParams {
|
|
|
308
361
|
amount: number;
|
|
309
362
|
|
|
310
363
|
/**
|
|
311
|
-
* The discount type
|
|
364
|
+
* The discount type: `percentage` or `flat` (`flat_per_unit` stays blocked).
|
|
312
365
|
*/
|
|
313
366
|
type: DiscountType;
|
|
314
367
|
|
|
@@ -320,6 +373,21 @@ export interface DiscountCreateParams {
|
|
|
320
373
|
*/
|
|
321
374
|
code?: string | null;
|
|
322
375
|
|
|
376
|
+
/**
|
|
377
|
+
* Per-currency options (flat deduction / percentage cap + minimum subtotal).
|
|
378
|
+
* Required for `flat` codes (must include a resolvable default); optional
|
|
379
|
+
* per-currency caps for `percentage` codes. Per-row invariants are checked in
|
|
380
|
+
* `normalize_currency_options`, not via `#[validate(nested)]`.
|
|
381
|
+
*/
|
|
382
|
+
currency_options?: Array<DiscountCreateParams.CurrencyOption> | null;
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* Who may redeem this discount code. Defaults to `any` (unrestricted). `specific`
|
|
386
|
+
* starts with zero attached customers (fails closed) until customers are attached
|
|
387
|
+
* via `POST /discounts/{id}/customers`.
|
|
388
|
+
*/
|
|
389
|
+
customer_eligibility?: 'any' | 'first_time' | 'existing' | 'specific' | null;
|
|
390
|
+
|
|
323
391
|
/**
|
|
324
392
|
* When the discount expires, if ever.
|
|
325
393
|
*/
|
|
@@ -332,6 +400,12 @@ export interface DiscountCreateParams {
|
|
|
332
400
|
|
|
333
401
|
name?: string | null;
|
|
334
402
|
|
|
403
|
+
/**
|
|
404
|
+
* Maximum number of times a single customer may redeem this discount. Must be
|
|
405
|
+
* `<= usage_limit` when both are set.
|
|
406
|
+
*/
|
|
407
|
+
per_customer_usage_limit?: number | null;
|
|
408
|
+
|
|
335
409
|
/**
|
|
336
410
|
* Whether this discount should be preserved when a subscription changes plans.
|
|
337
411
|
* Default: false (discount is removed on plan change)
|
|
@@ -343,6 +417,12 @@ export interface DiscountCreateParams {
|
|
|
343
417
|
*/
|
|
344
418
|
restricted_to?: Array<string> | null;
|
|
345
419
|
|
|
420
|
+
/**
|
|
421
|
+
* When the discount becomes active, if scheduled for the future. NULL = active
|
|
422
|
+
* immediately. Must be strictly before `expires_at` when both are set.
|
|
423
|
+
*/
|
|
424
|
+
starts_at?: string | null;
|
|
425
|
+
|
|
346
426
|
/**
|
|
347
427
|
* Number of subscription billing cycles this discount is valid for. If not
|
|
348
428
|
* provided, the discount will be applied indefinitely to all recurring payments
|
|
@@ -356,6 +436,40 @@ export interface DiscountCreateParams {
|
|
|
356
436
|
usage_limit?: number | null;
|
|
357
437
|
}
|
|
358
438
|
|
|
439
|
+
export namespace DiscountCreateParams {
|
|
440
|
+
/**
|
|
441
|
+
* A per-currency discount option (request shape).
|
|
442
|
+
*
|
|
443
|
+
* `max_amount_possible` is the most this code discounts in this currency — the
|
|
444
|
+
* flat deduction for `flat` codes, or the max-discount cap for `percentage` codes.
|
|
445
|
+
* Maps to the DB column of the same name.
|
|
446
|
+
*/
|
|
447
|
+
export interface CurrencyOption {
|
|
448
|
+
/**
|
|
449
|
+
* The currency this option applies to.
|
|
450
|
+
*/
|
|
451
|
+
currency: MiscAPI.Currency;
|
|
452
|
+
|
|
453
|
+
/**
|
|
454
|
+
* Whether this row is the default to convert from for unconfigured currencies. At
|
|
455
|
+
* most one row per discount may be default.
|
|
456
|
+
*/
|
|
457
|
+
is_default?: boolean;
|
|
458
|
+
|
|
459
|
+
/**
|
|
460
|
+
* The most this code discounts in this currency's subunits. For `flat` codes this
|
|
461
|
+
* is the deduction; for `percentage` codes it is the max-discount cap. Must be > 0
|
|
462
|
+
* if provided.
|
|
463
|
+
*/
|
|
464
|
+
max_amount_possible?: number | null;
|
|
465
|
+
|
|
466
|
+
/**
|
|
467
|
+
* Eligible-cart threshold in this currency's subunits (0 = no minimum).
|
|
468
|
+
*/
|
|
469
|
+
minimum_subtotal?: number;
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
|
|
359
473
|
export interface DiscountUpdateParams {
|
|
360
474
|
/**
|
|
361
475
|
* If present, update the discount amount in **basis points** (e.g., `540` =
|
|
@@ -370,6 +484,19 @@ export interface DiscountUpdateParams {
|
|
|
370
484
|
*/
|
|
371
485
|
code?: string | null;
|
|
372
486
|
|
|
487
|
+
/**
|
|
488
|
+
* If present, fully replaces the discount's currency options (replace-set
|
|
489
|
+
* semantics, like `restricted_to`). Send an empty array to clear them.
|
|
490
|
+
*/
|
|
491
|
+
currency_options?: Array<DiscountUpdateParams.CurrencyOption> | null;
|
|
492
|
+
|
|
493
|
+
/**
|
|
494
|
+
* If present, update who may redeem this discount. Plain field (not
|
|
495
|
+
* double-option): the DB column is `NOT NULL`, so it can never be cleared back to
|
|
496
|
+
* unset, only changed to another `CustomerEligibility` value.
|
|
497
|
+
*/
|
|
498
|
+
customer_eligibility?: 'any' | 'first_time' | 'existing' | 'specific' | null;
|
|
499
|
+
|
|
373
500
|
expires_at?: string | null;
|
|
374
501
|
|
|
375
502
|
/**
|
|
@@ -379,6 +506,13 @@ export interface DiscountUpdateParams {
|
|
|
379
506
|
|
|
380
507
|
name?: string | null;
|
|
381
508
|
|
|
509
|
+
/**
|
|
510
|
+
* If present, update the per-customer usage limit (double-option: send `null` to
|
|
511
|
+
* clear it back to unlimited). Must be `<= usage_limit` (the value in effect after
|
|
512
|
+
* this patch) when both are set.
|
|
513
|
+
*/
|
|
514
|
+
per_customer_usage_limit?: number | null;
|
|
515
|
+
|
|
382
516
|
/**
|
|
383
517
|
* Whether this discount should be preserved when a subscription changes plans. If
|
|
384
518
|
* not provided, the existing value is kept.
|
|
@@ -391,6 +525,11 @@ export interface DiscountUpdateParams {
|
|
|
391
525
|
*/
|
|
392
526
|
restricted_to?: Array<string> | null;
|
|
393
527
|
|
|
528
|
+
/**
|
|
529
|
+
* If present, update `starts_at` (double-option: send `null` to clear it).
|
|
530
|
+
*/
|
|
531
|
+
starts_at?: string | null;
|
|
532
|
+
|
|
394
533
|
/**
|
|
395
534
|
* Number of subscription billing cycles this discount is valid for. If not
|
|
396
535
|
* provided, the discount will be applied indefinitely to all recurring payments
|
|
@@ -399,13 +538,47 @@ export interface DiscountUpdateParams {
|
|
|
399
538
|
subscription_cycles?: number | null;
|
|
400
539
|
|
|
401
540
|
/**
|
|
402
|
-
* If present, update the discount type
|
|
541
|
+
* If present, update the discount type (`percentage` or `flat`).
|
|
403
542
|
*/
|
|
404
543
|
type?: DiscountType | null;
|
|
405
544
|
|
|
406
545
|
usage_limit?: number | null;
|
|
407
546
|
}
|
|
408
547
|
|
|
548
|
+
export namespace DiscountUpdateParams {
|
|
549
|
+
/**
|
|
550
|
+
* A per-currency discount option (request shape).
|
|
551
|
+
*
|
|
552
|
+
* `max_amount_possible` is the most this code discounts in this currency — the
|
|
553
|
+
* flat deduction for `flat` codes, or the max-discount cap for `percentage` codes.
|
|
554
|
+
* Maps to the DB column of the same name.
|
|
555
|
+
*/
|
|
556
|
+
export interface CurrencyOption {
|
|
557
|
+
/**
|
|
558
|
+
* The currency this option applies to.
|
|
559
|
+
*/
|
|
560
|
+
currency: MiscAPI.Currency;
|
|
561
|
+
|
|
562
|
+
/**
|
|
563
|
+
* Whether this row is the default to convert from for unconfigured currencies. At
|
|
564
|
+
* most one row per discount may be default.
|
|
565
|
+
*/
|
|
566
|
+
is_default?: boolean;
|
|
567
|
+
|
|
568
|
+
/**
|
|
569
|
+
* The most this code discounts in this currency's subunits. For `flat` codes this
|
|
570
|
+
* is the deduction; for `percentage` codes it is the max-discount cap. Must be > 0
|
|
571
|
+
* if provided.
|
|
572
|
+
*/
|
|
573
|
+
max_amount_possible?: number | null;
|
|
574
|
+
|
|
575
|
+
/**
|
|
576
|
+
* Eligible-cart threshold in this currency's subunits (0 = no minimum).
|
|
577
|
+
*/
|
|
578
|
+
minimum_subtotal?: number;
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
|
|
409
582
|
export declare namespace Discounts {
|
|
410
583
|
export {
|
|
411
584
|
type Discount as Discount,
|
|
@@ -358,6 +358,15 @@ export interface Payment {
|
|
|
358
358
|
*/
|
|
359
359
|
error_message?: string | null;
|
|
360
360
|
|
|
361
|
+
/**
|
|
362
|
+
* Purpose-built failure messaging for the merchant and the customer, derived from
|
|
363
|
+
* `error_code`. Present whenever `error_code` is set, regardless of payment
|
|
364
|
+
* status; unrecognised codes still resolve via a generic fallback rather than
|
|
365
|
+
* being omitted. The customer copy is always generic for fraud-sensitive declines
|
|
366
|
+
* (lost/stolen/pickup/fraudulent) so the true reason is never leaked.
|
|
367
|
+
*/
|
|
368
|
+
failure_details?: Payment.FailureDetails | null;
|
|
369
|
+
|
|
361
370
|
/**
|
|
362
371
|
* Invoice ID for this payment. Uses India-specific invoice ID if available.
|
|
363
372
|
*/
|
|
@@ -429,6 +438,78 @@ export interface Payment {
|
|
|
429
438
|
}
|
|
430
439
|
|
|
431
440
|
export namespace Payment {
|
|
441
|
+
/**
|
|
442
|
+
* Purpose-built failure messaging for the merchant and the customer, derived from
|
|
443
|
+
* `error_code`. Present whenever `error_code` is set, regardless of payment
|
|
444
|
+
* status; unrecognised codes still resolve via a generic fallback rather than
|
|
445
|
+
* being omitted. The customer copy is always generic for fraud-sensitive declines
|
|
446
|
+
* (lost/stolen/pickup/fraudulent) so the true reason is never leaked.
|
|
447
|
+
*/
|
|
448
|
+
export interface FailureDetails {
|
|
449
|
+
/**
|
|
450
|
+
* The unified error code (echoes `error_code`).
|
|
451
|
+
*/
|
|
452
|
+
code: string;
|
|
453
|
+
|
|
454
|
+
/**
|
|
455
|
+
* The primary CTA to show the customer.
|
|
456
|
+
*/
|
|
457
|
+
customer_cta:
|
|
458
|
+
| 'edit_and_retry'
|
|
459
|
+
| 'use_another_method'
|
|
460
|
+
| 'try_again'
|
|
461
|
+
| 'try_later'
|
|
462
|
+
| 'retry_and_verify'
|
|
463
|
+
| 'restart'
|
|
464
|
+
| 'update_method';
|
|
465
|
+
|
|
466
|
+
/**
|
|
467
|
+
* Whether the customer can resolve this themselves (e.g. fix CVC).
|
|
468
|
+
*/
|
|
469
|
+
customer_fixable: boolean;
|
|
470
|
+
|
|
471
|
+
/**
|
|
472
|
+
* The customer-facing string. Always generic (`C11`) for the fraud-4.
|
|
473
|
+
*/
|
|
474
|
+
customer_message: string;
|
|
475
|
+
|
|
476
|
+
/**
|
|
477
|
+
* The customer message template identifier (C1..C20).
|
|
478
|
+
*/
|
|
479
|
+
customer_template:
|
|
480
|
+
| 'C1'
|
|
481
|
+
| 'C2'
|
|
482
|
+
| 'C3'
|
|
483
|
+
| 'C4'
|
|
484
|
+
| 'C5'
|
|
485
|
+
| 'C6'
|
|
486
|
+
| 'C7'
|
|
487
|
+
| 'C8'
|
|
488
|
+
| 'C9'
|
|
489
|
+
| 'C10'
|
|
490
|
+
| 'C11'
|
|
491
|
+
| 'C12'
|
|
492
|
+
| 'C13'
|
|
493
|
+
| 'C14'
|
|
494
|
+
| 'C15'
|
|
495
|
+
| 'C16'
|
|
496
|
+
| 'C17'
|
|
497
|
+
| 'C18'
|
|
498
|
+
| 'C19'
|
|
499
|
+
| 'C20';
|
|
500
|
+
|
|
501
|
+
/**
|
|
502
|
+
* Soft or hard decline.
|
|
503
|
+
*/
|
|
504
|
+
decline_type: 'soft' | 'hard';
|
|
505
|
+
|
|
506
|
+
/**
|
|
507
|
+
* Merchant-facing headline + recommended action (Payment Details). For the fraud-4
|
|
508
|
+
* this includes the operator "do not reveal" warning.
|
|
509
|
+
*/
|
|
510
|
+
merchant_message: string;
|
|
511
|
+
}
|
|
512
|
+
|
|
432
513
|
export interface ProductCart {
|
|
433
514
|
product_id: string;
|
|
434
515
|
|
|
@@ -519,7 +600,6 @@ export type PaymentMethodTypes =
|
|
|
519
600
|
| 'sepa'
|
|
520
601
|
| 'sepa_bank_transfer'
|
|
521
602
|
| 'sofort'
|
|
522
|
-
| 'sunbit'
|
|
523
603
|
| 'swish'
|
|
524
604
|
| 'touch_n_go'
|
|
525
605
|
| 'trustly'
|
|
@@ -758,6 +838,156 @@ export interface PaymentListParams extends DefaultPageNumberPaginationParams {
|
|
|
758
838
|
*/
|
|
759
839
|
created_at_lte?: string;
|
|
760
840
|
|
|
841
|
+
/**
|
|
842
|
+
* Filter by currency
|
|
843
|
+
*/
|
|
844
|
+
currency?:
|
|
845
|
+
| 'AED'
|
|
846
|
+
| 'ALL'
|
|
847
|
+
| 'AMD'
|
|
848
|
+
| 'ANG'
|
|
849
|
+
| 'AOA'
|
|
850
|
+
| 'ARS'
|
|
851
|
+
| 'AUD'
|
|
852
|
+
| 'AWG'
|
|
853
|
+
| 'AZN'
|
|
854
|
+
| 'BAM'
|
|
855
|
+
| 'BBD'
|
|
856
|
+
| 'BDT'
|
|
857
|
+
| 'BGN'
|
|
858
|
+
| 'BHD'
|
|
859
|
+
| 'BIF'
|
|
860
|
+
| 'BMD'
|
|
861
|
+
| 'BND'
|
|
862
|
+
| 'BOB'
|
|
863
|
+
| 'BRL'
|
|
864
|
+
| 'BSD'
|
|
865
|
+
| 'BWP'
|
|
866
|
+
| 'BYN'
|
|
867
|
+
| 'BZD'
|
|
868
|
+
| 'CAD'
|
|
869
|
+
| 'CHF'
|
|
870
|
+
| 'CLP'
|
|
871
|
+
| 'CNY'
|
|
872
|
+
| 'COP'
|
|
873
|
+
| 'CRC'
|
|
874
|
+
| 'CUP'
|
|
875
|
+
| 'CVE'
|
|
876
|
+
| 'CZK'
|
|
877
|
+
| 'DJF'
|
|
878
|
+
| 'DKK'
|
|
879
|
+
| 'DOP'
|
|
880
|
+
| 'DZD'
|
|
881
|
+
| 'EGP'
|
|
882
|
+
| 'ETB'
|
|
883
|
+
| 'EUR'
|
|
884
|
+
| 'FJD'
|
|
885
|
+
| 'FKP'
|
|
886
|
+
| 'GBP'
|
|
887
|
+
| 'GEL'
|
|
888
|
+
| 'GHS'
|
|
889
|
+
| 'GIP'
|
|
890
|
+
| 'GMD'
|
|
891
|
+
| 'GNF'
|
|
892
|
+
| 'GTQ'
|
|
893
|
+
| 'GYD'
|
|
894
|
+
| 'HKD'
|
|
895
|
+
| 'HNL'
|
|
896
|
+
| 'HRK'
|
|
897
|
+
| 'HTG'
|
|
898
|
+
| 'HUF'
|
|
899
|
+
| 'IDR'
|
|
900
|
+
| 'ILS'
|
|
901
|
+
| 'INR'
|
|
902
|
+
| 'IQD'
|
|
903
|
+
| 'JMD'
|
|
904
|
+
| 'JOD'
|
|
905
|
+
| 'JPY'
|
|
906
|
+
| 'KES'
|
|
907
|
+
| 'KGS'
|
|
908
|
+
| 'KHR'
|
|
909
|
+
| 'KMF'
|
|
910
|
+
| 'KRW'
|
|
911
|
+
| 'KWD'
|
|
912
|
+
| 'KYD'
|
|
913
|
+
| 'KZT'
|
|
914
|
+
| 'LAK'
|
|
915
|
+
| 'LBP'
|
|
916
|
+
| 'LKR'
|
|
917
|
+
| 'LRD'
|
|
918
|
+
| 'LSL'
|
|
919
|
+
| 'LYD'
|
|
920
|
+
| 'MAD'
|
|
921
|
+
| 'MDL'
|
|
922
|
+
| 'MGA'
|
|
923
|
+
| 'MKD'
|
|
924
|
+
| 'MMK'
|
|
925
|
+
| 'MNT'
|
|
926
|
+
| 'MOP'
|
|
927
|
+
| 'MRU'
|
|
928
|
+
| 'MUR'
|
|
929
|
+
| 'MVR'
|
|
930
|
+
| 'MWK'
|
|
931
|
+
| 'MXN'
|
|
932
|
+
| 'MYR'
|
|
933
|
+
| 'MZN'
|
|
934
|
+
| 'NAD'
|
|
935
|
+
| 'NGN'
|
|
936
|
+
| 'NIO'
|
|
937
|
+
| 'NOK'
|
|
938
|
+
| 'NPR'
|
|
939
|
+
| 'NZD'
|
|
940
|
+
| 'OMR'
|
|
941
|
+
| 'PAB'
|
|
942
|
+
| 'PEN'
|
|
943
|
+
| 'PGK'
|
|
944
|
+
| 'PHP'
|
|
945
|
+
| 'PKR'
|
|
946
|
+
| 'PLN'
|
|
947
|
+
| 'PYG'
|
|
948
|
+
| 'QAR'
|
|
949
|
+
| 'RON'
|
|
950
|
+
| 'RSD'
|
|
951
|
+
| 'RUB'
|
|
952
|
+
| 'RWF'
|
|
953
|
+
| 'SAR'
|
|
954
|
+
| 'SBD'
|
|
955
|
+
| 'SCR'
|
|
956
|
+
| 'SEK'
|
|
957
|
+
| 'SGD'
|
|
958
|
+
| 'SHP'
|
|
959
|
+
| 'SLE'
|
|
960
|
+
| 'SLL'
|
|
961
|
+
| 'SOS'
|
|
962
|
+
| 'SRD'
|
|
963
|
+
| 'SSP'
|
|
964
|
+
| 'STN'
|
|
965
|
+
| 'SVC'
|
|
966
|
+
| 'SZL'
|
|
967
|
+
| 'THB'
|
|
968
|
+
| 'TND'
|
|
969
|
+
| 'TOP'
|
|
970
|
+
| 'TRY'
|
|
971
|
+
| 'TTD'
|
|
972
|
+
| 'TWD'
|
|
973
|
+
| 'TZS'
|
|
974
|
+
| 'UAH'
|
|
975
|
+
| 'UGX'
|
|
976
|
+
| 'USD'
|
|
977
|
+
| 'UYU'
|
|
978
|
+
| 'UZS'
|
|
979
|
+
| 'VES'
|
|
980
|
+
| 'VND'
|
|
981
|
+
| 'VUV'
|
|
982
|
+
| 'WST'
|
|
983
|
+
| 'XAF'
|
|
984
|
+
| 'XCD'
|
|
985
|
+
| 'XOF'
|
|
986
|
+
| 'XPF'
|
|
987
|
+
| 'YER'
|
|
988
|
+
| 'ZAR'
|
|
989
|
+
| 'ZMW';
|
|
990
|
+
|
|
761
991
|
/**
|
|
762
992
|
* Filter by customer id
|
|
763
993
|
*/
|
|
@@ -583,6 +583,18 @@ export namespace Price {
|
|
|
583
583
|
*/
|
|
584
584
|
tax_inclusive?: boolean | null;
|
|
585
585
|
|
|
586
|
+
/**
|
|
587
|
+
* Amount charged today for a paid trial, in the price currency's minor units.
|
|
588
|
+
* Requires `trial_period_days > 0`. Omit or null for a free trial (the default).
|
|
589
|
+
*/
|
|
590
|
+
trial_amount?: number | null;
|
|
591
|
+
|
|
592
|
+
/**
|
|
593
|
+
* Whether discount codes reduce the trial charge. Defaults to false. Only
|
|
594
|
+
* meaningful when a paid trial is configured.
|
|
595
|
+
*/
|
|
596
|
+
trial_apply_discounts?: boolean | null;
|
|
597
|
+
|
|
586
598
|
/**
|
|
587
599
|
* Number of days for the trial period. A value of `0` indicates no trial period.
|
|
588
600
|
*/
|
|
@@ -677,6 +677,13 @@ export interface Subscription {
|
|
|
677
677
|
* Tax identifier provided for this subscription (if applicable)
|
|
678
678
|
*/
|
|
679
679
|
tax_id?: string | null;
|
|
680
|
+
|
|
681
|
+
/**
|
|
682
|
+
* Per-unit trial amount after discounts, snapshotted at subscription creation
|
|
683
|
+
* (price currency minor units, pre-quantity, pre-tax). Null for a free trial or no
|
|
684
|
+
* trial.
|
|
685
|
+
*/
|
|
686
|
+
trial_amount?: number | null;
|
|
680
687
|
}
|
|
681
688
|
|
|
682
689
|
export type SubscriptionStatus = 'pending' | 'active' | 'on_hold' | 'cancelled' | 'failed' | 'expired';
|
|
@@ -819,6 +826,12 @@ export interface SubscriptionCreateResponse {
|
|
|
819
826
|
* URL to checkout page
|
|
820
827
|
*/
|
|
821
828
|
payment_link?: string | null;
|
|
829
|
+
|
|
830
|
+
/**
|
|
831
|
+
* Per-unit trial amount after discounts, in the price currency's minor units
|
|
832
|
+
* (pre-quantity, pre-tax). Null for a free trial or no trial.
|
|
833
|
+
*/
|
|
834
|
+
trial_amount?: number | null;
|
|
822
835
|
}
|
|
823
836
|
|
|
824
837
|
export namespace SubscriptionCreateResponse {
|
|
@@ -980,6 +993,13 @@ export interface SubscriptionListResponse {
|
|
|
980
993
|
* Tax identifier provided for this subscription (if applicable)
|
|
981
994
|
*/
|
|
982
995
|
tax_id?: string | null;
|
|
996
|
+
|
|
997
|
+
/**
|
|
998
|
+
* Per-unit trial amount after discounts, snapshotted at subscription creation
|
|
999
|
+
* (price currency minor units, pre-quantity, pre-tax). Null for a free trial or no
|
|
1000
|
+
* trial.
|
|
1001
|
+
*/
|
|
1002
|
+
trial_amount?: number | null;
|
|
983
1003
|
}
|
|
984
1004
|
|
|
985
1005
|
export namespace SubscriptionListResponse {
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '2.
|
|
1
|
+
export const VERSION = '2.43.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "2.
|
|
1
|
+
export declare const VERSION = "2.43.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "2.
|
|
1
|
+
export declare const VERSION = "2.43.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '2.
|
|
1
|
+
export const VERSION = '2.43.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|