chargebee 2.31.0 → 2.33.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,35 @@
1
+ ### v2.33.0 (2024-02-29)
2
+ * * *
3
+
4
+ #### New attributes:
5
+ * usage_percentage has been added to QuoteLineGroup resource.
6
+ * usage_percentage has been added to Quote resource.
7
+ * usage_percentage has been added to CreditNoteEstimate resource.
8
+ * usage_percentage has been added to CreditNote resource.
9
+ * usage_percentage has been added to InvoiceEstimate resource.
10
+ * usage_percentage has been added to Invoice resource.
11
+ * error_detail of type GatewayErrorDetail has been added to PaymentIntent#PaymentAttempt subResource.
12
+ * origin_user has been added to Event resource.
13
+ * proration_type has been added to QuotedSubscription#SubscriptionItem and Subscription#SubscriptionItem subResources
14
+ * network_error_message, recommendation_message, processor_error_code, processor_error_message has been added to Transaction#GatewayErrorDetail subResource.
15
+
16
+ #### New Enum values:
17
+ * TAX_NOT_CONFIGURED_EXTERNAL_PROVIDER has been added to TaxExemptReasonEnum.
18
+
19
+ #### New Input parameters:
20
+ * billing_address has been added to Estimate#CreateSubItemForCustomerEstimateRequest.
21
+ * transactions[amount] has been added to Invoice#ApplyPaymentsRequest.
22
+
23
+ ### v2.32.0 (2024-01-31)
24
+ * * *
25
+
26
+ #### New Enum values:
27
+ * item_price_entitlements_updated has been added to EventTypeEnum.
28
+ * item_price_entitlements_removed has been added to EventTypeEnum.
29
+
30
+ #### New Input parameters:
31
+ * layout has been added to HostedPage#AcceptQuoteRequest in HostedPage resource.
32
+
1
33
  ### v2.31.0 (2024-01-04)
2
34
  * * *
3
35
 
@@ -15,7 +47,6 @@
15
47
  * active_id has been added to customers.
16
48
  * active_id has been added to subscriptions.
17
49
  * reference_id has been made optional for payment_sources/create_using_permanent_token
18
- * payment_method_token, customer_profile_token, network_transaction_id, mandate_id, skip_retrieval, card, billing_address has been added to payment_sources.
19
50
  * custom_payment_method_id has been added to transactions.
20
51
  * custom_payment_method_name has been added to transactions.
21
52
  * error_detail has been added to transactions.
@@ -25,9 +56,6 @@
25
56
  * CMR_FALABELLA, TARJETA_NARANJA, NATIVA, CENCOSUD, CABAL, ARGENCARD, ELO, HIPERCARD, CARNET, RUPAY, MAESTRO has been added to Card#CardTypeEnum
26
57
  * Transferred has been added to Subscription#StatusEnum.
27
58
  * Transferred has been added to SubscriptionEstimate#StatusEnum.
28
- * proration_type has been added to Subscription#UpdateForItemsRequest.
29
- * proration_type has been added to ItemPrice.
30
- * payment_initiator has been added to Invoice.
31
59
  * AutomatedBankTransfer has been added to PaymentMethodEnum.
32
60
  * UsAutomatedBankTransfer, GbAutomatedBankTransfer, EuAutomatedBankTransfer, JpAutomatedBankTransfer, MxAutomatedBankTransfer has been added to VirtualBankAccount#SchemeEnum.
33
61
  * CustomerBusinessEntityChanged, SubscriptionBusinessEntityChanged has been added to EventTypeEnum.
@@ -39,16 +67,9 @@
39
67
  #### New Input parameters:
40
68
  * custom_payment_method_name has been added to Transactions#RecordRefundRequest.
41
69
  * proration_type has been added to Subscription#UpdateForItemsRequest.
70
+ * proration_type has been added to ItemPrice.
71
+ * payment_initiator has been added to Invoice.
42
72
  * payment_method_token, customer_profile_token, network_transaction_id, mandate_id, skip_retrieval, card, billing_address has been added to PaymentSource#CreateUsingPermanentTokenRequest.
43
- * date_to, date_from, prorated_taxable_amount has been added to QuoteLineGroup#LineItemTax.
44
- * date_to, date_from, prorated_taxable_amount has been added to Quote#LineItemTax.
45
- * date_to, date_from, prorated_taxable_amount has been added to CreditNoteEstimate#LineItemTax.
46
- * date_to, date_from, prorated_taxable_amount has been added to CreditNote#LineItemTax.
47
- * date_to, date_from, prorated_taxable_amount has been added to InvoiceEstimate#LineItemTax.
48
- * date_to, date_from, prorated_taxable_amount has been added to Order#LineItemTax.
49
- * date_to, date_from, prorated_taxable_amount has been added to Invoice#LineItemTax.
50
- * active_id has been added to Customer.
51
- * active_id has been added to Subscription.
52
73
  * subscription_items[proration_type] has been added to Estimate#UpdateSubscriptionForItemsRequest.
53
74
  * transaction[custom_payment_method_id] has been added to Customer#RecordExcessPaymentRequest.
54
75
  * transaction[custom_payment_method_id] has been added to CreditNote#RecordRefundRequest.
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License
2
2
 
3
- Copyright (c) 2011-2023 ChargeBee, Inc.
3
+ Copyright (c) 2011-2024 ChargeBee, Inc.
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person
6
6
  obtaining a copy of this software and associated documentation
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.31.0',
14
+ clientVersion: 'v2.33.0',
15
15
  port: 443,
16
16
  timemachineWaitInMillis: 3000,
17
17
  exportWaitInMillis: 3000
@@ -2092,20 +2092,24 @@ var _endpoints = {
2092
2092
  true
2093
2093
  ]
2094
2094
  ],
2095
- "site_migration_detail": [[
2096
- "list",
2097
- "GET",
2098
- "/site_migration_details",
2099
- null,
2100
- false
2101
- ]],
2102
- "resource_migration": [[
2103
- "retrieve_latest",
2104
- "GET",
2105
- "/resource_migrations",
2106
- "/retrieve_latest",
2107
- false
2108
- ]],
2095
+ "site_migration_detail": [
2096
+ [
2097
+ "list",
2098
+ "GET",
2099
+ "/site_migration_details",
2100
+ null,
2101
+ false
2102
+ ]
2103
+ ],
2104
+ "resource_migration": [
2105
+ [
2106
+ "retrieve_latest",
2107
+ "GET",
2108
+ "/resource_migrations",
2109
+ "/retrieve_latest",
2110
+ false
2111
+ ]
2112
+ ],
2109
2113
  "time_machine": [
2110
2114
  [
2111
2115
  "retrieve",
@@ -2273,6 +2277,7 @@ var _endpoints = {
2273
2277
  true
2274
2278
  ]
2275
2279
  ],
2280
+ "gateway_error_detail": [],
2276
2281
  "item_family": [
2277
2282
  [
2278
2283
  "create",
@@ -2685,6 +2690,6 @@ var _endpoints = {
2685
2690
  "/payment_vouchers",
2686
2691
  true
2687
2692
  ]
2688
- ],
2693
+ ]
2689
2694
  };
2690
2695
  module.exports = _endpoints;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name":"chargebee",
3
- "version":"2.31.0",
3
+ "version":"2.33.0",
4
4
  "description":"A library for integrating with ChargeBee.",
5
5
  "keywords":[
6
6
  "payments",
package/types/core.d.ts CHANGED
@@ -42,7 +42,7 @@ declare module 'chargebee' {
42
42
  type EntityCode = 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h' | 'i' | 'j' | 'k' | 'l' | 'm' | 'n' | 'p' | 'q' | 'r' | 'med2' | 'med1'
43
43
  type EntityType = 'item' | 'product' | 'coupon' | 'addon' | 'item_price' | 'business_entity' | 'subscription' | 'item_family' | 'credit_note' | 'quote' | 'variant' | 'invoice' | 'plan' | 'transaction' | 'customer' | 'order'
44
44
  type EventName = 'cancellation_page_loaded'
45
- 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'
45
+ type EventType = 'subscription_pause_scheduled' | 'order_delivered' | 'customer_business_entity_changed' | '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_business_entity_changed' | '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_entitlements_updated' | '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' | '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' | 'subscription_created_with_backdating' | 'order_deleted' | 'item_entitlements_updated' | 'token_consumed' | 'hierarchy_deleted' | 'subscription_cancellation_scheduled' | 'gift_updated' | 'subscription_trial_extended' | 'subscription_renewed' | 'feature_updated' | 'feature_deleted' | 'item_family_created' | 'card_expiry_reminder' | 'token_created' | 'purchase_created' | 'entitlement_overrides_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' | 'item_price_entitlements_removed' | 'card_updated' | 'customer_created' | 'pending_invoice_updated' | 'quote_updated' | 'subscription_renewal_reminder' | 'attached_item_updated' | 'payment_source_updated' | 'business_entity_deleted' | 'authorization_voided' | 'plan_deleted' | 'addon_deleted' | 'addon_updated' | 'addon_created' | 'plan_created' | 'entitlement_overrides_updated' | 'plan_updated'
46
46
  type ExportType = 'data' | 'import_friendly_data'
47
47
  type FreePeriodUnit = 'week' | 'month' | 'year' | 'day'
48
48
  type FriendOfferType = 'coupon_code' | 'coupon' | 'none'
@@ -73,7 +73,7 @@ declare module 'chargebee' {
73
73
  type Role = 'backup' | 'none' | 'primary'
74
74
  type ScheduleType = 'immediate' | 'specific_dates' | 'fixed_intervals'
75
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' | 'customer_exempt' | 'region_non_taxable' | 'zero_value_item' | 'export' | 'product_exempt'
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
77
  type TaxJurisType = 'special' | 'country' | 'unincorporated' | 'other' | 'city' | 'federal' | 'county' | 'state'
78
78
  type TaxOverrideReason = 'id_exempt' | 'customer_exempt' | 'export'
79
79
  type Taxability = 'taxable' | 'exempt'
package/types/index.d.ts CHANGED
@@ -20,6 +20,7 @@
20
20
  ///<reference path='./resources/Event.d.ts' />
21
21
  ///<reference path='./resources/Export.d.ts' />
22
22
  ///<reference path='./resources/Feature.d.ts' />
23
+ ///<reference path='./resources/GatewayErrorDetail.d.ts' />
23
24
  ///<reference path='./resources/Gift.d.ts' />
24
25
  ///<reference path='./resources/Hierarchy.d.ts' />
25
26
  ///<reference path='./resources/HostedPage.d.ts' />
@@ -511,7 +511,7 @@ This endpoint schedules e-invoices manually. This operation is not allowed when
511
511
 
512
512
  */
513
513
 
514
- line_items?:{amount?:number,date_from?:number,date_to?:number,description?:string,quantity?:number,quantity_in_decimal?:string,reference_line_item_id:string,unit_amount?:number,unit_amount_in_decimal?:string}[];
514
+ line_items:{amount?:number,date_from?:number,date_to?:number,description?:string,quantity?:number,quantity_in_decimal?:string,reference_line_item_id:string,unit_amount?:number,unit_amount_in_decimal?:string}[];
515
515
  }
516
516
  export interface RetrieveResponse {
517
517
  credit_note:CreditNote;
@@ -794,7 +794,7 @@ This endpoint schedules e-invoices manually. This operation is not allowed when
794
794
 
795
795
  */
796
796
 
797
- tax_withheld?:{id:string};
797
+ tax_withheld:{id:string};
798
798
  }
799
799
  export interface ResendEinvoiceResponse {
800
800
  credit_note:CreditNote;
@@ -931,42 +931,42 @@ Ireland** . The first two characters of the VAT number in such a case is &#x60;X
931
931
 
932
932
  */
933
933
 
934
- line_items?:{amount?:number,amount_in_decimal?:string,date_from?:number,date_to?:number,description:string,entity_id?:string,entity_type?:'addon_item_price' | 'plan_item_price' | 'charge_item_price' | 'adhoc',id?:string,item_level_discount1_amount?:number,item_level_discount1_entity_id?:string,item_level_discount2_amount?:number,item_level_discount2_entity_id?:string,quantity?:number,quantity_in_decimal?:string,reference_line_item_id?:string,subscription_id?:string,tax10_amount?:number,tax10_name?:string,tax1_amount?:number,tax1_name?:string,tax2_amount?:number,tax2_name?:string,tax3_amount?:number,tax3_name?:string,tax4_amount?:number,tax4_name?:string,tax5_amount?:number,tax5_name?:string,tax6_amount?:number,tax6_name?:string,tax7_amount?:number,tax7_name?:string,tax8_amount?:number,tax8_name?:string,tax9_amount?:number,tax9_name?:string,unit_amount?:number,unit_amount_in_decimal?:string}[];
934
+ line_items:{amount?:number,amount_in_decimal?:string,date_from?:number,date_to?:number,description:string,entity_id?:string,entity_type?:'addon_item_price' | 'plan_item_price' | 'charge_item_price' | 'adhoc',id?:string,item_level_discount1_amount?:number,item_level_discount1_entity_id?:string,item_level_discount2_amount?:number,item_level_discount2_entity_id?:string,quantity?:number,quantity_in_decimal?:string,reference_line_item_id?:string,subscription_id?:string,tax10_amount?:number,tax10_name?:string,tax1_amount?:number,tax1_name?:string,tax2_amount?:number,tax2_name?:string,tax3_amount?:number,tax3_name?:string,tax4_amount?:number,tax4_name?:string,tax5_amount?:number,tax5_name?:string,tax6_amount?:number,tax6_name?:string,tax7_amount?:number,tax7_name?:string,tax8_amount?:number,tax8_name?:string,tax9_amount?:number,tax9_name?:string,unit_amount?:number,unit_amount_in_decimal?:string}[];
935
935
 
936
936
  /**
937
937
  * @description Parameters for line_item_tiers
938
938
 
939
939
  */
940
940
 
941
- line_item_tiers?:{ending_unit?:number,ending_unit_in_decimal?:string,line_item_id:string,quantity_used?:number,quantity_used_in_decimal?:string,starting_unit?:number,starting_unit_in_decimal?:string,unit_amount?:number,unit_amount_in_decimal?:string}[];
941
+ line_item_tiers:{ending_unit?:number,ending_unit_in_decimal?:string,line_item_id:string,quantity_used?:number,quantity_used_in_decimal?:string,starting_unit?:number,starting_unit_in_decimal?:string,unit_amount?:number,unit_amount_in_decimal?:string}[];
942
942
 
943
943
  /**
944
944
  * @description Parameters for discounts
945
945
 
946
946
  */
947
947
 
948
- discounts?:{amount:number,description?:string,entity_id?:string,entity_type:'item_level_coupon' | 'promotional_credits' | 'item_level_discount' | 'document_level_discount' | 'document_level_coupon',line_item_id?:string}[];
948
+ discounts:{amount:number,description?:string,entity_id?:string,entity_type:'item_level_coupon' | 'promotional_credits' | 'item_level_discount' | 'document_level_discount' | 'document_level_coupon',line_item_id?:string}[];
949
949
 
950
950
  /**
951
951
  * @description Parameters for taxes
952
952
 
953
953
  */
954
954
 
955
- taxes?:{amount?:number,description?:string,juris_code?:string,juris_name?:string,juris_type?:'special' | 'country' | 'unincorporated' | 'other' | 'city' | 'federal' | 'county' | 'state',name:string,rate:number}[];
955
+ taxes:{amount?:number,description?:string,juris_code?:string,juris_name?:string,juris_type?:'special' | 'country' | 'unincorporated' | 'other' | 'city' | 'federal' | 'county' | 'state',name:string,rate:number}[];
956
956
 
957
957
  /**
958
958
  * @description Parameters for allocations
959
959
 
960
960
  */
961
961
 
962
- allocations?:{allocated_amount:number,allocated_at:number,invoice_id:string}[];
962
+ allocations:{allocated_amount:number,allocated_at:number,invoice_id:string}[];
963
963
 
964
964
  /**
965
965
  * @description Parameters for linked_refunds
966
966
 
967
967
  */
968
968
 
969
- linked_refunds?:{amount:number,date:number,payment_method:PaymentMethod,reference_number?:string}[];
969
+ linked_refunds:{amount:number,date:number,payment_method:PaymentMethod,reference_number?:string}[];
970
970
  }
971
971
  export interface Einvoice {
972
972
  /**
@@ -1146,7 +1146,7 @@ Ireland** . The first two characters of the VAT number in such a case is &#x60;X
1146
1146
 
1147
1147
  */
1148
1148
 
1149
- tax_exempt_reason?:'high_value_physical_goods' | 'tax_not_configured' | 'reverse_charge' | 'zero_rated' | 'customer_exempt' | 'region_non_taxable' | 'zero_value_item' | 'export' | 'product_exempt';
1149
+ tax_exempt_reason?:'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';
1150
1150
 
1151
1151
  /**
1152
1152
  * @description The identifier of the modelled entity this line item is based on. Will be null for &#x27;adhoc&#x27; entity type
@@ -46,7 +46,7 @@ declare module 'chargebee' {
46
46
 
47
47
  date_to:number;
48
48
 
49
- unit_amount?:number;
49
+ unit_amount:number;
50
50
 
51
51
  quantity?:number;
52
52
 
@@ -54,7 +54,7 @@ declare module 'chargebee' {
54
54
 
55
55
  pricing_model?:'volume' | 'per_unit' | 'tiered' | 'flat_fee' | 'stairstep';
56
56
 
57
- is_taxed?:boolean;
57
+ is_taxed:boolean;
58
58
 
59
59
  tax_amount?:number;
60
60
 
@@ -69,29 +69,31 @@ declare module 'chargebee' {
69
69
  discount_amount?:number;
70
70
 
71
71
  item_level_discount_amount?:number;
72
+
73
+ usage_percentage?:string;
72
74
 
73
75
  reference_line_item_id?:string;
74
76
 
75
- description?:string;
77
+ description:string;
76
78
 
77
79
  entity_description?:string;
78
80
 
79
- entity_type?:'addon_item_price' | 'plan_item_price' | 'charge_item_price' | 'adhoc';
81
+ entity_type:'addon_item_price' | 'plan_item_price' | 'charge_item_price' | 'adhoc';
80
82
 
81
- tax_exempt_reason?:'high_value_physical_goods' | 'tax_not_configured' | 'reverse_charge' | 'zero_rated' | 'customer_exempt' | 'region_non_taxable' | 'zero_value_item' | 'export' | 'product_exempt';
83
+ tax_exempt_reason?:'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';
82
84
 
83
85
  entity_id?:string;
84
86
 
85
87
  customer_id?:string;
86
88
  }
87
89
  export interface Discount {
88
- amount?:number;
90
+ amount:number;
89
91
 
90
92
  description?:string;
91
93
 
92
94
  line_item_id?:string;
93
95
 
94
- entity_type?:'item_level_coupon' | 'promotional_credits' | 'item_level_discount' | 'prorated_credits' | 'document_level_discount' | 'document_level_coupon';
96
+ entity_type:'item_level_coupon' | 'promotional_credits' | 'item_level_discount' | 'prorated_credits' | 'document_level_discount' | 'document_level_coupon';
95
97
 
96
98
  discount_type?:'fixed_amount' | 'percentage';
97
99
 
@@ -100,26 +102,32 @@ declare module 'chargebee' {
100
102
  coupon_set_code?:string;
101
103
  }
102
104
  export interface Tax {
103
- name?:string;
105
+ name:string;
104
106
 
105
- amount?:number;
107
+ amount:number;
106
108
 
107
109
  description?:string;
108
110
  }
109
111
  export interface LineItemTax {
110
112
  line_item_id?:string;
111
113
 
112
- tax_name?:string;
114
+ tax_name:string;
113
115
 
114
- tax_rate?:number;
116
+ tax_rate:number;
117
+
118
+ date_to?:number;
119
+
120
+ date_from?:number;
121
+
122
+ prorated_taxable_amount?:number;
115
123
 
116
124
  is_partial_tax_applied?:boolean;
117
125
 
118
126
  is_non_compliance_tax?:boolean;
119
127
 
120
- taxable_amount?:number;
128
+ taxable_amount:number;
121
129
 
122
- tax_amount?:number;
130
+ tax_amount:number;
123
131
 
124
132
  tax_juris_type?:'special' | 'country' | 'unincorporated' | 'other' | 'city' | 'federal' | 'county' | 'state';
125
133
 
@@ -132,26 +140,26 @@ declare module 'chargebee' {
132
140
  local_currency_code?:string;
133
141
  }
134
142
  export interface LineItemDiscount {
135
- line_item_id?:string;
143
+ line_item_id:string;
136
144
 
137
- discount_type?:'item_level_coupon' | 'promotional_credits' | 'item_level_discount' | 'prorated_credits' | 'document_level_discount' | 'document_level_coupon';
145
+ discount_type:'item_level_coupon' | 'promotional_credits' | 'item_level_discount' | 'prorated_credits' | 'document_level_discount' | 'document_level_coupon';
138
146
 
139
147
  coupon_id?:string;
140
148
 
141
149
  entity_id?:string;
142
150
 
143
- discount_amount?:number;
151
+ discount_amount:number;
144
152
  }
145
153
  export interface LineItemTier {
146
154
  line_item_id?:string;
147
155
 
148
- starting_unit?:number;
156
+ starting_unit:number;
149
157
 
150
158
  ending_unit?:number;
151
159
 
152
- quantity_used?:number;
160
+ quantity_used:number;
153
161
 
154
- unit_amount?:number;
162
+ unit_amount:number;
155
163
 
156
164
  starting_unit_in_decimal?:string;
157
165
 
@@ -2,63 +2,150 @@
2
2
  declare module 'chargebee' {
3
3
  export interface Entitlement {
4
4
 
5
+ /**
6
+ * @description A unique identifier for the entitlement. This is auto-generated.
7
+
8
+ */
9
+
5
10
  id:string;
6
11
 
12
+ /**
13
+ * @description The unique identifier of the entity being granted entitlement to a specific &#x60;feature&#x60;.
14
+
15
+ */
16
+
7
17
  entity_id?:string;
8
18
 
19
+ /**
20
+ * @description The type of the entity that holds this entitlement. \* plan -
21
+
22
+ Indicates that the entity is an &#x60;item&#x60; with [type](items?prod_cat_ver&#x3D;2#item_type) set to &#x60;plan&#x60;.
23
+ \* addon -
24
+
25
+ Indicates that the entity is an &#x60;item&#x60; with [type](items?prod_cat_ver&#x3D;2#item_type) set to &#x60;addon&#x60;.
26
+ \* addon_price -
27
+
28
+ Indicates that the entity is an &#x60;item_price&#x60; associated with an &#x60;item&#x60; with [type](items?prod_cat_ver&#x3D;2#item_type) set to &#x60;addon&#x60;.
29
+ \* charge -
30
+
31
+ Indicates that the entity is an &#x60;item&#x60; with [type](items?prod_cat_ver&#x3D;2#item_type) set to &#x60;charge&#x60;.
32
+ \* plan_price -
33
+
34
+ Indicates that the entity is an &#x60;item_price&#x60; associated with an &#x60;item&#x60; of [type](items?prod_cat_ver&#x3D;2#item_type) &#x60;plan&#x60;.
35
+
36
+ */
37
+
9
38
  entity_type?:'charge' | 'addon' | 'addon_price' | 'plan_price' | 'plan';
10
39
 
40
+ /**
41
+ * @description The unique identifier of the &#x60;feature&#x60; to which the entity gains entitlement.
42
+
43
+ */
44
+
11
45
  feature_id?:string;
12
46
 
47
+ /**
48
+ * @description The &#x60;name&#x60; of the feature associated with this entitlement.
49
+
50
+ */
51
+
13
52
  feature_name?:string;
14
53
 
54
+ /**
55
+ * @description The level of entitlement that the entity has towards the feature. The possible values depend on the value of &#x60;feature.type&#x60;:
56
+
57
+ * When &#x60;feature.type&#x60; is &#x60;quantity&#x60; and:
58
+ * If &#x60;feature.levels[is_unlimited]&#x60; is not &#x60;true&#x60; for any one of &#x60;feature.levels[]&#x60;, then the value can be any one of &#x60;feature.levels[value][]&#x60;.
59
+ * If &#x60;feature.levels[is_unlimited]&#x60; is &#x60;true&#x60; for one of the &#x60;feature.levels[]&#x60;, then the value can be:
60
+ * any one of &#x60;feature.levels[value][]&#x60;
61
+ * or it can be &#x60;unlimited&#x60; (case-insensitive), indicating unlimited entitlement.
62
+ * When &#x60;type&#x60; is &#x60;range&#x60; and:
63
+ * If &#x60;feature.levels[is_unlimited]&#x60; is not &#x60;true&#x60; for any one of &#x60;feature.levels[]&#x60;, then the value can be any whole number between &#x60;levels[value][0]&#x60; and &#x60;levels[value][1]&#x60; (inclusive).
64
+ * If &#x60;feature.levels[is_unlimited]&#x60; is &#x60;true&#x60; for one of the &#x60;feature.levels[]&#x60;, then the value can be:
65
+ * any whole number equal to or greater than &#x60;levels[value][0]&#x60;
66
+ * or it can be &#x60;unlimited&#x60; (case-insensitive), indicating unlimited entitlement.
67
+ * When &#x60;type&#x60; is &#x60;custom&#x60;, then the value can be any one of &#x60;feature.levels[value][]&#x60;.
68
+ * When &#x60;type&#x60; is &#x60;switch&#x60;, then the value is set as &#x60;available&#x60; or &#x60;true&#x60;.
69
+
70
+ */
71
+
15
72
  value?:string;
16
73
 
74
+ /**
75
+ * @description The display name for the entitlement level. The value is automatically generated based on &#x60;feature.type&#x60;:
76
+
77
+ * When &#x60;feature.type&#x60; is &#x60;quantity&#x60; or &#x60;range&#x60;, the &#x60;name&#x60; is the space-separated concatenation of &#x60;value&#x60; and the plural form of &#x60;feature.unit&#x60;. For instance, if &#x60;value&#x60; is &#x60;20&#x60; and &#x60;feature.unit&#x60; is &#x60;user&#x60;, the &#x60;name&#x60; will be &#x60;20 users&#x60;.
78
+ * When &#x60;feature.type&#x60; is &#x60;custom&#x60;, the &#x60;name&#x60; matches the &#x60;value&#x60;.
79
+
80
+ */
81
+
17
82
  name?:string;
18
83
  }
19
84
  export namespace Entitlement {
20
85
  export class EntitlementResource {
86
+ /**
87
+ * @description Retrieves a list of all the &#x60;entitlement&#x60;s associated with the specified &#x60;feature&#x60;.
88
+
89
+ */
90
+
21
91
  list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
22
92
 
93
+ /**
94
+ * @description Create, update, or remove a set of &#x60;entitlement&#x60;s for a feature.
95
+
96
+ The behavior depends on the specified &#x60;action&#x60;. It tries to create, update, or delete &#x60;entitlement&#x60; objects. If any of the entitlement objects fail to process, the entire operation stops with an error, and no entitlements are processed. In essence, the request processes either all the provided entitlements or none of them.
97
+
98
+ */
99
+
23
100
  create(input:CreateInputParam):ChargebeeRequest<CreateResponse>;
24
101
  }
25
102
  export interface ListResponse {
103
+ /**
104
+ * @description Retrieves a list of all the &#x60;entitlement&#x60;s associated with the specified &#x60;feature&#x60;.
105
+
106
+ */
107
+
26
108
  list:{entitlement:Entitlement}[];
27
109
 
110
+ /**
111
+ * @description Retrieves a list of all the &#x60;entitlement&#x60;s associated with the specified &#x60;feature&#x60;.
112
+
113
+ */
114
+
28
115
  next_offset?:string;
29
116
  }
30
117
  export interface ListInputParam {
31
118
  [key : string]: any;
32
119
  /**
33
- * @description The number of resources to be returned.
120
+ * @description Retrieves a list of all the &#x60;entitlement&#x60;s associated with the specified &#x60;feature&#x60;.
34
121
 
35
122
  */
36
123
 
37
124
  limit?:number;
38
125
 
39
126
  /**
40
- * @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.
127
+ * @description Retrieves a list of all the &#x60;entitlement&#x60;s associated with the specified &#x60;feature&#x60;.
41
128
 
42
129
  */
43
130
 
44
131
  offset?:string;
45
132
 
46
133
  /**
47
- * @description The &#x60;id&#x60; of the feature towards which this entitlement has been granted.
134
+ * @description Retrieves a list of all the &#x60;entitlement&#x60;s associated with the specified &#x60;feature&#x60;.
48
135
 
49
136
  */
50
137
 
51
138
  feature_id?:{in?:string,is?:string};
52
139
 
53
140
  /**
54
- * @description The &#x60;type&#x60; of the &#x60;entity&#x60; to which this entitlement belongs.
141
+ * @description Retrieves a list of all the &#x60;entitlement&#x60;s associated with the specified &#x60;feature&#x60;.
55
142
 
56
143
  */
57
144
 
58
145
  entity_type?:{in?:string,is?:'charge' | 'addon' | 'addon_price' | 'plan_price' | 'plan'};
59
146
 
60
147
  /**
61
- * @description The &#x60;id&#x60; of the &#x60;entity&#x60; to which this entitlement belongs.
148
+ * @description Retrieves a list of all the &#x60;entitlement&#x60;s associated with the specified &#x60;feature&#x60;.
62
149
 
63
150
  */
64
151
 
@@ -69,8 +156,18 @@ declare module 'chargebee' {
69
156
  }
70
157
  export interface CreateInputParam {
71
158
 
159
+ /**
160
+ * @description The specific action to be performed for each &#x60;entitlement&#x60; specified. \* upsert - If the &#x60;entitlement&#x60; already exists for the &#x60;feature_id&#x60; and &#x60;entity_id&#x60; combination, the &#x60;value&#x60; of the &#x60;entitlement&#x60; is updated. If it doesn&#x27;t exist, a new &#x60;entitlement&#x60; is created. \* remove - Deletes the &#x60;entitlement&#x60; for the &#x60;feature_id&#x60; and &#x60;entity_id&#x60; combination, if it exists.
161
+
162
+ */
163
+
72
164
  action:Action;
73
165
 
166
+ /**
167
+ * @description Parameters for entitlements
168
+
169
+ */
170
+
74
171
  entitlements:{entity_id:string,entity_type?:'charge' | 'addon' | 'addon_price' | 'plan_price' | 'plan',feature_id:string,value?:string}[];
75
172
  }
76
173