class BanksApi::Shinsei::Transaction
Attributes
ref_no[R]
Public Class Methods
from_csv_line(csv_line, currency:)
click to toggle source
# File lib/banks_api/shinsei/transaction.rb, line 11 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
new(ref_no:, **other)
click to toggle source
Calls superclass method
# File lib/banks_api/shinsei/transaction.rb, line 6 def initialize(ref_no:, **other) super(other) @ref_no = ref_no end