chargebee 3.32.0 → 3.34.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 (113) hide show
  1. package/CHANGELOG.md +196 -0
  2. package/cjs/environment.js +1 -1
  3. package/cjs/resources/api_endpoints.js +323 -2
  4. package/cjs/resources/webhook/eventType.js +14 -0
  5. package/cjs/schema/business_rule.schema.js +54 -0
  6. package/cjs/schema/business_ruleset.schema.js +68 -0
  7. package/cjs/schema/card.schema.js +3 -1
  8. package/cjs/schema/credit_note.schema.js +10 -4
  9. package/cjs/schema/customer.schema.js +81 -10
  10. package/cjs/schema/dispute.schema.js +104 -0
  11. package/cjs/schema/einvoice.schema.js +37 -0
  12. package/cjs/schema/email_log.schema.js +28 -0
  13. package/cjs/schema/estimate.schema.js +38 -9
  14. package/cjs/schema/event.schema.js +56 -0
  15. package/cjs/schema/export.schema.js +68 -12
  16. package/cjs/schema/feature.schema.js +2 -2
  17. package/cjs/schema/gift.schema.js +27 -1
  18. package/cjs/schema/hosted_page.schema.js +26 -6
  19. package/cjs/schema/index.js +6 -0
  20. package/cjs/schema/invoice.schema.js +74 -10
  21. package/cjs/schema/ledger_operation.schema.js +4 -0
  22. package/cjs/schema/meter.schema.js +1 -1
  23. package/cjs/schema/metered_feature.schema.js +1 -1
  24. package/cjs/schema/payment_intent.schema.js +27 -0
  25. package/cjs/schema/payment_schedule.schema.js +36 -0
  26. package/cjs/schema/payment_schedule_scheme.schema.js +23 -2
  27. package/cjs/schema/payment_source.schema.js +103 -1
  28. package/cjs/schema/pricing_page_session.schema.js +1 -0
  29. package/cjs/schema/promotional_grant.schema.js +2 -0
  30. package/cjs/schema/purchase.schema.js +14 -1
  31. package/cjs/schema/quote.schema.js +2 -2
  32. package/cjs/schema/ramp.schema.js +8 -0
  33. package/cjs/schema/subscription.schema.js +179 -16
  34. package/cjs/schema/transaction.schema.js +60 -2
  35. package/cjs/schema/webhook_endpoint.schema.js +28 -0
  36. package/esm/environment.js +1 -1
  37. package/esm/resources/api_endpoints.js +323 -2
  38. package/esm/resources/webhook/eventType.js +14 -0
  39. package/esm/schema/business_rule.schema.js +51 -0
  40. package/esm/schema/business_ruleset.schema.js +65 -0
  41. package/esm/schema/card.schema.js +3 -1
  42. package/esm/schema/credit_note.schema.js +10 -4
  43. package/esm/schema/customer.schema.js +81 -10
  44. package/esm/schema/dispute.schema.js +101 -0
  45. package/esm/schema/einvoice.schema.js +34 -0
  46. package/esm/schema/email_log.schema.js +25 -0
  47. package/esm/schema/estimate.schema.js +38 -9
  48. package/esm/schema/event.schema.js +56 -0
  49. package/esm/schema/export.schema.js +68 -12
  50. package/esm/schema/feature.schema.js +2 -2
  51. package/esm/schema/gift.schema.js +27 -1
  52. package/esm/schema/hosted_page.schema.js +26 -6
  53. package/esm/schema/index.js +6 -0
  54. package/esm/schema/invoice.schema.js +74 -10
  55. package/esm/schema/ledger_operation.schema.js +4 -0
  56. package/esm/schema/meter.schema.js +1 -1
  57. package/esm/schema/metered_feature.schema.js +1 -1
  58. package/esm/schema/omnichannel_subscription.schema.js +1 -1
  59. package/esm/schema/payment_intent.schema.js +27 -0
  60. package/esm/schema/payment_schedule.schema.js +33 -0
  61. package/esm/schema/payment_schedule_scheme.schema.js +22 -1
  62. package/esm/schema/payment_source.schema.js +103 -1
  63. package/esm/schema/pricing_page_session.schema.js +1 -0
  64. package/esm/schema/promotional_grant.schema.js +2 -0
  65. package/esm/schema/purchase.schema.js +14 -1
  66. package/esm/schema/quote.schema.js +2 -2
  67. package/esm/schema/ramp.schema.js +8 -0
  68. package/esm/schema/subscription.schema.js +179 -16
  69. package/esm/schema/subscription_entitlement.schema.js +2 -2
  70. package/esm/schema/transaction.schema.js +60 -2
  71. package/esm/schema/webhook_endpoint.schema.js +28 -0
  72. package/package.json +1 -1
  73. package/types/core.d.ts +86 -8
  74. package/types/index.d.ts +15 -0
  75. package/types/resources/AppliedBusinessRule.d.ts +15 -0
  76. package/types/resources/AppliedRule.d.ts +14 -0
  77. package/types/resources/ApplyRule.d.ts +28 -0
  78. package/types/resources/BusinessRule.d.ts +161 -0
  79. package/types/resources/BusinessRuleset.d.ts +165 -0
  80. package/types/resources/BusinessRulesetRule.d.ts +9 -0
  81. package/types/resources/Card.d.ts +1 -1
  82. package/types/resources/Content.d.ts +9 -0
  83. package/types/resources/Coupon.d.ts +2 -2
  84. package/types/resources/CreditNote.d.ts +12 -0
  85. package/types/resources/CustomDataSchema.d.ts +15 -0
  86. package/types/resources/Customer.d.ts +42 -5
  87. package/types/resources/Dispute.d.ts +65 -0
  88. package/types/resources/Einvoice.d.ts +64 -1
  89. package/types/resources/EmailLog.d.ts +45 -0
  90. package/types/resources/Estimate.d.ts +34 -5
  91. package/types/resources/Event.d.ts +15 -0
  92. package/types/resources/Gift.d.ts +29 -3
  93. package/types/resources/GrantBlock.d.ts +26 -7
  94. package/types/resources/HostedPage.d.ts +14 -3
  95. package/types/resources/Invoice.d.ts +42 -4
  96. package/types/resources/LedgerEntry.d.ts +4 -4
  97. package/types/resources/LedgerOperation.d.ts +15 -8
  98. package/types/resources/OmnichannelSubscriptionItem.d.ts +5 -1
  99. package/types/resources/PaymentIntent.d.ts +72 -5
  100. package/types/resources/PaymentSchedule.d.ts +38 -1
  101. package/types/resources/PaymentScheduleEstimate.d.ts +1 -0
  102. package/types/resources/PaymentScheduleScheme.d.ts +17 -1
  103. package/types/resources/PaymentSource.d.ts +31 -2
  104. package/types/resources/PricingPageSession.d.ts +1 -0
  105. package/types/resources/PromotionalGrant.d.ts +2 -0
  106. package/types/resources/Purchase.d.ts +14 -1
  107. package/types/resources/Quote.d.ts +2 -2
  108. package/types/resources/QuotedSubscription.d.ts +3 -2
  109. package/types/resources/Ramp.d.ts +12 -0
  110. package/types/resources/Subscription.d.ts +116 -17
  111. package/types/resources/ThirdPartyPaymentMethod.d.ts +1 -0
  112. package/types/resources/Transaction.d.ts +5 -0
  113. package/types/resources/WebhookEvent.d.ts +70 -0
@@ -24,8 +24,8 @@ declare module 'chargebee' {
24
24
  | 'plans_with_quantity'
25
25
  | 'not_applicable';
26
26
  apply_on: 'invoice_amount' | 'each_specified_item';
27
- plan_constraint: 'none' | 'all' | 'specific' | 'not_applicable';
28
- addon_constraint: 'none' | 'all' | 'specific' | 'not_applicable';
27
+ plan_constraint?: 'none' | 'all' | 'specific' | 'not_applicable';
28
+ addon_constraint?: 'none' | 'all' | 'specific' | 'not_applicable';
29
29
  created_at: number;
30
30
  archived_at?: number;
31
31
  resource_version?: number;
@@ -62,6 +62,7 @@ declare module 'chargebee' {
62
62
  create_reason_code?: string;
63
63
  vat_number_prefix?: string;
64
64
  business_entity_id?: string;
65
+ brand_id?: string;
65
66
  shipping_address?: CreditNote.ShippingAddress;
66
67
  billing_address?: CreditNote.BillingAddress;
67
68
  einvoice?: CreditNote.Einvoice;
@@ -110,6 +111,11 @@ declare module 'chargebee' {
110
111
  headers?: ChargebeeRequestHeader,
111
112
  ): Promise<ChargebeeResponse<VoidCreditNoteResponse>>;
112
113
 
114
+ sendEmail(
115
+ credit_note_id: string,
116
+ headers?: ChargebeeRequestHeader,
117
+ ): Promise<ChargebeeResponse<SendEmailResponse>>;
118
+
113
119
  list(
114
120
  input?: ListInputParam,
115
121
  headers?: ChargebeeRequestHeader,
@@ -190,6 +196,10 @@ declare module 'chargebee' {
190
196
  credit_note: CreditNote;
191
197
  }
192
198
 
199
+ export interface SendEmailResponse {
200
+ email_logs: EmailLog[];
201
+ }
202
+
193
203
  export interface ListResponse {
194
204
  list: { credit_note: CreditNote }[];
195
205
  next_offset?: string;
@@ -718,6 +728,8 @@ declare module 'chargebee' {
718
728
  tax9_amount?: number;
719
729
  tax10_name?: string;
720
730
  tax10_amount?: number;
731
+ is_partial_tax_applied?: boolean;
732
+ taxable_amount?: number;
721
733
  proration_mode?:
722
734
  | 'reset'
723
735
  | 'delta'
@@ -0,0 +1,15 @@
1
+ ///<reference path='./../core.d.ts'/>
2
+ ///<reference path='./../index.d.ts'/>
3
+
4
+ declare module 'chargebee' {
5
+ export interface CustomDataSchema {
6
+ id: string;
7
+ display_name: string;
8
+ entity_type: EntityTypeEnum;
9
+ schema_definition: string;
10
+ status: 'active' | 'archived';
11
+ created_at: number;
12
+ modified_at: number;
13
+ updated_at?: number;
14
+ }
15
+ }
@@ -83,6 +83,7 @@ declare module 'chargebee' {
83
83
  vat_number_prefix?: string;
84
84
  entity_identifier_scheme?: string;
85
85
  entity_identifier_standard?: string;
86
+ brand_id?: string;
86
87
  }
87
88
 
88
89
  export namespace Customer {
@@ -192,6 +193,11 @@ declare module 'chargebee' {
192
193
  headers?: ChargebeeRequestHeader,
193
194
  ): Promise<ChargebeeResponse<CollectPaymentResponse>>;
194
195
 
196
+ sendPaymentRequest(
197
+ customer_id: string,
198
+ headers?: ChargebeeRequestHeader,
199
+ ): Promise<ChargebeeResponse<SendPaymentRequestResponse>>;
200
+
195
201
  delete(
196
202
  customer_id: string,
197
203
  input?: DeleteInputParam,
@@ -326,6 +332,10 @@ declare module 'chargebee' {
326
332
  transaction: Transaction;
327
333
  }
328
334
 
335
+ export interface SendPaymentRequestResponse {
336
+ email_logs: EmailLog[];
337
+ }
338
+
329
339
  export interface DeleteResponse {
330
340
  customer: Customer;
331
341
  card?: Card;
@@ -491,7 +501,8 @@ declare module 'chargebee' {
491
501
  auto_close_invoices?: boolean;
492
502
  consolidated_invoicing?: boolean;
493
503
  token_id?: string;
494
- business_entity_id?: string /**
504
+ business_entity_id?: string;
505
+ brand_id?: string /**
495
506
  * @deprecated Please refer API docs to use other attributes
496
507
  */;
497
508
 
@@ -781,7 +792,20 @@ declare module 'chargebee' {
781
792
  | 'dana'
782
793
  | 'touch_n_go'
783
794
  | 'tamara'
784
- | 'qpay';
795
+ | 'qpay'
796
+ | 'ovo'
797
+ | 'momo'
798
+ | 'mercado_pago'
799
+ | 'nequi'
800
+ | 'nupay'
801
+ | 'picpay'
802
+ | 'thai_qr'
803
+ | 'blik'
804
+ | 'fpx'
805
+ | 'wero'
806
+ | 'p24'
807
+ | 'affirm_pay'
808
+ | 'rakuten_pay';
785
809
  reference_id?: string;
786
810
  /**
787
811
  * @deprecated Please refer API docs to use other attributes
@@ -805,7 +829,7 @@ declare module 'chargebee' {
805
829
  expiry_month?: number;
806
830
  expiry_year?: number;
807
831
  cvv?: string;
808
- preferred_scheme?: 'cartes_bancaires' | 'mastercard' | 'visa';
832
+ preferred_scheme?: 'cartes_bancaires' | 'mastercard' | 'visa' | 'dankort';
809
833
  billing_addr1?: string;
810
834
  billing_addr2?: string;
811
835
  billing_city?: string;
@@ -985,7 +1009,20 @@ declare module 'chargebee' {
985
1009
  | 'dana'
986
1010
  | 'touch_n_go'
987
1011
  | 'tamara'
988
- | 'qpay';
1012
+ | 'qpay'
1013
+ | 'ovo'
1014
+ | 'momo'
1015
+ | 'mercado_pago'
1016
+ | 'nequi'
1017
+ | 'nupay'
1018
+ | 'picpay'
1019
+ | 'thai_qr'
1020
+ | 'blik'
1021
+ | 'fpx'
1022
+ | 'wero'
1023
+ | 'p24'
1024
+ | 'affirm_pay'
1025
+ | 'rakuten_pay';
989
1026
  /**
990
1027
  * @deprecated Please refer API docs to use other attributes
991
1028
  */
@@ -1001,7 +1038,7 @@ declare module 'chargebee' {
1001
1038
  expiry_month?: number;
1002
1039
  expiry_year?: number;
1003
1040
  cvv?: string;
1004
- preferred_scheme?: 'cartes_bancaires' | 'mastercard' | 'visa';
1041
+ preferred_scheme?: 'cartes_bancaires' | 'mastercard' | 'visa' | 'dankort';
1005
1042
  billing_addr1?: string;
1006
1043
  billing_addr2?: string;
1007
1044
  billing_city?: string;
@@ -0,0 +1,65 @@
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 Dispute {
6
+ id: string;
7
+ customer_id: string;
8
+ transaction_id: string;
9
+ gateway_account_id: string;
10
+ id_at_gateway?: string;
11
+ currency_code: string;
12
+ amount: number;
13
+ reason?: string;
14
+ status:
15
+ | 'initiated'
16
+ | 'funds_withdrawn'
17
+ | 'in_review'
18
+ | 'cancelled'
19
+ | 'lost'
20
+ | 'won';
21
+ type: 'chargeback' | 'inquiry';
22
+ is_partial_dispute: boolean;
23
+ created_at: number;
24
+ resource_version?: number;
25
+ updated_at?: number;
26
+ }
27
+
28
+ export namespace Dispute {
29
+ export class DisputeResource {
30
+ retrieve(
31
+ dispute_id: string,
32
+ headers?: ChargebeeRequestHeader,
33
+ ): Promise<ChargebeeResponse<RetrieveResponse>>;
34
+
35
+ list(
36
+ input?: ListInputParam,
37
+ headers?: ChargebeeRequestHeader,
38
+ ): Promise<ChargebeeResponse<ListResponse>>;
39
+ }
40
+
41
+ export interface RetrieveResponse {
42
+ dispute: Dispute;
43
+ }
44
+
45
+ export interface ListResponse {
46
+ list: { dispute: Dispute }[];
47
+ next_offset?: string;
48
+ }
49
+
50
+ // REQUEST PARAMS
51
+ //---------------
52
+
53
+ export interface ListInputParam {
54
+ limit?: number;
55
+ offset?: string;
56
+ id?: filter.String;
57
+ status?: filter.Enum;
58
+ type?: filter.Enum;
59
+ customer_id?: filter.String;
60
+ transaction_id?: filter.String;
61
+ amount?: filter.Number;
62
+ created_at?: filter.Timestamp;
63
+ }
64
+ }
65
+ }
@@ -1,9 +1,11 @@
1
1
  ///<reference path='./../core.d.ts'/>
2
2
  ///<reference path='./../index.d.ts'/>
3
-
3
+ ///<reference path='./filter.d.ts'/>
4
4
  declare module 'chargebee' {
5
5
  export interface Einvoice {
6
6
  id: string;
7
+ entity_type: 'invoice' | 'credit_note';
8
+ entity_id: string;
7
9
  reference_id?: string;
8
10
  reference_number?: string;
9
11
  status:
@@ -21,6 +23,67 @@ declare module 'chargebee' {
21
23
  | 'conditionally_accepted'
22
24
  | 'paid';
23
25
  message?: string;
26
+ created_at: number;
27
+ resource_version?: number;
28
+ updated_at?: number;
29
+ deleted: boolean;
24
30
  provider_references?: any;
31
+ business_entity_id?: string;
32
+ artifacts?: Einvoice.Artifact[];
33
+ }
34
+
35
+ export namespace Einvoice {
36
+ export class EinvoiceResource {
37
+ retrieve(
38
+ einvoice_id: string,
39
+ headers?: ChargebeeRequestHeader,
40
+ ): Promise<ChargebeeResponse<RetrieveResponse>>;
41
+
42
+ listEinvoices(
43
+ input?: ListEinvoicesInputParam,
44
+ headers?: ChargebeeRequestHeader,
45
+ ): Promise<ChargebeeResponse<ListEinvoicesResponse>>;
46
+ }
47
+
48
+ export interface RetrieveResponse {
49
+ einvoice: Einvoice;
50
+ }
51
+
52
+ export interface ListEinvoicesResponse {
53
+ list: { einvoice: Einvoice }[];
54
+ next_offset?: string;
55
+ }
56
+
57
+ export interface Artifact {
58
+ artifact_type: string;
59
+ direction: 'outbound' | 'inbound';
60
+ status:
61
+ | 'scheduled'
62
+ | 'skipped'
63
+ | 'in_progress'
64
+ | 'success'
65
+ | 'failed'
66
+ | 'registered';
67
+ code?: string;
68
+ external_artifact_id?: string;
69
+ created_at: number;
70
+ resource_version?: number;
71
+ updated_at?: number;
72
+ deleted: boolean;
73
+ }
74
+ // REQUEST PARAMS
75
+ //---------------
76
+
77
+ export interface ListEinvoicesInputParam {
78
+ limit?: number;
79
+ offset?: string;
80
+ id?: filter.String;
81
+ reference_id?: filter.String;
82
+ updated_at?: filter.Timestamp;
83
+ invoice_id?: string;
84
+ credit_note_id?: string;
85
+ 'sort_by[asc]'?: string;
86
+ 'sort_by[desc]'?: string;
87
+ }
25
88
  }
26
89
  }
@@ -0,0 +1,45 @@
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 EmailLog {
6
+ id: string;
7
+ template_name?: string;
8
+ from_address: string;
9
+ to_address: string;
10
+ subject: string;
11
+ status: StatusEnum;
12
+ sent_on?: number;
13
+ customer_id?: string;
14
+ site_id?: string;
15
+ business_entity_id?: string;
16
+ brand_id?: string;
17
+ error_message?: string;
18
+ }
19
+
20
+ export namespace EmailLog {
21
+ export class EmailLogResource {
22
+ emailLogsForCustomer(
23
+ customer_id: string,
24
+ input?: EmailLogsForCustomerInputParam,
25
+ headers?: ChargebeeRequestHeader,
26
+ ): Promise<ChargebeeResponse<EmailLogsForCustomerResponse>>;
27
+ }
28
+
29
+ export interface EmailLogsForCustomerResponse {
30
+ list: { email_log: EmailLog }[];
31
+ next_offset?: string;
32
+ }
33
+
34
+ // REQUEST PARAMS
35
+ //---------------
36
+
37
+ export interface EmailLogsForCustomerInputParam {
38
+ limit?: number;
39
+ offset?: string;
40
+ sent_on?: filter.Timestamp;
41
+ business_entity_id?: filter.String;
42
+ brand_id?: filter.String;
43
+ }
44
+ }
45
+ }
@@ -506,7 +506,7 @@ declare module 'chargebee' {
506
506
  }
507
507
  export interface SubscriptionCreateSubscriptionInputParam {
508
508
  id?: string;
509
- plan_id: string;
509
+ plan_id?: string;
510
510
  plan_quantity?: number;
511
511
  plan_quantity_in_decimal?: string;
512
512
  plan_unit_price?: number;
@@ -622,6 +622,7 @@ declare module 'chargebee' {
622
622
  * @deprecated Please refer API docs to use other attributes
623
623
  */
624
624
  item_type?: ItemTypeEnum;
625
+ description?: string;
625
626
  charge_on_option?: ChargeOnOptionEnum;
626
627
  }
627
628
  export interface DiscountsCreateSubItemEstimateInputParam {
@@ -667,7 +668,7 @@ declare module 'chargebee' {
667
668
  }
668
669
  export interface SubscriptionCreateSubForCustomerEstimateInputParam {
669
670
  id?: string;
670
- plan_id: string;
671
+ plan_id?: string;
671
672
  plan_quantity?: number;
672
673
  plan_quantity_in_decimal?: string;
673
674
  plan_unit_price?: number;
@@ -764,6 +765,7 @@ declare module 'chargebee' {
764
765
  * @deprecated Please refer API docs to use other attributes
765
766
  */
766
767
  item_type?: ItemTypeEnum;
768
+ description?: string;
767
769
  charge_on_option?: ChargeOnOptionEnum;
768
770
  }
769
771
  export interface DiscountsCreateSubItemForCustomerEstimateInputParam {
@@ -927,6 +929,7 @@ declare module 'chargebee' {
927
929
  * @deprecated Please refer API docs to use other attributes
928
930
  */
929
931
  item_type?: ItemTypeEnum;
932
+ description?: string;
930
933
  proration_type?: ProrationTypeEnum;
931
934
  }
932
935
  export interface DiscountsUpdateSubscriptionForItemsInputParam {
@@ -1078,7 +1081,20 @@ declare module 'chargebee' {
1078
1081
  | 'dana'
1079
1082
  | 'touch_n_go'
1080
1083
  | 'tamara'
1081
- | 'qpay';
1084
+ | 'qpay'
1085
+ | 'ovo'
1086
+ | 'momo'
1087
+ | 'mercado_pago'
1088
+ | 'nequi'
1089
+ | 'nupay'
1090
+ | 'picpay'
1091
+ | 'thai_qr'
1092
+ | 'blik'
1093
+ | 'fpx'
1094
+ | 'wero'
1095
+ | 'p24'
1096
+ | 'affirm_pay'
1097
+ | 'rakuten_pay';
1082
1098
  reference_id?: string;
1083
1099
  /**
1084
1100
  * @deprecated Please refer API docs to use other attributes
@@ -1087,7 +1103,7 @@ declare module 'chargebee' {
1087
1103
  additional_information?: any;
1088
1104
  }
1089
1105
  export interface SubscriptionGiftSubscriptionInputParam {
1090
- plan_id: string;
1106
+ plan_id?: string;
1091
1107
  plan_quantity?: number;
1092
1108
  plan_quantity_in_decimal?: string;
1093
1109
  }
@@ -1187,7 +1203,20 @@ declare module 'chargebee' {
1187
1203
  | 'dana'
1188
1204
  | 'touch_n_go'
1189
1205
  | 'tamara'
1190
- | 'qpay';
1206
+ | 'qpay'
1207
+ | 'ovo'
1208
+ | 'momo'
1209
+ | 'mercado_pago'
1210
+ | 'nequi'
1211
+ | 'nupay'
1212
+ | 'picpay'
1213
+ | 'thai_qr'
1214
+ | 'blik'
1215
+ | 'fpx'
1216
+ | 'wero'
1217
+ | 'p24'
1218
+ | 'affirm_pay'
1219
+ | 'rakuten_pay';
1191
1220
  reference_id?: string;
1192
1221
  /**
1193
1222
  * @deprecated Please refer API docs to use other attributes
@@ -20,6 +20,7 @@ declare module 'chargebee' {
20
20
  webhook_failure_reason?: string;
21
21
  webhooks?: Event.Webhook[];
22
22
  event_type?: EventTypeEnum;
23
+ site_id?: string;
23
24
  api_version?: ApiVersionEnum;
24
25
  content: SubscriptionPauseScheduledContent &
25
26
  CustomerBusinessEntityChangedContent &
@@ -35,6 +36,7 @@ declare module 'chargebee' {
35
36
  SubscriptionResumedContent &
36
37
  OmnichannelOneTimeOrderItemCancelledContent &
37
38
  SubscriptionCancelledContent &
39
+ BusinessRuleDeletedContent &
38
40
  ItemEntitlementsRemovedContent &
39
41
  BusinessEntityCreatedContent &
40
42
  CouponSetUpdatedContent &
@@ -46,6 +48,7 @@ declare module 'chargebee' {
46
48
  SubscriptionShippingAddressUpdatedContent &
47
49
  VoucherCreateFailedContent &
48
50
  GiftClaimedContent &
51
+ BusinessRulesAppliedContent &
49
52
  CustomerDeletedContent &
50
53
  RefundInitiatedContent &
51
54
  InvoiceGeneratedWithBackdatingContent &
@@ -74,12 +77,15 @@ declare module 'chargebee' {
74
77
  PriceVariantDeletedContent &
75
78
  AlertStatusChangedContent &
76
79
  SubscriptionMovementFailedContent &
80
+ BusinessRulesetUpdatedContent &
77
81
  CustomerMovedInContent &
78
82
  SubscriptionAdvanceInvoiceScheduleUpdatedContent &
79
83
  ItemDeletedContent &
80
84
  SubscriptionRampDraftedContent &
85
+ BusinessRuleCreatedContent &
81
86
  VaultTokenUpdatedContent &
82
87
  DunningUpdatedContent &
88
+ EinvoiceCreatedContent &
83
89
  OmnichannelSubscriptionItemRecoveredContent &
84
90
  ItemEntitlementsUpdatedContent &
85
91
  TokenConsumedContent &
@@ -101,9 +107,11 @@ declare module 'chargebee' {
101
107
  CardExpiredContent &
102
108
  CreditNoteUpdatedContent &
103
109
  OmnichannelSubscriptionItemDowngradedContent &
110
+ BusinessRulesetDeactivatedContent &
104
111
  PriceVariantUpdatedContent &
105
112
  PromotionalCreditsDeductedContent &
106
113
  SubscriptionRampAppliedContent &
114
+ BusinessRulesetDeletedContent &
107
115
  SubscriptionPausedContent &
108
116
  OrderReadyToProcessContent &
109
117
  FeatureCreatedContent &
@@ -112,6 +120,7 @@ declare module 'chargebee' {
112
120
  OmnichannelSubscriptionItemResubscribedContent &
113
121
  RecordPurchaseFailedContent &
114
122
  ItemCreatedContent &
123
+ BusinessRulesetCreatedContent &
115
124
  TransactionUpdatedContent &
116
125
  MrrUpdatedContent &
117
126
  UnbilledChargesInvoicedContent &
@@ -141,6 +150,7 @@ declare module 'chargebee' {
141
150
  SubscriptionScheduledChangesRemovedContent &
142
151
  PendingInvoiceCreatedContent &
143
152
  EntitlementOverridesAutoRemovedContent &
153
+ BusinessRulesetActivatedContent &
144
154
  OmnichannelSubscriptionItemUpgradedContent &
145
155
  SubscriptionBusinessEntityChangedContent &
146
156
  OmnichannelOneTimeOrderCreatedContent &
@@ -208,11 +218,14 @@ declare module 'chargebee' {
208
218
  PaymentSourceBusinessEntityChangedContent &
209
219
  PromotionalCreditsAddedContent &
210
220
  SubscriptionRampUpdatedContent &
221
+ BusinessRuleDeactivatedContent &
211
222
  LedgerAccountBalanceUpdatedContent &
212
223
  VaultTokenCreatedContent &
224
+ EinvoiceUpdatedContent &
213
225
  CustomerEntitlementsUpdatedContent &
214
226
  PaymentSourceExpiredContent &
215
227
  CustomerMovedOutContent &
228
+ BusinessRuleReleasedContent &
216
229
  SubscriptionEntitlementsUpdatedContent &
217
230
  OmnichannelSubscriptionItemDunningExpiredContent &
218
231
  HierarchyCreatedContent &
@@ -226,11 +239,13 @@ declare module 'chargebee' {
226
239
  TaxWithheldRecordedContent &
227
240
  PriceVariantCreatedContent &
228
241
  DifferentialPriceDeletedContent &
242
+ BusinessRuleActivatedContent &
229
243
  SubscriptionItemsRenewedContent &
230
244
  RuleCreatedContent &
231
245
  ContractTermCancelledContent &
232
246
  ContractTermRenewedContent &
233
247
  InvoiceDeletedContent &
248
+ BusinessRuleUpdatedContent &
234
249
  ItemPriceEntitlementsRemovedContent &
235
250
  SalesOrderUpdatedContent &
236
251
  OmnichannelSubscriptionItemDunningStartedContent &
@@ -235,7 +235,20 @@ declare module 'chargebee' {
235
235
  | 'dana'
236
236
  | 'touch_n_go'
237
237
  | 'tamara'
238
- | 'qpay';
238
+ | 'qpay'
239
+ | 'ovo'
240
+ | 'momo'
241
+ | 'mercado_pago'
242
+ | 'nequi'
243
+ | 'nupay'
244
+ | 'picpay'
245
+ | 'thai_qr'
246
+ | 'blik'
247
+ | 'fpx'
248
+ | 'wero'
249
+ | 'p24'
250
+ | 'affirm_pay'
251
+ | 'rakuten_pay';
239
252
  reference_id?: string;
240
253
  /**
241
254
  * @deprecated Please refer API docs to use other attributes
@@ -244,7 +257,7 @@ declare module 'chargebee' {
244
257
  additional_information?: any;
245
258
  }
246
259
  export interface SubscriptionCreateInputParam {
247
- plan_id: string;
260
+ plan_id?: string;
248
261
  plan_quantity?: number;
249
262
  plan_quantity_in_decimal?: string;
250
263
  }
@@ -338,7 +351,20 @@ declare module 'chargebee' {
338
351
  | 'dana'
339
352
  | 'touch_n_go'
340
353
  | 'tamara'
341
- | 'qpay';
354
+ | 'qpay'
355
+ | 'ovo'
356
+ | 'momo'
357
+ | 'mercado_pago'
358
+ | 'nequi'
359
+ | 'nupay'
360
+ | 'picpay'
361
+ | 'thai_qr'
362
+ | 'blik'
363
+ | 'fpx'
364
+ | 'wero'
365
+ | 'p24'
366
+ | 'affirm_pay'
367
+ | 'rakuten_pay';
342
368
  reference_id?: string;
343
369
  /**
344
370
  * @deprecated Please refer API docs to use other attributes
@@ -4,19 +4,19 @@
4
4
  declare module 'chargebee' {
5
5
  export interface GrantBlock {
6
6
  id: string;
7
- subscription_id?: string;
8
- account_type?: 'provisioned' | 'overdraft';
9
- unit_id?: string;
10
- unit_type?: 'credit_unit';
7
+ subscription_id: string;
8
+ unit_id: string;
9
+ unit_type: 'credit_unit';
10
+ account_type: 'provisioned' | 'overdraft';
11
11
  granted_amount: string;
12
12
  effective_from: number;
13
13
  expires_at: number;
14
14
  balance: string;
15
15
  hold_amount: string;
16
16
  used_amount: string;
17
- expired_amount: string;
18
- rolled_over_amount: string;
19
- voided_amount: string;
17
+ expired_amount?: string;
18
+ rolled_over_amount?: string;
19
+ voided_amount?: string;
20
20
  origin_grant_block_id?: string;
21
21
  status: StatusEnum;
22
22
  grant_source:
@@ -30,6 +30,8 @@ declare module 'chargebee' {
30
30
  created_at: number;
31
31
  modified_at: number;
32
32
  resource_version?: number;
33
+ provisioned_block_balance?: GrantBlock.ProvisionedBlockBalance;
34
+ overdraft_block_balance?: GrantBlock.OverdraftBlockBalance;
33
35
  metadata?: any;
34
36
  }
35
37
 
@@ -46,6 +48,23 @@ declare module 'chargebee' {
46
48
  next_offset?: string;
47
49
  }
48
50
 
51
+ export interface ProvisionedBlockBalance {
52
+ granted_amount?: string;
53
+ total_balance?: string;
54
+ usable_balance?: string;
55
+ hold_amount?: string;
56
+ used_amount?: string;
57
+ expired_amount?: string;
58
+ rolled_over_amount?: string;
59
+ voided_amount?: string;
60
+ }
61
+ export interface OverdraftBlockBalance {
62
+ is_unlimited: boolean;
63
+ limit?: string;
64
+ total_balance?: string;
65
+ usable_balance?: string;
66
+ used_amount?: string;
67
+ }
49
68
  // REQUEST PARAMS
50
69
  //---------------
51
70