chargebee 2.24.0 → 2.25.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 (65) hide show
  1. package/CHANGELOG.md +8 -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 +59 -0
  7. package/types/resources/AdvanceInvoiceSchedule.d.ts +27 -0
  8. package/types/resources/AttachedItem.d.ts +85 -0
  9. package/types/resources/Card.d.ts +89 -0
  10. package/types/resources/Comment.d.ts +53 -0
  11. package/types/resources/Contact.d.ts +16 -0
  12. package/types/resources/ContractTerm.d.ts +19 -0
  13. package/types/resources/Coupon.d.ts +151 -0
  14. package/types/resources/CouponCode.d.ts +26 -0
  15. package/types/resources/CouponSet.d.ts +76 -0
  16. package/types/resources/CreditNote.d.ts +338 -0
  17. package/types/resources/CreditNoteEstimate.d.ts +97 -0
  18. package/types/resources/Customer.d.ts +441 -0
  19. package/types/resources/DifferentialPrice.d.ts +89 -0
  20. package/types/resources/Discount.d.ts +24 -0
  21. package/types/resources/Download.d.ts +10 -0
  22. package/types/resources/EntitlementOverride.d.ts +38 -0
  23. package/types/resources/Estimate.d.ts +215 -0
  24. package/types/resources/Event.d.ts +43 -0
  25. package/types/resources/Export.d.ts +183 -0
  26. package/types/resources/Feature.d.ts +91 -0
  27. package/types/resources/Gift.d.ts +98 -0
  28. package/types/resources/Hierarchy.d.ts +12 -0
  29. package/types/resources/HostedPage.d.ts +243 -0
  30. package/types/resources/ImpactedItem.d.ts +18 -0
  31. package/types/resources/ImpactedSubscription.d.ts +18 -0
  32. package/types/resources/InAppSubscription.d.ts +53 -0
  33. package/types/resources/Invoice.d.ts +591 -0
  34. package/types/resources/InvoiceEstimate.d.ts +97 -0
  35. package/types/resources/Item.d.ts +119 -0
  36. package/types/resources/ItemEntitlement.d.ts +56 -0
  37. package/types/resources/ItemFamily.d.ts +60 -0
  38. package/types/resources/ItemPrice.d.ts +196 -0
  39. package/types/resources/Media.d.ts +11 -0
  40. package/types/resources/NonSubscription.d.ts +24 -0
  41. package/types/resources/Order.d.ts +306 -0
  42. package/types/resources/PaymentIntent.d.ts +72 -0
  43. package/types/resources/PaymentReferenceNumber.d.ts +11 -0
  44. package/types/resources/PaymentSource.d.ts +265 -0
  45. package/types/resources/PaymentVoucher.d.ts +75 -0
  46. package/types/resources/PortalSession.d.ts +58 -0
  47. package/types/resources/PromotionalCredit.d.ts +87 -0
  48. package/types/resources/Purchase.d.ts +47 -0
  49. package/types/resources/Quote.d.ts +389 -0
  50. package/types/resources/QuoteLineGroup.d.ts +84 -0
  51. package/types/resources/QuotedCharge.d.ts +58 -0
  52. package/types/resources/QuotedSubscription.d.ts +83 -0
  53. package/types/resources/ResourceMigration.d.ts +28 -0
  54. package/types/resources/SiteMigrationDetail.d.ts +32 -0
  55. package/types/resources/Subscription.d.ts +620 -0
  56. package/types/resources/SubscriptionEntitlement.d.ts +42 -0
  57. package/types/resources/SubscriptionEstimate.d.ts +50 -0
  58. package/types/resources/TaxWithheld.d.ts +14 -0
  59. package/types/resources/ThirdPartyPaymentMethod.d.ts +11 -0
  60. package/types/resources/TimeMachine.d.ts +39 -0
  61. package/types/resources/Token.d.ts +51 -0
  62. package/types/resources/Transaction.d.ts +171 -0
  63. package/types/resources/UnbilledCharge.d.ts +92 -0
  64. package/types/resources/Usage.d.ts +77 -0
  65. package/types/resources/VirtualBankAccount.d.ts +76 -0
@@ -0,0 +1,215 @@
1
+ ///<reference path='./../core.d.ts'/>
2
+ declare module 'chargebee' {
3
+ export interface Estimate {
4
+
5
+ created_at:number;
6
+ subscription_estimate?:SubscriptionEstimate;
7
+ subscription_estimates?:SubscriptionEstimate[];
8
+ invoice_estimate?:InvoiceEstimate;
9
+ invoice_estimates?:InvoiceEstimate[];
10
+ next_invoice_estimate?:InvoiceEstimate;
11
+ credit_note_estimates?:CreditNoteEstimate[];
12
+ unbilled_charge_estimates?:UnbilledCharge[];
13
+ }
14
+ export namespace Estimate {
15
+ export class EstimateResource {
16
+ renewal_estimate(subscription_id:string, input?:RenewalEstimateInputParam):ChargebeeRequest<RenewalEstimateResponse>;
17
+ create_sub_item_estimate(input?:CreateSubItemEstimateInputParam):ChargebeeRequest<CreateSubItemEstimateResponse>;
18
+ cancel_subscription_for_items(subscription_id:string, input?:CancelSubscriptionForItemsInputParam):ChargebeeRequest<CancelSubscriptionForItemsResponse>;
19
+ resume_subscription(subscription_id:string, input?:ResumeSubscriptionInputParam):ChargebeeRequest<ResumeSubscriptionResponse>;
20
+ create_invoice_for_items(input?:CreateInvoiceForItemsInputParam):ChargebeeRequest<CreateInvoiceForItemsResponse>;
21
+ gift_subscription_for_items(input?:GiftSubscriptionForItemsInputParam):ChargebeeRequest<GiftSubscriptionForItemsResponse>;
22
+ update_subscription_for_items(input?:UpdateSubscriptionForItemsInputParam):ChargebeeRequest<UpdateSubscriptionForItemsResponse>;
23
+ upcoming_invoices_estimate(customer_id:string):ChargebeeRequest<UpcomingInvoicesEstimateResponse>;
24
+ regenerate_invoice_estimate(subscription_id:string, input?:RegenerateInvoiceEstimateInputParam):ChargebeeRequest<RegenerateInvoiceEstimateResponse>;
25
+ create_sub_item_for_customer_estimate(customer_id:string, input?:CreateSubItemForCustomerEstimateInputParam):ChargebeeRequest<CreateSubItemForCustomerEstimateResponse>;
26
+ change_term_end(subscription_id:string, input:ChangeTermEndInputParam):ChargebeeRequest<ChangeTermEndResponse>;
27
+ pause_subscription(subscription_id:string, input?:PauseSubscriptionInputParam):ChargebeeRequest<PauseSubscriptionResponse>;
28
+ advance_invoice_estimate(subscription_id:string, input?:AdvanceInvoiceEstimateInputParam):ChargebeeRequest<AdvanceInvoiceEstimateResponse>;
29
+ }
30
+ export interface RenewalEstimateResponse {
31
+ estimate:Estimate;
32
+ }
33
+ export interface RenewalEstimateInputParam {
34
+
35
+ include_delayed_charges?:boolean;
36
+ use_existing_balances?:boolean;
37
+ ignore_scheduled_cancellation?:boolean;
38
+ ignore_scheduled_changes?:boolean;
39
+ }
40
+ export interface CreateSubItemEstimateResponse {
41
+ estimate:Estimate;
42
+ }
43
+ export interface CreateSubItemEstimateInputParam {
44
+
45
+ billing_cycles?:number;
46
+ mandatory_items_to_remove?:string[];
47
+ terms_to_charge?:number;
48
+ billing_alignment_mode?:BillingAlignmentMode;
49
+ coupon_ids?:string[];
50
+ invoice_immediately?:boolean;
51
+ invoice_date?:number;
52
+ client_profile_id?:string;
53
+ subscription?:{contract_term_billing_cycle_on_renewal?:number,free_period?:number,free_period_unit?:FreePeriodUnit,id?:string,start_date?:number,trial_end?:number,trial_end_action?:TrialEndAction};
54
+ billing_address?:{city?:string,country?:string,line1?:string,line2?:string,line3?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
55
+ shipping_address?:{city?:string,country?:string,line1?:string,line2?:string,line3?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
56
+ customer?:{customer_type?:CustomerType,entity_code?:EntityCode,exempt_number?:string,exemption_details?:any[],registered_for_gst?:boolean,taxability?:Taxability,vat_number?:string,vat_number_prefix?:string};
57
+ contract_term?:{action_at_term_end?:'cancel' | 'renew' | 'evergreen',cancellation_cutoff_period?:number};
58
+ subscription_items?:{billing_cycles?:number,charge_on_event?:ChargeOnEvent,charge_on_option?:ChargeOnOption,charge_once?:boolean,item_price_id:string,quantity?:number,quantity_in_decimal?:string,service_period_days?:number,trial_end?:number,unit_price?:number,unit_price_in_decimal?:string}[];
59
+ discounts?:{amount?:number,apply_on:ApplyOn,duration_type:DurationType,included_in_mrr?:boolean,item_price_id?:string,percentage?:number,period?:number,period_unit?:PeriodUnit}[];
60
+ item_tiers?:{ending_unit?:number,ending_unit_in_decimal?:string,item_price_id?:string,price?:number,price_in_decimal?:string,starting_unit?:number,starting_unit_in_decimal?:string}[];
61
+ }
62
+ export interface CancelSubscriptionForItemsResponse {
63
+ estimate:Estimate;
64
+ }
65
+ export interface CancelSubscriptionForItemsInputParam {
66
+
67
+ end_of_term?:boolean;
68
+ cancel_at?:number;
69
+ credit_option_for_current_term_charges?:CreditOptionForCurrentTermCharges;
70
+ unbilled_charges_option?:UnbilledChargesOption;
71
+ account_receivables_handling?:AccountReceivablesHandling;
72
+ refundable_credits_handling?:RefundableCreditsHandling;
73
+ contract_term_cancel_option?:ContractTermCancelOption;
74
+ invoice_date?:number;
75
+ cancel_reason_code?:string;
76
+ subscription_items?:{item_price_id?:string,quantity?:number,quantity_in_decimal?:string,service_period_days?:number,unit_price?:number,unit_price_in_decimal?:string}[];
77
+ }
78
+ export interface ResumeSubscriptionResponse {
79
+ estimate:Estimate;
80
+ }
81
+ export interface ResumeSubscriptionInputParam {
82
+
83
+ resume_option?:ResumeOption;
84
+ charges_handling?:ChargesHandling;
85
+ subscription?:{resume_date?:number};
86
+ }
87
+ export interface CreateInvoiceForItemsResponse {
88
+ estimate:Estimate;
89
+ }
90
+ export interface CreateInvoiceForItemsInputParam {
91
+
92
+ currency_code?:string;
93
+ invoice_note?:string;
94
+ remove_general_note?:boolean;
95
+ coupon_ids?:string[];
96
+ authorization_transaction_id?:string;
97
+ payment_source_id?:string;
98
+ auto_collection?:AutoCollection;
99
+ invoice_date?:number;
100
+ invoice?:{customer_id?:string,po_number?:string,subscription_id?:string};
101
+ shipping_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};
102
+ item_prices?:{date_from?:number,date_to?:number,item_price_id?:string,quantity?:number,quantity_in_decimal?:string,unit_price?:number,unit_price_in_decimal?:string}[];
103
+ item_tiers?:{ending_unit?:number,ending_unit_in_decimal?:string,item_price_id?:string,price?:number,price_in_decimal?:string,starting_unit?:number,starting_unit_in_decimal?:string}[];
104
+ charges?:{amount?:number,amount_in_decimal?:string,avalara_sale_type?:AvalaraSaleType,avalara_service_type?:number,avalara_tax_code?:string,avalara_transaction_type?:number,date_from?:number,date_to?:number,description?:string,hsn_code?:string,tax_profile_id?:string,taxable?:boolean,taxjar_product_code?:string}[];
105
+ notes_to_remove?:{entity_id?:string,entity_type?:EntityType}[];
106
+ discounts?:{amount?:number,apply_on:ApplyOn,item_price_id?:string,percentage?:number}[];
107
+ }
108
+ export interface GiftSubscriptionForItemsResponse {
109
+ estimate:Estimate;
110
+ }
111
+ export interface GiftSubscriptionForItemsInputParam {
112
+
113
+ coupon_ids?:string[];
114
+ gift?:{auto_claim?:boolean,claim_expiry_date?:number,no_expiry?:boolean,scheduled_at?:number};
115
+ gifter?:{customer_id:string,note?:string,payment_src_id?:string,signature:string};
116
+ gift_receiver?:{customer_id:string,email:string,first_name:string,last_name:string};
117
+ 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};
118
+ shipping_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};
119
+ subscription_items?:{item_price_id?:string,quantity?:number,quantity_in_decimal?:string}[];
120
+ }
121
+ export interface UpdateSubscriptionForItemsResponse {
122
+ estimate:Estimate;
123
+ }
124
+ export interface UpdateSubscriptionForItemsInputParam {
125
+
126
+ mandatory_items_to_remove?:string[];
127
+ replace_items_list?:boolean;
128
+ invoice_date?:number;
129
+ billing_cycles?:number;
130
+ terms_to_charge?:number;
131
+ reactivate_from?:number;
132
+ billing_alignment_mode?:BillingAlignmentMode;
133
+ coupon_ids?:string[];
134
+ replace_coupon_list?:boolean;
135
+ prorate?:boolean;
136
+ end_of_term?:boolean;
137
+ force_term_reset?:boolean;
138
+ reactivate?:boolean;
139
+ include_delayed_charges?:boolean;
140
+ use_existing_balances?:boolean;
141
+ invoice_immediately?:boolean;
142
+ subscription?:{auto_collection?:AutoCollection,free_period?:number,free_period_unit?:FreePeriodUnit,id:string,offline_payment_method?:OfflinePaymentMethod,start_date?:number,trial_end?:number,trial_end_action?:TrialEndAction};
143
+ billing_address?:{city?:string,country?:string,line1?:string,line2?:string,line3?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
144
+ shipping_address?:{city?:string,country?:string,line1?:string,line2?:string,line3?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
145
+ customer?:{registered_for_gst?:boolean,vat_number?:string,vat_number_prefix?:string};
146
+ subscription_items?:{billing_cycles?:number,charge_on_event?:ChargeOnEvent,charge_on_option?:ChargeOnOption,charge_once?:boolean,item_price_id:string,quantity?:number,quantity_in_decimal?:string,service_period_days?:number,trial_end?:number,unit_price?:number,unit_price_in_decimal?:string}[];
147
+ discounts?:{amount?:number,apply_on:ApplyOn,duration_type:DurationType,id?:string,included_in_mrr?:boolean,item_price_id?:string,operation_type:OperationType,percentage?:number,period?:number,period_unit?:PeriodUnit}[];
148
+ item_tiers?:{ending_unit?:number,ending_unit_in_decimal?:string,item_price_id?:string,price?:number,price_in_decimal?:string,starting_unit?:number,starting_unit_in_decimal?:string}[];
149
+ }
150
+ export interface UpcomingInvoicesEstimateResponse {
151
+ estimate:Estimate;
152
+ }
153
+
154
+ export interface RegenerateInvoiceEstimateResponse {
155
+ estimate:Estimate;
156
+ }
157
+ export interface RegenerateInvoiceEstimateInputParam {
158
+
159
+ date_from?:number;
160
+ date_to?:number;
161
+ prorate?:boolean;
162
+ invoice_immediately?:boolean;
163
+ }
164
+ export interface CreateSubItemForCustomerEstimateResponse {
165
+ estimate:Estimate;
166
+ }
167
+ export interface CreateSubItemForCustomerEstimateInputParam {
168
+
169
+ use_existing_balances?:boolean;
170
+ invoice_immediately?:boolean;
171
+ billing_cycles?:number;
172
+ mandatory_items_to_remove?:string[];
173
+ terms_to_charge?:number;
174
+ billing_alignment_mode?:BillingAlignmentMode;
175
+ invoice_date?:number;
176
+ coupon_ids?:string[];
177
+ subscription?:{contract_term_billing_cycle_on_renewal?:number,free_period?:number,free_period_unit?:FreePeriodUnit,id?:string,start_date?:number,trial_end?:number,trial_end_action?:TrialEndAction};
178
+ shipping_address?:{city?:string,country?:string,line1?:string,line2?:string,line3?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
179
+ contract_term?:{action_at_term_end?:'cancel' | 'renew' | 'evergreen',cancellation_cutoff_period?:number};
180
+ subscription_items?:{billing_cycles?:number,charge_on_event?:ChargeOnEvent,charge_on_option?:ChargeOnOption,charge_once?:boolean,item_price_id:string,quantity?:number,quantity_in_decimal?:string,service_period_days?:number,trial_end?:number,unit_price?:number,unit_price_in_decimal?:string}[];
181
+ discounts?:{amount?:number,apply_on:ApplyOn,duration_type:DurationType,included_in_mrr?:boolean,item_price_id?:string,percentage?:number,period?:number,period_unit?:PeriodUnit}[];
182
+ item_tiers?:{ending_unit?:number,ending_unit_in_decimal?:string,item_price_id?:string,price?:number,price_in_decimal?:string,starting_unit?:number,starting_unit_in_decimal?:string}[];
183
+ }
184
+ export interface ChangeTermEndResponse {
185
+ estimate:Estimate;
186
+ }
187
+ export interface ChangeTermEndInputParam {
188
+
189
+ term_ends_at:number;
190
+ prorate?:boolean;
191
+ invoice_immediately?:boolean;
192
+ }
193
+ export interface PauseSubscriptionResponse {
194
+ estimate:Estimate;
195
+ }
196
+ export interface PauseSubscriptionInputParam {
197
+
198
+ pause_option?:PauseOption;
199
+ unbilled_charges_handling?:UnbilledChargesHandling;
200
+ subscription?:{pause_date?:number,resume_date?:number,skip_billing_cycles?:number};
201
+ }
202
+ export interface AdvanceInvoiceEstimateResponse {
203
+ estimate:Estimate;
204
+ }
205
+ export interface AdvanceInvoiceEstimateInputParam {
206
+
207
+ terms_to_charge?:number;
208
+ invoice_immediately?:boolean;
209
+ schedule_type?:ScheduleType;
210
+ fixed_interval_schedule?:{days_before_renewal?:number,end_date?:number,end_schedule_on?:EndScheduleOn,number_of_occurrences?:number};
211
+ specific_dates_schedule?:{date?:number,terms_to_charge?:number}[];
212
+ }
213
+
214
+ }
215
+ }
@@ -0,0 +1,43 @@
1
+ ///<reference path='./../core.d.ts'/>
2
+ declare module 'chargebee' {
3
+ export interface Event {
4
+
5
+ id:string;
6
+ occurred_at:number;
7
+ source:Source;
8
+ user?:string;
9
+ event_type?:EventType;
10
+ api_version?:ApiVersion;
11
+ content:object;
12
+ webhooks?:Event.Webhook[];
13
+ }
14
+ export namespace Event {
15
+ export class EventResource {
16
+ list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
17
+ retrieve(event_id:string):ChargebeeRequest<RetrieveResponse>;
18
+ }
19
+ export interface ListResponse {
20
+ list:{event:Event}[];
21
+ next_offset?:string;
22
+ }
23
+ export interface ListInputParam {
24
+ [key: string]: string | number | object | boolean;
25
+ limit?:number;
26
+ offset?:string;
27
+ id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
28
+ webhook_status?:{in?:string,is?:'not_configured' | 're_scheduled' | 'scheduled' | 'failed' | 'not_applicable' | 'succeeded' | 'skipped',is_not?:'not_configured' | 're_scheduled' | 'scheduled' | 'failed' | 'not_applicable' | 'succeeded' | 'skipped',not_in?:string};
29
+ event_type?:{in?:string,is?:'subscription_pause_scheduled' | 'order_delivered' | 'subscription_advance_invoice_schedule_added' | 'gift_expired' | 'tax_withheld_deleted' | 'coupon_codes_added' | 'unbilled_charges_deleted' | 'gift_cancelled' | 'coupon_updated' | 'order_cancelled' | 'coupon_deleted' | 'product_updated' | 'subscription_scheduled_changes_removed' | 'pending_invoice_created' | 'product_deleted' | 'entitlement_overrides_auto_removed' | 'unbilled_charges_created' | 'subscription_resumed' | 'subscription_cancelled' | 'item_entitlements_removed' | 'business_entity_created' | 'payment_source_deleted' | 'quote_deleted' | 'invoice_updated' | 'coupon_set_updated' | 'differential_price_updated' | 'subscription_advance_invoice_schedule_removed' | 'entitlement_overrides_removed' | 'subscription_activated_with_backdating' | 'card_deleted' | 'order_ready_to_ship' | 'subscription_trial_end_reminder' | 'subscription_shipping_address_updated' | 'variant_updated' | 'voucher_create_failed' | 'gift_claimed' | 'business_entity_updated' | 'subscription_scheduled_resumption_removed' | 'payment_initiated' | 'feature_archived' | 'subscription_reactivated_with_backdating' | 'customer_deleted' | 'token_expired' | 'card_added' | 'coupon_created' | 'refund_initiated' | 'invoice_generated_with_backdating' | 'add_usages_reminder' | 'item_price_deleted' | 'virtual_bank_account_deleted' | 'subscription_created' | 'voucher_created' | 'feature_activated' | 'subscription_entitlements_created' | 'payment_source_locally_deleted' | 'order_returned' | 'subscription_deleted' | 'invoice_generated' | 'voucher_expired' | 'authorization_succeeded' | 'payment_source_added' | 'gift_scheduled' | 'item_price_created' | 'subscription_changes_scheduled' | 'subscription_changed_with_backdating' | 'variant_created' | 'subscription_scheduled_cancellation_removed' | 'payment_refunded' | 'gift_unclaimed' | 'product_created' | 'differential_price_created' | 'virtual_bank_account_added' | 'payment_intent_created' | 'transaction_created' | 'credit_note_created_with_backdating' | 'contract_term_terminated' | 'item_family_updated' | 'order_created' | 'payment_succeeded' | 'plan_deleted' | 'subscription_canceled_with_backdating' | 'unbilled_charges_voided' | 'quote_created' | 'customer_moved_in' | 'coupon_set_deleted' | 'subscription_advance_invoice_schedule_updated' | 'attached_item_created' | 'customer_changed' | 'subscription_started' | 'item_deleted' | 'subscription_activated' | 'payment_source_expiring' | 'subscription_reactivated' | 'order_updated' | 'subscription_scheduled_pause_removed' | 'subscription_cancellation_reminder' | 'addon_deleted' | 'subscription_created_with_backdating' | 'order_deleted' | 'item_entitlements_updated' | 'token_consumed' | 'addon_updated' | 'hierarchy_deleted' | 'subscription_cancellation_scheduled' | 'gift_updated' | 'subscription_trial_extended' | 'subscription_renewed' | 'feature_updated' | 'addon_created' | 'feature_deleted' | 'item_family_created' | 'card_expiry_reminder' | 'token_created' | 'purchase_created' | 'plan_created' | 'entitlement_overrides_updated' | 'plan_updated' | 'promotional_credits_added' | 'item_family_deleted' | 'subscription_resumption_scheduled' | 'feature_reactivated' | 'coupon_codes_deleted' | 'card_expired' | 'credit_note_updated' | 'promotional_credits_deducted' | 'payment_source_expired' | 'customer_moved_out' | 'subscription_paused' | 'order_ready_to_process' | 'feature_created' | 'hierarchy_created' | 'attached_item_deleted' | 'transaction_deleted' | 'credit_note_created' | 'item_updated' | 'item_created' | 'coupon_set_created' | 'transaction_updated' | 'payment_intent_updated' | 'variant_deleted' | 'mrr_updated' | 'order_resent' | 'unbilled_charges_invoiced' | 'tax_withheld_recorded' | 'item_price_updated' | 'differential_price_deleted' | 'coupon_codes_updated' | 'virtual_bank_account_updated' | 'contract_term_created' | 'subscription_changed' | 'contract_term_cancelled' | 'contract_term_renewed' | 'invoice_deleted' | 'payment_failed' | 'credit_note_deleted' | 'tax_withheld_refunded' | 'contract_term_completed' | 'card_updated' | 'customer_created' | 'pending_invoice_updated' | 'quote_updated' | 'subscription_renewal_reminder' | 'attached_item_updated' | 'payment_source_updated' | 'business_entity_deleted' | 'authorization_voided',is_not?:'subscription_pause_scheduled' | 'order_delivered' | 'subscription_advance_invoice_schedule_added' | 'gift_expired' | 'tax_withheld_deleted' | 'coupon_codes_added' | 'unbilled_charges_deleted' | 'gift_cancelled' | 'coupon_updated' | 'order_cancelled' | 'coupon_deleted' | 'product_updated' | 'subscription_scheduled_changes_removed' | 'pending_invoice_created' | 'product_deleted' | 'entitlement_overrides_auto_removed' | 'unbilled_charges_created' | 'subscription_resumed' | 'subscription_cancelled' | 'item_entitlements_removed' | 'business_entity_created' | 'payment_source_deleted' | 'quote_deleted' | 'invoice_updated' | 'coupon_set_updated' | 'differential_price_updated' | 'subscription_advance_invoice_schedule_removed' | 'entitlement_overrides_removed' | 'subscription_activated_with_backdating' | 'card_deleted' | 'order_ready_to_ship' | 'subscription_trial_end_reminder' | 'subscription_shipping_address_updated' | 'variant_updated' | 'voucher_create_failed' | 'gift_claimed' | 'business_entity_updated' | 'subscription_scheduled_resumption_removed' | 'payment_initiated' | 'feature_archived' | 'subscription_reactivated_with_backdating' | 'customer_deleted' | 'token_expired' | 'card_added' | 'coupon_created' | 'refund_initiated' | 'invoice_generated_with_backdating' | 'add_usages_reminder' | 'item_price_deleted' | 'virtual_bank_account_deleted' | 'subscription_created' | 'voucher_created' | 'feature_activated' | 'subscription_entitlements_created' | 'payment_source_locally_deleted' | 'order_returned' | 'subscription_deleted' | 'invoice_generated' | 'voucher_expired' | 'authorization_succeeded' | 'payment_source_added' | 'gift_scheduled' | 'item_price_created' | 'subscription_changes_scheduled' | 'subscription_changed_with_backdating' | 'variant_created' | 'subscription_scheduled_cancellation_removed' | 'payment_refunded' | 'gift_unclaimed' | 'product_created' | 'differential_price_created' | 'virtual_bank_account_added' | 'payment_intent_created' | 'transaction_created' | 'credit_note_created_with_backdating' | 'contract_term_terminated' | 'item_family_updated' | 'order_created' | 'payment_succeeded' | 'plan_deleted' | 'subscription_canceled_with_backdating' | 'unbilled_charges_voided' | 'quote_created' | 'customer_moved_in' | 'coupon_set_deleted' | 'subscription_advance_invoice_schedule_updated' | 'attached_item_created' | 'customer_changed' | 'subscription_started' | 'item_deleted' | 'subscription_activated' | 'payment_source_expiring' | 'subscription_reactivated' | 'order_updated' | 'subscription_scheduled_pause_removed' | 'subscription_cancellation_reminder' | 'addon_deleted' | 'subscription_created_with_backdating' | 'order_deleted' | 'item_entitlements_updated' | 'token_consumed' | 'addon_updated' | 'hierarchy_deleted' | 'subscription_cancellation_scheduled' | 'gift_updated' | 'subscription_trial_extended' | 'subscription_renewed' | 'feature_updated' | 'addon_created' | 'feature_deleted' | 'item_family_created' | 'card_expiry_reminder' | 'token_created' | 'purchase_created' | 'plan_created' | 'entitlement_overrides_updated' | 'plan_updated' | 'promotional_credits_added' | 'item_family_deleted' | 'subscription_resumption_scheduled' | 'feature_reactivated' | 'coupon_codes_deleted' | 'card_expired' | 'credit_note_updated' | 'promotional_credits_deducted' | 'payment_source_expired' | 'customer_moved_out' | 'subscription_paused' | 'order_ready_to_process' | 'feature_created' | 'hierarchy_created' | 'attached_item_deleted' | 'transaction_deleted' | 'credit_note_created' | 'item_updated' | 'item_created' | 'coupon_set_created' | 'transaction_updated' | 'payment_intent_updated' | 'variant_deleted' | 'mrr_updated' | 'order_resent' | 'unbilled_charges_invoiced' | 'tax_withheld_recorded' | 'item_price_updated' | 'differential_price_deleted' | 'coupon_codes_updated' | 'virtual_bank_account_updated' | 'contract_term_created' | 'subscription_changed' | 'contract_term_cancelled' | 'contract_term_renewed' | 'invoice_deleted' | 'payment_failed' | 'credit_note_deleted' | 'tax_withheld_refunded' | 'contract_term_completed' | 'card_updated' | 'customer_created' | 'pending_invoice_updated' | 'quote_updated' | 'subscription_renewal_reminder' | 'attached_item_updated' | 'payment_source_updated' | 'business_entity_deleted' | 'authorization_voided',not_in?:string};
30
+ source?:{in?:string,is?:'admin_console' | 'system' | 'scheduled_job' | 'js_api' | 'bulk_operation' | 'hosted_page' | 'migration' | 'api' | 'none' | 'portal' | 'external_service',is_not?:'admin_console' | 'system' | 'scheduled_job' | 'js_api' | 'bulk_operation' | 'hosted_page' | 'migration' | 'api' | 'none' | 'portal' | 'external_service',not_in?:string};
31
+ occurred_at?:{after?:string,before?:string,between?:string,on?:string};
32
+ sort_by?:{asc?:'occurred_at',desc?:'occurred_at'};
33
+ }
34
+ export interface RetrieveResponse {
35
+ event:Event;
36
+ }
37
+
38
+ export interface Webhook {
39
+ id?:string;
40
+ webhook_status?:'not_configured' | 're_scheduled' | 'scheduled' | 'failed' | 'not_applicable' | 'succeeded' | 'skipped';
41
+ }
42
+ }
43
+ }
@@ -0,0 +1,183 @@
1
+ ///<reference path='./../core.d.ts'/>
2
+ declare module 'chargebee' {
3
+ export interface Export {
4
+
5
+ id:string;
6
+ operation_type:string;
7
+ mime_type:'zip' | 'pdf';
8
+ status:'in_process' | 'completed' | 'failed';
9
+ created_at:number;
10
+ download?:Export.Download;
11
+ }
12
+ export namespace Export {
13
+ export class ExportResource {
14
+ customers(input?:CustomersInputParam):ChargebeeRequest<CustomersResponse>;
15
+ attached_items(input?:AttachedItemsInputParam):ChargebeeRequest<AttachedItemsResponse>;
16
+ transactions(input?:TransactionsInputParam):ChargebeeRequest<TransactionsResponse>;
17
+ differential_prices(input?:DifferentialPricesInputParam):ChargebeeRequest<DifferentialPricesResponse>;
18
+ item_families(input?:ItemFamiliesInputParam):ChargebeeRequest<ItemFamiliesResponse>;
19
+ invoices(input?:InvoicesInputParam):ChargebeeRequest<InvoicesResponse>;
20
+ retrieve(export_id:string):ChargebeeRequest<RetrieveResponse>;
21
+ items(input?:ItemsInputParam):ChargebeeRequest<ItemsResponse>;
22
+ deferred_revenue(input:DeferredRevenueInputParam):ChargebeeRequest<DeferredRevenueResponse>;
23
+ revenue_recognition(input:RevenueRecognitionInputParam):ChargebeeRequest<RevenueRecognitionResponse>;
24
+ credit_notes(input?:CreditNotesInputParam):ChargebeeRequest<CreditNotesResponse>;
25
+ coupons(input?:CouponsInputParam):ChargebeeRequest<CouponsResponse>;
26
+ orders(input?:OrdersInputParam):ChargebeeRequest<OrdersResponse>;
27
+ item_prices(input?:ItemPricesInputParam):ChargebeeRequest<ItemPricesResponse>;
28
+ subscriptions(input?:SubscriptionsInputParam):ChargebeeRequest<SubscriptionsResponse>;
29
+ }
30
+ export interface CustomersResponse {
31
+ export:Export;
32
+ }
33
+ export interface CustomersInputParam {
34
+
35
+ export_type?:ExportType;
36
+ business_entity_id?:{is?:string,is_not?:string,starts_with?:string};
37
+ customer?:{auto_close_invoices?:{is?:'true' | 'false'},auto_collection?:{in?:string,is?:'off' | 'on',is_not?:'off' | 'on',not_in?:string},channel?:{in?:string,is?:'app_store' | 'web' | 'play_store',is_not?:'app_store' | 'web' | 'play_store',not_in?:string},company?:{is?:string,is_not?:string,is_present?:'true' | 'false',starts_with?:string},created_at?:{after?:string,before?:string,between?:string,on?:string},email?:{is?:string,is_not?:string,is_present?:'true' | 'false',starts_with?:string},first_name?:{is?:string,is_not?:string,is_present?:'true' | 'false',starts_with?:string},id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string},last_name?:{is?:string,is_not?:string,is_present?:'true' | 'false',starts_with?:string},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},phone?:{is?:string,is_not?:string,is_present?:'true' | 'false',starts_with?:string},taxability?:{in?:string,is?:'taxable' | 'exempt',is_not?:'taxable' | 'exempt',not_in?:string},updated_at?:{after?:string,before?:string,between?:string,on?:string}};
38
+ 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}};
39
+ }
40
+ export interface AttachedItemsResponse {
41
+ export:Export;
42
+ }
43
+ export interface AttachedItemsInputParam {
44
+
45
+ item_type?:{in?:string,is?:'charge' | 'addon' | 'plan',is_not?:'charge' | 'addon' | 'plan',not_in?:string};
46
+ attached_item?:{charge_on_event?:{in?:string,is?:'subscription_creation' | 'subscription_activation' | 'subscription_trial_start' | 'contract_termination' | 'plan_activation' | 'on_demand',is_not?:'subscription_creation' | 'subscription_activation' | 'subscription_trial_start' | 'contract_termination' | 'plan_activation' | 'on_demand',not_in?:string},id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string},item_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string},parent_item_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string},type?:{in?:string,is?:'optional' | 'mandatory' | 'recommended',is_not?:'optional' | 'mandatory' | 'recommended',not_in?:string},updated_at?:{after?:string,before?:string,between?:string,on?:string}};
47
+ }
48
+ export interface TransactionsResponse {
49
+ export:Export;
50
+ }
51
+ export interface TransactionsInputParam {
52
+
53
+ transaction?:{amount?:{between?:string,gt?:string,gte?:string,is?:string,is_not?:string,lt?:string,lte?:string},amount_capturable?:{between?:string,gt?:string,gte?:string,is?:string,is_not?:string,lt?:string,lte?:string},customer_id?:{in?:string,is?:string,is_not?:string,is_present?:'true' | 'false',not_in?:string,starts_with?:string},date?:{after?:string,before?:string,between?:string,on?:string},gateway?:{in?:string,is?:'bluepay' | 'beanstream' | 'elavon' | 'orbital' | 'hdfc' | 'nmi' | 'moneris' | 'metrics_global' | 'pin' | 'stripe' | 'quickbooks' | 'razorpay' | 'eway_rapid' | 'balanced_payments' | 'ecentric' | 'wepay' | 'chargebee_payments' | 'bank_of_america' | 'braintree' | 'first_data_global' | 'paypal_express_checkout' | 'ingenico_direct' | 'moneris_us' | 'exact' | 'migs' | 'checkout_com' | 'not_applicable' | 'paypal_pro' | 'ogone' | 'eway' | 'gocardless' | 'global_payments' | 'paymill' | 'adyen' | 'paypal' | 'chargebee' | 'authorize_net' | 'tco' | 'bluesnap' | 'windcave' | 'paypal_payflow_pro' | 'amazon_payments' | 'mollie' | 'cybersource' | 'wirecard' | 'sage_pay' | 'vantiv' | 'worldpay',is_not?:'bluepay' | 'beanstream' | 'elavon' | 'orbital' | 'hdfc' | 'nmi' | 'moneris' | 'metrics_global' | 'pin' | 'stripe' | 'quickbooks' | 'razorpay' | 'eway_rapid' | 'balanced_payments' | 'ecentric' | 'wepay' | 'chargebee_payments' | 'bank_of_america' | 'braintree' | 'first_data_global' | 'paypal_express_checkout' | 'ingenico_direct' | 'moneris_us' | 'exact' | 'migs' | 'checkout_com' | 'not_applicable' | 'paypal_pro' | 'ogone' | 'eway' | 'gocardless' | 'global_payments' | 'paymill' | 'adyen' | 'paypal' | 'chargebee' | 'authorize_net' | 'tco' | 'bluesnap' | 'windcave' | 'paypal_payflow_pro' | 'amazon_payments' | 'mollie' | 'cybersource' | 'wirecard' | 'sage_pay' | 'vantiv' | 'worldpay',not_in?:string},gateway_account_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string},id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string},id_at_gateway?:{is?:string,is_not?:string,starts_with?:string},payment_method?:{in?:string,is?:'other' | 'netbanking_emandates' | 'ach_credit' | 'dotpay' | 'boleto' | 'direct_debit' | 'chargeback' | 'wechat_pay' | 'cash' | 'giropay' | 'bank_transfer' | 'alipay' | 'ideal' | 'google_pay' | 'custom' | 'unionpay' | 'check' | 'sofort' | 'amazon_payments' | 'upi' | 'apple_pay' | 'bancontact' | 'paypal_express_checkout' | 'sepa_credit' | 'card',is_not?:'other' | 'netbanking_emandates' | 'ach_credit' | 'dotpay' | 'boleto' | 'direct_debit' | 'chargeback' | 'wechat_pay' | 'cash' | 'giropay' | 'bank_transfer' | 'alipay' | 'ideal' | 'google_pay' | 'custom' | 'unionpay' | 'check' | 'sofort' | 'amazon_payments' | 'upi' | 'apple_pay' | 'bancontact' | 'paypal_express_checkout' | 'sepa_credit' | 'card',not_in?:string},payment_source_id?:{in?:string,is?:string,is_not?:string,is_present?:'true' | 'false',not_in?:string,starts_with?:string},reference_number?:{is?:string,is_not?:string,is_present?:'true' | 'false',starts_with?:string},status?:{in?:string,is?:'in_progress' | 'success' | 'failure' | 'voided' | 'timeout' | 'needs_attention',is_not?:'in_progress' | 'success' | 'failure' | 'voided' | 'timeout' | 'needs_attention',not_in?:string},subscription_id?:{in?:string,is?:string,is_not?:string,is_present?:'true' | 'false',not_in?:string,starts_with?:string},type?:{in?:string,is?:'authorization' | 'payment_reversal' | 'payment' | 'refund',is_not?:'authorization' | 'payment_reversal' | 'payment' | 'refund',not_in?:string},updated_at?:{after?:string,before?:string,between?:string,on?:string}};
54
+ }
55
+ export interface DifferentialPricesResponse {
56
+ export:Export;
57
+ }
58
+ export interface DifferentialPricesInputParam {
59
+
60
+ item_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
61
+ differential_price?:{id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string},item_price_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string},parent_item_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string}};
62
+ }
63
+ export interface ItemFamiliesResponse {
64
+ export:Export;
65
+ }
66
+ export interface ItemFamiliesInputParam {
67
+
68
+ item_family?:{id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string},name?:{is?:string,is_not?:string,starts_with?:string},updated_at?:{after?:string,before?:string,between?:string,on?:string}};
69
+ }
70
+ export interface InvoicesResponse {
71
+ export:Export;
72
+ }
73
+ export interface InvoicesInputParam {
74
+
75
+ payment_owner?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
76
+ invoice?:{amount_adjusted?:{between?:string,gt?:string,gte?:string,is?:string,is_not?:string,lt?:string,lte?:string},amount_due?:{between?:string,gt?:string,gte?:string,is?:string,is_not?:string,lt?:string,lte?:string},amount_paid?:{between?:string,gt?:string,gte?:string,is?:string,is_not?:string,lt?:string,lte?:string},channel?:{in?:string,is?:'app_store' | 'web' | 'play_store',is_not?:'app_store' | 'web' | 'play_store',not_in?:string},credits_applied?:{between?:string,gt?:string,gte?:string,is?:string,is_not?:string,lt?:string,lte?:string},customer_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string},date?:{after?:string,before?:string,between?:string,on?:string},dunning_status?:{in?:string,is?:'in_progress' | 'stopped' | 'success' | 'exhausted',is_not?:'in_progress' | 'stopped' | 'success' | 'exhausted',is_present?:'true' | 'false',not_in?:string},id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string},paid_at?:{after?:string,before?:string,between?:string,on?:string},price_type?:{in?:string,is?:'tax_exclusive' | 'tax_inclusive',is_not?:'tax_exclusive' | 'tax_inclusive',not_in?:string},recurring?:{is?:'true' | 'false'},status?:{in?:string,is?:'pending' | 'paid' | 'voided' | 'not_paid' | 'posted' | 'payment_due',is_not?:'pending' | 'paid' | 'voided' | 'not_paid' | 'posted' | 'payment_due',not_in?:string},subscription_id?:{in?:string,is?:string,is_not?:string,is_present?:'true' | 'false',not_in?:string,starts_with?:string},total?:{between?:string,gt?:string,gte?:string,is?:string,is_not?:string,lt?:string,lte?:string},updated_at?:{after?:string,before?:string,between?:string,on?:string}};
77
+ }
78
+ export interface RetrieveResponse {
79
+ export:Export;
80
+ }
81
+
82
+ export interface ItemsResponse {
83
+ export:Export;
84
+ }
85
+ export interface ItemsInputParam {
86
+
87
+ item?:{channel?:{in?:string,is?:'app_store' | 'web' | 'play_store',is_not?:'app_store' | 'web' | 'play_store',not_in?:string},enabled_for_checkout?:{is?:'true' | 'false'},enabled_in_portal?:{is?:'true' | 'false'},id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string},is_giftable?:{is?:'true' | 'false'},item_applicability?:{in?:string,is?:'all' | 'restricted',is_not?:'all' | 'restricted',not_in?:string},item_family_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string},metered?:{is?:'true' | 'false'},name?:{is?:string,is_not?:string,starts_with?:string},status?:{in?:string,is?:'archived' | 'deleted' | 'active',is_not?:'archived' | 'deleted' | 'active',not_in?:string},type?:{in?:string,is?:'charge' | 'addon' | 'plan',is_not?:'charge' | 'addon' | 'plan',not_in?:string},updated_at?:{after?:string,before?:string,between?:string,on?:string},usage_calculation?:{in?:string,is?:'max_usage' | 'sum_of_usages' | 'last_usage',is_not?:'max_usage' | 'sum_of_usages' | 'last_usage',not_in?:string}};
88
+ }
89
+ export interface DeferredRevenueResponse {
90
+ export:Export;
91
+ }
92
+ export interface DeferredRevenueInputParam {
93
+
94
+ report_by:ReportBy;
95
+ currency_code?:string;
96
+ report_from_month:number;
97
+ report_from_year:number;
98
+ report_to_month:number;
99
+ report_to_year:number;
100
+ include_discounts?:boolean;
101
+ payment_owner?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
102
+ item_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
103
+ item_price_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
104
+ cancel_reason_code?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
105
+ business_entity_id?:{is?:string,is_not?:string,starts_with?:string};
106
+ invoice?:{amount_adjusted?:{between?:string,gt?:string,gte?:string,is?:string,is_not?:string,lt?:string,lte?:string},amount_due?:{between?:string,gt?:string,gte?:string,is?:string,is_not?:string,lt?:string,lte?:string},amount_paid?:{between?:string,gt?:string,gte?:string,is?:string,is_not?:string,lt?:string,lte?:string},channel?:{in?:string,is?:'app_store' | 'web' | 'play_store',is_not?:'app_store' | 'web' | 'play_store',not_in?:string},credits_applied?:{between?:string,gt?:string,gte?:string,is?:string,is_not?:string,lt?:string,lte?:string},date?:{after?:string,before?:string,between?:string,on?:string},dunning_status?:{in?:string,is?:'in_progress' | 'stopped' | 'success' | 'exhausted',is_not?:'in_progress' | 'stopped' | 'success' | 'exhausted',is_present?:'true' | 'false',not_in?:string},id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string},paid_at?:{after?:string,before?:string,between?:string,on?:string},price_type?:{in?:string,is?:'tax_exclusive' | 'tax_inclusive',is_not?:'tax_exclusive' | 'tax_inclusive',not_in?:string},recurring?:{is?:'true' | 'false'},status?:{in?:string,is?:'pending' | 'paid' | 'voided' | 'not_paid' | 'posted' | 'payment_due',is_not?:'pending' | 'paid' | 'voided' | 'not_paid' | 'posted' | 'payment_due',not_in?:string},total?:{between?:string,gt?:string,gte?:string,is?:string,is_not?:string,lt?:string,lte?:string},updated_at?:{after?:string,before?:string,between?:string,on?:string}};
107
+ subscription?:{activated_at?:{after?:string,before?:string,between?:string,is_present?:'true' | 'false',on?:string},auto_close_invoices?:{is?:'true' | 'false'},cancel_reason?:{in?:string,is?:'tax_calculation_failed' | 'fraud_review_failed' | 'currency_incompatible_with_gateway' | 'non_compliant_eu_customer' | 'non_compliant_customer' | 'not_paid' | 'no_card',is_not?:'tax_calculation_failed' | 'fraud_review_failed' | 'currency_incompatible_with_gateway' | 'non_compliant_eu_customer' | 'non_compliant_customer' | 'not_paid' | 'no_card',is_present?:'true' | 'false',not_in?:string},cancelled_at?:{after?:string,before?:string,between?:string,on?:string},channel?:{in?:string,is?:'app_store' | 'web' | 'play_store',is_not?:'app_store' | 'web' | 'play_store',not_in?:string},created_at?:{after?:string,before?:string,between?:string,on?:string},customer_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string},has_scheduled_changes?:{is?:'true' | 'false'},id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string},next_billing_at?:{after?:string,before?:string,between?:string,on?:string},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},remaining_billing_cycles?:{between?:string,gt?:string,gte?:string,is?:string,is_not?:string,is_present?:'true' | 'false',lt?:string,lte?:string},status?:{in?:string,is?:'in_trial' | 'paused' | 'future' | 'active' | 'cancelled' | 'non_renewing',is_not?:'in_trial' | 'paused' | 'future' | 'active' | 'cancelled' | 'non_renewing',not_in?:string},updated_at?:{after?:string,before?:string,between?:string,on?:string}};
108
+ customer?:{auto_close_invoices?:{is?:'true' | 'false'},auto_collection?:{in?:string,is?:'off' | 'on',is_not?:'off' | 'on',not_in?:string},channel?:{in?:string,is?:'app_store' | 'web' | 'play_store',is_not?:'app_store' | 'web' | 'play_store',not_in?:string},company?:{is?:string,is_not?:string,is_present?:'true' | 'false',starts_with?:string},created_at?:{after?:string,before?:string,between?:string,on?:string},email?:{is?:string,is_not?:string,is_present?:'true' | 'false',starts_with?:string},first_name?:{is?:string,is_not?:string,is_present?:'true' | 'false',starts_with?:string},id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string},last_name?:{is?:string,is_not?:string,is_present?:'true' | 'false',starts_with?:string},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},phone?:{is?:string,is_not?:string,is_present?:'true' | 'false',starts_with?:string},taxability?:{in?:string,is?:'taxable' | 'exempt',is_not?:'taxable' | 'exempt',not_in?:string},updated_at?:{after?:string,before?:string,between?:string,on?:string}};
109
+ 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}};
110
+ }
111
+ export interface RevenueRecognitionResponse {
112
+ export:Export;
113
+ }
114
+ export interface RevenueRecognitionInputParam {
115
+
116
+ report_by:ReportBy;
117
+ currency_code?:string;
118
+ report_from_month:number;
119
+ report_from_year:number;
120
+ report_to_month:number;
121
+ report_to_year:number;
122
+ include_discounts?:boolean;
123
+ payment_owner?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
124
+ item_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
125
+ item_price_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
126
+ cancel_reason_code?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
127
+ business_entity_id?:{is?:string,is_not?:string,starts_with?:string};
128
+ invoice?:{amount_adjusted?:{between?:string,gt?:string,gte?:string,is?:string,is_not?:string,lt?:string,lte?:string},amount_due?:{between?:string,gt?:string,gte?:string,is?:string,is_not?:string,lt?:string,lte?:string},amount_paid?:{between?:string,gt?:string,gte?:string,is?:string,is_not?:string,lt?:string,lte?:string},channel?:{in?:string,is?:'app_store' | 'web' | 'play_store',is_not?:'app_store' | 'web' | 'play_store',not_in?:string},credits_applied?:{between?:string,gt?:string,gte?:string,is?:string,is_not?:string,lt?:string,lte?:string},date?:{after?:string,before?:string,between?:string,on?:string},dunning_status?:{in?:string,is?:'in_progress' | 'stopped' | 'success' | 'exhausted',is_not?:'in_progress' | 'stopped' | 'success' | 'exhausted',is_present?:'true' | 'false',not_in?:string},id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string},paid_at?:{after?:string,before?:string,between?:string,on?:string},price_type?:{in?:string,is?:'tax_exclusive' | 'tax_inclusive',is_not?:'tax_exclusive' | 'tax_inclusive',not_in?:string},recurring?:{is?:'true' | 'false'},status?:{in?:string,is?:'pending' | 'paid' | 'voided' | 'not_paid' | 'posted' | 'payment_due',is_not?:'pending' | 'paid' | 'voided' | 'not_paid' | 'posted' | 'payment_due',not_in?:string},total?:{between?:string,gt?:string,gte?:string,is?:string,is_not?:string,lt?:string,lte?:string},updated_at?:{after?:string,before?:string,between?:string,on?:string}};
129
+ subscription?:{activated_at?:{after?:string,before?:string,between?:string,is_present?:'true' | 'false',on?:string},auto_close_invoices?:{is?:'true' | 'false'},cancel_reason?:{in?:string,is?:'tax_calculation_failed' | 'fraud_review_failed' | 'currency_incompatible_with_gateway' | 'non_compliant_eu_customer' | 'non_compliant_customer' | 'not_paid' | 'no_card',is_not?:'tax_calculation_failed' | 'fraud_review_failed' | 'currency_incompatible_with_gateway' | 'non_compliant_eu_customer' | 'non_compliant_customer' | 'not_paid' | 'no_card',is_present?:'true' | 'false',not_in?:string},cancelled_at?:{after?:string,before?:string,between?:string,on?:string},channel?:{in?:string,is?:'app_store' | 'web' | 'play_store',is_not?:'app_store' | 'web' | 'play_store',not_in?:string},created_at?:{after?:string,before?:string,between?:string,on?:string},customer_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string},has_scheduled_changes?:{is?:'true' | 'false'},id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string},next_billing_at?:{after?:string,before?:string,between?:string,on?:string},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},remaining_billing_cycles?:{between?:string,gt?:string,gte?:string,is?:string,is_not?:string,is_present?:'true' | 'false',lt?:string,lte?:string},status?:{in?:string,is?:'in_trial' | 'paused' | 'future' | 'active' | 'cancelled' | 'non_renewing',is_not?:'in_trial' | 'paused' | 'future' | 'active' | 'cancelled' | 'non_renewing',not_in?:string},updated_at?:{after?:string,before?:string,between?:string,on?:string}};
130
+ customer?:{auto_close_invoices?:{is?:'true' | 'false'},auto_collection?:{in?:string,is?:'off' | 'on',is_not?:'off' | 'on',not_in?:string},channel?:{in?:string,is?:'app_store' | 'web' | 'play_store',is_not?:'app_store' | 'web' | 'play_store',not_in?:string},company?:{is?:string,is_not?:string,is_present?:'true' | 'false',starts_with?:string},created_at?:{after?:string,before?:string,between?:string,on?:string},email?:{is?:string,is_not?:string,is_present?:'true' | 'false',starts_with?:string},first_name?:{is?:string,is_not?:string,is_present?:'true' | 'false',starts_with?:string},id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string},last_name?:{is?:string,is_not?:string,is_present?:'true' | 'false',starts_with?:string},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},phone?:{is?:string,is_not?:string,is_present?:'true' | 'false',starts_with?:string},taxability?:{in?:string,is?:'taxable' | 'exempt',is_not?:'taxable' | 'exempt',not_in?:string},updated_at?:{after?:string,before?:string,between?:string,on?:string}};
131
+ 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}};
132
+ }
133
+ export interface CreditNotesResponse {
134
+ export:Export;
135
+ }
136
+ export interface CreditNotesInputParam {
137
+
138
+ credit_note?:{amount_allocated?:{between?:string,gt?:string,gte?:string,is?:string,is_not?:string,lt?:string,lte?:string},amount_available?:{between?:string,gt?:string,gte?:string,is?:string,is_not?:string,lt?:string,lte?:string},amount_refunded?:{between?:string,gt?:string,gte?:string,is?:string,is_not?:string,lt?:string,lte?:string},channel?:{in?:string,is?:'app_store' | 'web' | 'play_store',is_not?:'app_store' | 'web' | 'play_store',not_in?:string},create_reason_code?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string},customer_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string},date?:{after?:string,before?:string,between?:string,on?:string},id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string},price_type?:{in?:string,is?:'tax_exclusive' | 'tax_inclusive',is_not?:'tax_exclusive' | 'tax_inclusive',not_in?:string},reason_code?:{in?:string,is?:'other' | 'product_unsatisfactory' | 'subscription_pause' | 'order_cancellation' | 'service_unsatisfactory' | 'subscription_cancellation' | 'chargeback' | 'order_change' | 'write_off' | 'waiver' | 'subscription_change' | 'fraudulent',is_not?:'other' | 'product_unsatisfactory' | 'subscription_pause' | 'order_cancellation' | 'service_unsatisfactory' | 'subscription_cancellation' | 'chargeback' | 'order_change' | 'write_off' | 'waiver' | 'subscription_change' | 'fraudulent',not_in?:string},reference_invoice_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string},status?:{in?:string,is?:'refund_due' | 'adjusted' | 'refunded' | 'voided',is_not?:'refund_due' | 'adjusted' | 'refunded' | 'voided',not_in?:string},subscription_id?:{in?:string,is?:string,is_not?:string,is_present?:'true' | 'false',not_in?:string,starts_with?:string},total?:{between?:string,gt?:string,gte?:string,is?:string,is_not?:string,lt?:string,lte?:string},type?:{in?:string,is?:'adjustment' | 'refundable',is_not?:'adjustment' | 'refundable',not_in?:string},updated_at?:{after?:string,before?:string,between?:string,on?:string},voided_at?:{after?:string,before?:string,between?:string,on?:string}};
139
+ }
140
+ export interface CouponsResponse {
141
+ export:Export;
142
+ }
143
+ export interface CouponsInputParam {
144
+
145
+ currency_code?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
146
+ coupon?:{apply_on?:{in?:string,is?:'invoice_amount' | 'each_specified_item',is_not?:'invoice_amount' | 'each_specified_item',not_in?:string},created_at?:{after?:string,before?:string,between?:string,on?:string},discount_type?:{in?:string,is?:'fixed_amount' | 'percentage',is_not?:'fixed_amount' | 'percentage',not_in?:string},duration_type?:{in?:string,is?:'limited_period' | 'one_time' | 'forever',is_not?:'limited_period' | 'one_time' | 'forever',not_in?:string},id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string},name?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string},status?:{in?:string,is?:'archived' | 'expired' | 'deleted' | 'active',is_not?:'archived' | 'expired' | 'deleted' | 'active',not_in?:string},updated_at?:{after?:string,before?:string,between?:string,on?:string}};
147
+ }
148
+ export interface OrdersResponse {
149
+ export:Export;
150
+ }
151
+ export interface OrdersInputParam {
152
+
153
+ total?:{between?:string,gt?:string,gte?:string,is?:string,is_not?:string,lt?:string,lte?:string};
154
+ order?:{amount_paid?:{between?:string,gt?:string,gte?:string,is?:string,is_not?:string,lt?:string,lte?:string},cancelled_at?:{after?:string,before?:string,between?:string,on?:string},customer_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string},delivered_at?:{after?:string,before?:string,between?:string,on?:string},id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string},is_resent?:{is?:'true' | 'false'},order_date?:{after?:string,before?:string,between?:string,on?:string},original_order_id?:{is?:string,is_not?:string,starts_with?:string},price_type?:{in?:string,is?:'tax_exclusive' | 'tax_inclusive',is_not?:'tax_exclusive' | 'tax_inclusive',not_in?:string},refundable_credits?:{between?:string,gt?:string,gte?:string,is?:string,is_not?:string,lt?:string,lte?:string},refundable_credits_issued?:{between?:string,gt?:string,gte?:string,is?:string,is_not?:string,lt?:string,lte?:string},resent_status?:{in?:string,is?:'fully_resent' | 'partially_resent',is_not?:'fully_resent' | 'partially_resent',not_in?:string},shipped_at?:{after?:string,before?:string,between?:string,on?:string},shipping_date?:{after?:string,before?:string,between?:string,on?:string},status?:{in?:string,is?:'new' | 'partially_delivered' | 'queued' | 'delivered' | 'on_hold' | 'shipped' | 'processing' | 'cancelled' | 'voided' | 'complete' | 'awaiting_shipment' | 'returned',is_not?:'new' | 'partially_delivered' | 'queued' | 'delivered' | 'on_hold' | 'shipped' | 'processing' | 'cancelled' | 'voided' | 'complete' | 'awaiting_shipment' | 'returned',not_in?:string},subscription_id?:{in?:string,is?:string,is_not?:string,is_present?:'true' | 'false',not_in?:string,starts_with?:string},updated_at?:{after?:string,before?:string,between?:string,on?:string}};
155
+ }
156
+ export interface ItemPricesResponse {
157
+ export:Export;
158
+ }
159
+ export interface ItemPricesInputParam {
160
+
161
+ item_family_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
162
+ item_type?:{in?:string,is?:'charge' | 'addon' | 'plan',is_not?:'charge' | 'addon' | 'plan',not_in?:string};
163
+ currency_code?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
164
+ item_price?:{channel?:{in?:string,is?:'app_store' | 'web' | 'play_store',is_not?:'app_store' | 'web' | 'play_store',not_in?:string},id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string},item_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string},name?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string},period?:{between?:string,gt?:string,gte?:string,is?:string,is_not?:string,lt?:string,lte?:string},period_unit?:{in?:string,is?:'week' | 'month' | 'year' | 'day',is_not?:'week' | 'month' | 'year' | 'day',not_in?:string},pricing_model?:{in?:string,is?:'volume' | 'per_unit' | 'tiered' | 'flat_fee' | 'stairstep',is_not?:'volume' | 'per_unit' | 'tiered' | 'flat_fee' | 'stairstep',not_in?:string},status?:{in?:string,is?:'archived' | 'deleted' | 'active',is_not?:'archived' | 'deleted' | 'active',not_in?:string},trial_period?:{between?:string,gt?:string,gte?:string,is?:string,is_not?:string,lt?:string,lte?:string},trial_period_unit?:{in?:string,is?:'month' | 'day',is_not?:'month' | 'day',not_in?:string},updated_at?:{after?:string,before?:string,between?:string,on?:string}};
165
+ }
166
+ export interface SubscriptionsResponse {
167
+ export:Export;
168
+ }
169
+ export interface SubscriptionsInputParam {
170
+
171
+ export_type?:ExportType;
172
+ item_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
173
+ item_price_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
174
+ cancel_reason_code?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
175
+ subscription?:{activated_at?:{after?:string,before?:string,between?:string,is_present?:'true' | 'false',on?:string},auto_close_invoices?:{is?:'true' | 'false'},cancel_reason?:{in?:string,is?:'tax_calculation_failed' | 'fraud_review_failed' | 'currency_incompatible_with_gateway' | 'non_compliant_eu_customer' | 'non_compliant_customer' | 'not_paid' | 'no_card',is_not?:'tax_calculation_failed' | 'fraud_review_failed' | 'currency_incompatible_with_gateway' | 'non_compliant_eu_customer' | 'non_compliant_customer' | 'not_paid' | 'no_card',is_present?:'true' | 'false',not_in?:string},cancelled_at?:{after?:string,before?:string,between?:string,on?:string},channel?:{in?:string,is?:'app_store' | 'web' | 'play_store',is_not?:'app_store' | 'web' | 'play_store',not_in?:string},created_at?:{after?:string,before?:string,between?:string,on?:string},customer_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string},has_scheduled_changes?:{is?:'true' | 'false'},id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string},next_billing_at?:{after?:string,before?:string,between?:string,on?:string},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},remaining_billing_cycles?:{between?:string,gt?:string,gte?:string,is?:string,is_not?:string,is_present?:'true' | 'false',lt?:string,lte?:string},status?:{in?:string,is?:'in_trial' | 'paused' | 'future' | 'active' | 'cancelled' | 'non_renewing',is_not?:'in_trial' | 'paused' | 'future' | 'active' | 'cancelled' | 'non_renewing',not_in?:string},updated_at?:{after?:string,before?:string,between?:string,on?:string}};
176
+ }
177
+ export interface Download {
178
+ download_url?:string;
179
+ valid_till?:number;
180
+ mime_type?:string;
181
+ }
182
+ }
183
+ }
@@ -0,0 +1,91 @@
1
+ ///<reference path='./../core.d.ts'/>
2
+ declare module 'chargebee' {
3
+ export interface Feature {
4
+
5
+ id:string;
6
+ name:string;
7
+ description?:string;
8
+ status?:'archived' | 'draft' | 'active';
9
+ type?:'quantity' | 'custom' | 'range' | 'switch';
10
+ unit?:string;
11
+ resource_version?:number;
12
+ updated_at?:number;
13
+ created_at:number;
14
+ levels?:Feature.Level[];
15
+ }
16
+ export namespace Feature {
17
+ export class FeatureResource {
18
+ list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
19
+ create(input:CreateInputParam):ChargebeeRequest<CreateResponse>;
20
+ delete(feature_id:string):ChargebeeRequest<DeleteResponse>;
21
+ retrieve(feature_id:string):ChargebeeRequest<RetrieveResponse>;
22
+ update(feature_id:string, input?:UpdateInputParam):ChargebeeRequest<UpdateResponse>;
23
+ archive(feature_id:string):ChargebeeRequest<ArchiveResponse>;
24
+ activate(feature_id:string):ChargebeeRequest<ActivateResponse>;
25
+ reactivate(feature_id:string):ChargebeeRequest<ReactivateResponse>;
26
+ }
27
+ export interface ListResponse {
28
+ list:{feature:Feature}[];
29
+ next_offset?:string;
30
+ }
31
+ export interface ListInputParam {
32
+ [key: string]: string | number | object | boolean;
33
+ limit?:number;
34
+ offset?:string;
35
+ name?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
36
+ id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
37
+ status?:{in?:string,is?:'archived' | 'draft' | 'active',is_not?:'archived' | 'draft' | 'active',not_in?:string};
38
+ type?:{in?:string,is?:'quantity' | 'custom' | 'range' | 'switch',is_not?:'quantity' | 'custom' | 'range' | 'switch',not_in?:string};
39
+ }
40
+ export interface CreateResponse {
41
+ feature:Feature;
42
+ }
43
+ export interface CreateInputParam {
44
+ [key : string] : any;
45
+ id?:string;
46
+ name:string;
47
+ description?:string;
48
+ type?:'quantity' | 'custom' | 'range' | 'switch';
49
+ status?:'draft' | 'active';
50
+ unit?:string;
51
+ levels?:{is_unlimited?:boolean,level?:number,name?:string,value?:string}[];
52
+ }
53
+ export interface DeleteResponse {
54
+ feature:Feature;
55
+ }
56
+
57
+ export interface RetrieveResponse {
58
+ feature:Feature;
59
+ }
60
+
61
+ export interface UpdateResponse {
62
+ feature:Feature;
63
+ }
64
+ export interface UpdateInputParam {
65
+ [key : string] : any;
66
+ name?:string;
67
+ description?:string;
68
+ status?:'archived' | 'draft' | 'active';
69
+ unit?:string;
70
+ levels?:{is_unlimited?:boolean,level?:number,name?:string,value?:string}[];
71
+ }
72
+ export interface ArchiveResponse {
73
+ feature:Feature;
74
+ }
75
+
76
+ export interface ActivateResponse {
77
+ feature:Feature;
78
+ }
79
+
80
+ export interface ReactivateResponse {
81
+ feature:Feature;
82
+ }
83
+
84
+ export interface Level {
85
+ name?:string;
86
+ value?:string;
87
+ level?:number;
88
+ is_unlimited?:boolean;
89
+ }
90
+ }
91
+ }