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