mirror of
https://github.com/internetee/registry.git
synced 2025-07-29 14:06:21 +02:00
lecolice constants into the local interaction
This commit is contained in:
parent
00aee547dd
commit
2c1051a427
1 changed files with 6 additions and 5 deletions
|
@ -2,6 +2,11 @@ module Actions
|
||||||
class ContactCreate
|
class ContactCreate
|
||||||
attr_reader :contact, :legal_document, :ident, :result
|
attr_reader :contact, :legal_document, :ident, :result
|
||||||
|
|
||||||
|
REGISTERED = 'R'.freeze
|
||||||
|
LIQUIDATED = 'L'.freeze
|
||||||
|
BANKRUPT = 'N'.freeze
|
||||||
|
DELETED = 'K'.freeze
|
||||||
|
|
||||||
def initialize(contact, legal_document, ident)
|
def initialize(contact, legal_document, ident)
|
||||||
@contact = contact
|
@contact = contact
|
||||||
@legal_document = legal_document
|
@legal_document = legal_document
|
||||||
|
@ -81,12 +86,8 @@ module Actions
|
||||||
def maybe_company_is_relevant
|
def maybe_company_is_relevant
|
||||||
return true unless contact.org?
|
return true unless contact.org?
|
||||||
|
|
||||||
p '-=-------'
|
|
||||||
p contact.inspect
|
|
||||||
p '-=-------'
|
|
||||||
|
|
||||||
company_status = contact.return_company_status
|
company_status = contact.return_company_status
|
||||||
return if [Contact::REGISTERED, Contact::LIQUIDATED].include? company_status
|
return if [REGISTERED, LIQUIDATED].include? company_status
|
||||||
|
|
||||||
contact.add_epp_error('2003', nil, 'ident', I18n.t('errors.messages.company_not_registered'))
|
contact.add_epp_error('2003', nil, 'ident', I18n.t('errors.messages.company_not_registered'))
|
||||||
@error = true
|
@error = true
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue