Class: InternetBS::DotEUAttributes

Inherits:
AdditionalAttributes show all
Defined in:
lib/internetbs/dot_eu_attributes.rb

Instance Method Summary collapse

Methods inherited from AdditionalAttributes

#admin_params, #billing_params, #mandatory_params, #optional_params, #zone_params

Methods inherited from Base

#inspect

Instance Method Details

#registrant_paramsObject



7
8
9
10
# File 'lib/internetbs/dot_eu_attributes.rb', line 7

def registrant_params
  params = {'registrant_language' => @language}
  return params
end

#valid?(inputs = {}) ⇒ Boolean

Returns:

  • (Boolean)


12
13
14
15
16
17
18
# File 'lib/internetbs/dot_eu_attributes.rb', line 12

def valid?(inputs = {})
  ensure_attribute_has_value :language
  unless @language && LANGUAGE_CODES.include?(@language)
    @errors << "language must be one of LANGUAGE_CODES"
  end
  super
end