chargebee 2.36.0 → 2.38.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 +36 -0
- package/lib/chargebee.js +1 -1
- package/lib/resources/api_endpoints.js +61 -1
- package/package.json +1 -1
- package/types/core.d.ts +53 -50
- package/types/index.d.ts +4 -3
- package/types/resources/BusinessEntity.d.ts +1 -0
- package/types/resources/CreditNote.d.ts +7 -0
- package/types/resources/CreditNoteEstimate.d.ts +11 -15
- package/types/resources/Currency.d.ts +78 -0
- package/types/resources/Customer.d.ts +32 -31
- package/types/resources/Estimate.d.ts +48 -43
- package/types/resources/HostedPage.d.ts +4 -0
- package/types/resources/InstallmentConfig.d.ts +1 -1
- package/types/resources/Invoice.d.ts +7 -0
- package/types/resources/PaymentIntent.d.ts +4 -4
- package/types/resources/PaymentSource.d.ts +1 -0
- package/types/resources/PricingPageSession.d.ts +54 -0
- package/types/resources/Purchase.d.ts +1 -0
- package/types/resources/Quote.d.ts +38 -38
- package/types/resources/Subscription.d.ts +3 -8
- package/types/resources/UnbilledCharge.d.ts +2 -1
- package/types/resources/Usage.d.ts +1 -0
- package/types/resources/VirtualBankAccount.d.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,39 @@
|
|
|
1
|
+
### v2.38.0 (2024-07-19)
|
|
2
|
+
* * *
|
|
3
|
+
|
|
4
|
+
#### New Input parameters:
|
|
5
|
+
* change_option has been added to HostedPage#CheckoutExistingForItemsRequest.
|
|
6
|
+
* changes_scheduled_at has been added to HostedPage#CheckoutExistingForItemsRequest.
|
|
7
|
+
|
|
8
|
+
#### Bug Fixes:
|
|
9
|
+
* index.d.ts referencing to non existing file/ non resources.
|
|
10
|
+
* missing imports for few resources.
|
|
11
|
+
|
|
12
|
+
### v2.37.0 (2024-07-03)
|
|
13
|
+
* * *
|
|
14
|
+
|
|
15
|
+
#### New resources:
|
|
16
|
+
* Currency has been added.
|
|
17
|
+
* PricingPageSession Transfer has been added.
|
|
18
|
+
|
|
19
|
+
#### New Enum
|
|
20
|
+
* cancel_option Enum has been added.
|
|
21
|
+
|
|
22
|
+
#### New Enum values:
|
|
23
|
+
* ONLINE_BANKING_POLAND has been added in PaymentMethod enum.
|
|
24
|
+
* ONLINE_BANKING_POLAND has been added in PaymentMethodType enum.
|
|
25
|
+
* ONLINE_BANKING_POLAND has been added in Type enum.
|
|
26
|
+
* DRAFT has been added in Ramp enum.
|
|
27
|
+
|
|
28
|
+
#### New Input parameters:
|
|
29
|
+
* cancel_option has been added to Estimate#CancelSubscriptionRequest, Estimate#CancelSubscriptionForItemsRequest.
|
|
30
|
+
* cancel_option has been added to Subscription#CancelForItemsRequest, Subscription#CancelRequest.
|
|
31
|
+
* statement_descriptor[descriptor] has been added to Purchase#ChargeRequest.
|
|
32
|
+
|
|
33
|
+
#### New Attributes:
|
|
34
|
+
* tax_origin has been added to Invoice.
|
|
35
|
+
* tax_origin has been added to CreditNote.
|
|
36
|
+
|
|
1
37
|
### v2.36.0 (2024-05-28)
|
|
2
38
|
* * *
|
|
3
39
|
|
package/lib/chargebee.js
CHANGED
|
@@ -2777,6 +2777,50 @@ var _endpoints = {
|
|
|
2777
2777
|
true
|
|
2778
2778
|
]
|
|
2779
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
|
+
],
|
|
2780
2824
|
"ramp": [
|
|
2781
2825
|
[
|
|
2782
2826
|
"create_for_subscription",
|
|
@@ -2846,6 +2890,22 @@ var _endpoints = {
|
|
|
2846
2890
|
false
|
|
2847
2891
|
]
|
|
2848
2892
|
],
|
|
2849
|
-
"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
|
+
]
|
|
2850
2910
|
};
|
|
2851
2911
|
module.exports = _endpoints;
|
package/package.json
CHANGED
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 = '
|
|
16
|
-
type AccountType = '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 = '
|
|
20
|
-
type AutoCollection = '
|
|
21
|
-
type AvalaraSaleType = '
|
|
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 = '
|
|
24
|
-
type BillingDayOfWeekMode = '
|
|
25
|
-
type
|
|
26
|
-
type
|
|
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' | '
|
|
29
|
-
type ChargeOnOption = '
|
|
30
|
-
type ChargesHandling = '
|
|
31
|
-
type ContractTermCancelOption = '
|
|
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 = '
|
|
34
|
-
type CustomerType = '
|
|
35
|
-
type DedupeOption = '
|
|
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 = '
|
|
38
|
-
type DurationType = '
|
|
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' | '
|
|
43
|
-
type EntityType = '
|
|
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 = '
|
|
48
|
-
type FriendOfferType = '
|
|
49
|
-
type Gateway = '
|
|
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 = '
|
|
52
|
-
type ItemType = '
|
|
53
|
+
type InvoiceDunningHandling = 'continue' | 'stop'
|
|
54
|
+
type ItemType = 'plan' | 'addon' | 'charge'
|
|
53
55
|
type Layout = 'in_app' | 'full_page'
|
|
54
|
-
type NotifyReferralSystem = '
|
|
55
|
-
type OfflinePaymentMethod = '
|
|
56
|
-
type OnEvent = 'subscription_creation' | '
|
|
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 = '
|
|
60
|
-
type PaymentInitiator = '
|
|
61
|
-
type PaymentMethod = '
|
|
62
|
-
type PaymentMethodType = '
|
|
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 = '
|
|
66
|
+
type PeriodUnit = 'day' | 'week' | 'month' | 'year'
|
|
65
67
|
type PriceType = 'tax_exclusive' | 'tax_inclusive'
|
|
66
|
-
type PricingModel = '
|
|
67
|
-
type ProrationType = '
|
|
68
|
-
type ReferralSystem = 'referral_candy' | '
|
|
69
|
-
type ReferrerRewardType = '
|
|
70
|
-
type RefundableCreditsHandling = '
|
|
71
|
-
type ReportBy = '
|
|
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 = '
|
|
75
|
+
type Role = 'primary' | 'backup' | 'none'
|
|
74
76
|
type ScheduleType = 'immediate' | 'specific_dates' | 'fixed_intervals'
|
|
75
|
-
type Source = 'admin_console' | '
|
|
76
|
-
type TaxExemptReason = '
|
|
77
|
-
type TaxJurisType = '
|
|
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 = '
|
|
81
|
-
type TrialEndAction = '
|
|
82
|
-
type Type = '
|
|
83
|
-
type UnbilledChargesHandling = '
|
|
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 = '
|
|
86
|
-
type ValidationStatus = '
|
|
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
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
///<reference path='./resources/CouponSet.d.ts' />
|
|
14
14
|
///<reference path='./resources/CreditNote.d.ts' />
|
|
15
15
|
///<reference path='./resources/CreditNoteEstimate.d.ts' />
|
|
16
|
+
///<reference path='./resources/Currency.d.ts' />
|
|
16
17
|
///<reference path='./resources/Customer.d.ts' />
|
|
17
18
|
///<reference path='./resources/DifferentialPrice.d.ts' />
|
|
18
19
|
///<reference path='./resources/Discount.d.ts' />
|
|
@@ -40,7 +41,6 @@
|
|
|
40
41
|
///<reference path='./resources/ItemEntitlement.d.ts' />
|
|
41
42
|
///<reference path='./resources/ItemFamily.d.ts' />
|
|
42
43
|
///<reference path='./resources/ItemPrice.d.ts' />
|
|
43
|
-
///<reference path='./resources/Media.d.ts' />
|
|
44
44
|
///<reference path='./resources/NonSubscription.d.ts' />
|
|
45
45
|
///<reference path='./resources/Order.d.ts' />
|
|
46
46
|
///<reference path='./resources/PaymentIntent.d.ts' />
|
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
///<reference path='./resources/PaymentVoucher.d.ts' />
|
|
50
50
|
///<reference path='./resources/PortalSession.d.ts' />
|
|
51
51
|
///<reference path='./resources/PriceVariant.d.ts' />
|
|
52
|
+
///<reference path='./resources/PricingPageSession.d.ts' />
|
|
52
53
|
///<reference path='./resources/PromotionalCredit.d.ts' />
|
|
53
54
|
///<reference path='./resources/Purchase.d.ts' />
|
|
54
55
|
///<reference path='./resources/Quote.d.ts' />
|
|
@@ -76,13 +77,13 @@ declare module 'chargebee' {
|
|
|
76
77
|
static address: Address.AddressResource;
|
|
77
78
|
static attached_item: AttachedItem.AttachedItemResource;
|
|
78
79
|
static business_entity: BusinessEntity.BusinessEntityResource;
|
|
79
|
-
static business_entity_transfer: BusinessEntityTransfer.BusinessEntityTransferResource;
|
|
80
80
|
static card: Card.CardResource;
|
|
81
81
|
static comment: Comment.CommentResource;
|
|
82
82
|
static coupon: Coupon.CouponResource;
|
|
83
83
|
static coupon_code: CouponCode.CouponCodeResource;
|
|
84
84
|
static coupon_set: CouponSet.CouponSetResource;
|
|
85
85
|
static credit_note: CreditNote.CreditNoteResource;
|
|
86
|
+
static currency: Currency.CurrencyResource;
|
|
86
87
|
static customer: Customer.CustomerResource;
|
|
87
88
|
static differential_price: DifferentialPrice.DifferentialPriceResource;
|
|
88
89
|
static entitlement: Entitlement.EntitlementResource;
|
|
@@ -108,6 +109,7 @@ declare module 'chargebee' {
|
|
|
108
109
|
static payment_voucher: PaymentVoucher.PaymentVoucherResource;
|
|
109
110
|
static portal_session: PortalSession.PortalSessionResource;
|
|
110
111
|
static price_variant: PriceVariant.PriceVariantResource;
|
|
112
|
+
static pricing_page_session: PricingPageSession.PricingPageSessionResource;
|
|
111
113
|
static promotional_credit: PromotionalCredit.PromotionalCreditResource;
|
|
112
114
|
static purchase: Purchase.PurchaseResource;
|
|
113
115
|
static quote: Quote.QuoteResource;
|
|
@@ -117,7 +119,6 @@ declare module 'chargebee' {
|
|
|
117
119
|
static subscription: Subscription.SubscriptionResource;
|
|
118
120
|
static subscription_entitlement: SubscriptionEntitlement.SubscriptionEntitlementResource;
|
|
119
121
|
static time_machine: TimeMachine.TimeMachineResource;
|
|
120
|
-
static token: Token.TokenResource;
|
|
121
122
|
static transaction: Transaction.TransactionResource;
|
|
122
123
|
static unbilled_charge: UnbilledCharge.UnbilledChargeResource;
|
|
123
124
|
static usage: Usage.UsageResource;
|
|
@@ -327,6 +327,8 @@ Ireland** . The first two characters of the VAT number in such a case is `X
|
|
|
327
327
|
billing_address?:CreditNote.BillingAddress;
|
|
328
328
|
|
|
329
329
|
site_details_at_creation?:CreditNote.SiteDetailsAtCreation;
|
|
330
|
+
|
|
331
|
+
tax_origin?:CreditNote.TaxOrigin;
|
|
330
332
|
}
|
|
331
333
|
export namespace CreditNote {
|
|
332
334
|
export class CreditNoteResource {
|
|
@@ -1785,5 +1787,10 @@ If you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021
|
|
|
1785
1787
|
|
|
1786
1788
|
organization_address?:object;
|
|
1787
1789
|
}
|
|
1790
|
+
export interface TaxOrigin {
|
|
1791
|
+
country?:string;
|
|
1792
|
+
|
|
1793
|
+
registration_number?:string;
|
|
1794
|
+
}
|
|
1788
1795
|
}
|
|
1789
1796
|
}
|
|
@@ -18,10 +18,6 @@ declare module 'chargebee' {
|
|
|
18
18
|
|
|
19
19
|
amount_available:number;
|
|
20
20
|
|
|
21
|
-
round_off_amount?:number;
|
|
22
|
-
|
|
23
|
-
customer_id?:string;
|
|
24
|
-
|
|
25
21
|
line_items?:CreditNoteEstimate.LineItem[];
|
|
26
22
|
|
|
27
23
|
discounts?:CreditNoteEstimate.Discount[];
|
|
@@ -33,6 +29,10 @@ declare module 'chargebee' {
|
|
|
33
29
|
line_item_discounts?:CreditNoteEstimate.LineItemDiscount[];
|
|
34
30
|
|
|
35
31
|
line_item_tiers?:CreditNoteEstimate.LineItemTier[];
|
|
32
|
+
|
|
33
|
+
round_off_amount?:number;
|
|
34
|
+
|
|
35
|
+
customer_id?:string;
|
|
36
36
|
}
|
|
37
37
|
export namespace CreditNoteEstimate {
|
|
38
38
|
|
|
@@ -52,7 +52,7 @@ declare module 'chargebee' {
|
|
|
52
52
|
|
|
53
53
|
amount?:number;
|
|
54
54
|
|
|
55
|
-
pricing_model?:'
|
|
55
|
+
pricing_model?:'flat_fee' | 'per_unit' | 'tiered' | 'volume' | 'stairstep';
|
|
56
56
|
|
|
57
57
|
is_taxed:boolean;
|
|
58
58
|
|
|
@@ -69,7 +69,7 @@ declare module 'chargebee' {
|
|
|
69
69
|
discount_amount?:number;
|
|
70
70
|
|
|
71
71
|
item_level_discount_amount?:number;
|
|
72
|
-
|
|
72
|
+
|
|
73
73
|
usage_percentage?:string;
|
|
74
74
|
|
|
75
75
|
reference_line_item_id?:string;
|
|
@@ -78,9 +78,9 @@ declare module 'chargebee' {
|
|
|
78
78
|
|
|
79
79
|
entity_description?:string;
|
|
80
80
|
|
|
81
|
-
entity_type:'
|
|
81
|
+
entity_type:'adhoc' | 'plan_item_price' | 'addon_item_price' | 'charge_item_price' | 'plan_setup' | 'plan' | 'addon';
|
|
82
82
|
|
|
83
|
-
tax_exempt_reason?:'
|
|
83
|
+
tax_exempt_reason?:'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';
|
|
84
84
|
|
|
85
85
|
entity_id?:string;
|
|
86
86
|
|
|
@@ -91,11 +91,7 @@ declare module 'chargebee' {
|
|
|
91
91
|
|
|
92
92
|
description?:string;
|
|
93
93
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
entity_type:'item_level_coupon' | 'promotional_credits' | 'item_level_discount' | 'prorated_credits' | 'document_level_discount' | 'document_level_coupon';
|
|
97
|
-
|
|
98
|
-
discount_type?:'fixed_amount' | 'percentage';
|
|
94
|
+
entity_type:'item_level_coupon' | 'document_level_coupon' | 'promotional_credits' | 'prorated_credits' | 'item_level_discount' | 'document_level_discount';
|
|
99
95
|
|
|
100
96
|
entity_id?:string;
|
|
101
97
|
|
|
@@ -129,7 +125,7 @@ declare module 'chargebee' {
|
|
|
129
125
|
|
|
130
126
|
tax_amount:number;
|
|
131
127
|
|
|
132
|
-
tax_juris_type?:'
|
|
128
|
+
tax_juris_type?:'country' | 'federal' | 'state' | 'county' | 'city' | 'special' | 'unincorporated' | 'other';
|
|
133
129
|
|
|
134
130
|
tax_juris_name?:string;
|
|
135
131
|
|
|
@@ -142,7 +138,7 @@ declare module 'chargebee' {
|
|
|
142
138
|
export interface LineItemDiscount {
|
|
143
139
|
line_item_id:string;
|
|
144
140
|
|
|
145
|
-
discount_type:'item_level_coupon' | '
|
|
141
|
+
discount_type:'item_level_coupon' | 'document_level_coupon' | 'promotional_credits' | 'prorated_credits' | 'item_level_discount' | 'document_level_discount';
|
|
146
142
|
|
|
147
143
|
coupon_id?:string;
|
|
148
144
|
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
///<reference path='./../core.d.ts'/>
|
|
2
|
+
declare module 'chargebee' {
|
|
3
|
+
export interface Currency {
|
|
4
|
+
|
|
5
|
+
id?:string;
|
|
6
|
+
|
|
7
|
+
enabled:boolean;
|
|
8
|
+
|
|
9
|
+
forex_type?:'manual' | 'auto';
|
|
10
|
+
|
|
11
|
+
currency_code?:string;
|
|
12
|
+
|
|
13
|
+
is_base_currency?:boolean;
|
|
14
|
+
|
|
15
|
+
manual_exchange_rate?:string;
|
|
16
|
+
}
|
|
17
|
+
export namespace Currency {
|
|
18
|
+
export class CurrencyResource {
|
|
19
|
+
list():ChargebeeRequest<ListResponse>;
|
|
20
|
+
|
|
21
|
+
retrieve(site_currency_id:string):ChargebeeRequest<RetrieveResponse>;
|
|
22
|
+
|
|
23
|
+
create(input:CreateInputParam):ChargebeeRequest<CreateResponse>;
|
|
24
|
+
|
|
25
|
+
update(site_currency_id:string, input:UpdateInputParam):ChargebeeRequest<UpdateResponse>;
|
|
26
|
+
|
|
27
|
+
add_schedule(site_currency_id:string, input:AddScheduleInputParam):ChargebeeRequest<AddScheduleResponse>;
|
|
28
|
+
|
|
29
|
+
remove_schedule(site_currency_id:string):ChargebeeRequest<RemoveScheduleResponse>;
|
|
30
|
+
}
|
|
31
|
+
export interface ListResponse {
|
|
32
|
+
currency:Currency;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface RetrieveResponse {
|
|
36
|
+
currency:Currency;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface CreateResponse {
|
|
40
|
+
currency:Currency;
|
|
41
|
+
}
|
|
42
|
+
export interface CreateInputParam {
|
|
43
|
+
|
|
44
|
+
currency_code:string;
|
|
45
|
+
|
|
46
|
+
forex_type:'manual' | 'auto';
|
|
47
|
+
|
|
48
|
+
manual_exchange_rate?:string;
|
|
49
|
+
}
|
|
50
|
+
export interface UpdateResponse {
|
|
51
|
+
currency:Currency;
|
|
52
|
+
}
|
|
53
|
+
export interface UpdateInputParam {
|
|
54
|
+
|
|
55
|
+
forex_type:'manual' | 'auto';
|
|
56
|
+
|
|
57
|
+
manual_exchange_rate?:string;
|
|
58
|
+
}
|
|
59
|
+
export interface AddScheduleResponse {
|
|
60
|
+
scheduled_at:number;
|
|
61
|
+
|
|
62
|
+
currency:Currency;
|
|
63
|
+
}
|
|
64
|
+
export interface AddScheduleInputParam {
|
|
65
|
+
|
|
66
|
+
manual_exchange_rate:string;
|
|
67
|
+
|
|
68
|
+
schedule_at:number;
|
|
69
|
+
}
|
|
70
|
+
export interface RemoveScheduleResponse {
|
|
71
|
+
scheduled_at:number;
|
|
72
|
+
|
|
73
|
+
currency:Currency;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
}
|
|
78
|
+
}
|