chargebee 3.25.0-beta.1 → 3.26.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 (171) hide show
  1. package/CHANGELOG.md +103 -4
  2. package/README.md +0 -39
  3. package/cjs/RequestWrapper.js +1 -28
  4. package/cjs/chargebee.cjs.js +0 -3
  5. package/cjs/chargebee.cjs.worker.js +0 -2
  6. package/cjs/createChargebee.js +0 -5
  7. package/cjs/environment.js +1 -1
  8. package/cjs/resources/api_endpoints.js +121 -3
  9. package/cjs/resources/webhook/eventType.js +2 -0
  10. package/esm/RequestWrapper.js +1 -28
  11. package/esm/chargebee.esm.js +0 -2
  12. package/esm/chargebee.esm.worker.js +0 -1
  13. package/esm/createChargebee.js +0 -5
  14. package/esm/environment.js +1 -1
  15. package/esm/resources/api_endpoints.js +121 -3
  16. package/esm/resources/webhook/eventType.js +2 -0
  17. package/package.json +1 -4
  18. package/types/core.d.ts +24 -6
  19. package/types/index.d.ts +8 -17
  20. package/types/resources/Content.d.ts +4 -1
  21. package/types/resources/CreditNote.d.ts +1 -0
  22. package/types/resources/Customer.d.ts +14 -4
  23. package/types/resources/Estimate.d.ts +14 -4
  24. package/types/resources/Event.d.ts +2 -0
  25. package/types/resources/Gift.d.ts +23 -6
  26. package/types/resources/GrantBlock.d.ts +59 -0
  27. package/types/resources/HostedPage.d.ts +6 -1
  28. package/types/resources/Invoice.d.ts +14 -5
  29. package/types/resources/LedgerAccountBalance.d.ts +50 -0
  30. package/types/resources/LedgerOperation.d.ts +141 -0
  31. package/types/resources/OmnichannelSubscription.d.ts +8 -0
  32. package/types/resources/OmnichannelSubscriptionItem.d.ts +1 -0
  33. package/types/resources/PaymentIntent.d.ts +35 -10
  34. package/types/resources/PaymentSource.d.ts +7 -2
  35. package/types/resources/PromotionalGrant.d.ts +37 -0
  36. package/types/resources/Purchase.d.ts +7 -2
  37. package/types/resources/Subscription.d.ts +49 -14
  38. package/types/resources/WebhookEvent.d.ts +22 -4
  39. package/cjs/chargebeeZodValidationError.js +0 -18
  40. package/cjs/schema/addon.schema.js +0 -153
  41. package/cjs/schema/address.schema.js +0 -35
  42. package/cjs/schema/alert.schema.js +0 -38
  43. package/cjs/schema/attached_item.schema.js +0 -58
  44. package/cjs/schema/business_entity.schema.js +0 -46
  45. package/cjs/schema/card.schema.js +0 -165
  46. package/cjs/schema/comment.schema.js +0 -69
  47. package/cjs/schema/coupon.schema.js +0 -209
  48. package/cjs/schema/coupon_code.schema.js +0 -14
  49. package/cjs/schema/coupon_set.schema.js +0 -28
  50. package/cjs/schema/credit_note.schema.js +0 -288
  51. package/cjs/schema/currency.schema.js +0 -32
  52. package/cjs/schema/customer.schema.js +0 -986
  53. package/cjs/schema/customer_entitlement.schema.js +0 -14
  54. package/cjs/schema/differential_price.schema.js +0 -68
  55. package/cjs/schema/entitlement.schema.js +0 -27
  56. package/cjs/schema/entitlement_override.schema.js +0 -33
  57. package/cjs/schema/estimate.schema.js +0 -1525
  58. package/cjs/schema/export.schema.js +0 -1545
  59. package/cjs/schema/feature.schema.js +0 -37
  60. package/cjs/schema/gift.schema.js +0 -277
  61. package/cjs/schema/hosted_page.schema.js +0 -1649
  62. package/cjs/schema/in_app_subscription.schema.js +0 -68
  63. package/cjs/schema/index.js +0 -80
  64. package/cjs/schema/invoice.schema.js +0 -1467
  65. package/cjs/schema/item.schema.js +0 -91
  66. package/cjs/schema/item_entitlement.schema.js +0 -45
  67. package/cjs/schema/item_family.schema.js +0 -21
  68. package/cjs/schema/item_price.schema.js +0 -190
  69. package/cjs/schema/non_subscription.schema.js +0 -28
  70. package/cjs/schema/offer_event.schema.js +0 -13
  71. package/cjs/schema/offer_fulfillment.schema.js +0 -20
  72. package/cjs/schema/omnichannel_one_time_order.schema.js +0 -26
  73. package/cjs/schema/omnichannel_subscription.schema.js +0 -89
  74. package/cjs/schema/omnichannel_subscription_item.schema.js +0 -13
  75. package/cjs/schema/order.schema.js +0 -273
  76. package/cjs/schema/payment_intent.schema.js +0 -117
  77. package/cjs/schema/payment_schedule_scheme.schema.js +0 -20
  78. package/cjs/schema/payment_source.schema.js +0 -358
  79. package/cjs/schema/payment_voucher.schema.js +0 -57
  80. package/cjs/schema/personalized_offer.schema.js +0 -28
  81. package/cjs/schema/plan.schema.js +0 -225
  82. package/cjs/schema/portal_session.schema.js +0 -22
  83. package/cjs/schema/price_variant.schema.js +0 -36
  84. package/cjs/schema/pricing_page_session.schema.js +0 -135
  85. package/cjs/schema/promotional_credit.schema.js +0 -78
  86. package/cjs/schema/purchase.schema.js +0 -272
  87. package/cjs/schema/quote.schema.js +0 -1557
  88. package/cjs/schema/ramp.schema.js +0 -209
  89. package/cjs/schema/recorded_purchase.schema.js +0 -32
  90. package/cjs/schema/resource_migration.schema.js +0 -14
  91. package/cjs/schema/site_migration_detail.schema.js +0 -81
  92. package/cjs/schema/subscription.schema.js +0 -2993
  93. package/cjs/schema/subscription_entitlement.schema.js +0 -25
  94. package/cjs/schema/time_machine.schema.js +0 -17
  95. package/cjs/schema/transaction.schema.js +0 -70
  96. package/cjs/schema/unbilled_charge.schema.js +0 -113
  97. package/cjs/schema/usage.schema.js +0 -93
  98. package/cjs/schema/usage_charge.schema.js +0 -17
  99. package/cjs/schema/usage_event.schema.js +0 -28
  100. package/cjs/schema/usage_file.schema.js +0 -13
  101. package/cjs/schema/usage_summary.schema.js +0 -17
  102. package/cjs/schema/virtual_bank_account.schema.js +0 -43
  103. package/cjs/schema/webhook_endpoint.schema.js +0 -504
  104. package/cjs/validationLoader.js +0 -59
  105. package/esm/chargebeeZodValidationError.js +0 -14
  106. package/esm/schema/addon.schema.js +0 -150
  107. package/esm/schema/address.schema.js +0 -32
  108. package/esm/schema/alert.schema.js +0 -35
  109. package/esm/schema/attached_item.schema.js +0 -55
  110. package/esm/schema/business_entity.schema.js +0 -43
  111. package/esm/schema/card.schema.js +0 -162
  112. package/esm/schema/comment.schema.js +0 -66
  113. package/esm/schema/coupon.schema.js +0 -206
  114. package/esm/schema/coupon_code.schema.js +0 -11
  115. package/esm/schema/coupon_set.schema.js +0 -25
  116. package/esm/schema/credit_note.schema.js +0 -285
  117. package/esm/schema/currency.schema.js +0 -29
  118. package/esm/schema/customer.schema.js +0 -983
  119. package/esm/schema/customer_entitlement.schema.js +0 -11
  120. package/esm/schema/differential_price.schema.js +0 -65
  121. package/esm/schema/entitlement.schema.js +0 -24
  122. package/esm/schema/entitlement_override.schema.js +0 -30
  123. package/esm/schema/estimate.schema.js +0 -1522
  124. package/esm/schema/export.schema.js +0 -1542
  125. package/esm/schema/feature.schema.js +0 -34
  126. package/esm/schema/gift.schema.js +0 -274
  127. package/esm/schema/hosted_page.schema.js +0 -1646
  128. package/esm/schema/in_app_subscription.schema.js +0 -65
  129. package/esm/schema/index.js +0 -64
  130. package/esm/schema/invoice.schema.js +0 -1464
  131. package/esm/schema/item.schema.js +0 -88
  132. package/esm/schema/item_entitlement.schema.js +0 -42
  133. package/esm/schema/item_family.schema.js +0 -18
  134. package/esm/schema/item_price.schema.js +0 -187
  135. package/esm/schema/non_subscription.schema.js +0 -25
  136. package/esm/schema/offer_event.schema.js +0 -10
  137. package/esm/schema/offer_fulfillment.schema.js +0 -17
  138. package/esm/schema/omnichannel_one_time_order.schema.js +0 -23
  139. package/esm/schema/omnichannel_subscription.schema.js +0 -86
  140. package/esm/schema/omnichannel_subscription_item.schema.js +0 -10
  141. package/esm/schema/order.schema.js +0 -270
  142. package/esm/schema/payment_intent.schema.js +0 -114
  143. package/esm/schema/payment_schedule_scheme.schema.js +0 -17
  144. package/esm/schema/payment_source.schema.js +0 -355
  145. package/esm/schema/payment_voucher.schema.js +0 -54
  146. package/esm/schema/personalized_offer.schema.js +0 -25
  147. package/esm/schema/plan.schema.js +0 -222
  148. package/esm/schema/portal_session.schema.js +0 -19
  149. package/esm/schema/price_variant.schema.js +0 -33
  150. package/esm/schema/pricing_page_session.schema.js +0 -132
  151. package/esm/schema/promotional_credit.schema.js +0 -75
  152. package/esm/schema/purchase.schema.js +0 -269
  153. package/esm/schema/quote.schema.js +0 -1554
  154. package/esm/schema/ramp.schema.js +0 -206
  155. package/esm/schema/recorded_purchase.schema.js +0 -29
  156. package/esm/schema/resource_migration.schema.js +0 -11
  157. package/esm/schema/site_migration_detail.schema.js +0 -78
  158. package/esm/schema/subscription.schema.js +0 -2990
  159. package/esm/schema/subscription_entitlement.schema.js +0 -22
  160. package/esm/schema/time_machine.schema.js +0 -14
  161. package/esm/schema/transaction.schema.js +0 -67
  162. package/esm/schema/unbilled_charge.schema.js +0 -110
  163. package/esm/schema/usage.schema.js +0 -90
  164. package/esm/schema/usage_charge.schema.js +0 -14
  165. package/esm/schema/usage_event.schema.js +0 -25
  166. package/esm/schema/usage_file.schema.js +0 -10
  167. package/esm/schema/usage_summary.schema.js +0 -14
  168. package/esm/schema/virtual_bank_account.schema.js +0 -40
  169. package/esm/schema/webhook_endpoint.schema.js +0 -501
  170. package/esm/validationLoader.js +0 -56
  171. package/types/resources/QuoteEntitlement.d.ts +0 -16
@@ -1074,7 +1074,6 @@ declare module 'chargebee' {
1074
1074
  channel?: filter.Enum;
1075
1075
  voided_at?: filter.Timestamp;
1076
1076
  void_reason_code?: filter.String;
1077
- exclude?: filter.String;
1078
1077
  'sort_by[asc]'?: string;
1079
1078
  'sort_by[desc]'?: string;
1080
1079
  }
@@ -1283,14 +1282,19 @@ declare module 'chargebee' {
1283
1282
  | 'cash_app_pay'
1284
1283
  | 'wechat_pay'
1285
1284
  | 'alipay'
1286
- | 'pix'
1287
1285
  | 'twint'
1288
1286
  | 'go_pay'
1289
1287
  | 'grab_pay'
1290
1288
  | 'pay_co'
1291
1289
  | 'after_pay'
1292
1290
  | 'swish'
1293
- | 'payme';
1291
+ | 'payme'
1292
+ | 'pix'
1293
+ | 'klarna'
1294
+ | 'alipay_hk'
1295
+ | 'paypay'
1296
+ | 'gcash'
1297
+ | 'south_korean_cards';
1294
1298
  reference_id?: string;
1295
1299
  /**
1296
1300
  * @deprecated Please refer API docs to use other attributes
@@ -1449,14 +1453,19 @@ declare module 'chargebee' {
1449
1453
  | 'cash_app_pay'
1450
1454
  | 'wechat_pay'
1451
1455
  | 'alipay'
1452
- | 'pix'
1453
1456
  | 'twint'
1454
1457
  | 'go_pay'
1455
1458
  | 'grab_pay'
1456
1459
  | 'pay_co'
1457
1460
  | 'after_pay'
1458
1461
  | 'swish'
1459
- | 'payme';
1462
+ | 'payme'
1463
+ | 'pix'
1464
+ | 'klarna'
1465
+ | 'alipay_hk'
1466
+ | 'paypay'
1467
+ | 'gcash'
1468
+ | 'south_korean_cards';
1460
1469
  reference_id?: string;
1461
1470
  /**
1462
1471
  * @deprecated Please refer API docs to use other attributes
@@ -0,0 +1,50 @@
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 LedgerAccountBalance {
6
+ subscription_id: string;
7
+ unit_id: string;
8
+ unit_type: 'credit_unit';
9
+ modified_at?: number;
10
+ provisioned_balance?: LedgerAccountBalance.ProvisionedBalance;
11
+ overdraft_balance?: LedgerAccountBalance.OverdraftBalance;
12
+ }
13
+
14
+ export namespace LedgerAccountBalance {
15
+ export class LedgerAccountBalanceResource {
16
+ listLedgerAccountBalances(
17
+ input: ListLedgerAccountBalancesInputParam,
18
+ headers?: ChargebeeRequestHeader,
19
+ ): Promise<ChargebeeResponse<ListLedgerAccountBalancesResponse>>;
20
+ }
21
+
22
+ export interface ListLedgerAccountBalancesResponse {
23
+ list: { ledger_account_balance: LedgerAccountBalance }[];
24
+ next_offset?: string;
25
+ }
26
+
27
+ export interface ProvisionedBalance {
28
+ total_balance: string;
29
+ usable_balance: string;
30
+ hold_amount: string;
31
+ }
32
+ export interface OverdraftBalance {
33
+ is_unlimited: boolean;
34
+ limit?: string;
35
+ total_balance?: string;
36
+ usable_balance?: string;
37
+ used_amount: string;
38
+ hold_amount: string;
39
+ }
40
+ // REQUEST PARAMS
41
+ //---------------
42
+
43
+ export interface ListLedgerAccountBalancesInputParam {
44
+ limit?: number;
45
+ offset?: string;
46
+ subscription_id: filter.String;
47
+ unit_id?: filter.String;
48
+ }
49
+ }
50
+ }
@@ -0,0 +1,141 @@
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 LedgerOperation {
6
+ id: string;
7
+ type:
8
+ | 'allocation'
9
+ | 'capture'
10
+ | 'authorize'
11
+ | 'release_authorization'
12
+ | 'capture_authorization'
13
+ | 'expiry'
14
+ | 'void'
15
+ | 'rollover'
16
+ | 'adjustment';
17
+ amount: string;
18
+ start_balance: string;
19
+ end_balance: string;
20
+ provisioned_start_balance: string;
21
+ provisioned_end_balance: string;
22
+ overdraft_start_balance: string;
23
+ overdraft_end_balance: string;
24
+ parent_ledger_operation_id?: string;
25
+ ledger_operation_timestamp?: number;
26
+ auto_release_timestamp?: number;
27
+ metadata?: string;
28
+ created_at?: number;
29
+ modified_at?: number;
30
+ subscription_id?: string;
31
+ unit_id?: string;
32
+ unit_type?: 'credit_unit';
33
+ }
34
+
35
+ export namespace LedgerOperation {
36
+ export class LedgerOperationResource {
37
+ retrieveLedgerOperation(
38
+ ledger_operation_id: string,
39
+ headers?: ChargebeeRequestHeader,
40
+ ): Promise<ChargebeeResponse<RetrieveLedgerOperationResponse>>;
41
+
42
+ listLedgerOperations(
43
+ input: ListLedgerOperationsInputParam,
44
+ headers?: ChargebeeRequestHeader,
45
+ ): Promise<ChargebeeResponse<ListLedgerOperationsResponse>>;
46
+
47
+ capture(
48
+ input: CaptureInputParam,
49
+ headers?: ChargebeeRequestHeader,
50
+ ): Promise<ChargebeeResponse<CaptureResponse>>;
51
+
52
+ authorize(
53
+ input: AuthorizeInputParam,
54
+ headers?: ChargebeeRequestHeader,
55
+ ): Promise<ChargebeeResponse<AuthorizeResponse>>;
56
+
57
+ captureAuthorization(
58
+ input: CaptureAuthorizationInputParam,
59
+ headers?: ChargebeeRequestHeader,
60
+ ): Promise<ChargebeeResponse<CaptureAuthorizationResponse>>;
61
+
62
+ releaseAuthorization(
63
+ input: ReleaseAuthorizationInputParam,
64
+ headers?: ChargebeeRequestHeader,
65
+ ): Promise<ChargebeeResponse<ReleaseAuthorizationResponse>>;
66
+ }
67
+
68
+ export interface RetrieveLedgerOperationResponse {
69
+ ledger_operation: LedgerOperation;
70
+ }
71
+
72
+ export interface ListLedgerOperationsResponse {
73
+ list: { ledger_operation: LedgerOperation }[];
74
+ next_offset?: string;
75
+ }
76
+
77
+ export interface CaptureResponse {
78
+ ledger_operation: LedgerOperation;
79
+ ledger_account_balance: LedgerAccountBalance;
80
+ }
81
+
82
+ export interface AuthorizeResponse {
83
+ ledger_operation: LedgerOperation;
84
+ ledger_account_balance: LedgerAccountBalance;
85
+ }
86
+
87
+ export interface CaptureAuthorizationResponse {
88
+ ledger_operation: LedgerOperation;
89
+ ledger_account_balance: LedgerAccountBalance;
90
+ }
91
+
92
+ export interface ReleaseAuthorizationResponse {
93
+ ledger_operation: LedgerOperation;
94
+ ledger_account_balance: LedgerAccountBalance;
95
+ }
96
+
97
+ // REQUEST PARAMS
98
+ //---------------
99
+
100
+ export interface ListLedgerOperationsInputParam {
101
+ limit?: number;
102
+ offset?: string;
103
+ subscription_id: filter.String;
104
+ unit_id?: filter.String;
105
+ created_at?: filter.Timestamp;
106
+ type?: filter.Enum;
107
+ 'sort_by[asc]'?: string;
108
+ 'sort_by[desc]'?: string;
109
+ }
110
+ export interface CaptureInputParam {
111
+ id?: string;
112
+ subscription_id: string;
113
+ unit_id: string;
114
+ amount: string;
115
+ ledger_operation_timestamp: number;
116
+ metadata?: any;
117
+ }
118
+ export interface AuthorizeInputParam {
119
+ id?: string;
120
+ subscription_id: string;
121
+ unit_id: string;
122
+ amount: string;
123
+ ledger_operation_timestamp: number;
124
+ auto_release_timestamp?: number;
125
+ metadata?: any;
126
+ }
127
+ export interface CaptureAuthorizationInputParam {
128
+ authorization_id: string;
129
+ id?: string;
130
+ amount: string;
131
+ ledger_operation_timestamp: number;
132
+ metadata?: any;
133
+ }
134
+ export interface ReleaseAuthorizationInputParam {
135
+ authorization_id: string;
136
+ id?: string;
137
+ ledger_operation_timestamp: number;
138
+ metadata?: any;
139
+ }
140
+ }
141
+ }
@@ -9,6 +9,8 @@ declare module 'chargebee' {
9
9
  source: 'apple_app_store' | 'google_play_store';
10
10
  customer_id?: string;
11
11
  created_at: number;
12
+ purchased_at?: number;
13
+ updated_at: number;
12
14
  resource_version?: number;
13
15
  omnichannel_subscription_items: OmnichannelSubscriptionItem[];
14
16
  initial_purchase_transaction?: OmnichannelTransaction;
@@ -68,6 +70,12 @@ declare module 'chargebee' {
68
70
  omnichannel_subscription_item?: OmnichannelSubscriptionItemOmnichannelSubscriptionListInputParam;
69
71
  source?: filter.Enum;
70
72
  customer_id?: filter.String;
73
+ id?: filter.String;
74
+ id_at_source?: filter.String;
75
+ updated_at?: filter.Timestamp;
76
+ purchased_at?: filter.Timestamp;
77
+ 'sort_by[asc]'?: string;
78
+ 'sort_by[desc]'?: string;
71
79
  }
72
80
  export interface OmnichannelTransactionsForOmnichannelSubscriptionInputParam {
73
81
  limit?: number;
@@ -28,6 +28,7 @@ declare module 'chargebee' {
28
28
  grace_period_expires_at?: number;
29
29
  resumes_at?: number;
30
30
  has_scheduled_changes: boolean;
31
+ updated_at: number;
31
32
  resource_version?: number;
32
33
  omnichannel_subscription_item_offers?: OmnichannelSubscriptionItemOffer[];
33
34
  upcoming_renewal?: OmnichannelSubscriptionItem.UpcomingRenewal;
@@ -43,14 +43,19 @@ declare module 'chargebee' {
43
43
  | 'cash_app_pay'
44
44
  | 'wechat_pay'
45
45
  | 'alipay'
46
- | 'pix'
47
46
  | 'twint'
48
47
  | 'go_pay'
49
48
  | 'grab_pay'
50
49
  | 'pay_co'
51
50
  | 'after_pay'
52
51
  | 'swish'
53
- | 'payme';
52
+ | 'payme'
53
+ | 'pix'
54
+ | 'klarna'
55
+ | 'alipay_hk'
56
+ | 'paypay'
57
+ | 'gcash'
58
+ | 'south_korean_cards';
54
59
  success_url?: string;
55
60
  failure_url?: string;
56
61
  created_at: number;
@@ -138,14 +143,19 @@ declare module 'chargebee' {
138
143
  | 'cash_app_pay'
139
144
  | 'wechat_pay'
140
145
  | 'alipay'
141
- | 'pix'
142
146
  | 'twint'
143
147
  | 'go_pay'
144
148
  | 'grab_pay'
145
149
  | 'pay_co'
146
150
  | 'after_pay'
147
151
  | 'swish'
148
- | 'payme';
152
+ | 'payme'
153
+ | 'pix'
154
+ | 'klarna'
155
+ | 'alipay_hk'
156
+ | 'paypay'
157
+ | 'gcash'
158
+ | 'south_korean_cards';
149
159
  id_at_gateway?: string;
150
160
  error_code?: string;
151
161
  error_text?: string;
@@ -197,14 +207,19 @@ declare module 'chargebee' {
197
207
  | 'cash_app_pay'
198
208
  | 'wechat_pay'
199
209
  | 'alipay'
200
- | 'pix'
201
210
  | 'twint'
202
211
  | 'go_pay'
203
212
  | 'grab_pay'
204
213
  | 'pay_co'
205
214
  | 'after_pay'
206
215
  | 'swish'
207
- | 'payme';
216
+ | 'payme'
217
+ | 'pix'
218
+ | 'klarna'
219
+ | 'alipay_hk'
220
+ | 'paypay'
221
+ | 'gcash'
222
+ | 'south_korean_cards';
208
223
  id_at_gateway?: string;
209
224
  error_code?: string;
210
225
  error_text?: string;
@@ -257,14 +272,19 @@ declare module 'chargebee' {
257
272
  | 'cash_app_pay'
258
273
  | 'wechat_pay'
259
274
  | 'alipay'
260
- | 'pix'
261
275
  | 'twint'
262
276
  | 'go_pay'
263
277
  | 'grab_pay'
264
278
  | 'pay_co'
265
279
  | 'after_pay'
266
280
  | 'swish'
267
- | 'payme';
281
+ | 'payme'
282
+ | 'pix'
283
+ | 'klarna'
284
+ | 'alipay_hk'
285
+ | 'paypay'
286
+ | 'gcash'
287
+ | 'south_korean_cards';
268
288
  success_url?: string;
269
289
  failure_url?: string;
270
290
  }
@@ -305,14 +325,19 @@ declare module 'chargebee' {
305
325
  | 'cash_app_pay'
306
326
  | 'wechat_pay'
307
327
  | 'alipay'
308
- | 'pix'
309
328
  | 'twint'
310
329
  | 'go_pay'
311
330
  | 'grab_pay'
312
331
  | 'pay_co'
313
332
  | 'after_pay'
314
333
  | 'swish'
315
- | 'payme';
334
+ | 'payme'
335
+ | 'pix'
336
+ | 'klarna'
337
+ | 'alipay_hk'
338
+ | 'paypay'
339
+ | 'gcash'
340
+ | 'south_korean_cards';
316
341
  success_url?: string;
317
342
  failure_url?: string;
318
343
  }
@@ -467,14 +467,19 @@ declare module 'chargebee' {
467
467
  | 'cash_app_pay'
468
468
  | 'wechat_pay'
469
469
  | 'alipay'
470
- | 'pix'
471
470
  | 'twint'
472
471
  | 'go_pay'
473
472
  | 'grab_pay'
474
473
  | 'pay_co'
475
474
  | 'after_pay'
476
475
  | 'swish'
477
- | 'payme';
476
+ | 'payme'
477
+ | 'pix'
478
+ | 'klarna'
479
+ | 'alipay_hk'
480
+ | 'paypay'
481
+ | 'gcash'
482
+ | 'south_korean_cards';
478
483
  reference_id?: string;
479
484
  /**
480
485
  * @deprecated Please refer API docs to use other attributes
@@ -0,0 +1,37 @@
1
+ ///<reference path='./../core.d.ts'/>
2
+ ///<reference path='./../index.d.ts'/>
3
+
4
+ declare module 'chargebee' {
5
+ export interface PromotionalGrant {
6
+ subscription_id: string;
7
+ unit_id: string;
8
+ amount: string;
9
+ expires_at: number;
10
+ metadata?: string;
11
+ }
12
+
13
+ export namespace PromotionalGrant {
14
+ export class PromotionalGrantResource {
15
+ promotionalGrants(
16
+ input: PromotionalGrantsInputParam,
17
+ headers?: ChargebeeRequestHeader,
18
+ ): Promise<ChargebeeResponse<PromotionalGrantsResponse>>;
19
+ }
20
+
21
+ export interface PromotionalGrantsResponse {
22
+ ledger_operations: LedgerOperation[];
23
+ grant_blocks: GrantBlock[];
24
+ }
25
+
26
+ // REQUEST PARAMS
27
+ //---------------
28
+
29
+ export interface PromotionalGrantsInputParam {
30
+ subscription_id: string;
31
+ unit_id: string;
32
+ amount: string;
33
+ expires_at: number;
34
+ metadata?: any;
35
+ }
36
+ }
37
+ }
@@ -110,14 +110,19 @@ declare module 'chargebee' {
110
110
  | 'cash_app_pay'
111
111
  | 'wechat_pay'
112
112
  | 'alipay'
113
- | 'pix'
114
113
  | 'twint'
115
114
  | 'go_pay'
116
115
  | 'grab_pay'
117
116
  | 'pay_co'
118
117
  | 'after_pay'
119
118
  | 'swish'
120
- | 'payme';
119
+ | 'payme'
120
+ | 'pix'
121
+ | 'klarna'
122
+ | 'alipay_hk'
123
+ | 'paypay'
124
+ | 'gcash'
125
+ | 'south_korean_cards';
121
126
  reference_id?: string;
122
127
  /**
123
128
  * @deprecated Please refer API docs to use other attributes
@@ -1419,14 +1419,19 @@ declare module 'chargebee' {
1419
1419
  | 'cash_app_pay'
1420
1420
  | 'wechat_pay'
1421
1421
  | 'alipay'
1422
- | 'pix'
1423
1422
  | 'twint'
1424
1423
  | 'go_pay'
1425
1424
  | 'grab_pay'
1426
1425
  | 'pay_co'
1427
1426
  | 'after_pay'
1428
1427
  | 'swish'
1429
- | 'payme';
1428
+ | 'payme'
1429
+ | 'pix'
1430
+ | 'klarna'
1431
+ | 'alipay_hk'
1432
+ | 'paypay'
1433
+ | 'gcash'
1434
+ | 'south_korean_cards';
1430
1435
  reference_id?: string;
1431
1436
  /**
1432
1437
  * @deprecated Please refer API docs to use other attributes
@@ -1566,14 +1571,19 @@ declare module 'chargebee' {
1566
1571
  | 'cash_app_pay'
1567
1572
  | 'wechat_pay'
1568
1573
  | 'alipay'
1569
- | 'pix'
1570
1574
  | 'twint'
1571
1575
  | 'go_pay'
1572
1576
  | 'grab_pay'
1573
1577
  | 'pay_co'
1574
1578
  | 'after_pay'
1575
1579
  | 'swish'
1576
- | 'payme';
1580
+ | 'payme'
1581
+ | 'pix'
1582
+ | 'klarna'
1583
+ | 'alipay_hk'
1584
+ | 'paypay'
1585
+ | 'gcash'
1586
+ | 'south_korean_cards';
1577
1587
  reference_id?: string;
1578
1588
  /**
1579
1589
  * @deprecated Please refer API docs to use other attributes
@@ -1680,14 +1690,19 @@ declare module 'chargebee' {
1680
1690
  | 'cash_app_pay'
1681
1691
  | 'wechat_pay'
1682
1692
  | 'alipay'
1683
- | 'pix'
1684
1693
  | 'twint'
1685
1694
  | 'go_pay'
1686
1695
  | 'grab_pay'
1687
1696
  | 'pay_co'
1688
1697
  | 'after_pay'
1689
1698
  | 'swish'
1690
- | 'payme';
1699
+ | 'payme'
1700
+ | 'pix'
1701
+ | 'klarna'
1702
+ | 'alipay_hk'
1703
+ | 'paypay'
1704
+ | 'gcash'
1705
+ | 'south_korean_cards';
1691
1706
  reference_id?: string;
1692
1707
  /**
1693
1708
  * @deprecated Please refer API docs to use other attributes
@@ -1849,14 +1864,19 @@ declare module 'chargebee' {
1849
1864
  | 'cash_app_pay'
1850
1865
  | 'wechat_pay'
1851
1866
  | 'alipay'
1852
- | 'pix'
1853
1867
  | 'twint'
1854
1868
  | 'go_pay'
1855
1869
  | 'grab_pay'
1856
1870
  | 'pay_co'
1857
1871
  | 'after_pay'
1858
1872
  | 'swish'
1859
- | 'payme';
1873
+ | 'payme'
1874
+ | 'pix'
1875
+ | 'klarna'
1876
+ | 'alipay_hk'
1877
+ | 'paypay'
1878
+ | 'gcash'
1879
+ | 'south_korean_cards';
1860
1880
  reference_id?: string;
1861
1881
  /**
1862
1882
  * @deprecated Please refer API docs to use other attributes
@@ -2032,14 +2052,19 @@ declare module 'chargebee' {
2032
2052
  | 'cash_app_pay'
2033
2053
  | 'wechat_pay'
2034
2054
  | 'alipay'
2035
- | 'pix'
2036
2055
  | 'twint'
2037
2056
  | 'go_pay'
2038
2057
  | 'grab_pay'
2039
2058
  | 'pay_co'
2040
2059
  | 'after_pay'
2041
2060
  | 'swish'
2042
- | 'payme';
2061
+ | 'payme'
2062
+ | 'pix'
2063
+ | 'klarna'
2064
+ | 'alipay_hk'
2065
+ | 'paypay'
2066
+ | 'gcash'
2067
+ | 'south_korean_cards';
2043
2068
  reference_id?: string;
2044
2069
  /**
2045
2070
  * @deprecated Please refer API docs to use other attributes
@@ -2171,14 +2196,19 @@ declare module 'chargebee' {
2171
2196
  | 'cash_app_pay'
2172
2197
  | 'wechat_pay'
2173
2198
  | 'alipay'
2174
- | 'pix'
2175
2199
  | 'twint'
2176
2200
  | 'go_pay'
2177
2201
  | 'grab_pay'
2178
2202
  | 'pay_co'
2179
2203
  | 'after_pay'
2180
2204
  | 'swish'
2181
- | 'payme';
2205
+ | 'payme'
2206
+ | 'pix'
2207
+ | 'klarna'
2208
+ | 'alipay_hk'
2209
+ | 'paypay'
2210
+ | 'gcash'
2211
+ | 'south_korean_cards';
2182
2212
  reference_id?: string;
2183
2213
  /**
2184
2214
  * @deprecated Please refer API docs to use other attributes
@@ -2616,14 +2646,19 @@ declare module 'chargebee' {
2616
2646
  | 'cash_app_pay'
2617
2647
  | 'wechat_pay'
2618
2648
  | 'alipay'
2619
- | 'pix'
2620
2649
  | 'twint'
2621
2650
  | 'go_pay'
2622
2651
  | 'grab_pay'
2623
2652
  | 'pay_co'
2624
2653
  | 'after_pay'
2625
2654
  | 'swish'
2626
- | 'payme';
2655
+ | 'payme'
2656
+ | 'pix'
2657
+ | 'klarna'
2658
+ | 'alipay_hk'
2659
+ | 'paypay'
2660
+ | 'gcash'
2661
+ | 'south_korean_cards';
2627
2662
  reference_id?: string;
2628
2663
  /**
2629
2664
  * @deprecated Please refer API docs to use other attributes