A ruby library for interacting with the Creditsafe API.
Currently, it only partially implements the API to support finding companies by registration number (and name in Germany), and retrieving company online reports.
Install the gem from RubyGems.org by adding the following to your Gemfile
:
gem 'creditsafe', :git => 'https://github.com/amaurybernard/creditsafe-ruby.git'
Just run bundle install
to install the gem and its dependencies.
Initialise the client with your username
and password
.
client = Creditsafe::Client.new(username: "foo", password: "bar")
To perform a search for a company, you need to provide a valid search criteria, including the country code and a company registration number or company name:
client.companies({ countries: "GB", regNo: "07495895" })
=> {
name: "GOCARDLESS LTD",
type: "Ltd",
status: "Active",
registration_number: "07495895",
address: {
simple_value: "338-346, GOSWELL, LONDON",
postal_code: "EC1V7LQ"
},
available_report_types: { available_report_type: "Full" },
available_languages: { available_language: "EN" },
@date_of_latest_accounts: "2014-01-31T00:00:00Z",
@online_reports: "true",
@monitoring: "false",
@country: "GB",
@id: "GB003/0/07495895"
}
Originaly form GoCardless ♥ open source. If you do too, come join us. Rewrite for the new REST API by AH3