chargebee 2.30.0 → 2.31.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,58 @@
1
+ ### v2.31.0 (2024-01-04)
2
+ * * *
3
+
4
+ #### New resources:
5
+ * Entitlements has been added.
6
+
7
+ #### New attributes:
8
+ * date_to, date_from, prorated_taxable_amount has been added to quote_line_group.
9
+ * date_to, date_from, prorated_taxable_amount has been added to quote.
10
+ * date_to, date_from, prorated_taxable_amount has been added to credit_note_estimate.
11
+ * date_to, date_from, prorated_taxable_amount has been added to credit_note.
12
+ * date_to, date_from, prorated_taxable_amount has been added to invoice_estimate.
13
+ * date_to, date_from, prorated_taxable_amount has been added to order.
14
+ * date_to, date_from, prorated_taxable_amount has been added to invoice.
15
+ * active_id has been added to customers.
16
+ * active_id has been added to subscriptions.
17
+ * 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
+ * custom_payment_method_id has been added to transactions.
20
+ * custom_payment_method_name has been added to transactions.
21
+ * error_detail has been added to transactions.
22
+
23
+
24
+ #### New Enum values:
25
+ * CMR_FALABELLA, TARJETA_NARANJA, NATIVA, CENCOSUD, CABAL, ARGENCARD, ELO, HIPERCARD, CARNET, RUPAY, MAESTRO has been added to Card#CardTypeEnum
26
+ * Transferred has been added to Subscription#StatusEnum.
27
+ * 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
+ * AutomatedBankTransfer has been added to PaymentMethodEnum.
32
+ * UsAutomatedBankTransfer, GbAutomatedBankTransfer, EuAutomatedBankTransfer, JpAutomatedBankTransfer, MxAutomatedBankTransfer has been added to VirtualBankAccount#SchemeEnum.
33
+ * CustomerBusinessEntityChanged, SubscriptionBusinessEntityChanged has been added to EventTypeEnum.
34
+ * Dlocal has been added to GatewayEnum.
35
+ * UsAutomatedBankTransfer, UkAutomatedBankTransfer, EuAutomatedBankTransfer, JpAutomatedBankTransfer, MxAutomatedBankTransfer, Custom has been added to OfflinePaymentMethodEnum.
36
+ * AutomatedBankTransfer has been added to PaymentMethodEnum.
37
+ * AutomatedBankTransfer has been added to PaymentMethodTypeEnum.
38
+
39
+ #### New Input parameters:
40
+ * custom_payment_method_name has been added to Transactions#RecordRefundRequest.
41
+ * proration_type has been added to Subscription#UpdateForItemsRequest.
42
+ * 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
+ * subscription_items[proration_type] has been added to Estimate#UpdateSubscriptionForItemsRequest.
53
+ * transaction[custom_payment_method_id] has been added to Customer#RecordExcessPaymentRequest.
54
+ * transaction[custom_payment_method_id] has been added to CreditNote#RecordRefundRequest.
55
+
1
56
  ### v2.30.0 (2023-11-30)
2
57
  * * *
3
58
 
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.30.0',
14
+ clientVersion: 'v2.31.0',
15
15
  port: 443,
16
16
  timemachineWaitInMillis: 3000,
17
17
  exportWaitInMillis: 3000
@@ -2578,6 +2578,22 @@ var _endpoints = {
2578
2578
  true
2579
2579
  ]
2580
2580
  ],
2581
+ "entitlement": [
2582
+ [
2583
+ "list",
2584
+ "GET",
2585
+ "/entitlements",
2586
+ null,
2587
+ false
2588
+ ],
2589
+ [
2590
+ "create",
2591
+ "POST",
2592
+ "/entitlements",
2593
+ null,
2594
+ false
2595
+ ]
2596
+ ],
2581
2597
  "in_app_subscription": [
2582
2598
  [
2583
2599
  "process_receipt",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name":"chargebee",
3
- "version":"2.30.0",
3
+ "version":"2.31.0",
4
4
  "description":"A library for integrating with ChargeBee.",
5
5
  "keywords":[
6
6
  "payments",
package/types/core.d.ts CHANGED
@@ -46,24 +46,25 @@ declare module 'chargebee' {
46
46
  type ExportType = 'data' | 'import_friendly_data'
47
47
  type FreePeriodUnit = 'week' | 'month' | 'year' | 'day'
48
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' | '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 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'
50
50
  type HierarchyOperationType = 'complete_hierarchy' | 'subordinates' | 'path_to_root'
51
51
  type InvoiceDunningHandling = 'stop' | 'continue'
52
52
  type ItemType = 'charge' | 'addon' | 'plan'
53
53
  type Layout = 'in_app' | 'full_page'
54
54
  type NotifyReferralSystem = 'all_invoices' | 'none' | 'first_paid_conversion'
55
- type OfflinePaymentMethod = 'bank_transfer' | 'no_preference' | 'ach_credit' | 'boleto' | 'check' | 'sepa_credit' | 'cash'
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
56
  type OnEvent = 'subscription_creation' | 'subscription_activation' | 'subscription_trial_start' | 'contract_termination' | 'plan_activation'
57
57
  type Operation = 'create' | 'update' | 'delete'
58
58
  type OperationType = 'add' | 'remove'
59
59
  type PauseOption = 'end_of_term' | 'billing_cycles' | 'immediately' | 'specific_date'
60
60
  type PaymentInitiator = 'merchant' | 'customer'
61
- type PaymentMethod = 'other' | 'netbanking_emandates' | 'ach_credit' | 'dotpay' | 'boleto' | 'direct_debit' | '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' | 'dotpay' | 'unionpay' | 'direct_debit' | 'faster_payments' | 'generic' | 'sofort' | 'amazon_payments' | 'upi' | 'venmo' | 'apple_pay' | 'bancontact' | 'paypal_express_checkout' | 'wechat_pay' | 'pay_to' | 'card'
61
+ type PaymentMethod = 'other' | 'netbanking_emandates' | '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' | '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'
63
63
  type PaymentVoucherType = 'boleto'
64
64
  type PeriodUnit = 'week' | 'month' | 'year' | 'day'
65
65
  type PriceType = 'tax_exclusive' | 'tax_inclusive'
66
66
  type PricingModel = 'volume' | 'per_unit' | 'tiered' | 'flat_fee' | 'stairstep'
67
+ type ProrationType = 'partial_term' | 'full_term' | 'none'
67
68
  type ReferralSystem = 'referral_candy' | 'friendbuy' | 'referral_saasquatch'
68
69
  type ReferrerRewardType = 'custom_promotional_credit' | 'referral_direct_reward' | 'custom_revenue_percent_based' | 'none'
69
70
  type RefundableCreditsHandling = 'schedule_refund' | 'no_action'
@@ -78,7 +79,7 @@ declare module 'chargebee' {
78
79
  type Taxability = 'taxable' | 'exempt'
79
80
  type TaxjarExemptionCategory = 'other' | 'wholesale' | 'government'
80
81
  type TrialEndAction = 'activate_subscription' | 'plan_default' | 'cancel_subscription' | 'site_default'
81
- type Type = 'giropay' | 'alipay' | 'ideal' | 'sepa_instant_transfer' | 'google_pay' | 'netbanking_emandates' | 'dotpay' | 'unionpay' | 'direct_debit' | 'faster_payments' | 'generic' | 'sofort' | 'amazon_payments' | 'upi' | 'venmo' | 'apple_pay' | 'bancontact' | 'paypal_express_checkout' | 'wechat_pay' | 'pay_to' | 'card'
82
+ type Type = 'giropay' | 'alipay' | 'ideal' | 'sepa_instant_transfer' | 'google_pay' | 'netbanking_emandates' | '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'
82
83
  type UnbilledChargesHandling = 'invoice' | 'no_action'
83
84
  type UnbilledChargesOption = 'invoice' | 'delete'
84
85
  type UnpaidInvoicesHandling = 'schedule_payment_collection' | 'no_action'
package/types/index.d.ts CHANGED
@@ -14,6 +14,7 @@
14
14
  ///<reference path='./resources/DifferentialPrice.d.ts' />
15
15
  ///<reference path='./resources/Discount.d.ts' />
16
16
  ///<reference path='./resources/Download.d.ts' />
17
+ ///<reference path='./resources/Entitlement.d.ts' />
17
18
  ///<reference path='./resources/EntitlementOverride.d.ts' />
18
19
  ///<reference path='./resources/Estimate.d.ts' />
19
20
  ///<reference path='./resources/Event.d.ts' />
@@ -72,6 +73,7 @@ declare module 'chargebee' {
72
73
  static credit_note: CreditNote.CreditNoteResource;
73
74
  static customer: Customer.CustomerResource;
74
75
  static differential_price: DifferentialPrice.DifferentialPriceResource;
76
+ static entitlement: Entitlement.EntitlementResource;
75
77
  static entitlement_override: EntitlementOverride.EntitlementOverrideResource;
76
78
  static estimate: Estimate.EstimateResource;
77
79
  static event: Event.EventResource;
@@ -17,7 +17,7 @@ declare module 'chargebee' {
17
17
  status:'valid' | 'expiring' | 'expired';
18
18
 
19
19
  /**
20
- * @description Name of the gateway this payment source is stored with. \* bluesnap - BlueSnap is a payment gateway. \* tco - 2Checkout is a payment gateway. \* bluepay - BluePay is a payment gateway. \* paypal_express_checkout - PayPal Express Checkout is a payment gateway. \* paypal_payflow_pro - PayPal Payflow Pro is a payment gateway. \* razorpay - Razorpay is a fast growing payment service provider in India working with all leading banks and support for major local payment methods including Netbanking, UPI etc. \* global_payments - Global Payments is a payment service provider. \* not_applicable - Indicates that payment gateway is not applicable for this resource. \* checkout_com - Checkout.com is a payment gateway. \* adyen - Adyen is a payment gateway. \* braintree - Braintree is a payment gateway. \* nmi - NMI is a payment gateway. \* worldpay - WorldPay is a payment gateway \* moneris_us - Moneris USA is a payment gateway. \* pin - Pin is a payment gateway \* authorize_net - Authorize.net is a payment gateway \* stripe - Stripe is a payment gateway. \* moneris - Moneris is a payment gateway. \* chargebee - Chargebee test gateway. \* cybersource - CyberSource is a payment gateway. \* ecentric - Ecentric provides a seamless payment processing service in South Africa specializing on omnichannel capabilities. \* first_data_global - First Data Global Gateway Virtual Terminal Account \* exact - Exact Payments is a payment gateway. \* eway - eWAY Account is a payment gateway. \* metrics_global - Metrics global is a leading payment service provider providing unified payment services in the US. \* amazon_payments - Amazon Payments is a payment service provider. \* windcave - Windcave provides an end to end payment processing solution in ANZ and other leading global markets. \* quickbooks - Intuit QuickBooks Payments gateway \* wepay - WePay is a payment gateway. \* wirecard - WireCard Account is a payment service provider. \* chargebee_payments - Chargebee Payments gateway \* sage_pay - Sage Pay is a payment gateway. \* elavon - Elavon Virtual Merchant is a payment solution. \* paypal_pro - PayPal Pro Account is a payment gateway. \* orbital - Chase Paymentech(Orbital) is a payment gateway. \* paypal - PayPal Commerce is a payment gateway. \* beanstream - Bambora(formerly known as Beanstream) is a payment gateway. \* hdfc - HDFC Account is a payment gateway. \* ingenico_direct - Worldline Online Payments is a payment gateway. \* ogone - Ingenico ePayments (formerly known as Ogone) is a payment gateway. \* migs - MasterCard Internet Gateway Service payment gateway. \* vantiv - Vantiv is a payment gateway. \* bank_of_america - Bank of America Gateway \* eway_rapid - eWAY Rapid is a payment gateway. \* gocardless - GoCardless is a payment service provider. \* mollie - Mollie is a payment gateway. \* paymill - PAYMILL is a payment gateway. \* balanced_payments - Balanced is a payment gateway
20
+ * @description Name of the gateway this payment source is stored with. \* bluesnap - BlueSnap is a payment gateway. \* tco - 2Checkout is a payment gateway. \* bluepay - BluePay is a payment gateway. \* paypal_express_checkout - PayPal Express Checkout is a payment gateway. \* paypal_payflow_pro - PayPal Payflow Pro is a payment gateway. \* razorpay - Razorpay is a fast growing payment service provider in India working with all leading banks and support for major local payment methods including Netbanking, UPI etc. \* global_payments - Global Payments is a payment service provider. \* not_applicable - Indicates that payment gateway is not applicable for this resource. \* checkout_com - Checkout.com is a payment gateway. \* adyen - Adyen is a payment gateway. \* braintree - Braintree is a payment gateway. \* nmi - NMI is a payment gateway. \* worldpay - WorldPay is a payment gateway \* moneris_us - Moneris USA is a payment gateway. \* pin - Pin is a payment gateway \* authorize_net - Authorize.net is a payment gateway \* stripe - Stripe is a payment gateway. \* moneris - Moneris is a payment gateway. \* chargebee - Chargebee test gateway. \* cybersource - CyberSource is a payment gateway. \* ecentric - Ecentric provides a seamless payment processing service in South Africa specializing on omnichannel capabilities. \* first_data_global - First Data Global Gateway Virtual Terminal Account \* exact - Exact Payments is a payment gateway. \* eway - eWAY Account is a payment gateway. \* metrics_global - Metrics global is a leading payment service provider providing unified payment services in the US. \* amazon_payments - Amazon Payments is a payment service provider. \* windcave - Windcave provides an end to end payment processing solution in ANZ and other leading global markets. \* quickbooks - Intuit QuickBooks Payments gateway \* wepay - WePay is a payment gateway. \* wirecard - WireCard Account is a payment service provider. \* chargebee_payments - Chargebee Payments gateway \* sage_pay - Sage Pay is a payment gateway. \* elavon - Elavon Virtual Merchant is a payment solution. \* paypal_pro - PayPal Pro Account is a payment gateway. \* orbital - Chase Paymentech(Orbital) is a payment gateway. \* paypal - PayPal Commerce is a payment gateway. \* beanstream - Bambora(formerly known as Beanstream) is a payment gateway. \* hdfc - HDFC Account is a payment gateway. \* ingenico_direct - Worldline Online Payments is a payment gateway. \* ogone - Ingenico ePayments (formerly known as Ogone) is a payment gateway. \* migs - MasterCard Internet Gateway Service payment gateway. \* vantiv - Vantiv is a payment gateway. \* bank_of_america - Bank of America Gateway \* eway_rapid - eWAY Rapid is a payment gateway. \* gocardless - GoCardless is a payment service provider. \* mollie - Mollie is a payment gateway. \* paymill - PAYMILL is a payment gateway. \* balanced_payments - Balanced is a payment gateway \* ebanx - EBANX is a payment gateway, enabling businesses to accept diverse local payment methods from various countries for increased market reach and conversion.
21
21
 
22
22
  */
23
23
 
@@ -70,7 +70,7 @@ declare module 'chargebee' {
70
70
 
71
71
  */
72
72
 
73
- card_type?:'discover' | 'bancontact' | 'other' | 'visa' | 'jcb' | 'diners_club' | 'mastercard' | 'not_applicable' | 'american_express';
73
+ card_type?:'discover' | 'other' | 'argencard' | 'jcb' | 'mastercard' | 'elo' | 'cencosud' | 'cmr_falabella' | 'american_express' | 'cabal' | 'nativa' | 'bancontact' | 'tarjeta_naranja' | 'carnet' | 'visa' | 'diners_club' | 'rupay' | 'not_applicable' | 'hipercard' | 'maestro';
74
74
 
75
75
  /**
76
76
  * @description Card Funding type \* credit - A credit card. \* prepaid - A prepaid card. \* debit - A debit card. \* not_applicable - Used for ACH. Not applicable for cards \* not_known - An unknown card.
@@ -375,7 +375,7 @@ If the &#x60;credit_note&#x60; [type](/docs/api/credit_notes#create_credit_note_
375
375
 
376
376
  */
377
377
 
378
- record_refund(credit_note_id:string, input?:RecordRefundInputParam):ChargebeeRequest<RecordRefundResponse>;
378
+ record_refund(credit_note_id:string, input:RecordRefundInputParam):ChargebeeRequest<RecordRefundResponse>;
379
379
 
380
380
  /**
381
381
  * @description Use this API to [void a credit note.](https://www.chargebee.com/docs/credit-notes.html#voiding-or-deleting-a-credit-note) A voided credit is a null entity and cannot be used again. A credit note which has already been voided or refunded cannot be voided. An error message will be displayed when you render such credit notes void.
@@ -587,7 +587,7 @@ This endpoint schedules e-invoices manually. This operation is not allowed when
587
587
 
588
588
  */
589
589
 
590
- transaction?:{amount?:number,date:number,payment_method:PaymentMethod,reference_number?:string};
590
+ transaction:{amount?:number,custom_payment_method_id?:string,date:number,payment_method:PaymentMethod,reference_number?:string};
591
591
  }
592
592
  export interface VoidCreditNoteResponse {
593
593
  credit_note:CreditNote;
@@ -1351,6 +1351,27 @@ Ireland** . The first two characters of the VAT number in such a case is &#x60;X
1351
1351
 
1352
1352
  tax_rate:number;
1353
1353
 
1354
+ /**
1355
+ * @description Indicates the service period end of the tax rate for the line item.
1356
+
1357
+ */
1358
+
1359
+ date_to?:number;
1360
+
1361
+ /**
1362
+ * @description Indicates the service period start of the tax rate for the line item.
1363
+
1364
+ */
1365
+
1366
+ date_from?:number;
1367
+
1368
+ /**
1369
+ * @description Indicates the prorated line item amount in cents.
1370
+
1371
+ */
1372
+
1373
+ prorated_taxable_amount?:number;
1374
+
1354
1375
  /**
1355
1376
  * @description Indicates if tax is applied only on a portion of the line item amount.
1356
1377
 
@@ -42,9 +42,9 @@ declare module 'chargebee' {
42
42
 
43
43
  subscription_id?:string;
44
44
 
45
- date_from?:number;
45
+ date_from:number;
46
46
 
47
- date_to?:number;
47
+ date_to:number;
48
48
 
49
49
  unit_amount?:number;
50
50