class Trusona::Services::IdentityDocumentsService

Identity Documents Service

Public Class Methods

new( client: Trusona::Api::HTTPClient.new(Trusona.config.api_host), mapper: Trusona::Mappers::IdentityDocumentMapper.new ) click to toggle source
# File lib/trusona/services/identity_documents_service.rb, line 8
def initialize(
  client: Trusona::Api::HTTPClient.new(Trusona.config.api_host),
  mapper: Trusona::Mappers::IdentityDocumentMapper.new
)
  @client = client
  @mapper = mapper
  @resource_path = '/api/v2/identity_documents'
end

Public Instance Methods

index(user_identifier = nil) click to toggle source
# File lib/trusona/services/identity_documents_service.rb, line 17
def index(user_identifier = nil)
  modified_collection_path =
    "#{collection_path}?user_identifier=#{user_identifier}"

  handle(@client.get(modified_collection_path))
end

Private Instance Methods

not_found() click to toggle source
# File lib/trusona/services/identity_documents_service.rb, line 26
def not_found
  nil
end