Class: Clerk::Models::Components::CreatorRole

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

Overview

The role assigned to the creator of an organization

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:, created_at:, updated_at:, description: nil, members_count: nil, has_members: nil) ⇒ CreatorRole

Returns a new instance of CreatorRole.



35
36
37
38
39
40
41
42
43
44
45
# File 'lib/clerk/models/components/creator_role.rb', line 35

def initialize(object:, id:, name:, key:, created_at:, updated_at:, description: nil, members_count: nil, has_members: nil)
  @object = object
  @id = id
  @name = name
  @key = key
  @created_at = created_at
  @updated_at = updated_at
  @description = description
  @members_count = members_count
  @has_members = has_members
end

Instance Method Details

#==(other) ⇒ Object



48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'lib/clerk/models/components/creator_role.rb', line 48

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 @created_at == other.created_at
  return false unless @updated_at == other.updated_at
  return false unless @description == other.description
  return false unless @members_count == other.members_count
  return false unless @has_members == other.has_members
  true
end