pay.utils

Module Contents

Classes

_PriceBase

Price

A single price.

Functions

payments_association_table_for(→ sqlalchemy.Table)

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.

property net_amount: decimal.Decimal[source]
__bool__() bool[source]
__lt__(other: Price) bool[source]

Return self<value.

__add__(other: Price) typing_extensions.Self[source]

Return self+value.

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

Return str(self).

__repr__() str[source]

Return repr(self).

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