ravelin 0.1.12 → 0.1.13
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 -0
- data/lib/ravelin/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4668177295096a75593ac38e8bea8ce34890832e
|
4
|
+
data.tar.gz: f4c15f824d28c7f80b2ae5bd0fc271528f9bc87e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 78f801dd5a2ec3ee9db1347841ed7901b6ca231f80f963c0ce055da0ceaad8aef77ada6dc6351704d5bd82320b868b2b1e800e8ec30b281cd06b2d5a10cdf8a0
|
7
|
+
data.tar.gz: eaec22bfc38220cd21e6fb44274611ce2a7f2a97fdfd333c1e3fc3711dce6f7400f845bce03904b1efb652fd824ddfb5a0abc174ce375bfd2f105c21071798f4
|
data/lib/ravelin/client.rb
CHANGED
@@ -45,6 +45,14 @@ module Ravelin
|
|
45
45
|
post("/v2/tag/customer", tag.serializable_hash)
|
46
46
|
end
|
47
47
|
|
48
|
+
def delete_tag(**args)
|
49
|
+
tag = Tag.new(**args).serializable_hash
|
50
|
+
customer_id = tag[:customerId]
|
51
|
+
tags = tag[:tagNames].join(",")
|
52
|
+
|
53
|
+
delete("/v2/tag/customer?customerId=[#{customer_id}]&tagName=[#{tags}]")
|
54
|
+
end
|
55
|
+
|
48
56
|
private
|
49
57
|
|
50
58
|
def post(url, payload)
|
@@ -57,6 +65,16 @@ module Ravelin
|
|
57
65
|
end
|
58
66
|
end
|
59
67
|
|
68
|
+
def delete(url)
|
69
|
+
response = @connection.delete(url)
|
70
|
+
|
71
|
+
if response.success?
|
72
|
+
Response.new(response)
|
73
|
+
else
|
74
|
+
handle_error_response(response)
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
60
78
|
def handle_error_response(response)
|
61
79
|
case response.status
|
62
80
|
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.13
|
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: 2018-
|
14
|
+
date: 2018-11-22 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: faraday
|
@@ -152,7 +152,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
152
152
|
version: '0'
|
153
153
|
requirements: []
|
154
154
|
rubyforge_project:
|
155
|
-
rubygems_version: 2.
|
155
|
+
rubygems_version: 2.4.5.1
|
156
156
|
signing_key:
|
157
157
|
specification_version: 4
|
158
158
|
summary: Ruby bindings for the Ravelin API
|