Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Api adjustments #7

Merged
merged 3 commits into from
Apr 18, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/cmxl/fields/transaction.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def to_h
'reference' => reference,
'bank_reference' => bank_reference,
'currency_letter' => currency_letter
}.merge(details.to_h)
}.merge(details ? details.to_h : {})
end

def to_hash
Expand Down
12 changes: 12 additions & 0 deletions lib/cmxl/statement.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,26 @@ def opening_balance
self.field(60, 'F')
end

def opening_or_intermediary_balance
self.field(60)
end

def closing_balance
self.field(62, 'F')
end

def closing_or_intermediary_balance
self.field(62)
end

def available_balance
self.field(64)
end

def legal_sequence_number
self.field(28).source
end

def to_h
{
'reference' => reference,
Expand Down