chargebee 2.18.0 → 2.20.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: 6994e13a91dc47bbf3f63735c34c9839f2eb1fcb
4
- data.tar.gz: 6cb09f1f4aa27f72fe79dec482a8e52300061feb
3
+ metadata.gz: 597fc1a63786c913dce021f6543a34b18fdfdf37
4
+ data.tar.gz: dea300a96633c90cfebbae706332980f4776dc4e
5
5
  SHA512:
6
- metadata.gz: 4c777678c1172b1c629af82a8594424c5ce06d247bb4e0e6bc2516433102a113012d8d647b107f683aa7991534f4165a0758f15126e606d072aa67d9ad6808d9
7
- data.tar.gz: 7cde013c7dc67ef27afe0e9e2aa5e6412803798fa8f5f68a6bf7c8c45215650ce191b986e5f923933997246c16919c3f2ab589bcc3bc1aac9b0c5d631d7e4589
6
+ metadata.gz: 5f16dbd970124daae33798ad87861980f38c42f41abca2245df0cdc5d7a7eb1219d607c558bc8ec38d34bc9db17ccb43517338a81541a38a23d0b8f53638d931
7
+ data.tar.gz: cbed4282a3c1047eb7d276f02425f64832d700efd4be156b51631f6d2f27548633c55cff630d3af0b6b19d3414e45112fe964366ec209a18e54f868bd9ed0c07
data/CHANGELOG.md CHANGED
@@ -1,3 +1,32 @@
1
+ ### v2.20.0 (2022-09-20)
2
+
3
+ #### New Resource:
4
+ * discount has been added.
5
+
6
+ #### New Enum values:
7
+ * apply_on, duration_type and operation_type enums have been added.
8
+
9
+ ### v2.19.0 (2022-09-20)
10
+ * * *
11
+
12
+ #### New endpoints:
13
+ * subscriptions#list_discounts has been added to the subscriptions resource.
14
+
15
+ #### New attributes:
16
+ * billing_month has been added to the customer resource.
17
+
18
+ #### Added input parameters:
19
+ * billing_month has been added to the customers#change_billing_date API.
20
+ * line_items[subscription_id] has been added to the invoices#import_invoice API.
21
+ * layout has been added to hosted_pages#checkout_onetime_for_items, hosted_pages#checkout_new_for_items and hosted_pages#checkout_existing_for_items APIs.
22
+ * discounts[apply_on], discounts[percentage], discounts[amount] and discounts[item_price_id] have been added to estimates#create_subscription_for_items, estimates#create_subscription_for_items_estimate, estimates#update_subscription_for_items, hosted_pages#checkout_onetime_for_items, hosted_pages#checkout_new_for_items, hosted_pages#checkout_existing_for_items, invoices#create_for_charge_items_and_charges, quotes#create_subscription_for_items, quotes#edit_create_subscription_quote_for_items, quotes#update_subscription_quote_for_items, quotes#edit_update_subscription_quote_for_items, quotes#create_for_charge_items_and_charges, quotes#edit_for_charge_items_and_charges, subscriptions#create_subscription_for_items, subscriptions#update_subscription_for_items and subscriptions#import_subscription_for_items APIs.
23
+ * discounts[duration_type], discounts[period], discounts[period_unit] and discounts[included_in_mrr] have been added to estimates#create_subscription_for_items, estimates#create_subscription_for_items_estimate, estimates#update_subscription_for_items, hosted_pages#checkout_new_for_items, hosted_pages#checkout_existing_for_items, quotes#create_subscription_for_items, quotes#edit_create_subscription_quote_for_items, quotes#update_subscription_quote_for_items, quotes#edit_update_subscription_quote_for_items, subscriptions#create_subscription_for_items, subscriptions#update_subscription_for_items and subscriptions#import_subscription_for_items APIs.
24
+ * discounts[operation_type] and discounts[id] have been added to estimates#update_subscription_for_items, quotes#update_subscription_quote_for_items, hosted_pages#checkout_existing_for_items, quotes#edit_update_subscription_quote_for_items, subscriptions#update_subscription_for_items and subscriptions#import_subscription_for_items APIs.
25
+
26
+ #### New Enum values:
27
+ * global_payments has been added to gateway enum.
28
+ * layout enum has been added.
29
+
1
30
  ### v2.18.0 (2022-08-22)
2
31
  * * *
3
32
 
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.18.0'
8
- s.date = '2022-08-22'
7
+ s.version = '2.20.0'
8
+ s.date = '2022-09-20'
9
9
  s.summary = "Ruby client for Chargebee API."
10
10
  s.description = "Subscription Billing - Simple. Secure. Affordable. More details at www.chargebee.com."
11
11
 
@@ -53,6 +53,7 @@ Gem::Specification.new do |s|
53
53
  lib/chargebee/models/credit_note_estimate.rb
54
54
  lib/chargebee/models/customer.rb
55
55
  lib/chargebee/models/differential_price.rb
56
+ lib/chargebee/models/discount.rb
56
57
  lib/chargebee/models/download.rb
57
58
  lib/chargebee/models/entitlement_override.rb
58
59
  lib/chargebee/models/estimate.rb
@@ -40,7 +40,7 @@ module ChargeBee
40
40
  attr_accessor :id, :first_name, :last_name, :email, :phone, :company, :vat_number, :auto_collection,
41
41
  :offline_payment_method, :net_term_days, :vat_number_validated_time, :vat_number_status, :allow_direct_debit,
42
42
  :is_location_valid, :created_at, :created_from_ip, :exemption_details, :taxability, :entity_code,
43
- :exempt_number, :resource_version, :updated_at, :locale, :billing_date, :billing_date_mode,
43
+ :exempt_number, :resource_version, :updated_at, :locale, :billing_date, :billing_month, :billing_date_mode,
44
44
  :billing_day_of_week, :billing_day_of_week_mode, :pii_cleared, :auto_close_invoices, :channel,
45
45
  :card_status, :fraud_flag, :primary_payment_source_id, :backup_payment_source_id, :billing_address,
46
46
  :referral_urls, :contacts, :payment_method, :invoice_notes, :business_entity_id, :preferred_currency_code,
@@ -0,0 +1,12 @@
1
+ module ChargeBee
2
+ class Discount < Model
3
+
4
+ attr_accessor :id, :invoice_name, :percentage, :amount, :currency_code, :duration_type, :period,
5
+ :period_unit, :included_in_mrr, :apply_on, :item_price_id, :created_at, :apply_till, :applied_count,
6
+ :coupon_id, :index
7
+
8
+ # OPERATIONS
9
+ #-----------
10
+
11
+ end # ~Discount
12
+ end # ~ChargeBee
@@ -10,10 +10,6 @@ module ChargeBee
10
10
  Request.send('post', uri_path("purchases"), params, env, headers)
11
11
  end
12
12
 
13
- def self.retrieve(id, env=nil, headers={})
14
- Request.send('get', uri_path("purchases",id.to_s), {}, env, headers)
15
- end
16
-
17
13
  def self.estimate(params, env=nil, headers={})
18
14
  Request.send('post', uri_path("purchases","estimate"), params, env, headers)
19
15
  end
@@ -41,6 +41,10 @@ module ChargeBee
41
41
  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
42
42
  end
43
43
 
44
+ class Discount < Model
45
+ attr_accessor :id, :invoice_name, :percentage, :amount, :currency_code, :duration_type, :period, :period_unit, :included_in_mrr, :apply_on, :item_price_id, :created_at, :apply_till, :applied_count, :coupon_id, :index
46
+ end
47
+
44
48
  attr_accessor :id, :currency_code, :plan_id, :plan_quantity, :plan_unit_price, :setup_fee, :billing_period,
45
49
  :billing_period_unit, :start_date, :trial_end, :remaining_billing_cycles, :po_number, :auto_collection,
46
50
  :plan_quantity_in_decimal, :plan_unit_price_in_decimal, :customer_id, :plan_amount, :plan_free_quantity,
@@ -53,7 +57,8 @@ module ChargeBee
53
57
  :due_invoices_count, :due_since, :total_dues, :mrr, :exchange_rate, :base_currency_code, :addons,
54
58
  :event_based_addons, :charged_event_based_addons, :coupon, :coupons, :shipping_address, :referral_info,
55
59
  :invoice_notes, :meta_data, :metadata, :deleted, :changes_scheduled_at, :contract_term, :cancel_reason_code,
56
- :free_period, :free_period_unit, :create_pending_invoices, :auto_close_invoices, :business_entity_id
60
+ :free_period, :free_period_unit, :create_pending_invoices, :auto_close_invoices, :discounts,
61
+ :business_entity_id
57
62
 
58
63
  # OPERATIONS
59
64
  #-----------
@@ -82,6 +87,10 @@ module ChargeBee
82
87
  Request.send('get', uri_path("subscriptions",id.to_s,"contract_terms"), params, env, headers)
83
88
  end
84
89
 
90
+ def self.list_discounts(id, params={}, env=nil, headers={})
91
+ Request.send('get', uri_path("subscriptions",id.to_s,"discounts"), params, env, headers)
92
+ end
93
+
85
94
  def self.retrieve(id, env=nil, headers={})
86
95
  Request.send('get', uri_path("subscriptions",id.to_s), {}, env, headers)
87
96
  end
@@ -7,7 +7,7 @@ module ChargeBee
7
7
 
8
8
  def subscription()
9
9
  subscription = get(:subscription, Subscription,
10
- {:subscription_items => Subscription::SubscriptionItem, :item_tiers => Subscription::ItemTier, :charged_items => Subscription::ChargedItem, :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});
10
+ {:subscription_items => Subscription::SubscriptionItem, :item_tiers => Subscription::ItemTier, :charged_items => Subscription::ChargedItem, :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, :discounts => Subscription::Discount});
11
11
  return subscription;
12
12
  end
13
13
 
@@ -16,6 +16,11 @@ module ChargeBee
16
16
  return contract_term;
17
17
  end
18
18
 
19
+ def discount()
20
+ discount = get(:discount, Discount);
21
+ return discount;
22
+ end
23
+
19
24
  def advance_invoice_schedule()
20
25
  advance_invoice_schedule = get(:advance_invoice_schedule, AdvanceInvoiceSchedule,
21
26
  {:fixed_interval_schedule => AdvanceInvoiceSchedule::FixedIntervalSchedule, :specific_dates_schedule => AdvanceInvoiceSchedule::SpecificDatesSchedule});
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.18.0'
56
+ VERSION = '2.20.0'
57
57
 
58
58
  @@default_env = nil
59
59
  @@verify_ca_certs = true
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.18.0
4
+ version: 2.20.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: 2022-08-22 00:00:00.000000000 Z
12
+ date: 2022-09-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json_pure
@@ -129,6 +129,7 @@ files:
129
129
  - lib/chargebee/models/credit_note_estimate.rb
130
130
  - lib/chargebee/models/customer.rb
131
131
  - lib/chargebee/models/differential_price.rb
132
+ - lib/chargebee/models/discount.rb
132
133
  - lib/chargebee/models/download.rb
133
134
  - lib/chargebee/models/entitlement_override.rb
134
135
  - lib/chargebee/models/estimate.rb