ravelin 0.1.17 → 0.1.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ravelin/client.rb +18 -1
- data/lib/ravelin/version.rb +1 -1
- 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: 2ea94a3e9fd4e8fe2aa85e68824dc0719c8f9e2f
|
4
|
+
data.tar.gz: f97d26cfcbc8f15965d51f58c021b3d7f4e40fd8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b95a3118ec5d6590db18cb623102122fc21d4250048c0a45759950ebd2a9ff58470f5992d85bdabbd8c1b3b2e3514a618d3cff70af3fbddb4eb92973e98bbf27
|
7
|
+
data.tar.gz: a000a1e89aaacbb0f76145547d0aafc91649749737dff1fcced11bdaf2a0419fe2f6437557af806950b21d75eab276c8b2568d7b141b9d39039ad41ef5c59fdb
|
data/lib/ravelin/client.rb
CHANGED
@@ -49,10 +49,17 @@ module Ravelin
|
|
49
49
|
tag = Tag.new(**args).serializable_hash
|
50
50
|
customer_id = tag["customerId"]
|
51
51
|
tags = tag["tagNames"].join(",")
|
52
|
-
|
52
|
+
|
53
53
|
delete("/v2/tag/customer?customerId=#{customer_id}&tagName=#{tags}")
|
54
54
|
end
|
55
55
|
|
56
|
+
def get_tag(**args)
|
57
|
+
tag = Tag.new(**args).serializable_hash
|
58
|
+
customer_id = tag["customerId"]
|
59
|
+
|
60
|
+
get("/v2/tag/customer/#{customer_id}")
|
61
|
+
end
|
62
|
+
|
56
63
|
private
|
57
64
|
|
58
65
|
def post(url, payload)
|
@@ -75,6 +82,16 @@ module Ravelin
|
|
75
82
|
end
|
76
83
|
end
|
77
84
|
|
85
|
+
def get(url)
|
86
|
+
response = @connection.get(url)
|
87
|
+
|
88
|
+
if response.success?
|
89
|
+
Response.new(response)
|
90
|
+
else
|
91
|
+
handle_error_response(response)
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
78
95
|
def handle_error_response(response)
|
79
96
|
case response.status
|
80
97
|
when 400, 403, 404, 405, 406
|
data/lib/ravelin/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ravelin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Levy
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: exe
|
13
13
|
cert_chain: []
|
14
|
-
date:
|
14
|
+
date: 2019-01-14 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: faraday
|