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 +4 -4
- data/README.md +1 -1
- data/lib/recurly/add_on.rb +9 -1
- data/lib/recurly/tier.rb +4 -0
- data/lib/recurly/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc652c9bf17962b4cba8a2e1bb07f4ed3f22f50169ccb25e914ada87a04b2e9f
|
4
|
+
data.tar.gz: 469194dbfb35df3ff98392edc8e830142e2b53cbf0ed28ca70c59b2179d7c64e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
17
|
+
gem 'recurly', '~> 2.18.9'
|
18
18
|
```
|
19
19
|
|
20
20
|
Recurly will automatically use [Nokogiri](http://nokogiri.org/) (for a nice
|
data/lib/recurly/add_on.rb
CHANGED
@@ -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
data/lib/recurly/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2020-04-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|