src/pds_doi_service/core/actions/list.py
def transaction_for_identifier(self, identifier):
        """
        Returns the latest transaction record for the provided PDS identifier.

        Parameters
        ----------
        identifier : str
            The PDS identifier to search for.

        Returns
        -------
        record : dict
            Latest transaction database record for the given identifier.

        Raises
        ------
        UnknownIdentifierException
            If no entry can be found in the transaction database for the
            provided identifier.

        """
        list_kwargs = {"ids": identifier}
        list_results = json.loads(self.run(**list_kwargs))

        if not list_results:
            raise UnknownIdentifierException(f"No record(s) could be found for identifier {identifier}.")

        # Latest record should be the only one returned
        record = list_results[0]

        return record

        Returns the latest transaction record for the provided PDS identifier.

        Parameters
        ----------
        identifier : str
            The PDS identifier to search for.

        Returns
        -------
        record : dict
            Latest transaction database record for the given identifier.

        Raises
        ------
        UnknownIdentifierException
            If no entry can be found in the transaction database for the
            provided identifier.

        
Returns the latest transaction record for the provided PDS identifier.
Parameters

identifier : str
The PDS identifier to search for.

Returns

record : dict
Latest transaction database record for the given identifier.

Raises

UnknownIdentifierException
If no entry can be found in the transaction database for the
provided identifier.
Returns the latest transaction record for the provided PDS identifier . Parameters identifier : str The PDS identifier to search for . Returns record : dict Latest transaction database record for the given identifier . Raises UnknownIdentifierException If no entry can be found in the transaction database for the provided identifier .
def transaction_for_identifier(self, identifier):
        list_kwargs = {"ids": identifier}
        list_results = json.loads(self.run(**list_kwargs))
        if not list_results:
            raise UnknownIdentifierException(f"No record(s) could be found for identifier {identifier}.")
        record = list_results[0]
        return record
def transaction_for_identifier ( self , identifier ) : list_kwargs = { "ids" : identifier } list_results = json . loads ( self . run ( ** list_kwargs ) ) if not list_results : raise UnknownIdentifierException ( f"No record(s) could be found for identifier {identifier}." ) record = list_results [ 0 ] return record
Returns the latest transaction record for the provided PDS identifier.
Returns the latest transaction record for the provided PDS identifier .
"""
        Returns the latest transaction record for the provided PDS identifier.

        Parameters
        ----------
        identifier : str
            The PDS identifier to search for.

        Returns
        -------
        record : dict
            Latest transaction database record for the given identifier.

        Raises
        ------
        UnknownIdentifierException
            If no entry can be found in the transaction database for the
            provided identifier.

        """ # Latest record should be the only one returned
self
identifier