module UkCompaniesHouse::Company

Public Class Methods

basic_information(company_number) click to toggle source

Basic company information

# File lib/uk_companies_house/company.rb, line 22
def basic_information(company_number)
  number = "#{company_number}".gsub(/[^a-zA-Z0-9]/, "")
  client.get("/company/#{number}")
end
charge(company_number, charge_id) click to toggle source

Individual charge information for company.

# File lib/uk_companies_house/company.rb, line 63
def charge(company_number, charge_id)
  client.get("company/#{company_number}/charges/#{charge_id}/")
end
charges(company_number, items_per_page = nil, start_index = nil) click to toggle source

List of charges for a company.

# File lib/uk_companies_house/company.rb, line 68
def charges(company_number, items_per_page = nil, start_index = nil)
  params = {}
  if items_per_page
    params[:items_per_page] = items_per_page
  end
  if start_index
    params[:start_index] = start_index
  end
  client.get("company/#{company_number}/charges/", params)
end
client() click to toggle source
# File lib/uk_companies_house/company.rb, line 5
def client
  UkCompaniesHouse::Client.new
end
corporate_entities(company_number) click to toggle source

List of uk-establishments companies

# File lib/uk_companies_house/company.rb, line 85
def corporate_entities(company_number)
  client.get("/company/#{company_number}/persons-with-significant-control/")
end
corporate_entity(company_number, psc_id) click to toggle source

Get details of a corporate entity with significant control

# File lib/uk_companies_house/company.rb, line 95
def corporate_entity(company_number, psc_id)
  client.get("/company/#{company_number}/persons-with-significant-control/corporate-entity/#{psc_id}")
end
exemptions(company_number) click to toggle source

Company exemptions information

# File lib/uk_companies_house/company.rb, line 125
def exemptions(company_number)
  client.get("/company/#{company_number}/exemptions")
end
filing_history(company_number, transaction_id) click to toggle source

Get the filing history list of a company

# File lib/uk_companies_house/company.rb, line 44
def filing_history(company_number, transaction_id)
  client.get("company/#{company_number}/filing-history/#{transaction_id}/")
end
filing_history_list(company_number, category = nil, items_per_page = nil, start_index = nil) click to toggle source

Get the filing history list of a company

# File lib/uk_companies_house/company.rb, line 49
def filing_history_list(company_number, category = nil, items_per_page = nil, start_index = nil)
  params = {category: category}
  params[:items_per_page] = items_per_page if items_per_page
  params[:start_index] = start_index if start_index

  client.get("company/#{company_number}/officers/", params)
end
get_super_secure_person(company_number, super_secure_id) click to toggle source

Get details of a person with significant control statement

# File lib/uk_companies_house/company.rb, line 115
def get_super_secure_person(company_number, super_secure_id)
  client.get("/company/#{company_number}/persons-with-significant-control/super-secure/#{super_secure_id}")
end
individual_person(company_number, psc_id) click to toggle source

Get details of an individual person with significant control

# File lib/uk_companies_house/company.rb, line 90
def individual_person(company_number, psc_id)
  client.get("/company/#{company_number}/persons-with-significant-control/individual/#{psc_id}")
end
insolvency(company_number) click to toggle source

Company insolvency information.

# File lib/uk_companies_house/company.rb, line 58
def insolvency(company_number)
  client.get("company/#{company_number}/insolvency/")
end
list_statements(company_number) click to toggle source

List of all persons with significant control statements

# File lib/uk_companies_house/company.rb, line 105
def list_statements(company_number)
  client.get("/company/#{company_number}/persons-with-significant-control-statements")
end
office_address(company_number) click to toggle source

Registered office address

# File lib/uk_companies_house/company.rb, line 28
def office_address(company_number)
  client.get("company/#{company_number}/registered-office-address/")
end
officers(company_number, items_per_page = nil, start_index = nil, register_type = nil, order_by = nil, register_view = nil) click to toggle source

List of all company officers

# File lib/uk_companies_house/company.rb, line 33
def officers(company_number, items_per_page = nil, start_index = nil, register_type = nil, order_by = nil, register_view = nil)
  params = {}
  params[:items_per_page] = items_per_page if items_per_page
  params[:start_index] = start_index if start_index
  params[:register_type] = register_type if register_type
  params[:order_by] = order_by if order_by
  params[:register_view] = register_view if register_view
  client.get("company/#{company_number}/officers/", params)
end
registers(company_number) click to toggle source

Company registers information

# File lib/uk_companies_house/company.rb, line 120
def registers(company_number)
  client.get("/company/#{company_number}/registers")
end
statements(company_number) click to toggle source

Get details of a person with significant control statement

# File lib/uk_companies_house/company.rb, line 110
def statements(company_number)
  client.get("/company/#{company_number}/persons-with-significant-control-statements/#{statement_id}")
end
uk_establishments(company_number) click to toggle source

List of uk-establishments companies

# File lib/uk_companies_house/company.rb, line 80
def uk_establishments(company_number)
  client.get("/company/#{company_number}/uk-establishments/")
end