pay.utils

Classes

_PriceBase

Price

A single price.

Functions

payments_association_table_for(→ sqlalchemy.Table)

Module Contents

class pay.utils._PriceBase[source]

Bases: NamedTuple

amount: decimal.Decimal[source]
currency: str | None[source]
fee: decimal.Decimal[source]
credit_card_payment: bool[source]
class pay.utils.Price[source]

Bases: _PriceBase

A single price.

The amount includes the fee. To get the net amount use the net_amount property.

__bool__() bool[source]
__lt__(other: Price) bool[source]

Return self<value.

__add__(other: Price) Self[source]

Return self+value.

__sub__(other: Price) Self[source]
__str__() str[source]

Return str(self).

__repr__() str[source]

Return repr(self).

classmethod zero() Self[source]
as_dict() onegov.pay.types.PriceDict[source]
property net_amount: decimal.Decimal[source]
pay.utils.payments_association_table_for(cls: type[onegov.core.orm.Base]) sqlalchemy.Table[source]