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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: db9d2485503a7d494d61736c19933f4156122fe9
4
- data.tar.gz: 6dcad776856b06872c614fa0e729669813bd6649
3
+ metadata.gz: 2ea94a3e9fd4e8fe2aa85e68824dc0719c8f9e2f
4
+ data.tar.gz: f97d26cfcbc8f15965d51f58c021b3d7f4e40fd8
5
5
  SHA512:
6
- metadata.gz: 573f64f458de690e0f145dcca0e59bdcf18b984a25265d1917c4224d66bcf7377c4501f6771f787bf1ead5b44d993353fba8b00285f51dce67c8a3fa0e1b3d16
7
- data.tar.gz: c1192abf29d71b7c22503bb55e8d135cc56833473d37380affa1095d15939ff2c37a56b017dec84ff3fa5fa383cc511fbf3343b536249dede195333cc31b7fe5
6
+ metadata.gz: b95a3118ec5d6590db18cb623102122fc21d4250048c0a45759950ebd2a9ff58470f5992d85bdabbd8c1b3b2e3514a618d3cff70af3fbddb4eb92973e98bbf27
7
+ data.tar.gz: a000a1e89aaacbb0f76145547d0aafc91649749737dff1fcced11bdaf2a0419fe2f6437557af806950b21d75eab276c8b2568d7b141b9d39039ad41ef5c59fdb
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Ravelin
2
- VERSION = "0.1.17"
2
+ VERSION = "0.1.18"
3
3
  end
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.17
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: 2018-12-05 00:00:00.000000000 Z
14
+ date: 2019-01-14 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: faraday