recurly 2.12.0 → 2.12.1.rc1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 30039336af3791ec6be7d1558b24c2b473905847
4
- data.tar.gz: c10ff1cda98c646bb3c1412f4168a218ba4b2b03
3
+ metadata.gz: ca08301a4de4b1634bafdc6b74fe9fb4b4dd9020
4
+ data.tar.gz: 767132c70068e70f0eacbf0c2607418742ab8861
5
5
  SHA512:
6
- metadata.gz: 6e2590f4f92aed783303979a9e7a78c7f671a9987c24721f0ff80544cb23e85f77168adfc35263f95247873c4fa76ff07405741650a7adb24075e0d7424175cd
7
- data.tar.gz: 483cfeb2fe5d42b7465c4acbcae83532697166ae4d1624ba7fa3c8321228cc9a5c15784321def41a60a6a39911e137e27a6dd7ad68abea0b4ec636c67f634600
6
+ metadata.gz: e277228c9d69c94741be85ca5c6f222c74ace20a02171e632ee7b56a3696a838f63bf1b51740530026dc731dd89cba777f31eaaaaf1f630942aef87579e12a97
7
+ data.tar.gz: afffb1d50d427d96fbd41ea0ff0ad27e6b355ac1fe1abc8735d08148179b6c69970d1153e35117fb437f10031c254a8b7cefd6aa5f035083c7bd3b24f4627c8a
@@ -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
@@ -17,7 +17,7 @@ module Recurly
17
17
  @@base_uri = "https://api.recurly.com/v2/"
18
18
  @@valid_domains = [".recurly.com"]
19
19
 
20
- RECURLY_API_VERSION = '2.9'
20
+ RECURLY_API_VERSION = '2.10'
21
21
 
22
22
  FORMATS = Helper.hash_with_indifferent_read_access(
23
23
  'pdf' => 'application/pdf',
@@ -2,8 +2,8 @@ module Recurly
2
2
  module Version
3
3
  MAJOR = 2
4
4
  MINOR = 12
5
- PATCH = 0
6
- PRE = nil
5
+ PATCH = 1
6
+ PRE = 'rc1'
7
7
 
8
8
  VERSION = [MAJOR, MINOR, PATCH, PRE].compact.join('.').freeze
9
9
 
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.0
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-20 00:00:00.000000000 Z
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: '0'
238
+ version: 1.3.1
239
239
  requirements: []
240
240
  rubyforge_project:
241
- rubygems_version: 2.6.13
241
+ rubygems_version: 2.6.8
242
242
  signing_key:
243
243
  specification_version: 4
244
244
  summary: Recurly API Client