recurly 2.18.12 → 2.18.13

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: ab953ada8e18c2ebc7904cf47374fa8329fe47521bf1de9c4ca1f12ee0f2d299
4
- data.tar.gz: e33f2df2517dcdd4451bc54d252fe213911307b100b4a068306e522c83d1f235
3
+ metadata.gz: 3082ab34c9230a6e05cde1c4ec775ed0282ef33dda4e40b71c0b8390f871b649
4
+ data.tar.gz: f813d757a646978eb1c53f2264f01cc32ce368ec783a615786d3888a3a052505
5
5
  SHA512:
6
- metadata.gz: d004aac02856f41e91b7014053bfd62abea73cb617b2da58b7a534148f4ee1aea4fa01428af04790baf29720b0e2a8e03b71c596a04d40eced328e1c56ab642c
7
- data.tar.gz: b147adefd992da76cbfd3ba237a5df5eed9a87750154d646623d0c49045fd269d4f905a79c49e5621179eb6c00d8c492ed98e78f71c47b76cd49f816f64bdb10
6
+ metadata.gz: 1876031b13b2459bb6477ef5970b59c84fa4476b7359dcf494fe95f2cce546fe1e71f2851dae7af2d94c6f4b701e11c5a34a630aba7b6f07458f926c36084cb4
7
+ data.tar.gz: 183b86f9f909569637630f278c94cf7c98f9b185fb08f7568c534c0f8b0bb1b6e4b73a9e0a15254bc06f17e56f38a3721395890ea952cede9cfc207be12dd1a3
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.12'
17
+ gem 'recurly', '~> 2.18.13'
18
18
  ```
19
19
 
20
20
  Recurly will automatically use [Nokogiri](http://nokogiri.org/) (for a nice
@@ -2,6 +2,7 @@ module Recurly
2
2
  class AddOn < Resource
3
3
  # @return [Plan]
4
4
  belongs_to :plan
5
+ # @return [[Tier], []]
5
6
  has_many :tiers, class_name: :Tier, readonly: false
6
7
 
7
8
  define_attribute_methods %w(
@@ -824,9 +824,9 @@ module Recurly
824
824
 
825
825
  # Duck-typing here is problematic because of ActiveSupport's #to_xml.
826
826
  case value
827
- when Resource, Subscription::AddOns
827
+ when Resource
828
828
  value.to_xml options.merge(:builder => node)
829
- when Array
829
+ when Array, Subscription::AddOns
830
830
  value.each do |e|
831
831
  if e.is_a? Recurly::Resource
832
832
  # create a node to hold this resource
@@ -6,6 +6,9 @@ module Recurly
6
6
  # @return [Pager<Usage>, []]
7
7
  has_many :usage
8
8
 
9
+ # @return [[Tier], []]
10
+ has_many :tiers, class_name: :Tier, readonly: false
11
+
9
12
  define_attribute_methods %w(
10
13
  add_on_code
11
14
  quantity
@@ -32,6 +35,7 @@ module Recurly
32
35
  if add_on.respond_to? :add_on_source
33
36
  self.add_on_source = add_on.add_on_source
34
37
  end
38
+ self.tiers = add_on.tiers if add_on.tiers.any?
35
39
  when Hash
36
40
  self.attributes = add_on
37
41
  when String, Symbol
@@ -8,7 +8,6 @@ module Recurly
8
8
  tax_rate
9
9
  tax_in_cents
10
10
  level
11
- surcharge
12
11
  billable
13
12
  )
14
13
 
@@ -2,6 +2,7 @@ module Recurly
2
2
  class Tier < Resource
3
3
 
4
4
  belongs_to :add_on
5
+ belongs_to :subscription_add_on
5
6
 
6
7
  define_attribute_methods %w(
7
8
  ending_quantity
@@ -1,6 +1,6 @@
1
1
  module Recurly
2
2
  module Version
3
- VERSION = "2.18.12"
3
+ VERSION = "2.18.13"
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.12
4
+ version: 2.18.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Recurly
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-22 00:00:00.000000000 Z
11
+ date: 2020-08-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri