Class: CorreiosSigep::LogisticReverse::BaseClient
- Inherits:
-
Object
- Object
- CorreiosSigep::LogisticReverse::BaseClient
show all
- Defined in:
- lib/correios_sigep/logistic_reverse/base_client.rb
Constant Summary
collapse
- DEFAULT_TIMEOUT =
30
Instance Method Summary
collapse
Instance Method Details
#invoke(method, message) ⇒ Object
33
34
35
36
37
38
39
40
|
# File 'lib/correios_sigep/logistic_reverse/base_client.rb', line 33
def invoke(method, message)
@client.instance_variable_set(
:@wsdl,
Wasabi::Document.new(CorreiosSigep.configuration.wsdl_base_url)
) if wsdl_base_url_changed?
@client.call(method, message: message)
end
|
#wsdl ⇒ Object
25
26
27
28
29
30
31
|
# File 'lib/correios_sigep/logistic_reverse/base_client.rb', line 25
def wsdl
@wsdl ||= if ENV['GEM_ENV'] == 'test' || CorreiosSigep.configuration.development?
'https://apphom.correios.com.br/logisticaReversaWS/logisticaReversaService/logisticaReversaWS?wsdl'
else
'https://cws.correios.com.br/logisticaReversaWS/logisticaReversaService/logisticaReversaWS?wsdl'
end
end
|