Sha256: acb355f9189169af108dca1ce221074dbc0e7690ba09e9a9eb7c7d3769426617

Contents?: true

Size: 444 Bytes

Versions: 5

Compression:

Stored size: 444 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.3.0 lib/gateway/Parsers/header_parser.rb
stone_ecommerce-1.2.4 lib/gateway/Parsers/header_parser.rb
mundipagg_sdk-1.2.4 lib/gateway/Parsers/header_parser.rb
mundipagg_sdk-1.2.3 lib/gateway/Parsers/header_parser.rb
mundipagg_sdk-1.2.3rc lib/gateway/Parsers/header_parser.rb