
Security News
Astral Launches pyx: A Python-Native Package Registry
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
This is a simple gem to parse Nigerian bank statements of all formats. If your bank and/or file format is not supported, consider reading the contribute wiki and submitting a pull request.
Because not everyone develops in rails, we created a public API to use the gem at http://bank-parser.square-api.com/parse. The parameters are (bank_key, file_path, password). Read the Usage section for more information
http://bank-parser.square-api.com/parse(bank_key, file_path, password)
Add this line to your application's Gemfile:
gem 'ng-bank-parser'
And then execute:
$ bundle
Or install it yourself as:
$ gem install ng-bank-parser
Using the gem is pretty straightforward and simple.
result = NgBankParser::Router.parse(bank_key, file_path, password)
bank_key
is the key of the bank that provides the statement. There's a list of supported banks and formats below, therefore use the key provided for each bank.
file_path
is obviously where the file you're trying to parse exists.
password
(optional) it's only required when the file you want to parse is password protected.
result
is a hash that contains all the information you need from your statment.
result = {
status: 200,
data: {
bank_name: the_bank_name,
account_number: the_account_number,
account_name: the_account_name,
from_date: first_transaction_date,
to_date: last_transaction_date,
transactions: an_array_of_transaction_hashes
}
}
:status
can either be 200 or 400. 200 for when the parsing is succesful and 200 for when it's not. A status of 400 is accompanied with an error message that aims to clarify why it could not parse the file.
result = {
status: 400,
message: "RELEVANT ERROR MESSAGE"
}
Furthermore, :transactions
in the result
hash is an array of hashes. Below is an example of a transaction hash
transaction = {
date: transaction_date,
amount: transaction_amount,
type: debit_or_credit,
balance: balance_after_transaction,
remarks: remarks,
ref: reference_id, # as provided by the statment
}
United Bank for Africa:
Guaranty Trust Bank:
First Bank:
Heritage Bank:
Access Bank:
Ecobank:
Documentation on contribution can be found in the contribution wiki
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that ng-bank-parser demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.
Security News
The latest Opengrep releases add Apex scanning, precision rule tuning, and performance gains for open source static code analysis.