svbclient 3.1.1 → 3.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/svbclient.rb +2 -15
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7b10d6c3830db31e4d5f8daed009dea79f41d7d6
4
- data.tar.gz: 455186c8e02e6796e3d6755ca8eb85005f944185
3
+ metadata.gz: c92446f878f0317a46f337ce57c2f137b964f0f9
4
+ data.tar.gz: e6e4f4e3e5eceb79b6a2666764bd33ec32db79c3
5
5
  SHA512:
6
- metadata.gz: 7380a4343818f9aaba53ef40810b80404c3976d55c7b240d4b836ffe4a176e3863438ba049c8d1fa11d881fbe31f62b51fea2dc5b6661ddcc5acdb1de7ac66ed
7
- data.tar.gz: 2a7725927cd41257d9d24d0f5f0f61a9a546b52978775097b62e8fcdae35de58e596e86e9f2583647bb8aa716c10ae99d0332d57fe1355aa0660a3911b861441
6
+ metadata.gz: 1c4b4c1f1b9b2fb0025c9204c7a568ac5ec85832a51950f192979d3fc693d38651beae3801980229bbd2ee8da08d607c6d0f4f048d6a56b078d9b17d864eff80
7
+ data.tar.gz: 46d321d0a2b61ed8b9381c1d4ff0235fee5b0030be36205ca45e11a8db41899bc3bffc4593a57b67440e44237d5ba7ebe6e38292f647dfa643c31c240dd1d134
data/lib/svbclient.rb CHANGED
@@ -16,18 +16,10 @@ require 'uri'
16
16
  require 'rest-client'
17
17
 
18
18
  class SVBClient
19
- def initialize(api_key, hmac, enviro: '', base_url: 'https://api.svb.com', company_id: nil, key_id: nil, partner_id: nil)
19
+ def initialize(api_key, hmac, base_url: 'https://api.svb.com')
20
20
  @API_KEY = api_key
21
21
  @HMAC_SECRET = hmac
22
- if ['live', 'test'].include? enviro
23
- @ENVIRO = enviro
24
- else
25
- @ENVIRO = nil
26
- end
27
22
  @BASE_URL = base_url
28
- @COMPANY_ID = company_id
29
- @KEY_ID = key_id
30
- @PARTNER_ID = partner_id
31
23
  end
32
24
 
33
25
  def signature(timestamp, method, path, query, body)
@@ -39,17 +31,12 @@ class SVBClient
39
31
  mytimestamp = Time.now.to_i.to_s
40
32
  signature = signature(mytimestamp, method, path, query, body)
41
33
 
42
- hs = {
34
+ {
43
35
  "X-Timestamp": mytimestamp,
44
36
  "X-Signature": signature,
45
37
  "Authorization": "Bearer " + @API_KEY,
46
38
  "Content-Type": "application/json"
47
39
  }
48
- hs["X-Environment"] = @ENVIRO unless @ENVIRO.nil?
49
- hs["X-Company-Id"] = @COMPANY_ID unless @COMPANY_ID.nil?
50
- hs["X-Key-Id"] = @KEY_ID unless @KEY_ID.nil?
51
- hs["X-Partner-Id"] = @PARTNER_ID unless @PARTNER_ID.nil?
52
- hs
53
40
  end
54
41
 
55
42
  def delete(path)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: svbclient
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.1
4
+ version: 3.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Silicon Valley Bank