vogogo 0.6.0 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/vogogo/client.rb +3 -4
- data/lib/vogogo/risk/customers.rb +15 -0
- data/lib/vogogo/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4caed1e2534acd1d7f6a0f7c7345cab6460c076c
|
4
|
+
data.tar.gz: b8dd843c222b90b90476c349837872ccb2d0a85d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5debd9927bce625618bb9ae15877abcd5092b314a7d3ff09609ea35e8e04698a2d72f9d72d349b05bf458501dd2ef7faefcaeb9c63f9290a91aab88fb04983ea
|
7
|
+
data.tar.gz: eea9ab214cf92fd116f84eb85bc0ba43db59bdae8bc12f21cb019fa6ef9867dd4ae5fcad9a35bf3266dd4fabe9c24405027db3b756c2f74868db4cc099a3cf74
|
data/lib/vogogo/client.rb
CHANGED
@@ -12,9 +12,8 @@ module Vogogo
|
|
12
12
|
# include Vogogo::Risk::PhoneNumbers
|
13
13
|
# include Vogogo::Risk::Documents
|
14
14
|
|
15
|
-
def initialize(
|
16
|
-
@
|
17
|
-
@password = password || ENV['VOGOGO_PASSWORD']
|
15
|
+
def initialize(secret = nil)
|
16
|
+
@secret = secret || ENV['VOGOGO_SECRET']
|
18
17
|
end
|
19
18
|
|
20
19
|
protected
|
@@ -34,7 +33,7 @@ module Vogogo
|
|
34
33
|
request = Net::HTTP::Get.new(@uri.request_uri)
|
35
34
|
end
|
36
35
|
request["content-type"] = "application/json"
|
37
|
-
request.basic_auth(@
|
36
|
+
request.basic_auth(@secret, '')
|
38
37
|
request.body = params.to_json
|
39
38
|
response = @http.request(request)
|
40
39
|
|
@@ -5,6 +5,21 @@ module Vogogo
|
|
5
5
|
connection('customers')
|
6
6
|
request_method('get')
|
7
7
|
end
|
8
|
+
|
9
|
+
def create_customer(params)
|
10
|
+
connection('customers')
|
11
|
+
request_method('post', params)
|
12
|
+
end
|
13
|
+
|
14
|
+
def update_customer(id, params)
|
15
|
+
connection("customers/#{id}")
|
16
|
+
request_method('post', params)
|
17
|
+
end
|
18
|
+
|
19
|
+
def get_customer(id)
|
20
|
+
connection("customers/#{id}")
|
21
|
+
request_method('get')
|
22
|
+
end
|
8
23
|
end
|
9
24
|
end
|
10
25
|
end
|
data/lib/vogogo/version.rb
CHANGED