Class: WorkOS::ErrorBodyWithConstraintsPropertyError

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

Constant Summary collapse

HASH_ATTRS =
{
  property: :property,
  constraints: :constraints
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ ErrorBodyWithConstraintsPropertyError

Returns a new instance of ErrorBodyWithConstraintsPropertyError.



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

def initialize(json)
  hash = self.class.normalize(json)
  @property = hash[:property]
  @constraints = hash[:constraints] || {}
end

Instance Attribute Details

#constraints ⇒ Object

Returns the value of attribute constraints.



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

def constraints
  @constraints
end

#property ⇒ Object

Returns the value of attribute property.



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

def property
  @property
end