Class: RmsApiRuby::Chain::SoapClient
- Inherits:
-
RmsApiRuby::Chain
- Object
- RmsApiRuby::Chain
- RmsApiRuby::Chain::SoapClient
- Defined in:
- lib/rms_api_ruby/chain/soap_client.rb
Constant Summary collapse
- SUCCESS =
200
- FAILURE =
500
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(wsdl, operation, message, return_method) ⇒ SoapClient
constructor
A new instance of SoapClient.
Constructor Details
#initialize(wsdl, operation, message, return_method) ⇒ SoapClient
Returns a new instance of SoapClient.
10 11 12 13 14 15 |
# File 'lib/rms_api_ruby/chain/soap_client.rb', line 10 def initialize(wsdl, operation, , return_method) @client = Savon.client(wsdl: wsdl) @operation = operation = @return_method = return_method end |
Instance Method Details
#call ⇒ Object
17 18 19 20 21 22 |
# File 'lib/rms_api_ruby/chain/soap_client.rb', line 17 def call chain { execute_request } when_falsy { status_code == SUCCESS }. dam { handle_http_error } chain(:response) { parse_to_mash } end |