Class: WorkOS::ReplaceGroupRoleAssignments

Inherits:
Types::BaseModel show all
Defined in:
lib/workos/authorization/replace_group_role_assignments.rb

Constant Summary collapse

HASH_ATTRS =
{
  role_assignments: :role_assignments
}.freeze

Instance Attribute Summary collapse

Attributes inherited from Types::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from Types::BaseModel

normalize

Methods included from HashProvider

#inspect, #to_h, #to_json

Constructor Details

#initialize(json) ⇒ ReplaceGroupRoleAssignments

Returns a new instance of ReplaceGroupRoleAssignments.



13
14
15
16
# File 'lib/workos/authorization/replace_group_role_assignments.rb', line 13

def initialize(json)
  hash = self.class.normalize(json)
  @role_assignments = (hash[:role_assignments] || []).map { |item| item ? WorkOS::ReplaceGroupRoleAssignmentEntry.new(item) : nil }
end

Instance Attribute Details

#role_assignmentsObject

Returns the value of attribute role_assignments.



11
12
13
# File 'lib/workos/authorization/replace_group_role_assignments.rb', line 11

def role_assignments
  @role_assignments
end