lib/companies_house_gateway/request.rb
# Compile the complete XML request to send to Companies House
Compile the complete XML request to send to Companies House
Compile the complete XML request to send to Companies House
def build_request_xml(request_type, request_data={})
      transaction_id = (Time.now.to_f * 100).to_i
      builder = Nokogiri::XML::Builder.new do |xml|
        xml.GovTalkMessage(header_namespace) do
          xml.EnvelopeVersion "2.0"
          xml.Header do
            message_details(xml, request_type, transaction_id)
            authentication(xml, transaction_id)
          end
          xml.GovTalkDetails
          xml.Body do
            request_body(xml, request_type, request_data)
          end
        end
      end
      builder.doc
    end
def build_request_xml ( request_type , request_data = { } ) transaction_id = ( Time . now . to_f * 100 ) . to_i builder = Nokogiri :: XML :: Builder . new do | xml | xml . GovTalkMessage ( header_namespace ) do xml . EnvelopeVersion "2.0" xml . Header do message_details ( xml , request_type , transaction_id ) authentication ( xml , transaction_id ) end xml . GovTalkDetails xml . Body do request_body ( xml , request_type , request_data ) end end end builder . doc end
Compile the complete XML request to send to Companies House
Compile the complete XML request to send to Companies House
request_type
<not_specific>
request_data
<not_specific>