recurly 2.18.8 → 2.18.9

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: eb193b463e44579e6acb5dd39eadefea0f9294de9a3bb1be484fb75f167ce4d6
4
- data.tar.gz: 0fa9c10e470b143e646695c52e5071104e1e419532db0874de4fc523136f4470
3
+ metadata.gz: dc652c9bf17962b4cba8a2e1bb07f4ed3f22f50169ccb25e914ada87a04b2e9f
4
+ data.tar.gz: 469194dbfb35df3ff98392edc8e830142e2b53cbf0ed28ca70c59b2179d7c64e
5
5
  SHA512:
6
- metadata.gz: 61495efe7cbe8592c8fc6b6e16484ef6ee1234b9c74e17cb703ad2c306c6b0b68b0ec03218c41cfd1bb7f25976aa3b6988f409419d0c94d0c503c24a972c6ca5
7
- data.tar.gz: a0a0000c8eda507308a6553cd119bcdd9bbda67e47648068992fc14106bf21220c2bb447eecb9cf88d8bdb2594d5880ef529cab0a181a430a486a9bb40cc9b0d
6
+ metadata.gz: 74d95dd33418be41ae07cf3809cfb3f5fef49b7f9b42de17f9a85e350951c58f1a7df180345a4b2de3f9413c7c5fdf36440b2c2368ba3878cb7782bc84373305
7
+ data.tar.gz: f66bd9275edb0509f433d5caf5112bd9304f0ad72d146c1875bf38d72f8657e243850daf87afa3737b5cf79eb2dab38ef1ee883517ac2f216b91a493ffcf883e
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.8'
17
+ gem 'recurly', '~> 2.18.9'
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
+ has_many :tiers, class_name: :Tier, readonly: false
5
6
 
6
7
  define_attribute_methods %w(
7
8
  add_on_code
@@ -21,11 +22,18 @@ module Recurly
21
22
  created_at
22
23
  updated_at
23
24
  tier_type
24
- tiers
25
25
  )
26
26
  alias to_param add_on_code
27
27
  alias quantity default_quantity
28
28
 
29
+ def changed_attributes
30
+ attrs = super
31
+ if tiers.any?(&:changed?)
32
+ attrs['tiers'] = tiers.select(&:changed?)
33
+ end
34
+ attrs
35
+ end
36
+
29
37
  # Add-ons are only writeable and readable through {Plan} instances.
30
38
  embedded!
31
39
  private_class_method :find
data/lib/recurly/tier.rb CHANGED
@@ -8,6 +8,10 @@ module Recurly
8
8
  unit_amount_in_cents
9
9
  )
10
10
 
11
+ def xml_keys
12
+ attributes.keys
13
+ end
14
+
11
15
  embedded! true
12
16
  end
13
17
  end
@@ -1,6 +1,6 @@
1
1
  module Recurly
2
2
  module Version
3
- VERSION = "2.18.8"
3
+ VERSION = "2.18.9"
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.8
4
+ version: 2.18.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Recurly
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-27 00:00:00.000000000 Z
11
+ date: 2020-04-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri