Source code for strike_api.models.invoices

from __future__ import annotations
from enum import Enum
import typing


from strike_api.models.generic import ItemsResponse, StrikeAPIModel


[docs]class INVOICE_STATES(Enum): UNPAID = "UNPAID" PENDING = "PENDING" PAID = "PAID" CANCELLED = "CANCELLED"
[docs]class Amount(StrikeAPIModel): currency: str amount: str
[docs]class Invoice(StrikeAPIModel): invoiceId: str amount: Amount state: str created: str correlation_id: str description: str issuer_id: str receiver_id: str
[docs]class Invoices(StrikeAPIModel): __root__: typing.List[Invoice] def __iter__(self) -> typing.Iterator[Invoice]: # type: ignore return iter(self.__root__) def __getitem__(self, index: int): return self.__root__[index]
[docs]class InvoiceItems(ItemsResponse): items: typing.List[Invoice]