Class: Sei::Connection

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/sei/connection.rb

Instance Method Summary collapse

Instance Method Details

#call(service, message) ⇒ Object



14
15
16
17
18
# File 'lib/sei/connection.rb', line 14

def call(service, message)
  request = client.build_request service, message: message
  Sei::Printer.xp request.body
  client.call service, message
end

#clientObject



9
10
11
12
# File 'lib/sei/connection.rb', line 9

def client
  @client ||= Savon.client wsdl: Sei.configuration.wsdl, follow_redirects: Sei.configuration.follow_redirects,
                            pretty_print_xml: Sei.configuration.pretty_print_xml, convert_request_keys_to: :camelcase
end