chargebee 2.24.0 → 2.25.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 (65) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/lib/chargebee.js +1 -1
  3. package/package.json +2 -1
  4. package/types/core.d.ts +80 -0
  5. package/types/index.d.ts +92 -0
  6. package/types/resources/Address.d.ts +58 -0
  7. package/types/resources/AdvanceInvoiceSchedule.d.ts +26 -0
  8. package/types/resources/AttachedItem.d.ts +84 -0
  9. package/types/resources/Card.d.ts +88 -0
  10. package/types/resources/Comment.d.ts +52 -0
  11. package/types/resources/Contact.d.ts +15 -0
  12. package/types/resources/ContractTerm.d.ts +18 -0
  13. package/types/resources/Coupon.d.ts +150 -0
  14. package/types/resources/CouponCode.d.ts +25 -0
  15. package/types/resources/CouponSet.d.ts +75 -0
  16. package/types/resources/CreditNote.d.ts +337 -0
  17. package/types/resources/CreditNoteEstimate.d.ts +96 -0
  18. package/types/resources/Customer.d.ts +440 -0
  19. package/types/resources/DifferentialPrice.d.ts +88 -0
  20. package/types/resources/Discount.d.ts +23 -0
  21. package/types/resources/Download.d.ts +9 -0
  22. package/types/resources/EntitlementOverride.d.ts +37 -0
  23. package/types/resources/Estimate.d.ts +214 -0
  24. package/types/resources/Event.d.ts +42 -0
  25. package/types/resources/Export.d.ts +182 -0
  26. package/types/resources/Feature.d.ts +90 -0
  27. package/types/resources/Gift.d.ts +97 -0
  28. package/types/resources/Hierarchy.d.ts +11 -0
  29. package/types/resources/HostedPage.d.ts +242 -0
  30. package/types/resources/ImpactedItem.d.ts +17 -0
  31. package/types/resources/ImpactedSubscription.d.ts +17 -0
  32. package/types/resources/InAppSubscription.d.ts +52 -0
  33. package/types/resources/Invoice.d.ts +590 -0
  34. package/types/resources/InvoiceEstimate.d.ts +96 -0
  35. package/types/resources/Item.d.ts +118 -0
  36. package/types/resources/ItemEntitlement.d.ts +55 -0
  37. package/types/resources/ItemFamily.d.ts +59 -0
  38. package/types/resources/ItemPrice.d.ts +195 -0
  39. package/types/resources/Media.d.ts +10 -0
  40. package/types/resources/NonSubscription.d.ts +23 -0
  41. package/types/resources/Order.d.ts +305 -0
  42. package/types/resources/PaymentIntent.d.ts +71 -0
  43. package/types/resources/PaymentReferenceNumber.d.ts +10 -0
  44. package/types/resources/PaymentSource.d.ts +264 -0
  45. package/types/resources/PaymentVoucher.d.ts +74 -0
  46. package/types/resources/PortalSession.d.ts +57 -0
  47. package/types/resources/PromotionalCredit.d.ts +86 -0
  48. package/types/resources/Purchase.d.ts +46 -0
  49. package/types/resources/Quote.d.ts +388 -0
  50. package/types/resources/QuoteLineGroup.d.ts +83 -0
  51. package/types/resources/QuotedCharge.d.ts +57 -0
  52. package/types/resources/QuotedSubscription.d.ts +82 -0
  53. package/types/resources/ResourceMigration.d.ts +27 -0
  54. package/types/resources/SiteMigrationDetail.d.ts +31 -0
  55. package/types/resources/Subscription.d.ts +619 -0
  56. package/types/resources/SubscriptionEntitlement.d.ts +41 -0
  57. package/types/resources/SubscriptionEstimate.d.ts +49 -0
  58. package/types/resources/TaxWithheld.d.ts +13 -0
  59. package/types/resources/ThirdPartyPaymentMethod.d.ts +10 -0
  60. package/types/resources/TimeMachine.d.ts +38 -0
  61. package/types/resources/Token.d.ts +50 -0
  62. package/types/resources/Transaction.d.ts +170 -0
  63. package/types/resources/UnbilledCharge.d.ts +91 -0
  64. package/types/resources/Usage.d.ts +76 -0
  65. package/types/resources/VirtualBankAccount.d.ts +75 -0
@@ -0,0 +1,440 @@
1
+ declare module 'chargebee' {
2
+ export interface Customer {
3
+ [key : string] : any;
4
+ id:string;
5
+ first_name?:string;
6
+ last_name?:string;
7
+ email?:string;
8
+ phone?:string;
9
+ company?:string;
10
+ vat_number?:string;
11
+ auto_collection:AutoCollection;
12
+ offline_payment_method?:OfflinePaymentMethod;
13
+ net_term_days:number;
14
+ vat_number_validated_time?:number;
15
+ vat_number_status?:'valid' | 'undetermined' | 'invalid' | 'not_validated';
16
+ allow_direct_debit:boolean;
17
+ is_location_valid?:boolean;
18
+ created_at:number;
19
+ created_from_ip?:string;
20
+ exemption_details?:any[];
21
+ taxability?:Taxability;
22
+ entity_code?:EntityCode;
23
+ exempt_number?:string;
24
+ resource_version?:number;
25
+ updated_at?:number;
26
+ locale?:string;
27
+ billing_date?:number;
28
+ billing_month?:number;
29
+ billing_date_mode?:BillingDateMode;
30
+ billing_day_of_week?:'sunday' | 'saturday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'monday';
31
+ billing_day_of_week_mode?:BillingDayOfWeekMode;
32
+ pii_cleared?:'active' | 'scheduled_for_clear' | 'cleared';
33
+ auto_close_invoices?:boolean;
34
+ channel?:Channel;
35
+ fraud_flag?:'safe' | 'suspicious' | 'fraudulent';
36
+ primary_payment_source_id?:string;
37
+ backup_payment_source_id?:string;
38
+ invoice_notes?:string;
39
+ business_entity_id?:string;
40
+ preferred_currency_code?:string;
41
+ promotional_credits:number;
42
+ unbilled_charges:number;
43
+ refundable_credits:number;
44
+ excess_payments:number;
45
+ is_einvoice_enabled?:boolean;
46
+ einvoicing_method?:EinvoicingMethod;
47
+ deleted:boolean;
48
+ registered_for_gst?:boolean;
49
+ consolidated_invoicing?:boolean;
50
+ customer_type?:CustomerType;
51
+ business_customer_without_vat_number?:boolean;
52
+ client_profile_id?:string;
53
+ use_default_hierarchy_settings?:boolean;
54
+ vat_number_prefix?:string;
55
+ entity_identifier_scheme?:string;
56
+ entity_identifier_standard?:string;
57
+ billing_address?:Customer.BillingAddress;
58
+ referral_urls?:Customer.ReferralUrl[];
59
+ contacts?:Customer.Contact[];
60
+ payment_method?:Customer.PaymentMethod;
61
+ balances?:Customer.CustomerBalance[];
62
+ entity_identifiers?:Customer.EntityIdentifier[];
63
+ relationship?:Customer.Relationship;
64
+ parent_account_access?:Customer.ParentAccountAccess;
65
+ child_account_access?:Customer.ChildAccountAccess;
66
+ }
67
+ export namespace Customer {
68
+ export class CustomerResource {
69
+ delete(customer_id:string, input?:DeleteInputParam):ChargebeeRequest<DeleteResponse>;
70
+ relationships(customer_id:string, input?:RelationshipsInputParam):ChargebeeRequest<RelationshipsResponse>;
71
+ delete_relationship(customer_id:string):ChargebeeRequest<DeleteRelationshipResponse>;
72
+ delete_contact(customer_id:string, input?:DeleteContactInputParam):ChargebeeRequest<DeleteContactResponse>;
73
+ assign_payment_role(customer_id:string, input:AssignPaymentRoleInputParam):ChargebeeRequest<AssignPaymentRoleResponse>;
74
+ move(input:MoveInputParam):ChargebeeRequest<MoveResponse>;
75
+ hierarchy(customer_id:string, input:HierarchyInputParam):ChargebeeRequest<HierarchyResponse>;
76
+ update_payment_method(customer_id:string, input?:UpdatePaymentMethodInputParam):ChargebeeRequest<UpdatePaymentMethodResponse>;
77
+ retrieve(customer_id:string):ChargebeeRequest<RetrieveResponse>;
78
+ update(customer_id:string, input?:UpdateInputParam):ChargebeeRequest<UpdateResponse>;
79
+ change_billing_date(customer_id:string, input?:ChangeBillingDateInputParam):ChargebeeRequest<ChangeBillingDateResponse>;
80
+ list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
81
+ create(input?:CreateInputParam):ChargebeeRequest<CreateResponse>;
82
+ add_contact(customer_id:string, input?:AddContactInputParam):ChargebeeRequest<AddContactResponse>;
83
+ contacts_for_customer(customer_id:string, input?:ContactsForCustomerInputParam):ChargebeeRequest<ContactsForCustomerResponse>;
84
+ clear_personal_data(customer_id:string):ChargebeeRequest<ClearPersonalDataResponse>;
85
+ merge(input:MergeInputParam):ChargebeeRequest<MergeResponse>;
86
+ collect_payment(customer_id:string, input?:CollectPaymentInputParam):ChargebeeRequest<CollectPaymentResponse>;
87
+ record_excess_payment(customer_id:string, input?:RecordExcessPaymentInputParam):ChargebeeRequest<RecordExcessPaymentResponse>;
88
+ update_contact(customer_id:string, input?:UpdateContactInputParam):ChargebeeRequest<UpdateContactResponse>;
89
+ update_hierarchy_settings(customer_id:string, input?:UpdateHierarchySettingsInputParam):ChargebeeRequest<UpdateHierarchySettingsResponse>;
90
+ update_billing_info(customer_id:string, input?:UpdateBillingInfoInputParam):ChargebeeRequest<UpdateBillingInfoResponse>;
91
+ }
92
+ export interface DeleteResponse {
93
+ customer:Customer;
94
+ card?:Card;
95
+ }
96
+ export interface DeleteInputParam {
97
+
98
+ delete_payment_method?:boolean;
99
+ }
100
+ export interface RelationshipsResponse {
101
+ customer:Customer;
102
+ }
103
+ export interface RelationshipsInputParam {
104
+
105
+ parent_id?:string;
106
+ payment_owner_id?:string;
107
+ invoice_owner_id?:string;
108
+ use_default_hierarchy_settings?:boolean;
109
+ parent_account_access?:{portal_download_child_invoices?:'no' | 'yes' | 'view_only',portal_edit_child_subscriptions?:'no' | 'yes' | 'view_only',send_invoice_emails?:boolean,send_payment_emails?:boolean,send_subscription_emails?:boolean};
110
+ child_account_access?:{portal_download_invoices?:'no' | 'yes' | 'view_only',portal_edit_subscriptions?:'yes' | 'view_only',send_invoice_emails?:boolean,send_payment_emails?:boolean,send_subscription_emails?:boolean};
111
+ }
112
+ export interface DeleteRelationshipResponse {
113
+ customer:Customer;
114
+ }
115
+
116
+ export interface DeleteContactResponse {
117
+ customer:Customer;
118
+ card?:Card;
119
+ }
120
+ export interface DeleteContactInputParam {
121
+
122
+ contact?:{id:string};
123
+ }
124
+ export interface AssignPaymentRoleResponse {
125
+ customer:Customer;
126
+ payment_source:PaymentSource;
127
+ }
128
+ export interface AssignPaymentRoleInputParam {
129
+
130
+ payment_source_id:string;
131
+ role:Role;
132
+ }
133
+ export interface MoveResponse {
134
+ resource_migration:ResourceMigration;
135
+ }
136
+ export interface MoveInputParam {
137
+
138
+ id_at_from_site:string;
139
+ from_site:string;
140
+ }
141
+ export interface HierarchyResponse {
142
+ hierarchies:Hierarchy[];
143
+ }
144
+ export interface HierarchyInputParam {
145
+
146
+ hierarchy_operation_type:'complete_hierarchy' | 'subordinates' | 'path_to_root';
147
+ }
148
+ export interface UpdatePaymentMethodResponse {
149
+ customer:Customer;
150
+ card?:Card;
151
+ }
152
+ export interface UpdatePaymentMethodInputParam {
153
+
154
+ payment_method?:{additional_information?:object,gateway_account_id?:string,issuing_country?:string,reference_id?:string,tmp_token?:string,type:Type};
155
+ }
156
+ export interface RetrieveResponse {
157
+ customer:Customer;
158
+ card?:Card;
159
+ }
160
+
161
+ export interface UpdateResponse {
162
+ customer:Customer;
163
+ card?:Card;
164
+ }
165
+ export interface UpdateInputParam {
166
+ [key : string] : any;
167
+ first_name?:string;
168
+ last_name?:string;
169
+ email?:string;
170
+ preferred_currency_code?:string;
171
+ phone?:string;
172
+ company?:string;
173
+ auto_collection?:AutoCollection;
174
+ allow_direct_debit?:boolean;
175
+ net_term_days?:number;
176
+ taxability?:Taxability;
177
+ exemption_details?:any[];
178
+ customer_type?:CustomerType;
179
+ client_profile_id?:string;
180
+ taxjar_exemption_category?:TaxjarExemptionCategory;
181
+ locale?:string;
182
+ entity_code?:EntityCode;
183
+ exempt_number?:string;
184
+ offline_payment_method?:OfflinePaymentMethod;
185
+ invoice_notes?:string;
186
+ auto_close_invoices?:boolean;
187
+ meta_data?:object;
188
+ fraud_flag?:'safe' | 'fraudulent';
189
+ consolidated_invoicing?:boolean;
190
+ }
191
+ export interface ChangeBillingDateResponse {
192
+ customer:Customer;
193
+ }
194
+ export interface ChangeBillingDateInputParam {
195
+
196
+ billing_date?:number;
197
+ billing_month?:number;
198
+ billing_date_mode?:BillingDateMode;
199
+ billing_day_of_week?:'sunday' | 'saturday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'monday';
200
+ billing_day_of_week_mode?:BillingDayOfWeekMode;
201
+ }
202
+ export interface ListResponse {
203
+ list:{customer:Customer,card?:Card}[];
204
+ next_offset?:string;
205
+ }
206
+ export interface ListInputParam {
207
+ [key: string]: string | number | object | boolean;
208
+ limit?:number;
209
+ offset?:string;
210
+ include_deleted?:boolean;
211
+ id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
212
+ first_name?:{is?:string,is_not?:string,is_present?:'true' | 'false',starts_with?:string};
213
+ last_name?:{is?:string,is_not?:string,is_present?:'true' | 'false',starts_with?:string};
214
+ email?:{is?:string,is_not?:string,is_present?:'true' | 'false',starts_with?:string};
215
+ company?:{is?:string,is_not?:string,is_present?:'true' | 'false',starts_with?:string};
216
+ phone?:{is?:string,is_not?:string,is_present?:'true' | 'false',starts_with?:string};
217
+ auto_collection?:{in?:string,is?:'off' | 'on',is_not?:'off' | 'on',not_in?:string};
218
+ taxability?:{in?:string,is?:'taxable' | 'exempt',is_not?:'taxable' | 'exempt',not_in?:string};
219
+ created_at?:{after?:string,before?:string,between?:string,on?:string};
220
+ updated_at?:{after?:string,before?:string,between?:string,on?:string};
221
+ business_entity_id?:{is?:string,is_not?:string,starts_with?:string};
222
+ offline_payment_method?:{in?:string,is?:'bank_transfer' | 'no_preference' | 'ach_credit' | 'boleto' | 'check' | 'sepa_credit' | 'cash',is_not?:'bank_transfer' | 'no_preference' | 'ach_credit' | 'boleto' | 'check' | 'sepa_credit' | 'cash',not_in?:string};
223
+ auto_close_invoices?:{is?:'true' | 'false'};
224
+ channel?:{in?:string,is?:'app_store' | 'web' | 'play_store',is_not?:'app_store' | 'web' | 'play_store',not_in?:string};
225
+ sort_by?:{asc?:'updated_at' | 'created_at',desc?:'updated_at' | 'created_at'};
226
+ relationship?:{invoice_owner_id?:{is?:string,is_not?:string,starts_with?:string},parent_id?:{is?:string,is_not?:string,starts_with?:string},payment_owner_id?:{is?:string,is_not?:string,starts_with?:string}};
227
+ }
228
+ export interface CreateResponse {
229
+ customer:Customer;
230
+ card?:Card;
231
+ }
232
+ export interface CreateInputParam {
233
+ [key : string] : any;
234
+ id?:string;
235
+ first_name?:string;
236
+ last_name?:string;
237
+ email?:string;
238
+ preferred_currency_code?:string;
239
+ phone?:string;
240
+ company?:string;
241
+ auto_collection?:AutoCollection;
242
+ net_term_days?:number;
243
+ allow_direct_debit?:boolean;
244
+ vat_number?:string;
245
+ vat_number_prefix?:string;
246
+ entity_identifier_scheme?:string;
247
+ entity_identifier_standard?:string;
248
+ registered_for_gst?:boolean;
249
+ is_einvoice_enabled?:boolean;
250
+ einvoicing_method?:EinvoicingMethod;
251
+ taxability?:Taxability;
252
+ exemption_details?:any[];
253
+ customer_type?:CustomerType;
254
+ client_profile_id?:string;
255
+ taxjar_exemption_category?:TaxjarExemptionCategory;
256
+ business_customer_without_vat_number?:boolean;
257
+ locale?:string;
258
+ entity_code?:EntityCode;
259
+ exempt_number?:string;
260
+ meta_data?:object;
261
+ offline_payment_method?:OfflinePaymentMethod;
262
+ auto_close_invoices?:boolean;
263
+ consolidated_invoicing?:boolean;
264
+ token_id?:string;
265
+ business_entity_id?:string;
266
+ invoice_notes?:string;
267
+ card?:{additional_information?:object,billing_addr1?:string,billing_addr2?:string,billing_city?:string,billing_country?:string,billing_state?:string,billing_state_code?:string,billing_zip?:string,cvv?:string,expiry_month?:number,expiry_year?:number,first_name?:string,gateway_account_id?:string,last_name?:string,number?:string};
268
+ bank_account?:{account_holder_type?:AccountHolderType,account_number?:string,account_type?:AccountType,bank_code?:string,bank_name?:string,billing_address?:object,company?:string,echeck_type?:EcheckType,email?:string,first_name?:string,gateway_account_id?:string,iban?:string,issuing_country?:string,last_name?:string,phone?:string,routing_number?:string,swedish_identity_number?:string};
269
+ payment_method?:{additional_information?:object,gateway_account_id?:string,issuing_country?:string,reference_id?:string,tmp_token?:string,type?:Type};
270
+ payment_intent?:{additional_information?:object,gateway_account_id?:string,gw_token?:string,id?:string,payment_method_type?:'giropay' | 'ideal' | 'google_pay' | 'netbanking_emandates' | 'dotpay' | 'boleto' | 'direct_debit' | 'sofort' | 'upi' | 'apple_pay' | 'bancontact' | 'paypal_express_checkout' | 'card',reference_id?:string};
271
+ billing_address?:{city?:string,company?:string,country?:string,email?:string,first_name?:string,last_name?:string,line1?:string,line2?:string,line3?:string,phone?:string,state?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
272
+ entity_identifiers?:{id?:string,scheme?:string,standard?:string,value?:string}[];
273
+ }
274
+ export interface AddContactResponse {
275
+ customer:Customer;
276
+ card?:Card;
277
+ }
278
+ export interface AddContactInputParam {
279
+
280
+ contact?:{email:string,enabled?:boolean,first_name?:string,id?:string,label?:string,last_name?:string,phone?:string,send_account_email?:boolean,send_billing_email?:boolean};
281
+ }
282
+ export interface ContactsForCustomerResponse {
283
+ list:{contact:Contact}[];
284
+ next_offset?:string;
285
+ }
286
+ export interface ContactsForCustomerInputParam {
287
+ [key: string]: string | number | object | boolean;
288
+ limit?:number;
289
+ offset?:string;
290
+ }
291
+ export interface ClearPersonalDataResponse {
292
+ customer:Customer;
293
+ }
294
+
295
+ export interface MergeResponse {
296
+ customer:Customer;
297
+ }
298
+ export interface MergeInputParam {
299
+
300
+ from_customer_id:string;
301
+ to_customer_id:string;
302
+ }
303
+ export interface CollectPaymentResponse {
304
+ customer:Customer;
305
+ transaction:Transaction;
306
+ }
307
+ export interface CollectPaymentInputParam {
308
+
309
+ amount?:number;
310
+ payment_source_id?:string;
311
+ token_id?:string;
312
+ replace_primary_payment_source?:boolean;
313
+ retain_payment_source?:boolean;
314
+ payment_initiator?:'merchant' | 'customer';
315
+ payment_method?:{additional_information?:object,gateway_account_id?:string,reference_id?:string,tmp_token?:string,type?:Type};
316
+ card?:{additional_information?:object,billing_addr1?:string,billing_addr2?:string,billing_city?:string,billing_country?:string,billing_state?:string,billing_state_code?:string,billing_zip?:string,cvv?:string,expiry_month?:number,expiry_year?:number,first_name?:string,gateway_account_id?:string,last_name?:string,number?:string};
317
+ payment_intent?:{additional_information?:object,gateway_account_id?:string,gw_token?:string,id?:string,payment_method_type?:'giropay' | 'ideal' | 'google_pay' | 'netbanking_emandates' | 'dotpay' | 'boleto' | 'direct_debit' | 'sofort' | 'upi' | 'apple_pay' | 'bancontact' | 'paypal_express_checkout' | 'card',reference_id?:string};
318
+ invoice_allocations?:{allocation_amount?:number,invoice_id:string}[];
319
+ }
320
+ export interface RecordExcessPaymentResponse {
321
+ customer:Customer;
322
+ transaction:Transaction;
323
+ }
324
+ export interface RecordExcessPaymentInputParam {
325
+
326
+ comment?:string;
327
+ transaction?:{amount:number,currency_code?:string,date:number,payment_method:PaymentMethod,reference_number?:string};
328
+ }
329
+ export interface UpdateContactResponse {
330
+ customer:Customer;
331
+ card?:Card;
332
+ }
333
+ export interface UpdateContactInputParam {
334
+
335
+ contact?:{email?:string,enabled?:boolean,first_name?:string,id:string,label?:string,last_name?:string,phone?:string,send_account_email?:boolean,send_billing_email?:boolean};
336
+ }
337
+ export interface UpdateHierarchySettingsResponse {
338
+ customer:Customer;
339
+ }
340
+ export interface UpdateHierarchySettingsInputParam {
341
+
342
+ use_default_hierarchy_settings?:boolean;
343
+ parent_account_access?:{portal_download_child_invoices?:'no' | 'yes' | 'view_only',portal_edit_child_subscriptions?:'no' | 'yes' | 'view_only',send_invoice_emails?:boolean,send_payment_emails?:boolean,send_subscription_emails?:boolean};
344
+ child_account_access?:{portal_download_invoices?:'no' | 'yes' | 'view_only',portal_edit_subscriptions?:'yes' | 'view_only',send_invoice_emails?:boolean,send_payment_emails?:boolean,send_subscription_emails?:boolean};
345
+ }
346
+ export interface UpdateBillingInfoResponse {
347
+ customer:Customer;
348
+ card?:Card;
349
+ }
350
+ export interface UpdateBillingInfoInputParam {
351
+
352
+ vat_number?:string;
353
+ vat_number_prefix?:string;
354
+ entity_identifier_scheme?:string;
355
+ entity_identifier_standard?:string;
356
+ registered_for_gst?:boolean;
357
+ business_customer_without_vat_number?:boolean;
358
+ is_einvoice_enabled?:boolean;
359
+ einvoicing_method?:EinvoicingMethod;
360
+ billing_address?:{city?:string,company?:string,country?:string,email?:string,first_name?:string,last_name?:string,line1?:string,line2?:string,line3?:string,phone?:string,state?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
361
+ entity_identifiers?:{id?:string,operation?:Operation,scheme?:string,standard?:string,value?:string}[];
362
+ }
363
+ export interface BillingAddress {
364
+ first_name?:string;
365
+ last_name?:string;
366
+ email?:string;
367
+ company?:string;
368
+ phone?:string;
369
+ line1?:string;
370
+ line2?:string;
371
+ line3?:string;
372
+ city?:string;
373
+ state_code?:string;
374
+ state?:string;
375
+ country?:string;
376
+ zip?:string;
377
+ validation_status?:ValidationStatus;
378
+ }
379
+ export interface ReferralUrl {
380
+ external_customer_id?:string;
381
+ referral_sharing_url?:string;
382
+ created_at?:number;
383
+ updated_at?:number;
384
+ referral_campaign_id?:string;
385
+ referral_account_id?:string;
386
+ referral_external_campaign_id?:string;
387
+ referral_system?:'referral_candy' | 'friendbuy' | 'referral_saasquatch';
388
+ }
389
+ export interface Contact {
390
+ id?:string;
391
+ first_name?:string;
392
+ last_name?:string;
393
+ email?:string;
394
+ phone?:string;
395
+ label?:string;
396
+ enabled?:boolean;
397
+ send_account_email?:boolean;
398
+ send_billing_email?:boolean;
399
+ }
400
+ export interface PaymentMethod {
401
+ type?:Type;
402
+ gateway?:Gateway;
403
+ gateway_account_id?:string;
404
+ status?:'valid' | 'expiring' | 'expired' | 'invalid' | 'pending_verification';
405
+ reference_id?:string;
406
+ }
407
+ export interface CustomerBalance {
408
+ promotional_credits?:number;
409
+ excess_payments?:number;
410
+ refundable_credits?:number;
411
+ unbilled_charges?:number;
412
+ currency_code?:string;
413
+ }
414
+ export interface EntityIdentifier {
415
+ id?:string;
416
+ value?:string;
417
+ scheme?:string;
418
+ standard?:string;
419
+ }
420
+ export interface Relationship {
421
+ parent_id?:string;
422
+ payment_owner_id?:string;
423
+ invoice_owner_id?:string;
424
+ }
425
+ export interface ParentAccountAccess {
426
+ portal_edit_child_subscriptions?:'no' | 'yes' | 'view_only';
427
+ portal_download_child_invoices?:'no' | 'yes' | 'view_only';
428
+ send_subscription_emails?:boolean;
429
+ send_invoice_emails?:boolean;
430
+ send_payment_emails?:boolean;
431
+ }
432
+ export interface ChildAccountAccess {
433
+ portal_edit_subscriptions?:'yes' | 'view_only';
434
+ portal_download_invoices?:'no' | 'yes' | 'view_only';
435
+ send_subscription_emails?:boolean;
436
+ send_invoice_emails?:boolean;
437
+ send_payment_emails?:boolean;
438
+ }
439
+ }
440
+ }
@@ -0,0 +1,88 @@
1
+ declare module 'chargebee' {
2
+ export interface DifferentialPrice {
3
+
4
+ id:string;
5
+ item_price_id:string;
6
+ parent_item_id:string;
7
+ price?:number;
8
+ price_in_decimal?:string;
9
+ status?:'deleted' | 'active';
10
+ resource_version?:number;
11
+ updated_at?:number;
12
+ created_at:number;
13
+ modified_at:number;
14
+ currency_code:string;
15
+ tiers?:DifferentialPrice.Tier[];
16
+ parent_periods?:DifferentialPrice.ParentPeriod[];
17
+ }
18
+ export namespace DifferentialPrice {
19
+ export class DifferentialPriceResource {
20
+ delete(differential_price_id:string, input:DeleteInputParam):ChargebeeRequest<DeleteResponse>;
21
+ create(item_price_id:string, input:CreateInputParam):ChargebeeRequest<CreateResponse>;
22
+ list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
23
+ retrieve(differential_price_id:string, input:RetrieveInputParam):ChargebeeRequest<RetrieveResponse>;
24
+ update(differential_price_id:string, input:UpdateInputParam):ChargebeeRequest<UpdateResponse>;
25
+ }
26
+ export interface DeleteResponse {
27
+ differential_price:DifferentialPrice;
28
+ }
29
+ export interface DeleteInputParam {
30
+
31
+ item_price_id:string;
32
+ }
33
+ export interface CreateResponse {
34
+ differential_price:DifferentialPrice;
35
+ }
36
+ export interface CreateInputParam {
37
+
38
+ parent_item_id:string;
39
+ price?:number;
40
+ price_in_decimal?:string;
41
+ parent_periods?:{period?:any[],period_unit:'week' | 'month' | 'year' | 'day'}[];
42
+ tiers?:{ending_unit?:number,ending_unit_in_decimal?:string,price?:number,price_in_decimal?:string,starting_unit?:number,starting_unit_in_decimal?:string}[];
43
+ }
44
+ export interface ListResponse {
45
+ list:{differential_price:DifferentialPrice}[];
46
+ next_offset?:string;
47
+ }
48
+ export interface ListInputParam {
49
+ [key: string]: string | number | object | boolean;
50
+ limit?:number;
51
+ offset?:string;
52
+ item_price_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
53
+ item_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
54
+ id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
55
+ parent_item_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
56
+ }
57
+ export interface RetrieveResponse {
58
+ differential_price:DifferentialPrice;
59
+ }
60
+ export interface RetrieveInputParam {
61
+
62
+ item_price_id:string;
63
+ }
64
+ export interface UpdateResponse {
65
+ differential_price:DifferentialPrice;
66
+ }
67
+ export interface UpdateInputParam {
68
+
69
+ item_price_id:string;
70
+ price?:number;
71
+ price_in_decimal?:string;
72
+ parent_periods?:{period?:any[],period_unit:'week' | 'month' | 'year' | 'day'}[];
73
+ tiers?:{ending_unit?:number,ending_unit_in_decimal?:string,price?:number,price_in_decimal?:string,starting_unit?:number,starting_unit_in_decimal?:string}[];
74
+ }
75
+ export interface Tier {
76
+ starting_unit?:number;
77
+ ending_unit?:number;
78
+ price?:number;
79
+ starting_unit_in_decimal?:string;
80
+ ending_unit_in_decimal?:string;
81
+ price_in_decimal?:string;
82
+ }
83
+ export interface ParentPeriod {
84
+ period_unit?:'week' | 'month' | 'year' | 'day';
85
+ period?:any[];
86
+ }
87
+ }
88
+ }
@@ -0,0 +1,23 @@
1
+ declare module 'chargebee' {
2
+ export interface Discount {
3
+
4
+ id:string;
5
+ invoice_name?:string;
6
+ type:'fixed_amount' | 'percentage';
7
+ percentage?:number;
8
+ amount?:number;
9
+ currency_code?:string;
10
+ duration_type:DurationType;
11
+ period?:number;
12
+ period_unit?:PeriodUnit;
13
+ included_in_mrr:boolean;
14
+ apply_on:ApplyOn;
15
+ item_price_id?:string;
16
+ created_at:number;
17
+ apply_till?:number;
18
+ applied_count?:number;
19
+ coupon_id:string;
20
+ index:number;
21
+ }
22
+
23
+ }
@@ -0,0 +1,9 @@
1
+ declare module 'chargebee' {
2
+ export interface Download {
3
+
4
+ download_url:string;
5
+ valid_till:number;
6
+ mime_type?:string;
7
+ }
8
+
9
+ }
@@ -0,0 +1,37 @@
1
+ declare module 'chargebee' {
2
+ export interface EntitlementOverride {
3
+
4
+ id:string;
5
+ entity_id?:string;
6
+ entity_type?:string;
7
+ feature_id?:string;
8
+ feature_name?:string;
9
+ value?:string;
10
+ name?:string;
11
+ expires_at?:number;
12
+ }
13
+ export namespace EntitlementOverride {
14
+ export class EntitlementOverrideResource {
15
+ list_entitlement_override_for_subscription(subscription_id:string, input?:ListEntitlementOverrideForSubscriptionInputParam):ChargebeeRequest<ListEntitlementOverrideForSubscriptionResponse>;
16
+ add_entitlement_override_for_subscription(subscription_id:string, input?:AddEntitlementOverrideForSubscriptionInputParam):ChargebeeRequest<AddEntitlementOverrideForSubscriptionResponse>;
17
+ }
18
+ export interface ListEntitlementOverrideForSubscriptionResponse {
19
+ list:{entitlement_override:EntitlementOverride}[];
20
+ next_offset?:string;
21
+ }
22
+ export interface ListEntitlementOverrideForSubscriptionInputParam {
23
+ [key: string]: string | number | object | boolean;
24
+ limit?:number;
25
+ offset?:string;
26
+ }
27
+ export interface AddEntitlementOverrideForSubscriptionResponse {
28
+ entitlement_override:EntitlementOverride;
29
+ }
30
+ export interface AddEntitlementOverrideForSubscriptionInputParam {
31
+
32
+ action?:Action;
33
+ entitlement_overrides?:{expires_at?:number,feature_id:string,value?:string}[];
34
+ }
35
+
36
+ }
37
+ }