Payment

Payment(type, value)

Represents a payment in a receipt.

Attributes: type (str): The type of payment. value (float): The value of the payment.

Methods

Name Description
to_dict Converts the Payment instance to a dictionary.

to_dict

Payment.to_dict()

Converts the Payment instance to a dictionary.

Returns: dict: A dictionary representation of the Payment instance.