chargebee 2.8.8 → 2.11.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9fdf83c2ef7ff3baf5c07629e72a19756ff305f0
4
- data.tar.gz: a96c49cd07afaff15704d5c8548aeb87f1f1de83
3
+ metadata.gz: a2582837ef4360e0e50a54d492a68c39ae7390c2
4
+ data.tar.gz: 4cebf452c6895d05c0035462e2be91bd50cc3df2
5
5
  SHA512:
6
- metadata.gz: a322646e3b216341d46828c7a333c478e83d4c4bc337f576fc813a5bf07fe3a20ed92c70526ce2bcaf525e8c31041cd3677060334cd28cef7c36f567c0a8a70f
7
- data.tar.gz: cab490731a47a348b266c495e2ee56c4e7f5f8f159ba1192c28825385f21de2a666e740dcb3c396139a59dd7e088975e8bc1ac583e5bce3424fb886adb714eb1
6
+ metadata.gz: 4cf7b53275a25c8200181abdfbc66cc5e94811e641e8371cbf45aef8edfdc0607f33a11b09db424e7ad16ee42ed1b5d08636f1786b505de30d2cec3a8aed0ebb
7
+ data.tar.gz: f795c963d5eb7946626a42239081c393cebe11a04a413f216d3539a124ae78525ee92f0115a899f928221ea97fdf29572bbdede9ec35e3b1005fe62015bb5d2e
data/CHANGELOG.md CHANGED
@@ -1,3 +1,79 @@
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
+
29
+ ### v2.10.1 (2021-10-18)
30
+ * * *
31
+
32
+ ### Fixes:
33
+ * Fixed .DS_Store file generation issue
34
+
35
+ ### v2.10.0 (2021-10-14)
36
+
37
+ #### New Attributes:
38
+ * entity_id has been added in order_line_item_discounts resource.
39
+
40
+ #### New Input parameters:
41
+ * line_items[tax5_name], line_items[tax5_amount], line_items[tax6_name], line_items[tax6_amount], line_items[tax7_name], line_items[tax7_amount], line_items[tax8_name], line_items[tax8_amount], line_items[tax9_name], line_items[tax9_amount], line_items[tax10_name], line_items[tax10_amount] have been added in import_invoice api.
42
+ * replace_primary_payment_source has been added in create_subscription_for_customer and create_subscription_for_items apis.
43
+
44
+ #### New Enum values:
45
+ * coupon_expired has been added to event_type enum.
46
+ * mollie has been added to gateway enum.
47
+ * item_level_discount and document_level_discount has been added to discount_type.
48
+
49
+ ### v2.9.0 (2021-08-16)
50
+ * * *
51
+
52
+ #### New Attributes:
53
+ * generated_at has been added in credit_note and invoice resources.
54
+ * change_option have been added in quoted_subscription resource.
55
+ * changes_scheduled_at has been added in subscription and quoted_subscription resources.
56
+ * iin and last4 have been added in transaction resource.
57
+
58
+ #### New Resource:
59
+ * quoted_charge has been added.
60
+
61
+ #### New Input parameters:
62
+ * 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.
63
+ * 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.
64
+ * 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.
65
+ * invoice_date, create_pending_invoices and first_invoice_pending have been added in quotes#convert_a_quote endpoint.
66
+ * subscription[auto_close_invoices] has been added in quotes#convert_a_quote endpoint.
67
+
68
+ #### New Enum values:
69
+ * subscription_cancel has been added to charge_event enum in quote_line_groups resource.
70
+ * 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
71
+ * change_option enum has been added.
72
+
73
+ #### Deprecated parameters:
74
+ * coupon has been deprecated in invoices#create_invoice_for_a_one-time_charge and invoices#create_invoice_for_a_non-recurring_addon endpoints.
75
+
76
+
1
77
  ### v2.8.8 (2021-07-22)
2
78
  * * *
3
79
  #### New endpoints:
data/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
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.8'
8
- s.date = '2021-07-22'
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."
@@ -34,7 +34,6 @@ Gem::Specification.new do |s|
34
34
  README.rdoc
35
35
  Rakefile
36
36
  chargebee.gemspec
37
- lib/.DS_Store
38
37
  lib/chargebee.rb
39
38
  lib/chargebee/environment.rb
40
39
  lib/chargebee/errors.rb
@@ -75,11 +74,13 @@ Gem::Specification.new do |s|
75
74
  lib/chargebee/models/promotional_credit.rb
76
75
  lib/chargebee/models/quote.rb
77
76
  lib/chargebee/models/quote_line_group.rb
77
+ lib/chargebee/models/quoted_charge.rb
78
78
  lib/chargebee/models/quoted_subscription.rb
79
79
  lib/chargebee/models/resource_migration.rb
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
- [:api_key, :site, :time_machine_sleeptime, :export_sleeptime].each do |attr|
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,
@@ -27,9 +27,5 @@ module ChargeBee
27
27
  Request.send_list_request('get', uri_path("items",id.to_s,"attached_items"), params, env, headers)
28
28
  end
29
29
 
30
- def self.list_internal(params={}, env=nil, headers={})
31
- Request.send('get', uri_path("attached_items","list_internal"), params, env, headers)
32
- end
33
-
34
30
  end # ~AttachedItem
35
31
  end # ~ChargeBee
@@ -35,10 +35,10 @@ module ChargeBee
35
35
 
36
36
  attr_accessor :id, :customer_id, :subscription_id, :reference_invoice_id, :type, :reason_code,
37
37
  :status, :vat_number, :date, :price_type, :currency_code, :total, :amount_allocated, :amount_refunded,
38
- :amount_available, :refunded_at, :voided_at, :resource_version, :updated_at, :sub_total, :sub_total_in_local_currency,
39
- :total_in_local_currency, :local_currency_code, :round_off_amount, :fractional_correction, :line_items,
40
- :discounts, :line_item_discounts, :line_item_tiers, :taxes, :line_item_taxes, :linked_refunds,
41
- :allocations, :deleted, :create_reason_code, :vat_number_prefix
38
+ :amount_available, :refunded_at, :voided_at, :generated_at, :resource_version, :updated_at,
39
+ :sub_total, :sub_total_in_local_currency, :total_in_local_currency, :local_currency_code, :round_off_amount,
40
+ :fractional_correction, :line_items, :discounts, :line_item_discounts, :line_item_tiers, :taxes,
41
+ :line_item_taxes, :linked_refunds, :allocations, :deleted, :create_reason_code, :vat_number_prefix
42
42
 
43
43
  # OPERATIONS
44
44
  #-----------
@@ -66,7 +66,7 @@ module ChargeBee
66
66
  :amount_adjusted, :write_off_amount, :credits_applied, :amount_due, :paid_at, :dunning_status,
67
67
  :next_retry_at, :voided_at, :resource_version, :updated_at, :sub_total, :sub_total_in_local_currency,
68
68
  :total_in_local_currency, :local_currency_code, :tax, :first_invoice, :new_sales_amount, :has_advance_charges,
69
- :term_finalized, :is_gifted, :expected_payment_date, :amount_to_collect, :round_off_amount,
69
+ :term_finalized, :is_gifted, :generated_at, :expected_payment_date, :amount_to_collect, :round_off_amount,
70
70
  :line_items, :discounts, :line_item_discounts, :taxes, :line_item_taxes, :line_item_tiers, :linked_payments,
71
71
  :dunning_attempts, :applied_credits, :adjustment_credit_notes, :issued_credit_notes, :linked_orders,
72
72
  :notes, :shipping_address, :billing_address, :payment_owner, :void_reason_code, :deleted, :vat_number_prefix
@@ -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
@@ -18,7 +18,7 @@ module ChargeBee
18
18
  end
19
19
 
20
20
  class LineItemDiscount < Model
21
- attr_accessor :line_item_id, :discount_type, :coupon_id, :discount_amount
21
+ attr_accessor :line_item_id, :discount_type, :coupon_id, :entity_id, :discount_amount
22
22
  end
23
23
 
24
24
  class LinkedCreditNote < Model
@@ -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,
@@ -0,0 +1,30 @@
1
+ module ChargeBee
2
+ class QuotedCharge < Model
3
+
4
+ class Charge < Model
5
+ attr_accessor :amount, :amount_in_decimal, :description, :service_period_in_days, :avalara_sale_type, :avalara_transaction_type, :avalara_service_type
6
+ end
7
+
8
+ class Addon < Model
9
+ attr_accessor :id, :quantity, :unit_price, :quantity_in_decimal, :unit_price_in_decimal, :service_period
10
+ end
11
+
12
+ class InvoiceItem < Model
13
+ attr_accessor :item_price_id, :quantity, :quantity_in_decimal, :unit_price, :unit_price_in_decimal, :service_period_days
14
+ end
15
+
16
+ class ItemTier < Model
17
+ attr_accessor :item_price_id, :starting_unit, :ending_unit, :price, :starting_unit_in_decimal, :ending_unit_in_decimal, :price_in_decimal
18
+ end
19
+
20
+ class Coupon < Model
21
+ attr_accessor :coupon_id
22
+ end
23
+
24
+ attr_accessor :charges, :addons, :invoice_items, :item_tiers, :coupons
25
+
26
+ # OPERATIONS
27
+ #-----------
28
+
29
+ end # ~QuotedCharge
30
+ end # ~ChargeBee
@@ -10,11 +10,7 @@ module ChargeBee
10
10
  end
11
11
 
12
12
  class Coupon < Model
13
- attr_accessor :coupon_id, :apply_till, :applied_count, :coupon_code
14
- end
15
-
16
- class Discount < Model
17
- attr_accessor :id, :invoice_name, :type, :percentage, :amount, :currency_code, :duration_type, :period, :period_unit, :included_in_mrr, :apply_on, :item_price_id, :created_at, :apply_till, :applied_count
13
+ attr_accessor :coupon_id
18
14
  end
19
15
 
20
16
  class SubscriptionItem < Model
@@ -31,8 +27,9 @@ module ChargeBee
31
27
 
32
28
  attr_accessor :id, :plan_id, :plan_quantity, :plan_unit_price, :setup_fee, :billing_period,
33
29
  :billing_period_unit, :start_date, :trial_end, :remaining_billing_cycles, :po_number, :auto_collection,
34
- :plan_quantity_in_decimal, :plan_unit_price_in_decimal, :contract_term_billing_cycle_on_renewal,
35
- :addons, :event_based_addons, :coupons, :discounts, :subscription_items, :item_tiers, :quoted_contract_term
30
+ :plan_quantity_in_decimal, :plan_unit_price_in_decimal, :changes_scheduled_at, :change_option,
31
+ :contract_term_billing_cycle_on_renewal, :addons, :event_based_addons, :coupons, :subscription_items,
32
+ :item_tiers, :quoted_contract_term
36
33
 
37
34
  # OPERATIONS
38
35
  #-----------
@@ -52,8 +52,8 @@ module ChargeBee
52
52
  :offline_payment_method, :channel, :subscription_items, :item_tiers, :charged_items, :due_invoices_count,
53
53
  :due_since, :total_dues, :mrr, :exchange_rate, :base_currency_code, :addons, :event_based_addons,
54
54
  :charged_event_based_addons, :coupon, :coupons, :shipping_address, :referral_info, :invoice_notes,
55
- :meta_data, :metadata, :deleted, :contract_term, :cancel_reason_code, :free_period, :free_period_unit,
56
- :create_pending_invoices, :auto_close_invoices
55
+ :meta_data, :metadata, :deleted, :changes_scheduled_at, :contract_term, :cancel_reason_code,
56
+ :free_period, :free_period_unit, :create_pending_invoices, :auto_close_invoices
57
57
 
58
58
  # OPERATIONS
59
59
  #-----------
@@ -0,0 +1,10 @@
1
+ module ChargeBee
2
+ class TaxWithheld < Model
3
+
4
+ attr_accessor :id, :reference_number, :description, :date, :currency_code, :amount
5
+
6
+ # OPERATIONS
7
+ #-----------
8
+
9
+ end # ~TaxWithheld
10
+ end # ~ChargeBee
@@ -23,7 +23,7 @@ module ChargeBee
23
23
  :error_code, :error_text, :voided_at, :resource_version, :updated_at, :fraud_reason, :amount_unused,
24
24
  :masked_card_number, :reference_transaction_id, :refunded_txn_id, :reference_authorization_id,
25
25
  :amount_capturable, :reversal_transaction_id, :linked_invoices, :linked_credit_notes, :linked_refunds,
26
- :linked_payments, :deleted, :merchant_reference_id
26
+ :linked_payments, :deleted, :iin, :last4, :merchant_reference_id
27
27
 
28
28
  # OPERATIONS
29
29
  #-----------
@@ -39,8 +39,8 @@ module ChargeBee
39
39
  :user => api_key,
40
40
  :headers => headers,
41
41
  :payload => payload,
42
- :open_timeout => 50,
43
- :timeout => 100
42
+ :open_timeout => env.connect_timeout,
43
+ :timeout => env.read_timeout
44
44
  }.merge(ssl_opts)
45
45
 
46
46
  begin
@@ -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});
@@ -136,10 +141,16 @@ module ChargeBee
136
141
 
137
142
  def quoted_subscription()
138
143
  quoted_subscription = get(:quoted_subscription, QuotedSubscription,
139
- {:addons => QuotedSubscription::Addon, :event_based_addons => QuotedSubscription::EventBasedAddon, :coupons => QuotedSubscription::Coupon, :discounts => QuotedSubscription::Discount, :subscription_items => QuotedSubscription::SubscriptionItem, :item_tiers => QuotedSubscription::ItemTier, :quoted_contract_term => QuotedSubscription::QuotedContractTerm});
144
+ {:addons => QuotedSubscription::Addon, :event_based_addons => QuotedSubscription::EventBasedAddon, :coupons => QuotedSubscription::Coupon, :subscription_items => QuotedSubscription::SubscriptionItem, :item_tiers => QuotedSubscription::ItemTier, :quoted_contract_term => QuotedSubscription::QuotedContractTerm});
140
145
  return quoted_subscription;
141
146
  end
142
147
 
148
+ def quoted_charge()
149
+ quoted_charge = get(:quoted_charge, QuotedCharge,
150
+ {:charges => QuotedCharge::Charge, :addons => QuotedCharge::Addon, :invoice_items => QuotedCharge::InvoiceItem, :item_tiers => QuotedCharge::ItemTier, :coupons => QuotedCharge::Coupon});
151
+ return quoted_charge;
152
+ end
153
+
143
154
  def quote_line_group()
144
155
  quote_line_group = get(:quote_line_group, QuoteLineGroup,
145
156
  {:line_items => QuoteLineGroup::LineItem, :discounts => QuoteLineGroup::Discount, :line_item_discounts => QuoteLineGroup::LineItemDiscount, :taxes => QuoteLineGroup::Tax, :line_item_taxes => QuoteLineGroup::LineItemTax});
@@ -233,7 +244,7 @@ module ChargeBee
233
244
  return payment_intent;
234
245
  end
235
246
 
236
- def item_family()
247
+ def item_family()
237
248
  item_family = get(:item_family, ItemFamily);
238
249
  return item_family;
239
250
  end
@@ -250,7 +261,7 @@ module ChargeBee
250
261
  return item_price;
251
262
  end
252
263
 
253
- def attached_item()
264
+ def attached_item()
254
265
  attached_item = get(:attached_item, AttachedItem);
255
266
  return attached_item;
256
267
  end
@@ -261,6 +272,7 @@ module ChargeBee
261
272
  return differential_price;
262
273
  end
263
274
 
275
+
264
276
  def unbilled_charges()
265
277
  unbilled_charges = get_list(:unbilled_charges, UnbilledCharge,
266
278
  {:tiers => UnbilledCharge::Tier});
@@ -297,6 +309,7 @@ module ChargeBee
297
309
  return differential_prices;
298
310
  end
299
311
 
312
+
300
313
  def to_s(*args)
301
314
  JSON.pretty_generate(@response)
302
315
  end
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.8.8'
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.8.8
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-07-22 00:00:00.000000000 Z
12
+ date: 2021-12-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json_pure
@@ -102,7 +102,6 @@ files:
102
102
  - README.rdoc
103
103
  - Rakefile
104
104
  - chargebee.gemspec
105
- - lib/.DS_Store
106
105
  - lib/chargebee.rb
107
106
  - lib/chargebee/environment.rb
108
107
  - lib/chargebee/errors.rb
@@ -143,11 +142,13 @@ files:
143
142
  - lib/chargebee/models/promotional_credit.rb
144
143
  - lib/chargebee/models/quote.rb
145
144
  - lib/chargebee/models/quote_line_group.rb
145
+ - lib/chargebee/models/quoted_charge.rb
146
146
  - lib/chargebee/models/quoted_subscription.rb
147
147
  - lib/chargebee/models/resource_migration.rb
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
data/lib/.DS_Store DELETED
Binary file