moneta-api 1.3.0 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/LICENSE.txt +1 -1
- data/lib/moneta/api/http_exception.rb +5 -0
- data/lib/moneta/api/service_methods.rb +2 -0
- data/lib/moneta/api/version.rb +1 -1
- data/lib/moneta/api.rb +1 -0
- data/spec/lib/moneta/api/service_spec.rb +6 -0
- data/spec/vcr/moneta_api_service_find_account_by_id/when_soap_http_error_.yml +37 -0
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 65fd81e67ce614a1bc31b895f2c105ec68a30807
|
4
|
+
data.tar.gz: 69d02d7b6abb626d2588902a95743dcbf7b4d088
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6be281b398a3fd97c3c100c432a166cd83a775d32f7b49a1ab524d750ab6985568ea8579877fb42df6c83a7dd5a40d4057fe7f642a185cf521328009f75c0a2e
|
7
|
+
data.tar.gz: 690248a5900235efc708dfe590a2f5b0c46dae3011b4f1725254e688c9121f33e03e5546e8955dd18447f3fcbc7e363025b2127ccf1a799606e84c79307b58b5
|
data/.travis.yml
CHANGED
data/LICENSE.txt
CHANGED
@@ -187,6 +187,8 @@ module Moneta
|
|
187
187
|
ResponseFactory.build(response)
|
188
188
|
rescue Savon::SOAPFault => e
|
189
189
|
raise Moneta::Api::RuntimeException.new(e.message)
|
190
|
+
rescue Savon::HTTPError => e
|
191
|
+
raise Moneta::Api::HTTPException.new(e.message)
|
190
192
|
end
|
191
193
|
|
192
194
|
def validate!(method, request)
|
data/lib/moneta/api/version.rb
CHANGED
data/lib/moneta/api.rb
CHANGED
@@ -7,6 +7,7 @@ require 'moneta/api/service'
|
|
7
7
|
require 'moneta/api/data_mapper'
|
8
8
|
require 'moneta/api/key_value_serializer'
|
9
9
|
require 'moneta/api/runtime_exception'
|
10
|
+
require 'moneta/api/http_exception'
|
10
11
|
|
11
12
|
require 'moneta/api/types/account_access_info'
|
12
13
|
require 'moneta/api/types/account_info'
|
@@ -16,6 +16,12 @@ describe Moneta::Api::Service do
|
|
16
16
|
|
17
17
|
it { expect { subject }.to raise_exception(Moneta::Api::RuntimeException, '(SOAP-ENV:Client) Validation error') }
|
18
18
|
end
|
19
|
+
|
20
|
+
context 'when soap http error' do
|
21
|
+
let(:account_id) { -2 }
|
22
|
+
|
23
|
+
it { expect { subject }.to raise_exception(Moneta::Api::HTTPException) }
|
24
|
+
end
|
19
25
|
end
|
20
26
|
|
21
27
|
describe 'wsdl url' do
|
@@ -0,0 +1,37 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://demo.moneta.ru/services.wsdl
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
accept-encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
accept:
|
13
|
+
- '*/*'
|
14
|
+
user-agent:
|
15
|
+
- Ruby
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 502
|
19
|
+
message: Bad Gateway
|
20
|
+
headers:
|
21
|
+
server:
|
22
|
+
- nginx/1.6.2
|
23
|
+
date:
|
24
|
+
- Tue, 17 Nov 2015 06:20:38 GMT
|
25
|
+
content-type:
|
26
|
+
- text/html
|
27
|
+
content-length:
|
28
|
+
- '172'
|
29
|
+
connection:
|
30
|
+
- keep-alive
|
31
|
+
body:
|
32
|
+
encoding: UTF-8
|
33
|
+
string: "<html>\r\n<head><title>502 Bad Gateway</title></head>\r\n<body bgcolor=\"white\">\r\n<center><h1>502
|
34
|
+
Bad Gateway</h1></center>\r\n<hr><center>nginx/1.6.2</center>\r\n</body>\r\n</html>\r\n"
|
35
|
+
http_version: '1.1'
|
36
|
+
recorded_at: Tue, 17 Nov 2015 06:20:38 GMT
|
37
|
+
recorded_with: VCR 2.9.3
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: moneta-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ssnikolay
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-11-
|
12
|
+
date: 2015-11-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: savon
|
@@ -169,6 +169,7 @@ files:
|
|
169
169
|
- Rakefile
|
170
170
|
- lib/moneta/api.rb
|
171
171
|
- lib/moneta/api/data_mapper.rb
|
172
|
+
- lib/moneta/api/http_exception.rb
|
172
173
|
- lib/moneta/api/key_value_serializer.rb
|
173
174
|
- lib/moneta/api/requests/authorise_transaction_batch_request.rb
|
174
175
|
- lib/moneta/api/requests/authorise_transaction_request.rb
|
@@ -325,6 +326,7 @@ files:
|
|
325
326
|
- spec/vcr/moneta_api_requests_profile_editclientprofilerequest/success_.yml
|
326
327
|
- spec/vcr/moneta_api_requests_profile_editorganizationprofilerequest/success_.yml
|
327
328
|
- spec/vcr/moneta_api_requests_transferrequest/transfer_status_.yml
|
329
|
+
- spec/vcr/moneta_api_service_find_account_by_id/when_soap_http_error_.yml
|
328
330
|
- spec/vcr/moneta_api_service_find_account_by_id/when_soap_raise_error_.yml
|
329
331
|
- spec/vcr/moneta_api_service_find_account_by_id/when_success_response_account_id_.yml
|
330
332
|
homepage: https://www.moneta.ru/doc/MONETA.MerchantAPI.v2.ru.pdf
|
@@ -408,6 +410,7 @@ test_files:
|
|
408
410
|
- spec/vcr/moneta_api_requests_profile_editclientprofilerequest/success_.yml
|
409
411
|
- spec/vcr/moneta_api_requests_profile_editorganizationprofilerequest/success_.yml
|
410
412
|
- spec/vcr/moneta_api_requests_transferrequest/transfer_status_.yml
|
413
|
+
- spec/vcr/moneta_api_service_find_account_by_id/when_soap_http_error_.yml
|
411
414
|
- spec/vcr/moneta_api_service_find_account_by_id/when_soap_raise_error_.yml
|
412
415
|
- spec/vcr/moneta_api_service_find_account_by_id/when_success_response_account_id_.yml
|
413
416
|
has_rdoc:
|