synapse_pay_rest 3.2.4 → 3.2.5
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 +4 -4
- data/lib/synapse_pay_rest/http_client.rb +10 -2
- data/lib/synapse_pay_rest/version.rb +1 -1
- data/synapse_pay_rest.gemspec +2 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 712e02a3aa89c4f26d4f770a56478c9853bc1a08
|
4
|
+
data.tar.gz: 41e153b3fa82b7aefc3714c254088f8674a050c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 390d572c5819a1a1d1672869598819ea1182275ab4d5d91eccc667dca3f90955d6c2f4b41932665adc920a0cf391db7a953d70a4998d8eb5350ecd788db00f5e
|
7
|
+
data.tar.gz: 8d0b7dd0db5a5794ae2cb3f1dd44e56b5d88c103222f859e4ad2c835568ac2ac804a5c11ff438238dacf57fe3ba9da431aba741fd6e7d9d9edb289c0e7767aaa
|
@@ -84,7 +84,7 @@ module SynapsePayRest
|
|
84
84
|
headers = headers.merge({'X-SP-IDEMPOTENCY-KEY' => options[:idempotency_key]})
|
85
85
|
end
|
86
86
|
|
87
|
-
response = with_error_handling { RestClient.post
|
87
|
+
response = with_error_handling { RestClient::Request.execute(:method => :post, :url => full_url(path), :payload => payload.to_json, :headers => headers, :timeout => 300) }
|
88
88
|
p 'RESPONSE:', JSON.parse(response) if @logging
|
89
89
|
JSON.parse(response)
|
90
90
|
end
|
@@ -98,7 +98,7 @@ module SynapsePayRest
|
|
98
98
|
#
|
99
99
|
# @return [Hash] API response
|
100
100
|
def patch(path, payload)
|
101
|
-
response = with_error_handling { RestClient.patch
|
101
|
+
response = with_error_handling { RestClient::Request.execute(:method => :patch, :url => full_url(path), :payload => payload.to_json, :headers => headers, :timeout => 300) }
|
102
102
|
p 'RESPONSE:', JSON.parse(response) if @logging
|
103
103
|
JSON.parse(response)
|
104
104
|
end
|
@@ -137,6 +137,14 @@ module SynapsePayRest
|
|
137
137
|
|
138
138
|
def with_error_handling
|
139
139
|
yield
|
140
|
+
rescue RestClient::Exceptions::Timeout
|
141
|
+
body = {
|
142
|
+
error: {
|
143
|
+
en: "Request Timeout"
|
144
|
+
},
|
145
|
+
http_code: 504
|
146
|
+
}
|
147
|
+
raise Error.from_response(body)
|
140
148
|
rescue RestClient::Exception => e
|
141
149
|
if e.response.headers[:content_type] == 'application/json'
|
142
150
|
body = JSON.parse(e.response.body)
|
data/synapse_pay_rest.gemspec
CHANGED
@@ -7,9 +7,9 @@ Gem::Specification.new do |s|
|
|
7
7
|
s.name = 'synapse_pay_rest'
|
8
8
|
s.version = SynapsePayRest::VERSION
|
9
9
|
s.date = Date.today.to_s
|
10
|
-
s.authors = ['Steven Broderick', '
|
10
|
+
s.authors = ['Steven Broderick', 'Nikki Galusha']
|
11
11
|
s.email = 'help@synapsepay.com'
|
12
|
-
s.summary = '
|
12
|
+
s.summary = 'Synapse v3 Rest Native API Library'
|
13
13
|
s.homepage = 'https://rubygems.org/gems/synapse_pay_rest'
|
14
14
|
s.license = 'MIT'
|
15
15
|
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: synapse_pay_rest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steven Broderick
|
8
|
-
-
|
8
|
+
- Nikki Galusha
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-06-
|
12
|
+
date: 2017-06-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rest-client
|
@@ -207,5 +207,5 @@ rubyforge_project:
|
|
207
207
|
rubygems_version: 2.6.11
|
208
208
|
signing_key:
|
209
209
|
specification_version: 4
|
210
|
-
summary:
|
210
|
+
summary: Synapse v3 Rest Native API Library
|
211
211
|
test_files: []
|