myjohndeere 0.0.9 → 0.0.10

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
  SHA1:
3
- metadata.gz: 1ec3658d0b7ce21176c5545dd633a91674730a81
4
- data.tar.gz: dad6f610a4dea5360504b30e01bb56b0257a57a7
3
+ metadata.gz: 4f2acb9809590319db99a6cd147e160c3c870829
4
+ data.tar.gz: 3e2f4b9095681162d90672de69167670ba7de5fe
5
5
  SHA512:
6
- metadata.gz: 0575997ade5455c96d8ffaa879c01501d83b298c3c87a8bbd613454ddbe63822209846ad4dbddef7c40cc2fa70d6cd82c4c271ee325eff6f1d716617144a172d
7
- data.tar.gz: 0f8737652e4412658cc9d52aaca837bd6be8b6eab95164d84dc9b49120bbb3b6d74a1894e0faef911a9728eb06cfe38c9987561dec8bedb8cf1e2a560f8e0a09
6
+ metadata.gz: aa8e8bcea9415a3f74b9af165ff07f876e916d99224238259bf48f369a577c8fe1fa223371d624e0e53202af34a688e09d58558706e9abd4a84ff59cd8998531
7
+ data.tar.gz: 6b7d937b17ae5d91fc0062877a5658dd4d7083ba6c619ec1598c4e04a7f19b6292b55f753fd2f88c1c470bc23fc3a643d68cdd41de199c168731801c93a34a78
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- myjohndeere (0.0.8)
4
+ myjohndeere (0.0.10)
5
5
  oauth (>= 0.5.3)
6
6
 
7
7
  GEM
@@ -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)
@@ -1,3 +1,3 @@
1
1
  module MyJohnDeere
2
- VERSION = '0.0.9'
2
+ VERSION = '0.0.10'
3
3
  end
@@ -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.9
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-26 00:00:00.000000000 Z
11
+ date: 2017-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oauth