chargebee 3.29.0 → 3.30.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.
Files changed (80) hide show
  1. package/CHANGELOG.md +58 -0
  2. package/cjs/environment.js +1 -1
  3. package/cjs/resources/api_endpoints.js +69 -0
  4. package/cjs/resources/webhook/eventType.js +4 -0
  5. package/cjs/schema/alert.schema.js +8 -3
  6. package/cjs/schema/coupon.schema.js +1 -1
  7. package/cjs/schema/credit_note.schema.js +8 -0
  8. package/cjs/schema/credit_unit.schema.js +38 -0
  9. package/cjs/schema/customer.schema.js +24 -0
  10. package/cjs/schema/entitlement.schema.js +4 -4
  11. package/cjs/schema/estimate.schema.js +9 -0
  12. package/cjs/schema/event.schema.js +16 -0
  13. package/cjs/schema/export.schema.js +21 -5
  14. package/cjs/schema/gift.schema.js +8 -0
  15. package/cjs/schema/grant_block.schema.js +4 -0
  16. package/cjs/schema/index.js +1 -0
  17. package/cjs/schema/invoice.schema.js +30 -2
  18. package/cjs/schema/item.schema.js +1 -1
  19. package/cjs/schema/item_family.schema.js +1 -1
  20. package/cjs/schema/item_price.schema.js +1 -1
  21. package/cjs/schema/ledger_operation.schema.js +14 -4
  22. package/cjs/schema/meter.schema.js +1 -1
  23. package/cjs/schema/payment_intent.schema.js +8 -0
  24. package/cjs/schema/payment_source.schema.js +28 -0
  25. package/cjs/schema/price_variant.schema.js +1 -1
  26. package/cjs/schema/purchase.schema.js +4 -0
  27. package/cjs/schema/ramp.schema.js +2 -2
  28. package/cjs/schema/subscription.schema.js +57 -0
  29. package/cjs/schema/transaction.schema.js +20 -0
  30. package/cjs/schema/webhook_endpoint.schema.js +8 -0
  31. package/esm/environment.js +1 -1
  32. package/esm/resources/api_endpoints.js +69 -0
  33. package/esm/resources/webhook/eventType.js +4 -0
  34. package/esm/schema/alert.schema.js +8 -3
  35. package/esm/schema/coupon.schema.js +1 -1
  36. package/esm/schema/credit_note.schema.js +8 -0
  37. package/esm/schema/credit_unit.schema.js +35 -0
  38. package/esm/schema/customer.schema.js +24 -0
  39. package/esm/schema/entitlement.schema.js +4 -4
  40. package/esm/schema/estimate.schema.js +9 -0
  41. package/esm/schema/event.schema.js +16 -0
  42. package/esm/schema/export.schema.js +21 -5
  43. package/esm/schema/gift.schema.js +8 -0
  44. package/esm/schema/grant_block.schema.js +4 -0
  45. package/esm/schema/index.js +1 -0
  46. package/esm/schema/invoice.schema.js +30 -2
  47. package/esm/schema/item.schema.js +1 -1
  48. package/esm/schema/item_family.schema.js +1 -1
  49. package/esm/schema/item_price.schema.js +1 -1
  50. package/esm/schema/ledger_operation.schema.js +13 -3
  51. package/esm/schema/meter.schema.js +1 -1
  52. package/esm/schema/payment_intent.schema.js +8 -0
  53. package/esm/schema/payment_source.schema.js +28 -0
  54. package/esm/schema/price_variant.schema.js +1 -1
  55. package/esm/schema/purchase.schema.js +4 -0
  56. package/esm/schema/ramp.schema.js +2 -2
  57. package/esm/schema/subscription.schema.js +57 -0
  58. package/esm/schema/transaction.schema.js +20 -0
  59. package/esm/schema/webhook_endpoint.schema.js +8 -0
  60. package/package.json +1 -1
  61. package/types/core.d.ts +27 -2
  62. package/types/index.d.ts +3 -0
  63. package/types/resources/Alert.d.ts +4 -2
  64. package/types/resources/AttachedItem.d.ts +2 -2
  65. package/types/resources/Content.d.ts +2 -0
  66. package/types/resources/CreditUnit.d.ts +90 -0
  67. package/types/resources/Customer.d.ts +10 -2
  68. package/types/resources/Estimate.d.ts +11 -2
  69. package/types/resources/Event.d.ts +4 -0
  70. package/types/resources/Gift.d.ts +10 -2
  71. package/types/resources/GrantBlock.d.ts +11 -5
  72. package/types/resources/Invoice.d.ts +10 -2
  73. package/types/resources/LedgerAccountBalance.d.ts +3 -1
  74. package/types/resources/LedgerEntry.d.ts +22 -0
  75. package/types/resources/LedgerOperation.d.ts +33 -6
  76. package/types/resources/PaymentIntent.d.ts +25 -5
  77. package/types/resources/PaymentSource.d.ts +5 -1
  78. package/types/resources/Purchase.d.ts +5 -1
  79. package/types/resources/Subscription.d.ts +36 -7
  80. package/types/resources/WebhookEvent.d.ts +26 -0
@@ -58,6 +58,10 @@ const CreateUsingTempTokenPaymentSourceBodySchema = z.looseObject({
58
58
  'paynow',
59
59
  'bizum',
60
60
  'promptpay',
61
+ 'dana',
62
+ 'touch_n_go',
63
+ 'tamara',
64
+ 'qpay',
61
65
  ]),
62
66
  tmp_token: z.string().max(65000),
63
67
  issuing_country: z.string().max(50).optional(),
@@ -166,6 +170,10 @@ const CreateUsingPermanentTokenPaymentSourceBodySchema = z.looseObject({
166
170
  'paynow',
167
171
  'bizum',
168
172
  'promptpay',
173
+ 'dana',
174
+ 'touch_n_go',
175
+ 'tamara',
176
+ 'qpay',
169
177
  ]),
170
178
  gateway_account_id: z.string().max(50).optional(),
171
179
  reference_id: z.string().max(200).optional(),
@@ -245,6 +253,10 @@ const CreateUsingPaymentIntentPaymentSourcePaymentIntentSchema = z.object({
245
253
  'paynow',
246
254
  'bizum',
247
255
  'promptpay',
256
+ 'dana',
257
+ 'touch_n_go',
258
+ 'tamara',
259
+ 'qpay',
248
260
  ])
249
261
  .optional(),
250
262
  reference_id: z.string().max(65000).optional(),
@@ -428,6 +440,10 @@ const ListPaymentSourceTypeSchema = z.object({
428
440
  'paynow',
429
441
  'bizum',
430
442
  'promptpay',
443
+ 'dana',
444
+ 'touch_n_go',
445
+ 'tamara',
446
+ 'qpay',
431
447
  ])
432
448
  .optional(),
433
449
  is_not: z
@@ -482,6 +498,10 @@ const ListPaymentSourceTypeSchema = z.object({
482
498
  'paynow',
483
499
  'bizum',
484
500
  'promptpay',
501
+ 'dana',
502
+ 'touch_n_go',
503
+ 'tamara',
504
+ 'qpay',
485
505
  ])
486
506
  .optional(),
487
507
  in: z
@@ -536,6 +556,10 @@ const ListPaymentSourceTypeSchema = z.object({
536
556
  'paynow',
537
557
  'bizum',
538
558
  'promptpay',
559
+ 'dana',
560
+ 'touch_n_go',
561
+ 'tamara',
562
+ 'qpay',
539
563
  ])
540
564
  .optional(),
541
565
  not_in: z
@@ -590,6 +614,10 @@ const ListPaymentSourceTypeSchema = z.object({
590
614
  'paynow',
591
615
  'bizum',
592
616
  'promptpay',
617
+ 'dana',
618
+ 'touch_n_go',
619
+ 'tamara',
620
+ 'qpay',
593
621
  ])
594
622
  .optional(),
595
623
  });
@@ -65,8 +65,8 @@ const ListPriceVariantCreatedAtSchema = z.object({
65
65
  between: z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
66
66
  });
67
67
  const ListPriceVariantBusinessEntityIdSchema = z.object({
68
- is_present: z.enum(['true', 'false']).optional(),
69
68
  is: z.string().min(1).optional(),
69
+ is_present: z.enum(['true', 'false']).optional(),
70
70
  });
71
71
  const ListPriceVariantIncludeSiteLevelResourcesSchema = z.object({
72
72
  is: z.enum(['true', 'false']).optional(),
@@ -69,6 +69,10 @@ const CreatePurchasePaymentIntentSchema = z.object({
69
69
  'paynow',
70
70
  'bizum',
71
71
  'promptpay',
72
+ 'dana',
73
+ 'touch_n_go',
74
+ 'tamara',
75
+ 'qpay',
72
76
  ])
73
77
  .optional(),
74
78
  reference_id: z.string().max(65000).optional(),
@@ -208,12 +208,12 @@ const UpdateRampBodySchema = z.looseObject({
208
208
  export { UpdateRampBodySchema };
209
209
  //Ramp.list
210
210
  const ListRampStatusSchema = z.object({
211
- is: z.enum(['scheduled', 'succeeded', 'failed', 'draft']).optional(),
212
211
  in: z.enum(['scheduled', 'succeeded', 'failed', 'draft']).optional(),
212
+ is: z.enum(['scheduled', 'succeeded', 'failed', 'draft']).optional(),
213
213
  });
214
214
  const ListRampSubscriptionIdSchema = z.object({
215
- is: z.string().min(1).optional(),
216
215
  in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
216
+ is: z.string().min(1).optional(),
217
217
  });
218
218
  const ListRampEffectiveFromSchema = z.object({
219
219
  after: z.string().regex(RegExp('^\\d{10}$')).optional(),
@@ -235,6 +235,10 @@ const CreateSubscriptionPaymentMethodSchema = z.object({
235
235
  'paynow',
236
236
  'bizum',
237
237
  'promptpay',
238
+ 'dana',
239
+ 'touch_n_go',
240
+ 'tamara',
241
+ 'qpay',
238
242
  ])
239
243
  .optional(),
240
244
  gateway: z
@@ -360,6 +364,10 @@ const CreateSubscriptionPaymentIntentSchema = z.object({
360
364
  'paynow',
361
365
  'bizum',
362
366
  'promptpay',
367
+ 'dana',
368
+ 'touch_n_go',
369
+ 'tamara',
370
+ 'qpay',
363
371
  ])
364
372
  .optional(),
365
373
  reference_id: z.string().max(65000).optional(),
@@ -594,6 +602,10 @@ const CreateForCustomerSubscriptionPaymentIntentSchema = z.object({
594
602
  'paynow',
595
603
  'bizum',
596
604
  'promptpay',
605
+ 'dana',
606
+ 'touch_n_go',
607
+ 'tamara',
608
+ 'qpay',
597
609
  ])
598
610
  .optional(),
599
611
  reference_id: z.string().max(65000).optional(),
@@ -788,6 +800,10 @@ const CreateWithItemsSubscriptionPaymentIntentSchema = z.object({
788
800
  'paynow',
789
801
  'bizum',
790
802
  'promptpay',
803
+ 'dana',
804
+ 'touch_n_go',
805
+ 'tamara',
806
+ 'qpay',
791
807
  ])
792
808
  .optional(),
793
809
  reference_id: z.string().max(65000).optional(),
@@ -1421,6 +1437,10 @@ const UpdateSubscriptionPaymentMethodSchema = z.object({
1421
1437
  'paynow',
1422
1438
  'bizum',
1423
1439
  'promptpay',
1440
+ 'dana',
1441
+ 'touch_n_go',
1442
+ 'tamara',
1443
+ 'qpay',
1424
1444
  ])
1425
1445
  .optional(),
1426
1446
  gateway: z
@@ -1546,6 +1566,10 @@ const UpdateSubscriptionPaymentIntentSchema = z.object({
1546
1566
  'paynow',
1547
1567
  'bizum',
1548
1568
  'promptpay',
1569
+ 'dana',
1570
+ 'touch_n_go',
1571
+ 'tamara',
1572
+ 'qpay',
1549
1573
  ])
1550
1574
  .optional(),
1551
1575
  reference_id: z.string().max(65000).optional(),
@@ -1869,6 +1893,10 @@ const UpdateForItemsSubscriptionPaymentMethodSchema = z.object({
1869
1893
  'paynow',
1870
1894
  'bizum',
1871
1895
  'promptpay',
1896
+ 'dana',
1897
+ 'touch_n_go',
1898
+ 'tamara',
1899
+ 'qpay',
1872
1900
  ])
1873
1901
  .optional(),
1874
1902
  gateway: z
@@ -1994,6 +2022,10 @@ const UpdateForItemsSubscriptionPaymentIntentSchema = z.object({
1994
2022
  'paynow',
1995
2023
  'bizum',
1996
2024
  'promptpay',
2025
+ 'dana',
2026
+ 'touch_n_go',
2027
+ 'tamara',
2028
+ 'qpay',
1997
2029
  ])
1998
2030
  .optional(),
1999
2031
  reference_id: z.string().max(65000).optional(),
@@ -2280,6 +2312,10 @@ const ReactivateSubscriptionPaymentIntentSchema = z.object({
2280
2312
  'paynow',
2281
2313
  'bizum',
2282
2314
  'promptpay',
2315
+ 'dana',
2316
+ 'touch_n_go',
2317
+ 'tamara',
2318
+ 'qpay',
2283
2319
  ])
2284
2320
  .optional(),
2285
2321
  reference_id: z.string().max(65000).optional(),
@@ -2589,6 +2625,10 @@ const ImportSubscriptionSubscriptionPaymentMethodSchema = z.object({
2589
2625
  'paynow',
2590
2626
  'bizum',
2591
2627
  'promptpay',
2628
+ 'dana',
2629
+ 'touch_n_go',
2630
+ 'tamara',
2631
+ 'qpay',
2592
2632
  ])
2593
2633
  .optional(),
2594
2634
  gateway: z
@@ -2706,6 +2746,10 @@ const ImportSubscriptionSubscriptionTransactionSchema = z.object({
2706
2746
  'app_store',
2707
2747
  'play_store',
2708
2748
  'custom',
2749
+ 'dana',
2750
+ 'touch_n_go',
2751
+ 'tamara',
2752
+ 'qpay',
2709
2753
  ])
2710
2754
  .optional(),
2711
2755
  reference_number: z.string().max(100).optional(),
@@ -2829,6 +2873,10 @@ const ImportForCustomerSubscriptionTransactionSchema = z.object({
2829
2873
  'app_store',
2830
2874
  'play_store',
2831
2875
  'custom',
2876
+ 'dana',
2877
+ 'touch_n_go',
2878
+ 'tamara',
2879
+ 'qpay',
2832
2880
  ])
2833
2881
  .optional(),
2834
2882
  reference_number: z.string().max(100).optional(),
@@ -3053,6 +3101,10 @@ const ImportForItemsSubscriptionTransactionSchema = z.object({
3053
3101
  'app_store',
3054
3102
  'play_store',
3055
3103
  'custom',
3104
+ 'dana',
3105
+ 'touch_n_go',
3106
+ 'tamara',
3107
+ 'qpay',
3056
3108
  ])
3057
3109
  .optional(),
3058
3110
  reference_number: z.string().max(100).optional(),
@@ -3290,6 +3342,7 @@ const CancelForItemsSubscriptionBodySchema = z.looseObject({
3290
3342
  ])
3291
3343
  .optional(),
3292
3344
  invoice_date: z.number().int().optional(),
3345
+ include_cancellation_day_in_billing: z.boolean().optional(),
3293
3346
  cancel_reason_code: z.string().max(100).optional(),
3294
3347
  decommissioned: z.boolean().default(false).optional(),
3295
3348
  subscription_items: CancelForItemsSubscriptionSubscriptionItemsSchema.optional(),
@@ -3351,6 +3404,10 @@ const ResumeSubscriptionPaymentIntentSchema = z.object({
3351
3404
  'paynow',
3352
3405
  'bizum',
3353
3406
  'promptpay',
3407
+ 'dana',
3408
+ 'touch_n_go',
3409
+ 'tamara',
3410
+ 'qpay',
3354
3411
  ])
3355
3412
  .optional(),
3356
3413
  reference_id: z.string().max(65000).optional(),
@@ -22,6 +22,10 @@ const RecordRefundTransactionBodySchema = z.looseObject({
22
22
  'app_store',
23
23
  'play_store',
24
24
  'custom',
25
+ 'dana',
26
+ 'touch_n_go',
27
+ 'tamara',
28
+ 'qpay',
25
29
  ]),
26
30
  date: z.number().int(),
27
31
  reference_number: z.string().max(100).optional(),
@@ -137,6 +141,10 @@ const ListTransactionPaymentMethodSchema = z.object({
137
141
  'paynow',
138
142
  'bizum',
139
143
  'promptpay',
144
+ 'dana',
145
+ 'touch_n_go',
146
+ 'tamara',
147
+ 'qpay',
140
148
  ])
141
149
  .optional(),
142
150
  is_not: z
@@ -201,6 +209,10 @@ const ListTransactionPaymentMethodSchema = z.object({
201
209
  'paynow',
202
210
  'bizum',
203
211
  'promptpay',
212
+ 'dana',
213
+ 'touch_n_go',
214
+ 'tamara',
215
+ 'qpay',
204
216
  ])
205
217
  .optional(),
206
218
  in: z
@@ -265,6 +277,10 @@ const ListTransactionPaymentMethodSchema = z.object({
265
277
  'paynow',
266
278
  'bizum',
267
279
  'promptpay',
280
+ 'dana',
281
+ 'touch_n_go',
282
+ 'tamara',
283
+ 'qpay',
268
284
  ])
269
285
  .optional(),
270
286
  not_in: z
@@ -329,6 +345,10 @@ const ListTransactionPaymentMethodSchema = z.object({
329
345
  'paynow',
330
346
  'bizum',
331
347
  'promptpay',
348
+ 'dana',
349
+ 'touch_n_go',
350
+ 'tamara',
351
+ 'qpay',
332
352
  ])
333
353
  .optional(),
334
354
  });
@@ -241,6 +241,10 @@ const CreateWebhookEndpointBodySchema = z.looseObject({
241
241
  'alert_status_changed',
242
242
  'omnichannel_subscription_item_updated',
243
243
  'omnichannel_subscription_item_recovered',
244
+ 'ledger_account_balance_updated',
245
+ 'grant_blocks_created',
246
+ 'grant_blocks_updated',
247
+ 'ledger_updated',
244
248
  'plan_created',
245
249
  'plan_updated',
246
250
  'plan_deleted',
@@ -488,6 +492,10 @@ const UpdateWebhookEndpointBodySchema = z.looseObject({
488
492
  'alert_status_changed',
489
493
  'omnichannel_subscription_item_updated',
490
494
  'omnichannel_subscription_item_recovered',
495
+ 'ledger_account_balance_updated',
496
+ 'grant_blocks_created',
497
+ 'grant_blocks_updated',
498
+ 'ledger_updated',
491
499
  'plan_created',
492
500
  'plan_updated',
493
501
  'plan_deleted',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chargebee",
3
- "version": "3.29.0",
3
+ "version": "3.30.0",
4
4
  "description": "A library for integrating with Chargebee.",
5
5
  "scripts": {
6
6
  "prepack": "npm install && npm run build",
package/types/core.d.ts CHANGED
@@ -377,6 +377,10 @@ declare module 'chargebee' {
377
377
  | 'alert_status_changed'
378
378
  | 'omnichannel_subscription_item_updated'
379
379
  | 'omnichannel_subscription_item_recovered'
380
+ | 'ledger_account_balance_updated'
381
+ | 'grant_blocks_created'
382
+ | 'grant_blocks_updated'
383
+ | 'ledger_updated'
380
384
  | 'plan_created'
381
385
  | 'plan_updated'
382
386
  | 'plan_deleted'
@@ -495,6 +499,10 @@ declare module 'chargebee' {
495
499
  | 'bank_transfer'
496
500
  | 'other'
497
501
  | 'custom'
502
+ | 'dana'
503
+ | 'touch_n_go'
504
+ | 'tamara'
505
+ | 'qpay'
498
506
  | 'chargeback'
499
507
  | 'card'
500
508
  | 'amazon_payments'
@@ -599,7 +607,11 @@ declare module 'chargebee' {
599
607
  | 'south_korean_cards'
600
608
  | 'paynow'
601
609
  | 'bizum'
602
- | 'promptpay';
610
+ | 'promptpay'
611
+ | 'dana'
612
+ | 'touch_n_go'
613
+ | 'tamara'
614
+ | 'qpay';
603
615
  type PaymentVoucherTypeEnum = 'boleto';
604
616
  type PeriodUnitEnum = 'day' | 'week' | 'month' | 'year';
605
617
  type PriceTypeEnum = 'tax_exclusive' | 'tax_inclusive';
@@ -735,13 +747,22 @@ declare module 'chargebee' {
735
747
  | 'paynow'
736
748
  | 'bizum'
737
749
  | 'promptpay'
750
+ | 'dana'
751
+ | 'touch_n_go'
752
+ | 'tamara'
753
+ | 'qpay'
738
754
  | 'free_trial'
739
755
  | 'pay_up_front'
740
756
  | 'pay_as_you_go'
741
757
  | 'simple'
742
758
  | 'compound'
743
759
  | 'usage_exceeded'
744
- | 'spend_exceeded';
760
+ | 'spend_exceeded'
761
+ | 'credit_balance_dropped'
762
+ | 'credit'
763
+ | 'debit'
764
+ | 'hold'
765
+ | 'unhold';
745
766
  type UnbilledChargesHandlingEnum = 'no_action' | 'invoice';
746
767
  type UnbilledChargesOptionEnum = 'invoice' | 'delete';
747
768
  type UnpaidInvoicesHandlingEnum = 'no_action' | 'schedule_payment_collection';
@@ -971,6 +992,10 @@ declare module 'chargebee' {
971
992
  | 'alert_status_changed'
972
993
  | 'omnichannel_subscription_item_updated'
973
994
  | 'omnichannel_subscription_item_recovered'
995
+ | 'ledger_account_balance_updated'
996
+ | 'grant_blocks_created'
997
+ | 'grant_blocks_updated'
998
+ | 'ledger_updated'
974
999
  | 'plan_created'
975
1000
  | 'plan_updated'
976
1001
  | 'plan_deleted'
package/types/index.d.ts CHANGED
@@ -23,6 +23,7 @@
23
23
  ///<reference path='./resources/CpqQuoteSignature.d.ts' />
24
24
  ///<reference path='./resources/CreditNote.d.ts' />
25
25
  ///<reference path='./resources/CreditNoteEstimate.d.ts' />
26
+ ///<reference path='./resources/CreditUnit.d.ts' />
26
27
  ///<reference path='./resources/Currency.d.ts' />
27
28
  ///<reference path='./resources/Customer.d.ts' />
28
29
  ///<reference path='./resources/CustomerEntitlement.d.ts' />
@@ -54,6 +55,7 @@
54
55
  ///<reference path='./resources/ItemFamily.d.ts' />
55
56
  ///<reference path='./resources/ItemPrice.d.ts' />
56
57
  ///<reference path='./resources/LedgerAccountBalance.d.ts' />
58
+ ///<reference path='./resources/LedgerEntry.d.ts' />
57
59
  ///<reference path='./resources/LedgerOperation.d.ts' />
58
60
  ///<reference path='./resources/Metadata.d.ts' />
59
61
  ///<reference path='./resources/Meter.d.ts' />
@@ -278,6 +280,7 @@ declare module 'chargebee' {
278
280
  couponCode: CouponCode.CouponCodeResource;
279
281
  couponSet: CouponSet.CouponSetResource;
280
282
  creditNote: CreditNote.CreditNoteResource;
283
+ creditUnit: CreditUnit.CreditUnitResource;
281
284
  currency: Currency.CurrencyResource;
282
285
  customer: Customer.CustomerResource;
283
286
  customerEntitlement: CustomerEntitlement.CustomerEntitlementResource;
@@ -9,12 +9,13 @@ declare module 'chargebee' {
9
9
  description?: string;
10
10
  metered_feature_id?: string;
11
11
  currency_code?: string;
12
+ unit_id?: string;
12
13
  subscription_id?: string;
13
14
  status?: 'enabled' | 'disabled';
14
15
  meta?: string;
15
16
  created_at: number;
16
17
  updated_at: number;
17
- threshold?: Alert.Threshold[];
18
+ threshold?: Alert.Threshold;
18
19
  filter_conditions?: Alert.FilterCondition[];
19
20
  }
20
21
 
@@ -80,7 +81,7 @@ declare module 'chargebee' {
80
81
  }
81
82
 
82
83
  export interface Threshold {
83
- mode: 'absolute' | 'percentage';
84
+ mode: ModeEnum;
84
85
  value: number;
85
86
  }
86
87
  export interface FilterCondition {
@@ -97,6 +98,7 @@ declare module 'chargebee' {
97
98
  description?: string;
98
99
  metered_feature_id?: string;
99
100
  currency_code?: string;
101
+ unit_id?: string;
100
102
  subscription_id?: string;
101
103
  meta?: string;
102
104
  threshold?: ThresholdCreateInputParam;
@@ -11,8 +11,8 @@ declare module 'chargebee' {
11
11
  quantity?: number;
12
12
  quantity_in_decimal?: string;
13
13
  billing_cycles?: number;
14
- charge_on_event: ChargeOnEventEnum;
15
- charge_once: boolean;
14
+ charge_on_event?: ChargeOnEventEnum;
15
+ charge_once?: boolean;
16
16
  created_at: number;
17
17
  resource_version?: number;
18
18
  updated_at?: number;
@@ -28,6 +28,7 @@ declare module 'chargebee' {
28
28
  cpq_quote_signature: CpqQuoteSignature;
29
29
  credit_note: CreditNote;
30
30
  credit_note_estimate: CreditNoteEstimate;
31
+ credit_unit: CreditUnit;
31
32
  currency: Currency;
32
33
  customer: Customer;
33
34
  customer_entitlement: CustomerEntitlement;
@@ -59,6 +60,7 @@ declare module 'chargebee' {
59
60
  item_family: ItemFamily;
60
61
  item_price: ItemPrice;
61
62
  ledger_account_balance: LedgerAccountBalance;
63
+ ledger_entry: LedgerEntry;
62
64
  ledger_operation: LedgerOperation;
63
65
  metadata: Metadata;
64
66
  meter: Meter;
@@ -0,0 +1,90 @@
1
+ ///<reference path='./../core.d.ts'/>
2
+ ///<reference path='./../index.d.ts'/>
3
+ ///<reference path='./filter.d.ts'/>
4
+ declare module 'chargebee' {
5
+ export interface CreditUnit {
6
+ id: string;
7
+ name: string;
8
+ external_name: string;
9
+ status?: 'active' | 'archived';
10
+ resource_version?: number;
11
+ updated_at?: number;
12
+ created_at: number;
13
+ created_by?: string;
14
+ updated_by?: string;
15
+ is_unlimited: boolean;
16
+ overdraft_amount?: string;
17
+ }
18
+
19
+ export namespace CreditUnit {
20
+ export class CreditUnitResource {
21
+ list(
22
+ input?: ListInputParam,
23
+ headers?: ChargebeeRequestHeader,
24
+ ): Promise<ChargebeeResponse<ListResponse>>;
25
+
26
+ create(
27
+ input: CreateInputParam,
28
+ headers?: ChargebeeRequestHeader,
29
+ ): Promise<ChargebeeResponse<CreateResponse>>;
30
+
31
+ update(
32
+ credit_unit_id: string,
33
+ input?: UpdateInputParam,
34
+ headers?: ChargebeeRequestHeader,
35
+ ): Promise<ChargebeeResponse<UpdateResponse>>;
36
+
37
+ archive(
38
+ credit_unit_id: string,
39
+ headers?: ChargebeeRequestHeader,
40
+ ): Promise<ChargebeeResponse<ArchiveResponse>>;
41
+
42
+ reactivate(
43
+ credit_unit_id: string,
44
+ headers?: ChargebeeRequestHeader,
45
+ ): Promise<ChargebeeResponse<ReactivateResponse>>;
46
+ }
47
+
48
+ export interface ListResponse {
49
+ list: { credit_unit: CreditUnit }[];
50
+ next_offset?: string;
51
+ }
52
+
53
+ export interface CreateResponse {
54
+ credit_unit: CreditUnit;
55
+ }
56
+
57
+ export interface UpdateResponse {
58
+ credit_unit: CreditUnit;
59
+ }
60
+
61
+ export interface ArchiveResponse {
62
+ credit_unit: CreditUnit;
63
+ }
64
+
65
+ export interface ReactivateResponse {
66
+ credit_unit: CreditUnit;
67
+ }
68
+
69
+ // REQUEST PARAMS
70
+ //---------------
71
+
72
+ export interface ListInputParam {
73
+ limit?: number;
74
+ offset?: string;
75
+ status?: filter.Enum;
76
+ id?: filter.String;
77
+ }
78
+ export interface CreateInputParam {
79
+ id: string;
80
+ name: string;
81
+ is_unlimited: boolean;
82
+ overdraft_amount?: string;
83
+ external_name?: string;
84
+ }
85
+ export interface UpdateInputParam {
86
+ name?: string;
87
+ external_name?: string;
88
+ }
89
+ }
90
+ }
@@ -777,7 +777,11 @@ declare module 'chargebee' {
777
777
  | 'south_korean_cards'
778
778
  | 'paynow'
779
779
  | 'bizum'
780
- | 'promptpay';
780
+ | 'promptpay'
781
+ | 'dana'
782
+ | 'touch_n_go'
783
+ | 'tamara'
784
+ | 'qpay';
781
785
  reference_id?: string;
782
786
  /**
783
787
  * @deprecated Please refer API docs to use other attributes
@@ -977,7 +981,11 @@ declare module 'chargebee' {
977
981
  | 'south_korean_cards'
978
982
  | 'paynow'
979
983
  | 'bizum'
980
- | 'promptpay';
984
+ | 'promptpay'
985
+ | 'dana'
986
+ | 'touch_n_go'
987
+ | 'tamara'
988
+ | 'qpay';
981
989
  /**
982
990
  * @deprecated Please refer API docs to use other attributes
983
991
  */
@@ -387,6 +387,7 @@ declare module 'chargebee' {
387
387
  refundable_credits_handling?: RefundableCreditsHandlingEnum;
388
388
  contract_term_cancel_option?: ContractTermCancelOptionEnum;
389
389
  invoice_date?: number;
390
+ include_cancellation_day_in_billing?: boolean;
390
391
  cancel_reason_code?: string;
391
392
  subscription_items?: SubscriptionItemsCancelSubscriptionForItemsInputParam[];
392
393
  }
@@ -1073,7 +1074,11 @@ declare module 'chargebee' {
1073
1074
  | 'south_korean_cards'
1074
1075
  | 'paynow'
1075
1076
  | 'bizum'
1076
- | 'promptpay';
1077
+ | 'promptpay'
1078
+ | 'dana'
1079
+ | 'touch_n_go'
1080
+ | 'tamara'
1081
+ | 'qpay';
1077
1082
  reference_id?: string;
1078
1083
  /**
1079
1084
  * @deprecated Please refer API docs to use other attributes
@@ -1178,7 +1183,11 @@ declare module 'chargebee' {
1178
1183
  | 'south_korean_cards'
1179
1184
  | 'paynow'
1180
1185
  | 'bizum'
1181
- | 'promptpay';
1186
+ | 'promptpay'
1187
+ | 'dana'
1188
+ | 'touch_n_go'
1189
+ | 'tamara'
1190
+ | 'qpay';
1182
1191
  reference_id?: string;
1183
1192
  /**
1184
1193
  * @deprecated Please refer API docs to use other attributes