chargebee 2.2.8 → 2.2.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +35 -21
- data/README.rdoc +6 -1
- data/chargebee.gemspec +4 -4
- data/lib/chargebee.rb +1 -1
- data/lib/chargebee/models/estimate.rb +1 -1
- data/lib/chargebee/models/unbilled_charge.rb +4 -0
- data/lib/chargebee/result.rb +3 -1
- metadata +13 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 10a3327182a10144041ea49ef4f56366ee376dff
|
4
|
+
data.tar.gz: 42f825d3beabb103d7b33992d051c5f645105bcf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 432f4c854a912fa600176d3701d033ef6feed203b87972b54e14ec05dc57b99494fdd0265b62878cdff9d94d05182314537201358f3c09dfa7f8ecfe9a2d9b7e
|
7
|
+
data.tar.gz: 7fc6f4fc1927e34353e621275f71e0bc097c7f98c75c4df616fdb1d76b02d62f76cf87b1241c31496d5e060084e3aff4d3ac5e7bd34131e8f2af728a5f418519
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,18 @@
|
|
1
|
-
###v2.2.
|
1
|
+
### v2.2.9 (2017-06-01)
|
2
|
+
* * *
|
3
|
+
|
4
|
+
The endpoint Invoice Now Estimate has been added to the Unbilled Charge resource.
|
5
|
+
See : https://apidocs.chargebee.com/docs/api/customers#assign_payment_role
|
6
|
+
|
7
|
+
** APIs updated**:
|
8
|
+
|
9
|
+
The filter param "phone" has been added to the List Customer API.
|
10
|
+
See : https://apidocs.chargebee.com/docs/api/customers#list_customers
|
11
|
+
|
12
|
+
The subresource "invoice_estimates" has been added to the Estimate resource.
|
13
|
+
See : https://apidocs.chargebee.com/docs/api/estimates#invoice_estimate_attributes
|
14
|
+
|
15
|
+
### v2.2.8 (2017-05-04)
|
2
16
|
* * *
|
3
17
|
|
4
18
|
** APIs added**:
|
@@ -55,7 +69,7 @@ See : https://apidocs.chargebee.com/docs/api/subscriptions#import_a_subscription
|
|
55
69
|
The event types payment_source_added, payment_source_updated and payment_source_deleted have been added.
|
56
70
|
See : https://apidocs.chargebee.com/docs/api/events#event_types
|
57
71
|
|
58
|
-
###v2.2.7 (2017-04-19)
|
72
|
+
### v2.2.7 (2017-04-19)
|
59
73
|
* * *
|
60
74
|
|
61
75
|
** APIs added**:
|
@@ -80,7 +94,7 @@ See : https://apidocs.chargebee.com/docs/api/hosted_pages#hosted_page_attributes
|
|
80
94
|
A new gateway 'adyen' has been added.
|
81
95
|
See : https://apidocs.chargebee.com/docs/api/cards#card_attributes
|
82
96
|
|
83
|
-
###v2.2.6 (2017-03-16)
|
97
|
+
### v2.2.6 (2017-03-16)
|
84
98
|
* * *
|
85
99
|
|
86
100
|
** APIs updated**:
|
@@ -100,7 +114,7 @@ A new attribute 'has_advance_charges' have been added to the Invoice resource.
|
|
100
114
|
See : https://apidocs.chargebee.com/docs/api/invoices#invoice_attributes
|
101
115
|
|
102
116
|
|
103
|
-
###v2.2.5 (2017-02-24)
|
117
|
+
### v2.2.5 (2017-02-24)
|
104
118
|
* * *
|
105
119
|
|
106
120
|
** APIs added**:
|
@@ -121,7 +135,7 @@ The input parameters 'ignore_scheduled_cancellation' and 'ignore_scheduled_chang
|
|
121
135
|
See : https://apidocs.chargebee.com/docs/api/estimates#subscription_renewal_estimate
|
122
136
|
|
123
137
|
|
124
|
-
###v2.2.4 (2017-01-30)
|
138
|
+
### v2.2.4 (2017-01-30)
|
125
139
|
* * *
|
126
140
|
|
127
141
|
** APIs updated**:
|
@@ -144,7 +158,7 @@ See : https://apidocs.chargebee.com/docs/api/subscriptions#reactivate_a_subscrip
|
|
144
158
|
A new endpoint 'Charge Future Renewals' has been added to the Subscription API.
|
145
159
|
https://apidocs.chargebee.com/docs/api/subscriptions#charge_future_renewals
|
146
160
|
|
147
|
-
###v2.2.3 (2017-01-27)
|
161
|
+
### v2.2.3 (2017-01-27)
|
148
162
|
* * *
|
149
163
|
|
150
164
|
** APIs updated**:
|
@@ -171,7 +185,7 @@ A new endpoint Create subscription for a customer estimate has been added to the
|
|
171
185
|
See: https://apidocs.chargebee.com/docs/api/estimates#create_subscription_for_a_customer_estimate
|
172
186
|
|
173
187
|
|
174
|
-
###v2.2.2 (2017-01-12)
|
188
|
+
### v2.2.2 (2017-01-12)
|
175
189
|
* * *
|
176
190
|
|
177
191
|
** APIs added**:
|
@@ -184,7 +198,7 @@ See : https://apidocs.chargebee.com/docs/api/addons#unarchive_an_addon
|
|
184
198
|
A new endpoint, Unarchive a coupon has been added to the Coupon resource.
|
185
199
|
See : https://apidocs.chargebee.com/docs/api/coupons#unarchive_a_coupon
|
186
200
|
|
187
|
-
###v2.2.1 (2016-12-30)
|
201
|
+
### v2.2.1 (2016-12-30)
|
188
202
|
* * *
|
189
203
|
|
190
204
|
** APIs updated**:
|
@@ -201,7 +215,7 @@ See : https://apidocs.chargebee.com/docs/api/invoices#create_an_invoice
|
|
201
215
|
An attribute 'tax_exempt_reason' has been added to line items sub resource in Invoice, Credit Note and Estimate resources.
|
202
216
|
See : https://apidocs.chargebee.com/docs/api/invoices#invoice_attributes
|
203
217
|
|
204
|
-
###v2.2.0 (2016-12-09)
|
218
|
+
### v2.2.0 (2016-12-09)
|
205
219
|
* * *
|
206
220
|
|
207
221
|
** APIs updated**:
|
@@ -229,7 +243,7 @@ See : https://apidocs.chargebee.com/docs/api/plans#create_a_plan
|
|
229
243
|
The input parameters 'transaction_id_at_gateway', 'transaction_status', 'transaction_error_code' and 'transaction_error_text' have been added to Record payment for an invoice API.
|
230
244
|
See : https://apidocs.chargebee.com/docs/api/invoices#record_an_invoice_payment
|
231
245
|
|
232
|
-
###v2.1.9 (2016-11-24)
|
246
|
+
### v2.1.9 (2016-11-24)
|
233
247
|
* * *
|
234
248
|
|
235
249
|
** APIs updated**:
|
@@ -259,7 +273,7 @@ A new endpoint, Import invoice API has been added to Invoice resource.
|
|
259
273
|
See : https://apidocs.chargebee.com/docs/api/invoices#import_invoice
|
260
274
|
|
261
275
|
|
262
|
-
###v2.1.8 (2016-11-18)
|
276
|
+
### v2.1.8 (2016-11-18)
|
263
277
|
* * *
|
264
278
|
|
265
279
|
** APIs updated**:
|
@@ -272,7 +286,7 @@ See : https://apidocs.chargebee.com/docs/api/plans#create_a_plan
|
|
272
286
|
The new cancel reason type 'non_compliant_customer' has been added to the Subscription resource.
|
273
287
|
See : https://apidocs.chargebee.com/docs/api/subscriptions#subscription_attributes
|
274
288
|
|
275
|
-
###v2.1.7 (2016-11-09)
|
289
|
+
### v2.1.7 (2016-11-09)
|
276
290
|
* * *
|
277
291
|
|
278
292
|
** APIs updated**:
|
@@ -301,7 +315,7 @@ The input parameter "net_term_days" is added to Create a Subscription API. See :
|
|
301
315
|
The attributes "net_term_days" and "due_date" is added to the Invoice resource. See : https://apidocs.chargebee.com/docs/api/invoices
|
302
316
|
|
303
317
|
|
304
|
-
###v2.1.6 (2016-10-27)
|
318
|
+
### v2.1.6 (2016-10-27)
|
305
319
|
* * *
|
306
320
|
|
307
321
|
** APIs updated**:
|
@@ -309,7 +323,7 @@ The attributes "net_term_days" and "due_date" is added to the Invoice resource.
|
|
309
323
|
The attribute "preferred_currency_code" is added to Customer and a new input parameter "preferred_currency_code" is added Create Customer and Update Customer API.
|
310
324
|
See : https://apidocs.chargebee.com/docs/api/customers#customer_attributes
|
311
325
|
|
312
|
-
###v2.1.5 (2016-09-30)
|
326
|
+
### v2.1.5 (2016-09-30)
|
313
327
|
* * *
|
314
328
|
|
315
329
|
** APIs updated**:
|
@@ -322,7 +336,7 @@ See : https://apidocs.chargebee.com/docs/api/customers#list_customers
|
|
322
336
|
The new parameter "date" is added to Create Credit Note API.
|
323
337
|
See : https://apidocs.chargebee.com/docs/api/credit_notes#create_credit_note
|
324
338
|
|
325
|
-
###v2.1.4 (2016-09-21)
|
339
|
+
### v2.1.4 (2016-09-21)
|
326
340
|
* * *
|
327
341
|
|
328
342
|
[Pull Request](https://github.com/chargebee/chargebee-ruby/pull/7) have been merged.
|
@@ -331,7 +345,7 @@ See : https://apidocs.chargebee.com/docs/api/credit_notes#create_credit_note
|
|
331
345
|
The new Gateway type "gocardless" for card resource is added. See card attributes
|
332
346
|
See : https://apidocs.chargebee.com/docs/api/cards#card_attributes
|
333
347
|
|
334
|
-
###v2.1.3 (2016-09-03)
|
348
|
+
### v2.1.3 (2016-09-03)
|
335
349
|
* * *
|
336
350
|
** APIs added**:
|
337
351
|
A new endpoint to create Credit Note is added. See : https://apidocs.chargebee.com/docs/api/credit_notes#create_credit_note
|
@@ -342,7 +356,7 @@ A new endpoint to write off Invoice is added. See : https://apidocs.chargebee.co
|
|
342
356
|
The attribute "forward_url" is given as input for Create a Portal Session API.
|
343
357
|
See : https://apidocs.chargebee.com/docs/api/portal_sessions#create_a_portal_session
|
344
358
|
|
345
|
-
###v2.1.2 (2016-08-25)
|
359
|
+
### v2.1.2 (2016-08-25)
|
346
360
|
* * *
|
347
361
|
|
348
362
|
** APIs updated**:
|
@@ -371,7 +385,7 @@ The status "pending_verification" added to Payment Method status.
|
|
371
385
|
See : https://apidocs.chargebee.com/docs/api/customers#customer_attributes
|
372
386
|
|
373
387
|
|
374
|
-
###v2.1.1 (2016-08-02)
|
388
|
+
### v2.1.1 (2016-08-02)
|
375
389
|
* * *
|
376
390
|
** APIs added**:
|
377
391
|
A new endpoint to retrieve Credit Note as PDF. See : https://apidocs.chargebee.com/docs/api/credit_notes#retrieve_credit_note_as_pdf
|
@@ -384,18 +398,18 @@ The filter parameter "paid_at" is added to list invoices and "paid_on_after" is
|
|
384
398
|
|
385
399
|
The filter parameter "occurred_at", "webhook_status", "event_type" is added to list events and parameter "start_time", "end_time", "webhook_status", "event_type" is deprecated. See : https://apidocs.chargebee.com/docs/api/events#list_events
|
386
400
|
|
387
|
-
###v2.1.0 (2016-07-18)
|
401
|
+
### v2.1.0 (2016-07-18)
|
388
402
|
* * *
|
389
403
|
** APIs added**:
|
390
404
|
A new endpoint to remove coupons associated with the subscription is added. See : https://apidocs.chargebee.com/docs/api/subscriptions#remove_coupons
|
391
405
|
A new endpoint to record excess payments for a customer is added. See : https://apidocs.chargebee.com/docs/api/customers#record_an_excess_payment_for_a_customer
|
392
406
|
|
393
|
-
###v2.0.9 (2016-07-06)
|
407
|
+
### v2.0.9 (2016-07-06)
|
394
408
|
* * *
|
395
409
|
** APIs added**:
|
396
410
|
A new endpoint to delete a coupon added. See : https://apidocs.chargebee.com/docs/api/coupons#delete_a_coupon
|
397
411
|
|
398
|
-
###v2.0.8 (2016-07-04)
|
412
|
+
### v2.0.8 (2016-07-04)
|
399
413
|
* * *
|
400
414
|
** APIs updated**:
|
401
415
|
The attribute "currency_code" is added as part of Plans, Addons, Coupons, Subscription, Transaction and Estimate resource.
|
data/README.rdoc
CHANGED
@@ -14,6 +14,11 @@ Install the latest version of the gem with the following command...
|
|
14
14
|
$ sudo gem install chargebee -v '~>2'
|
15
15
|
|
16
16
|
|
17
|
+
== Requirements
|
18
|
+
|
19
|
+
* Ruby 1.9.3 or above.
|
20
|
+
* rest-client
|
21
|
+
|
17
22
|
== Documentation
|
18
23
|
|
19
24
|
For API reference see {here}[https://apidocs.chargebee.com/docs/api?lang=ruby]
|
@@ -22,7 +27,7 @@ For API reference see {here}[https://apidocs.chargebee.com/docs/api?lang=ruby]
|
|
22
27
|
|
23
28
|
To create a new subscription:
|
24
29
|
|
25
|
-
ChargeBee.configure({:api_key => "your_api_key"
|
30
|
+
ChargeBee.configure({:api_key => "your_api_key" , :site => "your_site"})
|
26
31
|
result = ChargeBee::Subscription.create({
|
27
32
|
:id => "sub_KyVqDh__dev__NTn4VZZ1",
|
28
33
|
:plan_id => "basic",
|
data/chargebee.gemspec
CHANGED
@@ -2,10 +2,10 @@ Gem::Specification.new do |s|
|
|
2
2
|
s.specification_version = 2 if s.respond_to? :specification_version=
|
3
3
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
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.2.
|
8
|
-
s.date = '2017-
|
7
|
+
s.version = '2.2.9'
|
8
|
+
s.date = '2017-06-01'
|
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."
|
@@ -21,7 +21,7 @@ Gem::Specification.new do |s|
|
|
21
21
|
s.extra_rdoc_files = %w[README.rdoc LICENSE]
|
22
22
|
|
23
23
|
s.add_dependency('json_pure', '~> 1.5')
|
24
|
-
s.add_dependency('rest-client', '
|
24
|
+
s.add_dependency('rest-client', '>= 1.8', '< 3.0')
|
25
25
|
|
26
26
|
s.add_development_dependency('rspec', '~> 3.0.0')
|
27
27
|
s.add_development_dependency('mocha')
|
data/lib/chargebee.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module ChargeBee
|
2
2
|
class Estimate < Model
|
3
3
|
|
4
|
-
attr_accessor :created_at, :subscription_estimate, :invoice_estimate, :next_invoice_estimate,
|
4
|
+
attr_accessor :created_at, :subscription_estimate, :invoice_estimate, :invoice_estimates, :next_invoice_estimate,
|
5
5
|
:credit_note_estimates, :unbilled_charge_estimates
|
6
6
|
|
7
7
|
# OPERATIONS
|
@@ -20,5 +20,9 @@ module ChargeBee
|
|
20
20
|
Request.send_list_request('get', uri_path("unbilled_charges"), params, env, headers)
|
21
21
|
end
|
22
22
|
|
23
|
+
def self.invoice_now_estimate(params={}, env=nil, headers={})
|
24
|
+
Request.send('post', uri_path("unbilled_charges","invoice_now_estimate"), params, env, headers)
|
25
|
+
end
|
26
|
+
|
23
27
|
end # ~UnbilledCharge
|
24
28
|
end # ~ChargeBee
|
data/lib/chargebee/result.rb
CHANGED
@@ -68,13 +68,15 @@ module ChargeBee
|
|
68
68
|
|
69
69
|
def estimate()
|
70
70
|
estimate = get(:estimate, Estimate, {},
|
71
|
-
{:subscription_estimate => SubscriptionEstimate, :invoice_estimate => InvoiceEstimate, :next_invoice_estimate => InvoiceEstimate, :credit_note_estimates => CreditNoteEstimate, :unbilled_charge_estimates => UnbilledCharge});
|
71
|
+
{:subscription_estimate => SubscriptionEstimate, :invoice_estimate => InvoiceEstimate, :invoice_estimates => InvoiceEstimate, :next_invoice_estimate => InvoiceEstimate, :credit_note_estimates => CreditNoteEstimate, :unbilled_charge_estimates => UnbilledCharge});
|
72
72
|
estimate.init_dependant(@response[:estimate], :subscription_estimate,
|
73
73
|
{:shipping_address => SubscriptionEstimate::ShippingAddress});
|
74
74
|
estimate.init_dependant(@response[:estimate], :invoice_estimate,
|
75
75
|
{:line_items => InvoiceEstimate::LineItem, :discounts => InvoiceEstimate::Discount, :taxes => InvoiceEstimate::Tax, :line_item_taxes => InvoiceEstimate::LineItemTax, :line_item_discounts => InvoiceEstimate::LineItemDiscount});
|
76
76
|
estimate.init_dependant(@response[:estimate], :next_invoice_estimate,
|
77
77
|
{:line_items => InvoiceEstimate::LineItem, :discounts => InvoiceEstimate::Discount, :taxes => InvoiceEstimate::Tax, :line_item_taxes => InvoiceEstimate::LineItemTax, :line_item_discounts => InvoiceEstimate::LineItemDiscount});
|
78
|
+
estimate.init_dependant_list(@response[:estimate], :invoice_estimates,
|
79
|
+
{:line_items => InvoiceEstimate::LineItem, :discounts => InvoiceEstimate::Discount, :taxes => InvoiceEstimate::Tax, :line_item_taxes => InvoiceEstimate::LineItemTax, :line_item_discounts => InvoiceEstimate::LineItemDiscount});
|
78
80
|
estimate.init_dependant_list(@response[:estimate], :credit_note_estimates,
|
79
81
|
{:line_items => CreditNoteEstimate::LineItem, :discounts => CreditNoteEstimate::Discount, :taxes => CreditNoteEstimate::Tax, :line_item_taxes => CreditNoteEstimate::LineItemTax, :line_item_discounts => CreditNoteEstimate::LineItemDiscount});
|
80
82
|
estimate.init_dependant_list(@response[:estimate], :unbilled_charge_estimates,
|
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.2.
|
4
|
+
version: 2.2.9
|
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: 2017-
|
12
|
+
date: 2017-06-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: json_pure
|
@@ -29,16 +29,22 @@ dependencies:
|
|
29
29
|
name: rest-client
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
|
-
- -
|
32
|
+
- - '>='
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: '1.
|
34
|
+
version: '1.8'
|
35
|
+
- - <
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '3.0'
|
35
38
|
type: :runtime
|
36
39
|
prerelease: false
|
37
40
|
version_requirements: !ruby/object:Gem::Requirement
|
38
41
|
requirements:
|
39
|
-
- -
|
42
|
+
- - '>='
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
version: '1.8'
|
45
|
+
- - <
|
40
46
|
- !ruby/object:Gem::Version
|
41
|
-
version: '
|
47
|
+
version: '3.0'
|
42
48
|
- !ruby/object:Gem::Dependency
|
43
49
|
name: rspec
|
44
50
|
requirement: !ruby/object:Gem::Requirement
|
@@ -135,7 +141,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
135
141
|
requirements:
|
136
142
|
- - '>='
|
137
143
|
- !ruby/object:Gem::Version
|
138
|
-
version:
|
144
|
+
version: 1.9.3
|
139
145
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
140
146
|
requirements:
|
141
147
|
- - '>='
|