recurly 2.18.3 → 2.18.4
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.rb +1 -0
- data/lib/recurly/adjustment.rb +1 -0
- data/lib/recurly/api.rb +1 -1
- data/lib/recurly/item.rb +37 -0
- data/lib/recurly/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 83f25e1dee86f19b00a000d486f4aa1b6b9d272d0ace3406e957e5dd1b378c6c
|
4
|
+
data.tar.gz: d50f4e39c520d51451361401657cab79dd566adcdfea46d4adead9334e34feb3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 977e9116f4842904d48ad5bd26927e75f0fbf7f8b86471bbf15208da3cc47a6895ea7b38dddf5eb040d6953626d749e1ccbc3feb7ae33bfaf7ff8cdfd5c1b1d4
|
7
|
+
data.tar.gz: 610d7903d45e8a4340c76170ad17667f70e5b004e0e90fe445c7ee674b196f9e006ecbbc5cd3ff32bf9ae1ea94a40f413905362af512e750e6cece72648cffa7
|
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.4'
|
18
18
|
```
|
19
19
|
|
20
20
|
Recurly will automatically use [Nokogiri](http://nokogiri.org/) (for a nice
|
data/lib/recurly.rb
CHANGED
data/lib/recurly/adjustment.rb
CHANGED
data/lib/recurly/api.rb
CHANGED
data/lib/recurly/item.rb
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
module Recurly
|
2
|
+
class Item < Resource
|
3
|
+
# @return [[CustomField], []]
|
4
|
+
has_many :custom_fields, class_name: :CustomField, readonly: false
|
5
|
+
|
6
|
+
define_attribute_methods %w(
|
7
|
+
item_code
|
8
|
+
name
|
9
|
+
description
|
10
|
+
external_sku
|
11
|
+
accounting_code
|
12
|
+
revenue_schedule_type
|
13
|
+
state
|
14
|
+
created_at
|
15
|
+
updated_at
|
16
|
+
deleted_at
|
17
|
+
)
|
18
|
+
|
19
|
+
def changed_attributes
|
20
|
+
attrs = super
|
21
|
+
if custom_fields.any?(&:changed?)
|
22
|
+
attrs['custom_fields'] = custom_fields.select(&:changed?)
|
23
|
+
end
|
24
|
+
attrs
|
25
|
+
end
|
26
|
+
|
27
|
+
# method should be changed to use a link once it is added to api
|
28
|
+
# example:
|
29
|
+
# return false unless link? :reactivate
|
30
|
+
# reload follow_link :reactivate
|
31
|
+
def reactivate
|
32
|
+
reload API.put("#{uri}/reactivate")
|
33
|
+
true
|
34
|
+
end
|
35
|
+
|
36
|
+
end
|
37
|
+
end
|
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.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Recurly
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-11-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -228,6 +228,7 @@ files:
|
|
228
228
|
- lib/recurly/helper.rb
|
229
229
|
- lib/recurly/invoice.rb
|
230
230
|
- lib/recurly/invoice_collection.rb
|
231
|
+
- lib/recurly/item.rb
|
231
232
|
- lib/recurly/js.rb
|
232
233
|
- lib/recurly/juris_detail.rb
|
233
234
|
- lib/recurly/measured_unit.rb
|