myjohndeere 0.0.9 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/myjohndeere/contribution_activation.rb +2 -0
- data/lib/myjohndeere/version.rb +1 -1
- data/test/test_contribution_activation.rb +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4f2acb9809590319db99a6cd147e160c3c870829
|
|
4
|
+
data.tar.gz: 3e2f4b9095681162d90672de69167670ba7de5fe
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: aa8e8bcea9415a3f74b9af165ff07f876e916d99224238259bf48f369a577c8fe1fa223371d624e0e53202af34a688e09d58558706e9abd4a84ff59cd8998531
|
|
7
|
+
data.tar.gz: 6b7d937b17ae5d91fc0062877a5658dd4d7083ba6c619ec1598c4e04a7f19b6292b55f753fd2f88c1c470bc23fc3a643d68cdd41de199c168731801c93a34a78
|
data/Gemfile.lock
CHANGED
|
@@ -3,6 +3,7 @@ module MyJohnDeere
|
|
|
3
3
|
self.base_jd_resource = "contributionActivations"
|
|
4
4
|
self.list_resource_path = "organizations/%{organization_id}/#{self.base_jd_resource}"
|
|
5
5
|
self.retrieve_resource_path = self.base_jd_resource
|
|
6
|
+
attr_accessor :contribution_product_id
|
|
6
7
|
attributes_to_pull_from_json(:activationStatus, :id)
|
|
7
8
|
|
|
8
9
|
def initialize(json_object, access_token = nil)
|
|
@@ -10,6 +11,7 @@ module MyJohnDeere
|
|
|
10
11
|
if self.id.nil? then
|
|
11
12
|
self.id = extract_link_with_rel_from_list("self", /contributionActivations\/([^\/]+)\Z/)
|
|
12
13
|
end
|
|
14
|
+
self.contribution_product_id = extract_link_with_rel_from_list("contributionProduct", /#{ContributionProduct.base_jd_resource}\/([^\/]+)\Z/)
|
|
13
15
|
end
|
|
14
16
|
|
|
15
17
|
def self.create(access_token, organization_id, contribution_product_id, activated: true)
|
data/lib/myjohndeere/version.rb
CHANGED
|
@@ -13,6 +13,7 @@ class TestContributionActivation < Minitest::Test
|
|
|
13
13
|
ca = MyJohnDeere::ContributionActivation.retrieve(default_access_token,
|
|
14
14
|
CONTRIBUTION_ACTIVATION_ID)
|
|
15
15
|
assert_equal CONTRIBUTION_ACTIVATION_ID, ca.id
|
|
16
|
+
assert_equal CONTRIBUTION_PRODUCT_ID, ca.contribution_product_id
|
|
16
17
|
assert_equal "ACTIVATED", ca.activation_status
|
|
17
18
|
end
|
|
18
19
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: myjohndeere
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.10
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Paul Susmarski
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-09-
|
|
11
|
+
date: 2017-09-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: oauth
|