chargebee 2.35.1 → 2.37.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,81 @@
1
+ ### v2.37.0 (2024-07-03)
2
+ * * *
3
+
4
+ #### New resources:
5
+ * Currency has been added.
6
+ * PricingPageSession Transfer has been added.
7
+
8
+ #### New Enum
9
+ * cancel_option Enum has been added.
10
+
11
+ #### New Enum values:
12
+ * ONLINE_BANKING_POLAND has been added in PaymentMethod enum.
13
+ * ONLINE_BANKING_POLAND has been added in PaymentMethodType enum.
14
+ * ONLINE_BANKING_POLAND has been added in Type enum.
15
+ * DRAFT has been added in Ramp enum.
16
+
17
+ #### New Input parameters:
18
+ * cancel_option has been added to Estimate#CancelSubscriptionRequest, Estimate#CancelSubscriptionForItemsRequest.
19
+ * cancel_option has been added to Subscription#CancelForItemsRequest, Subscription#CancelRequest.
20
+ * statement_descriptor[descriptor] has been added to Purchase#ChargeRequest.
21
+
22
+ #### New Attributes:
23
+ * tax_origin has been added to Invoice.
24
+ * tax_origin has been added to CreditNote.
25
+
26
+ ### v2.36.0 (2024-05-28)
27
+ * * *
28
+
29
+ #### New resources:
30
+ * BusinessEntity has been added.
31
+ * BusinessEntity Transfer has been added.
32
+
33
+
34
+ #### New Enum values:
35
+ * NUVEI has been added in Gateway enum.
36
+
37
+
38
+ #### New Attributes:
39
+ * site_details_at_creation has been added to CreditNote.
40
+ * site_details_at_creation has been added to Invoice.
41
+
42
+
43
+ #### New Input parameters:
44
+ * tax_providers_fields[provider_name] has been added to Addon#CreateRequest, Addon#UpdateRequest.
45
+ * tax_providers_fields[field_id] has been added to Addon#CreateRequest, Addon#UpdateRequest.
46
+ * tax_providers_fields[field_value] has been added to Addon#CreateRequest, #UpdateRequest.
47
+
48
+ * tax_providers_fields[provider_name] has been added to Customer#CreateRequest, Customer#UpdateRequest, Customer#MoveRequest.
49
+ * tax_providers_fields[field_id] has been added to Customer#CreateRequest, Customer#UpdateRequest, Customer#MoveRequest.
50
+ * tax_providers_fields[field_value] has been added to Customer#CreateRequest, Customer#UpdateRequest, Customer#MoveRequest..
51
+
52
+ * tax_providers_fields[provider_name] has been added to Estimate#CreateSubscriptionRequest, Estimate#CreateSubItemEstimateRequest, Estimate#CreateInvoiceRequest, CreateInvoiceForItemsRequest.
53
+ * tax_providers_fields[field_id] has been added to Estimate#CreateSubscriptionRequest, Estimate#CreateSubItemEstimateRequest, Estimate#CreateInvoiceRequest, CreateInvoiceForItemsRequest.
54
+ * tax_providers_fields[field_value] has been added to Estimate#CreateSubscriptionRequest, Estimate#CreateSubItemEstimateRequest, Estimate#CreateInvoiceRequest, CreateInvoiceForItemsRequest.
55
+
56
+ * tax_providers_fields[provider_name] has been added to Invoice#CreateRequest, Invoice#CreateForChargeItemsAndChargesRequest, Invoice#ChargeRequest.
57
+ * tax_providers_fields[field_id] has been added to Invoice#CreateRequest, Invoice#CreateForChargeItemsAndChargesRequest, Invoice#ChargeRequest.
58
+ * tax_providers_fields[field_value] has been added to Invoice#CreateRequest, Invoice#CreateForChargeItemsAndChargesRequest, Invoice#ChargeRequest.
59
+
60
+ * tax_providers_fields[provider_name] has been added to ItemPrice#CreateRequest, ItemPrice#UpdateRequest.
61
+ * tax_providers_fields[field_id] has been added to ItemPrice#CreateRequest, ItemPrice#UpdateRequest.
62
+ * tax_providers_fields[field_value] has been added to ItemPrice#CreateRequest, ItemPrice#UpdateRequest.
63
+
64
+ * tax_providers_fields[provider_name] has been added to Plan#CreateRequest, Plan#UpdateRequest.
65
+ * tax_providers_fields[field_id] has been added to Plan#CreateRequest, Plan#UpdateRequest.
66
+ * tax_providers_fields[field_value] has been added to Plan#CreateRequest, Plan#UpdateRequest.
67
+
68
+ * tax_providers_fields[provider_name] has been added to Quote#EditOneTimeQuoteRequest, Quote#CreateForOnetimeChargesRequest, Quote#CreateForChargeItemsAndChargesRequest, Quote#EditForChargeItemsAndChargesRequest.
69
+ * tax_providers_fields[field_id] has been added to Quote#EditOneTimeQuoteRequest, Quote#CreateForOnetimeChargesRequest, Quote#CreateForChargeItemsAndChargesRequest, Quote#EditForChargeItemsAndChargesRequest.
70
+ * tax_providers_fields[field_value] has been added to Quote#EditOneTimeQuoteRequest, Quote#CreateForOnetimeChargesRequest, Quote#CreateForChargeItemsAndChargesRequest, Quote#EditForChargeItemsAndChargesRequest.
71
+
72
+ * tax_providers_fields[provider_name] has been added to UnbilledCharge#CreateUnbilledChargeRequest, UnbilledCharge#CreateRequest.
73
+ * tax_providers_fields[field_id] has been added to UnbilledCharge#CreateUnbilledChargeRequest, UnbilledCharge#CreateRequest.
74
+ * tax_providers_fields[field_value] has been added to UnbilledCharge#CreateUnbilledChargeRequest, UnbilledCharge#CreateRequest.
75
+
76
+ * line_items[entity_type] has been added to CreditNote#CreateRequest.
77
+ * line_items[entity_id] has been added to CreditNote#CreateRequest.
78
+
1
79
  ### v2.35.1 (2024-05-02)
2
80
  * * *
3
81
 
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.35.1',
14
+ clientVersion: 'v2.37.0',
15
15
  port: 443,
16
16
  timemachineWaitInMillis: 3000,
17
17
  exportWaitInMillis: 3000
@@ -442,6 +442,7 @@ var _endpoints = {
442
442
  ],
443
443
  "hierarchy": [],
444
444
  "contact": [],
445
+ "business_entity_transfer": [],
445
446
  "token": [],
446
447
  "payment_source": [
447
448
  [
@@ -2714,6 +2715,22 @@ var _endpoints = {
2714
2715
  true
2715
2716
  ]
2716
2717
  ],
2718
+ "business_entity": [
2719
+ [
2720
+ "create_transfers",
2721
+ "POST",
2722
+ "/business_entities",
2723
+ "/transfers",
2724
+ false
2725
+ ],
2726
+ [
2727
+ "get_transfers",
2728
+ "GET",
2729
+ "/business_entities",
2730
+ "/transfers",
2731
+ false
2732
+ ]
2733
+ ],
2717
2734
  "purchase": [
2718
2735
  [
2719
2736
  "create",
@@ -2760,6 +2777,50 @@ var _endpoints = {
2760
2777
  true
2761
2778
  ]
2762
2779
  ],
2780
+ "currency": [
2781
+ [
2782
+ "list",
2783
+ "GET",
2784
+ "/currencies",
2785
+ "/list",
2786
+ false
2787
+ ],
2788
+ [
2789
+ "retrieve",
2790
+ "GET",
2791
+ "/currencies",
2792
+ null,
2793
+ true
2794
+ ],
2795
+ [
2796
+ "create",
2797
+ "POST",
2798
+ "/currencies",
2799
+ null,
2800
+ false
2801
+ ],
2802
+ [
2803
+ "update",
2804
+ "POST",
2805
+ "/currencies",
2806
+ null,
2807
+ true
2808
+ ],
2809
+ [
2810
+ "add_schedule",
2811
+ "POST",
2812
+ "/currencies",
2813
+ "/add_schedule",
2814
+ true
2815
+ ],
2816
+ [
2817
+ "remove_schedule",
2818
+ "POST",
2819
+ "/currencies",
2820
+ "/remove_schedule",
2821
+ true
2822
+ ]
2823
+ ],
2763
2824
  "ramp": [
2764
2825
  [
2765
2826
  "create_for_subscription",
@@ -2829,6 +2890,22 @@ var _endpoints = {
2829
2890
  false
2830
2891
  ]
2831
2892
  ],
2832
- "installment_detail": []
2893
+ "installment_detail": [],
2894
+ "pricing_page_session": [
2895
+ [
2896
+ "create_for_new_subscription",
2897
+ "POST",
2898
+ "/pricing_page_sessions",
2899
+ "/create_for_new_subscription",
2900
+ false
2901
+ ],
2902
+ [
2903
+ "create_for_existing_subscription",
2904
+ "POST",
2905
+ "/pricing_page_sessions",
2906
+ "/create_for_existing_subscription",
2907
+ false
2908
+ ]
2909
+ ]
2833
2910
  };
2834
2911
  module.exports = _endpoints;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name":"chargebee",
3
- "version":"2.35.1",
3
+ "version":"2.37.0",
4
4
  "description":"A library for integrating with ChargeBee.",
5
5
  "keywords":[
6
6
  "payments",
package/types/core.d.ts CHANGED
@@ -12,78 +12,81 @@ declare module 'chargebee' {
12
12
  headers(headers : {[key : string] : string}): this;
13
13
  }
14
14
  type AccountHolderType = 'individual' | 'company'
15
- type AccountReceivablesHandling = 'schedule_payment_collection' | 'no_action' | 'write_off'
16
- type AccountType = 'checking' | 'current' | 'savings' | 'business_checking'
15
+ type AccountReceivablesHandling = 'no_action' | 'schedule_payment_collection' | 'write_off'
16
+ type AccountType = 'checking' | 'savings' | 'business_checking' | 'current'
17
17
  type Action = 'upsert' | 'remove'
18
18
  type ApiVersion = 'v1' | 'v2'
19
- type ApplyOn = 'specific_item_price' | 'invoice_amount'
20
- type AutoCollection = 'off' | 'on'
21
- type AvalaraSaleType = 'consumed' | 'wholesale' | 'vendor_use' | 'retail'
19
+ type ApplyOn = 'invoice_amount' | 'specific_item_price'
20
+ type AutoCollection = 'on' | 'off'
21
+ type AvalaraSaleType = 'wholesale' | 'retail' | 'consumed' | 'vendor_use'
22
22
  type BillingAlignmentMode = 'immediate' | 'delayed'
23
- type BillingDateMode = 'manually_set' | 'using_defaults'
24
- type BillingDayOfWeekMode = 'manually_set' | 'using_defaults'
25
- type ChangeOption = 'immediately' | 'specific_date'
26
- type Channel = 'app_store' | 'web' | 'play_store'
23
+ type BillingDateMode = 'using_defaults' | 'manually_set'
24
+ type BillingDayOfWeekMode = 'using_defaults' | 'manually_set'
25
+ type CancelOption = 'immediately' | 'end_of_term' | 'specific_date' | 'end_of_billing_term'
26
+ type ChangeOption = 'immediately' | 'end_of_term' | 'specific_date'
27
+ type Channel = 'web' | 'app_store' | 'play_store'
27
28
  type ChargeModel = 'full_charge' | 'prorate'
28
- type ChargeOnEvent = 'subscription_creation' | 'subscription_activation' | 'subscription_trial_start' | 'contract_termination' | 'plan_activation' | 'on_demand'
29
- type ChargeOnOption = 'on_event' | 'immediately'
30
- type ChargesHandling = 'add_to_unbilled_charges' | 'invoice_immediately'
31
- type ContractTermCancelOption = 'end_of_contract_term' | 'terminate_immediately'
29
+ type ChargeOnEvent = 'subscription_creation' | 'subscription_trial_start' | 'plan_activation' | 'subscription_activation' | 'contract_termination' | 'on_demand'
30
+ type ChargeOnOption = 'immediately' | 'on_event'
31
+ type ChargesHandling = 'invoice_immediately' | 'add_to_unbilled_charges'
32
+ type ContractTermCancelOption = 'terminate_immediately' | 'end_of_contract_term'
32
33
  type CreditOptionForCurrentTermCharges = 'none' | 'prorate' | 'full'
33
- type CreditType = 'general' | 'loyalty_credits' | 'referral_rewards'
34
- type CustomerType = 'industrial' | 'residential' | 'business' | 'senior_citizen'
35
- type DedupeOption = 'update_existing' | 'skip'
34
+ type CreditType = 'loyalty_credits' | 'referral_rewards' | 'general'
35
+ type CustomerType = 'residential' | 'business' | 'senior_citizen' | 'industrial'
36
+ type DedupeOption = 'skip' | 'update_existing'
37
+ type DirectDebitScheme = 'ach' | 'bacs' | 'sepa_core' | 'autogiro' | 'becs' | 'becs_nz' | 'pad' | 'not_applicable'
36
38
  type DispositionType = 'attachment' | 'inline'
37
- type DunningType = 'offline' | 'auto_collect' | 'direct_debit'
38
- type DurationType = 'limited_period' | 'one_time' | 'forever'
39
+ type DunningType = 'auto_collect' | 'offline' | 'direct_debit'
40
+ type DurationType = 'one_time' | 'forever' | 'limited_period'
39
41
  type EcheckType = 'web' | 'ppd' | 'ccd'
40
42
  type EinvoicingMethod = 'automatic' | 'manual' | 'site_default'
41
43
  type EndScheduleOn = 'after_number_of_intervals' | 'specific_date' | 'subscription_end'
42
- type EntityCode = 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h' | 'i' | 'j' | 'k' | 'l' | 'm' | 'n' | 'p' | 'q' | 'r' | 'med2' | 'med1'
43
- type EntityType = 'item' | 'product' | 'coupon' | 'addon' | 'item_price' | 'business_entity' | 'subscription' | 'item_family' | 'credit_note' | 'quote' | 'variant' | 'invoice' | 'plan' | 'transaction' | 'customer' | 'order' | 'price_variant'
44
+ type EntityCode = 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h' | 'i' | 'j' | 'k' | 'l' | 'm' | 'n' | 'p' | 'q' | 'r' | 'med1' | 'med2'
45
+ type EntityType = 'customer' | 'subscription' | 'coupon' | 'plan_item_price' | 'addon_item_price' | 'charge_item_price' | 'invoice' | 'quote' | 'credit_note' | 'transaction' | 'plan' | 'addon' | 'order' | 'item_family' | 'item' | 'item_price' | 'plan_item' | 'addon_item' | 'charge_item' | 'plan_price' | 'addon_price' | 'charge_price' | 'differential_price' | 'attached_item' | 'feature' | 'subscription_entitlement' | 'item_entitlement' | 'business_entity' | 'price_variant'
44
46
  type EventName = 'cancellation_page_loaded'
45
- type EventType = 'coupon_created' | 'coupon_updated' | 'coupon_deleted' | 'coupon_set_created' | 'coupon_set_updated' | 'coupon_set_deleted' | 'coupon_codes_added' | 'coupon_codes_deleted' | 'coupon_codes_updated' | 'customer_created' | 'customer_changed' | 'customer_deleted' | 'customer_moved_out' | 'customer_moved_in' | 'promotional_credits_added' | 'promotional_credits_deducted' | 'subscription_created' | 'subscription_created_with_backdating' | 'subscription_started' | 'subscription_trial_end_reminder' | 'subscription_activated' | 'subscription_activated_with_backdating' | 'subscription_changed' | 'subscription_trial_extended' | 'mrr_updated' | 'subscription_changed_with_backdating' | 'subscription_cancellation_scheduled' | 'subscription_cancellation_reminder' | 'subscription_cancelled' | 'subscription_canceled_with_backdating' | 'subscription_reactivated' | 'subscription_reactivated_with_backdating' | 'subscription_renewed' | 'subscription_scheduled_cancellation_removed' | 'subscription_changes_scheduled' | 'subscription_scheduled_changes_removed' | 'subscription_shipping_address_updated' | 'subscription_deleted' | 'subscription_paused' | 'subscription_pause_scheduled' | 'subscription_scheduled_pause_removed' | 'subscription_resumed' | 'subscription_resumption_scheduled' | 'subscription_scheduled_resumption_removed' | 'subscription_advance_invoice_schedule_added' | 'subscription_advance_invoice_schedule_updated' | 'subscription_advance_invoice_schedule_removed' | 'pending_invoice_created' | 'pending_invoice_updated' | 'invoice_generated' | 'invoice_generated_with_backdating' | 'invoice_updated' | 'invoice_deleted' | 'credit_note_created' | 'credit_note_created_with_backdating' | 'credit_note_updated' | 'credit_note_deleted' | 'invoice_installments_created' | 'invoice_installment_updated' | 'installment_config_created' | 'installment_config_deleted' | 'subscription_renewal_reminder' | 'add_usages_reminder' | 'transaction_created' | 'transaction_updated' | 'transaction_deleted' | 'payment_succeeded' | 'payment_failed' | 'payment_refunded' | 'payment_initiated' | 'refund_initiated' | 'authorization_succeeded' | 'authorization_voided' | 'card_added' | 'card_updated' | 'card_expiry_reminder' | 'card_expired' | 'card_deleted' | 'payment_source_added' | 'payment_source_updated' | 'payment_source_deleted' | 'payment_source_expiring' | 'payment_source_expired' | 'payment_source_locally_deleted' | 'virtual_bank_account_added' | 'virtual_bank_account_updated' | 'virtual_bank_account_deleted' | 'token_created' | 'token_consumed' | 'token_expired' | 'unbilled_charges_created' | 'unbilled_charges_voided' | 'unbilled_charges_deleted' | 'unbilled_charges_invoiced' | 'order_created' | 'order_updated' | 'order_cancelled' | 'order_delivered' | 'order_returned' | 'order_ready_to_process' | 'order_ready_to_ship' | 'order_deleted' | 'order_resent' | 'quote_created' | 'quote_updated' | 'quote_deleted' | 'tax_withheld_recorded' | 'tax_withheld_deleted' | 'tax_withheld_refunded' | 'gift_scheduled' | 'gift_unclaimed' | 'gift_claimed' | 'gift_expired' | 'gift_cancelled' | 'gift_updated' | 'hierarchy_created' | 'hierarchy_deleted' | 'payment_intent_created' | 'payment_intent_updated' | 'contract_term_created' | 'contract_term_renewed' | 'contract_term_terminated' | 'contract_term_completed' | 'contract_term_cancelled' | 'item_family_created' | 'item_family_updated' | 'item_family_deleted' | 'item_created' | 'item_updated' | 'item_deleted' | 'item_price_created' | 'item_price_updated' | 'item_price_deleted' | 'attached_item_created' | 'attached_item_updated' | 'attached_item_deleted' | 'differential_price_created' | 'differential_price_updated' | 'differential_price_deleted' | 'feature_created' | 'feature_updated' | 'feature_deleted' | 'feature_activated' | 'feature_reactivated' | 'feature_archived' | 'item_entitlements_updated' | 'entitlement_overrides_updated' | 'entitlement_overrides_removed' | 'item_entitlements_removed' | 'entitlement_overrides_auto_removed' | 'subscription_entitlements_created' | 'business_entity_created' | 'business_entity_updated' | 'business_entity_deleted' | 'customer_business_entity_changed' | 'subscription_business_entity_changed' | 'purchase_created' | 'voucher_created' | 'voucher_expired' | 'voucher_create_failed' | 'item_price_entitlements_updated' | 'item_price_entitlements_removed' | 'ramp_created' | 'ramp_deleted' | 'ramp_applied' | 'price_variant_created' | 'price_variant_updated' | 'price_variant_deleted'
47
+ type EventType = 'coupon_created' | 'coupon_updated' | 'coupon_deleted' | 'coupon_set_created' | 'coupon_set_updated' | 'coupon_set_deleted' | 'coupon_codes_added' | 'coupon_codes_deleted' | 'coupon_codes_updated' | 'customer_created' | 'customer_changed' | 'customer_deleted' | 'customer_moved_out' | 'customer_moved_in' | 'promotional_credits_added' | 'promotional_credits_deducted' | 'subscription_created' | 'subscription_created_with_backdating' | 'subscription_started' | 'subscription_trial_end_reminder' | 'subscription_activated' | 'subscription_activated_with_backdating' | 'subscription_changed' | 'subscription_trial_extended' | 'mrr_updated' | 'subscription_changed_with_backdating' | 'subscription_cancellation_scheduled' | 'subscription_cancellation_reminder' | 'subscription_cancelled' | 'subscription_canceled_with_backdating' | 'subscription_reactivated' | 'subscription_reactivated_with_backdating' | 'subscription_renewed' | 'subscription_scheduled_cancellation_removed' | 'subscription_changes_scheduled' | 'subscription_scheduled_changes_removed' | 'subscription_shipping_address_updated' | 'subscription_deleted' | 'subscription_paused' | 'subscription_pause_scheduled' | 'subscription_scheduled_pause_removed' | 'subscription_resumed' | 'subscription_resumption_scheduled' | 'subscription_scheduled_resumption_removed' | 'subscription_advance_invoice_schedule_added' | 'subscription_advance_invoice_schedule_updated' | 'subscription_advance_invoice_schedule_removed' | 'pending_invoice_created' | 'pending_invoice_updated' | 'invoice_generated' | 'invoice_generated_with_backdating' | 'invoice_updated' | 'invoice_deleted' | 'credit_note_created' | 'credit_note_created_with_backdating' | 'credit_note_updated' | 'credit_note_deleted' | 'invoice_installments_created' | 'invoice_installment_updated' | 'installment_config_created' | 'installment_config_deleted' | 'subscription_renewal_reminder' | 'add_usages_reminder' | 'transaction_created' | 'transaction_updated' | 'transaction_deleted' | 'payment_succeeded' | 'payment_failed' | 'payment_refunded' | 'payment_initiated' | 'refund_initiated' | 'authorization_succeeded' | 'authorization_voided' | 'card_added' | 'card_updated' | 'card_expiry_reminder' | 'card_expired' | 'card_deleted' | 'payment_source_added' | 'payment_source_updated' | 'payment_source_deleted' | 'payment_source_expiring' | 'payment_source_expired' | 'payment_source_locally_deleted' | 'virtual_bank_account_added' | 'virtual_bank_account_updated' | 'virtual_bank_account_deleted' | 'token_created' | 'token_consumed' | 'token_expired' | 'unbilled_charges_created' | 'unbilled_charges_voided' | 'unbilled_charges_deleted' | 'unbilled_charges_invoiced' | 'order_created' | 'order_updated' | 'order_cancelled' | 'order_delivered' | 'order_returned' | 'order_ready_to_process' | 'order_ready_to_ship' | 'order_deleted' | 'order_resent' | 'quote_created' | 'quote_updated' | 'quote_deleted' | 'tax_withheld_recorded' | 'tax_withheld_deleted' | 'tax_withheld_refunded' | 'gift_scheduled' | 'gift_unclaimed' | 'gift_claimed' | 'gift_expired' | 'gift_cancelled' | 'gift_updated' | 'hierarchy_created' | 'hierarchy_deleted' | 'payment_intent_created' | 'payment_intent_updated' | 'contract_term_created' | 'contract_term_renewed' | 'contract_term_terminated' | 'contract_term_completed' | 'contract_term_cancelled' | 'item_family_created' | 'item_family_updated' | 'item_family_deleted' | 'item_created' | 'item_updated' | 'item_deleted' | 'item_price_created' | 'item_price_updated' | 'item_price_deleted' | 'attached_item_created' | 'attached_item_updated' | 'attached_item_deleted' | 'differential_price_created' | 'differential_price_updated' | 'differential_price_deleted' | 'feature_created' | 'feature_updated' | 'feature_deleted' | 'feature_activated' | 'feature_reactivated' | 'feature_archived' | 'item_entitlements_updated' | 'entitlement_overrides_updated' | 'entitlement_overrides_removed' | 'item_entitlements_removed' | 'entitlement_overrides_auto_removed' | 'subscription_entitlements_created' | 'business_entity_created' | 'business_entity_updated' | 'business_entity_deleted' | 'customer_business_entity_changed' | 'subscription_business_entity_changed' | 'purchase_created' | 'voucher_created' | 'voucher_expired' | 'voucher_create_failed' | 'item_price_entitlements_updated' | 'item_price_entitlements_removed' | 'ramp_created' | 'ramp_deleted' | 'ramp_applied' | 'price_variant_created' | 'price_variant_updated' | 'price_variant_deleted' | 'plan_created' | 'plan_updated' | 'plan_deleted' | 'addon_created' | 'addon_updated' | 'addon_deleted'
46
48
  type ExportType = 'data' | 'import_friendly_data'
47
- type FreePeriodUnit = 'week' | 'month' | 'year' | 'day'
48
- type FriendOfferType = 'coupon_code' | 'coupon' | 'none'
49
- type Gateway = 'bluepay' | 'beanstream' | 'elavon' | 'orbital' | 'hdfc' | 'nmi' | 'moneris' | 'metrics_global' | 'ebanx' | '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' | 'dlocal' | 'gocardless' | 'global_payments' | 'paymill' | 'adyen' | 'paypal' | 'chargebee' | 'authorize_net' | 'tco' | 'bluesnap' | 'windcave' | 'paypal_payflow_pro' | 'amazon_payments' | 'mollie' | 'cybersource' | 'wirecard' | 'sage_pay' | 'vantiv' | 'worldpay' | 'pay_com'
49
+ type FreePeriodUnit = 'day' | 'week' | 'month' | 'year'
50
+ type FriendOfferType = 'none' | 'coupon' | 'coupon_code'
51
+ type Gateway = 'chargebee' | 'chargebee_payments' | 'stripe' | 'wepay' | 'braintree' | 'authorize_net' | 'paypal_pro' | 'pin' | 'eway' | 'eway_rapid' | 'worldpay' | 'balanced_payments' | 'beanstream' | 'bluepay' | 'elavon' | 'first_data_global' | 'hdfc' | 'migs' | 'nmi' | 'ogone' | 'paymill' | 'paypal_payflow_pro' | 'sage_pay' | 'tco' | 'wirecard' | 'amazon_payments' | 'paypal_express_checkout' | 'adyen' | 'orbital' | 'moneris_us' | 'moneris' | 'bluesnap' | 'cybersource' | 'vantiv' | 'checkout_com' | 'paypal' | 'ingenico_direct' | 'exact' | 'mollie' | 'quickbooks' | 'razorpay' | 'global_payments' | 'bank_of_america' | 'ecentric' | 'metrics_global' | 'windcave' | 'pay_com' | 'ebanx' | 'dlocal' | 'nuvei' | 'gocardless' | 'not_applicable'
50
52
  type HierarchyOperationType = 'complete_hierarchy' | 'subordinates' | 'path_to_root'
51
- type InvoiceDunningHandling = 'stop' | 'continue'
52
- type ItemType = 'charge' | 'addon' | 'plan'
53
+ type InvoiceDunningHandling = 'continue' | 'stop'
54
+ type ItemType = 'plan' | 'addon' | 'charge'
53
55
  type Layout = 'in_app' | 'full_page'
54
- type NotifyReferralSystem = 'all_invoices' | 'none' | 'first_paid_conversion'
55
- type OfflinePaymentMethod = 'eu_automated_bank_transfer' | 'bank_transfer' | 'mx_automated_bank_transfer' | 'custom' | 'ach_credit' | 'boleto' | 'check' | 'uk_automated_bank_transfer' | 'no_preference' | 'us_automated_bank_transfer' | 'jp_automated_bank_transfer' | 'sepa_credit' | 'cash'
56
- type OnEvent = 'subscription_creation' | 'subscription_activation' | 'subscription_trial_start' | 'contract_termination' | 'plan_activation'
56
+ type NotifyReferralSystem = 'none' | 'first_paid_conversion' | 'all_invoices'
57
+ type OfflinePaymentMethod = 'no_preference' | 'cash' | 'check' | 'bank_transfer' | 'ach_credit' | 'sepa_credit' | 'boleto' | 'us_automated_bank_transfer' | 'eu_automated_bank_transfer' | 'uk_automated_bank_transfer' | 'jp_automated_bank_transfer' | 'mx_automated_bank_transfer' | 'custom'
58
+ type OnEvent = 'subscription_creation' | 'subscription_trial_start' | 'plan_activation' | 'subscription_activation' | 'contract_termination'
57
59
  type Operation = 'create' | 'update' | 'delete'
58
60
  type OperationType = 'add' | 'remove'
59
- type PauseOption = 'end_of_term' | 'billing_cycles' | 'immediately' | 'specific_date'
60
- type PaymentInitiator = 'merchant' | 'customer'
61
- type PaymentMethod = 'other' | 'netbanking_emandates' | 'klarna_pay_now' | 'ach_credit' | 'dotpay' | 'boleto' | 'direct_debit' | 'automated_bank_transfer' | 'chargeback' | 'wechat_pay' | 'pay_to' | 'cash' | 'giropay' | 'bank_transfer' | 'alipay' | 'ideal' | 'sepa_instant_transfer' | 'google_pay' | 'custom' | 'unionpay' | 'check' | 'faster_payments' | 'sofort' | 'amazon_payments' | 'upi' | 'venmo' | 'apple_pay' | 'bancontact' | 'paypal_express_checkout' | 'sepa_credit' | 'card'
62
- type PaymentMethodType = 'giropay' | 'alipay' | 'ideal' | 'sepa_instant_transfer' | 'google_pay' | 'netbanking_emandates' | 'klarna_pay_now' | 'dotpay' | 'unionpay' | 'direct_debit' | 'faster_payments' | 'generic' | 'sofort' | 'amazon_payments' | 'upi' | 'venmo' | 'apple_pay' | 'bancontact' | 'automated_bank_transfer' | 'paypal_express_checkout' | 'wechat_pay' | 'pay_to' | 'card'
61
+ type PauseOption = 'immediately' | 'end_of_term' | 'specific_date' | 'billing_cycles'
62
+ type PaymentInitiator = 'customer' | 'merchant'
63
+ type PaymentMethod = 'cash' | 'check' | 'bank_transfer' | 'other' | 'custom' | 'chargeback' | 'card' | 'amazon_payments' | 'paypal_express_checkout' | 'direct_debit' | 'alipay' | 'unionpay' | 'apple_pay' | 'wechat_pay' | 'ach_credit' | 'sepa_credit' | 'ideal' | 'google_pay' | 'sofort' | 'bancontact' | 'giropay' | 'dotpay' | 'upi' | 'netbanking_emandates' | 'boleto' | 'venmo' | 'pay_to' | 'faster_payments' | 'sepa_instant_transfer' | 'automated_bank_transfer' | 'klarna_pay_now' | 'online_banking_poland'
64
+ type PaymentMethodType = 'card' | 'paypal_express_checkout' | 'amazon_payments' | 'direct_debit' | 'generic' | 'alipay' | 'unionpay' | 'apple_pay' | 'wechat_pay' | 'ideal' | 'google_pay' | 'sofort' | 'bancontact' | 'giropay' | 'dotpay' | 'upi' | 'netbanking_emandates' | 'venmo' | 'pay_to' | 'faster_payments' | 'sepa_instant_transfer' | 'automated_bank_transfer' | 'klarna_pay_now' | 'online_banking_poland'
63
65
  type PaymentVoucherType = 'boleto'
64
- type PeriodUnit = 'week' | 'month' | 'year' | 'day'
66
+ type PeriodUnit = 'day' | 'week' | 'month' | 'year'
65
67
  type PriceType = 'tax_exclusive' | 'tax_inclusive'
66
- type PricingModel = 'volume' | 'per_unit' | 'tiered' | 'flat_fee' | 'stairstep'
67
- type ProrationType = 'partial_term' | 'full_term' | 'none'
68
- type ReferralSystem = 'referral_candy' | 'friendbuy' | 'referral_saasquatch'
69
- type ReferrerRewardType = 'custom_promotional_credit' | 'referral_direct_reward' | 'custom_revenue_percent_based' | 'none'
70
- type RefundableCreditsHandling = 'schedule_refund' | 'no_action'
71
- type ReportBy = 'product' | 'invoice' | 'subscription' | 'customer'
68
+ type PricingModel = 'flat_fee' | 'per_unit' | 'tiered' | 'volume' | 'stairstep'
69
+ type ProrationType = 'full_term' | 'partial_term' | 'none'
70
+ type ReferralSystem = 'referral_candy' | 'referral_saasquatch' | 'friendbuy'
71
+ type ReferrerRewardType = 'none' | 'referral_direct_reward' | 'custom_promotional_credit' | 'custom_revenue_percent_based'
72
+ type RefundableCreditsHandling = 'no_action' | 'schedule_refund'
73
+ type ReportBy = 'customer' | 'invoice' | 'product' | 'subscription'
72
74
  type ResumeOption = 'immediately' | 'specific_date'
73
- type Role = 'backup' | 'none' | 'primary'
75
+ type Role = 'primary' | 'backup' | 'none'
74
76
  type ScheduleType = 'immediate' | 'specific_dates' | 'fixed_intervals'
75
- type Source = 'admin_console' | 'system' | 'scheduled_job' | 'js_api' | 'bulk_operation' | 'hosted_page' | 'migration' | 'api' | 'none' | 'portal' | 'external_service'
76
- type TaxExemptReason = 'high_value_physical_goods' | 'tax_not_configured' | 'reverse_charge' | 'zero_rated' | 'tax_not_configured_external_provider' | 'customer_exempt' | 'region_non_taxable' | 'zero_value_item' | 'export' | 'product_exempt'
77
- type TaxJurisType = 'special' | 'country' | 'unincorporated' | 'other' | 'city' | 'federal' | 'county' | 'state'
77
+ type Source = 'admin_console' | 'api' | 'bulk_operation' | 'scheduled_job' | 'hosted_page' | 'portal' | 'system' | 'none' | 'js_api' | 'migration' | 'external_service'
78
+ type TaxExemptReason = 'tax_not_configured' | 'region_non_taxable' | 'export' | 'customer_exempt' | 'product_exempt' | 'zero_rated' | 'reverse_charge' | 'high_value_physical_goods' | 'zero_value_item' | 'tax_not_configured_external_provider'
79
+ type TaxJurisType = 'country' | 'federal' | 'state' | 'county' | 'city' | 'special' | 'unincorporated' | 'other'
78
80
  type TaxOverrideReason = 'id_exempt' | 'customer_exempt' | 'export'
79
81
  type Taxability = 'taxable' | 'exempt'
80
- type TaxjarExemptionCategory = 'other' | 'wholesale' | 'government'
81
- type TrialEndAction = 'activate_subscription' | 'plan_default' | 'cancel_subscription' | 'site_default'
82
- type Type = 'giropay' | 'alipay' | 'ideal' | 'sepa_instant_transfer' | 'google_pay' | 'netbanking_emandates' | 'klarna_pay_now' | 'dotpay' | 'unionpay' | 'direct_debit' | 'faster_payments' | 'generic' | 'sofort' | 'amazon_payments' | 'upi' | 'venmo' | 'apple_pay' | 'bancontact' | 'automated_bank_transfer' | 'paypal_express_checkout' | 'wechat_pay' | 'pay_to' | 'card'
83
- type UnbilledChargesHandling = 'invoice' | 'no_action'
82
+ type TaxjarExemptionCategory = 'wholesale' | 'government' | 'other'
83
+ type TrialEndAction = 'site_default' | 'plan_default' | 'activate_subscription' | 'cancel_subscription'
84
+ type Type = 'card' | 'paypal_express_checkout' | 'amazon_payments' | 'direct_debit' | 'generic' | 'alipay' | 'unionpay' | 'apple_pay' | 'wechat_pay' | 'ideal' | 'google_pay' | 'sofort' | 'bancontact' | 'giropay' | 'dotpay' | 'upi' | 'netbanking_emandates' | 'venmo' | 'pay_to' | 'faster_payments' | 'sepa_instant_transfer' | 'automated_bank_transfer' | 'klarna_pay_now' | 'online_banking_poland'
85
+ type UnbilledChargesHandling = 'no_action' | 'invoice'
84
86
  type UnbilledChargesOption = 'invoice' | 'delete'
85
- type UnpaidInvoicesHandling = 'schedule_payment_collection' | 'no_action'
86
- type ValidationStatus = 'valid' | 'partially_valid' | 'invalid' | 'not_validated'
87
+ type UnpaidInvoicesHandling = 'no_action' | 'schedule_payment_collection'
88
+ type ValidationStatus = 'not_validated' | 'valid' | 'partially_valid' | 'invalid'
87
89
  type VoucherType = 'boleto'
90
+ type ChargeOn = 'immediately' | 'on_event'
88
91
 
89
92
  }
package/types/index.d.ts CHANGED
@@ -2,6 +2,8 @@
2
2
  ///<reference path='./resources/AdvanceInvoiceSchedule.d.ts' />
3
3
  ///<reference path='./resources/AttachedItem.d.ts' />
4
4
  ///<reference path='./resources/Attribute.d.ts' />
5
+ ///<reference path='./resources/BusinessEntity.d.ts' />
6
+ ///<reference path='./resources/BusinessEntityTransfer.d.ts' />
5
7
  ///<reference path='./resources/Card.d.ts' />
6
8
  ///<reference path='./resources/Comment.d.ts' />
7
9
  ///<reference path='./resources/Contact.d.ts' />
@@ -11,6 +13,7 @@
11
13
  ///<reference path='./resources/CouponSet.d.ts' />
12
14
  ///<reference path='./resources/CreditNote.d.ts' />
13
15
  ///<reference path='./resources/CreditNoteEstimate.d.ts' />
16
+ ///<reference path='./resources/Currency.d.ts' />
14
17
  ///<reference path='./resources/Customer.d.ts' />
15
18
  ///<reference path='./resources/DifferentialPrice.d.ts' />
16
19
  ///<reference path='./resources/Discount.d.ts' />
@@ -47,6 +50,7 @@
47
50
  ///<reference path='./resources/PaymentVoucher.d.ts' />
48
51
  ///<reference path='./resources/PortalSession.d.ts' />
49
52
  ///<reference path='./resources/PriceVariant.d.ts' />
53
+ ///<reference path='./resources/PricingPageSession.d.ts' />
50
54
  ///<reference path='./resources/PromotionalCredit.d.ts' />
51
55
  ///<reference path='./resources/Purchase.d.ts' />
52
56
  ///<reference path='./resources/Quote.d.ts' />
@@ -73,12 +77,15 @@ declare module 'chargebee' {
73
77
  static configure({ site, api_key }: { site: string; api_key: string });
74
78
  static address: Address.AddressResource;
75
79
  static attached_item: AttachedItem.AttachedItemResource;
80
+ static business_entity: BusinessEntity.BusinessEntityResource;
81
+ static business_entity_transfer: BusinessEntityTransfer.BusinessEntityTransferResource;
76
82
  static card: Card.CardResource;
77
83
  static comment: Comment.CommentResource;
78
84
  static coupon: Coupon.CouponResource;
79
85
  static coupon_code: CouponCode.CouponCodeResource;
80
86
  static coupon_set: CouponSet.CouponSetResource;
81
87
  static credit_note: CreditNote.CreditNoteResource;
88
+ static currency: Currency.CurrencyResource;
82
89
  static customer: Customer.CustomerResource;
83
90
  static differential_price: DifferentialPrice.DifferentialPriceResource;
84
91
  static entitlement: Entitlement.EntitlementResource;
@@ -104,6 +111,7 @@ declare module 'chargebee' {
104
111
  static payment_voucher: PaymentVoucher.PaymentVoucherResource;
105
112
  static portal_session: PortalSession.PortalSessionResource;
106
113
  static price_variant: PriceVariant.PriceVariantResource;
114
+ static pricing_page_session: PricingPageSession.PricingPageSessionResource;
107
115
  static promotional_credit: PromotionalCredit.PromotionalCreditResource;
108
116
  static purchase: Purchase.PurchaseResource;
109
117
  static quote: Quote.QuoteResource;
@@ -112,6 +120,7 @@ declare module 'chargebee' {
112
120
  static site_migration_detail: SiteMigrationDetail.SiteMigrationDetailResource;
113
121
  static subscription: Subscription.SubscriptionResource;
114
122
  static subscription_entitlement: SubscriptionEntitlement.SubscriptionEntitlementResource;
123
+ static tax_withheld: TaxWithheld.TaxWithheldResource;
115
124
  static time_machine: TimeMachine.TimeMachineResource;
116
125
  static token: Token.TokenResource;
117
126
  static transaction: Transaction.TransactionResource;
@@ -0,0 +1,83 @@
1
+ ///<reference path='./../core.d.ts'/>
2
+ declare module 'chargebee' {
3
+ export interface BusinessEntity {
4
+
5
+ id:string;
6
+
7
+ name:string;
8
+
9
+ status:'active' | 'inactive';
10
+
11
+ deleted:boolean;
12
+
13
+ created_at:number;
14
+
15
+ resource_version?:number;
16
+
17
+ updated_at?:number;
18
+ }
19
+ export namespace BusinessEntity {
20
+ export class BusinessEntityResource {
21
+ create_transfers(input:CreateTransfersInputParam):ChargebeeRequest<CreateTransfersResponse>;
22
+
23
+ get_transfers(input?:GetTransfersInputParam):ChargebeeRequest<GetTransfersResponse>;
24
+ }
25
+ export interface CreateTransfersResponse {
26
+ business_entity_transfer:BusinessEntityTransfer;
27
+ }
28
+ export interface CreateTransfersInputParam {
29
+
30
+ active_resource_ids:string[];
31
+
32
+ destination_business_entity_ids:string[];
33
+
34
+ source_business_entity_ids?:string[];
35
+
36
+ resource_types:string[];
37
+
38
+ reason_codes:string[];
39
+ }
40
+ export interface GetTransfersResponse {
41
+ list:{business_entity_transfer:BusinessEntityTransfer}[];
42
+
43
+ next_offset?:string;
44
+ }
45
+ export interface GetTransfersInputParam {
46
+ [key : string]: any;
47
+ /**
48
+ * @description The number of resources to be returned.
49
+
50
+ */
51
+
52
+ limit?:number;
53
+
54
+ /**
55
+ * @description Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set \&#x60;offset\&#x60; to the value of \&#x60;next_offset\&#x60; obtained in the previous iteration of the API call.
56
+
57
+ */
58
+
59
+ offset?:string;
60
+
61
+ resource_type?:{is?:string};
62
+
63
+ /**
64
+ * @description External handle of the resource from old business entity id
65
+
66
+ */
67
+
68
+ resource_id?:{is?:string};
69
+
70
+ /**
71
+ * @description External handle of the active resource
72
+
73
+ */
74
+
75
+ active_resource_id?:{is?:string};
76
+
77
+ created_at?:{after?:string,before?:string,between?:string,on?:string};
78
+
79
+ sort_by?:{asc?:'created_at',desc?:'created_at'};
80
+ }
81
+
82
+ }
83
+ }
@@ -0,0 +1,21 @@
1
+ ///<reference path='./../core.d.ts'/>
2
+ declare module 'chargebee' {
3
+ export interface BusinessEntityTransfer {
4
+
5
+ id:string;
6
+
7
+ resource_type:'customer' | 'subscription';
8
+
9
+ resource_id:string;
10
+
11
+ active_resource_id:string;
12
+
13
+ destination_business_entity_id:string;
14
+
15
+ source_business_entity_id:string;
16
+
17
+ reason_code:'correction';
18
+
19
+ created_at:number;
20
+ }
21
+ }
@@ -325,6 +325,10 @@ Ireland** . The first two characters of the VAT number in such a case is &#x60;X
325
325
  */
326
326
 
327
327
  billing_address?:CreditNote.BillingAddress;
328
+
329
+ site_details_at_creation?:CreditNote.SiteDetailsAtCreation;
330
+
331
+ tax_origin?:CreditNote.TaxOrigin;
328
332
  }
329
333
  export namespace CreditNote {
330
334
  export class CreditNoteResource {
@@ -1778,5 +1782,15 @@ If you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021
1778
1782
 
1779
1783
  validation_status?:ValidationStatus;
1780
1784
  }
1785
+ export interface SiteDetailsAtCreation {
1786
+ timezone?:string;
1787
+
1788
+ organization_address?:object;
1789
+ }
1790
+ export interface TaxOrigin {
1791
+ country?:string;
1792
+
1793
+ registration_number?:string;
1794
+ }
1781
1795
  }
1782
1796
  }