chargebee 2.41.1 → 2.42.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 +45 -0
- package/lib/chargebee.js +1 -1
- package/lib/resources/api_endpoints.js +14 -23
- package/package.json +1 -1
- package/types/core.d.ts +1 -1
- package/types/index.d.ts +3 -5
- package/types/resources/Invoice.d.ts +11 -24
- package/types/resources/Item.d.ts +67 -381
- package/types/resources/PaymentSchedule.d.ts +41 -0
- package/types/resources/PaymentScheduleScheme.d.ts +61 -0
- package/types/resources/Purchase.d.ts +2 -7
- package/types/resources/Installment.d.ts +0 -123
- package/types/resources/InstallmentConfig.d.ts +0 -169
- package/types/resources/InstallmentDetail.d.ts +0 -34
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,48 @@
|
|
|
1
|
+
### v2.42.0 (2024-09-19)
|
|
2
|
+
* * *
|
|
3
|
+
|
|
4
|
+
#### New Resource:
|
|
5
|
+
* PaymentScheduleScheme has been added.
|
|
6
|
+
* PaymentSchedule has been added.
|
|
7
|
+
|
|
8
|
+
### New Endpoints:
|
|
9
|
+
* Invoice#ApplyPaymentScheduleScheme has been added.
|
|
10
|
+
* Invoice#PaymentSchedules has been added.
|
|
11
|
+
|
|
12
|
+
### New Attributes
|
|
13
|
+
* bundle_items[] has been added to Items.
|
|
14
|
+
* bundle_configuration has been added to Items.
|
|
15
|
+
|
|
16
|
+
#### New Input parameters:
|
|
17
|
+
* bundle_configuration has been added to Items#CreateParams, Items#UpdateParams & Items#ListParams.
|
|
18
|
+
* bundle_items_to_add[] has been added to Items#CreateParams & Items#UpdateParams.
|
|
19
|
+
* bundle_items_to_update[] has been added to Items#UpdateParams.
|
|
20
|
+
* bundle_items_to_remove[] has been added to Items#UpdateParams.
|
|
21
|
+
* payment_schedule has been added to Purchase#CreateParams.
|
|
22
|
+
|
|
23
|
+
### New Enum Values:
|
|
24
|
+
* payment_schedules_created has been added to EventTypeEnum.
|
|
25
|
+
* payment_schedules_updated has been added to EventTypeEnum.
|
|
26
|
+
* payment_schedule_scheme_created has been added to EventTypeEnum.
|
|
27
|
+
* payment_schedule_scheme_deleted has been added to EventTypeEnum.
|
|
28
|
+
|
|
29
|
+
### Removed Resource:
|
|
30
|
+
* Installment has been removed.
|
|
31
|
+
* InstallmentConfig has been removed.
|
|
32
|
+
* InstallmentDetail has been removed.
|
|
33
|
+
|
|
34
|
+
### Removed Endpoints:
|
|
35
|
+
* Invoice#Installments has been removed.
|
|
36
|
+
|
|
37
|
+
### Removed Input parameters:
|
|
38
|
+
* installment_info has been removed from Purchase#CreateParams.
|
|
39
|
+
|
|
40
|
+
### Removed Enum Values:
|
|
41
|
+
* invoice_installments_created has been removed from EventTypeEnum.
|
|
42
|
+
* invoice_installment_updated has been removed from EventTypeEnum.
|
|
43
|
+
* installment_config_created has been removed from EventTypeEnum.
|
|
44
|
+
* installment_config_deleted has been removed from EventTypeEnum.
|
|
45
|
+
|
|
1
46
|
### v2.41.1 (2024-09-02)
|
|
2
47
|
* * *
|
|
3
48
|
|
package/lib/chargebee.js
CHANGED
|
@@ -917,10 +917,17 @@ var _endpoints = {
|
|
|
917
917
|
true
|
|
918
918
|
],
|
|
919
919
|
[
|
|
920
|
-
"
|
|
920
|
+
"apply_payment_schedule_scheme",
|
|
921
921
|
"POST",
|
|
922
922
|
"/invoices",
|
|
923
|
-
"/
|
|
923
|
+
"/apply_payment_schedule_scheme",
|
|
924
|
+
true
|
|
925
|
+
],
|
|
926
|
+
[
|
|
927
|
+
"payment_schedules",
|
|
928
|
+
"GET",
|
|
929
|
+
"/invoices",
|
|
930
|
+
"/payment_schedules",
|
|
924
931
|
true
|
|
925
932
|
],
|
|
926
933
|
[
|
|
@@ -939,6 +946,7 @@ var _endpoints = {
|
|
|
939
946
|
]
|
|
940
947
|
],
|
|
941
948
|
"payment_reference_number": [],
|
|
949
|
+
"payment_schedule": [],
|
|
942
950
|
"tax_withheld": [],
|
|
943
951
|
"credit_note": [
|
|
944
952
|
[
|
|
@@ -2875,46 +2883,29 @@ var _endpoints = {
|
|
|
2875
2883
|
false
|
|
2876
2884
|
]
|
|
2877
2885
|
],
|
|
2878
|
-
"
|
|
2886
|
+
"payment_schedule_scheme": [
|
|
2879
2887
|
[
|
|
2880
2888
|
"create",
|
|
2881
2889
|
"POST",
|
|
2882
|
-
"/
|
|
2890
|
+
"/payment_schedule_schemes",
|
|
2883
2891
|
null,
|
|
2884
2892
|
false
|
|
2885
2893
|
],
|
|
2886
2894
|
[
|
|
2887
2895
|
"retrieve",
|
|
2888
2896
|
"GET",
|
|
2889
|
-
"/
|
|
2897
|
+
"/payment_schedule_schemes",
|
|
2890
2898
|
null,
|
|
2891
2899
|
true
|
|
2892
2900
|
],
|
|
2893
2901
|
[
|
|
2894
2902
|
"delete",
|
|
2895
2903
|
"POST",
|
|
2896
|
-
"/
|
|
2904
|
+
"/payment_schedule_schemes",
|
|
2897
2905
|
"/delete",
|
|
2898
2906
|
true
|
|
2899
2907
|
]
|
|
2900
2908
|
],
|
|
2901
|
-
"installment": [
|
|
2902
|
-
[
|
|
2903
|
-
"retrieve",
|
|
2904
|
-
"GET",
|
|
2905
|
-
"/installments",
|
|
2906
|
-
null,
|
|
2907
|
-
true
|
|
2908
|
-
],
|
|
2909
|
-
[
|
|
2910
|
-
"list",
|
|
2911
|
-
"GET",
|
|
2912
|
-
"/installments",
|
|
2913
|
-
null,
|
|
2914
|
-
false
|
|
2915
|
-
]
|
|
2916
|
-
],
|
|
2917
|
-
"installment_detail": [],
|
|
2918
2909
|
"pricing_page_session": [
|
|
2919
2910
|
[
|
|
2920
2911
|
"create_for_new_subscription",
|
package/package.json
CHANGED
package/types/core.d.ts
CHANGED
|
@@ -44,7 +44,7 @@ declare module 'chargebee' {
|
|
|
44
44
|
type EntityCode = 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h' | 'i' | 'j' | 'k' | 'l' | 'm' | 'n' | 'p' | 'q' | 'r' | 'med1' | 'med2'
|
|
45
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'
|
|
46
46
|
type EventName = 'cancellation_page_loaded'
|
|
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_items_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' | '
|
|
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_items_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' | 'payment_schedules_created' | 'payment_schedules_updated' | 'payment_schedule_scheme_created' | 'payment_schedule_scheme_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' | 'subscription_ramp_drafted' | 'subscription_ramp_updated' | 'price_variant_created' | 'price_variant_updated' | 'price_variant_deleted' | 'customer_entitlements_updated' | 'subscription_moved_in' | 'subscription_moved_out' | 'subscription_movement_failed' | 'plan_created' | 'plan_updated' | 'plan_deleted' | 'addon_created' | 'addon_updated' | 'addon_deleted'
|
|
48
48
|
type ExportType = 'data' | 'import_friendly_data'
|
|
49
49
|
type FreePeriodUnit = 'day' | 'week' | 'month' | 'year'
|
|
50
50
|
type FriendOfferType = 'none' | 'coupon' | 'coupon_code'
|
package/types/index.d.ts
CHANGED
|
@@ -33,9 +33,6 @@
|
|
|
33
33
|
///<reference path='./resources/ImpactedItemPrice.d.ts' />
|
|
34
34
|
///<reference path='./resources/ImpactedSubscription.d.ts' />
|
|
35
35
|
///<reference path='./resources/InAppSubscription.d.ts' />
|
|
36
|
-
///<reference path='./resources/Installment.d.ts' />
|
|
37
|
-
///<reference path='./resources/InstallmentConfig.d.ts' />
|
|
38
|
-
///<reference path='./resources/InstallmentDetail.d.ts' />
|
|
39
36
|
///<reference path='./resources/Invoice.d.ts' />
|
|
40
37
|
///<reference path='./resources/InvoiceEstimate.d.ts' />
|
|
41
38
|
///<reference path='./resources/Item.d.ts' />
|
|
@@ -47,6 +44,8 @@
|
|
|
47
44
|
///<reference path='./resources/Order.d.ts' />
|
|
48
45
|
///<reference path='./resources/PaymentIntent.d.ts' />
|
|
49
46
|
///<reference path='./resources/PaymentReferenceNumber.d.ts' />
|
|
47
|
+
///<reference path='./resources/PaymentSchedule.d.ts' />
|
|
48
|
+
///<reference path='./resources/PaymentScheduleScheme.d.ts' />
|
|
50
49
|
///<reference path='./resources/PaymentSource.d.ts' />
|
|
51
50
|
///<reference path='./resources/PaymentVoucher.d.ts' />
|
|
52
51
|
///<reference path='./resources/PortalSession.d.ts' />
|
|
@@ -98,8 +97,6 @@ declare module 'chargebee' {
|
|
|
98
97
|
static gift: Gift.GiftResource;
|
|
99
98
|
static hosted_page: HostedPage.HostedPageResource;
|
|
100
99
|
static in_app_subscription: InAppSubscription.InAppSubscriptionResource;
|
|
101
|
-
static installment: Installment.InstallmentResource;
|
|
102
|
-
static installment_config: InstallmentConfig.InstallmentConfigResource;
|
|
103
100
|
static invoice: Invoice.InvoiceResource;
|
|
104
101
|
static item: Item.ItemResource;
|
|
105
102
|
static item_entitlement: ItemEntitlement.ItemEntitlementResource;
|
|
@@ -108,6 +105,7 @@ declare module 'chargebee' {
|
|
|
108
105
|
static non_subscription: NonSubscription.NonSubscriptionResource;
|
|
109
106
|
static order: Order.OrderResource;
|
|
110
107
|
static payment_intent: PaymentIntent.PaymentIntentResource;
|
|
108
|
+
static payment_schedule_scheme: PaymentScheduleScheme.PaymentScheduleSchemeResource;
|
|
111
109
|
static payment_source: PaymentSource.PaymentSourceResource;
|
|
112
110
|
static payment_voucher: PaymentVoucher.PaymentVoucherResource;
|
|
113
111
|
static portal_session: PortalSession.PortalSessionResource;
|
|
@@ -746,13 +746,6 @@ All associated [usages](/docs/api/usages?prod_cat_ver=2) are permanently de
|
|
|
746
746
|
|
|
747
747
|
update_details(invoice_id:string, input?:UpdateDetailsInputParam):ChargebeeRequest<UpdateDetailsResponse>;
|
|
748
748
|
|
|
749
|
-
/**
|
|
750
|
-
* @description Creates installments for an invoice, enabling the invoice to be paid in multiple, scheduled payments. **Note: The invoice must be in payment_due.**
|
|
751
|
-
|
|
752
|
-
*/
|
|
753
|
-
|
|
754
|
-
installments(invoice_id:string, input:InstallmentsInputParam):ChargebeeRequest<InstallmentsResponse>;
|
|
755
|
-
|
|
756
749
|
/**
|
|
757
750
|
* @description Resend failed einvoice of an invoice to the customer using this API.
|
|
758
751
|
|
|
@@ -781,6 +774,8 @@ This endpoint schedules e-invoices manually. This operation is not allowed when
|
|
|
781
774
|
*/
|
|
782
775
|
|
|
783
776
|
send_einvoice(invoice_id:string):ChargebeeRequest<SendEinvoiceResponse>;
|
|
777
|
+
apply_payment_schedule_scheme(invoice_id:string, input:ApplyPaymentScheduleSchemeInputParam):ChargebeeRequest<ApplyPaymentScheduleSchemeResponse>;
|
|
778
|
+
payment_schedules(invoice_id:string):ChargebeeRequest<PaymentSchedulesResponse>;
|
|
784
779
|
}
|
|
785
780
|
export interface CreateResponse {
|
|
786
781
|
invoice:Invoice;
|
|
@@ -2170,22 +2165,9 @@ Ireland** . The first two characters of the VAT number in such a case is `X
|
|
|
2170
2165
|
|
|
2171
2166
|
statement_descriptor?:{additional_info?:string,descriptor?:string};
|
|
2172
2167
|
}
|
|
2173
|
-
export interface
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
export interface InstallmentsInputParam {
|
|
2177
|
-
|
|
2178
|
-
/**
|
|
2179
|
-
* @description The identifier of the installment_config used to create the installments.
|
|
2180
|
-
|
|
2181
|
-
*/
|
|
2182
|
-
|
|
2183
|
-
config_id:string;
|
|
2184
|
-
|
|
2185
|
-
/**
|
|
2186
|
-
* @description The part of the invoice.amount_due to be distributed across the installments. If unspecified, the full invoice.amount_due is considered by default.
|
|
2187
|
-
|
|
2188
|
-
*/
|
|
2168
|
+
export interface ApplyPaymentScheduleSchemeInputParam {
|
|
2169
|
+
|
|
2170
|
+
scheme_id:string;
|
|
2189
2171
|
|
|
2190
2172
|
amount?:number;
|
|
2191
2173
|
}
|
|
@@ -2196,7 +2178,12 @@ Ireland** . The first two characters of the VAT number in such a case is `X
|
|
|
2196
2178
|
export interface SendEinvoiceResponse {
|
|
2197
2179
|
invoice:Invoice;
|
|
2198
2180
|
}
|
|
2199
|
-
|
|
2181
|
+
export interface ApplyPaymentScheduleSchemeResponse {
|
|
2182
|
+
invoice:Invoice;
|
|
2183
|
+
}
|
|
2184
|
+
export interface PaymentSchedulesResponse {
|
|
2185
|
+
payment_schedules:PaymentSchedule[];
|
|
2186
|
+
}
|
|
2200
2187
|
export interface LineItem {
|
|
2201
2188
|
/**
|
|
2202
2189
|
* @description Uniquely identifies a line_item
|