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
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(wsdl, operation, message) ⇒ SoapClient
constructor
A new instance of SoapClient.
Constructor Details
#initialize(wsdl, operation, message) ⇒ SoapClient
Returns a new instance of SoapClient.
9 10 11 12 13 |
# File 'lib/rms_api_ruby/chain/soap_client.rb', line 9 def initialize(wsdl, operation, ) @client = Savon.client(wsdl: wsdl) @operation = operation = end |
Instance Method Details
#call ⇒ Object
15 16 17 18 19 20 |
# File 'lib/rms_api_ruby/chain/soap_client.rb', line 15 def call chain { @response = @client.call(@operation, message: ) } when_falsy { status_code == SUCCESS }. dam { handle_http_error } chain(:response) { parse_to_mash } end |