recurly 2.13.1 → 2.14.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +1 -1
- data/lib/recurly.rb +0 -18
- data/lib/recurly/invoice.rb +6 -3
- data/lib/recurly/subscription.rb +3 -0
- data/lib/recurly/version.rb +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: e5d927750a6f80afe7369fa8acd53d89caf15197
|
4
|
+
data.tar.gz: 4dc7825dd15b4be75074eff6ccbb641b195a19ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed533f915f2963c3b621cf89b54023500c42f5a1d0ea68e64e230119f8e8f66b1b786a2353070d2294aebba34caee43163dbaab28ca72587ea1108c744f05bee
|
7
|
+
data.tar.gz: 1b2cdcb562a7ad3294c3eef8435e60f3cf14f3c2b19fd52ea2459609ffc00c4d8417e55f2983504d4ed559e4b51784e7e4b1c322ef3080746f9f6190941430f5
|
data/README.md
CHANGED
@@ -14,7 +14,7 @@ Recurly is packaged as a Ruby gem. We recommend you install it with
|
|
14
14
|
[Bundler](http://gembundler.com/) by adding the following line to your Gemfile:
|
15
15
|
|
16
16
|
``` ruby
|
17
|
-
gem 'recurly', '~> 2.
|
17
|
+
gem 'recurly', '~> 2.14.0'
|
18
18
|
```
|
19
19
|
|
20
20
|
Recurly will automatically use [Nokogiri](http://nokogiri.org/) (for a nice
|
data/lib/recurly.rb
CHANGED
@@ -89,8 +89,6 @@ module Recurly
|
|
89
89
|
end
|
90
90
|
|
91
91
|
# Assigns a logger to log requests/responses and more.
|
92
|
-
# The logger can only be set if the environment variable
|
93
|
-
# `RECURLY_INSECURE_DEBUG` equals `true`.
|
94
92
|
#
|
95
93
|
# @return [Logger, nil]
|
96
94
|
# @example
|
@@ -102,22 +100,6 @@ module Recurly
|
|
102
100
|
# Recurly.logger = nil # Or Recurly.logger = Logger.new nil
|
103
101
|
attr_accessor :logger
|
104
102
|
|
105
|
-
def logger=(logger)
|
106
|
-
if ENV['RECURLY_INSECURE_DEBUG'].to_s.downcase == 'true'
|
107
|
-
@logger = logger
|
108
|
-
puts <<-MSG
|
109
|
-
[WARNING] Recurly logger enabled. The logger has the potential to leak
|
110
|
-
PII and should never be used in production environments.
|
111
|
-
MSG
|
112
|
-
else
|
113
|
-
puts <<-MSG
|
114
|
-
[WARNING] Recurly logger has been disabled. If you wish to use it,
|
115
|
-
only do so in a non-production environment and make sure
|
116
|
-
the `RECURLY_INSECURE_DEBUG` environment variable is set to `true`.
|
117
|
-
MSG
|
118
|
-
end
|
119
|
-
end
|
120
|
-
|
121
103
|
# Convenience logging method includes a Logger#progname dynamically.
|
122
104
|
# @return [true, nil]
|
123
105
|
def log level, message
|
data/lib/recurly/invoice.rb
CHANGED
@@ -115,13 +115,16 @@ module Recurly
|
|
115
115
|
end
|
116
116
|
|
117
117
|
# Marks an invoice as failing collection.
|
118
|
+
# Returns a new {InvoiceCollection} and does not
|
119
|
+
# reload this invoice.
|
118
120
|
#
|
119
|
-
# @return [
|
121
|
+
# @return [InvoiceCollection, false] InvoiceCollection when successful, +false+ when unable to
|
120
122
|
# (e.g., the invoice is no longer open).
|
121
123
|
def mark_failed
|
122
124
|
return false unless link? :mark_failed
|
123
|
-
|
124
|
-
|
125
|
+
InvoiceCollection.from_response follow_link(:mark_failed)
|
126
|
+
rescue Recurly::API::UnprocessableEntity => e
|
127
|
+
raise Invalid, e.message
|
125
128
|
end
|
126
129
|
|
127
130
|
# Initiate a collection attempt on an invoice.
|
data/lib/recurly/subscription.rb
CHANGED
@@ -35,6 +35,9 @@ module Recurly
|
|
35
35
|
# @return [ShippingAddress, nil]
|
36
36
|
has_one :shipping_address, class_name: :ShippingAddress, readonly: false
|
37
37
|
|
38
|
+
# @return [InvoiceCollection, nil]
|
39
|
+
has_one :invoice_collection, class_name: :InvoiceCollection, readonly: true
|
40
|
+
|
38
41
|
define_attribute_methods %w(
|
39
42
|
uuid
|
40
43
|
state
|
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.
|
4
|
+
version: 2.14.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Recurly
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-02-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -255,7 +255,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
255
255
|
version: '0'
|
256
256
|
requirements: []
|
257
257
|
rubyforge_project:
|
258
|
-
rubygems_version: 2.
|
258
|
+
rubygems_version: 2.6.13
|
259
259
|
signing_key:
|
260
260
|
specification_version: 4
|
261
261
|
summary: Recurly API Client
|