'Create a Payment object based on information in the database.'

@classmethod
def from_database(cls, data):

    (trader_id, message_number, transaction_trader_id, transaction_number, payment_id, transferee_quantity, quantity_type, transferee_price, price_type, address_from, address_to, timestamp, success) = data
    message_id = MessageId(TraderId(str(trader_id)), MessageNumber(str(message_number)))
    transaction_id = TransactionId(TraderId(str(transaction_trader_id)), TransactionNumber(transaction_number))
    return cls(message_id, transaction_id, Quantity(transferee_quantity, str(quantity_type)), Price(transferee_price, str(price_type)), WalletAddress(str(address_from)), WalletAddress(str(address_to)), PaymentId(str(payment_id)), Timestamp(float(timestamp)), bool(success))
