Class: Clerk::Models::Operations::M2mToken

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

Instance Method Summary collapse

Methods included from Crystalline::MetadataFields

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

Constructor Details

#initialize(object:, id:, subject:, revoked:, expired:, created_at:, updated_at:, scopes: nil, revocation_reason: nil, expiration: nil, last_used_at: nil, claims: nil) ⇒ M2mToken

Returns a new instance of M2mToken.



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

def initialize(object:, id:, subject:, revoked:, expired:, created_at:, updated_at:, scopes: nil, revocation_reason: nil, expiration: nil, last_used_at: nil, claims: nil)
  @object = object
  @id = id
  @subject = subject
  @revoked = revoked
  @expired = expired
  @created_at = created_at
  @updated_at = updated_at
  @scopes = scopes
  @revocation_reason = revocation_reason
  @expiration = expiration
  @last_used_at = last_used_at
  @claims = claims
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/operations/m2m_token.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 @subject == other.subject
  return false unless @revoked == other.revoked
  return false unless @expired == other.expired
  return false unless @created_at == other.created_at
  return false unless @updated_at == other.updated_at
  return false unless @scopes == other.scopes
  return false unless @revocation_reason == other.revocation_reason
  return false unless @expiration == other.expiration
  return false unless @last_used_at == other.last_used_at
  return false unless @claims == other.claims
  true
end