chargebee 2.10.1 → 2.11.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +28 -0
- data/chargebee.gemspec +3 -2
- data/lib/chargebee/environment.rb +6 -2
- data/lib/chargebee/models/addon.rb +1 -1
- data/lib/chargebee/models/item_price.rb +9 -1
- data/lib/chargebee/models/payment_source.rb +5 -1
- data/lib/chargebee/models/plan.rb +1 -1
- data/lib/chargebee/models/tax_withheld.rb +10 -0
- data/lib/chargebee/rest.rb +2 -2
- data/lib/chargebee/result.rb +5 -0
- data/lib/chargebee.rb +8 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a2582837ef4360e0e50a54d492a68c39ae7390c2
|
4
|
+
data.tar.gz: 4cebf452c6895d05c0035462e2be91bd50cc3df2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4cf7b53275a25c8200181abdfbc66cc5e94811e641e8371cbf45aef8edfdc0607f33a11b09db424e7ad16ee42ed1b5d08636f1786b505de30d2cec3a8aed0ebb
|
7
|
+
data.tar.gz: f795c963d5eb7946626a42239081c393cebe11a04a413f216d3539a124ae78525ee92f0115a899f928221ea97fdf29572bbdede9ec35e3b1005fe62015bb5d2e
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,31 @@
|
|
1
|
+
### v2.11.0 (2021-12-08)
|
2
|
+
* * *
|
3
|
+
|
4
|
+
### Fixes:
|
5
|
+
* Exposed function ChargeBee#update_connect_timeout_secs and ChargeBee#update_read_timeout_secs to set custom connect and read timeout.
|
6
|
+
* Updated default request connect and read timeout to 30s and 80s respectively.
|
7
|
+
|
8
|
+
#### New endpoints:
|
9
|
+
* payment_sources#update_bank_account have been added in payment_sources resource.
|
10
|
+
* item_price#item_price_find_applicable_items and item_price#item_price_find_applicable_item_prices have been added in item_price resource.
|
11
|
+
|
12
|
+
#### New Attributes:
|
13
|
+
* hsn_code have been added to the resource addon, item_price and plan.
|
14
|
+
* first_name, last_name and email have been added to the resource payment_sources.
|
15
|
+
|
16
|
+
#### New Resource:
|
17
|
+
* TaxWithheld has been added.Applicable only for API V2.
|
18
|
+
|
19
|
+
#### New Input parameters:
|
20
|
+
* hsn_code have been added to addons#create_an_addon, addons#update_an_addon, plan#create_an_plan and plan#update_an_plan apis.
|
21
|
+
* bank_account[first_name],bank_account[last_name] and bank_account[email] have been added to payment_sources#update_bank_account api.
|
22
|
+
* 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.
|
23
|
+
* tax_detail[hsn_code] have been added in item_price#create_an_itemPrice and item_price#update_an_itemPrice apis.
|
24
|
+
* include_deleted have been added in plan#plan_list and addon#addon_list apis.Applicable only for Product Catalog V1.
|
25
|
+
|
26
|
+
#### New Enum values:
|
27
|
+
* subscription_activated_with_backdating, tax_withheld_recorded, tax_withheld_deleted and tax_withheld_refunded has been added to event_type enum.
|
28
|
+
|
1
29
|
### v2.10.1 (2021-10-18)
|
2
30
|
* * *
|
3
31
|
|
data/chargebee.gemspec
CHANGED
@@ -4,8 +4,8 @@ Gem::Specification.new do |s|
|
|
4
4
|
s.rubygems_version = '1.3.5'
|
5
5
|
s.required_ruby_version = '>= 1.9.3'
|
6
6
|
s.name = 'chargebee'
|
7
|
-
s.version = '2.
|
8
|
-
s.date = '2021-
|
7
|
+
s.version = '2.11.0'
|
8
|
+
s.date = '2021-12-08'
|
9
9
|
|
10
10
|
s.summary = "Ruby client for Chargebee API."
|
11
11
|
s.description = "Subscription Billing - Simple. Secure. Affordable. More details at www.chargebee.com."
|
@@ -80,6 +80,7 @@ Gem::Specification.new do |s|
|
|
80
80
|
lib/chargebee/models/site_migration_detail.rb
|
81
81
|
lib/chargebee/models/subscription.rb
|
82
82
|
lib/chargebee/models/subscription_estimate.rb
|
83
|
+
lib/chargebee/models/tax_withheld.rb
|
83
84
|
lib/chargebee/models/third_party_payment_method.rb
|
84
85
|
lib/chargebee/models/time_machine.rb
|
85
86
|
lib/chargebee/models/token.rb
|
@@ -4,14 +4,18 @@ module ChargeBee
|
|
4
4
|
# in seconds
|
5
5
|
TIME_MACHINE_TIMEOUT = 3
|
6
6
|
EXPORT_TIMEOUT = 10
|
7
|
+
CONNECT_TIMEOUT = 30
|
8
|
+
READ_TIMEOUT = 80
|
7
9
|
|
8
|
-
attr_accessor :api_key, :site, :time_machine_sleeptime, :export_sleeptime
|
10
|
+
attr_accessor :api_key, :site, :time_machine_sleeptime, :export_sleeptime, :connect_timeout, :read_timeout
|
9
11
|
attr_reader :api_endpoint
|
10
12
|
|
11
13
|
def initialize(options)
|
12
14
|
options[:time_machine_sleeptime] ||= TIME_MACHINE_TIMEOUT
|
13
15
|
options[:export_sleeptime] ||= EXPORT_TIMEOUT
|
14
|
-
[:
|
16
|
+
options[:connect_timeout] ||= CONNECT_TIMEOUT
|
17
|
+
options[:read_timeout] ||= READ_TIMEOUT
|
18
|
+
[:api_key, :site, :time_machine_sleeptime, :export_sleeptime, :connect_timeout, :read_timeout].each do |attr|
|
15
19
|
instance_variable_set "@#{attr}", options[attr]
|
16
20
|
end
|
17
21
|
if($CHARGEBEE_DOMAIN == nil)
|
@@ -7,7 +7,7 @@ module ChargeBee
|
|
7
7
|
|
8
8
|
attr_accessor :id, :name, :invoice_name, :description, :pricing_model, :type, :charge_type,
|
9
9
|
:price, :currency_code, :period, :period_unit, :unit, :status, :archived_at, :enabled_in_portal,
|
10
|
-
:tax_code, :taxjar_product_code, :avalara_sale_type, :avalara_transaction_type, :avalara_service_type,
|
10
|
+
:tax_code, :hsn_code, :taxjar_product_code, :avalara_sale_type, :avalara_transaction_type, :avalara_service_type,
|
11
11
|
:sku, :accounting_code, :accounting_category1, :accounting_category2, :accounting_category3,
|
12
12
|
:accounting_category4, :is_shippable, :shipping_frequency_period, :shipping_frequency_period_unit,
|
13
13
|
:resource_version, :updated_at, :price_in_decimal, :included_in_mrr, :invoice_notes, :taxable,
|
@@ -6,7 +6,7 @@ module ChargeBee
|
|
6
6
|
end
|
7
7
|
|
8
8
|
class TaxDetail < Model
|
9
|
-
attr_accessor :tax_profile_id, :avalara_sale_type, :avalara_transaction_type, :avalara_service_type, :avalara_tax_code, :taxjar_product_code
|
9
|
+
attr_accessor :tax_profile_id, :avalara_sale_type, :avalara_transaction_type, :avalara_service_type, :avalara_tax_code, :hsn_code, :taxjar_product_code
|
10
10
|
end
|
11
11
|
|
12
12
|
class AccountingDetail < Model
|
@@ -43,5 +43,13 @@ module ChargeBee
|
|
43
43
|
Request.send('post', uri_path("item_prices",id.to_s,"delete"), {}, env, headers)
|
44
44
|
end
|
45
45
|
|
46
|
+
def self.find_applicable_items(id, params={}, env=nil, headers={})
|
47
|
+
Request.send('get', uri_path("item_prices",id.to_s,"applicable_items"), params, env, headers)
|
48
|
+
end
|
49
|
+
|
50
|
+
def self.find_applicable_item_prices(id, params={}, env=nil, headers={})
|
51
|
+
Request.send('get', uri_path("item_prices",id.to_s,"applicable_item_prices"), params, env, headers)
|
52
|
+
end
|
53
|
+
|
46
54
|
end # ~ItemPrice
|
47
55
|
end # ~ChargeBee
|
@@ -6,7 +6,7 @@ module ChargeBee
|
|
6
6
|
end
|
7
7
|
|
8
8
|
class BankAccount < Model
|
9
|
-
attr_accessor :last4, :name_on_account, :bank_name, :mandate_id, :account_type, :echeck_type, :account_holder_type
|
9
|
+
attr_accessor :last4, :name_on_account, :first_name, :last_name, :bank_name, :mandate_id, :account_type, :echeck_type, :account_holder_type, :email
|
10
10
|
end
|
11
11
|
|
12
12
|
class AmazonPayment < Model
|
@@ -52,6 +52,10 @@ module ChargeBee
|
|
52
52
|
Request.send('post', uri_path("payment_sources",id.to_s,"update_card"), params, env, headers)
|
53
53
|
end
|
54
54
|
|
55
|
+
def self.update_bank_account(id, params={}, env=nil, headers={})
|
56
|
+
Request.send('post', uri_path("payment_sources",id.to_s,"update_bank_account"), params, env, headers)
|
57
|
+
end
|
58
|
+
|
55
59
|
def self.verify_bank_account(id, params, env=nil, headers={})
|
56
60
|
Request.send('post', uri_path("payment_sources",id.to_s,"verify_bank_account"), params, env, headers)
|
57
61
|
end
|
@@ -20,7 +20,7 @@ module ChargeBee
|
|
20
20
|
attr_accessor :id, :name, :invoice_name, :description, :price, :currency_code, :period, :period_unit,
|
21
21
|
:trial_period, :trial_period_unit, :trial_end_action, :pricing_model, :charge_model, :free_quantity,
|
22
22
|
:setup_cost, :downgrade_penalty, :status, :archived_at, :billing_cycles, :redirect_url, :enabled_in_hosted_pages,
|
23
|
-
:enabled_in_portal, :addon_applicability, :tax_code, :taxjar_product_code, :avalara_sale_type,
|
23
|
+
:enabled_in_portal, :addon_applicability, :tax_code, :hsn_code, :taxjar_product_code, :avalara_sale_type,
|
24
24
|
:avalara_transaction_type, :avalara_service_type, :sku, :accounting_code, :accounting_category1,
|
25
25
|
:accounting_category2, :accounting_category3, :accounting_category4, :is_shippable, :shipping_frequency_period,
|
26
26
|
:shipping_frequency_period_unit, :resource_version, :updated_at, :giftable, :claim_url, :free_quantity_in_decimal,
|
data/lib/chargebee/rest.rb
CHANGED
data/lib/chargebee/result.rb
CHANGED
@@ -75,6 +75,11 @@ module ChargeBee
|
|
75
75
|
return invoice;
|
76
76
|
end
|
77
77
|
|
78
|
+
def tax_withheld()
|
79
|
+
tax_withheld = get(:tax_withheld, TaxWithheld);
|
80
|
+
return tax_withheld;
|
81
|
+
end
|
82
|
+
|
78
83
|
def credit_note()
|
79
84
|
credit_note = get(:credit_note, CreditNote,
|
80
85
|
{:line_items => CreditNote::LineItem, :discounts => CreditNote::Discount, :line_item_discounts => CreditNote::LineItemDiscount, :line_item_tiers => CreditNote::LineItemTier, :taxes => CreditNote::Tax, :line_item_taxes => CreditNote::LineItemTax, :linked_refunds => CreditNote::LinkedRefund, :allocations => CreditNote::Allocation});
|
data/lib/chargebee.rb
CHANGED
@@ -53,7 +53,7 @@ require File.dirname(__FILE__) + '/chargebee/models/usage.rb'
|
|
53
53
|
|
54
54
|
module ChargeBee
|
55
55
|
|
56
|
-
VERSION = '2.
|
56
|
+
VERSION = '2.11.0'
|
57
57
|
|
58
58
|
@@default_env = nil
|
59
59
|
@@verify_ca_certs = true
|
@@ -89,5 +89,12 @@ module ChargeBee
|
|
89
89
|
@@user_agent
|
90
90
|
end
|
91
91
|
|
92
|
+
def self.update_connect_timeout_secs(connect_timeout)
|
93
|
+
@@default_env.connect_timeout = connect_timeout
|
94
|
+
end
|
95
|
+
|
96
|
+
def self.update_read_timeout_secs(read_timeout)
|
97
|
+
@@default_env.read_timeout = read_timeout
|
98
|
+
end
|
92
99
|
end
|
93
100
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chargebee
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rajaraman S
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2021-
|
12
|
+
date: 2021-12-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: json_pure
|
@@ -148,6 +148,7 @@ files:
|
|
148
148
|
- lib/chargebee/models/site_migration_detail.rb
|
149
149
|
- lib/chargebee/models/subscription.rb
|
150
150
|
- lib/chargebee/models/subscription_estimate.rb
|
151
|
+
- lib/chargebee/models/tax_withheld.rb
|
151
152
|
- lib/chargebee/models/third_party_payment_method.rb
|
152
153
|
- lib/chargebee/models/time_machine.rb
|
153
154
|
- lib/chargebee/models/token.rb
|