updated restore function

This commit is contained in:
olegphenomenon 2021-10-22 13:40:33 +03:00
parent f65063f6a5
commit 6a050f9ce3
5 changed files with 14 additions and 6 deletions

View file

@ -17,11 +17,11 @@ class RegistrantUser < User
Country.new(alpha2_code)
end
def companies(company_register = nil)
def companies(company_register = CompanyRegister::Client.new)
return [] if ident.include?('-')
[OpenStruct.new(registration_number: '43344412', company_name: 'TestFirma'),
OpenStruct.new(registration_number: '12345678', company_name: 'SuperFirma OU')]
company_register.representation_rights(citizen_personal_code: ident,
citizen_country_code: country.alpha3)
end
def contacts(representable: true)