@classmethod
def deserialize(cls, serialized):
    """
        Deserializes the provided JSON entity

        :params serialized: a Python dict or JSON text, assumed to be the
            serialization of a *Receipt* object
        :type: dict or str
        :rtype: Receipt
        """
    kwargs = {}
    if isinstance(serialized, dict):
        kwargs.update({'from_dict': serialized})
    elif isinstance(serialized, str):
        kwargs.update({'from_json': serialized})
    return cls(**kwargs)
