recurly 2.11.4 → 2.12.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/api.rb +1 -1
- data/lib/recurly/billing_info.rb +1 -0
- data/lib/recurly/invoice.rb +0 -3
- data/lib/recurly/purchase.rb +21 -8
- data/lib/recurly/transaction.rb +0 -2
- 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: 30039336af3791ec6be7d1558b24c2b473905847
|
4
|
+
data.tar.gz: c10ff1cda98c646bb3c1412f4168a218ba4b2b03
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e2590f4f92aed783303979a9e7a78c7f671a9987c24721f0ff80544cb23e85f77168adfc35263f95247873c4fa76ff07405741650a7adb24075e0d7424175cd
|
7
|
+
data.tar.gz: 483cfeb2fe5d42b7465c4acbcae83532697166ae4d1624ba7fa3c8321228cc9a5c15784321def41a60a6a39911e137e27a6dd7ad68abea0b4ec636c67f634600
|
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.12.0'
|
18
18
|
```
|
19
19
|
|
20
20
|
Recurly will automatically use [Nokogiri](http://nokogiri.org/) (for a nice
|
data/lib/recurly.rb
CHANGED
@@ -87,8 +87,6 @@ module Recurly
|
|
87
87
|
end
|
88
88
|
|
89
89
|
# Assigns a logger to log requests/responses and more.
|
90
|
-
# The logger can only be set if the environment variable
|
91
|
-
# `RECURLY_INSECURE_DEBUG` equals `true`.
|
92
90
|
#
|
93
91
|
# @return [Logger, nil]
|
94
92
|
# @example
|
@@ -100,22 +98,6 @@ module Recurly
|
|
100
98
|
# Recurly.logger = nil # Or Recurly.logger = Logger.new nil
|
101
99
|
attr_accessor :logger
|
102
100
|
|
103
|
-
def logger=(logger)
|
104
|
-
if ENV['RECURLY_INSECURE_DEBUG'].to_s.downcase == 'true'
|
105
|
-
@logger = logger
|
106
|
-
puts <<-MSG
|
107
|
-
[WARNING] Recurly logger enabled. The logger has the potential to leak
|
108
|
-
PII and should never be used in production environments.
|
109
|
-
MSG
|
110
|
-
else
|
111
|
-
puts <<-MSG
|
112
|
-
[WARNING] Recurly logger has been disabled. If you wish to use it,
|
113
|
-
only do so in a non-production environment and make sure
|
114
|
-
the `RECURLY_INSECURE_DEBUG` environment variable is set to `true`.
|
115
|
-
MSG
|
116
|
-
end
|
117
|
-
end
|
118
|
-
|
119
101
|
# Convenience logging method includes a Logger#progname dynamically.
|
120
102
|
# @return [true, nil]
|
121
103
|
def log level, message
|
data/lib/recurly/api.rb
CHANGED
data/lib/recurly/billing_info.rb
CHANGED
@@ -30,6 +30,7 @@ module Recurly
|
|
30
30
|
currency
|
31
31
|
geo_code
|
32
32
|
updated_at
|
33
|
+
external_hpp_type
|
33
34
|
) | CREDIT_CARD_ATTRIBUTES | BANK_ACCOUNT_ATTRIBUTES | AMAZON_ATTRIBUTES | PAYPAL_ATTRIBUTES | ROKU_ATTRIBUTES
|
34
35
|
|
35
36
|
# @return ["credit_card", "paypal", "amazon", "bank_account", "roku", nil] The type of billing info.
|
data/lib/recurly/invoice.rb
CHANGED
data/lib/recurly/purchase.rb
CHANGED
@@ -102,12 +102,12 @@ module Recurly
|
|
102
102
|
|
103
103
|
class << self
|
104
104
|
|
105
|
-
# Generate an invoice for the purchase and run any needed transactions
|
105
|
+
# Generate an invoice for the purchase and run any needed transactions.
|
106
106
|
#
|
107
|
-
# @param purchase [Purchase] The purchase data for the request
|
108
|
-
# @return [Invoice] The
|
109
|
-
# @raise [Invalid] Raised if the
|
110
|
-
# @raise [Transaction::Error] Raised if the transaction failed
|
107
|
+
# @param purchase [Purchase] The purchase data for the request.
|
108
|
+
# @return [Invoice] The saved invoice representing this purchase.
|
109
|
+
# @raise [Invalid] Raised if the purchase cannot be invoiced.
|
110
|
+
# @raise [Transaction::Error] Raised if the transaction failed.
|
111
111
|
def invoice!(purchase)
|
112
112
|
post(purchase, collection_path)
|
113
113
|
end
|
@@ -115,13 +115,26 @@ module Recurly
|
|
115
115
|
# Generate a preview invoice for the purchase. Runs validations
|
116
116
|
# but does not run any transactions.
|
117
117
|
#
|
118
|
-
# @param purchase [Purchase] The purchase data for the request
|
119
|
-
# @return [Invoice] The
|
120
|
-
# @raise [Invalid] Raised if the
|
118
|
+
# @param purchase [Purchase] The purchase data for the request.
|
119
|
+
# @return [Invoice] The preview invoice representing this purchase.
|
120
|
+
# @raise [Invalid] Raised if the purchase cannot be invoiced.
|
121
121
|
def preview!(purchase)
|
122
122
|
post(purchase, "#{collection_path}/preview")
|
123
123
|
end
|
124
124
|
|
125
|
+
# Generate an authorized invoice for the purchase. Runs validations
|
126
|
+
# but does not run any transactions. This endpoint will create a
|
127
|
+
# pending purchase that can be activated at a later time once payment
|
128
|
+
# has been completed on an external source (e.g. Adyen's Hosted
|
129
|
+
# Payment Pages).
|
130
|
+
#
|
131
|
+
# @param purchase [Purchase] The purchase data for the request.
|
132
|
+
# @return [Invoice] The authorized invoice representing this purchase.
|
133
|
+
# @raise [Invalid] Raised if the purchase cannot be invoiced.
|
134
|
+
def authorize!(purchase)
|
135
|
+
post(purchase, "#{collection_path}/authorize")
|
136
|
+
end
|
137
|
+
|
125
138
|
def post(purchase, path)
|
126
139
|
response = API.send(:post, path, purchase.to_xml)
|
127
140
|
Invoice.from_response(response)
|
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.
|
4
|
+
version: 2.12.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Recurly
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-11-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -238,7 +238,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
238
238
|
version: '0'
|
239
239
|
requirements: []
|
240
240
|
rubyforge_project:
|
241
|
-
rubygems_version: 2.
|
241
|
+
rubygems_version: 2.6.13
|
242
242
|
signing_key:
|
243
243
|
specification_version: 4
|
244
244
|
summary: Recurly API Client
|