Class: WorkOS::PasswordStrengthErrorErrorBodyWithErrors

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/workos/user_management/password_strength_error_error_body_with_errors.rb

Constant Summary collapse

HASH_ATTRS =
{
  code: :code,
  message: :message,
  errors: :errors
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ PasswordStrengthErrorErrorBodyWithErrors

Returns a new instance of PasswordStrengthErrorErrorBodyWithErrors.



18
19
20
21
22
23
# File 'lib/workos/user_management/password_strength_error_error_body_with_errors.rb', line 18

def initialize(json)
  hash = self.class.normalize(json)
  @code = hash[:code]
  @message = hash[:message]
  @errors = (hash[:errors] || []).map { |item| item ? WorkOS::ErrorBodyWithCode.new(item) : nil }
end

Instance Attribute Details

#code ⇒ Object

Returns the value of attribute code.



13
14
15
# File 'lib/workos/user_management/password_strength_error_error_body_with_errors.rb', line 13

def code
  @code
end

#errors ⇒ Object

Returns the value of attribute errors.



13
14
15
# File 'lib/workos/user_management/password_strength_error_error_body_with_errors.rb', line 13

def errors
  @errors
end

#message ⇒ Object

Returns the value of attribute message.



13
14
15
# File 'lib/workos/user_management/password_strength_error_error_body_with_errors.rb', line 13

def message
  @message
end