Sha256: d772d3e5f3f0bb3141493a6624eb60246c13530cd397a2744cd12d74c9b8e916

Contents?: true

Size: 428 Bytes

Versions: 5

Compression:

Stored size: 428 Bytes

Contents

module Gateway

  class HeaderParser
    def Parse(elements)
      if elements.length < 4
        throw('The expected parameter count is 4')
      end

      header = Header.new
      header.TransactionProcessedDate = Date.parse(elements[1]).strftime('%Y%m%d')
      header.ReportFileCreateDate = Date.parse(elements[2]).strftime('%Y%m%d %H:%M:%S')
      header.Version = elements[3].chomp

      return header
    end
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
mundipagg_sdk-1.4.1 lib/gateway/Parsers/header_parser.rb
stone_ecommerce-1.4.0 lib/gateway/Parsers/header_parser.rb
mundipagg_sdk-1.4.0 lib/gateway/Parsers/header_parser.rb
stone_ecommerce-1.3.0 lib/gateway/Parsers/header_parser.rb
stone_ecommerce-1.2.3 lib/gateway/Parsers/header_parser.rb