mirror of
https://github.com/Eledio/superfaktura-client.git
synced 2025-11-01 00:18:25 +01:00
invoice: add InvoiceType enum
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
from dataclasses import dataclass, asdict
|
from dataclasses import dataclass, asdict
|
||||||
from pprint import pprint
|
|
||||||
from typing import Optional, List
|
from typing import Optional, List
|
||||||
import json
|
import json
|
||||||
|
|
||||||
@@ -88,6 +87,11 @@ class InvoiceItem:
|
|||||||
return data
|
return data
|
||||||
|
|
||||||
|
|
||||||
|
class InvoiceType:
|
||||||
|
PROFORMA = "proforma"
|
||||||
|
INVOICE = "regular"
|
||||||
|
|
||||||
|
|
||||||
class Invoice(SuperFakturaAPI):
|
class Invoice(SuperFakturaAPI):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
@@ -113,7 +117,7 @@ if __name__ == "__main__":
|
|||||||
bank = BankAccount()
|
bank = BankAccount()
|
||||||
invoice.add(
|
invoice.add(
|
||||||
invoice=InvoiceModel(
|
invoice=InvoiceModel(
|
||||||
type="proforma",
|
type=InvoiceType.PROFORMA,
|
||||||
name="Invoice 3",
|
name="Invoice 3",
|
||||||
due=Date("2025-02-01"),
|
due=Date("2025-02-01"),
|
||||||
invoice_currency=Currencies.CZK,
|
invoice_currency=Currencies.CZK,
|
||||||
|
|||||||
Reference in New Issue
Block a user