Sha256: 9921e3b37406bf320747a8f171424a4fdab06c8bcc7ae78f092eef9a1bce7d77

Contents?: true

Size: 522 Bytes

Versions: 13

Compression:

Stored size: 522 Bytes

Contents

module Sei

  require "singleton"

  class Connection

    include Singleton

    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

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

  end

end

Version data entries

13 entries across 13 versions & 3 rubygems

Version Path
zei-0.2.5 lib/sei/connection.rb
zei-0.2.4 lib/sei/connection.rb
zei-0.2.3 lib/sei/connection.rb
zei-0.2.1 lib/sei/connection.rb
zei-0.2.0 lib/sei/connection.rb
zei-0.1.9 lib/sei/connection.rb
zei-0.1.8 lib/sei/connection.rb
zei-0.1.7 lib/sei/connection.rb
zei-0.1.6 lib/sei/connection.rb
zei-0.1.5 lib/sei/connection.rb
sei-0.1.4 lib/sei/connection.rb
sei-ima-0.1.2 lib/sei/connection.rb
sei-0.1.1 lib/sei/connection.rb