smartpay 0.2.12 → 0.2.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/smartpay/client.rb +9 -1
- data/lib/smartpay/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a93499d26437ed9bcbddd74143329b00aaed999b2bb7616522d9df800399b4e4
|
4
|
+
data.tar.gz: c57ef079d70823f37deec9861ea9296b2b91ca388eef6922532f6b9429be0d75
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f00cf5883edfae53b67da79a467dd2548c2c13c95ff86a471276151d2180e9e691471143b6f646e578a87933d94fc3e922a5552c9472164019ba9c811a5b44d4
|
7
|
+
data.tar.gz: 04b5476f14c7a0f5aeacf2f9f41718cf535537a73782e04d9446ec0b137da1329bf4e3e109c90d3b445ad33c917d4e9d2ad7ba73e0c20d7d4a87dbfecd58d079
|
data/lib/smartpay/client.rb
CHANGED
@@ -6,7 +6,8 @@ module Smartpay
|
|
6
6
|
class Client
|
7
7
|
class << self
|
8
8
|
def post(path, payload = {})
|
9
|
-
|
9
|
+
request_payload = default_payload.merge(payload)
|
10
|
+
response = RestClient::Request.execute(method: :post, url: api_url(path), headers: headers, timeout: timeout, payload: request_payload.to_json)
|
10
11
|
JSON.parse(response.body, symbolize_names: true)
|
11
12
|
end
|
12
13
|
|
@@ -31,6 +32,13 @@ module Smartpay
|
|
31
32
|
def secret_key
|
32
33
|
Smartpay.configuration.secret_key
|
33
34
|
end
|
35
|
+
|
36
|
+
def default_payload
|
37
|
+
{
|
38
|
+
'dev-lang': :ruby,
|
39
|
+
'sdk-version': Smartpay::VERSION
|
40
|
+
}.freeze
|
41
|
+
end
|
34
42
|
end
|
35
43
|
end
|
36
44
|
end
|
data/lib/smartpay/version.rb
CHANGED