paymentrails 0.2.13 → 0.2.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/paymentrails/Client.rb +2 -4
- data/lib/paymentrails/gateways/GatewayHelper.rb +2 -0
- data/lib/paymentrails.rb +2 -0
- data/paymentrails.gemspec +1 -1
- data/spec/integration/RecipientTest.rb +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b676383829c92526bd5219d950b27dd487931889640b765b74c4f36a4e4287d4
|
4
|
+
data.tar.gz: bc8ccdd98fdf25511a27b94b6e9ae119a5235adfd7162640e33c531f28f8a8a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f4246643bd0f5a200ff2e967c13a020b81dc4eb71728f61a77c333849a6dd09c04585d121541b6be7de86078573999250b2769eedc844d32ad65cfc4191cec96
|
7
|
+
data.tar.gz: 8633b9e0e9b8f04ab9c5c21be24c129cea6a5b526b153839e26245c01d4fb2eae9836e23fc20d5da8552aa51b3b9fc0b22e1020ae865be2b2de2197aee96425f
|
data/lib/paymentrails/Client.rb
CHANGED
@@ -40,14 +40,12 @@ module PaymentRails
|
|
40
40
|
)
|
41
41
|
http.use_ssl = @config.useSsl?
|
42
42
|
|
43
|
-
spec = Gem::Specification.load("paymentrails.gemspec")
|
44
|
-
|
45
43
|
time = Time.now.to_i
|
46
44
|
headers = {'X-PR-Timestamp': time.to_s,
|
47
45
|
'Authorization': generate_authorization(time, endPoint, method, body),
|
48
46
|
'Content-Type': 'application/json',
|
49
|
-
'Trolley-Source': "ruby-sdk_#{
|
50
|
-
|
47
|
+
'Trolley-Source': "ruby-sdk_#{::PaymentRails::VERSION}"}
|
48
|
+
|
51
49
|
if method === "GET"
|
52
50
|
request = Net::HTTP::Get.new(uri.request_uri, headers)
|
53
51
|
elsif method === "POST"
|
@@ -1,5 +1,6 @@
|
|
1
1
|
module PaymentRails
|
2
2
|
module GatewayHelper
|
3
|
+
# rubocop:disable Lint/SuppressedException
|
3
4
|
def loosely_hydrate_model(klass_instance, attributes)
|
4
5
|
attributes.each do |k, v|
|
5
6
|
begin
|
@@ -12,5 +13,6 @@ module PaymentRails
|
|
12
13
|
|
13
14
|
klass_instance
|
14
15
|
end
|
16
|
+
# rubocop:enable Lint/SuppressedException
|
15
17
|
end
|
16
18
|
end
|
data/lib/paymentrails.rb
CHANGED
@@ -22,6 +22,8 @@ require 'paymentrails/Invoice'
|
|
22
22
|
require 'paymentrails/InvoicePayment'
|
23
23
|
|
24
24
|
module PaymentRails
|
25
|
+
VERSION = '0.2.14'.freeze
|
26
|
+
|
25
27
|
def self.client(key, secret, environment = 'production', **optionals)
|
26
28
|
Gateway.new(Configuration.new(key, secret, environment, **optionals))
|
27
29
|
end
|
data/paymentrails.gemspec
CHANGED
@@ -4,7 +4,7 @@ Gem::Specification.new do |s|
|
|
4
4
|
s.name = "paymentrails"
|
5
5
|
s.summary = "Trolley Ruby SDK"
|
6
6
|
s.description = "Ruby SDK for interacting with the Trolley API"
|
7
|
-
s.version = '0.2.
|
7
|
+
s.version = '0.2.14'
|
8
8
|
s.homepage = 'https://trolley.com/'
|
9
9
|
s.email = ['developer-tools@trolley.com']
|
10
10
|
s.license = "MIT"
|
@@ -49,6 +49,7 @@ class RecipientTest < Test::Unit::TestCase
|
|
49
49
|
assert_equal(recipient.status, 'archived')
|
50
50
|
end
|
51
51
|
|
52
|
+
# rubocop:disable Metrics/MethodLength
|
52
53
|
def test_account
|
53
54
|
uuid = SecureRandom.uuid.to_s
|
54
55
|
recipient = @client.recipient.create(
|
@@ -88,4 +89,5 @@ class RecipientTest < Test::Unit::TestCase
|
|
88
89
|
accountList = @client.recipient_account.all(recipient.id)
|
89
90
|
assert_equal(1, accountList.count)
|
90
91
|
end
|
92
|
+
# rubocop:enable Metrics/MethodLength
|
91
93
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: paymentrails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- PaymentRails
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-03
|
11
|
+
date: 2023-04-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dotenv
|