chargebee 2.7.8 → 2.7.9

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
- SHA1:
3
- metadata.gz: 3bc4e637fa00ed6995d79c0c80413b81dcef6c52
4
- data.tar.gz: 64c223bec7c54c7b365553292cb70350defe9aa6
2
+ SHA256:
3
+ metadata.gz: 4041dbcecf712a30107e02008a15058fbb216a1b55e72ca0895884425f35b3aa
4
+ data.tar.gz: e404af8c615df22447e965ec441eede1d2fd08029e7af66775c98e9fa93f18a4
5
5
  SHA512:
6
- metadata.gz: f7421bbfe4074776ffe46c6db1a4ccc0ab16b96cd28364bf7bba728e9098f516c4cb7f9391df8c1e113a2b3e918179ab52e9f98b3225b137900e64c5dccb9094
7
- data.tar.gz: 09a9c355e90a457be99a1d1451d99077aa752d25754ac58eea2540c9a7a6034da4c14e0ef013fc2627ccdcfc4b1d0cc3b64fa7cef50d388c13febf9b43301883
6
+ metadata.gz: 70fcad861242d1d23e0a14d0eede0b7f9d28294bd2041b4c4e5197f18acfb4c0673e222408e441d9de95cca1877faa7cd4bac89fc1e3db75a712c9c15c24531b
7
+ data.tar.gz: 700576f43bc37317bc3abd1dbc4e690e8e8cc20c8de8e56bd07084cbbd2469422e51ad02ce1b76e83b771343b7197b9711881f9b904586fad8498d2ad34a8707
@@ -1,3 +1,7 @@
1
+ ### v2.7.9 (2020-10-19)
2
+ * * *
3
+ * New optional attribute quoted_subscriptions has been added to the resource quote
4
+ * New optional attributes resource_version and updated_at are added to the resource payment_intent
1
5
  ### v2.7.8 (2020-09-29)
2
6
  * * *
3
7
 
@@ -1698,5 +1702,4 @@ Support for creating plans & addons on the fly via API.
1698
1702
 
1699
1703
  * API to fetch multiple subscriptions of a customer.
1700
1704
 
1701
- * Added support to get the list of events filtered by event type. Events can be fetched based on the event type eg., payment_succeeded.
1702
-
1705
+ * Added support to get the list of events filtered by event type. Events can be fetched based on the event type eg., payment_succeeded.
@@ -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.8'
8
- s.date = '2020-09-29'
7
+ s.version = '2.7.9'
8
+ s.date = '2020-10-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."
@@ -40,6 +40,7 @@ Gem::Specification.new do |s|
40
40
  lib/chargebee/list_result.rb
41
41
  lib/chargebee/models/addon.rb
42
42
  lib/chargebee/models/address.rb
43
+ lib/chargebee/models/advance_invoice_schedule.rb
43
44
  lib/chargebee/models/card.rb
44
45
  lib/chargebee/models/comment.rb
45
46
  lib/chargebee/models/contact.rb
@@ -68,6 +69,7 @@ Gem::Specification.new do |s|
68
69
  lib/chargebee/models/promotional_credit.rb
69
70
  lib/chargebee/models/quote.rb
70
71
  lib/chargebee/models/quote_line_group.rb
72
+ lib/chargebee/models/quoted_subscription.rb
71
73
  lib/chargebee/models/resource_migration.rb
72
74
  lib/chargebee/models/site_migration_detail.rb
73
75
  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.8'
50
+ VERSION = '2.7.9'
51
51
 
52
52
  @@default_env = nil
53
53
  @@verify_ca_certs = true
@@ -0,0 +1,18 @@
1
+ module ChargeBee
2
+ class AdvanceInvoiceSchedule < Model
3
+
4
+ class FixedIntervalSchedule < Model
5
+ attr_accessor :end_schedule_on, :number_of_occurrences, :days_before_renewal, :end_date, :created_at, :terms_to_charge
6
+ end
7
+
8
+ class SpecificDatesSchedule < Model
9
+ attr_accessor :terms_to_charge, :date, :created_at
10
+ end
11
+
12
+ attr_accessor :id, :schedule_type, :fixed_interval_schedule, :specific_dates_schedule
13
+
14
+ # OPERATIONS
15
+ #-----------
16
+
17
+ end # ~AdvanceInvoiceSchedule
18
+ end # ~ChargeBee
@@ -6,7 +6,8 @@ module ChargeBee
6
6
  end
7
7
 
8
8
  attr_accessor :id, :status, :currency_code, :amount, :gateway_account_id, :expires_at, :reference_id,
9
- :payment_method_type, :created_at, :modified_at, :customer_id, :gateway, :active_payment_attempt
9
+ :payment_method_type, :created_at, :modified_at, :resource_version, :updated_at, :customer_id,
10
+ :gateway, :active_payment_attempt
10
11
 
11
12
  # OPERATIONS
12
13
  #-----------
@@ -0,0 +1,24 @@
1
+ module ChargeBee
2
+ class QuotedSubscription < Model
3
+
4
+ class Addon < Model
5
+ attr_accessor :id, :quantity, :unit_price, :amount, :trial_end, :remaining_billing_cycles
6
+ end
7
+
8
+ class EventBasedAddon < Model
9
+ attr_accessor :id, :quantity, :unit_price, :service_period_in_days, :on_event, :charge_once
10
+ end
11
+
12
+ class Coupon < Model
13
+ attr_accessor :coupon_id, :apply_till, :applied_count, :coupon_code
14
+ end
15
+
16
+ attr_accessor :id, :plan_id, :plan_quantity, :plan_unit_price, :setup_fee, :billing_period,
17
+ :billing_period_unit, :start_date, :trial_end, :remaining_billing_cycles, :po_number, :auto_collection,
18
+ :addons, :event_based_addons, :coupons
19
+
20
+ # OPERATIONS
21
+ #-----------
22
+
23
+ end # ~QuotedSubscription
24
+ end # ~ChargeBee
@@ -29,16 +29,16 @@ module ChargeBee
29
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
30
  end
31
31
 
32
- attr_accessor :id, :customer_id, :currency_code, :plan_id, :plan_quantity, :plan_unit_price,
33
- :setup_fee, :plan_amount, :billing_period, :billing_period_unit, :plan_free_quantity, :status,
34
- :start_date, :trial_start, :trial_end, :current_term_start, :current_term_end, :next_billing_at,
35
- :remaining_billing_cycles, :po_number, :created_at, :started_at, :activated_at, :gift_id, :contract_term_billing_cycle_on_renewal,
32
+ attr_accessor :id, :currency_code, :plan_id, :plan_quantity, :plan_unit_price, :setup_fee, :billing_period,
33
+ :billing_period_unit, :start_date, :trial_end, :remaining_billing_cycles, :po_number, :auto_collection,
34
+ :customer_id, :plan_amount, :plan_free_quantity, :status, :trial_start, :current_term_start,
35
+ :current_term_end, :next_billing_at, :created_at, :started_at, :activated_at, :gift_id, :contract_term_billing_cycle_on_renewal,
36
36
  :override_relationship, :pause_date, :resume_date, :cancelled_at, :cancel_reason, :affiliate_token,
37
37
  :created_from_ip, :resource_version, :updated_at, :has_scheduled_changes, :payment_source_id,
38
- :auto_collection, :offline_payment_method, :due_invoices_count, :due_since,
39
- :total_dues, :mrr, :exchange_rate, :base_currency_code, :addons, :event_based_addons, :charged_event_based_addons,
40
- :coupon, :coupons, :shipping_address, :referral_info, :invoice_notes, :meta_data, :deleted,
41
- :contract_term, :cancel_reason_code, :free_period, :free_period_unit
38
+ :offline_payment_method, :due_invoices_count, :due_since, :total_dues, :mrr, :exchange_rate,
39
+ :base_currency_code, :addons, :event_based_addons, :charged_event_based_addons, :coupon, :coupons,
40
+ :shipping_address, :referral_info, :invoice_notes, :meta_data, :deleted, :contract_term, :cancel_reason_code,
41
+ :free_period, :free_period_unit
42
42
 
43
43
  # OPERATIONS
44
44
  #-----------
@@ -16,6 +16,12 @@ module ChargeBee
16
16
  return contract_term;
17
17
  end
18
18
 
19
+ def advance_invoice_schedule()
20
+ advance_invoice_schedule = get(:advance_invoice_schedule, AdvanceInvoiceSchedule,
21
+ {:fixed_interval_schedule => AdvanceInvoiceSchedule::FixedIntervalSchedule, :specific_dates_schedule => AdvanceInvoiceSchedule::SpecificDatesSchedule});
22
+ return advance_invoice_schedule;
23
+ end
24
+
19
25
  def customer()
20
26
  customer = get(:customer, Customer,
21
27
  {:billing_address => Customer::BillingAddress, :referral_urls => Customer::ReferralUrl, :contacts => Customer::Contact, :payment_method => Customer::PaymentMethod, :balances => Customer::Balance, :relationship => Customer::Relationship, :parent_account_access => Customer::ParentAccountAccess, :child_account_access => Customer::ChildAccountAccess});
@@ -128,6 +134,12 @@ module ChargeBee
128
134
  return quote;
129
135
  end
130
136
 
137
+ def quoted_subscription()
138
+ quoted_subscription = get(:quoted_subscription, QuotedSubscription,
139
+ {:addons => QuotedSubscription::Addon, :event_based_addons => QuotedSubscription::EventBasedAddon, :coupons => QuotedSubscription::Coupon});
140
+ return quoted_subscription;
141
+ end
142
+
131
143
  def quote_line_group()
132
144
  quote_line_group = get(:quote_line_group, QuoteLineGroup,
133
145
  {:line_items => QuoteLineGroup::LineItem, :discounts => QuoteLineGroup::Discount, :line_item_discounts => QuoteLineGroup::LineItemDiscount, :taxes => QuoteLineGroup::Tax, :line_item_taxes => QuoteLineGroup::LineItemTax});
@@ -228,6 +240,12 @@ module ChargeBee
228
240
  return credit_notes;
229
241
  end
230
242
 
243
+ def advance_invoice_schedules()
244
+ advance_invoice_schedules = get_list(:advance_invoice_schedules, AdvanceInvoiceSchedule,
245
+ {:fixed_interval_schedule => AdvanceInvoiceSchedule::FixedIntervalSchedule, :specific_dates_schedule => AdvanceInvoiceSchedule::SpecificDatesSchedule});
246
+ return advance_invoice_schedules;
247
+ end
248
+
231
249
  def hierarchies()
232
250
  hierarchies = get_list(:hierarchies, Hierarchy,
233
251
  {});
@@ -240,8 +258,9 @@ module ChargeBee
240
258
  return invoices;
241
259
  end
242
260
 
243
- def to_s(*args)
244
- JSON.pretty_generate(@response)
261
+
262
+ def to_s(*args)
263
+ JSON.pretty_generate(@response)
245
264
  end
246
265
 
247
266
  private
@@ -255,7 +274,7 @@ module ChargeBee
255
274
  when Hash
256
275
  model = klass.construct(obj, sub_types, dependant_types)
257
276
  dependant_sub_types.each do |k,v|
258
- model.init_dependant(obj, k, v);
277
+ model.init_dependant(obj, k, v);
259
278
  end
260
279
  set_val.push(model)
261
280
  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.7.8
4
+ version: 2.7.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rajaraman S
@@ -9,68 +9,68 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-09-29 00:00:00.000000000 Z
12
+ date: 2020-10-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json_pure
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - ~>
18
+ - - "~>"
19
19
  - !ruby/object:Gem::Version
20
20
  version: '2.1'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - ~>
25
+ - - "~>"
26
26
  - !ruby/object:Gem::Version
27
27
  version: '2.1'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: rest-client
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - '>='
32
+ - - ">="
33
33
  - !ruby/object:Gem::Version
34
34
  version: '1.8'
35
- - - <
35
+ - - "<"
36
36
  - !ruby/object:Gem::Version
37
37
  version: '3.0'
38
38
  type: :runtime
39
39
  prerelease: false
40
40
  version_requirements: !ruby/object:Gem::Requirement
41
41
  requirements:
42
- - - '>='
42
+ - - ">="
43
43
  - !ruby/object:Gem::Version
44
44
  version: '1.8'
45
- - - <
45
+ - - "<"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '3.0'
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: rspec
50
50
  requirement: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: 3.0.0
55
55
  type: :development
56
56
  prerelease: false
57
57
  version_requirements: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ~>
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
61
  version: 3.0.0
62
62
  - !ruby/object:Gem::Dependency
63
63
  name: mocha
64
64
  requirement: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  type: :development
70
70
  prerelease: false
71
71
  version_requirements: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - '>='
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  description: Subscription Billing - Simple. Secure. Affordable. More details at www.chargebee.com.
@@ -95,6 +95,7 @@ files:
95
95
  - lib/chargebee/list_result.rb
96
96
  - lib/chargebee/models/addon.rb
97
97
  - lib/chargebee/models/address.rb
98
+ - lib/chargebee/models/advance_invoice_schedule.rb
98
99
  - lib/chargebee/models/card.rb
99
100
  - lib/chargebee/models/comment.rb
100
101
  - lib/chargebee/models/contact.rb
@@ -123,6 +124,7 @@ files:
123
124
  - lib/chargebee/models/promotional_credit.rb
124
125
  - lib/chargebee/models/quote.rb
125
126
  - lib/chargebee/models/quote_line_group.rb
127
+ - lib/chargebee/models/quoted_subscription.rb
126
128
  - lib/chargebee/models/resource_migration.rb
127
129
  - lib/chargebee/models/site_migration_detail.rb
128
130
  - lib/chargebee/models/subscription.rb
@@ -149,22 +151,21 @@ licenses:
149
151
  metadata: {}
150
152
  post_install_message:
151
153
  rdoc_options:
152
- - --charset=UTF-8
154
+ - "--charset=UTF-8"
153
155
  require_paths:
154
156
  - lib
155
157
  required_ruby_version: !ruby/object:Gem::Requirement
156
158
  requirements:
157
- - - '>='
159
+ - - ">="
158
160
  - !ruby/object:Gem::Version
159
161
  version: 1.9.3
160
162
  required_rubygems_version: !ruby/object:Gem::Requirement
161
163
  requirements:
162
- - - '>='
164
+ - - ">="
163
165
  - !ruby/object:Gem::Version
164
166
  version: '0'
165
167
  requirements: []
166
- rubyforge_project:
167
- rubygems_version: 2.4.5
168
+ rubygems_version: 3.0.3
168
169
  signing_key:
169
170
  specification_version: 2
170
171
  summary: Ruby client for Chargebee API.