Class: WorkOS::ErrorBodyWithError

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/workos/shared/error_body_with_error.rb

Constant Summary collapse

HASH_ATTRS =
{
  error: :error,
  message: :message
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ ErrorBodyWithError

Returns a new instance of ErrorBodyWithError.



16
17
18
19
20
# File 'lib/workos/shared/error_body_with_error.rb', line 16

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

Instance Attribute Details

#error ⇒ Object

Returns the value of attribute error.



12
13
14
# File 'lib/workos/shared/error_body_with_error.rb', line 12

def error
  @error
end

#message ⇒ Object

Returns the value of attribute message.



12
13
14
# File 'lib/workos/shared/error_body_with_error.rb', line 12

def message
  @message
end