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 +4 -4
- data/Gemfile.lock +1 -1
- data/TODO.md +1 -1
- data/lib/user_engage/operation/find.rb +11 -0
- data/lib/user_engage/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: 898ac702bb0b27e4e1d50b135efddf24666f8bcd9d8a83891d0aa590cf087206
|
4
|
+
data.tar.gz: d004349d21d04c3cf31d74c0a344865e52cb4a1fb286b269be90aaee0266e9ce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 588ee318b4b4163dce23c0f6b8d0e741c8b6d80a950126a6bb1cd9e3331ea219ad5498d50e8c5896aa2b6e3d039ca95c7fdf3cb5b996d3817c9187257f856fc1
|
7
|
+
data.tar.gz: 3433900525b69ed2925ae57d3e654746e70e8764fa438bfa7b2f82173f788e1e0d0a1d6a620b53dd6e23dee4ecb5315d8707de9f9ba2009ea8f11a84b11dfdf4
|
data/Gemfile.lock
CHANGED
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
|
-
* [
|
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)
|
data/lib/user_engage/version.rb
CHANGED
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.
|
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:
|
11
|
+
date: 2019-01-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-struct
|