Class: Clerk::Models::Components::RoleSet

Inherits:
Object
  • Object
show all
Includes:
Crystalline::MetadataFields
Defined in:
lib/clerk/models/components/roleset.rb

Overview

A role set defines a collection of roles that can be assigned to organization members

Instance Method Summary collapse

Methods included from Crystalline::MetadataFields

#field, #fields, included, #marshal_single, #to_dict, #to_json

Constructor Details

#initialize(object:, id:, name:, key:, roles:, type:, created_at:, updated_at:, description: nil, default_role: nil, creator_role: nil, role_set_migration: nil) ⇒ RoleSet

Returns a new instance of RoleSet.



41
42
43
44
45
46
47
48
49
50
51
52
53
54
# File 'lib/clerk/models/components/roleset.rb', line 41

def initialize(object:, id:, name:, key:, roles:, type:, created_at:, updated_at:, description: nil, default_role: nil, creator_role: nil, role_set_migration: nil)
  @object = object
  @id = id
  @name = name
  @key = key
  @roles = roles
  @type = type
  @created_at = created_at
  @updated_at = updated_at
  @description = description
  @default_role = default_role
  @creator_role = creator_role
  @role_set_migration = role_set_migration
end

Instance Method Details

#==(other) ⇒ Object



57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# File 'lib/clerk/models/components/roleset.rb', line 57

def ==(other)
  return false unless other.is_a? self.class
  return false unless @object == other.object
  return false unless @id == other.id
  return false unless @name == other.name
  return false unless @key == other.key
  return false unless @roles == other.roles
  return false unless @type == other.type
  return false unless @created_at == other.created_at
  return false unless @updated_at == other.updated_at
  return false unless @description == other.description
  return false unless @default_role == other.default_role
  return false unless @creator_role == other.creator_role
  return false unless @role_set_migration == other.role_set_migration
  true
end