Class: Clerk::Models::Components::TrustedDevice

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

Instance Method Summary collapse

Methods included from Crystalline::MetadataFields

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

Constructor Details

#initialize(object:, id:, platform:, app_identifier:, algorithm:, status:, created_at:, updated_at:, name: nil, last_used_at: nil, revoked_at: nil) ⇒ TrustedDevice

Returns a new instance of TrustedDevice.



39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/clerk/models/components/trusteddevice.rb', line 39

def initialize(object:, id:, platform:, app_identifier:, algorithm:, status:, created_at:, updated_at:, name: nil, last_used_at: nil, revoked_at: nil)
  @object = object
  @id = id
  @platform = platform
  @app_identifier = app_identifier
  @algorithm = algorithm
  @status = status
  @created_at = created_at
  @updated_at = updated_at
  @name = name
  @last_used_at = last_used_at
  @revoked_at = revoked_at
end

Instance Method Details

#==(other) ⇒ Object



54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'lib/clerk/models/components/trusteddevice.rb', line 54

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 @platform == other.platform
  return false unless @app_identifier == other.app_identifier
  return false unless @algorithm == other.algorithm
  return false unless @status == other.status
  return false unless @created_at == other.created_at
  return false unless @updated_at == other.updated_at
  return false unless @name == other.name
  return false unless @last_used_at == other.last_used_at
  return false unless @revoked_at == other.revoked_at
  true
end