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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dcfb40fa0b8877cc233717e82ef7461016342289
4
- data.tar.gz: 61c24d7abe5c1312123b1e3b344803e07b252f34
3
+ metadata.gz: 4caed1e2534acd1d7f6a0f7c7345cab6460c076c
4
+ data.tar.gz: b8dd843c222b90b90476c349837872ccb2d0a85d
5
5
  SHA512:
6
- metadata.gz: 2eabf76f6e230cf3f48590a0c574d1477918464935c31860bfaa7fd1cca3f6cd5e389be04ba900517b0be33269ffc2632bb38c077ac9a75b2e0429ec72fee4f0
7
- data.tar.gz: 2aa8fdeeaee161a783b8ede62dd87e96001bcc847f592e540ac121a01e02301491288628f9a6dbce621d3f168cdb6834dd39a696003eb12aeb4b08cf023cf67e
6
+ metadata.gz: 5debd9927bce625618bb9ae15877abcd5092b314a7d3ff09609ea35e8e04698a2d72f9d72d349b05bf458501dd2ef7faefcaeb9c63f9290a91aab88fb04983ea
7
+ data.tar.gz: eea9ab214cf92fd116f84eb85bc0ba43db59bdae8bc12f21cb019fa6ef9867dd4ae5fcad9a35bf3266dd4fabe9c24405027db3b756c2f74868db4cc099a3cf74
@@ -12,9 +12,8 @@ module Vogogo
12
12
  # include Vogogo::Risk::PhoneNumbers
13
13
  # include Vogogo::Risk::Documents
14
14
 
15
- def initialize(username = nil, password = nil)
16
- @username = username || ENV['VOGOGO_USERNAME']
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(@username, @password)
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
@@ -1,3 +1,3 @@
1
1
  module Vogogo
2
- VERSION = "0.6.0"
2
+ VERSION = "0.7.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vogogo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcin Jan Adamczyk