Sha256: c6559c3e466bcfdcbacb8a3e5e7f9dd9cdc51827a5afc08df3bc146507cd0067
Contents?: true
Size: 793 Bytes
Versions: 14
Compression:
Stored size: 793 Bytes
Contents
# frozen_string_literal: true module CzechPostB2bClient module Services class Communicator < CzechPostB2bClient::Services::Orchestrator def steps %i[build_request call_api process_response] end private attr_accessor :request_xml, :response_xml, :response_hash def build_request self.request_xml = result_of_subservice(request_builder: request_builder_args) end def call_api self.response_xml = result_of_subservice(api_caller: { endpoint_path: endpoint_path, xml: request_xml }).xml end 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 end end end
Version data entries
14 entries across 14 versions & 1 rubygems