recurly 2.18.7 → 2.18.8

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: bfc1b1631c0eff809f13744b592123e8f4e05b171ae9f8315532878ca54d693b
4
- data.tar.gz: 36f192d5fc2a23529acd0aea8f734a8a5e3b9913a079423eb8e6e11a8c4bd001
3
+ metadata.gz: eb193b463e44579e6acb5dd39eadefea0f9294de9a3bb1be484fb75f167ce4d6
4
+ data.tar.gz: 0fa9c10e470b143e646695c52e5071104e1e419532db0874de4fc523136f4470
5
5
  SHA512:
6
- metadata.gz: ab2406a05aa914d27d05638fc52956295da64aba4f1b3e065f06312d478aeec1d080a0741490f6f283ad7cd9f6e12be804312756ef693fde6d3ea25f46569474
7
- data.tar.gz: 97916a77c38c1dbf1308971f1ef021e32266c8c6981945c4764cf09e90c2a6a11bf61d6361ca0df2332426acfc5b3305c2c73e1ae1c4bf9aeba5fb6904ee4875
6
+ metadata.gz: 61495efe7cbe8592c8fc6b6e16484ef6ee1234b9c74e17cb703ad2c306c6b0b68b0ec03218c41cfd1bb7f25976aa3b6988f409419d0c94d0c503c24a972c6ca5
7
+ data.tar.gz: a0a0000c8eda507308a6553cd119bcdd9bbda67e47648068992fc14106bf21220c2bb447eecb9cf88d8bdb2594d5880ef529cab0a181a430a486a9bb40cc9b0d
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.7'
17
+ gem 'recurly', '~> 2.18.8'
18
18
  ```
19
19
 
20
20
  Recurly will automatically use [Nokogiri](http://nokogiri.org/) (for a nice
@@ -5,6 +5,7 @@ module Recurly
5
5
 
6
6
  define_attribute_methods %w(
7
7
  add_on_code
8
+ item_code
8
9
  name
9
10
  accounting_code
10
11
  default_quantity
@@ -19,6 +20,8 @@ module Recurly
19
20
  revenue_schedule_type
20
21
  created_at
21
22
  updated_at
23
+ tier_type
24
+ tiers
22
25
  )
23
26
  alias to_param add_on_code
24
27
  alias quantity default_quantity
data/lib/recurly/api.rb CHANGED
@@ -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.25'
21
+ RECURLY_API_VERSION = '2.26'
22
22
 
23
23
  FORMATS = Helper.hash_with_indifferent_read_access(
24
24
  'pdf' => 'application/pdf',
@@ -8,6 +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
12
 
12
13
  # @return [Account]
13
14
  belongs_to :account
@@ -36,9 +37,11 @@ module Recurly
36
37
  fraud_session_id
37
38
  three_d_secure_action_result_token_id
38
39
  transaction_type
39
- ) | CREDIT_CARD_ATTRIBUTES | BANK_ACCOUNT_ATTRIBUTES | AMAZON_ATTRIBUTES | PAYPAL_ATTRIBUTES | ROKU_ATTRIBUTES
40
+ iban
41
+ mandate_reference
42
+ ) | CREDIT_CARD_ATTRIBUTES | BANK_ACCOUNT_ATTRIBUTES | AMAZON_ATTRIBUTES | PAYPAL_ATTRIBUTES | ROKU_ATTRIBUTES | SEPA_ATTRIBUTES
40
43
 
41
- # @return ["credit_card", "paypal", "amazon", "bank_account", "roku", nil] The type of billing info.
44
+ # @return ["credit_card", "paypal", "amazon", "bank_account", "roku", "sepa", nil] The type of billing info.
42
45
  attr_reader :type
43
46
 
44
47
  # @return [String]
@@ -46,18 +49,21 @@ module Recurly
46
49
  attributes = self.class.attribute_names
47
50
  case type
48
51
  when 'credit_card'
49
- attributes -= (AMAZON_ATTRIBUTES + PAYPAL_ATTRIBUTES + BANK_ACCOUNT_ATTRIBUTES + ROKU_ATTRIBUTES)
52
+ attributes -= (AMAZON_ATTRIBUTES + PAYPAL_ATTRIBUTES + BANK_ACCOUNT_ATTRIBUTES + ROKU_ATTRIBUTES + SEPA_ATTRIBUTES)
50
53
  attributes |= CREDIT_CARD_ATTRIBUTES
51
54
  when 'paypal'
52
- attributes -= (CREDIT_CARD_ATTRIBUTES | BANK_ACCOUNT_ATTRIBUTES + AMAZON_ATTRIBUTES + ROKU_ATTRIBUTES)
55
+ attributes -= (CREDIT_CARD_ATTRIBUTES | BANK_ACCOUNT_ATTRIBUTES + AMAZON_ATTRIBUTES + ROKU_ATTRIBUTES + SEPA_ATTRIBUTES)
53
56
  when 'amazon'
54
- attributes -= (CREDIT_CARD_ATTRIBUTES | BANK_ACCOUNT_ATTRIBUTES + PAYPAL_ATTRIBUTES + ROKU_ATTRIBUTES)
57
+ attributes -= (CREDIT_CARD_ATTRIBUTES | BANK_ACCOUNT_ATTRIBUTES + PAYPAL_ATTRIBUTES + ROKU_ATTRIBUTES + SEPA_ATTRIBUTES)
55
58
  when 'bank_account'
56
- attributes -= (CREDIT_CARD_ATTRIBUTES + PAYPAL_ATTRIBUTES + AMAZON_ATTRIBUTES + ROKU_ATTRIBUTES)
59
+ attributes -= (CREDIT_CARD_ATTRIBUTES + PAYPAL_ATTRIBUTES + AMAZON_ATTRIBUTES + ROKU_ATTRIBUTES + SEPA_ATTRIBUTES)
57
60
  attributes |= BANK_ACCOUNT_ATTRIBUTES
58
61
  when 'roku'
59
- attributes -= (CREDIT_CARD_ATTRIBUTES + PAYPAL_ATTRIBUTES + AMAZON_ATTRIBUTES + BANK_ACCOUNT_ATTRIBUTES)
62
+ attributes -= (CREDIT_CARD_ATTRIBUTES + PAYPAL_ATTRIBUTES + AMAZON_ATTRIBUTES + BANK_ACCOUNT_ATTRIBUTES + SEPA_ATTRIBUTES)
60
63
  attributes |= ROKU_ATTRIBUTES
64
+ when 'sepa'
65
+ attributes -= (CREDIT_CARD_ATTRIBUTES + PAYPAL_ATTRIBUTES + AMAZON_ATTRIBUTES + BANK_ACCOUNT_ATTRIBUTES + ROKU_ATTRIBUTES)
66
+ attributes |= SEPA_ATTRIBUTES
61
67
  end
62
68
  super attributes
63
69
  end
@@ -0,0 +1,13 @@
1
+ module Recurly
2
+ class Tier < Resource
3
+
4
+ belongs_to :add_on
5
+
6
+ define_attribute_methods %w(
7
+ ending_quantity
8
+ unit_amount_in_cents
9
+ )
10
+
11
+ embedded! true
12
+ end
13
+ end
@@ -1,6 +1,6 @@
1
1
  module Recurly
2
2
  module Version
3
- VERSION = "2.18.7"
3
+ VERSION = "2.18.8"
4
4
 
5
5
  class << self
6
6
  def inspect
data/lib/recurly.rb CHANGED
@@ -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/tier'
43
44
 
44
45
  @subdomain = nil
45
46
 
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.7
4
+ version: 2.18.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Recurly
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-20 00:00:00.000000000 Z
11
+ date: 2020-03-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -249,6 +249,7 @@ files:
249
249
  - lib/recurly/subscription_add_on.rb
250
250
  - lib/recurly/tax_detail.rb
251
251
  - lib/recurly/tax_type.rb
252
+ - lib/recurly/tier.rb
252
253
  - lib/recurly/transaction.rb
253
254
  - lib/recurly/transaction/errors.rb
254
255
  - lib/recurly/usage.rb