coinqvest_merchant_sdk 0.0.2 → 0.0.3

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e9ece5ffd2959fd7523248b8be0c5c75a6c7ca77
4
- data.tar.gz: 5265a5328dfba35f2be0da9bbcd607c417999a2e
3
+ metadata.gz: 39c3b2fd5e48845371b3ec827d43176b0a2bacdc
4
+ data.tar.gz: 10da49a876240b9815ecad75c8b27bd825bbe651
5
5
  SHA512:
6
- metadata.gz: 0702fd9993661708bd0d36b18c83027394582ef21d62b673cc88616587d6b708782a5dbf425831f7e57f88ffef7cb4495d570c820ccf75d274f5bbd1fc243e27
7
- data.tar.gz: 69ed338b3718993460fcaa1d609d2e585708062c2e4b2bf60540084b9c90ec1e45d45323eebfe89ca753b5ddebb9046951c01ac42cd8f9dcce3132929794b4d1
6
+ metadata.gz: 7b701ca4f2da021dc92d949a1173f3c29bb1833b308fd2869a4c66dec5e87bebf6a61d0fd4af1d431b047f3a2a43d4174ff8fb2ae7d4294b11ee39509000530c
7
+ data.tar.gz: 101fd9f33e05eb4f2ef6d68c97d110d1fbdfc0a6323b5ded800615a891e4bf21eb1e644bdb325c81d304fac52fcaa5dd4ff32e14d9752b98b2747eafc2a9cac6
@@ -48,7 +48,7 @@ module CoinqvestMerchantSDK
48
48
  def get(endpoint, params = {})
49
49
 
50
50
  path = build_connect_url(endpoint) + '?' + URI.encode_www_form(params)
51
- headers = build_auth_headers(endpoint, 'GET', params)
51
+ headers = build_headers(endpoint, 'GET', params)
52
52
 
53
53
  log "GET " + path
54
54
  log headers.to_s
@@ -73,7 +73,7 @@ module CoinqvestMerchantSDK
73
73
  def post(endpoint, params = {})
74
74
 
75
75
  path = build_connect_url(endpoint)
76
- headers = build_auth_headers(endpoint, 'POST', params)
76
+ headers = build_headers(endpoint, 'POST', params)
77
77
 
78
78
  log "POST " + path + " " + params.to_s
79
79
  log headers.to_s
@@ -98,7 +98,7 @@ module CoinqvestMerchantSDK
98
98
  def put(endpoint, params = {})
99
99
 
100
100
  path = build_connect_url(endpoint)
101
- headers = build_auth_headers(endpoint, 'PUT', params)
101
+ headers = build_headers(endpoint, 'PUT', params)
102
102
 
103
103
  log "PUT " + path + " " + params.to_s
104
104
  log headers.to_s
@@ -123,7 +123,7 @@ module CoinqvestMerchantSDK
123
123
  def delete(endpoint, params = {})
124
124
 
125
125
  path = build_connect_url(endpoint)
126
- headers = build_auth_headers(endpoint, 'DELETE', params)
126
+ headers = build_headers(endpoint, 'DELETE', params)
127
127
 
128
128
  log "DELETE " + path + " " + params.to_s
129
129
  log headers.to_s
@@ -149,7 +149,7 @@ module CoinqvestMerchantSDK
149
149
 
150
150
  # private class to generate authentication headers
151
151
  private
152
- def build_auth_headers(endpoint, method, params)
152
+ def build_headers(endpoint, method, params)
153
153
 
154
154
  timestamp = Time.now.to_i
155
155
  body = NIL
@@ -161,7 +161,8 @@ module CoinqvestMerchantSDK
161
161
  {
162
162
  :"X-Digest-Key" => @key,
163
163
  :"X-Digest-Signature" => OpenSSL::HMAC.hexdigest('sha256', @secret, data),
164
- :"X-Digest-Timestamp" => timestamp
164
+ :"X-Digest-Timestamp" => timestamp,
165
+ :"User-Agent" => @client_name + " " + @client_version
165
166
  }
166
167
 
167
168
  end
@@ -1,6 +1,6 @@
1
1
  module CoinqvestMerchantSDK
2
2
 
3
- CLIENT_VERSION = '0.0.2'
3
+ CLIENT_VERSION = '0.0.3'
4
4
 
5
5
  CLIENT_NAME = 'ruby_merchant_sdk'
6
6
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coinqvest_merchant_sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - COINQVEST Ltd.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-06 00:00:00.000000000 Z
11
+ date: 2020-04-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client