chargebee 2.8.8 → 2.9.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9fdf83c2ef7ff3baf5c07629e72a19756ff305f0
4
- data.tar.gz: a96c49cd07afaff15704d5c8548aeb87f1f1de83
3
+ metadata.gz: bf9aaa36c10321606b365e9cb898878374d8bdeb
4
+ data.tar.gz: ef4145817cbe7bfc3c19be0b6ab6340549ad4eca
5
5
  SHA512:
6
- metadata.gz: a322646e3b216341d46828c7a333c478e83d4c4bc337f576fc813a5bf07fe3a20ed92c70526ce2bcaf525e8c31041cd3677060334cd28cef7c36f567c0a8a70f
7
- data.tar.gz: cab490731a47a348b266c495e2ee56c4e7f5f8f159ba1192c28825385f21de2a666e740dcb3c396139a59dd7e088975e8bc1ac583e5bce3424fb886adb714eb1
6
+ metadata.gz: d013ed6f9e917fb6a0636e16d4d169cd6647a4c39cc6bae4c93b341e3ca033062039e2413a3a8d0755a0263ab1c67e36522a55aa31de9b5b58fcfa7082320977
7
+ data.tar.gz: 88a6561ac1a31be5c1f9b3e03be5a8a28ff02c02130578148cb633dd68634e08e9222b9e7521b22f65f22c3eb96a683d3cea3768c95376db022e63f0ce7305d5
data/CHANGELOG.md CHANGED
@@ -1,3 +1,30 @@
1
+ ### v2.9.0 (2021-08-16)
2
+ * * *
3
+ #### New Attributes:
4
+ * generated_at has been added in credit_note and invoice resources.
5
+ * change_option have been added in quoted_subscription resource.
6
+ * changes_scheduled_at has been added in subscription and quoted_subscription resources.
7
+ * iin and last4 have been added in transaction resource.
8
+
9
+ #### New Resource:
10
+ * quoted_charge has been added.
11
+
12
+ #### New Input parameters:
13
+ * 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.
14
+ * 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.
15
+ * 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.
16
+ * invoice_date, create_pending_invoices and first_invoice_pending have been added in quotes#convert_a_quote endpoint.
17
+ * subscription[auto_close_invoices] has been added in quotes#convert_a_quote endpoint.
18
+
19
+ #### New Enum values:
20
+ * subscription_cancel has been added to charge_event enum in quote_line_groups resource.
21
+ * 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
22
+ * change_option enum has been added.
23
+
24
+ #### Deprecated parameters:
25
+ * coupon has been deprecated in invoices#create_invoice_for_a_one-time_charge and invoices#create_invoice_for_a_non-recurring_addon endpoints.
26
+
27
+
1
28
  ### v2.8.8 (2021-07-22)
2
29
  * * *
3
30
  #### 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.9.0'
8
+ s.date = '2021-08-16'
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."
@@ -75,6 +75,7 @@ Gem::Specification.new do |s|
75
75
  lib/chargebee/models/promotional_credit.rb
76
76
  lib/chargebee/models/quote.rb
77
77
  lib/chargebee/models/quote_line_group.rb
78
+ lib/chargebee/models/quoted_charge.rb
78
79
  lib/chargebee/models/quoted_subscription.rb
79
80
  lib/chargebee/models/resource_migration.rb
80
81
  lib/chargebee/models/site_migration_detail.rb
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.9.0'
57
57
 
58
58
  @@default_env = nil
59
59
  @@verify_ca_certs = true
@@ -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
@@ -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
  #-----------
@@ -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
  #-----------
@@ -136,10 +136,16 @@ module ChargeBee
136
136
 
137
137
  def quoted_subscription()
138
138
  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});
139
+ {: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
140
  return quoted_subscription;
141
141
  end
142
142
 
143
+ def quoted_charge()
144
+ quoted_charge = get(:quoted_charge, QuotedCharge,
145
+ {:charges => QuotedCharge::Charge, :addons => QuotedCharge::Addon, :invoice_items => QuotedCharge::InvoiceItem, :item_tiers => QuotedCharge::ItemTier, :coupons => QuotedCharge::Coupon});
146
+ return quoted_charge;
147
+ end
148
+
143
149
  def quote_line_group()
144
150
  quote_line_group = get(:quote_line_group, QuoteLineGroup,
145
151
  {:line_items => QuoteLineGroup::LineItem, :discounts => QuoteLineGroup::Discount, :line_item_discounts => QuoteLineGroup::LineItemDiscount, :taxes => QuoteLineGroup::Tax, :line_item_taxes => QuoteLineGroup::LineItemTax});
@@ -233,7 +239,7 @@ module ChargeBee
233
239
  return payment_intent;
234
240
  end
235
241
 
236
- def item_family()
242
+ def item_family()
237
243
  item_family = get(:item_family, ItemFamily);
238
244
  return item_family;
239
245
  end
@@ -250,7 +256,7 @@ module ChargeBee
250
256
  return item_price;
251
257
  end
252
258
 
253
- def attached_item()
259
+ def attached_item()
254
260
  attached_item = get(:attached_item, AttachedItem);
255
261
  return attached_item;
256
262
  end
@@ -261,6 +267,7 @@ module ChargeBee
261
267
  return differential_price;
262
268
  end
263
269
 
270
+
264
271
  def unbilled_charges()
265
272
  unbilled_charges = get_list(:unbilled_charges, UnbilledCharge,
266
273
  {:tiers => UnbilledCharge::Tier});
@@ -297,6 +304,7 @@ module ChargeBee
297
304
  return differential_prices;
298
305
  end
299
306
 
307
+
300
308
  def to_s(*args)
301
309
  JSON.pretty_generate(@response)
302
310
  end
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.9.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-08-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json_pure
@@ -143,6 +143,7 @@ files:
143
143
  - lib/chargebee/models/promotional_credit.rb
144
144
  - lib/chargebee/models/quote.rb
145
145
  - lib/chargebee/models/quote_line_group.rb
146
+ - lib/chargebee/models/quoted_charge.rb
146
147
  - lib/chargebee/models/quoted_subscription.rb
147
148
  - lib/chargebee/models/resource_migration.rb
148
149
  - lib/chargebee/models/site_migration_detail.rb