recurly 2.18.13 → 2.18.18

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3082ab34c9230a6e05cde1c4ec775ed0282ef33dda4e40b71c0b8390f871b649
4
- data.tar.gz: f813d757a646978eb1c53f2264f01cc32ce368ec783a615786d3888a3a052505
3
+ metadata.gz: 264bf46b7496932acda139212a0e9a9614703b1fc700877680b15c2413d3a82b
4
+ data.tar.gz: 767d32e7db149b8c79781268025f4fc178c1328d8ec13aa71141dd83b1678c9c
5
5
  SHA512:
6
- metadata.gz: 1876031b13b2459bb6477ef5970b59c84fa4476b7359dcf494fe95f2cce546fe1e71f2851dae7af2d94c6f4b701e11c5a34a630aba7b6f07458f926c36084cb4
7
- data.tar.gz: 183b86f9f909569637630f278c94cf7c98f9b185fb08f7568c534c0f8b0bb1b6e4b73a9e0a15254bc06f17e56f38a3721395890ea952cede9cfc207be12dd1a3
6
+ metadata.gz: be98eb8d85bd4dbf0f12535d8d92fd826148c460066e637bf7d67ea13b8ae53301fc84a118b9c5461f3aee334ad1bbd92b1d59868259ccd1d599ac5453bbb13d
7
+ data.tar.gz: 1aa9e3db000d6aa8275b0b1d48dde1bb3b5f6c6d2272e3a88e55ac7c39a4898b8cb25f5341505eb585b5dc5b48f84ceb5464186faed6bd62ee3aec12acaa2b7f
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.18.13'
17
+ gem 'recurly', '~> 2.18.18'
18
18
  ```
19
19
 
20
20
  Recurly will automatically use [Nokogiri](http://nokogiri.org/) (for a nice
@@ -40,6 +40,7 @@ module Recurly
40
40
  require 'recurly/gift_card'
41
41
  require 'recurly/purchase'
42
42
  require 'recurly/webhook'
43
+ require 'recurly/verify'
43
44
  require 'recurly/tier'
44
45
 
45
46
  @subdomain = nil
@@ -9,6 +9,7 @@ module Recurly
9
9
  add_on_code
10
10
  item_code
11
11
  name
12
+ item_state
12
13
  accounting_code
13
14
  default_quantity
14
15
  unit_amount_in_cents
@@ -23,6 +24,7 @@ module Recurly
23
24
  created_at
24
25
  updated_at
25
26
  tier_type
27
+ external_sku
26
28
  avalara_service_type
27
29
  avalara_transaction_type
28
30
  )
@@ -18,7 +18,7 @@ module Recurly
18
18
  @@base_uri = "https://api.recurly.com/v2/"
19
19
  @@valid_domains = [".recurly.com"]
20
20
 
21
- RECURLY_API_VERSION = '2.28'
21
+ RECURLY_API_VERSION = '2.29'
22
22
 
23
23
  FORMATS = Helper.hash_with_indifferent_read_access(
24
24
  'pdf' => 'application/pdf',
@@ -8,7 +8,7 @@ module Recurly
8
8
  AMAZON_ATTRIBUTES = %w(amazon_billing_agreement_id amazon_region).freeze
9
9
  PAYPAL_ATTRIBUTES = %w(paypal_billing_agreement_id).freeze
10
10
  ROKU_ATTRIBUTES = %w(roku_billing_agreement_id last_four).freeze
11
- SEPA_ATTRIBUTES = %w(iban).freeze
11
+ SEPA_ATTRIBUTES = %w(iban last_two).freeze
12
12
  BACS_ATTRIBUTES = %w(account_number sort_code type).freeze
13
13
  BECS_ATTRIBUTES = %w(account_number bsb_code type).freeze
14
14
 
@@ -40,8 +40,19 @@ module Recurly
40
40
  three_d_secure_action_result_token_id
41
41
  transaction_type
42
42
  mandate_reference
43
+ tax_identifier
44
+ tax_identifier_type
43
45
  ) | CREDIT_CARD_ATTRIBUTES | BANK_ACCOUNT_ATTRIBUTES | AMAZON_ATTRIBUTES | PAYPAL_ATTRIBUTES | ROKU_ATTRIBUTES | SEPA_ATTRIBUTES | BACS_ATTRIBUTES | BECS_ATTRIBUTES
44
46
 
47
+ # Verify an account's stored billing info
48
+ #
49
+ # @param [Hash] gateway_code (optional) is the code for the gateway to use for verification. If unspecified, a gateway will be selected using the normal rules.
50
+ # @return [Transaction]
51
+ # @raise [Invalid] Raise if the account's billing info cannot be verified
52
+ def verify(attrs = {})
53
+ Transaction.from_response API.post("#{path}/verify", attrs.empty? ? nil : Verify.to_xml(attrs))
54
+ end
55
+
45
56
  # @return [String]
46
57
  def inspect
47
58
  attributes = self.class.attribute_names
@@ -46,6 +46,8 @@ module Recurly
46
46
  unique_template_code
47
47
  free_trial_amount
48
48
  free_trial_unit
49
+ applies_to_all_items
50
+ item_codes
49
51
  )
50
52
  alias to_param coupon_code
51
53
 
@@ -203,6 +203,9 @@ module Recurly
203
203
  self.class.from_response(
204
204
  follow_link :refund, :body => refund_line_items_to_xml(line_items, refund_method, options)
205
205
  )
206
+ rescue Recurly::API::UnprocessableEntity => e
207
+ Transaction::Error.validate! e, (self if is_a?(Transaction))
208
+ raise
206
209
  end
207
210
 
208
211
  # Refunds the invoice for a specific amount.
@@ -0,0 +1,12 @@
1
+ module Recurly
2
+ class Verify < Resource
3
+ define_attribute_methods %w(
4
+ gateway_code
5
+ )
6
+
7
+ def self.to_xml(attrs)
8
+ verify = new attrs
9
+ verify.to_xml
10
+ end
11
+ end
12
+ end
@@ -1,6 +1,6 @@
1
1
  module Recurly
2
2
  module Version
3
- VERSION = "2.18.13"
3
+ VERSION = "2.18.18"
4
4
 
5
5
  class << self
6
6
  def inspect
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.18.13
4
+ version: 2.18.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Recurly
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-14 00:00:00.000000000 Z
11
+ date: 2020-11-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -253,6 +253,7 @@ files:
253
253
  - lib/recurly/transaction.rb
254
254
  - lib/recurly/transaction/errors.rb
255
255
  - lib/recurly/usage.rb
256
+ - lib/recurly/verify.rb
256
257
  - lib/recurly/version.rb
257
258
  - lib/recurly/webhook.rb
258
259
  - lib/recurly/webhook/account_notification.rb
@@ -331,7 +332,7 @@ homepage: https://github.com/recurly/recurly-client-ruby
331
332
  licenses:
332
333
  - MIT
333
334
  metadata: {}
334
- post_install_message:
335
+ post_install_message:
335
336
  rdoc_options:
336
337
  - "--main"
337
338
  - README.md
@@ -349,7 +350,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
349
350
  version: '0'
350
351
  requirements: []
351
352
  rubygems_version: 3.0.3
352
- signing_key:
353
+ signing_key:
353
354
  specification_version: 4
354
355
  summary: Recurly API Client
355
356
  test_files: []