module UkCompaniesHouse::Company
Public Class Methods
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
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
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
# File lib/uk_companies_house/company.rb, line 5 def client UkCompaniesHouse::Client.new end
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
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
Company
exemptions information
# File lib/uk_companies_house/company.rb, line 125 def exemptions(company_number) client.get("/company/#{company_number}/exemptions") end
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
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 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
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
Company
insolvency information.
# File lib/uk_companies_house/company.rb, line 58 def insolvency(company_number) client.get("company/#{company_number}/insolvency/") end
Get details of a legal person with significant control
# File lib/uk_companies_house/company.rb, line 100 def legal_persons(company_number, psc_id) client.get("/company/#{company_number}/persons-with-significant-control/legal-person/#{psc_id}") end
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
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
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
Company
registers information
# File lib/uk_companies_house/company.rb, line 120 def registers(company_number) client.get("/company/#{company_number}/registers") end
Search
company information
# File lib/uk_companies_house/company.rb, line 10 def search(query, items_per_page = nil, start_index = nil) params = {q: query} if items_per_page params[:items_per_page] = items_per_page end if start_index params[:start_index] = start_index end client.get("search/companies", params) end
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
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