Module: Biro::Utils::Soap

Included in:
Bacen::Request, Midia100::Request, Ph3a::Request, Spc::Request
Defined in:
lib/biro/utils/soap.rb

Instance Method Summary collapse

Instance Method Details

#savon_optionsObject



22
23
24
# File 'lib/biro/utils/soap.rb', line 22

def savon_options
  {}
end

#soapObject



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/biro/utils/soap.rb', line 6

def soap
  default_options = {
    wsdl: wsdl,
    convert_request_keys_to: :none,
    logger: Biro.config.logger,
    log_level: :debug,
    log: true
  }

  @savon ||= Savon.client(default_options.merge(savon_options))
end

#wsdlObject



18
19
20
# File 'lib/biro/utils/soap.rb', line 18

def wsdl
  url = Biro.development? ? self.development_url : self.production_url
end