user_engage 0.0.12 → 0.0.13

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: a54a69d951e0c0b00923193ebc12d456b9b0b21147c63efcb6dd454177b5df74
4
- data.tar.gz: cc83bbf431566fb7bfa8d1526ad4c4f5a062536f7f72fa45c3b62e7603140c1a
3
+ metadata.gz: 898ac702bb0b27e4e1d50b135efddf24666f8bcd9d8a83891d0aa590cf087206
4
+ data.tar.gz: d004349d21d04c3cf31d74c0a344865e52cb4a1fb286b269be90aaee0266e9ce
5
5
  SHA512:
6
- metadata.gz: d6cb14968ab2b32021a4d61a2164606dc61afa029701ff35f07bd0abdd99bb756ad9d4af390f7f5a672b5a5dcae5ca0f9c24edbf7b484157dcd31d7d14e817c1
7
- data.tar.gz: 360e2c8581a818fd75d4bc7fa624f57e7d1bfb7e813440ad24c94e62b7605a309235aeaa21b4de20225a89782660b189a5b8b8a09076abfecc21ab81523eb926
6
+ metadata.gz: 588ee318b4b4163dce23c0f6b8d0e741c8b6d80a950126a6bb1cd9e3331ea219ad5498d50e8c5896aa2b6e3d039ca95c7fdf3cb5b996d3817c9187257f856fc1
7
+ data.tar.gz: 3433900525b69ed2925ae57d3e654746e70e8764fa438bfa7b2f82173f788e1e0d0a1d6a620b53dd6e23dee4ecb5315d8707de9f9ba2009ea8f11a84b11dfdf4
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- user_engage (0.0.12)
4
+ user_engage (0.0.13)
5
5
  dry-struct (~> 0.5)
6
6
  faraday (>= 0.12)
7
7
 
data/TODO.md CHANGED
@@ -33,7 +33,7 @@
33
33
  * [x] Set multiple attributes
34
34
  * [ ] Update company using company ID
35
35
  * [ ] Delete company using company ID
36
- * [ ] Get company using company ID
36
+ * [x] Get company using company ID
37
37
  * [ ] Set attribute using company ID
38
38
  * [ ] Set multiple attributes using company ID
39
39
  * [ ] Create deal
@@ -11,6 +11,11 @@ module UserEngage
11
11
  new(attributes)
12
12
  end
13
13
 
14
+ def find_by_id(id)
15
+ attributes = get_resource_by_id(id)
16
+ new(attributes)
17
+ end
18
+
14
19
  #####################
15
20
  ## Private methods ##
16
21
  #####################
@@ -27,6 +32,12 @@ module UserEngage
27
32
  JSON.parse(response.body, symbolize_names: true)
28
33
  end
29
34
 
35
+ def get_resource_by_id(id)
36
+ path = "/#{resource_name}-by-id/#{id}/"
37
+ response = UserEngage.client.get(path)
38
+ JSON.parse(response.body, symbolize_names: true)
39
+ end
40
+
30
41
  def get_by_hash(params)
31
42
  path = "/#{resource_name}/search/"
32
43
  UserEngage.client.get(path, params)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module UserEngage
4
- VERSION = '0.0.12'
4
+ VERSION = '0.0.13'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: user_engage
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12
4
+ version: 0.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Markus Schwed
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-11-07 00:00:00.000000000 Z
11
+ date: 2019-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-struct