Class: Soaspec::SoapRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/soaspec/exchange_handlers/request/soap_request.rb

Overview

Models a request made to a SOAP API

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(operation, body, request_option) ⇒ 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

#bodyHash

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

Examples:

{ xml: "<env:Envelope xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" ...</env:Body>\n</env:Envelope> " }


15
16
17
# File 'lib/soaspec/exchange_handlers/request/soap_request.rb', line 15

def body
  @body
end

#operationSymbol

Returns SOAP operation used.

Examples:

SOAP operation

:login


9
10
11
# File 'lib/soaspec/exchange_handlers/request/soap_request.rb', line 9

def operation
  @operation
end

#request_optionSymbol



17
18
19
# File 'lib/soaspec/exchange_handlers/request/soap_request.rb', line 17

def request_option
  @request_option
end

#test_nameString



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



32
33
34
# File 'lib/soaspec/exchange_handlers/request/soap_request.rb', line 32

def [](value)
  send(value)
end

#to_sString



37
38
39
# File 'lib/soaspec/exchange_handlers/request/soap_request.rb', line 37

def to_s
  inspect
end