Class: WorkOS::PatchGroupRoleAssignments

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/workos/authorization/patch_group_role_assignments.rb

Constant Summary collapse

HASH_ATTRS =
{
  add: :add,
  remove: :remove
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ PatchGroupRoleAssignments

Returns a new instance of PatchGroupRoleAssignments.



16
17
18
19
20
# File 'lib/workos/authorization/patch_group_role_assignments.rb', line 16

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

Instance Attribute Details

#add ⇒ Object

Returns the value of attribute add.



12
13
14
# File 'lib/workos/authorization/patch_group_role_assignments.rb', line 12

def add
  @add
end

#remove ⇒ Object

Returns the value of attribute remove.



12
13
14
# File 'lib/workos/authorization/patch_group_role_assignments.rb', line 12

def remove
  @remove
end