recurly 2.12.0 → 2.12.1.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/recurly/account.rb +33 -0
- data/lib/recurly/api.rb +1 -1
- data/lib/recurly/version.rb +2 -2
- 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: ca08301a4de4b1634bafdc6b74fe9fb4b4dd9020
|
4
|
+
data.tar.gz: 767132c70068e70f0eacbf0c2607418742ab8861
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e277228c9d69c94741be85ca5c6f222c74ace20a02171e632ee7b56a3696a838f63bf1b51740530026dc731dd89cba777f31eaaaaf1f630942aef87579e12a97
|
7
|
+
data.tar.gz: afffb1d50d427d96fbd41ea0ff0ad27e6b355ac1fe1abc8735d08148179b6c69970d1153e35117fb437f10031c254a8b7cefd6aa5f035083c7bd3b24f4627c8a
|
data/lib/recurly/account.rb
CHANGED
@@ -106,6 +106,39 @@ module Recurly
|
|
106
106
|
true
|
107
107
|
end
|
108
108
|
|
109
|
+
# Verify a cvv code for the account's billing info.
|
110
|
+
#
|
111
|
+
# @example
|
112
|
+
# acct = Recurly::Account.find('benjamin-du-monde')
|
113
|
+
# begin
|
114
|
+
# # If successful, returned billing_info will contain
|
115
|
+
# # updated billing info details.
|
116
|
+
# billing_info = acct.verify_cvv!("504")
|
117
|
+
# rescue Recurly::API::BadRequest => e
|
118
|
+
# e.message # => "This credit card has too many cvv check attempts."
|
119
|
+
# rescue Recurly::Transaction::Error => e
|
120
|
+
# # this will be the errors coming back from gateway
|
121
|
+
# e.transaction_error_code # => "fraud_security_code"
|
122
|
+
# e.gateway_error_code # => "fraud"
|
123
|
+
# rescue Recurly::Resource::Invalid => e
|
124
|
+
# e.message # => "verification_value must be three digits"
|
125
|
+
# end
|
126
|
+
#
|
127
|
+
# @param [String] verification_value The CVV code to check
|
128
|
+
# @return [BillingInfo] The updated billing info
|
129
|
+
# @raise [Recurly::Transaction::Error] A Transaction Error will be raised if the gateway declines
|
130
|
+
# the cvv code.
|
131
|
+
# @raise [API::BadRequest] A BadRequest error will be raised if you attempt to check too many times
|
132
|
+
# and are locked out.
|
133
|
+
# @raise [Resource::Invalid] An Invalid Error will be raised if you send an invalid request (such as
|
134
|
+
# a value that is not a propert verification number).
|
135
|
+
def verify_cvv!(verification_value)
|
136
|
+
bi = BillingInfo.new(verification_value: verification_value)
|
137
|
+
bi.uri = "#{path}/billing_info/verify_cvv"
|
138
|
+
bi.save!
|
139
|
+
bi
|
140
|
+
end
|
141
|
+
|
109
142
|
def changed_attributes
|
110
143
|
attrs = super
|
111
144
|
if address.respond_to?(:changed?) && address.changed?
|
data/lib/recurly/api.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.12.
|
4
|
+
version: 2.12.1.rc1
|
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-12-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: 1.3.1
|
239
239
|
requirements: []
|
240
240
|
rubyforge_project:
|
241
|
-
rubygems_version: 2.6.
|
241
|
+
rubygems_version: 2.6.8
|
242
242
|
signing_key:
|
243
243
|
specification_version: 4
|
244
244
|
summary: Recurly API Client
|