chargebee 2.7.4 → 2.7.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 69b3a070bf7594f8459633844634e69b4b05b4f7
4
- data.tar.gz: 8f7e92de0dc6c0cb5d886bc3d7f813671014c720
3
+ metadata.gz: 4eb42cd957b47fe9e72bb151935bfddbf5e926aa
4
+ data.tar.gz: c6be1ee5be0019030bad155fffe46c9f57c363f4
5
5
  SHA512:
6
- metadata.gz: 5c94d56a121e93d3914b56b3278c532ececbc1c9aa72d58e2f1023d03eb0353260c401067273272f9875d06e76b1327a35f0a1101b12d77b7dbb1dd6fb780bc8
7
- data.tar.gz: b42fee4d30900dffdd3c0694dd0713b398e56670e62e1e907023113764ec8570a7b7162b7ee7254ac1bedf602207fecc7f66542134989ca6bb7503d66a8cf5a2
6
+ metadata.gz: 3cb242d499446aebbfad8c28b180d124def0a62461c750b062b9c18adbc86008331fb0653818f8f1b418fd9e0e04d40c007cfd0b2135ff09036077aa8f829f0e
7
+ data.tar.gz: 41e5160fe429abbebb14c23bbe60c08fb4c2e7577d5f700dfadc3fd01e196282b74e6c40811a5116712c25f06183f2c35df77e6f45e471b319dc379b7d642200
@@ -1,3 +1,23 @@
1
+ ### v2.7.5 (2020-04-03)
2
+ * * *
3
+
4
+ * A subresource contract_term has been added in Subscription resource
5
+ * New endpoint refund_a_credit_note has been added in Credit notes resource
6
+ * New endpoint list_quote_line_groups has been added in Quotes resource
7
+ * New endpoint list_contract_terms_for_a_subscription has been added in Subscriptions resource
8
+ * New input parameter contract_term_billing_cycle_on_renewal, contract_term[action_at_term_end], contract_term[cancellation_cutoff_period] has been added in create_a_subscription, create_subscription_for_customer, update_a_subscription and reactivate_a_subscription apis
9
+ * New input parameter contract_term_cancel_option has been added in cancel_a_subscription api
10
+ * New input parameter contract_term[action_at_term_end], contract_term[cancellation_cutoff_period], subscription[contract_term_billing_cycle_on_renewal] has been added in create_subscription_estimate, create_subscription_for_a_customer_estimate, checkout_new_subscription, checkout_existing_subscription apis
11
+ * New input parameter business_customer_without_vat_number has been added in create_a_customer and update_billing_info_for_a_customer apis
12
+ * New input parameter addons[service_period] replaces the parameter addons[date_from] and addons[date_to] in create_a_quote_for_one-time_charges api
13
+ * New input parameter charges[service_period] replaces the parameter charges[date_from] and charges[date_to] in create_a_quote_for_one-time_charges api
14
+ * New input parameter consolidated_view has been added in retrieve_quote_as_pdf api
15
+ * New input parameter customer[business_customer_without_vat_number] has been added in create_a_subscription, update_a_subscription apis
16
+ * New value CHECKOUT_COM has been added in gateway enum
17
+ * New value CONTRACT_TERMINATION has been added to eventBasedAddons onEvent enum
18
+ * New values IDEAL, GOOGLE_PAY has been added to payment types enum
19
+ * New event types CONTRACT_TERM_CREATED, CONTRACT_TERM_RENEWED, CONTRACT_TERM_TERMINATED, CONTRACT_TERM_COMPLETED, CONTRACT_TERM_CANCELLED have been added
20
+
1
21
  ### v2.7.4(2020-02-06)
2
22
  * * *
3
23
 
@@ -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.7.4'
8
- s.date = '2020-02-06'
7
+ s.version = '2.7.5'
8
+ s.date = '2020-04-03'
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."
@@ -43,6 +43,7 @@ Gem::Specification.new do |s|
43
43
  lib/chargebee/models/card.rb
44
44
  lib/chargebee/models/comment.rb
45
45
  lib/chargebee/models/contact.rb
46
+ lib/chargebee/models/contract_term.rb
46
47
  lib/chargebee/models/coupon.rb
47
48
  lib/chargebee/models/coupon_code.rb
48
49
  lib/chargebee/models/coupon_set.rb
@@ -66,6 +67,7 @@ Gem::Specification.new do |s|
66
67
  lib/chargebee/models/portal_session.rb
67
68
  lib/chargebee/models/promotional_credit.rb
68
69
  lib/chargebee/models/quote.rb
70
+ lib/chargebee/models/quote_line_group.rb
69
71
  lib/chargebee/models/resource_migration.rb
70
72
  lib/chargebee/models/site_migration_detail.rb
71
73
  lib/chargebee/models/subscription.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.7.4'
50
+ VERSION = '2.7.5'
51
51
 
52
52
  @@default_env = nil
53
53
  @@verify_ca_certs = true
@@ -0,0 +1,11 @@
1
+ module ChargeBee
2
+ class ContractTerm < Model
3
+
4
+ attr_accessor :id, :status, :contract_start, :contract_end, :billing_cycle, :action_at_term_end,
5
+ :total_contract_value, :cancellation_cutoff_period, :created_at, :subscription_id, :remaining_billing_cycles
6
+
7
+ # OPERATIONS
8
+ #-----------
9
+
10
+ end # ~ContractTerm
11
+ end # ~ChargeBee
@@ -55,6 +55,10 @@ module ChargeBee
55
55
  Request.send('post', uri_path("credit_notes",id.to_s,"pdf"), params, env, headers)
56
56
  end
57
57
 
58
+ def self.refund(id, params={}, env=nil, headers={})
59
+ Request.send('post', uri_path("credit_notes",id.to_s,"refund"), params, env, headers)
60
+ end
61
+
58
62
  def self.record_refund(id, params, env=nil, headers={})
59
63
  Request.send('post', uri_path("credit_notes",id.to_s,"record_refund"), params, env, headers)
60
64
  end
@@ -32,8 +32,8 @@ module ChargeBee
32
32
  :billing_day_of_week, :billing_day_of_week_mode, :pii_cleared, :card_status, :fraud_flag, :primary_payment_source_id,
33
33
  :backup_payment_source_id, :billing_address, :referral_urls, :contacts, :payment_method, :invoice_notes,
34
34
  :preferred_currency_code, :promotional_credits, :unbilled_charges, :refundable_credits, :excess_payments,
35
- :balances, :meta_data, :deleted, :registered_for_gst, :business_customer_without_vat_number,
36
- :customer_type, :client_profile_id, :relationship
35
+ :balances, :meta_data, :deleted, :registered_for_gst, :customer_type, :business_customer_without_vat_number,
36
+ :client_profile_id, :relationship
37
37
 
38
38
  # OPERATIONS
39
39
  #-----------
@@ -58,6 +58,10 @@ module ChargeBee
58
58
  Request.send_list_request('get', uri_path("quotes"), params, env, headers)
59
59
  end
60
60
 
61
+ def self.quote_line_groups_for_quote(id, params={}, env=nil, headers={})
62
+ Request.send('get', uri_path("quotes",id.to_s,"quote_line_groups"), params, env, headers)
63
+ end
64
+
61
65
  def self.convert(id, params={}, env=nil, headers={})
62
66
  Request.send('post', uri_path("quotes",id.to_s,"convert"), params, env, headers)
63
67
  end
@@ -0,0 +1,31 @@
1
+ module ChargeBee
2
+ class QuoteLineGroup < Model
3
+
4
+ class LineItem < Model
5
+ attr_accessor :id, :subscription_id, :date_from, :date_to, :unit_amount, :quantity, :amount, :pricing_model, :is_taxed, :tax_amount, :tax_rate, :discount_amount, :item_level_discount_amount, :description, :entity_type, :tax_exempt_reason, :entity_id, :customer_id
6
+ end
7
+
8
+ class Discount < Model
9
+ attr_accessor :amount, :description, :entity_type, :entity_id
10
+ end
11
+
12
+ class LineItemDiscount < Model
13
+ attr_accessor :line_item_id, :discount_type, :coupon_id, :discount_amount
14
+ end
15
+
16
+ class Tax < Model
17
+ attr_accessor :name, :amount, :description
18
+ end
19
+
20
+ class LineItemTax < Model
21
+ attr_accessor :line_item_id, :tax_name, :tax_rate, :is_partial_tax_applied, :is_non_compliance_tax, :taxable_amount, :tax_amount, :tax_juris_type, :tax_juris_name, :tax_juris_code, :tax_amount_in_local_currency, :local_currency_code
22
+ end
23
+
24
+ attr_accessor :id, :sub_total, :total, :credits_applied, :amount_paid, :amount_due, :charge_event,
25
+ :billing_cycle_number, :line_items, :discounts, :line_item_discounts, :taxes, :line_item_taxes
26
+
27
+ # OPERATIONS
28
+ #-----------
29
+
30
+ end # ~QuoteLineGroup
31
+ end # ~ChargeBee
@@ -25,15 +25,19 @@ module ChargeBee
25
25
  attr_accessor :referral_code, :coupon_code, :referrer_id, :external_reference_id, :reward_status, :referral_system, :account_id, :campaign_id, :external_campaign_id, :friend_offer_type, :referrer_reward_type, :notify_referral_system, :destination_url, :post_purchase_widget_enabled
26
26
  end
27
27
 
28
+ class ContractTerm < Model
29
+ attr_accessor :id, :status, :contract_start, :contract_end, :billing_cycle, :action_at_term_end, :total_contract_value, :cancellation_cutoff_period, :created_at, :subscription_id, :remaining_billing_cycles
30
+ end
31
+
28
32
  attr_accessor :id, :customer_id, :currency_code, :plan_id, :plan_quantity, :plan_unit_price,
29
33
  :setup_fee, :plan_amount, :billing_period, :billing_period_unit, :plan_free_quantity, :status,
30
34
  :start_date, :trial_start, :trial_end, :current_term_start, :current_term_end, :next_billing_at,
31
- :remaining_billing_cycles, :po_number, :created_at, :started_at, :activated_at, :gift_id, :override_relationship,
32
- :pause_date, :resume_date, :cancelled_at, :cancel_reason, :affiliate_token, :created_from_ip,
33
- :resource_version, :updated_at, :has_scheduled_changes, :payment_source_id, :auto_collection,
34
- :due_invoices_count, :due_since, :total_dues, :mrr, :exchange_rate, :base_currency_code, :addons,
35
- :event_based_addons, :charged_event_based_addons, :coupon, :coupons, :shipping_address, :referral_info,
36
- :invoice_notes, :meta_data, :deleted
35
+ :remaining_billing_cycles, :po_number, :created_at, :started_at, :activated_at, :gift_id, :contract_term_billing_cycle_on_renewal,
36
+ :override_relationship, :pause_date, :resume_date, :cancelled_at, :cancel_reason, :affiliate_token,
37
+ :created_from_ip, :resource_version, :updated_at, :has_scheduled_changes, :payment_source_id,
38
+ :auto_collection, :due_invoices_count, :due_since, :total_dues, :mrr, :exchange_rate, :base_currency_code,
39
+ :addons, :event_based_addons, :charged_event_based_addons, :coupon, :coupons, :shipping_address,
40
+ :referral_info, :invoice_notes, :meta_data, :deleted, :contract_term
37
41
 
38
42
  # OPERATIONS
39
43
  #-----------
@@ -54,6 +58,10 @@ module ChargeBee
54
58
  Request.send('get', uri_path("customers",id.to_s,"subscriptions"), params, env, headers)
55
59
  end
56
60
 
61
+ def self.contract_terms_for_subscription(id, params={}, env=nil, headers={})
62
+ Request.send('get', uri_path("subscriptions",id.to_s,"contract_terms"), params, env, headers)
63
+ end
64
+
57
65
  def self.retrieve(id, env=nil, headers={})
58
66
  Request.send('get', uri_path("subscriptions",id.to_s), {}, env, headers)
59
67
  end
@@ -5,7 +5,12 @@ module ChargeBee
5
5
  attr_accessor :first_name, :last_name, :email, :company, :phone, :line1, :line2, :line3, :city, :state_code, :state, :country, :zip, :validation_status
6
6
  end
7
7
 
8
- attr_accessor :id, :currency_code, :status, :next_billing_at, :pause_date, :resume_date, :shipping_address
8
+ class ContractTerm < Model
9
+ attr_accessor :id, :status, :contract_start, :contract_end, :billing_cycle, :action_at_term_end, :total_contract_value, :cancellation_cutoff_period, :created_at, :subscription_id, :remaining_billing_cycles
10
+ end
11
+
12
+ attr_accessor :id, :currency_code, :status, :next_billing_at, :pause_date, :resume_date, :shipping_address,
13
+ :contract_term
9
14
 
10
15
  # OPERATIONS
11
16
  #-----------
@@ -7,10 +7,15 @@ module ChargeBee
7
7
 
8
8
  def subscription()
9
9
  subscription = get(:subscription, Subscription,
10
- {:addons => Subscription::Addon, :event_based_addons => Subscription::EventBasedAddon, :charged_event_based_addons => Subscription::ChargedEventBasedAddon, :coupons => Subscription::Coupon, :shipping_address => Subscription::ShippingAddress, :referral_info => Subscription::ReferralInfo});
10
+ {:addons => Subscription::Addon, :event_based_addons => Subscription::EventBasedAddon, :charged_event_based_addons => Subscription::ChargedEventBasedAddon, :coupons => Subscription::Coupon, :shipping_address => Subscription::ShippingAddress, :referral_info => Subscription::ReferralInfo, :contract_term => Subscription::ContractTerm});
11
11
  return subscription;
12
12
  end
13
13
 
14
+ def contract_term()
15
+ contract_term = get(:contract_term, ContractTerm);
16
+ return contract_term;
17
+ end
18
+
14
19
  def customer()
15
20
  customer = get(:customer, Customer,
16
21
  {:billing_address => Customer::BillingAddress, :referral_urls => Customer::ReferralUrl, :contacts => Customer::Contact, :payment_method => Customer::PaymentMethod, :balances => Customer::Balance, :relationship => Customer::Relationship});
@@ -103,7 +108,7 @@ module ChargeBee
103
108
  estimate = get(:estimate, Estimate, {},
104
109
  {:subscription_estimate => SubscriptionEstimate, :invoice_estimate => InvoiceEstimate, :invoice_estimates => InvoiceEstimate, :next_invoice_estimate => InvoiceEstimate, :credit_note_estimates => CreditNoteEstimate, :unbilled_charge_estimates => UnbilledCharge});
105
110
  estimate.init_dependant(@response[:estimate], :subscription_estimate,
106
- {:shipping_address => SubscriptionEstimate::ShippingAddress});
111
+ {:shipping_address => SubscriptionEstimate::ShippingAddress, :contract_term => SubscriptionEstimate::ContractTerm});
107
112
  estimate.init_dependant(@response[:estimate], :invoice_estimate,
108
113
  {:line_items => InvoiceEstimate::LineItem, :discounts => InvoiceEstimate::Discount, :taxes => InvoiceEstimate::Tax, :line_item_taxes => InvoiceEstimate::LineItemTax, :line_item_tiers => InvoiceEstimate::LineItemTier, :line_item_discounts => InvoiceEstimate::LineItemDiscount});
109
114
  estimate.init_dependant(@response[:estimate], :next_invoice_estimate,
@@ -123,6 +128,12 @@ module ChargeBee
123
128
  return quote;
124
129
  end
125
130
 
131
+ def quote_line_group()
132
+ quote_line_group = get(:quote_line_group, QuoteLineGroup,
133
+ {:line_items => QuoteLineGroup::LineItem, :discounts => QuoteLineGroup::Discount, :line_item_discounts => QuoteLineGroup::LineItemDiscount, :taxes => QuoteLineGroup::Tax, :line_item_taxes => QuoteLineGroup::LineItemTax});
134
+ return quote_line_group;
135
+ end
136
+
126
137
  def plan()
127
138
  plan = get(:plan, Plan,
128
139
  {:tiers => Plan::Tier, :applicable_addons => Plan::ApplicableAddon, :attached_addons => Plan::AttachedAddon, :event_based_addons => Plan::EventBasedAddon});
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.7.4
4
+ version: 2.7.5
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-02-06 00:00:00.000000000 Z
12
+ date: 2020-04-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json_pure
@@ -98,6 +98,7 @@ files:
98
98
  - lib/chargebee/models/card.rb
99
99
  - lib/chargebee/models/comment.rb
100
100
  - lib/chargebee/models/contact.rb
101
+ - lib/chargebee/models/contract_term.rb
101
102
  - lib/chargebee/models/coupon.rb
102
103
  - lib/chargebee/models/coupon_code.rb
103
104
  - lib/chargebee/models/coupon_set.rb
@@ -121,6 +122,7 @@ files:
121
122
  - lib/chargebee/models/portal_session.rb
122
123
  - lib/chargebee/models/promotional_credit.rb
123
124
  - lib/chargebee/models/quote.rb
125
+ - lib/chargebee/models/quote_line_group.rb
124
126
  - lib/chargebee/models/resource_migration.rb
125
127
  - lib/chargebee/models/site_migration_detail.rb
126
128
  - lib/chargebee/models/subscription.rb