chargebee 2.6.5 → 2.8.1

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,140 @@
1
+ ### v2.8.1 (2022-01-05)
2
+ * * *
3
+
4
+ ### Fixes:
5
+ * Improved error message for Invalid JSON response.
6
+
7
+ ### v2.8.0 (2021-12-08)
8
+ * * *
9
+
10
+ ### Fixes:
11
+ * Exposed function chargebee#updateRequestTimeoutInMillis to set custom time out.
12
+ * Updated default request timeout to 80000ms.
13
+
14
+ #### New endpoints:
15
+ * payment_sources#update_bank_account have been added in payment_sources resource.
16
+ * item_price#item_price_find_applicable_items and item_price#item_price_find_applicable_item_prices have been added in item_price resource.
17
+
18
+ #### New Attributes:
19
+ * hsn_code have been added to the resource addon, item_price and plan.
20
+ * first_name, last_name and email have been added to the resource payment_sources.
21
+
22
+ #### New Resource:
23
+ * TaxWithheld has been added.Applicable only for API V2.
24
+
25
+ #### New Input parameters:
26
+ * hsn_code have been added to addons#create_an_addon, addons#update_an_addon, plan#create_an_plan and plan#update_an_plan apis.
27
+ * bank_account[first_name],bank_account[last_name] and bank_account[email] have been added to payment_sources#update_bank_account api.
28
+ * charges[hsn_code] have been added in estimate#Create_Invoice, estimate#Create_Invoice_For_Items, hosted_pages#Checkout_One_Time, hosted_pages#Checkout_One_Time_For_Items, invoice#create_an_invoice, invoice#Create_For_Charge_Items_And_Charges and unbilledCharge#create_an_unbilledCharge apis.
29
+ * tax_detail[hsn_code] have been added in item_price#create_an_itemPrice and item_price#update_an_itemPrice apis.
30
+ * include_deleted have been added in plan#plan_list and addon#addon_list apis.Applicable only for Product Catalog V1.
31
+
32
+ #### New Enum values:
33
+ * subscription_activated_with_backdating, tax_withheld_recorded, tax_withheld_deleted and tax_withheld_refunded has been added to event_type enum.
34
+
35
+ ### v2.7.0 (2021-08-16)
36
+ * * *
37
+ #### New Attributes:
38
+ * generated_at has been added in credit_note and invoice resources.
39
+ * change_option have been added in quoted_subscription resource.
40
+ * changes_scheduled_at has been added in subscription and quoted_subscription resources.
41
+ * iin and last4 have been added in transaction resource.
42
+
43
+ #### New Resource:
44
+ * quoted_charge has been added.
45
+
46
+ #### New Input parameters:
47
+ * invoice_date has been added in estimates##create_subscription_estimate, estimates#estimate_for_creating_a_customer_and_subscription, estimates#estimate_for_creating_a_subscription, estimates#create_subscription_for_a_customer_estimate, estimates#update_subscription_estimate, estimates#estimate_for_updating_a_subscription, estimates#cancel_subscription_estimate, estimates#cancel_subscription_for_items_estimate, estimates#create_invoice_for_items_estimate, estimates#create_invoice_estimate, hosted_pages#checkout_existing_subscription, hosted_pages#create_checkout_to_update_a_subscription, invoices#create_an_invoice, invoices#create_invoice_for_items_and_one-time_charges, subscriptions#create_a_subscription, subscriptions#create_subscription_for_customer, subscriptions#update_a_subscription, subscriptions#create_subscription_for_items, subscriptions#update_subscription_for_items, subscriptions#reactivate_a_subscription, subscriptions#cancel_subscription_for_items and subscriptions#cancel_a_subscription endpoints.
48
+ * coupon_ids has been added to invoices#create_invoice_for_a_one-time_charge, invoice#create_invoice_for_a_non-recurring_addon, quotes#create_quote_for_one-time_charges, quotes#edit_quote_for_one-time_charges, quotes#create_a_quote_for_charge_and_charge_items, quotes#edit_quote_for_charge_items_and_charges endpoints.
49
+ * change_option and changes_scheduled_at have been added in quotes#create_quote_for_updating_a_subscription, quotes#edit_quote_for_updating_a_subscription, quotes#create_a_quote_for_update_subscription_items, quotes#edit_update_subscription_quote_for_items, subscriptions#update_a_subscription and subscriptions#create_subscription_for_items endpoints.
50
+ * invoice_date, create_pending_invoices and first_invoice_pending have been added in quotes#convert_a_quote endpoint.
51
+ * subscription[auto_close_invoices] has been added in quotes#convert_a_quote endpoint.
52
+
53
+ #### New Enum values:
54
+ * subscription_cancel has been added to charge_event enum in quote_line_groups resource.
55
+ * subscription_created_with_backdating, subscription_changed_with_backdating, subscription_canceled_with_backdating, subscription_reactivated_with_backdating, invoice_generated_with_backdating and credit_note_created_with_backdating have been added to event_type enum
56
+ * change_option enum has been added.
57
+
58
+ #### Deprecated parameters:
59
+ * coupon has been deprecated in invoices#create_invoice_for_a_one-time_charge and invoices#create_invoice_for_a_non-recurring_addon endpoints.
60
+
61
+ ### v2.6.6 (2021-07-22)
62
+ * * *
63
+ #### Fixes:
64
+ * Changed use of deprecated Buffer allocation to 'safer-buffer' module. 'safer-buffer' is used inorder to support older versions of Node.js (<8.0.0) . By end of September, support for Node.js < 8.0.0 will be dropped and [native Buffer module](https://nodejs.org/api/buffer.html#buffer_static_method_buffer_from_string_encoding) will be used instead of 'safer-buffer'.
65
+ #### New endpoints:
66
+ * hosted_pages#checkout_one_time_for_items and hosted_pages#checkout_gift_for_items have been added in hosted_pages resource.
67
+ * orders#resend_an_order has been added in orders resource.
68
+ * quotes#edit_create_subscription_quote_for_items, quotes#edit_update_subscription_quote_for_items and quotes#edit_quote_for_charge_items_and_charges have been added in quotes resource. Applicable only for Product Catalog V2.
69
+
70
+ #### New attributes:
71
+ * accounting_category3 and accounting_category4 have been added to addon, item_price and plan resources.
72
+ * quantity_in_decimal has been added to attached_item resource.
73
+ * period and period_unit have been added to coupon resource.
74
+ * entity_id has been added to line_item_discounts object of credit_note, credit_note_estimate, invoice, invoice_estimate, quote and quote_line_group resources.
75
+ * vat_number_prefix has been added to credit_note, customer, invoice and quote resources.
76
+ * price_in_decimal has been added to differential_price and item_price resources.
77
+ * exchange_rate and new_sales_amount have been added to invoice resource.
78
+ * archived_at has been added to item and item_price resources.
79
+ * trial_end_action has been added to item_price, plan, subscription and subscription_estimate resources.
80
+ * resent_orders, tracking_url, resent_status, is_resent, original_order_id and resend_reasons have been added to order resource.
81
+ * line_item_tiers have been added to quote resource.
82
+ * plan_quantity_in_decimal and plan_unit_price_in_decimal have been added to quoted_subscription and subscription resources. Applicable only for Product Catalog V1.
83
+ * contract_term_billing_cycle_on_renewal and quoted_contract_term have been added to quoted_subscription resource.
84
+ * quantity_in_decimal, metered_quantity, last_calculated_at, unit_price_in_decimal, amount_in_decimal and free_quantity_in_decimal have been added to subscription_items object of quoted_subscription and subscription resources.
85
+ * starting_unit_in_decimal, ending_unit_in_decimal and price_in_decimal have been added to item_tiers object in quoted_subscription resources.
86
+ * cancel_schedule_created_at has been added to subscription resource.
87
+ * exchange_rate and merchant_reference_id have been added to transaction resource.
88
+
89
+ #### New parameters:
90
+ * accounting_category3 and accounting_category4 have been added in addons#create_an_addon, addons#update_an_addon, plans#create_a_plan and plans#update_a_plan endpoints.
91
+ * quantity_in_decimal has been added in attached_items#create_an_attached_item, attached_items#update_an_attached_item and gifts#create_a_gift_subscription_for_items endpoints.
92
+ * period and period_unit have been added in coupons#create_a_coupon, coupons#update_a_coupon, coupons#create_a_coupon_for_items and coupons#update_a_coupon_for_items endpoints.
93
+ * vat_number_prefix has been added in customers#create_a_customer, customers#update_billing_info_for_a_customer, estimates#create_subscription, estimates#create_subscription_estimate, estimates#create_subscription_for_items, estimates#create_subscription_for_items_estimate, estimates#update_subscription_for_items, estimates#update_subscription, hosted_pages#checkout_new_subscription, hosted_pages#checkout_one-time_payments, hosted_pages#create_checkout_for_a_new_subscription hosted_pages#checkout_existing_subscription, hosted_pages#create_checkout_to_update_a_subscription, invoices#import_invoice, invoices#update_invoice_details, subscriptions#create_a_subscription, subscriptions#update_a_subscription, subscriptions#update_subscription_for_items and subscriptions#import_a_subscription endpoints.
94
+ * payment_method[additional_information] has been added in customers#create_a_customer, customers#update_payment_method_for_a_customer, customers#collect_payment_for_customer, invoices#create_an_invoice, invoices#create_invoice_for_items_and_one-time_charges, subscriptions#create_a_subscription, subscriptions#update_a_subscription, subscriptions#update_subscription_for_items and subscriptions#import_a_subscription endpoints.
95
+ * card[additional_information] has been added in customers#create_a_customer, customers#collect_payment_for_customer, invoices#create_an_invoice, invoices#create_invoice_for_items_and_one-time_charges, payment_sources#create_a_card_payment_source, subscriptions#create_a_subscription, subscriptions#update_a_subscription, subscriptions#update_subscription_for_items and subscriptions#import_a_subscription endpoints.
96
+ * bank_account[billing_address] has been added in customers#create_a_customer, invoices#create_an_invoice, invoices#create_invoice_for_items_and_one-time_charges, payment_sources#create_a_bank_account_payment_source and subscriptions#create_a_subscription endpoints.
97
+ * price_in_decimal has been added in differential_prices#create_a_differential_price and differential_prices#update_a_differential_price endpoints.
98
+ * tiers[starting_unit_in_decimal][0..N], tiers[ending_unit_in_decimal][0..N] and tiers[price_in_decimal][0..N] have been added in differential_prices#create_a_differential_price, differential_prices#update_a_differential_price, item_prices#create_an_item_price and item_prices#update_an_item_price endpoints.
99
+ * remove_general_note and notes_to_remove been added in estimates#create_invoice_estimate, estimates#create_invoice_for_items_estimate and invoices#create_invoice_for_items_and_one-time_charges endpoints.
100
+ * trial_end_action has been added in estimates#create_subscription, estimates#create_subscription_estimate, estimates#create_subscription_for_items, estimates#create_subscription_for_items_estimate, estimates#update_subscription_for_items, estimates#update_subscription, plans#create_a_plan, plans#update_a_plan, item_prices#create_an_item_price, item_prices#update_an_item_price, subscriptions#create_a_subscription, subscriptions#create_subscription_for_customer, subscriptions#create_subscription_for_items, subscriptions#update_a_subscription and subscriptions#update_subscription_for_items endpoints.
101
+ * subscription_items[unit_price_in_decimal][0..N], item_tiers[starting_unit][0..N], item_tiers[ending_unit][0..N] and item_tiers[price_in_decimal][0..N] have been added in estimates#create_subscription_for_items, estimates#create_subscription_for_items_estimate, estimates#update_subscription_for_items, estimates#update_subscription, estimates#cancel_subscription_for_items_estimate, hosted_pages#create_checkout_for_a_new_subscription, hosted_pages#create_checkout_to_update_a_subscription, subscriptions#create_subscription_for_items, subscriptions#update_subscription_for_items and subscriptions#import_subscription_for_items endpoints.
102
+ * subscription_items[quantity_in_decimal][0..N] has been added in estimates#create_subscription_for_items, estimates#create_subscription_for_items_estimate, estimates#cancel_subscription_for_items_estimate, estimates#update_subscription_for_items, estimates#update_subscription, estimates#gift_subscription_for_items, estimates#cancel_subscription_for_items_estimate, gifts#create_a_gift_subscription_for_items, hosted_pages#create_checkout_for_a_new_subscription, hosted_pages#create_checkout_to_update_a_subscription, subscriptions#create_subscription_for_items, subscriptions#update_subscription_for_items, subscriptions#import_subscription_for_items and subscriptions#cancel_subscription_for_items endpoints.
103
+ * notes_to_remove[entity_type][0..N] and notes_to_remove[entity_id][0..N] have been added in estimates#create_invoice, estimates#create_invoice_for_items and invoices#create_invoice_for_items_and_one-time_charges endpoints.
104
+ * item_prices[quantity_in_decimal][0..N] and item_prices[unit_price_in_decimal][0..N] have been added in estimates#create_invoice_for_items, invoices#create_invoice_for_items_and_one-time_charges and unbilled_charges#create_unbilled_charges_for_a_subscription endpoints.
105
+ * item_tiers[starting_unit_in_decimal][0..N], item_tiers[ending_unit_in_decimal][0..N] and item_tiers[price_in_decimal][0..N] have been added in estimates#create_invoice_for_items, invoices#create_invoice_for_items_and_one-time_charges and unbilled_charges#create_unbilled_charges_for_a_subscription endpoints.
106
+ * payment_intent[additional_information] has been added in customers#create_a_customer, customers#collect_payment_for_customer, gifts#create_a_gift_subscription_for_items, gifts#create_a_gif and payment_sources#create_using_payment_intent endpoints.
107
+ * invoice_note has been added in hosted_pages#checkout_one-time_payments endpoint.
108
+ * allow_offline_payment_methods has been added in hosted_pages#create_checkout_for_a_new_subscription and hosted_pages#create_checkout_to_update_a_subscription endpoints.
109
+ * free_quantity_in_decimal, price_in_decimal and trial_end_action have been added in item_prices#create_an_item_price and item_prices#update_an_item_price endpoints.
110
+ * tracking_url has been added in orders#create_an_order, orders#update_an_order and orders#import_an_order endpoints.
111
+ * additional_information has been added in payment_sources#create_using_gateway_temporary_token and payment_sources#create_using_permanent_token endpoints.
112
+
113
+ #### New enum values:
114
+ * bancontact has been added to card_type enum.
115
+ * card and latam_local_card have been added to powered_by enum.
116
+ * item_level_discount and document_level_discount have been added to entity_type enum of credit_note_discount, credit_note_estimate_discount, invoice_discount, line_item_discount and invoice_estimate_discount resources.
117
+ * item_level_discount and document_level_discount have been added to discount_type enum.
118
+ * add_usages_reminder and order_resent have been added to event_type enum.
119
+ * ingenico_direct and exact have been added to gateway enum.
120
+ * max_usage has been added to usage_calculation enum.
121
+ * trial_end_action enum has been added.
122
+ * order_resent has been added to cancellation_reason enum.
123
+ * resent_status enum has been added.
124
+ * custom_discount has been added in discount_type enum of order_line_item_discount.
125
+
126
+ #### New filter parameters:
127
+ * resent_status, is_resent and original_order_id filter parameters have been added in exports#orders and orders#list_orders enpoints.
128
+ * updated_at filter parameter has been added in exports#item_families and item_families#list_item_families endpoints.
129
+
130
+ #### New sort parameters:
131
+ * name, id and updated_at sort parameters are added to items#list_items and item_prices#list_item_prices endpoints.
132
+ * created_at and updated_at sort parameters are added to payment_sources#list_payment_sources endpoint.
133
+ * usage_date sort parameter has been added to usages#list_usages endpoint.
134
+
135
+ #### Deprecated parameters:
136
+ * duration_month parameter has been deprecated in coupon resource.
137
+
1
138
  ### v2.6.5 (2021-01-19)
2
139
  * * *
3
140
  ##### New resources:
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License
2
2
 
3
- Copyright (c) 2011-2020 ChargeBee, Inc.
3
+ Copyright (c) 2011-2021 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
@@ -2,12 +2,13 @@ var ChargeBee = {};
2
2
 
3
3
  var Q = require("q");
4
4
  var os = require("os");
5
+ var Buffer = require("safer-buffer").Buffer;
5
6
  ChargeBee._env = {
6
7
  protocol: 'https',
7
8
  hostSuffix: '.chargebee.com',
8
9
  apiPath: '/api/v2',
9
- timeout: 40000,
10
- clientVersion: 'v2.6.5',
10
+ timeout: 80000,
11
+ clientVersion: 'v2.8.1',
11
12
  port: 443,
12
13
  timemachineWaitInMillis: 3000,
13
14
  exportWaitInMillis: 3000
@@ -17,6 +18,10 @@ ChargeBee.configure = function(conf) {
17
18
  ChargeBee._util.extend(true, ChargeBee._env, conf);
18
19
  };
19
20
 
21
+ ChargeBee.updateRequestTimeoutInMillis = function(timeout) {
22
+ ChargeBee._env.timeout = timeout;
23
+ };
24
+
20
25
  ChargeBee._endpoints = require('./resources/api_endpoints.js');
21
26
 
22
27
 
@@ -186,7 +191,36 @@ ChargeBee._core = (function() {
186
191
  try {
187
192
  response = JSON.parse(response);
188
193
  } catch (e) {
189
- throwError(callBack,'client_error', 500, 'invalid_json', 'invalid json in response. Probably not a ChargeBee response', e);
194
+ if (response.includes('503')) {
195
+ return throwError(
196
+ callBack,
197
+ 'internal_temporary_error',
198
+ 503,
199
+ 'internal_temporary_error',
200
+ 'Sorry, the server is currently unable to handle the request due to a temporary overload or scheduled maintenance. Please retry after sometime.',
201
+ e
202
+ );
203
+ }
204
+ else if(response.includes('504')) {
205
+ return throwError(
206
+ callBack,
207
+ 'gateway_timeout',
208
+ 504,
209
+ 'gateway_timeout',
210
+ 'The server did not receive a timely response from an upstream server, request aborted. If this problem persists, contact us at support@chargebee.com.',
211
+ e
212
+ );
213
+ }
214
+ else {
215
+ return throwError(
216
+ callBack,
217
+ 'internal_error',
218
+ 500,
219
+ 'internal_error',
220
+ 'Sorry, something went wrong when trying to process the request. If this problem persists, contact us at support@chargebee.com.',
221
+ e
222
+ );
223
+ }
190
224
  }
191
225
  if (res.statusCode < 200 || res.statusCode > 299) {
192
226
  response.http_status_code = res.statusCode;
@@ -218,8 +252,9 @@ ChargeBee._core = (function() {
218
252
  }
219
253
  var data = encodeParams(params);
220
254
  var protocol = (env.protocol === 'http' ? http : https);
255
+
221
256
  ChargeBee._util.extend(true, headers, {
222
- 'Authorization': 'Basic ' + new Buffer(env.api_key + ':').toString('base64'),
257
+ 'Authorization': 'Basic ' + Buffer.from(env.api_key+':').toString('base64'),
223
258
  'Accept': 'application/json',
224
259
  'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8',
225
260
  "Content-Length": data.length,
@@ -457,4 +492,5 @@ ChargeBee._util = (function() {
457
492
  }
458
493
  module.exports.time_machine.wait_for_time_travel_completion = ChargeBee._timeMachineWait;
459
494
  module.exports.export.wait_for_export_completion = ChargeBee._waitForExport;
495
+ module.exports.updateRequestTimeoutInMillis = ChargeBee.updateRequestTimeoutInMillis;
460
496
  })();
@@ -471,6 +471,13 @@ var _endpoints = {
471
471
  "/update_card",
472
472
  true
473
473
  ],
474
+ [
475
+ "update_bank_account",
476
+ "POST",
477
+ "/payment_sources",
478
+ "/update_bank_account",
479
+ true
480
+ ],
474
481
  [
475
482
  "verify_bank_account",
476
483
  "POST",
@@ -838,6 +845,7 @@ var _endpoints = {
838
845
  true
839
846
  ]
840
847
  ],
848
+ "tax_withheld": [],
841
849
  "credit_note": [
842
850
  [
843
851
  "create",
@@ -1017,6 +1025,13 @@ var _endpoints = {
1017
1025
  "/invoices",
1018
1026
  "/orders",
1019
1027
  true
1028
+ ],
1029
+ [
1030
+ "resend",
1031
+ "POST",
1032
+ "/orders",
1033
+ "/resend",
1034
+ true
1020
1035
  ]
1021
1036
  ],
1022
1037
  "gift": [
@@ -1157,6 +1172,13 @@ var _endpoints = {
1157
1172
  "/checkout_one_time",
1158
1173
  false
1159
1174
  ],
1175
+ [
1176
+ "checkout_one_time_for_items",
1177
+ "POST",
1178
+ "/hosted_pages",
1179
+ "/checkout_one_time_for_items",
1180
+ false
1181
+ ],
1160
1182
  [
1161
1183
  "checkout_new_for_items",
1162
1184
  "POST",
@@ -1227,6 +1249,13 @@ var _endpoints = {
1227
1249
  "/checkout_gift",
1228
1250
  false
1229
1251
  ],
1252
+ [
1253
+ "checkout_gift_for_items",
1254
+ "POST",
1255
+ "/hosted_pages",
1256
+ "/checkout_gift_for_items",
1257
+ false
1258
+ ],
1230
1259
  [
1231
1260
  "claim_gift",
1232
1261
  "POST",
@@ -1420,13 +1449,6 @@ var _endpoints = {
1420
1449
  "/edit_create_subscription_quote",
1421
1450
  true
1422
1451
  ],
1423
- [
1424
- "create_sub_items_for_customer_quote",
1425
- "POST",
1426
- "/customers",
1427
- "/create_subscription_quote_for_items",
1428
- true
1429
- ],
1430
1452
  [
1431
1453
  "update_subscription_quote",
1432
1454
  "POST",
@@ -1441,6 +1463,34 @@ var _endpoints = {
1441
1463
  "/edit_update_subscription_quote",
1442
1464
  true
1443
1465
  ],
1466
+ [
1467
+ "create_for_onetime_charges",
1468
+ "POST",
1469
+ "/quotes",
1470
+ "/create_for_onetime_charges",
1471
+ false
1472
+ ],
1473
+ [
1474
+ "edit_one_time_quote",
1475
+ "POST",
1476
+ "/quotes",
1477
+ "/edit_one_time_quote",
1478
+ true
1479
+ ],
1480
+ [
1481
+ "create_sub_items_for_customer_quote",
1482
+ "POST",
1483
+ "/customers",
1484
+ "/create_subscription_quote_for_items",
1485
+ true
1486
+ ],
1487
+ [
1488
+ "edit_create_sub_customer_quote_for_items",
1489
+ "POST",
1490
+ "/quotes",
1491
+ "/edit_create_subscription_quote_for_items",
1492
+ true
1493
+ ],
1444
1494
  [
1445
1495
  "update_subscription_quote_for_items",
1446
1496
  "POST",
@@ -1449,11 +1499,11 @@ var _endpoints = {
1449
1499
  false
1450
1500
  ],
1451
1501
  [
1452
- "create_for_onetime_charges",
1502
+ "edit_update_subscription_quote_for_items",
1453
1503
  "POST",
1454
1504
  "/quotes",
1455
- "/create_for_onetime_charges",
1456
- false
1505
+ "/edit_update_subscription_quote_for_items",
1506
+ true
1457
1507
  ],
1458
1508
  [
1459
1509
  "create_for_charge_items_and_charges",
@@ -1463,10 +1513,10 @@ var _endpoints = {
1463
1513
  false
1464
1514
  ],
1465
1515
  [
1466
- "edit_one_time_quote",
1516
+ "edit_for_charge_items_and_charges",
1467
1517
  "POST",
1468
1518
  "/quotes",
1469
- "/edit_one_time_quote",
1519
+ "/edit_for_charge_items_and_charges",
1470
1520
  true
1471
1521
  ],
1472
1522
  [
@@ -1520,6 +1570,7 @@ var _endpoints = {
1520
1570
  ]
1521
1571
  ],
1522
1572
  "quoted_subscription": [],
1573
+ "quoted_charge": [],
1523
1574
  "quote_line_group": [],
1524
1575
  "plan": [
1525
1576
  [
@@ -1797,7 +1848,7 @@ var _endpoints = {
1797
1848
  "retrieve",
1798
1849
  "GET",
1799
1850
  "/subscriptions",
1800
- "/usage",
1851
+ "/usages",
1801
1852
  true
1802
1853
  ],
1803
1854
  [
@@ -2189,6 +2240,20 @@ var _endpoints = {
2189
2240
  "/item_prices",
2190
2241
  "/delete",
2191
2242
  true
2243
+ ],
2244
+ [
2245
+ "find_applicable_items",
2246
+ "GET",
2247
+ "/item_prices",
2248
+ "/applicable_items",
2249
+ true
2250
+ ],
2251
+ [
2252
+ "find_applicable_item_prices",
2253
+ "GET",
2254
+ "/item_prices",
2255
+ "/applicable_item_prices",
2256
+ true
2192
2257
  ]
2193
2258
  ],
2194
2259
  "attached_item": [
@@ -2226,13 +2291,6 @@ var _endpoints = {
2226
2291
  "/items",
2227
2292
  "/attached_items",
2228
2293
  true
2229
- ],
2230
- [
2231
- "list_internal",
2232
- "GET",
2233
- "/attached_items",
2234
- "/list_internal",
2235
- false
2236
2294
  ]
2237
2295
  ],
2238
2296
  "differential_price": [
@@ -2271,6 +2329,6 @@ var _endpoints = {
2271
2329
  null,
2272
2330
  false
2273
2331
  ]
2274
- ],
2332
+ ]
2275
2333
  };
2276
2334
  module.exports = _endpoints;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name":"chargebee",
3
- "version":"2.6.5",
3
+ "version":"2.8.1",
4
4
  "description":"A library for integrating with ChargeBee.",
5
5
  "keywords":[
6
6
  "payments",
@@ -12,7 +12,8 @@
12
12
  "author":"Ajit <ajit@chargebee.com> (https://www.chargebee.com)",
13
13
  "main":"lib/chargebee.js",
14
14
  "dependencies":{
15
- "q" : ">=1.0.1"
15
+ "q" : ">=1.0.1",
16
+ "safer-buffer": "2.1.2"
16
17
  },
17
18
  "directories":{
18
19
  "lib":"./lib"