Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

open-companies-house

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

open-companies-house

  • 0.2.5
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Open Companies House

Simple ruby wrapper around Companies House Open API

Installation

In your Gemfile

gem "open-companies-house", "~> 0.2.0", require: 'companies_house'

Usage

company = CompaniesHouse.lookup "07495895"
=> #<CompaniesHouse:0x00000100932870 @registration_number="07495895"... >

company["CompanyName"]
=> "GOCARDLESS LTD"

company.sic_code # convenience method
=> "62090"

Caching

If you'd like to cache your requests, you can configure the gem:

# file config/initializers/companies_house.rb

# swap in your own cache here
CompaniesHouse.cache = Rails.cache

# Optional
CompaniesHouse.cache_args = { expires_in: 10.minutes }

Specs

rspec spec

Available Data

The following data is currently available on the company object returned by CompaniesHouse.lookup

Call it like this:

company["RegAddress"]["AddressLine1"]
=> "22-25 FINSBURY SQUARE"

All data:

{
  "CompanyName" : "GOCARDLESS LTD",
  "CompanyNumber" : "07495895",
  "RegAddress" : {
     "AddressLine1" : "22-25 FINSBURY SQUARE",
     "PostTown" : "LONDON",
     "Country" : "UNITED KINGDOM",
     "Postcode" : "EC2A 1DX"
  },
  "CompanyCategory" : "Private Limited Company",
  "CompanyStatus" : "Active",
  "CountryOfOrigin" : "United Kingdom",
  "IncorporationDate" : "17/01/2011",
  "PreviousNames" : [
     {
        "CONDate" : "25/08/2011",
        "CompanyName" : "GROUPAY LIMITED"
     }
  ],
  "Accounts" : {
     "AccountRefDay" : "31",
     "AccountRefMonth" : "01",
     "NextDueDate" : "31/10/2013",
     "LastMadeUpDate" : "31/01/2012",
     "AccountCategory" : "TOTAL EXEMPTION SMALL"
  },
  "Returns" : {
     "NextDueDate" : "14/02/2013",
     "LastMadeUpDate" : "17/01/2012"
  },
  "Mortgages" : {
     "NumMortCharges" : "1",
     "NumMortOutstanding" : "1",
     "NumMortPartSatisfied" : "0",
     "NumMortSatisfied" : "0"
  },
  "SICCodes" : {
     "SicText" : [
        "62090 - Other information technology service activities"
     ]
  }
}

TODO: Use some funky metaprogramming to make these available as human-readable method calls, eg company.name or company.registered_address.line_1.

FAQs

Package last updated on 17 Dec 2012

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc