levelfiveteam/govuk-companieshouse-php-sdk

v1.1 2020-01-24 21:59 UTC

This package is auto-updated.

Last update: 2020-08-28 00:59:14 UTC


README

This is the Companies House integration using PHP.

This repository is actively used in projects, and we will be maintaining it regularly.

Build Status Total Downloads Latest Stable Version Latest Unstable Version Coverage Status License

Instructions

This is the Companies House PHP SDK Kit that allows you to provide a full facility to access companies house, and verify companies.

  1. Simply set your application to store the service as a factory;
$companiesHouse = new CompaniesHouse('api_key');
  1. Create commands and queries as and when you need to (example below returns back a response to give you the API Version);

Example query:

$response = $companiesHouse->handle(new GetCompanyByCompanyNumber(['company_number' => '12341234']));

Example Command:

$command = new GetCompanyByCompanyNumber(['company_number' => '12341234']);
$company = $companiesHouse->handle($command);

You will not need to validate data using this service. Validation happens at the command level. Any validation errors will return as a DomainException with a json error message.

The valid response will be an immutable object, with the option to see the the full response.

Important note; we are actively adding new commands.

Submitting bugs and feature requests

Bugs and feature requests are tracked on GitHub.

We are actively updating the SDK Kit.

Licence

You are free to reuse and adapt this content with credit, for non-commercial purposes. Please review License for further information.