Sha256: 94758b31659646889644873ab8b0327e77dfbd49ac8374912b2f8980586c5183
Contents?: true
Size: 541 Bytes
Versions: 1
Compression:
Stored size: 541 Bytes
Contents
module BanksApi module Shinsei class Transaction < Transaction attr_reader :ref_no def initialize(ref_no:, **other) super(other) @ref_no = ref_no end def self.from_csv_line(csv_line, currency:) new( date: Date.parse(csv_line[:date]), ref_no: csv_line[:ref_no], description: csv_line[:description], amount: csv_line[:credit].to_i - csv_line[:debit].to_i, # can both be non zero? currency: currency ) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
banks_api-shinsei-0.1.2 | lib/banks_api/shinsei/transaction.rb |