alfa_insurance 0.1.3 → 0.1.4
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/alfa_insurance/base_client.rb +11 -3
- data/lib/alfa_insurance/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 224c1f6d4d6ebf123c34ae82034dfcd52ac85ea1
|
|
4
|
+
data.tar.gz: da7d957817070d8a43613a6fd9b4c0507fc45db5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 57cfa495a08656957179d6d9fb610e8a36ea0c372159a8263dc13d96851b7ba5764aaed85944f82d40c15f06e63ab7d0e70be8781ebc2bc486c7289f9b2c04a1
|
|
7
|
+
data.tar.gz: 604ccaa1da13c7c9d54285272f4a8f5d907426192f86cbb472f7345742c0ad622b0538c09a5457c50ef3e26cb0023e0156f8dfd3d80d6211ddc905591a9e37a6
|
|
@@ -2,9 +2,9 @@ module AlfaInsurance
|
|
|
2
2
|
class BaseClient
|
|
3
3
|
SANDBOX_WSDL = 'https://uat-tes.alfastrah.ru/travel-ext-services/TravelExtService?wsdl'.freeze
|
|
4
4
|
|
|
5
|
-
attr_accessor :log, :log_level, :operator, :product_code, :wsdl
|
|
5
|
+
attr_accessor :log, :log_level, :operator, :product_code, :wsdl, :timeout
|
|
6
6
|
|
|
7
|
-
def initialize(debug: false, wsdl: SANDBOX_WSDL, operator:, product_code:)
|
|
7
|
+
def initialize(debug: false, wsdl: SANDBOX_WSDL, operator:, product_code:, timeout: 5)
|
|
8
8
|
if debug
|
|
9
9
|
@log_level = :debug
|
|
10
10
|
@log = true
|
|
@@ -14,6 +14,7 @@ module AlfaInsurance
|
|
|
14
14
|
@wsdl = wsdl
|
|
15
15
|
@operator = operator
|
|
16
16
|
@product_code = product_code
|
|
17
|
+
@timeout = timeout
|
|
17
18
|
end
|
|
18
19
|
|
|
19
20
|
def get_available_products
|
|
@@ -74,7 +75,14 @@ module AlfaInsurance
|
|
|
74
75
|
end
|
|
75
76
|
|
|
76
77
|
def soap_client
|
|
77
|
-
@client ||= Savon.client(
|
|
78
|
+
@client ||= Savon.client(
|
|
79
|
+
wsdl: wsdl,
|
|
80
|
+
log_level: log_level,
|
|
81
|
+
log: log,
|
|
82
|
+
pretty_print_xml: log,
|
|
83
|
+
open_timeout: timeout,
|
|
84
|
+
read_timeout: timeout
|
|
85
|
+
)
|
|
78
86
|
end
|
|
79
87
|
|
|
80
88
|
def action_namespace(action)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: alfa_insurance
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Alexander Sviridov
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-03-
|
|
11
|
+
date: 2018-03-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: savon
|