pay.collections.invoice ======================= .. py:module:: pay.collections.invoice Attributes ---------- .. autoapisummary:: pay.collections.invoice.InvoiceT pay.collections.invoice.ItemT Classes ------- .. autoapisummary:: pay.collections.invoice.InvoiceCollection Module Contents --------------- .. py:data:: InvoiceT .. py:data:: ItemT .. py:class:: InvoiceCollection(session: sqlalchemy.orm.Session, type: Literal['*', 'generic'] = '*', item_type: Literal['*', 'generic'] = '*') InvoiceCollection(session: sqlalchemy.orm.Session, type: str, item_type: str) Bases: :py:obj:`onegov.core.collection.GenericCollection`\ [\ :py:obj:`InvoiceT`\ ], :py:obj:`Generic`\ [\ :py:obj:`InvoiceT`\ , :py:obj:`ItemT`\ ] Abstract base class for generic types. A generic type is typically declared by inheriting from this class parameterized with one or more type variables. For example, a generic mapping type might be defined as:: class Mapping(Generic[KT, VT]): def __getitem__(self, key: KT) -> VT: ... # Etc. This class can then be used as follows:: def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT: try: return mapping[key] except KeyError: return default .. py:attribute:: type :value: '*' .. py:attribute:: item_type :value: '*' .. py:property:: model_class :type: type[InvoiceT] .. py:property:: item_model_class :type: type[ItemT] .. py:method:: query() -> sqlalchemy.orm.Query[InvoiceT] .. py:method:: query_items() -> sqlalchemy.orm.Query[ItemT] .. py:method:: _invoice_ids() -> sqlalchemy.orm.Query[tuple[uuid.UUID]] .. py:method:: _sum(condition: sqlalchemy.sql.ColumnElement[bool]) -> decimal.Decimal .. py:property:: total_amount :type: decimal.Decimal .. py:property:: outstanding_amount :type: decimal.Decimal .. py:property:: paid_amount :type: decimal.Decimal .. py:method:: unpaid_count() -> int .. py:method:: add(flush: bool = True, **kwargs: Any) -> InvoiceT