Sha256: 3d2f8cfd94e6283a83ff764a38d47ad64dbc6f0748c503f0f447d60e1f07562c

Contents?: true

Size: 384 Bytes

Versions: 4

Compression:

Stored size: 384 Bytes

Contents

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

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
stone_ecommerce-1.0.3 lib/gateway/Parsers/header_parser.rb
mundipagg_sdk-1.0.3 lib/gateway/Parsers/header_parser.rb
stone_ecommerce-1.0.2 lib/gateway/Parsers/header_parser.rb
stone_ecommerce-1.0.0 lib/gateway/Parsers/header_parser.rb