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