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
package/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ### v2.25.1 (2023-07-19)
2
+ * * *
3
+ * Fix typescript typings reference issue
4
+
5
+ ### v2.25.0 (2023-07-19)
6
+ * * *
7
+ * Add typescript typings
8
+
1
9
  ### v2.24.0 (2023-06-30)
2
10
  * * *
3
11
 
package/lib/chargebee.js CHANGED
@@ -11,7 +11,7 @@ ChargeBee._env = {
11
11
  hostSuffix: '.chargebee.com',
12
12
  apiPath: '/api/v2',
13
13
  timeout: 80000,
14
- clientVersion: 'v2.24.0',
14
+ clientVersion: 'v2.25.1',
15
15
  port: 443,
16
16
  timemachineWaitInMillis: 3000,
17
17
  exportWaitInMillis: 3000
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name":"chargebee",
3
- "version":"2.24.0",
3
+ "version":"2.25.1",
4
4
  "description":"A library for integrating with ChargeBee.",
5
5
  "keywords":[
6
6
  "payments",
@@ -11,6 +11,7 @@
11
11
  "homepage":"http://github.com/chargebee/chargebee-node",
12
12
  "author":"Ajit <ajit@chargebee.com> (https://www.chargebee.com)",
13
13
  "main":"lib/chargebee.js",
14
+ "types": "types/index.d.ts",
14
15
  "dependencies":{
15
16
  "q" : ">=1.0.1",
16
17
  "safer-buffer": "2.1.2"
@@ -0,0 +1,80 @@
1
+ declare module 'chargebee' {
2
+ export class ChargebeeRequest<T> {
3
+ setIdempotencyKey(idempotencyKey: string): this;
4
+ request(): Promise<T>;
5
+ headers(headers : {[key : string] : string}): this;
6
+ }
7
+ type AccountHolderType = 'individual' | 'company'
8
+ type AccountReceivablesHandling = 'schedule_payment_collection' | 'no_action' | 'write_off'
9
+ type AccountType = 'checking' | 'current' | 'savings' | 'business_checking'
10
+ type Action = 'upsert' | 'remove'
11
+ type ApiVersion = 'v1' | 'v2'
12
+ type ApplyOn = 'specific_item_price' | 'invoice_amount'
13
+ type AutoCollection = 'off' | 'on'
14
+ type AvalaraSaleType = 'consumed' | 'wholesale' | 'vendor_use' | 'retail'
15
+ type BillingAlignmentMode = 'immediate' | 'delayed'
16
+ type BillingDateMode = 'manually_set' | 'using_defaults'
17
+ type BillingDayOfWeekMode = 'manually_set' | 'using_defaults'
18
+ type ChangeOption = 'immediately' | 'specific_date'
19
+ type Channel = 'app_store' | 'web' | 'play_store'
20
+ type ChargeModel = 'full_charge' | 'prorate'
21
+ type ChargeOnEvent = 'subscription_creation' | 'subscription_activation' | 'subscription_trial_start' | 'contract_termination' | 'plan_activation' | 'on_demand'
22
+ type ChargeOnOption = 'on_event' | 'immediately'
23
+ type ChargesHandling = 'add_to_unbilled_charges' | 'invoice_immediately'
24
+ type ContractTermCancelOption = 'end_of_contract_term' | 'terminate_immediately'
25
+ type CreditOptionForCurrentTermCharges = 'none' | 'prorate' | 'full'
26
+ type CreditType = 'general' | 'loyalty_credits' | 'referral_rewards'
27
+ type CustomerType = 'industrial' | 'residential' | 'business' | 'senior_citizen'
28
+ type DedupeOption = 'update_existing' | 'skip'
29
+ type DispositionType = 'attachment' | 'inline'
30
+ type DunningType = 'offline' | 'auto_collect' | 'direct_debit'
31
+ type DurationType = 'limited_period' | 'one_time' | 'forever'
32
+ type EcheckType = 'web' | 'ppd' | 'ccd'
33
+ type EinvoicingMethod = 'automatic' | 'manual' | 'site_default'
34
+ type EndScheduleOn = 'after_number_of_intervals' | 'specific_date' | 'subscription_end'
35
+ type EntityCode = 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h' | 'i' | 'j' | 'k' | 'l' | 'm' | 'n' | 'p' | 'q' | 'r' | 'med2' | 'med1'
36
+ type EntityType = 'item' | 'product' | 'coupon' | 'addon' | 'item_price' | 'business_entity' | 'subscription' | 'item_family' | 'credit_note' | 'quote' | 'variant' | 'invoice' | 'plan' | 'transaction' | 'customer' | 'order'
37
+ type EventName = 'cancellation_page_loaded'
38
+ type EventType = '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'
39
+ type ExportType = 'data' | 'import_friendly_data'
40
+ type FreePeriodUnit = 'week' | 'month' | 'year' | 'day'
41
+ type FriendOfferType = 'coupon_code' | 'coupon' | 'none'
42
+ type Gateway = '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'
43
+ type HierarchyOperationType = 'complete_hierarchy' | 'subordinates' | 'path_to_root'
44
+ type InvoiceDunningHandling = 'stop' | 'continue'
45
+ type ItemType = 'charge' | 'addon' | 'plan'
46
+ type Layout = 'in_app' | 'full_page'
47
+ type NotifyReferralSystem = 'all_invoices' | 'none' | 'first_paid_conversion'
48
+ type OfflinePaymentMethod = 'bank_transfer' | 'no_preference' | 'ach_credit' | 'boleto' | 'check' | 'sepa_credit' | 'cash'
49
+ type OnEvent = 'subscription_creation' | 'subscription_activation' | 'subscription_trial_start' | 'contract_termination' | 'plan_activation'
50
+ type Operation = 'create' | 'update' | 'delete'
51
+ type OperationType = 'add' | 'remove'
52
+ type PauseOption = 'end_of_term' | 'billing_cycles' | 'immediately' | 'specific_date'
53
+ type PaymentMethod = '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'
54
+ type PaymentMethodType = 'giropay' | 'alipay' | 'ideal' | 'google_pay' | 'netbanking_emandates' | 'dotpay' | 'unionpay' | 'direct_debit' | 'generic' | 'sofort' | 'amazon_payments' | 'upi' | 'apple_pay' | 'bancontact' | 'paypal_express_checkout' | 'wechat_pay' | 'card'
55
+ type PaymentVoucherType = 'boleto'
56
+ type PeriodUnit = 'week' | 'month' | 'year' | 'day'
57
+ type PriceType = 'tax_exclusive' | 'tax_inclusive'
58
+ type PricingModel = 'volume' | 'per_unit' | 'tiered' | 'flat_fee' | 'stairstep'
59
+ type ReferralSystem = 'referral_candy' | 'friendbuy' | 'referral_saasquatch'
60
+ type ReferrerRewardType = 'custom_promotional_credit' | 'referral_direct_reward' | 'custom_revenue_percent_based' | 'none'
61
+ type RefundableCreditsHandling = 'schedule_refund' | 'no_action'
62
+ type ReportBy = 'product' | 'invoice' | 'subscription' | 'customer'
63
+ type ResumeOption = 'immediately' | 'specific_date'
64
+ type Role = 'backup' | 'none' | 'primary'
65
+ type ScheduleType = 'immediate' | 'specific_dates' | 'fixed_intervals'
66
+ type Source = 'admin_console' | 'system' | 'scheduled_job' | 'js_api' | 'bulk_operation' | 'hosted_page' | 'migration' | 'api' | 'none' | 'portal' | 'external_service'
67
+ type TaxExemptReason = 'high_value_physical_goods' | 'tax_not_configured' | 'reverse_charge' | 'zero_rated' | 'customer_exempt' | 'region_non_taxable' | 'zero_value_item' | 'export' | 'product_exempt'
68
+ type TaxJurisType = 'special' | 'country' | 'unincorporated' | 'other' | 'city' | 'federal' | 'county' | 'state'
69
+ type TaxOverrideReason = 'id_exempt' | 'customer_exempt' | 'export'
70
+ type Taxability = 'taxable' | 'exempt'
71
+ type TaxjarExemptionCategory = 'other' | 'wholesale' | 'government'
72
+ type TrialEndAction = 'activate_subscription' | 'plan_default' | 'cancel_subscription' | 'site_default'
73
+ type Type = 'giropay' | 'alipay' | 'ideal' | 'google_pay' | 'netbanking_emandates' | 'dotpay' | 'unionpay' | 'direct_debit' | 'generic' | 'sofort' | 'amazon_payments' | 'upi' | 'apple_pay' | 'bancontact' | 'paypal_express_checkout' | 'wechat_pay' | 'card'
74
+ type UnbilledChargesHandling = 'invoice' | 'no_action'
75
+ type UnbilledChargesOption = 'invoice' | 'delete'
76
+ type UnpaidInvoicesHandling = 'schedule_payment_collection' | 'no_action'
77
+ type ValidationStatus = 'valid' | 'partially_valid' | 'invalid' | 'not_validated'
78
+ type VoucherType = 'boleto'
79
+
80
+ }
@@ -0,0 +1,92 @@
1
+ ///<reference path='./resources/Address.d.ts' />
2
+ ///<reference path='./resources/AttachedItem.d.ts' />
3
+ ///<reference path='./resources/Card.d.ts' />
4
+ ///<reference path='./resources/Comment.d.ts' />
5
+ ///<reference path='./resources/Coupon.d.ts' />
6
+ ///<reference path='./resources/CouponCode.d.ts' />
7
+ ///<reference path='./resources/CouponSet.d.ts' />
8
+ ///<reference path='./resources/CreditNote.d.ts' />
9
+ ///<reference path='./resources/Customer.d.ts' />
10
+ ///<reference path='./resources/DifferentialPrice.d.ts' />
11
+ ///<reference path='./resources/EntitlementOverride.d.ts' />
12
+ ///<reference path='./resources/Estimate.d.ts' />
13
+ ///<reference path='./resources/Event.d.ts' />
14
+ ///<reference path='./resources/Export.d.ts' />
15
+ ///<reference path='./resources/Feature.d.ts' />
16
+ ///<reference path='./resources/Gift.d.ts' />
17
+ ///<reference path='./resources/HostedPage.d.ts' />
18
+ ///<reference path='./resources/InAppSubscription.d.ts' />
19
+ ///<reference path='./resources/Invoice.d.ts' />
20
+ ///<reference path='./resources/Item.d.ts' />
21
+ ///<reference path='./resources/ItemEntitlement.d.ts' />
22
+ ///<reference path='./resources/ItemFamily.d.ts' />
23
+ ///<reference path='./resources/ItemPrice.d.ts' />
24
+ ///<reference path='./resources/NonSubscription.d.ts' />
25
+ ///<reference path='./resources/Order.d.ts' />
26
+ ///<reference path='./resources/PaymentIntent.d.ts' />
27
+ ///<reference path='./resources/PaymentSource.d.ts' />
28
+ ///<reference path='./resources/PaymentVoucher.d.ts' />
29
+ ///<reference path='./resources/PortalSession.d.ts' />
30
+ ///<reference path='./resources/PromotionalCredit.d.ts' />
31
+ ///<reference path='./resources/Purchase.d.ts' />
32
+ ///<reference path='./resources/Quote.d.ts' />
33
+ ///<reference path='./resources/ResourceMigration.d.ts' />
34
+ ///<reference path='./resources/SiteMigrationDetail.d.ts' />
35
+ ///<reference path='./resources/Subscription.d.ts' />
36
+ ///<reference path='./resources/SubscriptionEntitlement.d.ts' />
37
+ ///<reference path='./resources/TimeMachine.d.ts' />
38
+ ///<reference path='./resources/Token.d.ts' />
39
+ ///<reference path='./resources/Transaction.d.ts' />
40
+ ///<reference path='./resources/UnbilledCharge.d.ts' />
41
+ ///<reference path='./resources/Usage.d.ts' />
42
+ ///<reference path='./resources/VirtualBankAccount.d.ts' />
43
+
44
+ declare module 'chargebee' {
45
+ class Chargebee {
46
+ static configure({ site, api_key }: { site: string; api_key: string });
47
+ static address: Address.AddressResource;
48
+ static attached_item: AttachedItem.AttachedItemResource;
49
+ static card: Card.CardResource;
50
+ static comment: Comment.CommentResource;
51
+ static coupon: Coupon.CouponResource;
52
+ static coupon_code: CouponCode.CouponCodeResource;
53
+ static coupon_set: CouponSet.CouponSetResource;
54
+ static credit_note: CreditNote.CreditNoteResource;
55
+ static customer: Customer.CustomerResource;
56
+ static differential_price: DifferentialPrice.DifferentialPriceResource;
57
+ static entitlement_override: EntitlementOverride.EntitlementOverrideResource;
58
+ static estimate: Estimate.EstimateResource;
59
+ static event: Event.EventResource;
60
+ static export: Export.ExportResource;
61
+ static feature: Feature.FeatureResource;
62
+ static gift: Gift.GiftResource;
63
+ static hosted_page: HostedPage.HostedPageResource;
64
+ static in_app_subscription: InAppSubscription.InAppSubscriptionResource;
65
+ static invoice: Invoice.InvoiceResource;
66
+ static item: Item.ItemResource;
67
+ static item_entitlement: ItemEntitlement.ItemEntitlementResource;
68
+ static item_family: ItemFamily.ItemFamilyResource;
69
+ static item_price: ItemPrice.ItemPriceResource;
70
+ static non_subscription: NonSubscription.NonSubscriptionResource;
71
+ static order: Order.OrderResource;
72
+ static payment_intent: PaymentIntent.PaymentIntentResource;
73
+ static payment_source: PaymentSource.PaymentSourceResource;
74
+ static payment_voucher: PaymentVoucher.PaymentVoucherResource;
75
+ static portal_session: PortalSession.PortalSessionResource;
76
+ static promotional_credit: PromotionalCredit.PromotionalCreditResource;
77
+ static purchase: Purchase.PurchaseResource;
78
+ static quote: Quote.QuoteResource;
79
+ static resource_migration: ResourceMigration.ResourceMigrationResource;
80
+ static site_migration_detail: SiteMigrationDetail.SiteMigrationDetailResource;
81
+ static subscription: Subscription.SubscriptionResource;
82
+ static subscription_entitlement: SubscriptionEntitlement.SubscriptionEntitlementResource;
83
+ static time_machine: TimeMachine.TimeMachineResource;
84
+ static token: Token.TokenResource;
85
+ static transaction: Transaction.TransactionResource;
86
+ static unbilled_charge: UnbilledCharge.UnbilledChargeResource;
87
+ static usage: Usage.UsageResource;
88
+ static virtual_bank_account: VirtualBankAccount.VirtualBankAccountResource;
89
+
90
+ }
91
+ export default Chargebee;
92
+ }
@@ -0,0 +1,59 @@
1
+ ///<reference path='./../core.d.ts'/>
2
+ declare module 'chargebee' {
3
+ export interface Address {
4
+
5
+ label:string;
6
+ first_name?:string;
7
+ last_name?:string;
8
+ email?:string;
9
+ company?:string;
10
+ phone?:string;
11
+ addr?:string;
12
+ extended_addr?:string;
13
+ extended_addr2?:string;
14
+ city?:string;
15
+ state_code?:string;
16
+ state?:string;
17
+ country?:string;
18
+ zip?:string;
19
+ validation_status?:ValidationStatus;
20
+ subscription_id:string;
21
+ }
22
+ export namespace Address {
23
+ export class AddressResource {
24
+ retrieve(input:RetrieveInputParam):ChargebeeRequest<RetrieveResponse>;
25
+ update(input:UpdateInputParam):ChargebeeRequest<UpdateResponse>;
26
+ }
27
+ export interface RetrieveResponse {
28
+ address:Address;
29
+ }
30
+ export interface RetrieveInputParam {
31
+
32
+ subscription_id:string;
33
+ label:string;
34
+ }
35
+ export interface UpdateResponse {
36
+ address:Address;
37
+ }
38
+ export interface UpdateInputParam {
39
+
40
+ subscription_id:string;
41
+ label:string;
42
+ first_name?:string;
43
+ last_name?:string;
44
+ email?:string;
45
+ company?:string;
46
+ phone?:string;
47
+ addr?:string;
48
+ extended_addr?:string;
49
+ extended_addr2?:string;
50
+ city?:string;
51
+ state_code?:string;
52
+ state?:string;
53
+ zip?:string;
54
+ country?:string;
55
+ validation_status?:ValidationStatus;
56
+ }
57
+
58
+ }
59
+ }
@@ -0,0 +1,27 @@
1
+ ///<reference path='./../core.d.ts'/>
2
+ declare module 'chargebee' {
3
+ export interface AdvanceInvoiceSchedule {
4
+
5
+ id:string;
6
+ schedule_type?:'specific_dates' | 'fixed_intervals';
7
+ fixed_interval_schedule?:AdvanceInvoiceSchedule.FixedIntervalSchedule;
8
+ specific_dates_schedule?:AdvanceInvoiceSchedule.SpecificDatesSchedule;
9
+ }
10
+ export namespace AdvanceInvoiceSchedule {
11
+
12
+
13
+ export interface FixedIntervalSchedule {
14
+ end_schedule_on?:EndScheduleOn;
15
+ number_of_occurrences?:number;
16
+ days_before_renewal?:number;
17
+ end_date?:number;
18
+ created_at?:number;
19
+ terms_to_charge?:number;
20
+ }
21
+ export interface SpecificDatesSchedule {
22
+ terms_to_charge?:number;
23
+ date?:number;
24
+ created_at?:number;
25
+ }
26
+ }
27
+ }
@@ -0,0 +1,85 @@
1
+ ///<reference path='./../core.d.ts'/>
2
+ declare module 'chargebee' {
3
+ export interface AttachedItem {
4
+
5
+ id:string;
6
+ parent_item_id:string;
7
+ item_id:string;
8
+ type:'optional' | 'mandatory' | 'recommended';
9
+ status?:'archived' | 'deleted' | 'active';
10
+ quantity?:number;
11
+ quantity_in_decimal?:string;
12
+ billing_cycles?:number;
13
+ charge_on_event:ChargeOnEvent;
14
+ charge_once:boolean;
15
+ created_at:number;
16
+ resource_version?:number;
17
+ updated_at?:number;
18
+ channel?:Channel;
19
+ }
20
+ export namespace AttachedItem {
21
+ export class AttachedItemResource {
22
+ retrieve(attached_item_id:string, input:RetrieveInputParam):ChargebeeRequest<RetrieveResponse>;
23
+ update(attached_item_id:string, input:UpdateInputParam):ChargebeeRequest<UpdateResponse>;
24
+ list(item_id:string, input?:ListInputParam):ChargebeeRequest<ListResponse>;
25
+ create(item_id:string, input:CreateInputParam):ChargebeeRequest<CreateResponse>;
26
+ delete(attached_item_id:string, input:DeleteInputParam):ChargebeeRequest<DeleteResponse>;
27
+ }
28
+ export interface RetrieveResponse {
29
+ attached_item:AttachedItem;
30
+ }
31
+ export interface RetrieveInputParam {
32
+
33
+ parent_item_id:string;
34
+ }
35
+ export interface UpdateResponse {
36
+ attached_item:AttachedItem;
37
+ }
38
+ export interface UpdateInputParam {
39
+
40
+ parent_item_id:string;
41
+ type?:'optional' | 'mandatory' | 'recommended';
42
+ billing_cycles?:number;
43
+ quantity?:number;
44
+ quantity_in_decimal?:string;
45
+ charge_on_event?:ChargeOnEvent;
46
+ charge_once?:boolean;
47
+ }
48
+ export interface ListResponse {
49
+ list:{attached_item:AttachedItem}[];
50
+ next_offset?:string;
51
+ }
52
+ export interface ListInputParam {
53
+ [key: string]: string | number | object | boolean;
54
+ limit?:number;
55
+ offset?:string;
56
+ id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
57
+ item_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
58
+ type?:{in?:string,is?:'optional' | 'mandatory' | 'recommended',is_not?:'optional' | 'mandatory' | 'recommended',not_in?:string};
59
+ item_type?:{in?:string,is?:'charge' | 'addon' | 'plan',is_not?:'charge' | 'addon' | 'plan',not_in?:string};
60
+ 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};
61
+ updated_at?:{after?:string,before?:string,between?:string,on?:string};
62
+ }
63
+ export interface CreateResponse {
64
+ attached_item:AttachedItem;
65
+ }
66
+ export interface CreateInputParam {
67
+
68
+ item_id:string;
69
+ type?:'optional' | 'mandatory' | 'recommended';
70
+ billing_cycles?:number;
71
+ quantity?:number;
72
+ quantity_in_decimal?:string;
73
+ charge_on_event?:ChargeOnEvent;
74
+ charge_once?:boolean;
75
+ }
76
+ export interface DeleteResponse {
77
+ attached_item:AttachedItem;
78
+ }
79
+ export interface DeleteInputParam {
80
+
81
+ parent_item_id:string;
82
+ }
83
+
84
+ }
85
+ }
@@ -0,0 +1,89 @@
1
+ ///<reference path='./../core.d.ts'/>
2
+ declare module 'chargebee' {
3
+ export interface Card {
4
+
5
+ payment_source_id:string;
6
+ status:'valid' | 'expiring' | 'expired';
7
+ gateway:Gateway;
8
+ gateway_account_id?:string;
9
+ ref_tx_id?:string;
10
+ first_name?:string;
11
+ last_name?:string;
12
+ iin:string;
13
+ last4:string;
14
+ card_type?:'discover' | 'bancontact' | 'other' | 'visa' | 'jcb' | 'diners_club' | 'mastercard' | 'not_applicable' | 'american_express';
15
+ funding_type:'not_known' | 'prepaid' | 'not_applicable' | 'credit' | 'debit';
16
+ expiry_month:number;
17
+ expiry_year:number;
18
+ issuing_country?:string;
19
+ billing_addr1?:string;
20
+ billing_addr2?:string;
21
+ billing_city?:string;
22
+ billing_state_code?:string;
23
+ billing_state?:string;
24
+ billing_country?:string;
25
+ billing_zip?:string;
26
+ created_at:number;
27
+ resource_version?:number;
28
+ updated_at?:number;
29
+ ip_address?:string;
30
+ powered_by?:'giropay' | 'bancontact' | 'ideal' | 'latam_local_card' | 'not_applicable' | 'sofort' | 'card';
31
+ customer_id:string;
32
+ masked_number?:string;
33
+ }
34
+ export namespace Card {
35
+ export class CardResource {
36
+ copy_card_for_customer(customer_id:string, input:CopyCardForCustomerInputParam):ChargebeeRequest<CopyCardForCustomerResponse>;
37
+ retrieve(customer_id:string):ChargebeeRequest<RetrieveResponse>;
38
+ switch_gateway_for_customer(customer_id:string, input:SwitchGatewayForCustomerInputParam):ChargebeeRequest<SwitchGatewayForCustomerResponse>;
39
+ delete_card_for_customer(customer_id:string):ChargebeeRequest<DeleteCardForCustomerResponse>;
40
+ update_card_for_customer(customer_id:string, input:UpdateCardForCustomerInputParam):ChargebeeRequest<UpdateCardForCustomerResponse>;
41
+ }
42
+ export interface CopyCardForCustomerResponse {
43
+ third_party_payment_method:ThirdPartyPaymentMethod;
44
+ }
45
+ export interface CopyCardForCustomerInputParam {
46
+
47
+ gateway_account_id:string;
48
+ }
49
+ export interface RetrieveResponse {
50
+ card:Card;
51
+ }
52
+
53
+ export interface SwitchGatewayForCustomerResponse {
54
+ customer:Customer;
55
+ card:Card;
56
+ }
57
+ export interface SwitchGatewayForCustomerInputParam {
58
+
59
+ gateway_account_id:string;
60
+ }
61
+ export interface DeleteCardForCustomerResponse {
62
+ customer:Customer;
63
+ }
64
+
65
+ export interface UpdateCardForCustomerResponse {
66
+ customer:Customer;
67
+ card:Card;
68
+ }
69
+ export interface UpdateCardForCustomerInputParam {
70
+
71
+ gateway_account_id?:string;
72
+ tmp_token?:string;
73
+ first_name?:string;
74
+ last_name?:string;
75
+ number:string;
76
+ expiry_month:number;
77
+ expiry_year:number;
78
+ cvv?:string;
79
+ billing_addr1?:string;
80
+ billing_addr2?:string;
81
+ billing_city?:string;
82
+ billing_state_code?:string;
83
+ billing_state?:string;
84
+ billing_zip?:string;
85
+ billing_country?:string;
86
+ }
87
+
88
+ }
89
+ }
@@ -0,0 +1,53 @@
1
+ ///<reference path='./../core.d.ts'/>
2
+ declare module 'chargebee' {
3
+ export interface Comment {
4
+
5
+ id:string;
6
+ entity_type:EntityType;
7
+ added_by?:string;
8
+ notes:string;
9
+ created_at:number;
10
+ type:'system' | 'user';
11
+ entity_id:string;
12
+ }
13
+ export namespace Comment {
14
+ export class CommentResource {
15
+ delete(comment_id:string):ChargebeeRequest<DeleteResponse>;
16
+ retrieve(comment_id:string):ChargebeeRequest<RetrieveResponse>;
17
+ list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
18
+ create(input:CreateInputParam):ChargebeeRequest<CreateResponse>;
19
+ }
20
+ export interface DeleteResponse {
21
+ comment:Comment;
22
+ }
23
+
24
+ export interface RetrieveResponse {
25
+ comment:Comment;
26
+ }
27
+
28
+ export interface ListResponse {
29
+ list:{comment:Comment}[];
30
+ next_offset?:string;
31
+ }
32
+ export interface ListInputParam {
33
+ [key: string]: string | number | object | boolean;
34
+ limit?:number;
35
+ offset?:string;
36
+ entity_type?:'item' | 'product' | 'coupon' | 'addon' | 'item_price' | 'business_entity' | 'subscription' | 'item_family' | 'credit_note' | 'quote' | 'variant' | 'invoice' | 'plan' | 'transaction' | 'customer' | 'order';
37
+ entity_id?:string;
38
+ created_at?:{after?:string,before?:string,between?:string,on?:string};
39
+ sort_by?:{asc?:'created_at',desc?:'created_at'};
40
+ }
41
+ export interface CreateResponse {
42
+ comment:Comment;
43
+ }
44
+ export interface CreateInputParam {
45
+
46
+ entity_type:EntityType;
47
+ entity_id:string;
48
+ notes:string;
49
+ added_by?:string;
50
+ }
51
+
52
+ }
53
+ }
@@ -0,0 +1,16 @@
1
+ ///<reference path='./../core.d.ts'/>
2
+ declare module 'chargebee' {
3
+ export interface Contact {
4
+
5
+ id:string;
6
+ first_name?:string;
7
+ last_name?:string;
8
+ email:string;
9
+ phone?:string;
10
+ label?:string;
11
+ enabled:boolean;
12
+ send_account_email:boolean;
13
+ send_billing_email:boolean;
14
+ }
15
+
16
+ }
@@ -0,0 +1,19 @@
1
+ ///<reference path='./../core.d.ts'/>
2
+ declare module 'chargebee' {
3
+ export interface ContractTerm {
4
+
5
+ id:string;
6
+ status:'active' | 'cancelled' | 'completed' | 'terminated';
7
+ contract_start:number;
8
+ contract_end:number;
9
+ billing_cycle:number;
10
+ action_at_term_end:'cancel' | 'renew_once' | 'renew' | 'evergreen';
11
+ total_contract_value:number;
12
+ total_contract_value_before_tax:number;
13
+ cancellation_cutoff_period?:number;
14
+ created_at:number;
15
+ subscription_id:string;
16
+ remaining_billing_cycles?:number;
17
+ }
18
+
19
+ }