recurly 2.8.0.rc3 → 2.8.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of recurly might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/README.md +3 -1
- data/lib/recurly/account.rb +5 -0
- data/lib/recurly/billing_info.rb +1 -0
- data/lib/recurly/coupon.rb +1 -0
- data/lib/recurly/invoice.rb +13 -0
- data/lib/recurly/resource.rb +4 -2
- data/lib/recurly/subscription.rb +2 -0
- data/lib/recurly/transaction.rb +4 -0
- data/lib/recurly/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0c26a4ee0410a6a2dccbb5ee6841c45ee6bb21fb
|
4
|
+
data.tar.gz: 9c67f455ce8b93cbaca306a2e379d6d666280f06
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6c5a5cd87e4110aa3d860392a2d01421ca60d6e72c2c9ffedb7daf9583046bb3bda54131b4d73a78fb5fd392811244c5ce4de247e759d0ae025cd3e2689b5969
|
7
|
+
data.tar.gz: f2525658444ab89c9d74d74bcc09bb19ca98f66773b8f1e1f64136224ea5252b017541041412d117da9a6c969559aecb5d0cb3e38e3a0c2adcd77f0fb417fdbe
|
data/README.md
CHANGED
@@ -5,6 +5,8 @@
|
|
5
5
|
[Recurly](https://recurly.com/)'s Ruby client library is an interface to its
|
6
6
|
[REST API](https://dev.recurly.com/docs/getting-started).
|
7
7
|
|
8
|
+
You can also look at [rubydocs](http://www.rubydoc.info/github/recurly/recurly-client-ruby/master)
|
9
|
+
to see documentation on the classes and methods available.
|
8
10
|
|
9
11
|
## Installation
|
10
12
|
|
@@ -12,7 +14,7 @@ Recurly is packaged as a Ruby gem. We recommend you install it with
|
|
12
14
|
[Bundler](http://gembundler.com/) by adding the following line to your Gemfile:
|
13
15
|
|
14
16
|
``` ruby
|
15
|
-
gem 'recurly', '~> 2.
|
17
|
+
gem 'recurly', '~> 2.8.0'
|
16
18
|
```
|
17
19
|
|
18
20
|
Recurly will automatically use [Nokogiri](http://nokogiri.org/) (for a nice
|
data/lib/recurly/account.rb
CHANGED
data/lib/recurly/billing_info.rb
CHANGED
@@ -26,6 +26,7 @@ module Recurly
|
|
26
26
|
token_id
|
27
27
|
currency
|
28
28
|
geo_code
|
29
|
+
updated_at
|
29
30
|
) | CREDIT_CARD_ATTRIBUTES | BANK_ACCOUNT_ATTRIBUTES | AMAZON_ATTRIBUTES | PAYPAL_ATTRIBUTES | ROKU_ATTRIBUTES
|
30
31
|
|
31
32
|
# @return ["credit_card", "paypal", "amazon", "bank_account", "roku", nil] The type of billing info.
|
data/lib/recurly/coupon.rb
CHANGED
data/lib/recurly/invoice.rb
CHANGED
@@ -66,6 +66,9 @@ module Recurly
|
|
66
66
|
tax_types
|
67
67
|
refund_tax_date
|
68
68
|
refund_geo_code
|
69
|
+
subtotal_after_discount_in_cents
|
70
|
+
attempt_next_collection_at
|
71
|
+
recovery_reason
|
69
72
|
)
|
70
73
|
alias to_param invoice_number_with_prefix
|
71
74
|
|
@@ -94,6 +97,16 @@ module Recurly
|
|
94
97
|
true
|
95
98
|
end
|
96
99
|
|
100
|
+
# Initiate a collection attempt on an invoice.
|
101
|
+
#
|
102
|
+
# @return [true, false] +true+ when successful, +false+ when unable to
|
103
|
+
# (e.g., the invoice has already been collected, a collection attempt was already made)
|
104
|
+
def force_collect
|
105
|
+
return false unless link? :force_collect
|
106
|
+
reload follow_link :force_collect
|
107
|
+
true
|
108
|
+
end
|
109
|
+
|
97
110
|
def enter_offline_payment(attrs={})
|
98
111
|
Transaction.from_response API.post("#{uri}/transactions", attrs.empty? ? nil : Transaction.to_xml(attrs))
|
99
112
|
rescue Recurly::API::UnprocessableEntity => e
|
data/lib/recurly/resource.rb
CHANGED
@@ -332,8 +332,7 @@ module Recurly
|
|
332
332
|
# for subscriptions use uuid
|
333
333
|
# for transactions use uuid
|
334
334
|
def find(uuid, options = {})
|
335
|
-
if uuid.nil?
|
336
|
-
# Should we raise an ArgumentError, instead?
|
335
|
+
if uuid.nil? || uuid.to_s.empty?
|
337
336
|
raise NotFound, "can't find a record with nil identifier"
|
338
337
|
end
|
339
338
|
|
@@ -412,6 +411,9 @@ module Recurly
|
|
412
411
|
end
|
413
412
|
|
414
413
|
xml.each_element do |el|
|
414
|
+
# skip this element if it's an xml comment
|
415
|
+
next if defined?(Nokogiri::XML::Node::TEXT_NODE) && el.is_a?(Nokogiri::XML::Comment)
|
416
|
+
|
415
417
|
if el.name == 'a'
|
416
418
|
record.links[el.attribute('name').value] = {
|
417
419
|
:method => el.attribute('method').to_s,
|
data/lib/recurly/subscription.rb
CHANGED
data/lib/recurly/transaction.rb
CHANGED
data/lib/recurly/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: recurly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.8.0
|
4
|
+
version: 2.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Recurly
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-03-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -233,12 +233,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
233
233
|
version: 1.9.3
|
234
234
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
235
235
|
requirements:
|
236
|
-
- - "
|
236
|
+
- - ">="
|
237
237
|
- !ruby/object:Gem::Version
|
238
|
-
version:
|
238
|
+
version: '0'
|
239
239
|
requirements: []
|
240
240
|
rubyforge_project:
|
241
|
-
rubygems_version: 2.
|
241
|
+
rubygems_version: 2.5.1
|
242
242
|
signing_key:
|
243
243
|
specification_version: 4
|
244
244
|
summary: Recurly API Client
|