chargebee 2.8.2 → 2.8.3

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: 7267df2b031be6ad8e3d65bc3838080383b7bd4c
4
- data.tar.gz: 28b828500d82312162565d9b49429e1886307232
3
+ metadata.gz: 439bc855f5ece0d8ea060c244dc64474657e11ec
4
+ data.tar.gz: 7eee575e079093cbcebf56fbf507ec7a495a6fdd
5
5
  SHA512:
6
- metadata.gz: 96eae2ab0891c98724c73317378766bb066c2076e7a02142f1daab5f2f734e811e65097f4d4b524f9751ecadb1ffc09530285ca3ef2ab6b1b92de94f2236f32f
7
- data.tar.gz: 163517a353ca50eafefdf46bae9780d71c4d432068c98e219ff7dca3763da39083a035fdd06a845b6c362cdbc300ecea4bc3e966885fb84b0559f044459b4550
6
+ metadata.gz: 0e880b89ee50b259523fc84ca4ee536ce2c12988acee234ffb6a28b0afd99b41ff47e649317eda994c3c378396d9fbe7c0d7b5b601190f5d3282edcb3a86b73f
7
+ data.tar.gz: 5a8ce76cc0c00b1bdcb8ce16e9d20cc1699bab22b1e6eb818645e5b32249e190b19b56a5279b901c11a0b72a273d0c68e51f73fa7944acb4c7a77202686041e1
@@ -1,3 +1,29 @@
1
+ ### v2.8.3 (2021-01-19)
2
+ * * *
3
+ ##### New resources:
4
+ * Usages is added. Applicable only for Product Catalog V2
5
+
6
+ ##### New end points:
7
+ * hosted_pages#checkout_one-time_payments has been added in hosted_pages resource
8
+
9
+ ##### New attributes:
10
+ * auto_close_invoices has been added to customers, subscriptions resources
11
+ * metered, usage_calculation have been added to items resources
12
+ * create_pending_invoices, auto_close_invoices have been added to subscriptions resources
13
+
14
+ ##### New parameters:
15
+ * auto_close_invoices has been added to the endpoint: customers#create_a_customer, customers#list_customers, customers#update_a_customer
16
+ * invoice_allocations[invoice_id] has been added to the endpoint: customers#collect_payment_for_customer
17
+ * coupon_ids has been added to the endpoint: estimates#create_invoice_for_items_estimate. Applicable only for Product Catalog V2
18
+ * subscription[auto_close_invoices] has been added to the endpoint: exports#export_revenue_recognition_reports, exports#export_deferred_revenue_reports, exports#export_subscriptions
19
+ * customer[auto_close_invoices] has been added to the endpoint: exports#export_revenue_recognition_reports, exports#export_deferred_revenue_reports, exports#export_customers
20
+ * item[metered], item[usage_calculation] have been added to the endpoint: exports#export_items. Applicable only for Product Catalog V2
21
+ * subscription_id has been added to the endpoint: invoices#add_one-time_charge_to_a_pending_invoice, invoices#add_non-recurring_addon_to_a_pending_invoice
22
+ * subscription_id has been added to the endpoint: invoices#add_a_charge-item_to_a_pending_invoice. Applicable only for Product Catalog V2
23
+ * metered, usage_calculation have been added to the endpoint: items#create_an_item, items#list_item. Applicable only for Product Catalog V2
24
+ * create_pending_invoices, auto_close_invoices, first_invoice_pending have been added to the endpoint: subscriptions#create_subscription_for_items, subscriptions#update_subscription_for_items,subscriptions#import_subscription_for_items. Applicable only for Product Catalog V2
25
+ * create_pending_invoices, auto_close_invoices have been added to the endpoint: subscriptions#list_subscriptions
26
+
1
27
  ### v2.8.2 (2020-12-15)
2
28
  * * *
3
29
  ##### New end points:
@@ -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.2'
8
- s.date = '2020-12-15'
7
+ s.version = '2.8.3'
8
+ s.date = '2021-01-19'
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."
@@ -84,6 +84,7 @@ Gem::Specification.new do |s|
84
84
  lib/chargebee/models/token.rb
85
85
  lib/chargebee/models/transaction.rb
86
86
  lib/chargebee/models/unbilled_charge.rb
87
+ lib/chargebee/models/usage.rb
87
88
  lib/chargebee/models/virtual_bank_account.rb
88
89
  lib/chargebee/request.rb
89
90
  lib/chargebee/rest.rb
@@ -47,7 +47,7 @@ require File.dirname(__FILE__) + '/chargebee/models/payment_intent.rb'
47
47
 
48
48
  module ChargeBee
49
49
 
50
- VERSION = '2.8.2'
50
+ VERSION = '2.8.3'
51
51
 
52
52
  @@default_env = nil
53
53
  @@verify_ca_certs = true
@@ -37,12 +37,12 @@ module ChargeBee
37
37
  :offline_payment_method, :net_term_days, :vat_number_validated_time, :vat_number_status, :allow_direct_debit,
38
38
  :is_location_valid, :created_at, :created_from_ip, :exemption_details, :taxability, :entity_code,
39
39
  :exempt_number, :resource_version, :updated_at, :locale, :billing_date, :billing_date_mode,
40
- :billing_day_of_week, :billing_day_of_week_mode, :pii_cleared, :card_status, :fraud_flag, :primary_payment_source_id,
41
- :backup_payment_source_id, :billing_address, :referral_urls, :contacts, :payment_method, :invoice_notes,
42
- :preferred_currency_code, :promotional_credits, :unbilled_charges, :refundable_credits, :excess_payments,
43
- :balances, :meta_data, :deleted, :registered_for_gst, :consolidated_invoicing, :customer_type,
44
- :business_customer_without_vat_number, :client_profile_id, :relationship, :use_default_hierarchy_settings,
45
- :parent_account_access, :child_account_access
40
+ :billing_day_of_week, :billing_day_of_week_mode, :pii_cleared, :auto_close_invoices, :card_status,
41
+ :fraud_flag, :primary_payment_source_id, :backup_payment_source_id, :billing_address, :referral_urls,
42
+ :contacts, :payment_method, :invoice_notes, :preferred_currency_code, :promotional_credits,
43
+ :unbilled_charges, :refundable_credits, :excess_payments, :balances, :meta_data, :deleted, :registered_for_gst,
44
+ :consolidated_invoicing, :customer_type, :business_customer_without_vat_number, :client_profile_id,
45
+ :relationship, :use_default_hierarchy_settings, :parent_account_access, :child_account_access
46
46
 
47
47
  # OPERATIONS
48
48
  #-----------
@@ -107,7 +107,7 @@ module ChargeBee
107
107
  Request.send('post', uri_path("customers",id.to_s,"record_excess_payment"), params, env, headers)
108
108
  end
109
109
 
110
- def self.collect_payment(id, params={}, env=nil, headers={})
110
+ def self.collect_payment(id, params, env=nil, headers={})
111
111
  Request.send('post', uri_path("customers",id.to_s,"collect_payment"), params, env, headers)
112
112
  end
113
113
 
@@ -22,6 +22,10 @@ module ChargeBee
22
22
  Request.send('post', uri_path("hosted_pages","checkout_new"), params, env, headers)
23
23
  end
24
24
 
25
+ def self.checkout_one_time(params={}, env=nil, headers={})
26
+ Request.send('post', uri_path("hosted_pages","checkout_one_time"), params, env, headers)
27
+ end
28
+
25
29
  def self.checkout_new_for_items(params, env=nil, headers={})
26
30
  Request.send('post', uri_path("hosted_pages","checkout_new_for_items"), params, env, headers)
27
31
  end
@@ -7,7 +7,8 @@ module ChargeBee
7
7
 
8
8
  attr_accessor :id, :name, :description, :status, :resource_version, :updated_at, :item_family_id,
9
9
  :type, :is_shippable, :is_giftable, :redirect_url, :enabled_for_checkout, :enabled_in_portal,
10
- :included_in_mrr, :item_applicability, :gift_claim_redirect_url, :unit, :applicable_items, :metadata
10
+ :included_in_mrr, :item_applicability, :gift_claim_redirect_url, :unit, :metered, :usage_calculation,
11
+ :applicable_items, :metadata
11
12
 
12
13
  # OPERATIONS
13
14
  #-----------
@@ -2,7 +2,7 @@ module ChargeBee
2
2
  class Subscription < Model
3
3
 
4
4
  class SubscriptionItem < Model
5
- attr_accessor :item_price_id, :item_type, :quantity, :unit_price, :amount, :free_quantity, :trial_end, :billing_cycles, :service_period_days, :charge_on_event, :charge_once, :charge_on_option
5
+ attr_accessor :item_price_id, :item_type, :quantity, :metered_quantity, :last_calculated_at, :unit_price, :amount, :free_quantity, :trial_end, :billing_cycles, :service_period_days, :charge_on_event, :charge_once, :charge_on_option
6
6
  end
7
7
 
8
8
  class ItemTier < Model
@@ -52,7 +52,7 @@ module ChargeBee
52
52
  :due_invoices_count, :due_since, :total_dues, :mrr, :exchange_rate, :base_currency_code, :addons,
53
53
  :event_based_addons, :charged_event_based_addons, :coupon, :coupons, :shipping_address, :referral_info,
54
54
  :invoice_notes, :meta_data, :metadata, :deleted, :contract_term, :cancel_reason_code, :free_period,
55
- :free_period_unit
55
+ :free_period_unit, :create_pending_invoices, :auto_close_invoices
56
56
 
57
57
  # OPERATIONS
58
58
  #-----------
@@ -0,0 +1,31 @@
1
+ module ChargeBee
2
+ class Usage < Model
3
+
4
+ attr_accessor :id, :usage_date, :subscription_id, :item_price_id, :invoice_id, :line_item_id,
5
+ :quantity, :source, :note, :resource_version, :updated_at, :created_at
6
+
7
+ # OPERATIONS
8
+ #-----------
9
+
10
+ def self.create(id, params, env=nil, headers={})
11
+ Request.send('post', uri_path("subscriptions",id.to_s,"usages"), params, env, headers)
12
+ end
13
+
14
+ def self.retrieve(id, params, env=nil, headers={})
15
+ Request.send('get', uri_path("subscriptions",id.to_s,"usage"), params, env, headers)
16
+ end
17
+
18
+ def self.delete(id, params, env=nil, headers={})
19
+ Request.send('post', uri_path("subscriptions",id.to_s,"delete_usage"), params, env, headers)
20
+ end
21
+
22
+ def self.list(params, env=nil, headers={})
23
+ Request.send_list_request('get', uri_path("usages"), params, env, headers)
24
+ end
25
+
26
+ def self.pdf(params, env=nil, headers={})
27
+ Request.send('post', uri_path("usages","pdf"), params, env, headers)
28
+ end
29
+
30
+ end # ~Usage
31
+ end # ~ChargeBee
@@ -16,7 +16,7 @@ module ChargeBee
16
16
  return contract_term;
17
17
  end
18
18
 
19
- def advance_invoice_schedule()
19
+ def advance_invoice_schedule()
20
20
  advance_invoice_schedule = get(:advance_invoice_schedule, AdvanceInvoiceSchedule,
21
21
  {:fixed_interval_schedule => AdvanceInvoiceSchedule::FixedIntervalSchedule, :specific_dates_schedule => AdvanceInvoiceSchedule::SpecificDatesSchedule});
22
22
  return advance_invoice_schedule;
@@ -179,6 +179,11 @@ module ChargeBee
179
179
  return address;
180
180
  end
181
181
 
182
+ def usage()
183
+ usage = get(:usage, Usage);
184
+ return usage;
185
+ end
186
+
182
187
  def event()
183
188
  event = get(:event, Event,
184
189
  {:webhooks => Event::Webhook});
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.2
4
+ version: 2.8.3
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: 2020-12-15 00:00:00.000000000 Z
12
+ date: 2021-01-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json_pure
@@ -139,6 +139,7 @@ files:
139
139
  - lib/chargebee/models/token.rb
140
140
  - lib/chargebee/models/transaction.rb
141
141
  - lib/chargebee/models/unbilled_charge.rb
142
+ - lib/chargebee/models/usage.rb
142
143
  - lib/chargebee/models/virtual_bank_account.rb
143
144
  - lib/chargebee/request.rb
144
145
  - lib/chargebee/rest.rb