class CzechPostB2bClient::Services::Communicator
Attributes
request_xml[RW]
response_hash[RW]
response_xml[RW]
Public Instance Methods
steps()
click to toggle source
# File lib/czech_post_b2b_client/services/communicator.rb, line 6 def steps %i[build_request call_api process_response] end
Private Instance Methods
build_request()
click to toggle source
# File lib/czech_post_b2b_client/services/communicator.rb, line 14 def build_request self.request_xml = result_of_subservice(request_builder: request_builder_args) end
call_api()
click to toggle source
# File lib/czech_post_b2b_client/services/communicator.rb, line 18 def call_api self.response_xml = result_of_subservice(api_caller: { endpoint_path: endpoint_path, xml: request_xml }).xml end
process_response()
click to toggle source
# File lib/czech_post_b2b_client/services/communicator.rb, line 22 def process_response self.response_hash = result_of_subservice(response_parser: { xml: response_xml }) @result = build_result_from(response_hash) unless response_hash.nil? end