Class: CzechPostB2bClient::Services::ApiCaller
- Inherits:
-
SteppedService::Base
- Object
- SteppedService::Base
- CzechPostB2bClient::Services::ApiCaller
- Defined in:
- lib/czech_post_b2b_client/services/api_caller.rb
Constant Summary collapse
- KNOWN_CONNECTION_ERRORS =
[ Timeout::Error, Errno::EINVAL, Errno::ECONNRESET, EOFError, SocketError, Net::ReadTimeout, Net::HTTPBadResponse, Net::HTTPHeaderSyntaxError, Net::ProtocolError ].freeze
Instance Attribute Summary
Attributes inherited from SteppedService::Base
Instance Method Summary collapse
-
#initialize(endpoint_path:, xml:) ⇒ ApiCaller
constructor
A new instance of ApiCaller.
- #steps ⇒ Object
Methods inherited from SteppedService::Base
call, #call, #errors, #failure?, #finished?, #success?
Constructor Details
#initialize(endpoint_path:, xml:) ⇒ ApiCaller
Returns a new instance of ApiCaller
21 22 23 24 |
# File 'lib/czech_post_b2b_client/services/api_caller.rb', line 21 def initialize(endpoint_path:, xml:) @endpoint_path = endpoint_path @request_xml = xml end |
Instance Method Details
#steps ⇒ Object
26 27 28 |
# File 'lib/czech_post_b2b_client/services/api_caller.rb', line 26 def steps %i[call_api handle_response] end |