mirror of
https://github.com/internetee/registry.git
synced 2025-08-03 16:32:04 +02:00
init
This commit is contained in:
parent
6a41762904
commit
f9436062a6
4 changed files with 186 additions and 4 deletions
|
@ -8,6 +8,8 @@ module Api
|
|||
before_action :authorized_to_manage_locks?
|
||||
|
||||
def create
|
||||
p "============"
|
||||
|
||||
if @domain.apply_registry_lock
|
||||
render json: serialized_domain(@domain)
|
||||
else
|
||||
|
|
|
@ -12,7 +12,6 @@ module Domain::RegistryLockable
|
|||
end
|
||||
|
||||
def apply_registry_lock
|
||||
# binding.pry
|
||||
return unless registry_lockable?
|
||||
return if locked_by_registrant?
|
||||
|
||||
|
|
|
@ -17,11 +17,11 @@ class RegistrantUser < User
|
|||
Country.new(alpha2_code)
|
||||
end
|
||||
|
||||
def companies(company_register = CompanyRegister::Client.new)
|
||||
def companies(company_register = nil)
|
||||
return [] if ident.include?('-')
|
||||
|
||||
company_register.representation_rights(citizen_personal_code: ident,
|
||||
citizen_country_code: country.alpha3)
|
||||
[OpenStruct.new(registration_number: '43344412', company_name: 'TestFirma'),
|
||||
OpenStruct.new(registration_number: '12345678', company_name: 'SuperFirma OU')]
|
||||
end
|
||||
|
||||
def contacts(representable: true)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue