Class: Rafflesia::AuthError

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/auth/auth_error.rb

Constant Summary collapse

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ AuthError

Returns a new instance of AuthError.



19
20
21
22
23
24
25
# File 'lib/rafflesia/auth/auth_error.rb', line 19

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @code = hash[:code]
  @details = hash[:details]
  @message = hash[:message]
end

Instance Attribute Details

#codeObject

Returns the value of attribute code.



14
15
16
# File 'lib/rafflesia/auth/auth_error.rb', line 14

def code
  @code
end

#detailsObject

Returns the value of attribute details.



14
15
16
# File 'lib/rafflesia/auth/auth_error.rb', line 14

def details
  @details
end

#messageObject

Returns the value of attribute message.



14
15
16
# File 'lib/rafflesia/auth/auth_error.rb', line 14

def message
  @message
end