Class: Clerk::Models::Components::Session

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

Instance Method Summary collapse

Methods included from Crystalline::MetadataFields

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

Constructor Details

#initialize(object:, id:, user_id:, client_id:, status:, last_active_at:, expire_at:, abandon_at:, updated_at:, created_at:, actor: nil, last_active_organization_id: nil, latest_activity: nil, tasks: nil) ⇒ Session

Returns a new instance of Session.



50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# File 'lib/clerk/models/components/session.rb', line 50

def initialize(object:, id:, user_id:, client_id:, status:, last_active_at:, expire_at:, abandon_at:, updated_at:, created_at:, actor: nil, last_active_organization_id: nil, latest_activity: nil, tasks: nil)
  @object = object
  @id = id
  @user_id = user_id
  @client_id = client_id
  @status = status
  @last_active_at = last_active_at
  @expire_at = expire_at
  @abandon_at = abandon_at
  @updated_at = updated_at
  @created_at = created_at
  @actor = actor
  @last_active_organization_id = last_active_organization_id
  @latest_activity = latest_activity
  @tasks = tasks
end

Instance Method Details

#==(other) ⇒ Object



68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# File 'lib/clerk/models/components/session.rb', line 68

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 @user_id == other.user_id
  return false unless @client_id == other.client_id
  return false unless @status == other.status
  return false unless @last_active_at == other.last_active_at
  return false unless @expire_at == other.expire_at
  return false unless @abandon_at == other.abandon_at
  return false unless @updated_at == other.updated_at
  return false unless @created_at == other.created_at
  return false unless @actor == other.actor
  return false unless @last_active_organization_id == other.last_active_organization_id
  return false unless @latest_activity == other.latest_activity
  return false unless @tasks == other.tasks
  true
end