Skip to content

amaurybernard/creditsafe-ruby

 
 

Repository files navigation

creditsafe-ruby

Build status: Circle CI

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.

Installation

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.

Usage

Initialise the client with your username and password.

client = Creditsafe::Client.new(username: "foo", password: "bar")

Company Search

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

About

Ruby library for the Creditsafe REST API

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%