<?php
namespace Fifa\ConnectId\Sdk\Storage;

use Fifa\ConnectId\Sdk\Model\PersonDetails;

/**
 * Interface PersonDetailsStorageInterface
 * @package Fifa\ConnectId\Sdk\Storage
 */
interface PersonDetailsStorageInterface extends CleanableInterface
{
    /***
     * Puts person details into storage mechanism
     *
     * @param PersonDetails $personDetails
     */
    public function put(PersonDetails $personDetails);

    /**
     * Get person details with given correlation id from storage mechanism
     * If there is no entry associated with the given id, this method should return null.
     *
     * @param string $correlationId
     * @return null|PersonDetails
     */
    public function getByCorrelationId(string $correlationId): ?PersonDetails;
}