Class: UserVerificationSerializer

Inherits:
Object
  • Object
show all
Defined in:
app/serializers/user_verification_serializer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(user_verification:) ⇒ UserVerificationSerializer

Returns a new instance of UserVerificationSerializer.



6
7
8
# File 'app/serializers/user_verification_serializer.rb', line 6

def initialize(user_verification:)
  @user_verification = user_verification
end

Instance Attribute Details

#user_verificationObject (readonly)

Returns the value of attribute user_verification.



4
5
6
# File 'app/serializers/user_verification_serializer.rb', line 4

def user_verification
  @user_verification
end

Instance Method Details

#performObject



10
11
12
# File 'app/serializers/user_verification_serializer.rb', line 10

def perform
  serialize_response
end

#serialize_responseObject (private)



16
17
18
19
20
21
22
# File 'app/serializers/user_verification_serializer.rb', line 16

def serialize_response
  {
    type: user_verification.credential_type,
    credential_id: user_verification.credential_identifier,
    locked: user_verification.locked
  }
end