Sha256: 0e9fb5a6e4946532a180821e4fa3ce3deb5dcd5407588763e8f238369c491ec6

Contents?: true

Size: 728 Bytes

Versions: 1

Compression:

Stored size: 728 Bytes

Contents

module Nordea
  module FileTransfer
    # https://filetransfer.nordea.com/services/CorporateFileService.xsd1.xsd
    class RequestHeader
      include Virtus

      attribute :sender_id, String, :required => true
      attribute :request_id, String, :required => true
      attribute :timestamp, DateTime, :required => true
      attribute :language, String
      attribute :user_agent, String
      attribute :receiver_id, String, :required => true

      def to_hash
        hash = { "RequestHeader" => { } }
        attributes.each do |key, value|
          hash["RequestHeader"][key.to_s.camelcase] = value if value
        end
        hash
      end

      def to_xml
        Gyoku.xml(to_hash)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
nordea-filetransfer-0.2.1 lib/nordea/file_transfer/request_header.rb