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