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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 86ae2589b7f59311ec99f52daf9396460008814a346545f13cd038205841ed66
4
- data.tar.gz: adc26ad630d2f5286dbf1aeee347a0532ee9eee650c3688286ee4559efcfed75
3
+ metadata.gz: a93499d26437ed9bcbddd74143329b00aaed999b2bb7616522d9df800399b4e4
4
+ data.tar.gz: c57ef079d70823f37deec9861ea9296b2b91ca388eef6922532f6b9429be0d75
5
5
  SHA512:
6
- metadata.gz: a4efcc6b9891f3ea262e9b7721166ec5aa737e8e5b29f9e73ca7df22bff67981948e46477dc052afb6d246ebb5115b330e88729c5ca034ee017907a64c988a33
7
- data.tar.gz: 3075c8c2cfe44f17c9feb649c36b3e845f0bd7d442146b775eff495fbb6f3333466d88cff2f23b44254ece606d7178b39b5a5371d0839fe328f735e0392f35f6
6
+ metadata.gz: f00cf5883edfae53b67da79a467dd2548c2c13c95ff86a471276151d2180e9e691471143b6f646e578a87933d94fc3e922a5552c9472164019ba9c811a5b44d4
7
+ data.tar.gz: 04b5476f14c7a0f5aeacf2f9f41718cf535537a73782e04d9446ec0b137da1329bf4e3e109c90d3b445ad33c917d4e9d2ad7ba73e0c20d7d4a87dbfecd58d079
@@ -6,7 +6,8 @@ module Smartpay
6
6
  class Client
7
7
  class << self
8
8
  def post(path, payload = {})
9
- response = RestClient::Request.execute(method: :post, url: api_url(path), headers: headers, timeout: timeout, payload: payload.to_json)
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Smartpay
4
- VERSION = "0.2.12"
4
+ VERSION = "0.2.13"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smartpay
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.12
4
+ version: 0.2.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Smartpay