Class: Soaspec::SoapRequest
- Inherits:
-
Object
- Object
- Soaspec::SoapRequest
- Defined in:
- lib/soaspec/exchange_handlers/request/soap_request.rb
Overview
Models a request made to a SOAP API
Instance Attribute Summary collapse
-
#body ⇒ Hash
Hash representing what will be sent to Savon.
-
#operation ⇒ Symbol
SOAP operation used.
-
#request_option ⇒ Symbol
Method of building the request (:hash, :template).
-
#test_name ⇒ String
Name given to test to describe it.
Instance Method Summary collapse
-
#[](value) ⇒ Object
Result of retrieving value.
-
#initialize(operation, body, request_option) ⇒ SoapRequest
constructor
A new instance of SoapRequest.
-
#to_s ⇒ String
Show inspection of all parameters.
Constructor Details
#initialize(operation, body, request_option) ⇒ SoapRequest
Returns a new instance of SoapRequest.
24 25 26 27 28 |
# File 'lib/soaspec/exchange_handlers/request/soap_request.rb', line 24 def initialize(operation, body, request_option) self.body = body self.operation = operation self.request_option = request_option end |
Instance Attribute Details
#body ⇒ Hash
Hash representing what will be sent to Savon. Either the exact xml (if using a template) or a message Hash that will be converted to XML by Savon
15 16 17 |
# File 'lib/soaspec/exchange_handlers/request/soap_request.rb', line 15 def body @body end |
#operation ⇒ Symbol
Returns SOAP operation used.
9 10 11 |
# File 'lib/soaspec/exchange_handlers/request/soap_request.rb', line 9 def operation @operation end |
#request_option ⇒ Symbol
Returns Method of building the request (:hash, :template).
17 18 19 |
# File 'lib/soaspec/exchange_handlers/request/soap_request.rb', line 17 def request_option @request_option end |
#test_name ⇒ String
Returns Name given to test to describe it.
19 20 21 |
# File 'lib/soaspec/exchange_handlers/request/soap_request.rb', line 19 def test_name @test_name end |
Instance Method Details
#[](value) ⇒ Object
Returns Result of retrieving value.
32 33 34 |
# File 'lib/soaspec/exchange_handlers/request/soap_request.rb', line 32 def [](value) send(value) end |
#to_s ⇒ String
Returns Show inspection of all parameters.
37 38 39 |
# File 'lib/soaspec/exchange_handlers/request/soap_request.rb', line 37 def to_s inspect end |