Skip to content
/ bsb_nz Public

BSB lookup for New Zealand

Notifications You must be signed in to change notification settings

zeptofs/bsb_nz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BsbNz

BSB lookup for New Zealand bank branches, and its data source is from paymentsnz.co.nz

It's heavily inspired from the BSB gem for Australia

Installation

Add this line to your application's Gemfile:

gem 'bsb_nz'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install bsb_nz

Usage

Lookup

To lookup a BSB number:

BsbNz.lookup "010004"

and got

{
    :bank_number=>"01",
    :branch_number=>"0004",
    :national_clearing_code=>"010004",
    :bic=>nil,
    :bank_name=>"ANZ Bank New Zealand",
    :branch_information=>"ANZ Retail 2",
    :city=>"Wellington",
    :physical_address_1=>"215-229 Lambton Quay",
    :physical_address_2=>nil,
    :physical_address_3=>nil,
    :physical_address_4=>nil,
    :post_code=>"6001",
    :location=>nil,
    :country_name=>"New Zealand",
    :pob_number=>"PO Box 1393",
    :pob_location_1=>"Wellington",
    :pob_location_2=>nil,
    :pob_location_3=>nil,
    :pob_post_code=>"6140",
    :pob_country=>"New Zealand",
    :std=>"(04)",
    :phone=>"0800 269 296",
    :fax=>"496-7360",
    :retail=>nil,
    :bic_plus_indicator=>"Y",
    :latest_status=>"A"
}

Update source

use rake task to fetch data from paymentsnz.co.nz and generate the data file (default to lib/data/bsb_branch_list.json)

bundle exec rake bsb_nz:generate_branch_list

The rake task will verify the md5 of the data file, if it is changed, it will show

"!!! Data file changed. please update GEM VERSION !!!"

About

BSB lookup for New Zealand

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published