Class: WorkOS::ErrorBodyWithCodeStatusCode
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- WorkOS::ErrorBodyWithCodeStatusCode
- Defined in:
- lib/workos/shared/error_body_with_code_status_code.rb
Constant Summary collapse
- HASH_ATTRS =
{ message: :message, code: :code, statusCode: :status_code }.freeze
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#message ⇒ Object
Returns the value of attribute message.
-
#status_code ⇒ Object
Returns the value of attribute status_code.
Instance Method Summary collapse
-
#initialize(json) ⇒ ErrorBodyWithCodeStatusCode
constructor
A new instance of ErrorBodyWithCodeStatusCode.
Constructor Details
#initialize(json) ⇒ ErrorBodyWithCodeStatusCode
Returns a new instance of ErrorBodyWithCodeStatusCode.
18 19 20 21 22 23 |
# File 'lib/workos/shared/error_body_with_code_status_code.rb', line 18 def initialize(json) hash = self.class.normalize(json) @message = hash[:message] @code = hash[:code] @status_code = hash[:statusCode] end |
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code.
13 14 15 |
# File 'lib/workos/shared/error_body_with_code_status_code.rb', line 13 def code @code end |
#message ⇒ Object
Returns the value of attribute message.
13 14 15 |
# File 'lib/workos/shared/error_body_with_code_status_code.rb', line 13 def @message end |
#status_code ⇒ Object
Returns the value of attribute status_code.
13 14 15 |
# File 'lib/workos/shared/error_body_with_code_status_code.rb', line 13 def status_code @status_code end |