chargebee 2.26.0 → 2.26.1

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 (64) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/lib/chargebee.js +1 -1
  3. package/package.json +1 -1
  4. package/types/core.d.ts +1 -0
  5. package/types/resources/Address.d.ts +245 -5
  6. package/types/resources/AdvanceInvoiceSchedule.d.ts +78 -2
  7. package/types/resources/AttachedItem.d.ts +305 -13
  8. package/types/resources/Card.d.ts +485 -13
  9. package/types/resources/Comment.d.ts +177 -11
  10. package/types/resources/Contact.d.ts +54 -0
  11. package/types/resources/ContractTerm.d.ts +83 -0
  12. package/types/resources/Coupon.d.ts +665 -20
  13. package/types/resources/CouponCode.d.ts +56 -5
  14. package/types/resources/CouponSet.d.ts +224 -17
  15. package/types/resources/CreditNote.d.ts +1202 -44
  16. package/types/resources/CreditNoteEstimate.d.ts +75 -6
  17. package/types/resources/Customer.d.ts +2132 -73
  18. package/types/resources/DifferentialPrice.d.ts +266 -15
  19. package/types/resources/Discount.d.ts +107 -0
  20. package/types/resources/Download.d.ts +18 -0
  21. package/types/resources/EntitlementOverride.d.ts +101 -7
  22. package/types/resources/Estimate.d.ts +1181 -27
  23. package/types/resources/Event.d.ts +145 -8
  24. package/types/resources/Export.d.ts +703 -32
  25. package/types/resources/Feature.d.ts +356 -22
  26. package/types/resources/Gift.d.ts +351 -24
  27. package/types/resources/Hierarchy.d.ts +30 -0
  28. package/types/resources/HostedPage.d.ts +1212 -37
  29. package/types/resources/ImpactedItem.d.ts +41 -1
  30. package/types/resources/ImpactedSubscription.d.ts +36 -1
  31. package/types/resources/InAppSubscription.d.ts +636 -9
  32. package/types/resources/Invoice.d.ts +2293 -93
  33. package/types/resources/InvoiceEstimate.d.ts +75 -6
  34. package/types/resources/Item.d.ts +542 -16
  35. package/types/resources/ItemEntitlement.d.ts +172 -13
  36. package/types/resources/ItemFamily.d.ts +173 -15
  37. package/types/resources/ItemPrice.d.ts +971 -26
  38. package/types/resources/Media.d.ts +24 -0
  39. package/types/resources/NonSubscription.d.ts +51 -3
  40. package/types/resources/Order.d.ts +1224 -32
  41. package/types/resources/PaymentIntent.d.ts +318 -8
  42. package/types/resources/PaymentReferenceNumber.d.ts +24 -0
  43. package/types/resources/PaymentSource.d.ts +1259 -55
  44. package/types/resources/PaymentVoucher.d.ts +262 -14
  45. package/types/resources/PortalSession.d.ts +187 -10
  46. package/types/resources/PromotionalCredit.d.ts +351 -16
  47. package/types/resources/Purchase.d.ts +274 -5
  48. package/types/resources/Quote.d.ts +1595 -62
  49. package/types/resources/QuoteLineGroup.d.ts +134 -5
  50. package/types/resources/QuotedCharge.d.ts +63 -5
  51. package/types/resources/QuotedSubscription.d.ts +192 -5
  52. package/types/resources/ResourceMigration.d.ts +73 -3
  53. package/types/resources/SiteMigrationDetail.d.ts +98 -5
  54. package/types/resources/Subscription.d.ts +3462 -137
  55. package/types/resources/SubscriptionEntitlement.d.ts +116 -8
  56. package/types/resources/SubscriptionEstimate.d.ts +36 -2
  57. package/types/resources/TaxWithheld.d.ts +32 -0
  58. package/types/resources/ThirdPartyPaymentMethod.d.ts +24 -0
  59. package/types/resources/TimeMachine.d.ts +99 -7
  60. package/types/resources/Token.d.ts +179 -7
  61. package/types/resources/Transaction.d.ts +597 -25
  62. package/types/resources/UnbilledCharge.d.ts +355 -14
  63. package/types/resources/Usage.d.ts +259 -13
  64. package/types/resources/VirtualBankAccount.d.ts +255 -17
@@ -1,68 +1,378 @@
1
1
  ///<reference path='./../core.d.ts'/>
2
2
  declare module 'chargebee' {
3
3
  export interface PaymentIntent {
4
+
5
+ /**
6
+ * @description Identifier for PaymentIntent.
7
+
8
+ */
9
+
4
10
  id:string;
11
+
12
+ /**
13
+ * @description Current status of PaymentIntent. \* in_progress - Status will be in_progress if the Active Payment Attempt state is in requires_identification, requires_challenge or requires_redirection. \* authorized - 3DS verification successfully completed. \* consumed - If any Chargebee operation such as create subscription etc. is completed using the intent, it will be in consumed state. Intent cannot be used if it&#x27;s already in consumed state. \* expired - Intent has expired, since it was not consumed before the predefined time-out. \* inited - Intent is initialized.
14
+
15
+ */
16
+
5
17
  status:'consumed' | 'in_progress' | 'inited' | 'expired' | 'authorized';
18
+
19
+ /**
20
+ * @description The currency code (ISO 4217 format) of the amount used in transaction.
21
+
22
+ */
23
+
6
24
  currency_code?:string;
25
+
26
+ /**
27
+ * @description Amount(in cents) to be authorized for 3DS flow.
28
+
29
+ */
30
+
7
31
  amount:number;
32
+
33
+ /**
34
+ * @description The gateway account used for performing the 3DS flow.
35
+
36
+ */
37
+
8
38
  gateway_account_id:string;
39
+
40
+ /**
41
+ * @description Timestamp indicating when the PaymentIntent will expire if left unconsumed.
42
+
43
+ */
44
+
9
45
  expires_at:number;
46
+
47
+ /**
48
+ * @description Reference for payment method at gateway. Only applicable when the PaymentIntent is created for cards stored in the gateway.
49
+
50
+ */
51
+
10
52
  reference_id?:string;
53
+
54
+ /**
55
+ * @description The payment method of this intent \* google_pay - google_pay \* apple_pay - apple_pay \* ideal - ideal \* bancontact - bancontact \* netbanking_emandates - netbanking_emandates \* dotpay - dotpay \* giropay - giropay \* sofort - sofort \* direct_debit - direct_debit \* paypal_express_checkout - paypal_express_checkout \* boleto - boleto \* card - card \* upi - upi
56
+
57
+ */
58
+
11
59
  payment_method_type?:'giropay' | 'ideal' | 'google_pay' | 'netbanking_emandates' | 'dotpay' | 'boleto' | 'direct_debit' | 'sofort' | 'upi' | 'apple_pay' | 'bancontact' | 'paypal_express_checkout' | 'card';
60
+
61
+ /**
62
+ * @description The URL the customer will be directed to once 3DS verification is successful. Applicable only when &#x60;payment_method_type&#x60; is &#x60;ideal&#x60;, &#x60;sofort&#x60;, &#x60;dotpay&#x60; or &#x60;giropay&#x60;.
63
+
64
+ */
65
+
12
66
  success_url?:string;
67
+
68
+ /**
69
+ * @description The URL the customer will be directed to when 3DS verification fails. Applicable only when &#x60;payment_method_type&#x60; is &#x60;ideal&#x60;, &#x60;sofort&#x60;, &#x60;dotpay&#x60; or &#x60;giropay&#x60;.
70
+
71
+ */
72
+
13
73
  failure_url?:string;
74
+
75
+ /**
76
+ * @description Timestamp indicating when the PaymentIntent was created.
77
+
78
+ */
79
+
14
80
  created_at:number;
81
+
82
+ /**
83
+ * @description Timestamp indicating when the PaymentIntent was last modified.
84
+
85
+ */
86
+
15
87
  modified_at:number;
88
+
89
+ /**
90
+ * @description Version number of this resource. The &#x60;resource_version&#x60; is updated with a new timestamp in milliseconds for every change made to the resource. This attribute will be present only if the resource has been updated after 2016-09-28.
91
+
92
+ */
93
+
16
94
  resource_version?:number;
95
+
96
+ /**
97
+ * @description Timestamp indicating when this payment intent was last updated.
98
+
99
+ */
100
+
17
101
  updated_at?:number;
102
+
103
+ /**
104
+ * @description The unique ID of the customer for which this payment_intent should be created. If not provided, a new customer is created and its ID is autogenerated.
105
+ **See also**
106
+
107
+ [Customer resource lookup and creation](/docs/api/payment_intents#customer_lookup)
108
+
109
+ */
110
+
18
111
  customer_id:string;
112
+
113
+ /**
114
+ * @description Gateway associated with the PaymentIntent.
115
+
116
+ */
117
+
19
118
  gateway?:string;
119
+
120
+ /**
121
+ * @description The unique ID of the [business entity](/docs/api/advanced-features?prod_cat_ver&#x3D;2#mbe) of this &#x60;payment_intent&#x60;
122
+
123
+ */
124
+
20
125
  business_entity_id?:string;
126
+
127
+ /**
128
+ * @description Active payment attempt for the PaymentIntent.
129
+
130
+ */
131
+
21
132
  active_payment_attempt?:PaymentIntent.PaymentAttempt;
22
133
  }
23
134
  export namespace PaymentIntent {
24
- export class PaymentIntentResource {
135
+ export class PaymentIntentResource {
136
+ /**
137
+ * @description Retrieves the PaymentIntent resource.
138
+
139
+ */
140
+
25
141
  retrieve(payment_intent_id:string):ChargebeeRequest<RetrieveResponse>;
142
+
143
+ /**
144
+ * @description Updating properties on a PaymentIntent object. All the subsequent 3DS transaction attempts will have the updated values.
145
+
146
+ */
147
+
26
148
  update(payment_intent_id:string, input?:UpdateInputParam):ChargebeeRequest<UpdateResponse>;
149
+
150
+ /**
151
+ * @description Creates a PaymentIntent object. This is to be used with Chargebee.js API to complete the 3DS flow for new or stored cards.
152
+
153
+ While creating, specify the appropriate gateway account and amount. Exact amount can be estimated using our [Estimate API](/docs/api/estimates).
154
+
155
+ #### Customer resource lookup and creation {#customer_lookup}
156
+
157
+ When [customer[id]](/docs/api/payment_intents#create_a_payment_intent_customer_id) is provided for this operation, it is looked up by Chargebee, and if found, the payment_intent is created for it. If not found, a new customer resource is created with the ID provided, and the payment_intent is created.
158
+
159
+ ##### Multiple business entities
160
+
161
+ If multiple [business entities](/docs/api/advanced-features#mbe) are created for the site, the customer resource lookup and creation happen within the [context](/docs/api/advanced-features#mbe-context) of the business entity [specified](/docs/api/advanced-features#mbe-header-main) in this API call. If no business entity is specified, the customer resource lookup is performed within the [site context](/docs/api/advanced-features#mbe-context), and if not found, the resource is created for the [default business entity](/docs/api/advanced-features#mbe-default-be) of the site.
162
+
163
+ */
164
+
27
165
  create(input:CreateInputParam):ChargebeeRequest<CreateResponse>;
28
166
  }
29
- export interface RetrieveResponse {
30
- payment_intent:PaymentIntent;
167
+ export interface RetrieveResponse {
168
+ /**
169
+ * @description Retrieves the PaymentIntent resource.
170
+
171
+ */
172
+
173
+ payment_intent:PaymentIntent;
31
174
  }
32
175
 
33
- export interface UpdateResponse {
34
- payment_intent:PaymentIntent;
176
+ export interface UpdateResponse {
177
+ /**
178
+ * @description Updating properties on a PaymentIntent object. All the subsequent 3DS transaction attempts will have the updated values.
179
+
180
+ */
181
+
182
+ payment_intent:PaymentIntent;
35
183
  }
36
184
  export interface UpdateInputParam {
185
+
186
+ /**
187
+ * @description Amount(in cents) to be authorized for 3DS flow.
188
+
189
+ */
190
+
37
191
  amount?:number;
192
+
193
+ /**
194
+ * @description The currency code (ISO 4217 format) of the amount used in transaction.
195
+
196
+ */
197
+
38
198
  currency_code?:string;
199
+
200
+ /**
201
+ * @description The gateway account used for performing the 3DS flow.
202
+
203
+ */
204
+
39
205
  gateway_account_id?:string;
206
+
207
+ /**
208
+ * @description The payment method of this intent. \* google_pay - google_pay \* apple_pay - apple_pay \* ideal - ideal \* bancontact - bancontact \* netbanking_emandates - netbanking_emandates \* direct_debit - direct_debit \* card - card \* dotpay - dotpay \* giropay - giropay \* upi - upi \* sofort - sofort \* paypal_express_checkout - paypal_express_checkout
209
+
210
+ */
211
+
40
212
  payment_method_type?:'giropay' | 'ideal' | 'google_pay' | 'netbanking_emandates' | 'dotpay' | 'boleto' | 'direct_debit' | 'sofort' | 'upi' | 'apple_pay' | 'bancontact' | 'paypal_express_checkout' | 'card';
213
+
214
+ /**
215
+ * @description The URL the customer will be directed to once 3DS verification is successful. Applicable only when &#x60;payment_method_type&#x60; is &#x60;ideal&#x60;, &#x60;sofort&#x60;, &#x60;dotpay&#x60; or &#x60;giropay&#x60;.
216
+
217
+ */
218
+
41
219
  success_url?:string;
220
+
221
+ /**
222
+ * @description The URL the customer will be directed to when 3DS verification fails. Applicable only when &#x60;payment_method_type&#x60; is &#x60;ideal&#x60;, &#x60;sofort&#x60;, &#x60;dotpay&#x60; or &#x60;giropay&#x60;.
223
+
224
+ */
225
+
42
226
  failure_url?:string;
43
227
  }
44
- export interface CreateResponse {
45
- payment_intent:PaymentIntent;
228
+ export interface CreateResponse {
229
+ /**
230
+ * @description Creates a PaymentIntent object. This is to be used with Chargebee.js API to complete the 3DS flow for new or stored cards.
231
+
232
+ While creating, specify the appropriate gateway account and amount. Exact amount can be estimated using our [Estimate API](/docs/api/estimates).
233
+
234
+ #### Customer resource lookup and creation {#customer_lookup}
235
+
236
+ When [customer[id]](/docs/api/payment_intents#create_a_payment_intent_customer_id) is provided for this operation, it is looked up by Chargebee, and if found, the payment_intent is created for it. If not found, a new customer resource is created with the ID provided, and the payment_intent is created.
237
+
238
+ ##### Multiple business entities
239
+
240
+ If multiple [business entities](/docs/api/advanced-features#mbe) are created for the site, the customer resource lookup and creation happen within the [context](/docs/api/advanced-features#mbe-context) of the business entity [specified](/docs/api/advanced-features#mbe-header-main) in this API call. If no business entity is specified, the customer resource lookup is performed within the [site context](/docs/api/advanced-features#mbe-context), and if not found, the resource is created for the [default business entity](/docs/api/advanced-features#mbe-default-be) of the site.
241
+
242
+ */
243
+
244
+ payment_intent:PaymentIntent;
46
245
  }
47
246
  export interface CreateInputParam {
247
+
248
+ /**
249
+ * @description Sets the [context]() for this operation to the [business entity](/docs/api/advanced-features?prod_cat_ver&#x3D;2#mbe) specified. Applicable only when multiple business entities have been created for the site. When this parameter is provided, the operation is able to read/write data associated only to the business entity specified. When not provided, the operation can read/write data for the entire site.
250
+ **Note**
251
+
252
+ An alternative way of passing this parameter is by means of a [custom HTTP header](/docs/api/advanced-features?prod_cat_ver&#x3D;2#mbe-header-main).
253
+ **See also**
254
+
255
+ [Customer resource lookup and creation.](/docs/api/payment_intents#customer_lookup)
256
+
257
+ */
258
+
48
259
  business_entity_id?:string;
260
+
261
+ /**
262
+ * @description The unique ID of the customer for which this &#x60;payment_intent&#x60; should be created. If not provided, a new customer is created and its ID is autogenerated.
263
+ **See also**
264
+
265
+ [Customer resource lookup and creation](/docs/api/payment_intents#customer_lookup)
266
+ .
267
+
268
+ */
269
+
49
270
  customer_id?:string;
271
+
272
+ /**
273
+ * @description Amount(in cents) to be authorized for 3DS flow.
274
+
275
+ */
276
+
50
277
  amount:number;
278
+
279
+ /**
280
+ * @description The currency code (ISO 4217 format) of the amount used in transaction.
281
+
282
+ */
283
+
51
284
  currency_code:string;
285
+
286
+ /**
287
+ * @description The gateway account used for performing the 3DS flow.
288
+
289
+ */
290
+
52
291
  gateway_account_id?:string;
292
+
293
+ /**
294
+ * @description Reference for payment method at gateway. Only applicable when the PaymentIntent is created for cards stored in the gateway.
295
+
296
+ */
297
+
53
298
  reference_id?:string;
299
+
300
+ /**
301
+ * @description The payment method of this intent. \* google_pay - google_pay \* boleto - boleto \* apple_pay - apple_pay \* ideal - ideal \* bancontact - bancontact \* netbanking_emandates - netbanking_emandates \* direct_debit - direct_debit \* card - card \* dotpay - dotpay \* giropay - giropay \* upi - upi \* sofort - sofort \* paypal_express_checkout - paypal_express_checkout
302
+
303
+ */
304
+
54
305
  payment_method_type?:'giropay' | 'ideal' | 'google_pay' | 'netbanking_emandates' | 'dotpay' | 'boleto' | 'direct_debit' | 'sofort' | 'upi' | 'apple_pay' | 'bancontact' | 'paypal_express_checkout' | 'card';
306
+
307
+ /**
308
+ * @description The URL the customer will be directed to once 3DS verification is successful. Applicable only when &#x60;payment_method_type&#x60; is &#x60;ideal&#x60;, &#x60;sofort&#x60;, &#x60;dotpay&#x60; or &#x60;giropay&#x60;.
309
+
310
+ */
311
+
55
312
  success_url?:string;
313
+
314
+ /**
315
+ * @description The URL the customer will be directed to when 3DS verification fails. Applicable only when &#x60;payment_method_type&#x60; is &#x60;ideal&#x60;, &#x60;sofort&#x60;, &#x60;dotpay&#x60; or &#x60;giropay&#x60;.
316
+
317
+ */
318
+
56
319
  failure_url?:string;
57
320
  }
58
- export interface PaymentAttempt {
321
+ export interface PaymentAttempt {
322
+ /**
323
+ * @description Identifier for PaymentIntent&#x27;s active payment attempt.
324
+
325
+ */
326
+
59
327
  id?:string;
328
+
329
+ /**
330
+ * @description Current status of active payment attempt \* authorized - 3DS verification successfully completed. \* requires_challenge - The transaction has to go through 3DS Challenge flow and the customer needs to authenticate via 3DS 2.0 \* pending_authorization - Waiting for the authorization. \* requires_redirection - The transaction has to go through 3DS Redirection flow and the customer needs to authenticate via 3DS 1.0 \* inited - Payment attempt is initialized. \* refused - 3DS verification attempt failed. \* requires_identification - Customer&#x27;s device fingerprint is used to verify their identity. It needs to be sent to the Issuing Bank for verification.
331
+
332
+ */
333
+
60
334
  status?:'pending_authorization' | 'inited' | 'refused' | 'requires_challenge' | 'authorized' | 'requires_identification' | 'requires_redirection';
335
+
336
+ /**
337
+ * @description The payment method of this attempt \* ideal - ideal \* sofort - sofort \* paypal_express_checkout - paypal_express_checkout \* giropay - giropay \* bancontact - bancontact \* google_pay - google_pay \* card - card \* upi - upi \* direct_debit - direct_debit \* dotpay - dotpay \* apple_pay - apple_pay \* boleto - boleto \* netbanking_emandates - netbanking_emandates
338
+
339
+ */
340
+
61
341
  payment_method_type?:'giropay' | 'ideal' | 'google_pay' | 'netbanking_emandates' | 'dotpay' | 'boleto' | 'direct_debit' | 'sofort' | 'upi' | 'apple_pay' | 'bancontact' | 'paypal_express_checkout' | 'card';
342
+
343
+ /**
344
+ * @description Reference of PaymentIntent at gateway
345
+
346
+ */
347
+
62
348
  id_at_gateway?:string;
349
+
350
+ /**
351
+ * @description Error code received from the payment gateway on failure.
352
+
353
+ */
354
+
63
355
  error_code?:string;
356
+
357
+ /**
358
+ * @description Error message received from the payment gateway on failure.
359
+
360
+ */
361
+
64
362
  error_text?:string;
363
+
364
+ /**
365
+ * @description Timestamp indicating when the active payment attempt was created.
366
+
367
+ */
368
+
65
369
  created_at?:number;
370
+
371
+ /**
372
+ * @description Timestamp indicating when the active payment attempt was last modified.
373
+
374
+ */
375
+
66
376
  modified_at?:number;
67
377
  }
68
378
  }
@@ -1,9 +1,33 @@
1
1
  ///<reference path='./../core.d.ts'/>
2
2
  declare module 'chargebee' {
3
3
  export interface PaymentReferenceNumber {
4
+
5
+ /**
6
+ * @description The &#x60;id&#x60; of the &#x60;payment_reference_number&#x60; resource is a unique identifier assigned to the PRN to track and reference in systems.
7
+
8
+ */
9
+
4
10
  id:string;
11
+
12
+ /**
13
+ * @description This attribute helps &#x60;type&#x60; field in the API, specifies how to reconcile offline payments, and generate &#x60;payment_reference_number&#x60; on invoices based on country-specific rules. Setting the &#x60;type&#x60; field generates &#x60;payment_reference_number&#x60; for the respective country and includes them on the invoice for correct reconciliation. \* frn - The reference number printed on invoices in Finland is utilized by buyers for payment via bank transfer, facilitating the association of payments with invoices. \* fik - Denmark based number calculated using recursive MOD 10 algorithm. \* kid - The KID number (kundeidentifikasjon) in Norway is an abbreviation for &quot;Customer identification&quot;. It is used to associate payments with the customer and invoice. \* ocr - A OCR-based payment, contains an OCR reference, which is used to identify the vendor and the purchase document in connection with a payment. Swedish reference number can contain customer ID and/or invoice number to identify customer and invoice.
14
+
15
+ */
16
+
5
17
  type:'frn' | 'kid' | 'fik' | 'ocr';
18
+
19
+ /**
20
+ * @description A number is generated based on the configuration type of the PRN during the invoice creation process.
21
+
22
+ */
23
+
6
24
  number:string;
25
+
26
+ /**
27
+ * @description The &#x60;invoice_id&#x60; of the payment reference number (PRN) resource is the unique identifier assigned to the invoice that the PRN is associated with.
28
+
29
+ */
30
+
7
31
  invoice_id?:string;
8
32
  }
9
33
  }