# Auto generated by generate_model.sh using datamodel-codegen

from __future__ import annotations

from collections.abc import Mapping, Sequence
from datetime import date
from enum import Enum
from typing import Any, Optional
from uuid import UUID

from fortpyx.model.model_base import ModelBase
from pydantic import AwareDatetime, Field
from typing_extensions import Annotated


class EntityType(Enum):
    of = "OF"
    o = "O"
    f = "F"
    c = "C"
    lgr_io = "LGR_IO"
    lgr_ig = "LGR_IG"


class FileattachmentsAttachment(ModelBase):
    entity_id: Annotated[Optional[int], Field(None, alias="entityId")]
    entity_type: Annotated[Optional[EntityType], Field(None, alias="entityType")]
    file_id: Annotated[Optional[str], Field(None, alias="fileId")]
    id: Optional[UUID] = None
    include_on_send: Annotated[Optional[bool], Field(None, alias="includeOnSend")]


class FileattachmentsNumberOfAttachments(ModelBase):
    entity_id: Annotated[int, Field(alias="entityId")]
    number_of_attachments: Annotated[
        Optional[int], Field(None, alias="numberOfAttachments")
    ]


class FileattachmentsWebException(ModelBase):
    error: Optional[str] = None
    id: Optional[str] = None
    message: Optional[str] = None


class CauseCode(Enum):
    ask = "ASK"
    fpe = "FPE"
    fra = "FRA"
    hav = "HAV"
    kom = "KOM"
    mil = "MIL"
    nar = "NAR"
    os1 = "OS1"
    os2 = "OS2"
    os3 = "OS3"
    os4 = "OS4"
    os5 = "OS5"
    pap = "PAP"
    pem = "PEM"
    per = "PER"
    sem = "SEM"
    sjk = "SJK"
    smb = "SMB"
    sve = "SVE"
    tjl = "TJL"
    utb = "UTB"
    vab = "VAB"


class FortnoxAbsenceTransactionListItem(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    cause_code: Annotated[CauseCode, Field(alias="CauseCode")]
    cost_center: Annotated[Optional[str], Field(None, alias="CostCenter")]
    date: Annotated[date, Field(alias="Date")]
    employee_id: Annotated[str, Field(alias="EmployeeId", max_length=15, min_length=1)]
    extent: Annotated[Optional[float], Field(None, alias="Extent")]
    holiday_entitling: Annotated[Optional[bool], Field(None, alias="HolidayEntitling")]
    hours: Annotated[Optional[float], Field(None, alias="Hours")]
    project: Annotated[Optional[str], Field(None, alias="Project")]
    id: Optional[UUID] = None


class FortnoxAbsenceTransactionListItemWrap(ModelBase):
    absence_transactions: Annotated[
        Optional[Sequence[FortnoxAbsenceTransactionListItem]],
        Field(None, alias="AbsenceTransactions"),
    ]


class FortnoxAbsenceTransactionPayload(ModelBase):
    cause_code: Annotated[CauseCode, Field(alias="CauseCode")]
    cost_center: Annotated[Optional[str], Field(None, alias="CostCenter")]
    date: Annotated[date, Field(alias="Date")]
    employee_id: Annotated[str, Field(alias="EmployeeId")]
    extent: Annotated[Optional[float], Field(None, alias="Extent")]
    holiday_entitling: Annotated[Optional[bool], Field(None, alias="HolidayEntitling")]
    hours: Annotated[Optional[float], Field(None, alias="Hours")]
    project: Annotated[Optional[str], Field(None, alias="Project")]


class FortnoxAbsenceTransactionPayloadWrap(ModelBase):
    absence_transaction: Annotated[
        Optional[FortnoxAbsenceTransactionPayload],
        Field(None, alias="AbsenceTransaction"),
    ]


class FortnoxAbsenceTransactionSingleItem(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    cause_code: Annotated[CauseCode, Field(alias="CauseCode")]
    cost_center: Annotated[Optional[str], Field(None, alias="CostCenter")]
    date: Annotated[date, Field(alias="Date")]
    employee_id: Annotated[str, Field(alias="EmployeeId", max_length=15, min_length=1)]
    extent: Annotated[Optional[float], Field(None, alias="Extent")]
    holiday_entitling: Annotated[Optional[bool], Field(None, alias="HolidayEntitling")]
    hours: Annotated[Optional[float], Field(None, alias="Hours")]
    project: Annotated[Optional[str], Field(None, alias="Project")]
    id: Optional[UUID] = None


class FortnoxAbsenceTransactionSingleItemWrap(ModelBase):
    absence_transaction: Annotated[
        Optional[FortnoxAbsenceTransactionSingleItem],
        Field(None, alias="AbsenceTransaction"),
    ]


class FortnoxAccountChart(ModelBase):
    name: Annotated[Optional[str], Field(None, alias="Name")]


class FortnoxAccountChartWrap(ModelBase):
    account_charts: Annotated[
        Optional[Sequence[FortnoxAccountChart]], Field(None, alias="AccountCharts")
    ]


class CostCenterSettings(Enum):
    allowed = "ALLOWED"
    mandatory = "MANDATORY"
    notallowed = "NOTALLOWED"


class ProjectSettings(Enum):
    allowed = "ALLOWED"
    mandatory = "MANDATORY"
    notallowed = "NOTALLOWED"


class FortnoxAccountListItem(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    active: Annotated[Optional[bool], Field(None, alias="Active")]
    balance_brought_forward: Annotated[
        Optional[float], Field(None, alias="BalanceBroughtForward")
    ]
    cost_center: Annotated[Optional[str], Field(None, alias="CostCenter")]
    cost_center_settings: Annotated[
        Optional[CostCenterSettings], Field(None, alias="CostCenterSettings")
    ]
    description: Annotated[
        str, Field(alias="Description", max_length=200, min_length=1)
    ]
    number: Annotated[int, Field(alias="Number", ge=1000, le=9999)]
    project: Annotated[Optional[str], Field(None, alias="Project")]
    project_settings: Annotated[
        Optional[ProjectSettings], Field(None, alias="ProjectSettings")
    ]
    sru: Annotated[Optional[int], Field(None, alias="SRU")]
    vat_code: Annotated[Optional[str], Field(None, alias="VATCode")]
    year: Annotated[Optional[int], Field(None, alias="Year")]


class FortnoxAccountListItemWrap(ModelBase):
    accounts: Annotated[
        Optional[Sequence[FortnoxAccountListItem]], Field(None, alias="Accounts")
    ]


class TransactionInformationSettings(Enum):
    allowed = "ALLOWED"
    mandatory = "MANDATORY"
    notallowed = "NOTALLOWED"


class FortnoxAccountPayloadOpeningQuantities(ModelBase):
    balance: Annotated[Optional[int], Field(None, alias="Balance")]
    project: Annotated[Optional[str], Field(None, alias="Project")]


class QuantitySettings(Enum):
    allowed = "ALLOWED"
    mandatory = "MANDATORY"
    notallowed = "NOTALLOWED"


class FortnoxAccountSingleItemOpeningQuantities(ModelBase):
    balance: Annotated[Optional[int], Field(None, alias="Balance")]
    project: Annotated[Optional[str], Field(None, alias="Project")]


class HouseworkType(Enum):
    construction = "CONSTRUCTION"
    electricity = "ELECTRICITY"
    glassmetalwork = "GLASSMETALWORK"
    grounddrainagework = "GROUNDDRAINAGEWORK"
    masonry = "MASONRY"
    paintingwallpapering = "PAINTINGWALLPAPERING"
    hvac = "HVAC"
    cleaning = "CLEANING"
    textileclothing = "TEXTILECLOTHING"
    cooking = "COOKING"
    snowplowing = "SNOWPLOWING"
    gardening = "GARDENING"
    babysitting = "BABYSITTING"
    othercare = "OTHERCARE"
    tutoring = "TUTORING"
    othercosts = "OTHERCOSTS"


class Type(Enum):
    stock = "STOCK"
    service = "SERVICE"


class FortnoxArticle(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    active: Annotated[Optional[bool], Field(None, alias="Active")]
    article_number: Annotated[
        Optional[str], Field(None, alias="ArticleNumber", max_length=50)
    ]
    bulky: Annotated[Optional[bool], Field(None, alias="Bulky")]
    construction_account: Annotated[
        Optional[int], Field(None, alias="ConstructionAccount", ge=1000, le=99999)
    ]
    cost_calculation_method: Annotated[
        Optional[str], Field(None, alias="CostCalculationMethod")
    ]
    default_stock_location: Annotated[
        Optional[str], Field(None, alias="DefaultStockLocation")
    ]
    default_stock_point: Annotated[
        Optional[str], Field(None, alias="DefaultStockPoint")
    ]
    depth: Annotated[Optional[int], Field(None, alias="Depth", ge=0, le=999999999)]
    description: Annotated[
        str, Field(alias="Description", max_length=200, min_length=1)
    ]
    direct_cost: Annotated[Optional[float], Field(None, alias="DirectCost")]
    disposable_quantity: Annotated[
        Optional[float], Field(None, alias="DisposableQuantity")
    ]
    ean: Annotated[Optional[str], Field(None, alias="EAN", max_length=30)]
    eu_account: Annotated[
        Optional[int], Field(None, alias="EUAccount", ge=1000, le=99999)
    ]
    euvat_account: Annotated[
        Optional[int], Field(None, alias="EUVATAccount", ge=1000, le=99999)
    ]
    expired: Annotated[Optional[bool], Field(None, alias="Expired")]
    export_account: Annotated[
        Optional[int], Field(None, alias="ExportAccount", ge=1000, le=99999)
    ]
    freight_cost: Annotated[Optional[float], Field(None, alias="FreightCost")]
    height: Annotated[Optional[int], Field(None, alias="Height", ge=0, le=999999999)]
    housework: Annotated[Optional[bool], Field(None, alias="Housework")]
    housework_type: Annotated[
        Optional[HouseworkType], Field(None, alias="HouseworkType")
    ]
    manufacturer: Annotated[
        Optional[str], Field(None, alias="Manufacturer", max_length=50)
    ]
    manufacturer_article_number: Annotated[
        Optional[str], Field(None, alias="ManufacturerArticleNumber", max_length=50)
    ]
    note: Annotated[Optional[str], Field(None, alias="Note", max_length=10000)]
    other_cost: Annotated[Optional[float], Field(None, alias="OtherCost")]
    purchase_account: Annotated[
        Optional[int], Field(None, alias="PurchaseAccount", ge=1000, le=99999)
    ]
    purchase_price: Annotated[Optional[float], Field(None, alias="PurchasePrice")]
    quantity_in_stock: Annotated[Optional[float], Field(None, alias="QuantityInStock")]
    reserved_quantity: Annotated[Optional[float], Field(None, alias="ReservedQuantity")]
    sales_account: Annotated[
        Optional[int], Field(None, alias="SalesAccount", ge=1000, le=99999)
    ]
    sales_price: Annotated[Optional[float], Field(None, alias="SalesPrice")]
    stock_account: Annotated[Optional[int], Field(None, alias="StockAccount")]
    stock_change_account: Annotated[
        Optional[int], Field(None, alias="StockChangeAccount")
    ]
    stock_goods: Annotated[Optional[bool], Field(None, alias="StockGoods")]
    stock_place: Annotated[
        Optional[str], Field(None, alias="StockPlace", max_length=100)
    ]
    stock_value: Annotated[Optional[float], Field(None, alias="StockValue")]
    stock_warning: Annotated[Optional[float], Field(None, alias="StockWarning")]
    supplier_name: Annotated[Optional[str], Field(None, alias="SupplierName")]
    supplier_number: Annotated[Optional[str], Field(None, alias="SupplierNumber")]
    type: Annotated[Optional[Type], Field(None, alias="Type")]
    unit: Annotated[Optional[str], Field(None, alias="Unit")]
    vat: Annotated[Optional[float], Field(None, alias="VAT")]
    webshop_article: Annotated[Optional[bool], Field(None, alias="WebshopArticle")]
    weight: Annotated[Optional[int], Field(None, alias="Weight", ge=0, le=999999999)]
    width: Annotated[Optional[int], Field(None, alias="Width", ge=0, le=999999999)]


class FortnoxArticleFileConnection(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    article_number: Annotated[str, Field(alias="ArticleNumber")]
    file_id: Annotated[str, Field(alias="FileId")]


class FortnoxArticleFileConnectionListItem(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    article_number: Annotated[str, Field(alias="ArticleNumber")]
    file_id: Annotated[str, Field(alias="FileId")]


class FortnoxArticleFileConnectionListItemWrap(ModelBase):
    article_file_connections: Annotated[
        Optional[Sequence[FortnoxArticleFileConnectionListItem]],
        Field(None, alias="ArticleFileConnections"),
    ]


class FortnoxArticleFileConnectionWrap(ModelBase):
    article_file_connection: Annotated[
        FortnoxArticleFileConnection, Field(alias="ArticleFileConnection")
    ]


class FortnoxArticleListItem(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    article_number: Annotated[
        Optional[str], Field(None, alias="ArticleNumber", max_length=50)
    ]
    description: Annotated[
        str, Field(alias="Description", max_length=200, min_length=1)
    ]
    disposable_quantity: Annotated[
        Optional[str], Field(None, alias="DisposableQuantity")
    ]
    ean: Annotated[Optional[str], Field(None, alias="EAN", max_length=30)]
    housework: Annotated[Optional[bool], Field(None, alias="Housework")]
    purchase_price: Annotated[Optional[str], Field(None, alias="PurchasePrice")]
    quantity_in_stock: Annotated[Optional[float], Field(None, alias="QuantityInStock")]
    reserved_quantity: Annotated[Optional[str], Field(None, alias="ReservedQuantity")]
    sales_price: Annotated[Optional[str], Field(None, alias="SalesPrice")]
    stock_place: Annotated[
        Optional[str], Field(None, alias="StockPlace", max_length=100)
    ]
    stock_value: Annotated[Optional[str], Field(None, alias="StockValue")]
    unit: Annotated[Optional[str], Field(None, alias="Unit")]
    vat: Annotated[Optional[str], Field(None, alias="VAT")]
    webshop_article: Annotated[Optional[bool], Field(None, alias="WebshopArticle")]


class FortnoxArticleListItemList(ModelBase):
    articles: Annotated[
        Optional[Sequence[FortnoxArticleListItem]], Field(None, alias="Articles")
    ]


class FortnoxArticleWrap(ModelBase):
    article: Annotated[Optional[FortnoxArticle], Field(None, alias="Article")]


class FortnoxAssetFileConnection(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    asset_id: Annotated[Optional[str], Field(None, alias="AssetId")]
    file_id: Annotated[Optional[str], Field(None, alias="FileId")]
    name: Annotated[Optional[str], Field(None, alias="Name")]


class FortnoxAssetType(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    account_asset: Annotated[Optional[int], Field(None, alias="AccountAsset")]
    account_asset_id: Annotated[Optional[int], Field(None, alias="AccountAssetId")]
    account_depreciation: Annotated[
        Optional[int], Field(None, alias="AccountDepreciation")
    ]
    account_depreciation_id: Annotated[
        Optional[int], Field(None, alias="AccountDepreciationId")
    ]
    account_revaluation: Annotated[
        Optional[int], Field(None, alias="AccountRevaluation")
    ]
    account_revaluation_id: Annotated[
        Optional[int], Field(None, alias="AccountRevaluationId")
    ]
    account_sale_loss: Annotated[Optional[int], Field(None, alias="AccountSaleLoss")]
    account_sale_loss_id: Annotated[
        Optional[int], Field(None, alias="AccountSaleLossId")
    ]
    account_sale_win: Annotated[Optional[int], Field(None, alias="AccountSaleWin")]
    account_sale_win_id: Annotated[Optional[int], Field(None, alias="AccountSaleWinId")]
    account_value_loss: Annotated[Optional[int], Field(None, alias="AccountValueLoss")]
    account_value_loss_id: Annotated[
        Optional[int], Field(None, alias="AccountValueLossId")
    ]
    account_write_down: Annotated[Optional[int], Field(None, alias="AccountWriteDown")]
    account_write_down_ack: Annotated[
        Optional[int], Field(None, alias="AccountWriteDownAck")
    ]
    account_write_down_ack_id: Annotated[
        Optional[int], Field(None, alias="AccountWriteDownAckId")
    ]
    account_write_down_id: Annotated[
        Optional[int], Field(None, alias="AccountWriteDownId")
    ]
    description: Annotated[Optional[str], Field(None, alias="Description")]
    id: Annotated[Optional[int], Field(None, alias="Id")]
    in_use: Annotated[Optional[bool], Field(None, alias="InUse")]
    notes: Annotated[Optional[str], Field(None, alias="Notes")]
    number: Annotated[Optional[str], Field(None, alias="Number")]
    type: Annotated[Optional[int], Field(None, alias="Type")]


class FortnoxAssetTypeWrapSingle(ModelBase):
    type: Annotated[Optional[FortnoxAssetType], Field(None, alias="Type")]


class CauseCode3(Enum):
    arb = "ARB"
    be2 = "BE2"
    ber = "BER"
    flx = "FLX"
    hlg = "HLG"
    jo2 = "JO2"
    jor = "JOR"
    mer = "MER"
    ob1 = "OB1"
    ob2 = "OB2"
    ob3 = "OB3"
    ob4 = "OB4"
    ob5 = "OB5"
    ok0 = "OK0"
    ok1 = "OK1"
    ok2 = "OK2"
    ok3 = "OK3"
    ok4 = "OK4"
    ok5 = "OK5"
    ot1 = "OT1"
    ot2 = "OT2"
    ot3 = "OT3"
    ot4 = "OT4"
    ot5 = "OT5"
    res = "RES"
    tid = "TID"


class FortnoxAttendanceTransaction(ModelBase):
    cause_code: Annotated[CauseCode3, Field(alias="CauseCode")]
    cost_center: Annotated[Optional[str], Field(None, alias="CostCenter")]
    date: Annotated[date, Field(alias="Date")]
    employee_id: Annotated[str, Field(alias="EmployeeId", max_length=15, min_length=1)]
    hours: Annotated[Optional[str], Field(None, alias="Hours")]
    project: Annotated[Optional[str], Field(None, alias="Project")]


class FortnoxAttendanceTransactionListItem(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    cause_code: Annotated[CauseCode3, Field(alias="CauseCode")]
    cost_center: Annotated[Optional[str], Field(None, alias="CostCenter")]
    date: Annotated[date, Field(alias="Date")]
    employee_id: Annotated[str, Field(alias="EmployeeId", max_length=15, min_length=1)]
    hours: Annotated[Optional[str], Field(None, alias="Hours")]
    project: Annotated[Optional[str], Field(None, alias="Project")]
    id: Optional[UUID] = None


class FortnoxAttendanceTransactionListItemList(ModelBase):
    attendance_transactions: Annotated[
        Optional[Sequence[FortnoxAttendanceTransactionListItem]],
        Field(None, alias="AttendanceTransactions"),
    ]


class FortnoxAttendanceTransactionWrap(ModelBase):
    attendance_transaction: Annotated[
        Optional[FortnoxAttendanceTransaction],
        Field(None, alias="AttendanceTransaction"),
    ]


class FortnoxCompanyInfo(ModelBase):
    address: Annotated[Optional[str], Field(None, alias="Address")]
    city: Annotated[Optional[str], Field(None, alias="City")]
    company_name: Annotated[Optional[str], Field(None, alias="CompanyName")]
    country_code: Annotated[Optional[str], Field(None, alias="CountryCode")]
    database_number: Annotated[Optional[int], Field(None, alias="DatabaseNumber")]
    organization_number: Annotated[
        Optional[str], Field(None, alias="OrganizationNumber")
    ]
    visit_address: Annotated[Optional[str], Field(None, alias="VisitAddress")]
    visit_city: Annotated[Optional[str], Field(None, alias="VisitCity")]
    visit_country_code: Annotated[Optional[str], Field(None, alias="VisitCountryCode")]
    visit_zip_code: Annotated[Optional[str], Field(None, alias="VisitZipCode")]
    zip_code: Annotated[Optional[str], Field(None, alias="ZipCode")]


class FortnoxCompanyInfoWrap(ModelBase):
    company_information: Annotated[
        Optional[FortnoxCompanyInfo], Field(None, alias="CompanyInformation")
    ]


class FortnoxCompanySettings(ModelBase):
    address: Annotated[Optional[str], Field(None, alias="Address")]
    bg: Annotated[Optional[str], Field(None, alias="BG")]
    bic: Annotated[Optional[str], Field(None, alias="BIC")]
    branch_code: Annotated[Optional[str], Field(None, alias="BranchCode")]
    city: Annotated[Optional[str], Field(None, alias="City")]
    contact_first_name: Annotated[Optional[str], Field(None, alias="ContactFirstName")]
    contact_last_name: Annotated[Optional[str], Field(None, alias="ContactLastName")]
    country: Annotated[Optional[str], Field(None, alias="Country")]
    country_code: Annotated[Optional[str], Field(None, alias="CountryCode")]
    database_number: Annotated[Optional[str], Field(None, alias="DatabaseNumber")]
    domicile: Annotated[Optional[str], Field(None, alias="Domicile")]
    email: Annotated[Optional[str], Field(None, alias="Email")]
    fax: Annotated[Optional[str], Field(None, alias="Fax")]
    iban: Annotated[Optional[str], Field(None, alias="IBAN")]
    name: Annotated[Optional[str], Field(None, alias="Name")]
    organization_number: Annotated[
        Optional[str], Field(None, alias="OrganizationNumber")
    ]
    pg: Annotated[Optional[str], Field(None, alias="PG")]
    phone1: Annotated[Optional[str], Field(None, alias="Phone1")]
    phone2: Annotated[Optional[str], Field(None, alias="Phone2")]
    tax_enabled: Annotated[Optional[bool], Field(None, alias="TaxEnabled")]
    vat_number: Annotated[Optional[str], Field(None, alias="VATNumber")]
    visit_address: Annotated[Optional[str], Field(None, alias="VisitAddress")]
    visit_city: Annotated[Optional[str], Field(None, alias="VisitCity")]
    visit_country: Annotated[Optional[str], Field(None, alias="VisitCountry")]
    visit_country_code: Annotated[Optional[str], Field(None, alias="VisitCountryCode")]
    visit_name: Annotated[Optional[str], Field(None, alias="VisitName")]
    visit_zip_code: Annotated[Optional[str], Field(None, alias="VisitZipCode")]
    www: Annotated[Optional[str], Field(None, alias="WWW")]
    zip_code: Annotated[Optional[str], Field(None, alias="ZipCode")]


class FortnoxCompanySettingsWrap(ModelBase):
    company_settings: Annotated[
        Optional[FortnoxCompanySettings], Field(None, alias="CompanySettings")
    ]


class Language(Enum):
    sv = "SV"
    en = "EN"


class TaxReductionType(Enum):
    none = "none"
    rot = "rot"
    rut = "rut"
    green = "green"


class Period(Enum):
    monthly = "MONTHLY"
    bimonthly = "BIMONTHLY"
    quarterly = "QUARTERLY"
    semiannually = "SEMIANNUALLY"
    annually = "ANNUALLY"


class FortnoxContractAccrualListItem(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    description: Annotated[str, Field(alias="Description")]
    document_number: Annotated[int, Field(alias="DocumentNumber")]
    period: Annotated[Optional[Period], Field(None, alias="Period")]


class FortnoxContractAccrualListItemList(ModelBase):
    contract_accruals: Annotated[
        Optional[Sequence[FortnoxContractAccrualListItem]],
        Field(None, alias="ContractAccruals"),
    ]


class FortnoxContractAccrualAccrualRow(ModelBase):
    account: Annotated[int, Field(alias="Account")]
    cost_center: Annotated[Optional[str], Field(None, alias="CostCenter")]
    credit: Annotated[float, Field(alias="Credit")]
    debit: Annotated[float, Field(alias="Debit")]
    project: Annotated[Optional[str], Field(None, alias="Project")]
    transaction_information: Annotated[
        Optional[str], Field(None, alias="TransactionInformation", max_length=100)
    ]


class FortnoxContractListItem(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    continuous: Annotated[Optional[bool], Field(None, alias="Continuous")]
    contract_length: Annotated[Optional[int], Field(None, alias="ContractLength")]
    currency: Annotated[Optional[str], Field(None, alias="Currency")]
    customer_name: Annotated[Optional[str], Field(None, alias="CustomerName")]
    customer_number: Annotated[str, Field(alias="CustomerNumber")]
    document_number: Annotated[Optional[str], Field(None, alias="DocumentNumber")]
    invoiceinterval: Annotated[Optional[int], Field(None, alias="Invoiceinterval")]
    invoices_remaining: Annotated[Optional[int], Field(None, alias="InvoicesRemaining")]
    last_invoice_date: Annotated[Optional[str], Field(None, alias="LastInvoiceDate")]
    period_end: Annotated[date, Field(alias="PeriodEnd")]
    period_start: Annotated[Optional[date], Field(None, alias="PeriodStart")]
    status: Annotated[Optional[str], Field(None, alias="Status")]
    template_number: Annotated[Optional[int], Field(None, alias="TemplateNumber")]
    total: Annotated[Optional[float], Field(None, alias="Total")]


class FortnoxContractListItemList(ModelBase):
    contracts: Annotated[
        Optional[Sequence[FortnoxContractListItem]], Field(None, alias="Contracts")
    ]


class FortnoxContractTemplateListItem(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    contract_length: Annotated[
        Optional[int], Field(None, alias="ContractLength", ge=1, le=9999)
    ]
    contract_template: Annotated[Optional[int], Field(None, alias="ContractTemplate")]
    contract_template_name: Annotated[
        Optional[str], Field(None, alias="ContractTemplateName")
    ]
    invoice_interval: Annotated[
        Optional[int], Field(None, alias="InvoiceInterval", ge=1, le=9999)
    ]


class FortnoxContractTemplateListItemList(ModelBase):
    contract_templates: Annotated[
        Optional[Sequence[FortnoxContractTemplateListItem]],
        Field(None, alias="ContractTemplates"),
    ]


class DiscountType(Enum):
    percent = "PERCENT"
    amount = "AMOUNT"


class FortnoxContractTemplateInvoiceRow(ModelBase):
    account_number: Annotated[Optional[int], Field(None, alias="AccountNumber")]
    article_number: Annotated[Optional[str], Field(None, alias="ArticleNumber")]
    cost_center: Annotated[Optional[str], Field(None, alias="CostCenter")]
    delivered_quantity: Annotated[Optional[str], Field(None, alias="DeliveredQuantity")]
    description: Annotated[Optional[str], Field(None, alias="Description")]
    discount: Annotated[Optional[float], Field(None, alias="Discount")]
    discount_type: Annotated[Optional[DiscountType], Field(None, alias="DiscountType")]
    price: Annotated[Optional[float], Field(None, alias="Price")]
    project: Annotated[Optional[str], Field(None, alias="Project")]
    unit: Annotated[Optional[str], Field(None, alias="Unit")]


class FortnoxContractEmailInformation(ModelBase):
    email_address_bcc: Annotated[Optional[str], Field(None, alias="EmailAddressBCC")]
    email_address_cc: Annotated[Optional[str], Field(None, alias="EmailAddressCC")]
    email_address_from: Annotated[Optional[str], Field(None, alias="EmailAddressFrom")]
    email_address_to: Annotated[Optional[str], Field(None, alias="EmailAddressTo")]
    email_body: Annotated[Optional[str], Field(None, alias="EmailBody")]
    email_subject: Annotated[Optional[str], Field(None, alias="EmailSubject")]


class DiscountType1(Enum):
    amount = "AMOUNT"
    percent = "PERCENT"


class FortnoxContractInvoiceRow(ModelBase):
    account_number: Annotated[
        Optional[int], Field(None, alias="AccountNumber", ge=1000, le=9999)
    ]
    article_number: Annotated[str, Field(alias="ArticleNumber")]
    contribution_percent: Annotated[
        Optional[str], Field(None, alias="ContributionPercent")
    ]
    contribution_value: Annotated[Optional[str], Field(None, alias="ContributionValue")]
    cost_center: Annotated[Optional[str], Field(None, alias="CostCenter")]
    delivered_quantity: Annotated[str, Field(alias="DeliveredQuantity")]
    description: Annotated[Optional[str], Field(None, alias="Description")]
    discount: Annotated[Optional[float], Field(None, alias="Discount")]
    discount_type: Annotated[Optional[DiscountType1], Field(None, alias="DiscountType")]
    house_work: Annotated[Optional[bool], Field(None, alias="HouseWork")]
    house_work_hours_to_report: Annotated[
        Optional[int], Field(None, alias="HouseWorkHoursToReport")
    ]
    house_work_type: Annotated[Optional[str], Field(None, alias="HouseWorkType")]
    price: Annotated[Optional[float], Field(None, alias="Price")]
    price_excluding_vat: Annotated[
        Optional[float], Field(None, alias="PriceExcludingVAT")
    ]
    project: Annotated[Optional[str], Field(None, alias="Project")]
    row_id: Annotated[Optional[int], Field(None, alias="RowId")]
    total: Annotated[Optional[float], Field(None, alias="Total")]
    total_excluding_vat: Annotated[
        Optional[float], Field(None, alias="TotalExcludingVAT")
    ]
    unit: Annotated[Optional[str], Field(None, alias="Unit")]
    vat: Annotated[Optional[float], Field(None, alias="VAT")]


class FortnoxCostCenter(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    active: Annotated[Optional[bool], Field(None, alias="Active")]
    code: Annotated[str, Field(alias="Code", max_length=6, min_length=1)]
    description: Annotated[
        str, Field(alias="Description", max_length=2147483647, min_length=1)
    ]
    note: Annotated[Optional[str], Field(None, alias="Note")]


class FortnoxCostCenterList(ModelBase):
    cost_centers: Annotated[
        Optional[Sequence[FortnoxCostCenter]], Field(None, alias="CostCenters")
    ]


class FortnoxCostCenterWrap(ModelBase):
    cost_center: Annotated[Optional[FortnoxCostCenter], Field(None, alias="CostCenter")]


class FortnoxCreateAsset(ModelBase):
    acquisition_date: Annotated[Optional[str], Field(None, alias="AcquisitionDate")]
    acquisition_start: Annotated[Optional[str], Field(None, alias="AcquisitionStart")]
    acquisition_value: Annotated[Optional[int], Field(None, alias="AcquisitionValue")]
    depreciate_to_residual_value: Annotated[
        Optional[int], Field(None, alias="DepreciateToResidualValue")
    ]
    depreciation_final: Annotated[Optional[str], Field(None, alias="DepreciationFinal")]
    description: Annotated[Optional[str], Field(None, alias="Description")]
    number: Annotated[Optional[str], Field(None, alias="Number")]
    type_id: Annotated[Optional[int], Field(None, alias="TypeId")]


class FortnoxCreateAssetFileConnection(ModelBase):
    asset_id: Annotated[Optional[str], Field(None, alias="AssetId")]
    file_id: Annotated[Optional[str], Field(None, alias="FileId")]


class FortnoxCreateAssetWrap(ModelBase):
    asset: Annotated[Optional[FortnoxCreateAsset], Field(None, alias="Asset")]


class FortnoxCreatePayload(ModelBase):
    invoice_number: Annotated[str, Field(alias="InvoiceNumber")]
    send_method: Annotated[str, Field(alias="SendMethod")]
    service: Annotated[str, Field(alias="Service")]


class FortnoxCreatePayloadWrap(ModelBase):
    nox_finans_invoice: Annotated[
        Optional[FortnoxCreatePayload], Field(None, alias="NoxFinansInvoice")
    ]


class FortnoxCurrency(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    buy_rate: Annotated[Optional[float], Field(None, alias="BuyRate")]
    code: Annotated[str, Field(alias="Code")]
    date: Annotated[Optional[date], Field(None, alias="Date")]
    description: Annotated[str, Field(alias="Description")]
    is_automatic: Annotated[Optional[bool], Field(None, alias="IsAutomatic")]
    sell_rate: Annotated[Optional[float], Field(None, alias="SellRate")]
    unit: Annotated[Optional[float], Field(None, alias="Unit")]


class FortnoxCurrencyWrap(ModelBase):
    currency: Annotated[FortnoxCurrency, Field(alias="Currency")]


class Type1(Enum):
    private = "PRIVATE"
    company = "COMPANY"


class VatType(Enum):
    sevat = "SEVAT"
    sereversedvat = "SEREVERSEDVAT"
    eureversedvat = "EUREVERSEDVAT"
    euvat = "EUVAT"
    export = "EXPORT"


class FortnoxCustomerListItem(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    address1: Annotated[Optional[str], Field(None, alias="Address1", max_length=1024)]
    address2: Annotated[Optional[str], Field(None, alias="Address2", max_length=1024)]
    city: Annotated[Optional[str], Field(None, alias="City", max_length=1024)]
    customer_number: Annotated[
        Optional[str], Field(None, alias="CustomerNumber", max_length=1024)
    ]
    email: Annotated[Optional[str], Field(None, alias="Email", max_length=1024)]
    name: Annotated[str, Field(alias="Name", max_length=1024, min_length=1)]
    organisation_number: Annotated[
        Optional[str], Field(None, alias="OrganisationNumber", max_length=30)
    ]
    phone: Annotated[Optional[str], Field(None, alias="Phone", max_length=1024)]
    zip_code: Annotated[Optional[str], Field(None, alias="ZipCode", max_length=10)]


class FortnoxCustomerListItemList(ModelBase):
    customers: Annotated[
        Optional[Sequence[FortnoxCustomerListItem]], Field(None, alias="Customers")
    ]


class FortnoxCustomerReferenceCustomerReferenceRow(ModelBase):
    customer_number: Annotated[Optional[str], Field(None, alias="CustomerNumber")]
    id: Annotated[Optional[int], Field(None, alias="Id")]
    reference: Annotated[Optional[str], Field(None, alias="Reference")]


class FortnoxCustomerReferenceCustomerReferenceRowWrap(ModelBase):
    customer_reference_row: Annotated[
        Optional[FortnoxCustomerReferenceCustomerReferenceRow],
        Field(None, alias="CustomerReferenceRow"),
    ]


class Invoice(Enum):
    print = "PRINT"
    email = "EMAIL"
    printservice = "PRINTSERVICE"


class Offer(Enum):
    print = "PRINT"
    email = "EMAIL"
    printservice = "PRINTSERVICE"


class Order(Enum):
    print = "PRINT"
    email = "EMAIL"
    printservice = "PRINTSERVICE"


class FortnoxCustomerDefaultDeliveryTypes(ModelBase):
    invoice: Annotated[Optional[Invoice], Field(None, alias="Invoice")]
    offer: Annotated[Optional[Offer], Field(None, alias="Offer")]
    order: Annotated[Optional[Order], Field(None, alias="Order")]


class FortnoxCustomerDefaultTemplates(ModelBase):
    cash_invoice: Annotated[Optional[str], Field(None, alias="CashInvoice")]
    invoice: Annotated[Optional[str], Field(None, alias="Invoice")]
    offer: Annotated[Optional[str], Field(None, alias="Offer")]
    order: Annotated[Optional[str], Field(None, alias="Order")]


class FortnoxDelete(ModelBase):
    date: Annotated[Optional[str], Field(None, alias="Date")]


class FortnoxDeleteWrap(ModelBase):
    asset: Annotated[Optional[FortnoxDelete], Field(None, alias="Asset")]


class FortnoxDepreciation(ModelBase):
    asset_ids: Annotated[Optional[Sequence[int]], Field(None, alias="AssetIds")]
    depreciate_until: Annotated[Optional[str], Field(None, alias="DepreciateUntil")]


class FortnoxDepreciationResponse(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    financial_year: Annotated[Optional[int], Field(None, alias="FinancialYear")]
    voucher_number: Annotated[Optional[int], Field(None, alias="VoucherNumber")]
    voucher_series: Annotated[Optional[str], Field(None, alias="VoucherSeries")]


class FortnoxDepreciationResponseWrap(ModelBase):
    assets_depreciation: Annotated[
        Optional[Sequence[FortnoxDepreciationResponse]],
        Field(None, alias="AssetsDepreciation"),
    ]


class FortnoxDepreciationWrap(ModelBase):
    asset: Annotated[Optional[FortnoxDepreciation], Field(None, alias="Asset")]


class FortnoxEUVatLimitRegulation(ModelBase):
    is_over_limit: Annotated[Optional[bool], Field(None, alias="IsOverLimit")]
    limit: Annotated[Optional[int], Field(None, alias="Limit")]
    total_excl_vat: Annotated[Optional[float], Field(None, alias="TotalExclVat")]
    year: Annotated[Optional[str], Field(None, alias="Year")]


class FortnoxEuVatLimitRegulationWrap(ModelBase):
    eu_vat_limit_regulation: Annotated[
        Optional[FortnoxEUVatLimitRegulation], Field(None, alias="EUVatLimitRegulation")
    ]


class EmploymentForm(Enum):
    tv = "TV"
    pro = "PRO"
    tid = "TID"
    svt = "SVT"
    vik = "VIK"
    prj = "PRJ"
    pra = "PRA"
    fer = "FER"
    ses = "SES"
    nej = "NEJ"


class ForaType(Enum):
    a = "A"
    a51 = "A51"
    a52 = "A52"
    a53 = "A53"
    a54 = "A54"
    a55 = "A55"
    a56 = "A56"
    a57 = "A57"
    a58 = "A58"
    a59 = "A59"
    a60 = "A60"
    a61 = "A61"
    a62 = "A62"
    a63 = "A63"
    a64 = "A64"
    a65 = "A65"
    a66 = "A66"
    a67 = "A67"
    a68 = "A68"
    a69 = "A69"
    a70 = "A70"
    a71 = "A71"
    a72 = "A72"
    a73 = "A73"
    a74 = "A74"
    a75 = "A75"
    a76 = "A76"
    a77 = "A77"
    a78 = "A78"
    a79 = "A79"
    a80 = "A80"
    a81 = "A81"
    a82 = "A82"
    a83 = "A83"
    a84 = "A84"
    a85 = "A85"
    a86 = "A86"
    a3 = "A3"
    a91 = "A91"
    a92 = "A92"
    a93 = "A93"
    a11 = "A11"
    a12 = "A12"
    a13 = "A13"
    a14 = "A14"
    a15 = "A15"
    a16 = "A16"
    a17 = "A17"
    a18 = "A18"
    a19 = "A19"
    a20 = "A20"
    a21 = "A21"
    a22 = "A22"
    a23 = "A23"
    a24 = "A24"
    a25 = "A25"
    a26 = "A26"
    a27 = "A27"
    a28 = "A28"
    a29 = "A29"
    a30 = "A30"
    a41 = "A41"
    a42 = "A42"
    a43 = "A43"
    a44 = "A44"
    a45 = "A45"
    a46 = "A46"
    a47 = "A47"
    a48 = "A48"
    t = "T"
    t6 = "T6"
    field_ = "-"


class PersonelType(Enum):
    tjm = "TJM"
    arb = "ARB"


class SalaryForm(Enum):
    man = "MAN"
    tim = "TIM"


class TaxAllowance(Enum):
    huv = "HUV"
    ext = "EXT"
    tmp = "TMP"
    stu = "STU"
    ej = "EJ"
    field___ = "???"


class FortnoxEmployeeDatedSchedule(ModelBase):
    employee_id: Annotated[str, Field(alias="EmployeeId", max_length=15, min_length=1)]
    first_day: Annotated[date, Field(alias="FirstDay")]
    schedule_id: Annotated[Optional[str], Field(None, alias="ScheduleId")]


class FortnoxEmployeeDatedWage(ModelBase):
    employee_id: Annotated[str, Field(alias="EmployeeId", max_length=15, min_length=1)]
    first_day: Annotated[date, Field(alias="FirstDay")]
    hourly_pay: Annotated[Optional[str], Field(None, alias="HourlyPay")]
    monthly_salary: Annotated[Optional[str], Field(None, alias="MonthlySalary")]


class FortnoxExpense(ModelBase):
    account: Annotated[int, Field(alias="Account")]
    code: Annotated[str, Field(alias="Code")]
    text: Annotated[str, Field(alias="Text")]


class FortnoxExpenseListItem(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    account: Annotated[int, Field(alias="Account")]
    code: Annotated[str, Field(alias="Code")]
    text: Annotated[str, Field(alias="Text")]


class FortnoxExpenseListItemWrap(ModelBase):
    expenses: Annotated[
        Optional[Sequence[FortnoxExpenseListItem]], Field(None, alias="Expenses")
    ]


class FortnoxExpenseWrap(ModelBase):
    expense: Annotated[Optional[FortnoxExpense], Field(None, alias="Expense")]


class AccountingMethod(Enum):
    accrual = "ACCRUAL"
    cash = "CASH"


class FortnoxFinancialYear(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    account_chart_type: Annotated[Optional[str], Field(None, alias="AccountChartType")]
    accounting_method: Annotated[
        Optional[AccountingMethod], Field(None, alias="AccountingMethod")
    ]
    from_date: Annotated[date, Field(alias="FromDate")]
    id: Annotated[Optional[int], Field(None, alias="Id")]
    to_date: Annotated[date, Field(alias="ToDate")]


class FortnoxFinancialYearWrap(ModelBase):
    financial_year: Annotated[FortnoxFinancialYear, Field(alias="FinancialYear")]


class FortnoxFinancialYearWrapList(ModelBase):
    financial_years: Annotated[
        Optional[Sequence[FortnoxFinancialYear]], Field(None, alias="FinancialYears")
    ]


class FortnoxFolderFileRow(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    archive_file_id: Annotated[Optional[str], Field(None, alias="ArchiveFileId")]
    comments: Annotated[Optional[str], Field(None, alias="Comments")]
    id: Annotated[Optional[str], Field(None, alias="Id")]
    name: Annotated[Optional[str], Field(None, alias="Name")]
    path: Annotated[Optional[str], Field(None, alias="Path")]
    size: Annotated[Optional[int], Field(None, alias="Size")]


class FortnoxFolderFileRowWrap(ModelBase):
    file: Annotated[Optional[FortnoxFolderFileRow], Field(None, alias="File")]


class FortnoxFolderFolderRow(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    id: Annotated[Optional[str], Field(None, alias="Id")]
    name: Annotated[Optional[str], Field(None, alias="Name")]


class FortnoxHistory(ModelBase):
    amount: Annotated[Optional[str], Field(None, alias="Amount")]
    date: Annotated[Optional[str], Field(None, alias="Date")]
    event_id: Annotated[Optional[int], Field(None, alias="EventId")]
    id: Annotated[Optional[int], Field(None, alias="Id")]
    notes: Annotated[Optional[str], Field(None, alias="Notes")]
    supplier_invoice: Annotated[Optional[int], Field(None, alias="SupplierInvoice")]
    user_id: Annotated[Optional[int], Field(None, alias="UserId")]
    user_name: Annotated[Optional[str], Field(None, alias="UserName")]
    voucher_number: Annotated[Optional[int], Field(None, alias="VoucherNumber")]
    voucher_series: Annotated[Optional[str], Field(None, alias="VoucherSeries")]
    voucher_year: Annotated[Optional[int], Field(None, alias="VoucherYear")]


class InvoiceType(Enum):
    invoice = "INVOICE"
    agreementinvoice = "AGREEMENTINVOICE"
    intrestinvoice = "INTRESTINVOICE"
    summaryinvoice = "SUMMARYINVOICE"
    cashinvoice = "CASHINVOICE"


class PaymentWay(Enum):
    cash = "CASH"
    card = "CARD"
    ag = "AG"


class Period2(Enum):
    monthly = "MONTHLY"
    bimonthly = "BIMONTHLY"
    quarterly = "QUARTERLY"
    semiannually = "SEMIANNUALLY"
    annually = "ANNUALLY"
    field_1_months = "1_MONTHS"
    field_2_months = "2_MONTHS"
    field_3_months = "3_MONTHS"
    field_6_months = "6_MONTHS"
    field_12_months = "12_MONTHS"


class FortnoxInvoiceAccrualListItem(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    description: Annotated[str, Field(alias="Description")]
    invoice_number: Annotated[int, Field(alias="InvoiceNumber")]
    period: Annotated[Optional[Period2], Field(None, alias="Period")]


class FortnoxInvoiceAccrualListItemList(ModelBase):
    invoice_accruals: Annotated[
        Optional[Sequence[FortnoxInvoiceAccrualListItem]],
        Field(None, alias="InvoiceAccruals"),
    ]


class FortnoxInvoiceAccrualInvoiceAccrualRow(ModelBase):
    account: Annotated[Optional[int], Field(None, alias="Account")]
    cost_center: Annotated[Optional[str], Field(None, alias="CostCenter")]
    credit: Annotated[Optional[float], Field(None, alias="Credit")]
    debit: Annotated[Optional[float], Field(None, alias="Debit")]
    project: Annotated[Optional[str], Field(None, alias="Project")]
    transaction_information: Annotated[
        Optional[str], Field(None, alias="TransactionInformation")
    ]


class FortnoxInvoiceListItem(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    balance: Annotated[Optional[float], Field(None, alias="Balance")]
    booked: Annotated[Optional[bool], Field(None, alias="Booked")]
    cancelled: Annotated[Optional[bool], Field(None, alias="Cancelled")]
    cost_center: Annotated[Optional[str], Field(None, alias="CostCenter")]
    currency: Annotated[Optional[str], Field(None, alias="Currency")]
    currency_rate: Annotated[Optional[float], Field(None, alias="CurrencyRate")]
    currency_unit: Annotated[Optional[float], Field(None, alias="CurrencyUnit")]
    customer_name: Annotated[Optional[str], Field(None, alias="CustomerName")]
    customer_number: Annotated[Optional[str], Field(None, alias="CustomerNumber")]
    document_number: Annotated[Optional[str], Field(None, alias="DocumentNumber")]
    due_date: Annotated[Optional[date], Field(None, alias="DueDate")]
    external_invoice_reference1: Annotated[
        Optional[str], Field(None, alias="ExternalInvoiceReference1")
    ]
    external_invoice_reference2: Annotated[
        Optional[str], Field(None, alias="ExternalInvoiceReference2")
    ]
    final_pay_date: Annotated[Optional[date], Field(None, alias="FinalPayDate")]
    invoice_date: Annotated[Optional[date], Field(None, alias="InvoiceDate")]
    invoice_type: Annotated[Optional[InvoiceType], Field(None, alias="InvoiceType")]
    nox_finans: Annotated[Optional[bool], Field(None, alias="NoxFinans")]
    ocr: Annotated[Optional[str], Field(None, alias="OCR")]
    project: Annotated[Optional[str], Field(None, alias="Project")]
    sent: Annotated[Optional[bool], Field(None, alias="Sent")]
    terms_of_payment: Annotated[Optional[str], Field(None, alias="TermsOfPayment")]
    total: Annotated[Optional[float], Field(None, alias="Total")]
    voucher_number: Annotated[Optional[int], Field(None, alias="VoucherNumber")]
    voucher_series: Annotated[Optional[str], Field(None, alias="VoucherSeries")]
    voucher_year: Annotated[Optional[int], Field(None, alias="VoucherYear")]
    way_of_delivery: Annotated[Optional[str], Field(None, alias="WayOfDelivery")]


class FortnoxInvoiceListItemWrap(ModelBase):
    invoices: Annotated[
        Optional[Sequence[FortnoxInvoiceListItem]], Field(None, alias="Invoices")
    ]


class FortnoxInvoicePayloadEDIInformation(ModelBase):
    edi_global_location_number: Annotated[
        Optional[str], Field(None, alias="EDIGlobalLocationNumber", max_length=13)
    ]
    edi_global_location_number_delivery: Annotated[
        Optional[str],
        Field(None, alias="EDIGlobalLocationNumberDelivery", max_length=13),
    ]
    edi_invoice_extra1: Annotated[Optional[str], Field(None, alias="EDIInvoiceExtra1")]
    edi_invoice_extra2: Annotated[Optional[str], Field(None, alias="EDIInvoiceExtra2")]
    edi_our_electronic_reference: Annotated[
        Optional[str], Field(None, alias="EDIOurElectronicReference")
    ]
    edi_your_electronic_reference: Annotated[
        Optional[str], Field(None, alias="EDIYourElectronicReference")
    ]


class FortnoxInvoicePayloadEmailInformation(ModelBase):
    email_address_bcc: Annotated[Optional[str], Field(None, alias="EmailAddressBCC")]
    email_address_cc: Annotated[Optional[str], Field(None, alias="EmailAddressCC")]
    email_address_from: Annotated[Optional[str], Field(None, alias="EmailAddressFrom")]
    email_address_to: Annotated[Optional[str], Field(None, alias="EmailAddressTo")]
    email_body: Annotated[
        Optional[str], Field(None, alias="EmailBody", max_length=20000)
    ]
    email_subject: Annotated[
        Optional[str], Field(None, alias="EmailSubject", max_length=100)
    ]


class HouseWorkType(Enum):
    construction = "CONSTRUCTION"
    electricity = "ELECTRICITY"
    glassmetalwork = "GLASSMETALWORK"
    grounddrainagework = "GROUNDDRAINAGEWORK"
    masonry = "MASONRY"
    paintingwallpapering = "PAINTINGWALLPAPERING"
    hvac = "HVAC"
    majorappliancerepair = "MAJORAPPLIANCEREPAIR"
    movingservices = "MOVINGSERVICES"
    itservices = "ITSERVICES"
    cleaning = "CLEANING"
    textileclothing = "TEXTILECLOTHING"
    snowplowing = "SNOWPLOWING"
    gardening = "GARDENING"
    babysitting = "BABYSITTING"
    othercare = "OTHERCARE"
    othercosts = "OTHERCOSTS"
    solarcells = "SOLARCELLS"
    storageselfproducedelectricity = "STORAGESELFPRODUCEDELECTRICITY"
    chargingstationelectricvehicle = "CHARGINGSTATIONELECTRICVEHICLE"
    homemaintenance = "HOMEMAINTENANCE"
    furnishing = "FURNISHING"
    transportationservices = "TRANSPORTATIONSERVICES"
    washingandcareofclothing = "WASHINGANDCAREOFCLOTHING"


class FortnoxInvoicePayloadInvoiceRow(ModelBase):
    account_number: Annotated[
        Optional[int], Field(None, alias="AccountNumber", ge=1000, le=9999)
    ]
    article_number: Annotated[Optional[str], Field(None, alias="ArticleNumber")]
    cost_center: Annotated[Optional[str], Field(None, alias="CostCenter")]
    delivered_quantity: Annotated[Optional[str], Field(None, alias="DeliveredQuantity")]
    description: Annotated[Optional[str], Field(None, alias="Description")]
    discount: Annotated[Optional[float], Field(None, alias="Discount")]
    discount_type: Annotated[Optional[DiscountType1], Field(None, alias="DiscountType")]
    house_work: Annotated[Optional[bool], Field(None, alias="HouseWork")]
    house_work_hours_to_report: Annotated[
        Optional[int], Field(None, alias="HouseWorkHoursToReport", le=999)
    ]
    house_work_type: Annotated[
        Optional[HouseWorkType], Field(None, alias="HouseWorkType")
    ]
    price: Annotated[Optional[float], Field(None, alias="Price")]
    project: Annotated[Optional[str], Field(None, alias="Project")]
    row_id: Annotated[Optional[int], Field(None, alias="RowId")]
    stock_point_code: Annotated[Optional[str], Field(None, alias="StockPointCode")]
    unit: Annotated[Optional[str], Field(None, alias="Unit")]
    vat: Annotated[Optional[int], Field(None, alias="VAT")]


class FortnoxInvoicePayloadLabel(ModelBase):
    id: Annotated[Optional[int], Field(None, alias="Id")]


class FortnoxInvoicePaymentListItem(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    amount: Annotated[Optional[float], Field(None, alias="Amount")]
    booked: Annotated[Optional[bool], Field(None, alias="Booked")]
    currency: Annotated[
        Optional[str], Field(None, alias="Currency", max_length=3, min_length=3)
    ]
    currency_rate: Annotated[Optional[float], Field(None, alias="CurrencyRate")]
    currency_unit: Annotated[Optional[float], Field(None, alias="CurrencyUnit")]
    invoice_number: Annotated[int, Field(alias="InvoiceNumber")]
    number: Annotated[Optional[str], Field(None, alias="Number")]
    payment_date: Annotated[Optional[date], Field(None, alias="PaymentDate")]
    source: Annotated[Optional[str], Field(None, alias="Source")]
    write_off_exist: Annotated[Optional[bool], Field(None, alias="WriteOffExist")]


class FortnoxInvoicePaymentListItemList(ModelBase):
    invoice_payments: Annotated[
        Optional[Sequence[FortnoxInvoicePaymentListItem]],
        Field(None, alias="InvoicePayments"),
    ]


class FortnoxInvoicePaymentWriteOff(ModelBase):
    account_number: Annotated[
        Optional[int], Field(None, alias="AccountNumber", ge=1000, le=9999)
    ]
    amount: Annotated[Optional[float], Field(None, alias="Amount")]
    cost_center: Annotated[Optional[str], Field(None, alias="CostCenter")]
    currency: Annotated[
        Optional[str], Field(None, alias="Currency", max_length=3, min_length=3)
    ]
    description: Annotated[Optional[str], Field(None, alias="Description")]
    project: Annotated[Optional[str], Field(None, alias="Project")]
    transaction_information: Annotated[
        Optional[str], Field(None, alias="TransactionInformation")
    ]


class FortnoxInvoiceResponse(ModelBase):
    field_url: Annotated[str, Field(alias="@url")]
    balance_include_fees: Annotated[float, Field(alias="BalanceIncludeFees")]
    balance_include_fees_currency: Annotated[
        float, Field(alias="BalanceIncludeFeesCurrency")
    ]
    current_capital_balance: Annotated[float, Field(alias="CurrentCapitalBalance")]
    current_capital_balance_currency: Annotated[
        float, Field(alias="CurrentCapitalBalanceCurrency")
    ]
    invoice_document_url: Annotated[
        Optional[str], Field(None, alias="InvoiceDocumentURL")
    ]
    invoice_number: Annotated[int, Field(alias="InvoiceNumber")]
    next_event: Annotated[str, Field(alias="NextEvent")]
    next_event_date: Annotated[date, Field(alias="NextEventDate")]
    ocr_number: Annotated[str, Field(alias="OCRNumber")]
    service: Annotated[str, Field(alias="Service")]
    service_name: Annotated[str, Field(alias="ServiceName")]
    status: Annotated[str, Field(alias="Status")]


class FortnoxInvoiceResponseWrap(ModelBase):
    nox_finans_invoice: Annotated[
        Optional[FortnoxInvoiceResponse], Field(None, alias="NoxFinansInvoice")
    ]


class FortnoxInvoiceEDIInformation(ModelBase):
    edi_global_location_number: Annotated[
        Optional[str], Field(None, alias="EDIGlobalLocationNumber", max_length=13)
    ]
    edi_global_location_number_delivery: Annotated[
        Optional[str],
        Field(None, alias="EDIGlobalLocationNumberDelivery", max_length=13),
    ]
    edi_invoice_extra1: Annotated[Optional[str], Field(None, alias="EDIInvoiceExtra1")]
    edi_invoice_extra2: Annotated[Optional[str], Field(None, alias="EDIInvoiceExtra2")]
    edi_our_electronic_reference: Annotated[
        Optional[str], Field(None, alias="EDIOurElectronicReference")
    ]
    edi_status: Annotated[Optional[str], Field(None, alias="EDIStatus")]
    edi_your_electronic_reference: Annotated[
        Optional[str], Field(None, alias="EDIYourElectronicReference")
    ]


class FortnoxInvoiceEmailInformation(ModelBase):
    email_address_bcc: Annotated[Optional[str], Field(None, alias="EmailAddressBCC")]
    email_address_cc: Annotated[Optional[str], Field(None, alias="EmailAddressCC")]
    email_address_from: Annotated[Optional[str], Field(None, alias="EmailAddressFrom")]
    email_address_to: Annotated[Optional[str], Field(None, alias="EmailAddressTo")]
    email_body: Annotated[
        Optional[str], Field(None, alias="EmailBody", max_length=20000)
    ]
    email_subject: Annotated[
        Optional[str], Field(None, alias="EmailSubject", max_length=100)
    ]


class FortnoxInvoiceInvoiceRow(ModelBase):
    account_number: Annotated[
        Optional[int], Field(None, alias="AccountNumber", ge=1000, le=9999)
    ]
    article_number: Annotated[Optional[str], Field(None, alias="ArticleNumber")]
    contribution_percent: Annotated[
        Optional[str], Field(None, alias="ContributionPercent")
    ]
    contribution_value: Annotated[Optional[str], Field(None, alias="ContributionValue")]
    cost_center: Annotated[Optional[str], Field(None, alias="CostCenter")]
    delivered_quantity: Annotated[Optional[str], Field(None, alias="DeliveredQuantity")]
    description: Annotated[
        Optional[str], Field(None, alias="Description", max_length=255)
    ]
    discount: Annotated[Optional[float], Field(None, alias="Discount")]
    discount_type: Annotated[Optional[DiscountType1], Field(None, alias="DiscountType")]
    house_work: Annotated[Optional[bool], Field(None, alias="HouseWork")]
    house_work_hours_to_report: Annotated[
        Optional[int], Field(None, alias="HouseWorkHoursToReport", le=999)
    ]
    house_work_type: Annotated[
        Optional[HouseWorkType], Field(None, alias="HouseWorkType")
    ]
    price: Annotated[Optional[float], Field(None, alias="Price")]
    price_excluding_vat: Annotated[
        Optional[float], Field(None, alias="PriceExcludingVAT")
    ]
    project: Annotated[Optional[str], Field(None, alias="Project")]
    row_id: Annotated[Optional[int], Field(None, alias="RowId")]
    stock_point_code: Annotated[Optional[str], Field(None, alias="StockPointCode")]
    total: Annotated[Optional[float], Field(None, alias="Total")]
    total_excluding_vat: Annotated[
        Optional[float], Field(None, alias="TotalExcludingVAT")
    ]
    unit: Annotated[Optional[str], Field(None, alias="Unit")]
    vat: Annotated[Optional[int], Field(None, alias="VAT")]


class FortnoxInvoiceLabel(ModelBase):
    id: Annotated[Optional[int], Field(None, alias="Id")]


class FortnoxLabel(ModelBase):
    description: Annotated[str, Field(alias="Description", max_length=25, min_length=1)]
    id: Annotated[Optional[int], Field(None, alias="Id")]


class FortnoxLabelList(ModelBase):
    labels: Annotated[Optional[Sequence[FortnoxLabel]], Field(None, alias="Labels")]


class FortnoxLabelWrap(ModelBase):
    label: Annotated[FortnoxLabel, Field(alias="Label")]


class FortnoxListAsset(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    acquisition_date: Annotated[Optional[str], Field(None, alias="AcquisitionDate")]
    acquisition_value: Annotated[Optional[int], Field(None, alias="AcquisitionValue")]
    depreciated_to: Annotated[Optional[str], Field(None, alias="DepreciatedTo")]
    depreciation_final: Annotated[Optional[str], Field(None, alias="DepreciationFinal")]
    description: Annotated[Optional[str], Field(None, alias="Description")]
    id: Annotated[Optional[int], Field(None, alias="Id")]
    number: Annotated[Optional[str], Field(None, alias="Number")]
    status: Annotated[Optional[str], Field(None, alias="Status")]
    status_id: Annotated[Optional[str], Field(None, alias="StatusId")]
    type: Annotated[Optional[str], Field(None, alias="Type")]
    type_id: Annotated[Optional[int], Field(None, alias="TypeId")]


class FortnoxListAssetWrap(ModelBase):
    assets: Annotated[Optional[Sequence[FortnoxListAsset]], Field(None, alias="Assets")]


class FortnoxLockedPeriod(ModelBase):
    end_date: Annotated[Optional[date], Field(None, alias="EndDate")]


class FortnoxLockedPeriodWrap(ModelBase):
    locked_period: Annotated[
        Optional[FortnoxLockedPeriod], Field(None, alias="LockedPeriod")
    ]


class FortnoxManualObAsset(ModelBase):
    amount: Annotated[Optional[int], Field(None, alias="Amount")]
    comment: Annotated[Optional[str], Field(None, alias="Comment")]


class FortnoxMe(ModelBase):
    email: Annotated[Optional[str], Field(None, alias="Email")]
    id: Annotated[Optional[str], Field(None, alias="Id")]
    locale: Annotated[Optional[str], Field(None, alias="Locale")]
    name: Annotated[Optional[str], Field(None, alias="Name")]
    sys_admin: Annotated[Optional[bool], Field(None, alias="SysAdmin")]


class FortnoxMeWrap(ModelBase):
    me: Annotated[Optional[FortnoxMe], Field(None, alias="Me")]


class FortnoxModeOfPayment(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    account_number: Annotated[
        str, Field(alias="AccountNumber", max_length=4, min_length=4)
    ]
    code: Annotated[Optional[str], Field(None, alias="Code")]
    description: Annotated[Optional[str], Field(None, alias="Description")]


class FortnoxModeOfPaymentList(ModelBase):
    modes_of_payments: Annotated[
        Optional[Sequence[FortnoxModeOfPayment]], Field(None, alias="ModesOfPayments")
    ]


class FortnoxModeOfPaymentWrap(ModelBase):
    mode_of_payment: Annotated[FortnoxModeOfPayment, Field(alias="ModeOfPayment")]


class FortnoxOfferListItem(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    cancelled: Annotated[Optional[bool], Field(None, alias="Cancelled")]
    currency: Annotated[Optional[str], Field(None, alias="Currency")]
    customer_name: Annotated[Optional[str], Field(None, alias="CustomerName")]
    customer_number: Annotated[str, Field(alias="CustomerNumber")]
    document_number: Annotated[Optional[str], Field(None, alias="DocumentNumber")]
    offer_date: Annotated[Optional[date], Field(None, alias="OfferDate")]
    project: Annotated[Optional[str], Field(None, alias="Project")]
    sent: Annotated[Optional[bool], Field(None, alias="Sent")]
    total: Annotated[Optional[float], Field(None, alias="Total")]


class FortnoxOfferListItemList(ModelBase):
    offers: Annotated[
        Optional[Sequence[FortnoxOfferListItem]], Field(None, alias="Offers")
    ]


class FortnoxOfferEmailInformation(ModelBase):
    email_address_bcc: Annotated[Optional[str], Field(None, alias="EmailAddressBCC")]
    email_address_cc: Annotated[Optional[str], Field(None, alias="EmailAddressCC")]
    email_address_from: Annotated[Optional[str], Field(None, alias="EmailAddressFrom")]
    email_address_to: Annotated[Optional[str], Field(None, alias="EmailAddressTo")]
    email_body: Annotated[
        Optional[str], Field(None, alias="EmailBody", max_length=20000)
    ]
    email_subject: Annotated[
        Optional[str], Field(None, alias="EmailSubject", max_length=100)
    ]


class FortnoxOfferLabel(ModelBase):
    id: Annotated[Optional[int], Field(None, alias="Id")]


class HouseWorkType2(Enum):
    construction = "CONSTRUCTION"
    electricity = "ELECTRICITY"
    glassmetalwork = "GLASSMETALWORK"
    grounddrainagework = "GROUNDDRAINAGEWORK"
    masonry = "MASONRY"
    paintingwallpapering = "PAINTINGWALLPAPERING"
    hvac = "HVAC"
    cleaning = "CLEANING"
    textileclothing = "TEXTILECLOTHING"
    cooking = "COOKING"
    snowplowing = "SNOWPLOWING"
    gardening = "GARDENING"
    babysitting = "BABYSITTING"
    othercare = "OTHERCARE"
    tutoring = "TUTORING"
    othercosts = "OTHERCOSTS"


class FortnoxOfferOfferRow(ModelBase):
    account_number: Annotated[Optional[int], Field(None, alias="AccountNumber")]
    article_number: Annotated[Optional[str], Field(None, alias="ArticleNumber")]
    contribution_percent: Annotated[
        Optional[str], Field(None, alias="ContributionPercent")
    ]
    contribution_value: Annotated[Optional[str], Field(None, alias="ContributionValue")]
    cost_center: Annotated[Optional[str], Field(None, alias="CostCenter")]
    description: Annotated[Optional[str], Field(None, alias="Description")]
    discount: Annotated[Optional[float], Field(None, alias="Discount")]
    discount_type: Annotated[Optional[DiscountType1], Field(None, alias="DiscountType")]
    house_work: Annotated[Optional[bool], Field(None, alias="HouseWork")]
    house_work_hours_to_report: Annotated[
        Optional[float], Field(None, alias="HouseWorkHoursToReport", le=999.0)
    ]
    house_work_type: Annotated[
        Optional[HouseWorkType2], Field(None, alias="HouseWorkType")
    ]
    price: Annotated[Optional[float], Field(None, alias="Price")]
    project: Annotated[Optional[str], Field(None, alias="Project")]
    quantity: Annotated[Optional[str], Field(None, alias="Quantity")]
    row_id: Annotated[Optional[int], Field(None, alias="RowId")]
    total: Annotated[Optional[float], Field(None, alias="Total")]
    unit: Annotated[Optional[str], Field(None, alias="Unit")]
    vat: Annotated[Optional[int], Field(None, alias="VAT")]


class DeliveryState(Enum):
    registration = "registration"
    reservation = "reservation"
    delivery = "delivery"


class FortnoxOrderListItem(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    cancelled: Annotated[Optional[bool], Field(None, alias="Cancelled")]
    currency: Annotated[Optional[str], Field(None, alias="Currency", max_length=3)]
    customer_name: Annotated[Optional[str], Field(None, alias="CustomerName")]
    customer_number: Annotated[str, Field(alias="CustomerNumber")]
    delivery_date: Annotated[Optional[date], Field(None, alias="DeliveryDate")]
    document_number: Annotated[Optional[str], Field(None, alias="DocumentNumber")]
    external_invoice_reference1: Annotated[
        Optional[str], Field(None, alias="ExternalInvoiceReference1")
    ]
    external_invoice_reference2: Annotated[
        Optional[str], Field(None, alias="ExternalInvoiceReference2")
    ]
    order_date: Annotated[Optional[date], Field(None, alias="OrderDate")]
    order_type: Annotated[Optional[str], Field(None, alias="OrderType")]
    project: Annotated[Optional[str], Field(None, alias="Project")]
    sent: Annotated[Optional[bool], Field(None, alias="Sent")]
    total: Annotated[Optional[float], Field(None, alias="Total")]


class FortnoxOrderListItemList(ModelBase):
    orders: Annotated[
        Optional[Sequence[FortnoxOrderListItem]], Field(None, alias="Orders")
    ]


class FortnoxOrderEmailInformation(ModelBase):
    email_address_bcc: Annotated[Optional[str], Field(None, alias="EmailAddressBCC")]
    email_address_cc: Annotated[Optional[str], Field(None, alias="EmailAddressCC")]
    email_address_from: Annotated[Optional[str], Field(None, alias="EmailAddressFrom")]
    email_address_to: Annotated[Optional[str], Field(None, alias="EmailAddressTo")]
    email_body: Annotated[Optional[str], Field(None, alias="EmailBody")]
    email_subject: Annotated[Optional[str], Field(None, alias="EmailSubject")]


class FortnoxOrderLabel(ModelBase):
    id: Annotated[Optional[int], Field(None, alias="Id")]


class HouseWorkType3(Enum):
    construction = "CONSTRUCTION"
    electricity = "ELECTRICITY"
    glassmetalwork = "GLASSMETALWORK"
    grounddrainagework = "GROUNDDRAINAGEWORK"
    masonry = "MASONRY"
    paintingwallpapering = "PAINTINGWALLPAPERING"
    movingservices = "MOVINGSERVICES"
    itservices = "ITSERVICES"
    cleaning = "CLEANING"
    textileclothing = "TEXTILECLOTHING"
    snowplowing = "SNOWPLOWING"
    gardening = "GARDENING"
    babysitting = "BABYSITTING"
    othercare = "OTHERCARE"
    othercosts = "OTHERCOSTS"


class FortnoxOrderOrderRow(ModelBase):
    account_number: Annotated[Optional[int], Field(None, alias="AccountNumber")]
    article_number: Annotated[Optional[str], Field(None, alias="ArticleNumber")]
    contribution_percent: Annotated[
        Optional[str], Field(None, alias="ContributionPercent")
    ]
    contribution_value: Annotated[Optional[str], Field(None, alias="ContributionValue")]
    cost_center: Annotated[Optional[str], Field(None, alias="CostCenter")]
    delivered_quantity: Annotated[Optional[str], Field(None, alias="DeliveredQuantity")]
    description: Annotated[Optional[str], Field(None, alias="Description")]
    discount: Annotated[Optional[float], Field(None, alias="Discount")]
    discount_type: Annotated[Optional[DiscountType1], Field(None, alias="DiscountType")]
    house_work: Annotated[Optional[bool], Field(None, alias="HouseWork")]
    house_work_hours_to_report: Annotated[
        Optional[int], Field(None, alias="HouseWorkHoursToReport")
    ]
    house_work_type: Annotated[
        Optional[HouseWorkType3], Field(None, alias="HouseWorkType")
    ]
    ordered_quantity: Annotated[Optional[str], Field(None, alias="OrderedQuantity")]
    price: Annotated[Optional[float], Field(None, alias="Price")]
    project: Annotated[Optional[str], Field(None, alias="Project")]
    reserved_quantity: Annotated[Optional[str], Field(None, alias="ReservedQuantity")]
    row_id: Annotated[Optional[int], Field(None, alias="RowId")]
    stock_point_code: Annotated[Optional[str], Field(None, alias="StockPointCode")]
    stock_point_id: Annotated[Optional[str], Field(None, alias="StockPointId")]
    total: Annotated[Optional[float], Field(None, alias="Total")]
    unit: Annotated[Optional[str], Field(None, alias="Unit")]
    vat: Annotated[Optional[float], Field(None, alias="VAT")]


class FortnoxPausePayload(ModelBase):
    paused_until_date: Annotated[date, Field(alias="PausedUntilDate")]


class FortnoxPausePayloadWrap(ModelBase):
    nox_finans_invoice: Annotated[
        Optional[FortnoxPausePayload], Field(None, alias="NoxFinansInvoice")
    ]


class FortnoxPredefinedAccount(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    account: Annotated[int, Field(alias="Account", ge=1000, le=9999)]
    name: Annotated[Optional[str], Field(None, alias="Name")]


class FortnoxPredefinedAccountList(ModelBase):
    pre_defined_accounts: Annotated[
        Optional[Sequence[FortnoxPredefinedAccount]],
        Field(None, alias="PreDefinedAccounts"),
    ]


class FortnoxPredefinedAccountWrap(ModelBase):
    pre_defined_account: Annotated[
        FortnoxPredefinedAccount, Field(alias="PreDefinedAccount")
    ]


class FortnoxPredefinedVoucherSeries(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    name: Annotated[Optional[str], Field(None, alias="Name")]
    voucher_series: Annotated[str, Field(alias="VoucherSeries", max_length=1)]


class FortnoxPredefinedVoucherSeriesList(ModelBase):
    pre_defined_voucher_series_collection: Annotated[
        Optional[Sequence[FortnoxPredefinedVoucherSeries]],
        Field(None, alias="PreDefinedVoucherSeriesCollection"),
    ]


class FortnoxPredefinedVoucherSeriesWrap(ModelBase):
    pre_defined_voucher_series: Annotated[
        Optional[FortnoxPredefinedVoucherSeries],
        Field(None, alias="PreDefinedVoucherSeries"),
    ]


class FortnoxPrice(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    article_number: Annotated[str, Field(alias="ArticleNumber")]
    date: Annotated[Optional[AwareDatetime], Field(None, alias="Date")]
    from_quantity: Annotated[Optional[float], Field(None, alias="FromQuantity")]
    percent: Annotated[Optional[float], Field(None, alias="Percent")]
    price: Annotated[Optional[float], Field(None, alias="Price")]
    price_list: Annotated[str, Field(alias="PriceList")]


class FortnoxPriceList(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    code: Annotated[str, Field(alias="Code", max_length=100, min_length=1)]
    comments: Annotated[Optional[str], Field(None, alias="Comments")]
    description: Annotated[str, Field(alias="Description", max_length=50, min_length=1)]
    pre_selected: Annotated[Optional[bool], Field(None, alias="PreSelected")]


class FortnoxPriceListItem(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    article_number: Annotated[str, Field(alias="ArticleNumber")]
    from_quantity: Annotated[Optional[float], Field(None, alias="FromQuantity")]
    price: Annotated[Optional[float], Field(None, alias="Price")]
    price_list: Annotated[str, Field(alias="PriceList")]


class FortnoxPriceListItemList(ModelBase):
    prices: Annotated[
        Optional[Sequence[FortnoxPriceListItem]], Field(None, alias="Prices")
    ]


class FortnoxPriceListList(ModelBase):
    price_lists: Annotated[
        Optional[Sequence[FortnoxPriceList]], Field(None, alias="PriceLists")
    ]


class FortnoxPriceListWrap(ModelBase):
    price_list: Annotated[FortnoxPriceList, Field(alias="PriceList")]


class FortnoxPriceWrap(ModelBase):
    price: Annotated[Optional[FortnoxPrice], Field(None, alias="Price")]


class FortnoxPrintTemplate(ModelBase):
    name: Annotated[
        Optional[str], Field(None, alias="Name", max_length=25, min_length=1)
    ]
    template: Annotated[str, Field(alias="Template")]


class FortnoxPrintTemplateList(ModelBase):
    print_templates: Annotated[
        Optional[Sequence[FortnoxPrintTemplate]], Field(None, alias="PrintTemplates")
    ]


class Status(Enum):
    notstarted = "NOTSTARTED"
    ongoing = "ONGOING"
    completed = "COMPLETED"


class FortnoxProject(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    comments: Annotated[Optional[str], Field(None, alias="Comments", max_length=512)]
    contact_person: Annotated[
        Optional[str], Field(None, alias="ContactPerson", max_length=50)
    ]
    description: Annotated[str, Field(alias="Description", max_length=50, min_length=1)]
    end_date: Annotated[Optional[date], Field(None, alias="EndDate")]
    project_leader: Annotated[
        Optional[str], Field(None, alias="ProjectLeader", max_length=50)
    ]
    project_number: Annotated[
        Optional[str], Field(None, alias="ProjectNumber", max_length=20)
    ]
    start_date: Annotated[Optional[date], Field(None, alias="StartDate")]
    status: Annotated[Optional[Status], Field(None, alias="Status")]


class FortnoxProjectListItem(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    description: Annotated[str, Field(alias="Description", max_length=50, min_length=1)]
    end_date: Annotated[Optional[date], Field(None, alias="EndDate")]
    project_leader: Annotated[
        Optional[str], Field(None, alias="ProjectLeader", max_length=50)
    ]
    project_number: Annotated[
        Optional[str], Field(None, alias="ProjectNumber", max_length=20)
    ]
    start_date: Annotated[Optional[date], Field(None, alias="StartDate")]
    status: Annotated[Optional[Status], Field(None, alias="Status")]


class FortnoxProjectListItemList(ModelBase):
    projects: Annotated[
        Optional[Sequence[FortnoxProjectListItem]], Field(None, alias="Projects")
    ]


class FortnoxProjectWrap(ModelBase):
    project: Annotated[Optional[FortnoxProject], Field(None, alias="Project")]


class FortnoxReportPaymentPayload(ModelBase):
    bookkeep_payment_in_fortnox: Annotated[
        bool, Field(alias="BookkeepPaymentInFortnox")
    ]
    client_takes_fees: Annotated[bool, Field(alias="ClientTakesFees")]
    payment_amount: Annotated[float, Field(alias="PaymentAmount")]
    payment_method_account: Annotated[str, Field(alias="PaymentMethodAccount")]
    payment_method_code: Annotated[str, Field(alias="PaymentMethodCode")]
    report_to_finance: Annotated[bool, Field(alias="ReportToFinance")]


class FortnoxSalaryTransaction(ModelBase):
    amount: Annotated[Optional[str], Field(None, alias="Amount")]
    cost_center: Annotated[Optional[str], Field(None, alias="CostCenter")]
    date: Annotated[date, Field(alias="Date")]
    employee_id: Annotated[str, Field(alias="EmployeeId")]
    expense: Annotated[Optional[str], Field(None, alias="Expense", max_length=6)]
    number: Annotated[Optional[str], Field(None, alias="Number")]
    project: Annotated[Optional[str], Field(None, alias="Project")]
    salary_code: Annotated[str, Field(alias="SalaryCode")]
    salary_row: Annotated[Optional[int], Field(None, alias="SalaryRow")]
    text_row: Annotated[Optional[str], Field(None, alias="TextRow", max_length=40)]
    total: Annotated[Optional[str], Field(None, alias="Total")]
    vat: Annotated[Optional[str], Field(None, alias="VAT")]


class FortnoxSalaryTransactionListItem(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    amount: Annotated[Optional[str], Field(None, alias="Amount")]
    cost_center: Annotated[Optional[str], Field(None, alias="CostCenter")]
    date: Annotated[date, Field(alias="Date")]
    employee_id: Annotated[str, Field(alias="EmployeeId")]
    expense: Annotated[Optional[str], Field(None, alias="Expense", max_length=6)]
    number: Annotated[Optional[str], Field(None, alias="Number")]
    project: Annotated[Optional[str], Field(None, alias="Project")]
    salary_code: Annotated[str, Field(alias="SalaryCode")]
    salary_row: Annotated[Optional[int], Field(None, alias="SalaryRow")]
    text_row: Annotated[Optional[str], Field(None, alias="TextRow", max_length=40)]
    total: Annotated[Optional[str], Field(None, alias="Total")]
    vat: Annotated[Optional[str], Field(None, alias="VAT")]


class FortnoxSalaryTransactionListItemList(ModelBase):
    salary_transactions: Annotated[
        Optional[Sequence[FortnoxSalaryTransactionListItem]],
        Field(None, alias="SalaryTransactions"),
    ]


class FortnoxSalaryTransactionWrap(ModelBase):
    salary_transaction: Annotated[
        FortnoxSalaryTransaction, Field(alias="SalaryTransaction")
    ]


class FortnoxScheduleTime(ModelBase):
    date: Annotated[Optional[date], Field(None, alias="Date")]
    employee_id: Annotated[Optional[str], Field(None, alias="EmployeeId")]
    hours: Annotated[Optional[str], Field(None, alias="Hours")]
    iwh1: Annotated[Optional[str], Field(None, alias="IWH1")]
    iwh2: Annotated[Optional[str], Field(None, alias="IWH2")]
    iwh3: Annotated[Optional[str], Field(None, alias="IWH3")]
    iwh4: Annotated[Optional[str], Field(None, alias="IWH4")]
    iwh5: Annotated[Optional[str], Field(None, alias="IWH5")]
    schedule_id: Annotated[Optional[str], Field(None, alias="ScheduleId")]


class FortnoxScheduleTimeWrap(ModelBase):
    schedule_time: Annotated[
        Optional[FortnoxScheduleTime], Field(None, alias="ScheduleTime")
    ]


class FortnoxScrap(ModelBase):
    comment: Annotated[Optional[str], Field(None, alias="Comment")]
    date: Annotated[Optional[str], Field(None, alias="Date")]
    percentage: Annotated[Optional[int], Field(None, alias="Percentage")]


class FortnoxScrapWrap(ModelBase):
    asset: Annotated[Optional[FortnoxScrap], Field(None, alias="Asset")]


class FortnoxSell(ModelBase):
    comment: Annotated[Optional[str], Field(None, alias="Comment")]
    date: Annotated[Optional[str], Field(None, alias="Date")]
    percentage: Annotated[Optional[int], Field(None, alias="Percentage")]
    price: Annotated[Optional[int], Field(None, alias="Price")]


class FortnoxSellWrap(ModelBase):
    asset: Annotated[Optional[FortnoxSell], Field(None, alias="Asset")]


class FortnoxSupplier(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    active: Annotated[Optional[bool], Field(None, alias="Active")]
    address1: Annotated[Optional[str], Field(None, alias="Address1")]
    address2: Annotated[Optional[str], Field(None, alias="Address2")]
    bg: Annotated[Optional[str], Field(None, alias="BG")]
    bic: Annotated[Optional[str], Field(None, alias="BIC")]
    bank: Annotated[Optional[str], Field(None, alias="Bank")]
    bank_account_number: Annotated[
        Optional[str], Field(None, alias="BankAccountNumber")
    ]
    branch_code: Annotated[Optional[str], Field(None, alias="BranchCode")]
    city: Annotated[Optional[str], Field(None, alias="City", max_length=1024)]
    clearing_number: Annotated[Optional[str], Field(None, alias="ClearingNumber")]
    comments: Annotated[Optional[str], Field(None, alias="Comments", max_length=1024)]
    cost_center: Annotated[Optional[str], Field(None, alias="CostCenter")]
    country: Annotated[Optional[str], Field(None, alias="Country")]
    country_code: Annotated[
        Optional[str], Field(None, alias="CountryCode", max_length=2)
    ]
    currency: Annotated[Optional[str], Field(None, alias="Currency", max_length=3)]
    disable_payment_file: Annotated[
        Optional[bool], Field(None, alias="DisablePaymentFile")
    ]
    email: Annotated[Optional[str], Field(None, alias="Email")]
    fax: Annotated[Optional[str], Field(None, alias="Fax")]
    iban: Annotated[Optional[str], Field(None, alias="IBAN")]
    name: Annotated[str, Field(alias="Name", max_length=1024, min_length=1)]
    organisation_number: Annotated[
        Optional[str], Field(None, alias="OrganisationNumber")
    ]
    our_customer_number: Annotated[
        Optional[str], Field(None, alias="OurCustomerNumber")
    ]
    our_reference: Annotated[Optional[str], Field(None, alias="OurReference")]
    pg: Annotated[Optional[str], Field(None, alias="PG")]
    phone1: Annotated[Optional[str], Field(None, alias="Phone1", max_length=1024)]
    phone2: Annotated[Optional[str], Field(None, alias="Phone2", max_length=1024)]
    pre_defined_account: Annotated[
        Optional[str],
        Field(None, alias="PreDefinedAccount", max_length=4, min_length=4),
    ]
    project: Annotated[Optional[str], Field(None, alias="Project")]
    supplier_number: Annotated[Optional[str], Field(None, alias="SupplierNumber")]
    terms_of_payment: Annotated[Optional[str], Field(None, alias="TermsOfPayment")]
    vat_number: Annotated[Optional[str], Field(None, alias="VATNumber")]
    vat_type: Annotated[Optional[str], Field(None, alias="VATType")]
    visiting_address: Annotated[Optional[str], Field(None, alias="VisitingAddress")]
    visiting_city: Annotated[Optional[str], Field(None, alias="VisitingCity")]
    visiting_country: Annotated[Optional[str], Field(None, alias="VisitingCountry")]
    visiting_country_code: Annotated[
        Optional[str], Field(None, alias="VisitingCountryCode")
    ]
    visiting_zip_code: Annotated[Optional[str], Field(None, alias="VisitingZipCode")]
    www: Annotated[Optional[str], Field(None, alias="WWW")]
    work_place: Annotated[Optional[str], Field(None, alias="WorkPlace")]
    your_reference: Annotated[Optional[str], Field(None, alias="YourReference")]
    zip_code: Annotated[Optional[str], Field(None, alias="ZipCode")]


class SalesType(Enum):
    stock = "STOCK"
    service = "SERVICE"


class VatType1(Enum):
    normal = "NORMAL"
    euinternal = "EUINTERNAL"
    reverse = "REVERSE"


class FortnoxSupplierInvoiceAccrualListItem(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    description: Annotated[Optional[str], Field(None, alias="Description")]
    period: Annotated[Period2, Field(alias="Period")]
    supplier_invoice_number: Annotated[
        Optional[int], Field(None, alias="SupplierInvoiceNumber")
    ]


class FortnoxSupplierInvoiceAccrualListItemList(ModelBase):
    supplier_invoice_accruals: Annotated[
        Optional[Sequence[FortnoxSupplierInvoiceAccrualListItem]],
        Field(None, alias="SupplierInvoiceAccruals"),
    ]


class FortnoxSupplierInvoiceAccrualSupplierInvoiceAccrualRows(ModelBase):
    account: Annotated[Optional[int], Field(None, alias="Account")]
    cost_center: Annotated[Optional[str], Field(None, alias="CostCenter")]
    credit: Annotated[Optional[float], Field(None, alias="Credit")]
    debit: Annotated[Optional[float], Field(None, alias="Debit")]
    project: Annotated[Optional[str], Field(None, alias="Project")]
    transaction_information: Annotated[
        Optional[str], Field(None, alias="TransactionInformation")
    ]


class FortnoxSupplierInvoiceExternalUrlConnection(ModelBase):
    external_url_connection: Annotated[
        Optional[str], Field(None, alias="ExternalUrlConnection")
    ]
    id: Annotated[Optional[int], Field(None, alias="Id")]
    supplier_invoice_number: Annotated[
        Optional[int], Field(None, alias="SupplierInvoiceNumber")
    ]
    url: Annotated[Optional[str], Field(None, alias="Url")]


class FortnoxSupplierInvoiceExternalUrlConnectionUpdate(ModelBase):
    external_url_connection: Annotated[
        Optional[str], Field(None, alias="ExternalURLConnection")
    ]
    supplier_invoice_number: Annotated[
        Optional[int], Field(None, alias="SupplierInvoiceNumber")
    ]


class FortnoxSupplierInvoiceExternalUrlConnectionSingle(ModelBase):
    supplier_invoice_external_url_connection: Annotated[
        Optional[FortnoxSupplierInvoiceExternalUrlConnection],
        Field(None, alias="SupplierInvoiceExternalURLConnection"),
    ]


class FortnoxSupplierInvoiceFileConnection(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    file_id: Annotated[Optional[str], Field(None, alias="FileId")]
    name: Annotated[Optional[str], Field(None, alias="Name")]
    supplier_invoice_number: Annotated[
        Optional[str], Field(None, alias="SupplierInvoiceNumber")
    ]
    supplier_name: Annotated[Optional[str], Field(None, alias="SupplierName")]


class FortnoxSupplierInvoiceFileConnectionList(ModelBase):
    supplier_invoice_file_connections: Annotated[
        Optional[Sequence[FortnoxSupplierInvoiceFileConnection]],
        Field(None, alias="SupplierInvoiceFileConnections"),
    ]


class FortnoxSupplierInvoiceFileConnectionWrap(ModelBase):
    supplier_invoice_file_connection: Annotated[
        Optional[FortnoxSupplierInvoiceFileConnection],
        Field(None, alias="SupplierInvoiceFileConnection"),
    ]


class FortnoxSupplierInvoiceListItemVoucher(ModelBase):
    number: Annotated[Optional[int], Field(None, alias="Number")]
    reference_type: Annotated[Optional[str], Field(None, alias="ReferenceType")]
    series: Annotated[Optional[str], Field(None, alias="Series")]
    year: Annotated[Optional[int], Field(None, alias="Year")]


class Source(Enum):
    manual = "manual"
    direct = "direct"


class FortnoxSupplierInvoicePaymentListItem(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    amount: Annotated[Optional[float], Field(None, alias="Amount")]
    booked: Annotated[Optional[bool], Field(None, alias="Booked")]
    currency: Annotated[
        Optional[str], Field(None, alias="Currency", max_length=3, min_length=3)
    ]
    currency_rate: Annotated[Optional[float], Field(None, alias="CurrencyRate")]
    currency_unit: Annotated[Optional[float], Field(None, alias="CurrencyUnit")]
    invoice_number: Annotated[str, Field(alias="InvoiceNumber")]
    number: Annotated[Optional[int], Field(None, alias="Number")]
    payment_date: Annotated[Optional[date], Field(None, alias="PaymentDate")]
    source: Annotated[Optional[Source], Field(None, alias="Source")]
    write_off_exist: Annotated[Optional[bool], Field(None, alias="WriteOffExist")]


class FortnoxSupplierInvoicePaymentListItemList(ModelBase):
    supplier_invoice_payments: Annotated[
        Optional[Sequence[FortnoxSupplierInvoicePaymentListItem]],
        Field(None, alias="SupplierInvoicePayments"),
    ]


class FortnoxSupplierInvoicePaymentWriteOff(ModelBase):
    account_number: Annotated[
        Optional[int], Field(None, alias="AccountNumber", ge=1000, le=9999)
    ]
    amount: Annotated[Optional[float], Field(None, alias="Amount")]
    cost_center: Annotated[Optional[str], Field(None, alias="CostCenter")]
    currency: Annotated[
        Optional[str], Field(None, alias="Currency", max_length=3, min_length=3)
    ]
    description: Annotated[Optional[str], Field(None, alias="Description")]
    project: Annotated[Optional[str], Field(None, alias="Project")]
    transaction_information: Annotated[
        Optional[str], Field(None, alias="TransactionInformation")
    ]


class Code(Enum):
    tot = "TOT"
    vat = "VAT"
    frt = "FRT"
    afe = "AFE"
    rov = "ROV"
    cnd = "CND"
    cnc = "CNC"
    prd = "PRD"
    prc = "PRC"
    srd = "SRD"
    src = "SRC"
    pre = "PRE"
    gwb = "GWB"
    acc = "ACC"


class FortnoxSupplierInvoiceSupplierInvoiceRow(ModelBase):
    account: Annotated[Optional[int], Field(None, alias="Account", ge=1000, le=9999)]
    account_description: Annotated[
        Optional[str], Field(None, alias="AccountDescription")
    ]
    article_number: Annotated[Optional[str], Field(None, alias="ArticleNumber")]
    code: Annotated[Optional[Code], Field(None, alias="Code")]
    cost_center: Annotated[Optional[str], Field(None, alias="CostCenter")]
    credit: Annotated[Optional[float], Field(None, alias="Credit")]
    credit_currency: Annotated[Optional[float], Field(None, alias="CreditCurrency")]
    debit: Annotated[Optional[float], Field(None, alias="Debit")]
    debit_currency: Annotated[Optional[float], Field(None, alias="DebitCurrency")]
    item_description: Annotated[Optional[str], Field(None, alias="ItemDescription")]
    price: Annotated[Optional[float], Field(None, alias="Price")]
    project: Annotated[Optional[str], Field(None, alias="Project")]
    quantity: Annotated[Optional[int], Field(None, alias="Quantity")]
    stock_location_code: Annotated[
        Optional[str], Field(None, alias="StockLocationCode")
    ]
    stock_point_code: Annotated[Optional[str], Field(None, alias="StockPointCode")]
    total: Annotated[Optional[float], Field(None, alias="Total")]
    transaction_information: Annotated[
        Optional[str], Field(None, alias="TransactionInformation", max_length=100)
    ]
    unit: Annotated[Optional[str], Field(None, alias="Unit")]


class FortnoxSupplierInvoiceVoucher(ModelBase):
    number: Annotated[Optional[int], Field(None, alias="Number")]
    reference_type: Annotated[Optional[str], Field(None, alias="ReferenceType")]
    series: Annotated[Optional[str], Field(None, alias="Series")]
    year: Annotated[Optional[int], Field(None, alias="Year")]


class FortnoxSupplierListItem(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    active: Annotated[Optional[bool], Field(None, alias="Active")]
    address1: Annotated[Optional[str], Field(None, alias="Address1")]
    address2: Annotated[Optional[str], Field(None, alias="Address2")]
    bg: Annotated[Optional[str], Field(None, alias="BG")]
    bic: Annotated[Optional[str], Field(None, alias="BIC")]
    bank_account_number: Annotated[
        Optional[str], Field(None, alias="BankAccountNumber")
    ]
    city: Annotated[Optional[str], Field(None, alias="City", max_length=1024)]
    cost_center: Annotated[Optional[str], Field(None, alias="CostCenter")]
    country_code: Annotated[
        Optional[str], Field(None, alias="CountryCode", max_length=2)
    ]
    currency: Annotated[Optional[str], Field(None, alias="Currency", max_length=3)]
    disable_payment_file: Annotated[
        Optional[bool], Field(None, alias="DisablePaymentFile")
    ]
    email: Annotated[Optional[str], Field(None, alias="Email")]
    iban: Annotated[Optional[str], Field(None, alias="IBAN")]
    name: Annotated[str, Field(alias="Name", max_length=1024, min_length=1)]
    organisation_number: Annotated[
        Optional[str], Field(None, alias="OrganisationNumber")
    ]
    pg: Annotated[Optional[str], Field(None, alias="PG")]
    phone: Annotated[Optional[str], Field(None, alias="Phone")]
    pre_defined_account: Annotated[
        Optional[str],
        Field(None, alias="PreDefinedAccount", max_length=4, min_length=4),
    ]
    project: Annotated[Optional[str], Field(None, alias="Project")]
    supplier_number: Annotated[Optional[str], Field(None, alias="SupplierNumber")]
    terms_of_payment: Annotated[Optional[str], Field(None, alias="TermsOfPayment")]
    zip_code: Annotated[Optional[str], Field(None, alias="ZipCode")]


class FortnoxSupplierListItemList(ModelBase):
    suppliers: Annotated[
        Optional[Sequence[FortnoxSupplierListItem]], Field(None, alias="Suppliers")
    ]


class FortnoxSupplierWrap(ModelBase):
    supplier: Annotated[Optional[FortnoxSupplier], Field(None, alias="Supplier")]


class ReferenceDocumentType(Enum):
    offer = "OFFER"
    order = "ORDER"
    invoice = "INVOICE"


class FortnoxTaxReductionListItem(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    approved_amount: Annotated[Optional[float], Field(None, alias="ApprovedAmount")]
    customer_name: Annotated[
        str, Field(alias="CustomerName", max_length=2147483647, min_length=1)
    ]
    id: Annotated[Optional[int], Field(None, alias="Id")]
    reference_document_type: Annotated[
        ReferenceDocumentType, Field(alias="ReferenceDocumentType")
    ]
    reference_number: Annotated[int, Field(alias="ReferenceNumber")]
    social_security_number: Annotated[
        str, Field(alias="SocialSecurityNumber", max_length=13, min_length=10)
    ]


class FortnoxTaxReductionListItemList(ModelBase):
    tax_reductions: Annotated[
        Optional[Sequence[FortnoxTaxReductionListItem]],
        Field(None, alias="TaxReductions"),
    ]


class WorkType(Enum):
    solarcells = "SOLARCELLS"
    storageselfproducedelectricity = "STORAGESELFPRODUCEDELECTRICITY"
    chargingstationelectricvehicle = "CHARGINGSTATIONELECTRICVEHICLE"


class FortnoxTaxReductionTaxReductionAmount(ModelBase):
    asked_amount: Annotated[float, Field(alias="AskedAmount", ge=1.0)]
    work_type: Annotated[WorkType, Field(alias="WorkType")]


class FortnoxTermsOfDelivery(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    code: Annotated[str, Field(alias="Code", max_length=20, min_length=1)]
    description: Annotated[str, Field(alias="Description", max_length=200)]
    description_english: Annotated[
        Optional[str], Field(None, alias="DescriptionEnglish", max_length=100)
    ]


class FortnoxTermsOfDeliveryList(ModelBase):
    terms_of_deliveries: Annotated[
        Optional[Sequence[FortnoxTermsOfDelivery]],
        Field(None, alias="TermsOfDeliveries"),
    ]


class FortnoxTermsOfDeliveryWrap(ModelBase):
    terms_of_delivery: Annotated[FortnoxTermsOfDelivery, Field(alias="TermsOfDelivery")]


class FortnoxTermsOfPayment(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    code: Annotated[str, Field(alias="Code", max_length=25, min_length=1)]
    description: Annotated[str, Field(alias="Description")]


class FortnoxTermsOfPaymentList(ModelBase):
    terms_of_payments: Annotated[
        Optional[Sequence[FortnoxTermsOfPayment]], Field(None, alias="TermsOfPayments")
    ]


class FortnoxTermsOfPaymentWrap(ModelBase):
    terms_of_payment: Annotated[FortnoxTermsOfPayment, Field(alias="TermsOfPayment")]


class FortnoxTrustedEmailSenderRejectedSender(ModelBase):
    email: Annotated[str, Field(alias="Email")]
    id: Annotated[Optional[int], Field(None, alias="Id")]


class FortnoxTrustedEmailSenderTrustedSender(ModelBase):
    email: Annotated[str, Field(alias="Email")]
    id: Annotated[Optional[int], Field(None, alias="Id")]


class FortnoxTrustedEmailSenderTrustedSenderWrap(ModelBase):
    trusted_sender: Annotated[
        Optional[FortnoxTrustedEmailSenderTrustedSender],
        Field(None, alias="TrustedSender"),
    ]


class FortnoxUnit(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    code: Annotated[str, Field(alias="Code", max_length=20, min_length=1)]
    code_english: Annotated[
        Optional[str], Field(None, alias="CodeEnglish", max_length=100)
    ]
    description: Annotated[
        str, Field(alias="Description", max_length=100, min_length=1)
    ]


class FortnoxUnitList(ModelBase):
    units: Annotated[Optional[Sequence[FortnoxUnit]], Field(None, alias="Units")]


class FortnoxUnitWrap(ModelBase):
    unit: Annotated[FortnoxUnit, Field(alias="Unit")]


class FortnoxUpdateAsset(ModelBase):
    acquisition_date: Annotated[Optional[str], Field(None, alias="AcquisitionDate")]
    acquisition_start: Annotated[Optional[str], Field(None, alias="AcquisitionStart")]
    acquisition_value: Annotated[Optional[int], Field(None, alias="AcquisitionValue")]
    deprecation_method: Annotated[Optional[str], Field(None, alias="DeprecationMethod")]
    depreciate_to_residual_value: Annotated[
        Optional[int], Field(None, alias="DepreciateToResidualValue")
    ]
    depreciation_final: Annotated[Optional[str], Field(None, alias="DepreciationFinal")]
    description: Annotated[Optional[str], Field(None, alias="Description")]
    number: Annotated[Optional[str], Field(None, alias="Number")]
    type_id: Annotated[Optional[int], Field(None, alias="TypeId")]


class FortnoxUpdateAssetUpdateWrap(ModelBase):
    asset_type: Annotated[Optional[FortnoxUpdateAsset], Field(None, alias="AssetType")]


class FortnoxVacationDebtBasisEmployee(ModelBase):
    days_earned: Annotated[Optional[float], Field(None, alias="DaysEarned")]
    days_saved: Annotated[Optional[float], Field(None, alias="DaysSaved")]
    days_unused: Annotated[Optional[float], Field(None, alias="DaysUnused")]
    debt_advance: Annotated[Optional[float], Field(None, alias="DebtAdvance")]
    debt_earned: Annotated[Optional[float], Field(None, alias="DebtEarned")]
    debt_saved: Annotated[Optional[float], Field(None, alias="DebtSaved")]
    debt_unused: Annotated[Optional[float], Field(None, alias="DebtUnused")]
    employee_id: Annotated[str, Field(alias="EmployeeId", max_length=15, min_length=1)]
    employee_name: Annotated[Optional[str], Field(None, alias="EmployeeName")]
    total_debt_employee: Annotated[
        Optional[float], Field(None, alias="TotalDebtEmployee")
    ]
    total_debt_employer_contribution: Annotated[
        Optional[float], Field(None, alias="TotalDebtEmployerContribution")
    ]
    variable_earned: Annotated[Optional[float], Field(None, alias="VariableEarned")]
    variable_unused: Annotated[Optional[float], Field(None, alias="VariableUnused")]
    wage_earned: Annotated[Optional[float], Field(None, alias="WageEarned")]
    wage_saved: Annotated[Optional[float], Field(None, alias="WageSaved")]
    wage_unused: Annotated[Optional[float], Field(None, alias="WageUnused")]


class ReferenceType(Enum):
    invoice = "INVOICE"
    supplierinvoice = "SUPPLIERINVOICE"
    invoicepayment = "INVOICEPAYMENT"
    supplierpayment = "SUPPLIERPAYMENT"
    manual = "MANUAL"
    cashinvoice = "CASHINVOICE"
    accrual = "ACCRUAL"


class FortnoxVoucherFileConnection(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    file_id: Annotated[str, Field(alias="FileId")]
    voucher_description: Annotated[
        Optional[str], Field(None, alias="VoucherDescription")
    ]
    voucher_number: Annotated[str, Field(alias="VoucherNumber")]
    voucher_series: Annotated[str, Field(alias="VoucherSeries")]
    voucher_year: Annotated[Optional[int], Field(None, alias="VoucherYear")]


class FortnoxVoucherFileConnectionList(ModelBase):
    voucher_file_connections: Annotated[
        Optional[Sequence[FortnoxVoucherFileConnection]],
        Field(None, alias="VoucherFileConnections"),
    ]


class FortnoxVoucherFileConnectionWrap(ModelBase):
    voucher_file_connection: Annotated[
        FortnoxVoucherFileConnection, Field(alias="VoucherFileConnection")
    ]


class FortnoxVoucherListItem(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    approval_state: Annotated[Optional[int], Field(None, alias="ApprovalState")]
    comments: Annotated[Optional[str], Field(None, alias="Comments")]
    description: Annotated[Optional[str], Field(None, alias="Description")]
    reference_number: Annotated[Optional[str], Field(None, alias="ReferenceNumber")]
    reference_type: Annotated[
        Optional[ReferenceType], Field(None, alias="ReferenceType")
    ]
    transaction_date: Annotated[Optional[date], Field(None, alias="TransactionDate")]
    voucher_number: Annotated[Optional[int], Field(None, alias="VoucherNumber")]
    voucher_series: Annotated[Optional[str], Field(None, alias="VoucherSeries")]
    year: Annotated[Optional[int], Field(None, alias="Year")]


class FortnoxVoucherListItemList(ModelBase):
    vouchers: Annotated[
        Optional[Sequence[FortnoxVoucherListItem]], Field(None, alias="Vouchers")
    ]


class FortnoxVoucherSeriesListItemApprover(ModelBase):
    id: Annotated[Optional[int], Field(None, alias="Id")]
    name: Annotated[Optional[str], Field(None, alias="Name")]


class FortnoxVoucherSeriesApprover(ModelBase):
    id: Annotated[Optional[int], Field(None, alias="Id")]
    name: Annotated[Optional[str], Field(None, alias="Name")]


class FortnoxVoucherVoucherRow(ModelBase):
    account: Annotated[int, Field(alias="Account", ge=1000, le=9999)]
    cost_center: Annotated[Optional[str], Field(None, alias="CostCenter")]
    credit: Annotated[Optional[float], Field(None, alias="Credit")]
    debit: Annotated[Optional[float], Field(None, alias="Debit")]
    description: Annotated[Optional[str], Field(None, alias="Description")]
    project: Annotated[Optional[str], Field(None, alias="Project")]
    quantity: Annotated[Optional[float], Field(None, alias="Quantity")]
    removed: Annotated[Optional[bool], Field(None, alias="Removed")]
    transaction_information: Annotated[
        Optional[str], Field(None, alias="TransactionInformation", max_length=100)
    ]


class FortnoxWayOfDelivery(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    code: Annotated[str, Field(alias="Code", max_length=50, min_length=1)]
    description: Annotated[
        Optional[str], Field(None, alias="Description", max_length=100)
    ]
    description_english: Annotated[
        Optional[str], Field(None, alias="DescriptionEnglish", max_length=100)
    ]


class FortnoxWayOfDeliveryList(ModelBase):
    way_of_deliveries: Annotated[
        Optional[Sequence[FortnoxWayOfDelivery]], Field(None, alias="WayOfDeliveries")
    ]


class FortnoxWayOfDeliveryWrap(ModelBase):
    way_of_delivery: Annotated[
        Optional[FortnoxWayOfDelivery], Field(None, alias="WayOfDelivery")
    ]


class FortnoxWebException(ModelBase):
    error: Optional[str] = None
    id: Optional[str] = None
    message: Optional[str] = None


class FortnoxWriteDown(ModelBase):
    amount: Annotated[Optional[int], Field(None, alias="Amount")]
    comment: Annotated[Optional[str], Field(None, alias="Comment")]
    date: Annotated[Optional[str], Field(None, alias="Date")]


class FortnoxWriteDownWrap(ModelBase):
    asset: Annotated[Optional[FortnoxWriteDown], Field(None, alias="Asset")]


class FortnoxWriteUp(ModelBase):
    amount: Annotated[Optional[int], Field(None, alias="Amount")]
    comment: Annotated[Optional[str], Field(None, alias="Comment")]
    date: Annotated[Optional[str], Field(None, alias="Date")]


class FortnoxWriteUpWrap(ModelBase):
    asset: Annotated[Optional[FortnoxWriteUp], Field(None, alias="Asset")]


class IntegrationPartnerAppSalesPurchase(ModelBase):
    amount: Optional[int] = None
    identifier: Optional[str] = None
    purchase_time: Annotated[
        Optional[Mapping[str, Any]], Field(None, alias="purchaseTime")
    ]


class IntegrationPartnerAppSalesTermination(ModelBase):
    amount: Optional[int] = None
    identifier: Optional[str] = None
    on_cancellation_time: Annotated[
        Optional[Mapping[str, Any]], Field(None, alias="onCancellationTime")
    ]


class IntegrationPartnerAppSalesUserData(ModelBase):
    activation_time: Annotated[
        Optional[Mapping[str, Any]], Field(None, alias="activationTime")
    ]
    external_source_id: Annotated[Optional[str], Field(None, alias="externalSourceId")]


class IntegrationPartnerWebException(ModelBase):
    error: Optional[str] = None
    id: Optional[str] = None
    message: Optional[str] = None


class DocumentType(Enum):
    order = "order"
    invoice = "invoice"


class RegistrationType(Enum):
    work = "WORK"
    absence = "ABSENCE"
    article = "ARTICLE"


class Type2(Enum):
    work = "WORK"
    absence = "ABSENCE"


class TimeReportingRegistrationCode(ModelBase):
    active: Optional[bool] = None
    code: Annotated[str, Field(max_length=3, min_length=3)]
    cost_multiplier: Annotated[Optional[float], Field(None, alias="costMultiplier")]
    id: Optional[str] = None
    name: Optional[str] = None
    price_multiplier: Annotated[Optional[float], Field(None, alias="priceMultiplier")]
    type: Type2


class TimeReportingTRCostCenter(ModelBase):
    active: Optional[str] = None
    id: Annotated[Optional[str], Field(None, max_length=40)]
    name: Annotated[Optional[str], Field(None, max_length=255)]


class TimeReportingTRCustomer(ModelBase):
    account_manager: Annotated[Optional[str], Field(None, alias="accountManager")]
    active: Optional[bool] = None
    default_project_id: Annotated[Optional[str], Field(None, alias="defaultProjectId")]
    deleted: Optional[bool] = None
    id: Annotated[Optional[str], Field(None, max_length=40)]
    invoice_city: Annotated[Optional[str], Field(None, alias="invoiceCity")]
    invoice_zip_code: Annotated[Optional[str], Field(None, alias="invoiceZipCode")]
    is_business: Annotated[Optional[int], Field(None, alias="isBusiness")]
    name: Annotated[Optional[str], Field(None, max_length=255)]
    number: Annotated[Optional[str], Field(None, max_length=1024)]
    price_list: Annotated[Optional[str], Field(None, alias="priceList")]
    property_designation: Annotated[
        Optional[str], Field(None, alias="propertyDesignation")
    ]


class Type3(Enum):
    service = "SERVICE"
    stock = "STOCK"


class TimeReportingTRItemPrice(ModelBase):
    list: Optional[str] = None
    price: Optional[float] = None


class TimeReportingTRProject(ModelBase):
    description: Annotated[Optional[str], Field(None, max_length=50)]
    end_date: Annotated[Optional[date], Field(None, alias="endDate")]
    id: Annotated[Optional[str], Field(None, max_length=40)]
    invoiced_amount: Annotated[Optional[float], Field(None, alias="invoicedAmount")]
    order_amount: Annotated[Optional[float], Field(None, alias="orderAmount")]
    order_time: Annotated[Optional[float], Field(None, alias="orderTime")]
    project_leader: Annotated[Optional[str], Field(None, alias="projectLeader")]
    start_date: Annotated[Optional[date], Field(None, alias="startDate")]
    status: Optional[int] = None
    total_amount_in_invoices: Annotated[
        Optional[float], Field(None, alias="totalAmountInInvoices")
    ]


class TimeReportingWebException(ModelBase):
    error: Optional[str] = None
    id: Optional[str] = None
    message: Optional[str] = None


class WarehouseAverageCost(ModelBase):
    average_cost_in_sek: Annotated[
        Optional[float], Field(None, alias="averageCostInSEK")
    ]
    item_id: Annotated[Optional[str], Field(None, alias="itemId")]
    stock_point_id: Annotated[Optional[UUID], Field(None, alias="stockPointId")]


class WarehouseCurrency(ModelBase):
    currency: Annotated[str, Field(max_length=3, min_length=3)]
    rate: Annotated[float, Field(ge=1e-06)]
    unit: Annotated[Optional[int], Field(None, ge=1)]


class Category(Enum):
    inbound = "INBOUND"
    outbound = "OUTBOUND"


class WarehouseCustomDocumentType(ModelBase):
    category: Category
    reference_type: Annotated[
        str,
        Field(
            alias="referenceType", max_length=25, min_length=1, pattern="[a-zA-Z0-9_-]+"
        ),
    ]


class WarehouseCustomInboundDocumentRow(ModelBase):
    batch: Annotated[Optional[str], Field(None, max_length=50)]
    cost_center_code: Annotated[
        Optional[str], Field(None, alias="costCenterCode", max_length=25, min_length=1)
    ]
    direct_cost: Annotated[Optional[float], Field(None, alias="directCost")]
    freight_cost: Annotated[Optional[float], Field(None, alias="freightCost")]
    item_description: Annotated[
        Optional[str], Field(None, alias="itemDescription", max_length=200)
    ]
    item_id: Annotated[str, Field(alias="itemId", max_length=50, min_length=1)]
    item_unit: Annotated[Optional[str], Field(None, alias="itemUnit", max_length=50)]
    other_cost: Annotated[Optional[float], Field(None, alias="otherCost")]
    project_id: Annotated[
        Optional[str], Field(None, alias="projectId", max_length=25, min_length=1)
    ]
    quantity: float
    row_id: Annotated[Optional[int], Field(None, alias="rowId", ge=1)]
    stock_location_code: Annotated[
        Optional[str], Field(None, alias="stockLocationCode")
    ]
    stock_location_id: Annotated[Optional[UUID], Field(None, alias="stockLocationId")]
    stock_point_code: Annotated[Optional[str], Field(None, alias="stockPointCode")]
    stock_point_id: Annotated[Optional[UUID], Field(None, alias="stockPointId")]


class WarehouseCustomOutboundDocumentRow(ModelBase):
    cost_center_code: Annotated[
        Optional[str], Field(None, alias="costCenterCode", max_length=25, min_length=1)
    ]
    delivered_quantity: Annotated[
        Optional[float], Field(None, alias="deliveredQuantity")
    ]
    forced_quantity: Annotated[Optional[float], Field(None, alias="forcedQuantity")]
    item_description: Annotated[
        Optional[str], Field(None, alias="itemDescription", max_length=200)
    ]
    item_id: Annotated[str, Field(alias="itemId", max_length=50, min_length=1)]
    item_unit: Annotated[Optional[str], Field(None, alias="itemUnit", max_length=50)]
    project_id: Annotated[
        Optional[str], Field(None, alias="projectId", max_length=25, min_length=1)
    ]
    quantity: float
    reserved_quantity: Annotated[Optional[float], Field(None, alias="reservedQuantity")]
    row_id: Annotated[Optional[int], Field(None, alias="rowId", ge=1)]
    stock_location_id: Annotated[Optional[UUID], Field(None, alias="stockLocationId")]
    stock_point_id: Annotated[Optional[UUID], Field(None, alias="stockPointId")]


class WarehouseDocumentReference(ModelBase):
    id: Optional[str] = None
    type: Optional[str] = None


class WarehouseIncomingGoodsListRow(ModelBase):
    completed: Optional[bool] = None
    date: Optional[date] = None
    delivery_note_id: Annotated[Optional[str], Field(None, alias="deliveryNoteId")]
    has_delivery_note: Annotated[Optional[bool], Field(None, alias="hasDeliveryNote")]
    id: Optional[int] = None
    note: Optional[str] = None
    released: Optional[bool] = None
    stock_point_id: Annotated[Optional[UUID], Field(None, alias="stockPointId")]
    supplier_name: Annotated[Optional[str], Field(None, alias="supplierName")]
    supplier_number: Annotated[Optional[str], Field(None, alias="supplierNumber")]
    unmatched_value: Annotated[Optional[float], Field(None, alias="unmatchedValue")]
    voided: Optional[bool] = None


class WarehouseIncomingGoodsRow(ModelBase):
    back_order_quantity: Annotated[float, Field(alias="backOrderQuantity", ge=0.0)]
    batch: Annotated[Optional[str], Field(None, max_length=50)]
    cost_center_code: Annotated[Optional[str], Field(None, alias="costCenterCode")]
    direct_cost: Annotated[Optional[float], Field(None, alias="directCost")]
    id: Optional[UUID] = None
    invoiced_quantity: Annotated[float, Field(alias="invoicedQuantity", ge=0.0)]
    is_stock_item: Annotated[Optional[bool], Field(None, alias="isStockItem")]
    item_description: Annotated[Optional[str], Field(None, alias="itemDescription")]
    item_id: Annotated[str, Field(alias="itemId", max_length=50, min_length=1)]
    item_unit: Annotated[Optional[str], Field(None, alias="itemUnit")]
    ordered_quantity: Annotated[float, Field(alias="orderedQuantity", ge=0.0)]
    project_id: Annotated[Optional[str], Field(None, alias="projectId")]
    purchase_order_id: Annotated[Optional[int], Field(None, alias="purchaseOrderId")]
    purchase_order_row_id: Annotated[
        Optional[UUID], Field(None, alias="purchaseOrderRowId")
    ]
    received_quantity: Annotated[float, Field(alias="receivedQuantity", ge=0.0)]
    remaining_ordered_quantity: Annotated[
        Optional[float], Field(None, alias="remainingOrderedQuantity")
    ]
    row_order: Annotated[Optional[int], Field(None, alias="rowOrder")]
    stock_location_code: Annotated[
        Optional[str], Field(None, alias="stockLocationCode")
    ]
    stock_location_id: Annotated[Optional[UUID], Field(None, alias="stockLocationId")]
    stock_location_name: Annotated[
        Optional[str], Field(None, alias="stockLocationName")
    ]
    stock_point_code: Annotated[Optional[str], Field(None, alias="stockPointCode")]
    stock_point_id: Annotated[Optional[UUID], Field(None, alias="stockPointId")]
    stock_point_name: Annotated[Optional[str], Field(None, alias="stockPointName")]
    taken_quantity: Annotated[float, Field(alias="takenQuantity", ge=0.0)]


class Type4(Enum):
    inbound = "Inbound"
    outbound = "Outbound"
    stock_transfer = "StockTransfer"


class WarehouseManualDocument(ModelBase):
    date: Optional[date] = None
    delivery_id: Annotated[Optional[int], Field(None, alias="deliveryId")]
    entity_id: Annotated[Optional[str], Field(None, alias="entityId")]
    note: Optional[str] = None
    released: Optional[bool] = None
    type: Optional[Type4] = None
    voided: Optional[bool] = None


class WarehouseManualInboundDocumentPatch(ModelBase):
    note: Annotated[Optional[str], Field(None, max_length=1000)]


class WarehouseManualInboundDocumentRow(ModelBase):
    batch: Annotated[Optional[str], Field(None, max_length=50)]
    cost_center_code: Annotated[Optional[str], Field(None, alias="costCenterCode")]
    direct_cost: Annotated[Optional[float], Field(None, alias="directCost", ge=0.0)]
    freight_cost: Annotated[Optional[float], Field(None, alias="freightCost", ge=0.0)]
    item_description: Annotated[Optional[str], Field(None, alias="itemDescription")]
    item_id: Annotated[str, Field(alias="itemId", max_length=50, min_length=1)]
    item_unit: Annotated[Optional[str], Field(None, alias="itemUnit")]
    other_cost: Annotated[Optional[float], Field(None, alias="otherCost", ge=0.0)]
    project_id: Annotated[Optional[str], Field(None, alias="projectId")]
    quantity: Annotated[float, Field(ge=0.01)]
    row_id: Annotated[Optional[int], Field(None, alias="rowId")]
    stock_location_code: Annotated[
        Optional[str], Field(None, alias="stockLocationCode")
    ]
    stock_location_id: Annotated[Optional[UUID], Field(None, alias="stockLocationId")]
    stock_location_name: Annotated[
        Optional[str], Field(None, alias="stockLocationName")
    ]
    stock_point_code: Annotated[Optional[str], Field(None, alias="stockPointCode")]
    stock_point_id: Annotated[Optional[UUID], Field(None, alias="stockPointId")]
    stock_point_name: Annotated[Optional[str], Field(None, alias="stockPointName")]


class WarehouseManualOutboundDocumentPatch(ModelBase):
    note: Annotated[Optional[str], Field(None, max_length=1000)]


class WarehouseManualOutboundDocumentRow(ModelBase):
    cost_center_code: Annotated[Optional[str], Field(None, alias="costCenterCode")]
    delivered_quantity: Annotated[
        Optional[float], Field(None, alias="deliveredQuantity")
    ]
    forced_quantity: Annotated[Optional[float], Field(None, alias="forcedQuantity")]
    item_description: Annotated[Optional[str], Field(None, alias="itemDescription")]
    item_id: Annotated[str, Field(alias="itemId", max_length=50, min_length=1)]
    item_unit: Annotated[Optional[str], Field(None, alias="itemUnit")]
    project_id: Annotated[Optional[str], Field(None, alias="projectId")]
    quantity: Annotated[float, Field(ge=0.01)]
    stock_location_code: Annotated[
        Optional[str], Field(None, alias="stockLocationCode")
    ]
    stock_location_id: Annotated[Optional[UUID], Field(None, alias="stockLocationId")]
    stock_location_name: Annotated[
        Optional[str], Field(None, alias="stockLocationName")
    ]
    stock_point_code: Annotated[Optional[str], Field(None, alias="stockPointCode")]
    stock_point_id: Annotated[Optional[UUID], Field(None, alias="stockPointId")]
    stock_point_name: Annotated[Optional[str], Field(None, alias="stockPointName")]


class WarehousePackageItem(ModelBase):
    item_description: Annotated[Optional[str], Field(None, alias="itemDescription")]
    item_id: Annotated[str, Field(alias="itemId")]
    item_unit: Annotated[Optional[str], Field(None, alias="itemUnit")]
    quantity_required: Annotated[float, Field(alias="quantityRequired")]
    quantity_reserved: Annotated[Optional[float], Field(None, alias="quantityReserved")]
    total_quantity_required: Annotated[
        Optional[float], Field(None, alias="totalQuantityRequired")
    ]


class WarehousePartialPurchaseOrder(ModelBase):
    delivery_date: Annotated[Optional[date], Field(None, alias="deliveryDate")]
    internal_reference: Annotated[
        Optional[str], Field(None, alias="internalReference", max_length=50)
    ]
    message_to_supplier: Annotated[
        Optional[str], Field(None, alias="messageToSupplier", max_length=1000)
    ]
    note: Annotated[Optional[str], Field(None, max_length=1000)]
    supplier_name: Annotated[
        Optional[str], Field(None, alias="supplierName", max_length=1024)
    ]


class DocumentState(Enum):
    completed = "completed"
    voided = "voided"


class ProductionState(Enum):
    registered = "registered"
    reserved = "reserved"
    ongoing = "ongoing"


class WarehouseProductionOrder(ModelBase):
    batch: Optional[str] = None
    cost_center_code: Annotated[Optional[str], Field(None, alias="costCenterCode")]
    document_state: Annotated[
        Optional[DocumentState], Field(None, alias="documentState")
    ]
    id: Optional[int] = None
    inbound_stock_location_id: Annotated[
        Optional[UUID], Field(None, alias="inboundStockLocationId")
    ]
    inbound_stock_point_id: Annotated[
        Optional[UUID], Field(None, alias="inboundStockPointId")
    ]
    item_description: Annotated[Optional[str], Field(None, alias="itemDescription")]
    item_id: Annotated[Optional[str], Field(None, alias="itemId")]
    item_unit: Annotated[Optional[str], Field(None, alias="itemUnit")]
    note: Annotated[Optional[str], Field(None, max_length=1000)]
    outbound_stock_point_id: Annotated[
        Optional[UUID], Field(None, alias="outboundStockPointId")
    ]
    package_items: Annotated[
        Optional[Sequence[WarehousePackageItem]], Field(None, alias="packageItems")
    ]
    production_date: Annotated[Optional[date], Field(None, alias="productionDate")]
    production_state: Annotated[ProductionState, Field(alias="productionState")]
    project_id: Annotated[Optional[str], Field(None, alias="projectId")]
    quantity: Annotated[float, Field(ge=0.01)]
    start_date: Annotated[date, Field(alias="startDate")]


class WarehouseProductionOrderPatch(ModelBase):
    note: Annotated[Optional[str], Field(None, max_length=1000)]


class PurchaseOrderState(Enum):
    not_sent = "NOT_SENT"
    sent = "SENT"
    sent_not_rejected = "SENT_NOT_REJECTED"
    delayed = "DELAYED"
    received = "RECEIVED"
    voided = "VOIDED"
    current = "CURRENT"
    all = "ALL"


class PurchaseType(Enum):
    warehouse = "WAREHOUSE"
    dropship = "DROPSHIP"


class ResponseState(Enum):
    not_sent = "NOT_SENT"
    sent = "SENT"
    accepted_with_req_dlv_date = "ACCEPTED_WITH_REQ_DLV_DATE"
    accepted_with_changed_dlv_date = "ACCEPTED_WITH_CHANGED_DLV_DATE"
    partly_accepted_with_req_dlv_date = "PARTLY_ACCEPTED_WITH_REQ_DLV_DATE"
    partly_accepted_with_changed_dlv_date = "PARTLY_ACCEPTED_WITH_CHANGED_DLV_DATE"
    rejected = "REJECTED"


class WarehousePurchaseOrderMailSettings(ModelBase):
    body: str
    body_as_html: Annotated[Optional[str], Field(None, alias="bodyAsHtml")]
    receiver: str
    receiver_copy: Annotated[Optional[str], Field(None, alias="receiverCopy")]
    receiver_secret_copy: Annotated[
        Optional[str], Field(None, alias="receiverSecretCopy")
    ]
    reply_to: Annotated[str, Field(alias="replyTo")]
    sender_name: Annotated[Optional[str], Field(None, alias="senderName")]
    subject: str


class WarehousePurchaseOrderRowNote(ModelBase):
    note: Optional[str] = None
    purchase_order_id: Annotated[Optional[int], Field(None, alias="purchaseOrderId")]
    purchase_order_row_id: Annotated[
        Optional[UUID], Field(None, alias="purchaseOrderRowId")
    ]
    row_num: Annotated[Optional[int], Field(None, alias="rowNum")]


class WarehouseReleaseParentOrder(ModelBase):
    released_parent_order: Annotated[
        Optional[bool], Field(None, alias="releasedParentOrder")
    ]


class WarehouseResponseStateChange(ModelBase):
    response_state: Annotated[
        Optional[ResponseState], Field(None, alias="responseState")
    ]


class WarehouseStockBalance(ModelBase):
    available_stock: Annotated[Optional[float], Field(None, alias="availableStock")]
    in_stock: Annotated[Optional[float], Field(None, alias="inStock")]
    item_id: Annotated[Optional[str], Field(None, alias="itemId")]
    stock_point_code: Annotated[Optional[str], Field(None, alias="stockPointCode")]


class WarehouseStockLocation(ModelBase):
    code: Annotated[str, Field(max_length=20, min_length=1)]
    id: Optional[UUID] = None
    name: Annotated[Optional[str], Field(None, max_length=25)]
    stock_point_id: Annotated[Optional[UUID], Field(None, alias="stockPointId")]


class WarehouseStockPoint(ModelBase):
    active: Optional[bool] = None
    code: Annotated[str, Field(max_length=10, min_length=1)]
    delivery_address: Annotated[
        Optional[str], Field(None, alias="deliveryAddress", max_length=50)
    ]
    delivery_address2: Annotated[
        Optional[str], Field(None, alias="deliveryAddress2", max_length=50)
    ]
    delivery_city: Annotated[
        Optional[str], Field(None, alias="deliveryCity", max_length=50)
    ]
    delivery_country_code: Annotated[
        Optional[str], Field(None, alias="deliveryCountryCode", max_length=3)
    ]
    delivery_name: Annotated[
        Optional[str], Field(None, alias="deliveryName", max_length=50)
    ]
    delivery_phone: Annotated[
        Optional[str], Field(None, alias="deliveryPhone", max_length=50)
    ]
    delivery_zip_code: Annotated[
        Optional[str], Field(None, alias="deliveryZipCode", max_length=10)
    ]
    id: Optional[UUID] = None
    name: Annotated[str, Field(max_length=25, min_length=1)]
    stock_locations: Annotated[
        Optional[Sequence[WarehouseStockLocation]], Field(None, alias="stockLocations")
    ]
    using_company_address: Annotated[
        Optional[bool], Field(None, alias="usingCompanyAddress")
    ]


class WarehouseStockTakingRow(ModelBase):
    counted_by: Annotated[Optional[str], Field(None, alias="countedBy", max_length=100)]
    current_row_no: Annotated[Optional[int], Field(None, alias="currentRowNo")]
    has_post_release_stock_changes: Annotated[
        Optional[bool], Field(None, alias="hasPostReleaseStockChanges")
    ]
    id: Optional[str] = None
    item_id: Annotated[Optional[str], Field(None, alias="itemId", max_length=50)]
    stock_location_id: Annotated[Optional[UUID], Field(None, alias="stockLocationId")]
    stock_point_id: Annotated[Optional[UUID], Field(None, alias="stockPointId")]
    stock_taken_quantity: Annotated[
        Optional[float], Field(None, alias="stockTakenQuantity")
    ]
    stock_taking_id: Annotated[Optional[int], Field(None, alias="stockTakingId")]
    stock_taking_row_id: Annotated[Optional[str], Field(None, alias="stockTakingRowId")]
    total_quantity_in_stock: Annotated[
        Optional[float], Field(None, alias="totalQuantityInStock")
    ]


class WarehouseStockTakingSortParams(ModelBase):
    primary_sort: Annotated[Optional[str], Field(None, alias="primarySort")]
    primary_sort_order: Annotated[Optional[str], Field(None, alias="primarySortOrder")]
    secondary_sort: Annotated[Optional[str], Field(None, alias="secondarySort")]
    secondary_sort_order: Annotated[
        Optional[str], Field(None, alias="secondarySortOrder")
    ]


class WarehouseStockTransferRow(ModelBase):
    from_stock_location_code: Annotated[
        Optional[str], Field(None, alias="fromStockLocationCode")
    ]
    from_stock_location_id: Annotated[
        Optional[UUID], Field(None, alias="fromStockLocationId")
    ]
    from_stock_location_name: Annotated[
        Optional[str], Field(None, alias="fromStockLocationName")
    ]
    from_stock_point_code: Annotated[
        Optional[str], Field(None, alias="fromStockPointCode")
    ]
    from_stock_point_id: Annotated[UUID, Field(alias="fromStockPointId")]
    from_stock_point_name: Annotated[
        Optional[str], Field(None, alias="fromStockPointName")
    ]
    item_description: Annotated[Optional[str], Field(None, alias="itemDescription")]
    item_id: Annotated[str, Field(alias="itemId", max_length=50, min_length=1)]
    item_unit: Annotated[Optional[str], Field(None, alias="itemUnit")]
    quantity: Optional[float] = None
    requested_quantity: Annotated[float, Field(alias="requestedQuantity", ge=0.01)]
    row_num: Annotated[Optional[int], Field(None, alias="rowNum")]
    to_stock_location_code: Annotated[
        Optional[str], Field(None, alias="toStockLocationCode")
    ]
    to_stock_location_id: Annotated[
        Optional[UUID], Field(None, alias="toStockLocationId")
    ]
    to_stock_location_name: Annotated[
        Optional[str], Field(None, alias="toStockLocationName")
    ]
    to_stock_point_code: Annotated[Optional[str], Field(None, alias="toStockPointCode")]
    to_stock_point_id: Annotated[UUID, Field(alias="toStockPointId")]
    to_stock_point_name: Annotated[Optional[str], Field(None, alias="toStockPointName")]


class WarehouseTenantInfo(ModelBase):
    activated: Optional[bool] = None
    tenant_id: Annotated[Optional[int], Field(None, alias="tenantId")]


class WarehouseWebException(ModelBase):
    error: Optional[str] = None
    id: Optional[str] = None
    message: Optional[str] = None


class FortnoxAccountPayload(ModelBase):
    active: Annotated[Optional[bool], Field(None, alias="Active")]
    balance_brought_forward: Annotated[
        Optional[float], Field(None, alias="BalanceBroughtForward")
    ]
    cost_center: Annotated[Optional[str], Field(None, alias="CostCenter")]
    cost_center_settings: Annotated[
        Optional[CostCenterSettings], Field(None, alias="CostCenterSettings")
    ]
    description: Annotated[
        str, Field(alias="Description", max_length=200, min_length=1)
    ]
    number: Annotated[int, Field(alias="Number", ge=1000, le=9999)]
    opening_quantities: Annotated[
        Optional[Sequence[FortnoxAccountPayloadOpeningQuantities]],
        Field(None, alias="OpeningQuantities"),
    ]
    project: Annotated[Optional[str], Field(None, alias="Project")]
    project_settings: Annotated[
        Optional[ProjectSettings], Field(None, alias="ProjectSettings")
    ]
    sru: Annotated[Optional[int], Field(None, alias="SRU")]
    transaction_information: Annotated[
        Optional[str], Field(None, alias="TransactionInformation")
    ]
    transaction_information_settings: Annotated[
        Optional[TransactionInformationSettings],
        Field(None, alias="TransactionInformationSettings"),
    ]
    vat_code: Annotated[Optional[str], Field(None, alias="VATCode")]


class FortnoxAccountPayloadWrap(ModelBase):
    account: Annotated[Optional[FortnoxAccountPayload], Field(None, alias="Account")]


class FortnoxAccountSingleItem(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    active: Annotated[Optional[bool], Field(None, alias="Active")]
    balance_brought_forward: Annotated[
        Optional[float], Field(None, alias="BalanceBroughtForward")
    ]
    balance_carried_forward: Annotated[
        Optional[float], Field(None, alias="BalanceCarriedForward")
    ]
    cost_center: Annotated[Optional[str], Field(None, alias="CostCenter")]
    cost_center_settings: Annotated[
        Optional[CostCenterSettings], Field(None, alias="CostCenterSettings")
    ]
    description: Annotated[
        str, Field(alias="Description", max_length=200, min_length=1)
    ]
    number: Annotated[int, Field(alias="Number", ge=1000, le=9999)]
    opening_quantities: Annotated[
        Optional[Sequence[FortnoxAccountSingleItemOpeningQuantities]],
        Field(None, alias="OpeningQuantities"),
    ]
    project: Annotated[Optional[str], Field(None, alias="Project")]
    project_settings: Annotated[
        Optional[ProjectSettings], Field(None, alias="ProjectSettings")
    ]
    quantity_settings: Annotated[
        Optional[QuantitySettings], Field(None, alias="QuantitySettings")
    ]
    quantity_unit: Annotated[Optional[str], Field(None, alias="QuantityUnit")]
    sru: Annotated[Optional[int], Field(None, alias="SRU")]
    transaction_information: Annotated[
        Optional[str], Field(None, alias="TransactionInformation")
    ]
    transaction_information_settings: Annotated[
        Optional[TransactionInformationSettings],
        Field(None, alias="TransactionInformationSettings"),
    ]
    vat_code: Annotated[Optional[str], Field(None, alias="VATCode")]
    year: Annotated[Optional[int], Field(None, alias="Year")]


class FortnoxAccountSingleItemWrap(ModelBase):
    account: Annotated[Optional[FortnoxAccountSingleItem], Field(None, alias="Account")]


class FortnoxAsset(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    acquisition_date: Annotated[Optional[str], Field(None, alias="AcquisitionDate")]
    acquisition_start: Annotated[Optional[str], Field(None, alias="AcquisitionStart")]
    acquisition_value: Annotated[Optional[int], Field(None, alias="AcquisitionValue")]
    brand: Annotated[Optional[str], Field(None, alias="Brand")]
    cost_center: Annotated[Optional[str], Field(None, alias="CostCenter")]
    department: Annotated[Optional[str], Field(None, alias="Department")]
    depreciate_to_residual_value: Annotated[
        Optional[int], Field(None, alias="DepreciateToResidualValue")
    ]
    depreciated_to: Annotated[Optional[str], Field(None, alias="DepreciatedTo")]
    depreciation_final: Annotated[Optional[str], Field(None, alias="DepreciationFinal")]
    depreciation_method: Annotated[
        Optional[int], Field(None, alias="DepreciationMethod")
    ]
    description: Annotated[Optional[str], Field(None, alias="Description")]
    group: Annotated[Optional[str], Field(None, alias="Group")]
    history: Annotated[Optional[Sequence[FortnoxHistory]], Field(None, alias="History")]
    id: Annotated[Optional[int], Field(None, alias="Id")]
    insured_number: Annotated[Optional[str], Field(None, alias="InsuredNumber")]
    insured_with: Annotated[Optional[str], Field(None, alias="InsuredWith")]
    manual_ob: Annotated[Optional[int], Field(None, alias="ManualOb")]
    notes: Annotated[Optional[str], Field(None, alias="Notes")]
    number: Annotated[Optional[str], Field(None, alias="Number")]
    placement: Annotated[Optional[str], Field(None, alias="Placement")]
    project: Annotated[Optional[str], Field(None, alias="Project")]
    reference: Annotated[Optional[str], Field(None, alias="Reference")]
    room: Annotated[Optional[str], Field(None, alias="Room")]
    status: Annotated[Optional[str], Field(None, alias="Status")]
    status_id: Annotated[Optional[str], Field(None, alias="StatusId")]
    type: Annotated[Optional[str], Field(None, alias="Type")]
    type_id: Annotated[Optional[int], Field(None, alias="TypeId")]


class FortnoxAssetFileConnectionResponse(ModelBase):
    asset_file_connections: Annotated[
        Optional[Sequence[FortnoxAssetFileConnection]],
        Field(None, alias="AssetFileConnections"),
    ]


class FortnoxAssetTypeWrapList(ModelBase):
    types: Annotated[Optional[Sequence[FortnoxAssetType]], Field(None, alias="Types")]


class FortnoxAssetSingle(ModelBase):
    assets: Annotated[Optional[FortnoxAsset], Field(None, alias="Assets")]


class FortnoxContract(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    field_url_tax_reduction_list: Annotated[
        Optional[str], Field(None, alias="@urlTaxReductionList")
    ]
    active: Annotated[Optional[bool], Field(None, alias="Active")]
    administration_fee: Annotated[
        Optional[float], Field(None, alias="AdministrationFee")
    ]
    basis_tax_reduction: Annotated[
        Optional[float], Field(None, alias="BasisTaxReduction")
    ]
    comments: Annotated[Optional[str], Field(None, alias="Comments", max_length=1024)]
    continuous: Annotated[Optional[bool], Field(None, alias="Continuous")]
    contract_date: Annotated[Optional[date], Field(None, alias="ContractDate")]
    contract_length: Annotated[Optional[int], Field(None, alias="ContractLength")]
    contribution_percent: Annotated[
        Optional[float], Field(None, alias="ContributionPercent")
    ]
    contribution_value: Annotated[
        Optional[float], Field(None, alias="ContributionValue")
    ]
    cost_center: Annotated[Optional[str], Field(None, alias="CostCenter")]
    currency: Annotated[Optional[str], Field(None, alias="Currency")]
    customer_name: Annotated[Optional[str], Field(None, alias="CustomerName")]
    customer_number: Annotated[str, Field(alias="CustomerNumber")]
    document_number: Annotated[Optional[str], Field(None, alias="DocumentNumber")]
    email_information: Annotated[
        Optional[FortnoxContractEmailInformation], Field(None, alias="EmailInformation")
    ]
    external_invoice_reference1: Annotated[
        Optional[str], Field(None, alias="ExternalInvoiceReference1")
    ]
    external_invoice_reference2: Annotated[
        Optional[str], Field(None, alias="ExternalInvoiceReference2")
    ]
    freight: Annotated[Optional[float], Field(None, alias="Freight")]
    gross: Annotated[Optional[float], Field(None, alias="Gross")]
    house_work: Annotated[Optional[bool], Field(None, alias="HouseWork")]
    invoice_discount: Annotated[Optional[float], Field(None, alias="InvoiceDiscount")]
    invoice_interval: Annotated[Optional[int], Field(None, alias="InvoiceInterval")]
    invoice_rows: Annotated[
        Sequence[FortnoxContractInvoiceRow], Field(alias="InvoiceRows")
    ]
    invoices_remaining: Annotated[Optional[str], Field(None, alias="InvoicesRemaining")]
    language: Annotated[Optional[Language], Field(None, alias="Language")]
    last_invoice_date: Annotated[Optional[str], Field(None, alias="LastInvoiceDate")]
    net: Annotated[Optional[float], Field(None, alias="Net")]
    our_reference: Annotated[
        Optional[str], Field(None, alias="OurReference", max_length=25)
    ]
    period_end: Annotated[date, Field(alias="PeriodEnd")]
    period_start: Annotated[Optional[date], Field(None, alias="PeriodStart")]
    price_list: Annotated[Optional[str], Field(None, alias="PriceList")]
    print_template: Annotated[Optional[str], Field(None, alias="PrintTemplate")]
    project: Annotated[Optional[str], Field(None, alias="Project")]
    remarks: Annotated[Optional[str], Field(None, alias="Remarks", max_length=1024)]
    round_off: Annotated[Optional[float], Field(None, alias="RoundOff")]
    tax_reduction: Annotated[Optional[float], Field(None, alias="TaxReduction")]
    tax_reduction_type: Annotated[
        Optional[TaxReductionType], Field(None, alias="TaxReductionType")
    ]
    template_name: Annotated[Optional[str], Field(None, alias="TemplateName")]
    template_number: Annotated[Optional[int], Field(None, alias="TemplateNumber")]
    terms_of_delivery: Annotated[Optional[str], Field(None, alias="TermsOfDelivery")]
    terms_of_payment: Annotated[Optional[str], Field(None, alias="TermsOfPayment")]
    total: Annotated[Optional[float], Field(None, alias="Total")]
    total_to_pay: Annotated[Optional[float], Field(None, alias="TotalToPay")]
    total_vat: Annotated[Optional[float], Field(None, alias="TotalVAT")]
    vat_included: Annotated[Optional[bool], Field(None, alias="VatIncluded")]
    way_of_delivery: Annotated[Optional[str], Field(None, alias="WayOfDelivery")]
    your_order_number: Annotated[
        Optional[str], Field(None, alias="YourOrderNumber", max_length=75)
    ]
    your_reference: Annotated[Optional[str], Field(None, alias="YourReference")]


class FortnoxContractAccrual(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    accrual_account: Annotated[int, Field(alias="AccrualAccount", ge=1000, le=9999)]
    accrual_rows: Annotated[
        Sequence[FortnoxContractAccrualAccrualRow],
        Field(alias="AccrualRows", max_length=2147483647, min_length=2),
    ]
    cost_account: Annotated[int, Field(alias="CostAccount", ge=1000, le=9999)]
    description: Annotated[str, Field(alias="Description")]
    document_number: Annotated[int, Field(alias="DocumentNumber")]
    period: Annotated[Optional[Period], Field(None, alias="Period")]
    times: Annotated[Optional[int], Field(None, alias="Times")]
    total: Annotated[float, Field(alias="Total")]
    vat_included: Annotated[Optional[bool], Field(None, alias="VATIncluded")]


class FortnoxContractAccrualWrap(ModelBase):
    contract_accrual: Annotated[
        Optional[FortnoxContractAccrual], Field(None, alias="ContractAccrual")
    ]


class FortnoxContractTemplate(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    administration_fee: Annotated[
        Optional[float], Field(None, alias="AdministrationFee")
    ]
    continuous: Annotated[Optional[bool], Field(None, alias="Continuous")]
    contract_length: Annotated[
        Optional[int], Field(None, alias="ContractLength", ge=1, le=9999)
    ]
    freight: Annotated[Optional[float], Field(None, alias="Freight")]
    invoice_interval: Annotated[
        Optional[int], Field(None, alias="InvoiceInterval", ge=1, le=9999)
    ]
    invoice_rows: Annotated[
        Optional[Sequence[FortnoxContractTemplateInvoiceRow]],
        Field(None, alias="InvoiceRows"),
    ]
    our_reference: Annotated[
        Optional[str], Field(None, alias="OurReference", max_length=25)
    ]
    print_template: Annotated[Optional[str], Field(None, alias="PrintTemplate")]
    remarks: Annotated[Optional[str], Field(None, alias="Remarks", max_length=1024)]
    template_name: Annotated[
        str, Field(alias="TemplateName", max_length=1024, min_length=1)
    ]
    template_number: Annotated[Optional[int], Field(None, alias="TemplateNumber")]
    terms_of_delivery: Annotated[Optional[str], Field(None, alias="TermsOfDelivery")]
    terms_of_payment: Annotated[Optional[str], Field(None, alias="TermsOfPayment")]
    way_of_delivery: Annotated[Optional[str], Field(None, alias="WayOfDelivery")]


class FortnoxContractTemplateWrap(ModelBase):
    contract_template: Annotated[
        Optional[FortnoxContractTemplate], Field(None, alias="ContractTemplate")
    ]


class FortnoxContractWrap(ModelBase):
    contract: Annotated[Optional[FortnoxContract], Field(None, alias="Contract")]


class FortnoxCurrencyList(ModelBase):
    currencies: Annotated[
        Optional[Sequence[FortnoxCurrency]], Field(None, alias="Currencies")
    ]


class FortnoxCustomer(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    active: Annotated[Optional[bool], Field(None, alias="Active")]
    address1: Annotated[
        Optional[str], Field(None, alias="Address1", max_length=1024, min_length=1)
    ]
    address2: Annotated[Optional[str], Field(None, alias="Address2", max_length=1024)]
    city: Annotated[Optional[str], Field(None, alias="City", max_length=1024)]
    comments: Annotated[Optional[str], Field(None, alias="Comments", max_length=1024)]
    cost_center: Annotated[Optional[str], Field(None, alias="CostCenter")]
    country: Annotated[Optional[str], Field(None, alias="Country")]
    country_code: Annotated[
        Optional[str], Field(None, alias="CountryCode", max_length=2, min_length=2)
    ]
    currency: Annotated[
        Optional[str], Field(None, alias="Currency", max_length=3, min_length=3)
    ]
    customer_number: Annotated[
        Optional[str], Field(None, alias="CustomerNumber", max_length=1024)
    ]
    default_delivery_types: Annotated[
        Optional[FortnoxCustomerDefaultDeliveryTypes],
        Field(None, alias="DefaultDeliveryTypes"),
    ]
    default_templates: Annotated[
        Optional[FortnoxCustomerDefaultTemplates], Field(None, alias="DefaultTemplates")
    ]
    delivery_address1: Annotated[
        Optional[str], Field(None, alias="DeliveryAddress1", max_length=1024)
    ]
    delivery_address2: Annotated[
        Optional[str], Field(None, alias="DeliveryAddress2", max_length=1024)
    ]
    delivery_city: Annotated[
        Optional[str], Field(None, alias="DeliveryCity", max_length=1024)
    ]
    delivery_country: Annotated[
        Optional[str], Field(None, alias="DeliveryCountry", max_length=1024)
    ]
    delivery_country_code: Annotated[
        Optional[str],
        Field(None, alias="DeliveryCountryCode", max_length=2, min_length=2),
    ]
    delivery_fax: Annotated[
        Optional[str], Field(None, alias="DeliveryFax", max_length=1024)
    ]
    delivery_name: Annotated[
        Optional[str], Field(None, alias="DeliveryName", max_length=1024)
    ]
    delivery_phone1: Annotated[
        Optional[str], Field(None, alias="DeliveryPhone1", max_length=1024)
    ]
    delivery_phone2: Annotated[
        Optional[str], Field(None, alias="DeliveryPhone2", max_length=1024)
    ]
    delivery_zip_code: Annotated[
        Optional[str], Field(None, alias="DeliveryZipCode", max_length=10)
    ]
    email: Annotated[Optional[str], Field(None, alias="Email", max_length=1024)]
    email_invoice: Annotated[
        Optional[str], Field(None, alias="EmailInvoice", max_length=1024)
    ]
    email_invoice_bcc: Annotated[
        Optional[str], Field(None, alias="EmailInvoiceBCC", max_length=1024)
    ]
    email_invoice_cc: Annotated[
        Optional[str], Field(None, alias="EmailInvoiceCC", max_length=1024)
    ]
    email_offer: Annotated[
        Optional[str], Field(None, alias="EmailOffer", max_length=1024)
    ]
    email_offer_bcc: Annotated[
        Optional[str], Field(None, alias="EmailOfferBCC", max_length=1024)
    ]
    email_offer_cc: Annotated[
        Optional[str], Field(None, alias="EmailOfferCC", max_length=1024)
    ]
    email_order: Annotated[
        Optional[str], Field(None, alias="EmailOrder", max_length=1024)
    ]
    email_order_bcc: Annotated[
        Optional[str], Field(None, alias="EmailOrderBCC", max_length=1024)
    ]
    email_order_cc: Annotated[
        Optional[str], Field(None, alias="EmailOrderCC", max_length=1024)
    ]
    external_reference: Annotated[
        Optional[str], Field(None, alias="ExternalReference", max_length=1024)
    ]
    fax: Annotated[Optional[str], Field(None, alias="Fax", max_length=1024)]
    gln: Annotated[
        Optional[str], Field(None, alias="GLN", max_length=13, min_length=13)
    ]
    gln_delivery: Annotated[
        Optional[str], Field(None, alias="GLNDelivery", max_length=13, min_length=13)
    ]
    invoice_administration_fee: Annotated[
        Optional[str], Field(None, alias="InvoiceAdministrationFee")
    ]
    invoice_discount: Annotated[Optional[float], Field(None, alias="InvoiceDiscount")]
    invoice_freight: Annotated[Optional[str], Field(None, alias="InvoiceFreight")]
    invoice_remark: Annotated[
        Optional[str], Field(None, alias="InvoiceRemark", max_length=1024)
    ]
    name: Annotated[str, Field(alias="Name", max_length=1024, min_length=1)]
    organisation_number: Annotated[
        Optional[str], Field(None, alias="OrganisationNumber")
    ]
    our_reference: Annotated[
        Optional[str], Field(None, alias="OurReference", max_length=50)
    ]
    phone1: Annotated[Optional[str], Field(None, alias="Phone1", max_length=1024)]
    phone2: Annotated[Optional[str], Field(None, alias="Phone2", max_length=1024)]
    price_list: Annotated[Optional[str], Field(None, alias="PriceList")]
    project: Annotated[Optional[str], Field(None, alias="Project")]
    sales_account: Annotated[
        Optional[str], Field(None, alias="SalesAccount", max_length=4, min_length=4)
    ]
    show_price_vat_included: Annotated[
        Optional[bool], Field(None, alias="ShowPriceVATIncluded")
    ]
    terms_of_delivery: Annotated[Optional[str], Field(None, alias="TermsOfDelivery")]
    terms_of_payment: Annotated[Optional[str], Field(None, alias="TermsOfPayment")]
    type: Annotated[Optional[Type1], Field(None, alias="Type")]
    vat_number: Annotated[Optional[str], Field(None, alias="VATNumber")]
    vat_type: Annotated[Optional[VatType], Field(None, alias="VATType")]
    visiting_address: Annotated[
        Optional[str], Field(None, alias="VisitingAddress", max_length=128)
    ]
    visiting_city: Annotated[
        Optional[str], Field(None, alias="VisitingCity", max_length=128)
    ]
    visiting_country: Annotated[
        Optional[str], Field(None, alias="VisitingCountry", max_length=128)
    ]
    visiting_country_code: Annotated[
        Optional[str],
        Field(None, alias="VisitingCountryCode", max_length=2, min_length=2),
    ]
    visiting_zip_code: Annotated[
        Optional[str], Field(None, alias="VisitingZipCode", max_length=10)
    ]
    www: Annotated[Optional[str], Field(None, alias="WWW", max_length=128)]
    way_of_delivery: Annotated[Optional[str], Field(None, alias="WayOfDelivery")]
    your_reference: Annotated[
        Optional[str], Field(None, alias="YourReference", max_length=50)
    ]
    zip_code: Annotated[Optional[str], Field(None, alias="ZipCode", max_length=10)]


class FortnoxCustomerReference(ModelBase):
    customer_reference_rows: Annotated[
        Optional[Sequence[FortnoxCustomerReferenceCustomerReferenceRow]],
        Field(None, alias="CustomerReferenceRows"),
    ]


class FortnoxCustomerReferenceWrap(ModelBase):
    customer_reference: Annotated[
        Optional[FortnoxCustomerReference], Field(None, alias="CustomerReference")
    ]


class FortnoxCustomerWrap(ModelBase):
    customer: Annotated[Optional[FortnoxCustomer], Field(None, alias="Customer")]


class FortnoxEmployee(ModelBase):
    address1: Annotated[Optional[str], Field(None, alias="Address1")]
    address2: Annotated[Optional[str], Field(None, alias="Address2")]
    auto_non_recurring_tax: Annotated[
        Optional[bool], Field(None, alias="AutoNonRecurringTax")
    ]
    average_hourly_wage: Annotated[
        Optional[str], Field(None, alias="AverageHourlyWage")
    ]
    average_weekly_hours: Annotated[
        Optional[str], Field(None, alias="AverageWeeklyHours")
    ]
    bank_account_no: Annotated[Optional[str], Field(None, alias="BankAccountNo")]
    city: Annotated[Optional[str], Field(None, alias="City")]
    clearing_no: Annotated[Optional[str], Field(None, alias="ClearingNo")]
    country: Annotated[Optional[str], Field(None, alias="Country")]
    dated_schedules: Annotated[
        Optional[Sequence[FortnoxEmployeeDatedSchedule]],
        Field(None, alias="DatedSchedules"),
    ]
    dated_wages: Annotated[
        Optional[Sequence[FortnoxEmployeeDatedWage]], Field(None, alias="DatedWages")
    ]
    email: Annotated[str, Field(alias="Email")]
    employed_to: Annotated[Optional[date], Field(None, alias="EmployedTo")]
    employee_id: Annotated[
        Optional[str], Field(None, alias="EmployeeId", max_length=15, min_length=1)
    ]
    employment_date: Annotated[Optional[date], Field(None, alias="EmploymentDate")]
    employment_form: Annotated[
        Optional[EmploymentForm], Field(None, alias="EmploymentForm")
    ]
    first_name: Annotated[str, Field(alias="FirstName")]
    fora_type: Annotated[Optional[ForaType], Field(None, alias="ForaType")]
    full_name: Annotated[Optional[str], Field(None, alias="FullName")]
    hourly_pay: Annotated[Optional[str], Field(None, alias="HourlyPay")]
    inactive: Annotated[Optional[bool], Field(None, alias="Inactive")]
    job_title: Annotated[Optional[str], Field(None, alias="JobTitle", max_length=30)]
    last_name: Annotated[str, Field(alias="LastName")]
    monthly_salary: Annotated[Optional[str], Field(None, alias="MonthlySalary")]
    non_recurring_tax: Annotated[Optional[str], Field(None, alias="NonRecurringTax")]
    personal_identity_number: Annotated[
        Optional[str], Field(None, alias="PersonalIdentityNumber")
    ]
    personel_type: Annotated[Optional[PersonelType], Field(None, alias="PersonelType")]
    phone1: Annotated[Optional[str], Field(None, alias="Phone1")]
    phone2: Annotated[Optional[str], Field(None, alias="Phone2")]
    post_code: Annotated[Optional[str], Field(None, alias="PostCode")]
    salary_form: Annotated[Optional[SalaryForm], Field(None, alias="SalaryForm")]
    schedule_id: Annotated[Optional[str], Field(None, alias="ScheduleId")]
    tax_allowance: Annotated[Optional[TaxAllowance], Field(None, alias="TaxAllowance")]
    tax_column: Annotated[Optional[int], Field(None, alias="TaxColumn", ge=1, le=6)]
    tax_table: Annotated[Optional[str], Field(None, alias="TaxTable")]


class FortnoxEmployeeListItem(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    address1: Annotated[Optional[str], Field(None, alias="Address1")]
    address2: Annotated[Optional[str], Field(None, alias="Address2")]
    auto_non_recurring_tax: Annotated[
        Optional[bool], Field(None, alias="AutoNonRecurringTax")
    ]
    average_hourly_wage: Annotated[
        Optional[str], Field(None, alias="AverageHourlyWage")
    ]
    average_weekly_hours: Annotated[
        Optional[str], Field(None, alias="AverageWeeklyHours")
    ]
    bank_account_no: Annotated[Optional[str], Field(None, alias="BankAccountNo")]
    city: Annotated[Optional[str], Field(None, alias="City")]
    clearing_no: Annotated[Optional[str], Field(None, alias="ClearingNo")]
    country: Annotated[Optional[str], Field(None, alias="Country")]
    dated_schedules: Annotated[
        Optional[Sequence[FortnoxEmployeeDatedSchedule]],
        Field(None, alias="DatedSchedules"),
    ]
    dated_wages: Annotated[
        Optional[Sequence[FortnoxEmployeeDatedWage]], Field(None, alias="DatedWages")
    ]
    email: Annotated[str, Field(alias="Email")]
    employed_to: Annotated[Optional[date], Field(None, alias="EmployedTo")]
    employee_id: Annotated[
        Optional[str], Field(None, alias="EmployeeId", max_length=15, min_length=1)
    ]
    employment_date: Annotated[Optional[date], Field(None, alias="EmploymentDate")]
    employment_form: Annotated[
        Optional[EmploymentForm], Field(None, alias="EmploymentForm")
    ]
    first_name: Annotated[str, Field(alias="FirstName")]
    fora_type: Annotated[Optional[ForaType], Field(None, alias="ForaType")]
    full_name: Annotated[Optional[str], Field(None, alias="FullName")]
    hourly_pay: Annotated[Optional[str], Field(None, alias="HourlyPay")]
    inactive: Annotated[Optional[bool], Field(None, alias="Inactive")]
    job_title: Annotated[Optional[str], Field(None, alias="JobTitle", max_length=30)]
    last_name: Annotated[str, Field(alias="LastName")]
    monthly_salary: Annotated[Optional[str], Field(None, alias="MonthlySalary")]
    non_recurring_tax: Annotated[Optional[str], Field(None, alias="NonRecurringTax")]
    personal_identity_number: Annotated[
        Optional[str], Field(None, alias="PersonalIdentityNumber")
    ]
    personel_type: Annotated[Optional[PersonelType], Field(None, alias="PersonelType")]
    phone1: Annotated[Optional[str], Field(None, alias="Phone1")]
    phone2: Annotated[Optional[str], Field(None, alias="Phone2")]
    post_code: Annotated[Optional[str], Field(None, alias="PostCode")]
    salary_form: Annotated[Optional[SalaryForm], Field(None, alias="SalaryForm")]
    schedule_id: Annotated[Optional[str], Field(None, alias="ScheduleId")]
    tax_allowance: Annotated[Optional[TaxAllowance], Field(None, alias="TaxAllowance")]
    tax_column: Annotated[Optional[int], Field(None, alias="TaxColumn", ge=1, le=6)]
    tax_table: Annotated[Optional[str], Field(None, alias="TaxTable")]


class FortnoxEmployeeListItemWrap(ModelBase):
    employees: Annotated[
        Optional[Sequence[FortnoxEmployeeListItem]], Field(None, alias="Employees")
    ]


class FortnoxEmployeeWrap(ModelBase):
    employee: Annotated[Optional[FortnoxEmployee], Field(None, alias="Employee")]


class FortnoxFolder(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    email: Annotated[Optional[str], Field(None, alias="Email")]
    files: Annotated[
        Optional[Sequence[FortnoxFolderFileRow]], Field(None, alias="Files")
    ]
    folders: Annotated[
        Optional[Sequence[FortnoxFolderFolderRow]], Field(None, alias="Folders")
    ]
    id: Annotated[Optional[str], Field(None, alias="Id")]
    name: Annotated[str, Field(alias="Name", max_length=30, min_length=1)]


class FortnoxFolderWrap(ModelBase):
    folder: Annotated[Optional[FortnoxFolder], Field(None, alias="Folder")]


class FortnoxInvoice(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    field_url_tax_reduction_list: Annotated[
        Optional[str], Field(None, alias="@urlTaxReductionList")
    ]
    accounting_method: Annotated[
        Optional[AccountingMethod], Field(None, alias="AccountingMethod")
    ]
    address1: Annotated[Optional[str], Field(None, alias="Address1")]
    address2: Annotated[Optional[str], Field(None, alias="Address2")]
    administration_fee: Annotated[
        Optional[float], Field(None, alias="AdministrationFee")
    ]
    administration_fee_vat: Annotated[
        Optional[float], Field(None, alias="AdministrationFeeVAT")
    ]
    balance: Annotated[Optional[float], Field(None, alias="Balance")]
    basis_tax_reduction: Annotated[
        Optional[float], Field(None, alias="BasisTaxReduction")
    ]
    booked: Annotated[Optional[bool], Field(None, alias="Booked")]
    cancelled: Annotated[Optional[bool], Field(None, alias="Cancelled")]
    city: Annotated[Optional[str], Field(None, alias="City", max_length=1024)]
    comments: Annotated[Optional[str], Field(None, alias="Comments", max_length=1024)]
    contract_reference: Annotated[Optional[int], Field(None, alias="ContractReference")]
    contribution_percent: Annotated[
        Optional[float], Field(None, alias="ContributionPercent")
    ]
    contribution_value: Annotated[
        Optional[float], Field(None, alias="ContributionValue")
    ]
    cost_center: Annotated[Optional[str], Field(None, alias="CostCenter")]
    country: Annotated[Optional[str], Field(None, alias="Country")]
    credit: Annotated[Optional[str], Field(None, alias="Credit")]
    credit_invoice_reference: Annotated[
        Optional[str], Field(None, alias="CreditInvoiceReference")
    ]
    currency: Annotated[Optional[str], Field(None, alias="Currency")]
    currency_rate: Annotated[Optional[float], Field(None, alias="CurrencyRate")]
    currency_unit: Annotated[Optional[int], Field(None, alias="CurrencyUnit")]
    customer_name: Annotated[Optional[str], Field(None, alias="CustomerName")]
    customer_number: Annotated[str, Field(alias="CustomerNumber")]
    delivery_address1: Annotated[
        Optional[str], Field(None, alias="DeliveryAddress1", max_length=1024)
    ]
    delivery_address2: Annotated[
        Optional[str], Field(None, alias="DeliveryAddress2", max_length=1024)
    ]
    delivery_city: Annotated[
        Optional[str], Field(None, alias="DeliveryCity", max_length=1024)
    ]
    delivery_country: Annotated[Optional[str], Field(None, alias="DeliveryCountry")]
    delivery_date: Annotated[Optional[date], Field(None, alias="DeliveryDate")]
    delivery_name: Annotated[
        Optional[str], Field(None, alias="DeliveryName", max_length=1024)
    ]
    delivery_zip_code: Annotated[
        Optional[str], Field(None, alias="DeliveryZipCode", max_length=1024)
    ]
    document_number: Annotated[Optional[str], Field(None, alias="DocumentNumber")]
    due_date: Annotated[Optional[date], Field(None, alias="DueDate")]
    edi_information: Annotated[
        Optional[FortnoxInvoiceEDIInformation], Field(None, alias="EDIInformation")
    ]
    eu_quarterly_report: Annotated[
        Optional[bool], Field(None, alias="EUQuarterlyReport")
    ]
    email_information: Annotated[
        Optional[FortnoxInvoiceEmailInformation], Field(None, alias="EmailInformation")
    ]
    external_invoice_reference1: Annotated[
        Optional[str], Field(None, alias="ExternalInvoiceReference1", max_length=80)
    ]
    external_invoice_reference2: Annotated[
        Optional[str], Field(None, alias="ExternalInvoiceReference2", max_length=80)
    ]
    final_pay_date: Annotated[Optional[date], Field(None, alias="FinalPayDate")]
    freight: Annotated[Optional[float], Field(None, alias="Freight")]
    freight_vat: Annotated[Optional[float], Field(None, alias="FreightVAT")]
    gross: Annotated[Optional[float], Field(None, alias="Gross")]
    house_work: Annotated[Optional[bool], Field(None, alias="HouseWork")]
    invoice_date: Annotated[Optional[date], Field(None, alias="InvoiceDate")]
    invoice_period_end: Annotated[Optional[date], Field(None, alias="InvoicePeriodEnd")]
    invoice_period_reference: Annotated[
        Optional[str], Field(None, alias="InvoicePeriodReference")
    ]
    invoice_period_start: Annotated[
        Optional[date], Field(None, alias="InvoicePeriodStart")
    ]
    invoice_rows: Annotated[
        Optional[Sequence[FortnoxInvoiceInvoiceRow]], Field(None, alias="InvoiceRows")
    ]
    invoice_type: Annotated[Optional[InvoiceType], Field(None, alias="InvoiceType")]
    labels: Annotated[
        Optional[Sequence[FortnoxInvoiceLabel]], Field(None, alias="Labels")
    ]
    language: Annotated[Optional[Language], Field(None, alias="Language")]
    last_remind_date: Annotated[Optional[date], Field(None, alias="LastRemindDate")]
    net: Annotated[Optional[float], Field(None, alias="Net")]
    not_completed: Annotated[Optional[bool], Field(None, alias="NotCompleted")]
    nox_finans: Annotated[Optional[bool], Field(None, alias="NoxFinans")]
    ocr: Annotated[Optional[str], Field(None, alias="OCR")]
    offer_reference: Annotated[Optional[str], Field(None, alias="OfferReference")]
    order_reference: Annotated[Optional[str], Field(None, alias="OrderReference")]
    organisation_number: Annotated[
        Optional[str], Field(None, alias="OrganisationNumber")
    ]
    our_reference: Annotated[
        Optional[str], Field(None, alias="OurReference", max_length=50)
    ]
    outbound_date: Annotated[Optional[date], Field(None, alias="OutboundDate")]
    payment_way: Annotated[Optional[PaymentWay], Field(None, alias="PaymentWay")]
    phone1: Annotated[Optional[str], Field(None, alias="Phone1", max_length=1024)]
    phone2: Annotated[Optional[str], Field(None, alias="Phone2", max_length=1024)]
    price_list: Annotated[Optional[str], Field(None, alias="PriceList")]
    print_template: Annotated[Optional[str], Field(None, alias="PrintTemplate")]
    project: Annotated[Optional[str], Field(None, alias="Project")]
    remarks: Annotated[Optional[str], Field(None, alias="Remarks", max_length=1024)]
    reminders: Annotated[Optional[int], Field(None, alias="Reminders")]
    round_off: Annotated[Optional[float], Field(None, alias="RoundOff")]
    sent: Annotated[Optional[bool], Field(None, alias="Sent")]
    tax_reduction: Annotated[Optional[int], Field(None, alias="TaxReduction")]
    tax_reduction_type: Annotated[
        Optional[TaxReductionType], Field(None, alias="TaxReductionType")
    ]
    terms_of_delivery: Annotated[Optional[str], Field(None, alias="TermsOfDelivery")]
    terms_of_payment: Annotated[Optional[str], Field(None, alias="TermsOfPayment")]
    time_basis_reference: Annotated[
        Optional[int], Field(None, alias="TimeBasisReference")
    ]
    total: Annotated[Optional[float], Field(None, alias="Total")]
    total_to_pay: Annotated[Optional[float], Field(None, alias="TotalToPay")]
    total_vat: Annotated[Optional[float], Field(None, alias="TotalVAT")]
    vat_included: Annotated[Optional[bool], Field(None, alias="VATIncluded")]
    voucher_number: Annotated[Optional[int], Field(None, alias="VoucherNumber")]
    voucher_series: Annotated[Optional[str], Field(None, alias="VoucherSeries")]
    voucher_year: Annotated[Optional[int], Field(None, alias="VoucherYear")]
    warehouse_ready: Annotated[Optional[bool], Field(None, alias="WarehouseReady")]
    way_of_delivery: Annotated[Optional[str], Field(None, alias="WayOfDelivery")]
    your_order_number: Annotated[
        Optional[str], Field(None, alias="YourOrderNumber", max_length=75)
    ]
    your_reference: Annotated[
        Optional[str], Field(None, alias="YourReference", max_length=50)
    ]
    zip_code: Annotated[Optional[str], Field(None, alias="ZipCode", max_length=1024)]


class FortnoxInvoiceAccrual(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    accrual_account: Annotated[int, Field(alias="AccrualAccount", ge=1000, le=9999)]
    description: Annotated[str, Field(alias="Description")]
    end_date: Annotated[date, Field(alias="EndDate")]
    invoice_accrual_rows: Annotated[
        Sequence[FortnoxInvoiceAccrualInvoiceAccrualRow],
        Field(alias="InvoiceAccrualRows", max_length=2147483647, min_length=2),
    ]
    invoice_number: Annotated[int, Field(alias="InvoiceNumber")]
    period: Annotated[Optional[Period2], Field(None, alias="Period")]
    revenue_account: Annotated[int, Field(alias="RevenueAccount", ge=1000, le=9999)]
    start_date: Annotated[date, Field(alias="StartDate")]
    times: Annotated[Optional[int], Field(None, alias="Times")]
    total: Annotated[float, Field(alias="Total")]
    vat_included: Annotated[Optional[bool], Field(None, alias="VATIncluded")]


class FortnoxInvoiceAccrualWrap(ModelBase):
    invoice_accrual: Annotated[
        Optional[FortnoxInvoiceAccrual], Field(None, alias="InvoiceAccrual")
    ]


class FortnoxInvoicePayload(ModelBase):
    address1: Annotated[Optional[str], Field(None, alias="Address1")]
    address2: Annotated[Optional[str], Field(None, alias="Address2")]
    administration_fee: Annotated[
        Optional[float], Field(None, alias="AdministrationFee")
    ]
    city: Annotated[Optional[str], Field(None, alias="City", max_length=1024)]
    comments: Annotated[Optional[str], Field(None, alias="Comments", max_length=1024)]
    cost_center: Annotated[Optional[str], Field(None, alias="CostCenter")]
    country: Annotated[Optional[str], Field(None, alias="Country")]
    credit_invoice_reference: Annotated[
        Optional[str], Field(None, alias="CreditInvoiceReference")
    ]
    currency: Annotated[Optional[str], Field(None, alias="Currency")]
    currency_rate: Annotated[Optional[float], Field(None, alias="CurrencyRate")]
    currency_unit: Annotated[Optional[int], Field(None, alias="CurrencyUnit")]
    customer_name: Annotated[Optional[str], Field(None, alias="CustomerName")]
    customer_number: Annotated[str, Field(alias="CustomerNumber")]
    delivery_address1: Annotated[
        Optional[str], Field(None, alias="DeliveryAddress1", max_length=1024)
    ]
    delivery_address2: Annotated[
        Optional[str], Field(None, alias="DeliveryAddress2", max_length=1024)
    ]
    delivery_city: Annotated[
        Optional[str], Field(None, alias="DeliveryCity", max_length=1024)
    ]
    delivery_country: Annotated[Optional[str], Field(None, alias="DeliveryCountry")]
    delivery_date: Annotated[Optional[date], Field(None, alias="DeliveryDate")]
    delivery_name: Annotated[
        Optional[str], Field(None, alias="DeliveryName", max_length=1024)
    ]
    delivery_zip_code: Annotated[
        Optional[str], Field(None, alias="DeliveryZipCode", max_length=1024)
    ]
    document_number: Annotated[Optional[str], Field(None, alias="DocumentNumber")]
    due_date: Annotated[Optional[date], Field(None, alias="DueDate")]
    edi_information: Annotated[
        Optional[FortnoxInvoicePayloadEDIInformation],
        Field(None, alias="EDIInformation"),
    ]
    eu_quarterly_report: Annotated[
        Optional[bool], Field(None, alias="EUQuarterlyReport")
    ]
    email_information: Annotated[
        Optional[FortnoxInvoicePayloadEmailInformation],
        Field(None, alias="EmailInformation"),
    ]
    external_invoice_reference1: Annotated[
        Optional[str], Field(None, alias="ExternalInvoiceReference1", max_length=80)
    ]
    external_invoice_reference2: Annotated[
        Optional[str], Field(None, alias="ExternalInvoiceReference2", max_length=80)
    ]
    freight: Annotated[Optional[float], Field(None, alias="Freight")]
    invoice_date: Annotated[Optional[date], Field(None, alias="InvoiceDate")]
    invoice_rows: Annotated[
        Optional[Sequence[FortnoxInvoicePayloadInvoiceRow]],
        Field(None, alias="InvoiceRows"),
    ]
    invoice_type: Annotated[Optional[InvoiceType], Field(None, alias="InvoiceType")]
    labels: Annotated[
        Optional[Sequence[FortnoxInvoicePayloadLabel]], Field(None, alias="Labels")
    ]
    language: Annotated[Optional[Language], Field(None, alias="Language")]
    not_completed: Annotated[Optional[bool], Field(None, alias="NotCompleted")]
    ocr: Annotated[Optional[str], Field(None, alias="OCR")]
    our_reference: Annotated[
        Optional[str], Field(None, alias="OurReference", max_length=50)
    ]
    outbound_date: Annotated[Optional[date], Field(None, alias="OutboundDate")]
    payment_way: Annotated[Optional[str], Field(None, alias="PaymentWay")]
    phone1: Annotated[Optional[str], Field(None, alias="Phone1", max_length=1024)]
    phone2: Annotated[Optional[str], Field(None, alias="Phone2", max_length=1024)]
    price_list: Annotated[Optional[str], Field(None, alias="PriceList")]
    print_template: Annotated[Optional[str], Field(None, alias="PrintTemplate")]
    project: Annotated[Optional[str], Field(None, alias="Project")]
    remarks: Annotated[Optional[str], Field(None, alias="Remarks", max_length=1024)]
    tax_reduction_type: Annotated[
        Optional[TaxReductionType], Field(None, alias="TaxReductionType")
    ]
    terms_of_delivery: Annotated[Optional[str], Field(None, alias="TermsOfDelivery")]
    terms_of_payment: Annotated[Optional[str], Field(None, alias="TermsOfPayment")]
    vat_included: Annotated[Optional[bool], Field(None, alias="VATIncluded")]
    way_of_delivery: Annotated[Optional[str], Field(None, alias="WayOfDelivery")]
    your_order_number: Annotated[
        Optional[str], Field(None, alias="YourOrderNumber", max_length=75)
    ]
    your_reference: Annotated[
        Optional[str], Field(None, alias="YourReference", max_length=50)
    ]
    zip_code: Annotated[Optional[str], Field(None, alias="ZipCode", max_length=1024)]


class FortnoxInvoicePayloadWrap(ModelBase):
    invoice: Annotated[Optional[FortnoxInvoicePayload], Field(None, alias="Invoice")]


class FortnoxInvoicePayment(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    amount: Annotated[Optional[float], Field(None, alias="Amount")]
    amount_currency: Annotated[Optional[float], Field(None, alias="AmountCurrency")]
    booked: Annotated[Optional[bool], Field(None, alias="Booked")]
    currency: Annotated[
        Optional[str], Field(None, alias="Currency", max_length=3, min_length=3)
    ]
    currency_rate: Annotated[Optional[float], Field(None, alias="CurrencyRate")]
    currency_unit: Annotated[Optional[float], Field(None, alias="CurrencyUnit")]
    external_invoice_reference1: Annotated[
        Optional[str], Field(None, alias="ExternalInvoiceReference1")
    ]
    external_invoice_reference2: Annotated[
        Optional[str], Field(None, alias="ExternalInvoiceReference2")
    ]
    invoice_customer_name: Annotated[
        Optional[str], Field(None, alias="InvoiceCustomerName")
    ]
    invoice_customer_number: Annotated[
        Optional[str], Field(None, alias="InvoiceCustomerNumber")
    ]
    invoice_due_date: Annotated[Optional[date], Field(None, alias="InvoiceDueDate")]
    invoice_number: Annotated[int, Field(alias="InvoiceNumber")]
    invoice_ocr: Annotated[Optional[str], Field(None, alias="InvoiceOCR")]
    invoice_total: Annotated[Optional[str], Field(None, alias="InvoiceTotal")]
    mode_of_payment: Annotated[Optional[str], Field(None, alias="ModeOfPayment")]
    mode_of_payment_account: Annotated[
        Optional[int], Field(None, alias="ModeOfPaymentAccount", ge=1000, le=9999)
    ]
    number: Annotated[Optional[str], Field(None, alias="Number")]
    payment_date: Annotated[Optional[date], Field(None, alias="PaymentDate")]
    source: Annotated[Optional[str], Field(None, alias="Source")]
    voucher_number: Annotated[Optional[int], Field(None, alias="VoucherNumber")]
    voucher_series: Annotated[Optional[str], Field(None, alias="VoucherSeries")]
    voucher_year: Annotated[Optional[int], Field(None, alias="VoucherYear")]
    write_offs: Annotated[
        Optional[Sequence[FortnoxInvoicePaymentWriteOff]],
        Field(None, alias="WriteOffs"),
    ]


class FortnoxInvoicePaymentWrap(ModelBase):
    invoice_payment: Annotated[
        Optional[FortnoxInvoicePayment], Field(None, alias="InvoicePayment")
    ]


class FortnoxInvoiceWrap(ModelBase):
    invoice: Annotated[Optional[FortnoxInvoice], Field(None, alias="Invoice")]


class FortnoxOffer(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    field_url_tax_reduction_list: Annotated[
        Optional[str], Field(None, alias="@urlTaxReductionList")
    ]
    address1: Annotated[Optional[str], Field(None, alias="Address1", max_length=1024)]
    address2: Annotated[Optional[str], Field(None, alias="Address2", max_length=1024)]
    administration_fee: Annotated[
        Optional[float], Field(None, alias="AdministrationFee")
    ]
    administration_fee_vat: Annotated[
        Optional[float], Field(None, alias="AdministrationFeeVAT")
    ]
    basis_tax_reduction: Annotated[
        Optional[float], Field(None, alias="BasisTaxReduction")
    ]
    cancelled: Annotated[Optional[bool], Field(None, alias="Cancelled")]
    city: Annotated[Optional[str], Field(None, alias="City", max_length=1024)]
    comments: Annotated[Optional[str], Field(None, alias="Comments", max_length=1024)]
    contribution_percent: Annotated[
        Optional[float], Field(None, alias="ContributionPercent")
    ]
    contribution_value: Annotated[
        Optional[float], Field(None, alias="ContributionValue")
    ]
    copy_remarks: Annotated[Optional[bool], Field(None, alias="CopyRemarks")]
    cost_center: Annotated[Optional[str], Field(None, alias="CostCenter")]
    country: Annotated[Optional[str], Field(None, alias="Country")]
    currency: Annotated[Optional[str], Field(None, alias="Currency")]
    currency_rate: Annotated[Optional[float], Field(None, alias="CurrencyRate")]
    currency_unit: Annotated[Optional[int], Field(None, alias="CurrencyUnit")]
    customer_name: Annotated[Optional[str], Field(None, alias="CustomerName")]
    customer_number: Annotated[str, Field(alias="CustomerNumber")]
    delivery_address1: Annotated[
        Optional[str], Field(None, alias="DeliveryAddress1", max_length=1024)
    ]
    delivery_address2: Annotated[
        Optional[str], Field(None, alias="DeliveryAddress2", max_length=1024)
    ]
    delivery_city: Annotated[
        Optional[str], Field(None, alias="DeliveryCity", max_length=1024)
    ]
    delivery_country: Annotated[Optional[str], Field(None, alias="DeliveryCountry")]
    delivery_date: Annotated[Optional[date], Field(None, alias="DeliveryDate")]
    delivery_name: Annotated[
        Optional[str], Field(None, alias="DeliveryName", max_length=1024)
    ]
    delivery_zip_code: Annotated[Optional[str], Field(None, alias="DeliveryZipCode")]
    document_number: Annotated[Optional[str], Field(None, alias="DocumentNumber")]
    email_information: Annotated[
        Optional[FortnoxOfferEmailInformation], Field(None, alias="EmailInformation")
    ]
    expire_date: Annotated[Optional[date], Field(None, alias="ExpireDate")]
    freight: Annotated[Optional[float], Field(None, alias="Freight")]
    freight_vat: Annotated[Optional[float], Field(None, alias="FreightVAT")]
    gross: Annotated[Optional[float], Field(None, alias="Gross")]
    house_work: Annotated[Optional[bool], Field(None, alias="HouseWork")]
    invoice_reference: Annotated[Optional[str], Field(None, alias="InvoiceReference")]
    labels: Annotated[
        Optional[Sequence[FortnoxOfferLabel]], Field(None, alias="Labels")
    ]
    language: Annotated[Optional[str], Field(None, alias="Language")]
    net: Annotated[Optional[float], Field(None, alias="Net")]
    not_completed: Annotated[Optional[bool], Field(None, alias="NotCompleted")]
    offer_date: Annotated[Optional[date], Field(None, alias="OfferDate")]
    offer_rows: Annotated[
        Optional[Sequence[FortnoxOfferOfferRow]], Field(None, alias="OfferRows")
    ]
    order_reference: Annotated[Optional[str], Field(None, alias="OrderReference")]
    organisation_number: Annotated[
        Optional[str], Field(None, alias="OrganisationNumber")
    ]
    our_reference: Annotated[Optional[str], Field(None, alias="OurReference")]
    phone1: Annotated[Optional[str], Field(None, alias="Phone1")]
    phone2: Annotated[Optional[str], Field(None, alias="Phone2")]
    price_list: Annotated[Optional[str], Field(None, alias="PriceList")]
    print_template: Annotated[Optional[str], Field(None, alias="PrintTemplate")]
    project: Annotated[Optional[str], Field(None, alias="Project")]
    remarks: Annotated[Optional[str], Field(None, alias="Remarks")]
    round_off: Annotated[Optional[float], Field(None, alias="RoundOff")]
    sent: Annotated[Optional[bool], Field(None, alias="Sent")]
    tax_reduction: Annotated[Optional[int], Field(None, alias="TaxReduction")]
    tax_reduction_type: Annotated[
        Optional[TaxReductionType], Field(None, alias="TaxReductionType")
    ]
    terms_of_delivery: Annotated[Optional[str], Field(None, alias="TermsOfDelivery")]
    terms_of_payment: Annotated[Optional[str], Field(None, alias="TermsOfPayment")]
    total: Annotated[Optional[float], Field(None, alias="Total")]
    total_to_pay: Annotated[Optional[float], Field(None, alias="TotalToPay")]
    total_vat: Annotated[Optional[float], Field(None, alias="TotalVAT")]
    vat_included: Annotated[Optional[bool], Field(None, alias="VATIncluded")]
    way_of_delivery: Annotated[Optional[str], Field(None, alias="WayOfDelivery")]
    your_reference: Annotated[Optional[str], Field(None, alias="YourReference")]
    your_reference_number: Annotated[
        Optional[str], Field(None, alias="YourReferenceNumber")
    ]
    zip_code: Annotated[Optional[str], Field(None, alias="ZipCode")]


class FortnoxOfferWrap(ModelBase):
    offer: Annotated[Optional[FortnoxOffer], Field(None, alias="Offer")]


class FortnoxOrder(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    field_url_tax_reduction_list: Annotated[
        Optional[str], Field(None, alias="@urlTaxReductionList")
    ]
    address1: Annotated[Optional[str], Field(None, alias="Address1")]
    address2: Annotated[Optional[str], Field(None, alias="Address2")]
    administration_fee: Annotated[
        Optional[float], Field(None, alias="AdministrationFee")
    ]
    administration_fee_vat: Annotated[
        Optional[float], Field(None, alias="AdministrationFeeVAT")
    ]
    basis_tax_reduction: Annotated[
        Optional[float], Field(None, alias="BasisTaxReduction")
    ]
    cancelled: Annotated[Optional[bool], Field(None, alias="Cancelled")]
    city: Annotated[Optional[str], Field(None, alias="City")]
    comments: Annotated[Optional[str], Field(None, alias="Comments")]
    contribution_percent: Annotated[
        Optional[float], Field(None, alias="ContributionPercent")
    ]
    contribution_value: Annotated[
        Optional[float], Field(None, alias="ContributionValue")
    ]
    copy_remarks: Annotated[Optional[bool], Field(None, alias="CopyRemarks")]
    cost_center: Annotated[Optional[str], Field(None, alias="CostCenter")]
    country: Annotated[Optional[str], Field(None, alias="Country")]
    currency: Annotated[Optional[str], Field(None, alias="Currency", max_length=3)]
    currency_rate: Annotated[Optional[float], Field(None, alias="CurrencyRate")]
    currency_unit: Annotated[Optional[float], Field(None, alias="CurrencyUnit")]
    customer_name: Annotated[Optional[str], Field(None, alias="CustomerName")]
    customer_number: Annotated[str, Field(alias="CustomerNumber")]
    delivery_address1: Annotated[Optional[str], Field(None, alias="DeliveryAddress1")]
    delivery_address2: Annotated[Optional[str], Field(None, alias="DeliveryAddress2")]
    delivery_city: Annotated[Optional[str], Field(None, alias="DeliveryCity")]
    delivery_country: Annotated[Optional[str], Field(None, alias="DeliveryCountry")]
    delivery_date: Annotated[Optional[date], Field(None, alias="DeliveryDate")]
    delivery_name: Annotated[Optional[str], Field(None, alias="DeliveryName")]
    delivery_state: Annotated[
        Optional[DeliveryState], Field(None, alias="DeliveryState")
    ]
    delivery_zip_code: Annotated[Optional[str], Field(None, alias="DeliveryZipCode")]
    document_number: Annotated[Optional[str], Field(None, alias="DocumentNumber")]
    email_information: Annotated[
        Optional[FortnoxOrderEmailInformation], Field(None, alias="EmailInformation")
    ]
    external_invoice_reference1: Annotated[
        Optional[str], Field(None, alias="ExternalInvoiceReference1")
    ]
    external_invoice_reference2: Annotated[
        Optional[str], Field(None, alias="ExternalInvoiceReference2")
    ]
    freight: Annotated[Optional[float], Field(None, alias="Freight")]
    freight_vat: Annotated[Optional[float], Field(None, alias="FreightVAT")]
    gross: Annotated[Optional[float], Field(None, alias="Gross")]
    house_work: Annotated[Optional[bool], Field(None, alias="HouseWork")]
    invoice_reference: Annotated[Optional[str], Field(None, alias="InvoiceReference")]
    labels: Annotated[
        Optional[Sequence[FortnoxOrderLabel]], Field(None, alias="Labels")
    ]
    language: Annotated[Optional[str], Field(None, alias="Language")]
    net: Annotated[Optional[float], Field(None, alias="Net")]
    not_completed: Annotated[Optional[bool], Field(None, alias="NotCompleted")]
    offer_reference: Annotated[Optional[str], Field(None, alias="OfferReference")]
    order_date: Annotated[Optional[date], Field(None, alias="OrderDate")]
    order_rows: Annotated[
        Optional[Sequence[FortnoxOrderOrderRow]], Field(None, alias="OrderRows")
    ]
    order_type: Annotated[Optional[str], Field(None, alias="OrderType")]
    organisation_number: Annotated[
        Optional[str], Field(None, alias="OrganisationNumber")
    ]
    our_reference: Annotated[
        Optional[str], Field(None, alias="OurReference", max_length=50)
    ]
    outbound_date: Annotated[Optional[date], Field(None, alias="OutboundDate")]
    phone1: Annotated[Optional[str], Field(None, alias="Phone1")]
    phone2: Annotated[Optional[str], Field(None, alias="Phone2")]
    price_list: Annotated[Optional[str], Field(None, alias="PriceList")]
    print_template: Annotated[Optional[str], Field(None, alias="PrintTemplate")]
    project: Annotated[Optional[str], Field(None, alias="Project")]
    remarks: Annotated[Optional[str], Field(None, alias="Remarks", max_length=1024)]
    round_off: Annotated[Optional[float], Field(None, alias="RoundOff")]
    sent: Annotated[Optional[bool], Field(None, alias="Sent")]
    stock_point_code: Annotated[Optional[str], Field(None, alias="StockPointCode")]
    stock_point_id: Annotated[Optional[str], Field(None, alias="StockPointId")]
    tax_reduction: Annotated[Optional[float], Field(None, alias="TaxReduction")]
    tax_reduction_type: Annotated[
        Optional[TaxReductionType], Field(None, alias="TaxReductionType")
    ]
    terms_of_delivery: Annotated[Optional[str], Field(None, alias="TermsOfDelivery")]
    terms_of_payment: Annotated[Optional[str], Field(None, alias="TermsOfPayment")]
    time_basis_reference: Annotated[
        Optional[int], Field(None, alias="TimeBasisReference")
    ]
    total: Annotated[Optional[float], Field(None, alias="Total")]
    total_to_pay: Annotated[Optional[float], Field(None, alias="TotalToPay")]
    total_vat: Annotated[Optional[float], Field(None, alias="TotalVAT")]
    vat_included: Annotated[Optional[bool], Field(None, alias="VATIncluded")]
    warehouse_ready: Annotated[Optional[bool], Field(None, alias="WarehouseReady")]
    way_of_delivery: Annotated[Optional[str], Field(None, alias="WayOfDelivery")]
    your_order_number: Annotated[
        Optional[str], Field(None, alias="YourOrderNumber", max_length=75)
    ]
    your_reference: Annotated[
        Optional[str], Field(None, alias="YourReference", max_length=50)
    ]
    zip_code: Annotated[Optional[str], Field(None, alias="ZipCode")]


class FortnoxOrderWrap(ModelBase):
    order: Annotated[Optional[FortnoxOrder], Field(None, alias="Order")]


class FortnoxSupplierInvoice(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    accounting_method: Annotated[
        Optional[AccountingMethod], Field(None, alias="AccountingMethod")
    ]
    administration_fee: Annotated[Optional[str], Field(None, alias="AdministrationFee")]
    balance: Annotated[Optional[str], Field(None, alias="Balance")]
    booked: Annotated[Optional[bool], Field(None, alias="Booked")]
    cancelled: Annotated[Optional[bool], Field(None, alias="Cancelled")]
    comments: Annotated[Optional[str], Field(None, alias="Comments", max_length=1000)]
    cost_center: Annotated[Optional[str], Field(None, alias="CostCenter")]
    credit: Annotated[Optional[bool], Field(None, alias="Credit")]
    credit_reference: Annotated[Optional[int], Field(None, alias="CreditReference")]
    currency: Annotated[Optional[str], Field(None, alias="Currency")]
    currency_rate: Annotated[Optional[str], Field(None, alias="CurrencyRate")]
    currency_unit: Annotated[Optional[float], Field(None, alias="CurrencyUnit")]
    disable_payment_file: Annotated[
        Optional[bool], Field(None, alias="DisablePaymentFile")
    ]
    due_date: Annotated[Optional[date], Field(None, alias="DueDate")]
    external_invoice_number: Annotated[
        Optional[str], Field(None, alias="ExternalInvoiceNumber")
    ]
    external_invoice_series: Annotated[
        Optional[str], Field(None, alias="ExternalInvoiceSeries")
    ]
    final_pay_date: Annotated[Optional[date], Field(None, alias="FinalPayDate")]
    freight: Annotated[Optional[str], Field(None, alias="Freight")]
    given_number: Annotated[Optional[str], Field(None, alias="GivenNumber")]
    invoice_date: Annotated[Optional[date], Field(None, alias="InvoiceDate")]
    invoice_number: Annotated[
        Optional[str], Field(None, alias="InvoiceNumber", max_length=64)
    ]
    ocr: Annotated[Optional[str], Field(None, alias="OCR")]
    our_reference: Annotated[
        Optional[str], Field(None, alias="OurReference", max_length=50)
    ]
    payment_pending: Annotated[Optional[bool], Field(None, alias="PaymentPending")]
    project: Annotated[Optional[str], Field(None, alias="Project")]
    round_off_value: Annotated[Optional[str], Field(None, alias="RoundOffValue")]
    sales_type: Annotated[Optional[SalesType], Field(None, alias="SalesType")]
    supplier_invoice_rows: Annotated[
        Optional[Sequence[FortnoxSupplierInvoiceSupplierInvoiceRow]],
        Field(None, alias="SupplierInvoiceRows"),
    ]
    supplier_name: Annotated[Optional[str], Field(None, alias="SupplierName")]
    supplier_number: Annotated[str, Field(alias="SupplierNumber")]
    total: Annotated[Optional[str], Field(None, alias="Total")]
    vat: Annotated[Optional[str], Field(None, alias="VAT")]
    vat_type: Annotated[Optional[VatType1], Field(None, alias="VATType")]
    voucher_number: Annotated[Optional[int], Field(None, alias="VoucherNumber")]
    voucher_series: Annotated[Optional[str], Field(None, alias="VoucherSeries")]
    voucher_year: Annotated[Optional[int], Field(None, alias="VoucherYear")]
    vouchers: Annotated[
        Optional[Sequence[FortnoxSupplierInvoiceVoucher]], Field(None, alias="Vouchers")
    ]
    your_reference: Annotated[
        Optional[str], Field(None, alias="YourReference", max_length=50)
    ]


class FortnoxSupplierInvoiceAccrual(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    accrual_account: Annotated[int, Field(alias="AccrualAccount", ge=1000, le=9999)]
    cost_account: Annotated[int, Field(alias="CostAccount", ge=1000, le=9999)]
    description: Annotated[Optional[str], Field(None, alias="Description")]
    end_date: Annotated[date, Field(alias="EndDate")]
    period: Annotated[Period2, Field(alias="Period")]
    start_date: Annotated[date, Field(alias="StartDate")]
    supplier_invoice_accrual_rows: Annotated[
        Sequence[FortnoxSupplierInvoiceAccrualSupplierInvoiceAccrualRows],
        Field(alias="SupplierInvoiceAccrualRows", max_length=2147483647, min_length=2),
    ]
    supplier_invoice_number: Annotated[int, Field(alias="SupplierInvoiceNumber")]
    times: Annotated[int, Field(alias="Times")]
    total: Annotated[float, Field(alias="Total")]
    vat_included: Annotated[Optional[bool], Field(None, alias="VATIncluded")]


class FortnoxSupplierInvoiceAccrualWrap(ModelBase):
    supplier_invoice_accrual: Annotated[
        FortnoxSupplierInvoiceAccrual, Field(alias="SupplierInvoiceAccrual")
    ]


class FortnoxSupplierInvoiceListItem(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    authorizer_name: Annotated[Optional[str], Field(None, alias="AuthorizerName")]
    balance: Annotated[Optional[str], Field(None, alias="Balance")]
    booked: Annotated[Optional[bool], Field(None, alias="Booked")]
    cancel: Annotated[Optional[bool], Field(None, alias="Cancel")]
    cost_center: Annotated[Optional[str], Field(None, alias="CostCenter")]
    credit: Annotated[Optional[bool], Field(None, alias="Credit")]
    currency: Annotated[Optional[str], Field(None, alias="Currency")]
    currency_rate: Annotated[Optional[str], Field(None, alias="CurrencyRate")]
    currency_unit: Annotated[Optional[float], Field(None, alias="CurrencyUnit")]
    due_date: Annotated[Optional[date], Field(None, alias="DueDate")]
    external_invoice_number: Annotated[
        Optional[str], Field(None, alias="ExternalInvoiceNumber")
    ]
    external_invoice_series: Annotated[
        Optional[str], Field(None, alias="ExternalInvoiceSeries")
    ]
    final_pay_date: Annotated[Optional[date], Field(None, alias="FinalPayDate")]
    given_number: Annotated[Optional[str], Field(None, alias="GivenNumber")]
    invoice_date: Annotated[Optional[date], Field(None, alias="InvoiceDate")]
    invoice_number: Annotated[Optional[str], Field(None, alias="InvoiceNumber")]
    project: Annotated[Optional[str], Field(None, alias="Project")]
    supplier_name: Annotated[Optional[str], Field(None, alias="SupplierName")]
    supplier_number: Annotated[str, Field(alias="SupplierNumber")]
    total: Annotated[Optional[str], Field(None, alias="Total")]
    vouchers: Annotated[
        Optional[Sequence[FortnoxSupplierInvoiceListItemVoucher]],
        Field(None, alias="Vouchers"),
    ]


class FortnoxSupplierInvoiceListItemWrap(ModelBase):
    supplier_invoices: Annotated[
        Optional[Sequence[FortnoxSupplierInvoiceListItem]],
        Field(None, alias="SupplierInvoices"),
    ]


class FortnoxSupplierInvoicePayment(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    amount: Annotated[Optional[float], Field(None, alias="Amount")]
    amount_currency: Annotated[Optional[float], Field(None, alias="AmountCurrency")]
    booked: Annotated[Optional[bool], Field(None, alias="Booked")]
    currency: Annotated[
        Optional[str], Field(None, alias="Currency", max_length=3, min_length=3)
    ]
    currency_rate: Annotated[Optional[float], Field(None, alias="CurrencyRate")]
    currency_unit: Annotated[Optional[float], Field(None, alias="CurrencyUnit")]
    information: Annotated[Optional[str], Field(None, alias="Information")]
    invoice_due_date: Annotated[Optional[date], Field(None, alias="InvoiceDueDate")]
    invoice_number: Annotated[str, Field(alias="InvoiceNumber")]
    invoice_ocr: Annotated[Optional[str], Field(None, alias="InvoiceOCR")]
    invoice_supplier_name: Annotated[
        Optional[str], Field(None, alias="InvoiceSupplierName")
    ]
    invoice_supplier_number: Annotated[
        Optional[str], Field(None, alias="InvoiceSupplierNumber")
    ]
    invoice_total: Annotated[Optional[str], Field(None, alias="InvoiceTotal")]
    mode_of_payment: Annotated[Optional[str], Field(None, alias="ModeOfPayment")]
    number: Annotated[Optional[int], Field(None, alias="Number")]
    payment_date: Annotated[Optional[date], Field(None, alias="PaymentDate")]
    source: Annotated[Optional[Source], Field(None, alias="Source")]
    voucher_number: Annotated[Optional[int], Field(None, alias="VoucherNumber")]
    voucher_series: Annotated[Optional[str], Field(None, alias="VoucherSeries")]
    voucher_year: Annotated[Optional[int], Field(None, alias="VoucherYear")]
    write_offs: Annotated[
        Optional[Sequence[FortnoxSupplierInvoicePaymentWriteOff]],
        Field(None, alias="WriteOffs"),
    ]


class FortnoxSupplierInvoicePaymentWrap(ModelBase):
    supplier_invoice_payment: Annotated[
        Optional[FortnoxSupplierInvoicePayment],
        Field(None, alias="SupplierInvoicePayment"),
    ]


class FortnoxSupplierInvoiceWrap(ModelBase):
    supplier_invoice: Annotated[
        Optional[FortnoxSupplierInvoice], Field(None, alias="SupplierInvoice")
    ]


class FortnoxTaxReduction(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    approved_amount: Annotated[Optional[float], Field(None, alias="ApprovedAmount")]
    asked_amount: Annotated[float, Field(alias="AskedAmount", ge=1.0)]
    billed_amount: Annotated[Optional[float], Field(None, alias="BilledAmount")]
    customer_name: Annotated[
        str, Field(alias="CustomerName", max_length=2147483647, min_length=1)
    ]
    id: Annotated[Optional[int], Field(None, alias="Id")]
    property_designation: Annotated[
        Optional[str], Field(None, alias="PropertyDesignation")
    ]
    reference_document_type: Annotated[
        ReferenceDocumentType, Field(alias="ReferenceDocumentType")
    ]
    reference_number: Annotated[str, Field(alias="ReferenceNumber")]
    request_sent: Annotated[Optional[bool], Field(None, alias="RequestSent")]
    residence_association_organisation_number: Annotated[
        Optional[str], Field(None, alias="ResidenceAssociationOrganisationNumber")
    ]
    social_security_number: Annotated[
        str, Field(alias="SocialSecurityNumber", max_length=13, min_length=10)
    ]
    tax_reduction_amounts: Annotated[
        Optional[Sequence[FortnoxTaxReductionTaxReductionAmount]],
        Field(None, alias="TaxReductionAmounts"),
    ]
    voucher_number: Annotated[Optional[int], Field(None, alias="VoucherNumber")]
    voucher_series: Annotated[Optional[str], Field(None, alias="VoucherSeries")]
    voucher_year: Annotated[Optional[int], Field(None, alias="VoucherYear")]


class FortnoxTaxReductionWrap(ModelBase):
    tax_reduction: Annotated[FortnoxTaxReduction, Field(alias="TaxReduction")]


class FortnoxTrustedEmailSender(ModelBase):
    rejected_senders: Annotated[
        Optional[Sequence[FortnoxTrustedEmailSenderRejectedSender]],
        Field(None, alias="RejectedSenders"),
    ]
    trusted_senders: Annotated[
        Optional[Sequence[FortnoxTrustedEmailSenderTrustedSender]],
        Field(None, alias="TrustedSenders"),
    ]


class FortnoxTrustedEmailSenderWrap(ModelBase):
    email_senders: Annotated[
        Optional[FortnoxTrustedEmailSender], Field(None, alias="EmailSenders")
    ]


class FortnoxVacationDebtBasis(ModelBase):
    employees: Annotated[
        Optional[Sequence[FortnoxVacationDebtBasisEmployee]],
        Field(None, alias="Employees"),
    ]
    last_day: Annotated[Optional[date], Field(None, alias="LastDay")]
    month: Annotated[int, Field(alias="Month")]
    voucher_number: Annotated[Optional[int], Field(None, alias="VoucherNumber")]
    voucher_series: Annotated[Optional[str], Field(None, alias="VoucherSeries")]
    voucher_year: Annotated[Optional[int], Field(None, alias="VoucherYear")]
    year: Annotated[int, Field(alias="Year")]


class FortnoxVacationDebtBasisWrap(ModelBase):
    vacation_debt_basis: Annotated[
        Optional[FortnoxVacationDebtBasis], Field(None, alias="VacationDebtBasis")
    ]


class FortnoxVoucher(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    approval_state: Annotated[Optional[int], Field(None, alias="ApprovalState")]
    comments: Annotated[Optional[str], Field(None, alias="Comments", max_length=1000)]
    cost_center: Annotated[Optional[str], Field(None, alias="CostCenter")]
    description: Annotated[
        str, Field(alias="Description", max_length=200, min_length=1)
    ]
    project: Annotated[Optional[str], Field(None, alias="Project")]
    reference_number: Annotated[Optional[str], Field(None, alias="ReferenceNumber")]
    reference_type: Annotated[
        Optional[ReferenceType], Field(None, alias="ReferenceType")
    ]
    transaction_date: Annotated[date, Field(alias="TransactionDate")]
    voucher_number: Annotated[Optional[int], Field(None, alias="VoucherNumber")]
    voucher_rows: Annotated[
        Optional[Sequence[FortnoxVoucherVoucherRow]],
        Field(None, alias="VoucherRows", max_length=2147483647, min_length=2),
    ]
    voucher_series: Annotated[str, Field(alias="VoucherSeries")]
    year: Annotated[int, Field(alias="Year")]


class FortnoxVoucherSeries(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    approver: Annotated[
        Optional[FortnoxVoucherSeriesApprover], Field(None, alias="Approver")
    ]
    code: Annotated[str, Field(alias="Code", max_length=10, min_length=1)]
    description: Annotated[
        Optional[str], Field(None, alias="Description", max_length=200)
    ]
    manual: Annotated[Optional[bool], Field(None, alias="Manual")]
    next_voucher_number: Annotated[
        Optional[int], Field(None, alias="NextVoucherNumber")
    ]
    year: Annotated[Optional[int], Field(None, alias="Year")]


class FortnoxVoucherSeriesListItem(ModelBase):
    field_url: Annotated[Optional[str], Field(None, alias="@url")]
    approver: Annotated[
        Optional[FortnoxVoucherSeriesListItemApprover], Field(None, alias="Approver")
    ]
    code: Annotated[str, Field(alias="Code", max_length=10, min_length=1)]
    description: Annotated[
        Optional[str], Field(None, alias="Description", max_length=200)
    ]
    manual: Annotated[Optional[bool], Field(None, alias="Manual")]
    year: Annotated[Optional[int], Field(None, alias="Year")]


class FortnoxVoucherSeriesListItemList(ModelBase):
    voucher_series_collection: Annotated[
        Optional[Sequence[FortnoxVoucherSeriesListItem]],
        Field(None, alias="VoucherSeriesCollection"),
    ]


class FortnoxVoucherSeriesWrap(ModelBase):
    voucher_series: Annotated[FortnoxVoucherSeries, Field(alias="VoucherSeries")]


class FortnoxVoucherWrap(ModelBase):
    voucher: Annotated[Optional[FortnoxVoucher], Field(None, alias="Voucher")]


class IntegrationPartnerAppSalesTenantData(ModelBase):
    purchases: Optional[Sequence[IntegrationPartnerAppSalesPurchase]] = None
    tenant_id: Annotated[Optional[str], Field(None, alias="tenantId")]
    terminations: Optional[Sequence[IntegrationPartnerAppSalesTermination]] = None
    users: Optional[Sequence[IntegrationPartnerAppSalesUserData]] = None


class TimeReportingTRItem(ModelBase):
    active: Optional[bool] = None
    description: Annotated[Optional[str], Field(None, max_length=255)]
    id: Annotated[Optional[str], Field(None, max_length=40)]
    is_stock: Annotated[Optional[bool], Field(None, alias="isStock")]
    purchase_price: Annotated[Optional[float], Field(None, alias="purchasePrice")]
    sales_prices: Annotated[
        Optional[Sequence[TimeReportingTRItemPrice]], Field(None, alias="salesPrices")
    ]
    type: Optional[Type3] = None
    unit: Optional[str] = None


class WarehouseCustomInboundDocument(ModelBase):
    currency: Optional[WarehouseCurrency] = None
    date: date
    id: Annotated[
        Optional[str], Field(None, max_length=25, min_length=1, pattern="^[0-9]+")
    ]
    note: Annotated[Optional[str], Field(None, max_length=1000)]
    rows: Sequence[WarehouseCustomInboundDocumentRow]
    type: Annotated[
        Optional[str],
        Field(None, max_length=25, min_length=1, pattern="[a-zA-Z0-9_-]+"),
    ]
    voided: Optional[bool] = None
    warehouse_ready: Annotated[Optional[bool], Field(None, alias="warehouseReady")]


class WarehouseCustomOutboundDocument(ModelBase):
    average_costs: Annotated[
        Optional[Sequence[WarehouseAverageCost]], Field(None, alias="averageCosts")
    ]
    date: date
    delivery_state: Annotated[DeliveryState, Field(alias="deliveryState")]
    forced_delivery: Annotated[Optional[bool], Field(None, alias="forcedDelivery")]
    id: Annotated[
        Optional[str], Field(None, max_length=25, min_length=1, pattern="^[0-9]+")
    ]
    note: Annotated[Optional[str], Field(None, max_length=1000)]
    reference_type: Annotated[
        Optional[str],
        Field(
            None,
            alias="referenceType",
            max_length=25,
            min_length=1,
            pattern="[a-zA-Z0-9_-]+",
        ),
    ]
    rows: Sequence[WarehouseCustomOutboundDocumentRow]
    voided: Optional[bool] = None
    warehouse_ready: Annotated[Optional[bool], Field(None, alias="warehouseReady")]


class WarehouseIncomingGoods(ModelBase):
    completed: Optional[bool] = None
    cost_center_code: Annotated[Optional[str], Field(None, alias="costCenterCode")]
    date: Optional[date] = None
    delivery_note_id: Annotated[
        str, Field(alias="deliveryNoteId", max_length=50, min_length=1)
    ]
    has_delivery_note: Annotated[Optional[bool], Field(None, alias="hasDeliveryNote")]
    id: Optional[int] = None
    note: Annotated[Optional[str], Field(None, max_length=1000)]
    project_id: Annotated[Optional[str], Field(None, alias="projectId")]
    released: Optional[bool] = None
    rows: Optional[Sequence[WarehouseIncomingGoodsRow]] = None
    stock_point_code: Annotated[Optional[str], Field(None, alias="stockPointCode")]
    stock_point_id: Annotated[Optional[UUID], Field(None, alias="stockPointId")]
    stock_point_name: Annotated[Optional[str], Field(None, alias="stockPointName")]
    supplier_name: Annotated[
        Optional[str], Field(None, alias="supplierName", max_length=1024)
    ]
    supplier_number: Annotated[
        Optional[str], Field(None, alias="supplierNumber", max_length=1024)
    ]
    voided: Optional[bool] = None


class WarehouseManualInboundDocument(ModelBase):
    currency: Annotated[str, Field(max_length=3, min_length=3)]
    currency_rate: Annotated[float, Field(alias="currencyRate", ge=1e-06)]
    currency_unit: Annotated[Optional[int], Field(None, alias="currencyUnit", ge=1)]
    date: date
    id: Optional[int] = None
    note: Annotated[Optional[str], Field(None, max_length=1000)]
    released: Optional[bool] = None
    rows: Annotated[
        Sequence[WarehouseManualInboundDocumentRow],
        Field(max_length=2147483647, min_length=1),
    ]
    stock_point_code: Annotated[Optional[str], Field(None, alias="stockPointCode")]
    stock_point_id: Annotated[Optional[UUID], Field(None, alias="stockPointId")]
    stock_point_name: Annotated[Optional[str], Field(None, alias="stockPointName")]
    voided: Optional[bool] = None


class WarehouseManualOutboundDocument(ModelBase):
    date: date
    id: Optional[int] = None
    note: Annotated[Optional[str], Field(None, max_length=1000)]
    released: Optional[bool] = None
    rows: Annotated[
        Sequence[WarehouseManualOutboundDocumentRow], Field(max_length=2147483647)
    ]
    stock_point_code: Annotated[Optional[str], Field(None, alias="stockPointCode")]
    stock_point_id: Annotated[Optional[UUID], Field(None, alias="stockPointId")]
    stock_point_name: Annotated[Optional[str], Field(None, alias="stockPointName")]
    voided: Optional[bool] = None


class WarehousePurchaseOrderRow(ModelBase):
    back_order_quantity: Annotated[
        Optional[float], Field(None, alias="backOrderQuantity")
    ]
    cost_center_code: Annotated[
        Optional[str], Field(None, alias="costCenterCode", max_length=25)
    ]
    currency_code: Annotated[
        str, Field(alias="currencyCode", max_length=3, min_length=3)
    ]
    id: Optional[UUID] = None
    is_stock_item: Annotated[Optional[bool], Field(None, alias="isStockItem")]
    item_description: Annotated[Optional[str], Field(None, alias="itemDescription")]
    item_id: Annotated[str, Field(alias="itemId", max_length=50, min_length=1)]
    item_unit: Annotated[Optional[str], Field(None, alias="itemUnit")]
    notes: Optional[Sequence[WarehousePurchaseOrderRowNote]] = None
    ordered_quantity: Annotated[float, Field(alias="orderedQuantity", ge=0.0)]
    price: Annotated[Optional[float], Field(None, ge=0.0)]
    project_id: Annotated[Optional[str], Field(None, alias="projectId", max_length=25)]
    purchase_order_id: Annotated[Optional[int], Field(None, alias="purchaseOrderId")]
    received_quantity: Annotated[Optional[float], Field(None, alias="receivedQuantity")]
    remaining_ordered_quantity: Annotated[
        float, Field(alias="remainingOrderedQuantity", ge=0.0)
    ]
    row_num: Annotated[Optional[int], Field(None, alias="rowNum")]
    stock_location_code: Annotated[
        Optional[str], Field(None, alias="stockLocationCode")
    ]
    stock_location_id: Annotated[Optional[UUID], Field(None, alias="stockLocationId")]
    stock_location_name: Annotated[
        Optional[str], Field(None, alias="stockLocationName")
    ]
    stock_point_code: Annotated[Optional[str], Field(None, alias="stockPointCode")]
    stock_point_id: Annotated[Optional[UUID], Field(None, alias="stockPointId")]
    stock_point_name: Annotated[Optional[str], Field(None, alias="stockPointName")]


class WarehouseStockTaking(ModelBase):
    cost_center_code: Annotated[Optional[str], Field(None, alias="costCenterCode")]
    date: Optional[date] = None
    id: Optional[int] = None
    name: Annotated[str, Field(max_length=50, min_length=1)]
    project_id: Annotated[Optional[str], Field(None, alias="projectId")]
    responsible: Annotated[str, Field(max_length=50, min_length=1)]
    rows: Optional[Sequence[WarehouseStockTakingRow]] = None
    sort_params: Annotated[
        Optional[WarehouseStockTakingSortParams], Field(None, alias="sortParams")
    ]
    sorting_id: Annotated[Optional[int], Field(None, alias="sortingId")]
    state: Annotated[str, Field(pattern="planning|started|completed|voided")]
    using_stock_points: Annotated[Optional[bool], Field(None, alias="usingStockPoints")]


class WarehouseStockTransferDocument(ModelBase):
    id: Annotated[Optional[int], Field(None, ge=1)]
    note: Annotated[Optional[str], Field(None, max_length=1000)]
    released: Optional[bool] = None
    rows: Sequence[WarehouseStockTransferRow]
    transfer_date: Annotated[Optional[date], Field(None, alias="transferDate")]
    version: Optional[int] = None
    voided: Optional[bool] = None


class IntegrationPartnerAppSalesResponse(ModelBase):
    app_id: Annotated[Optional[str], Field(None, alias="appId")]
    tenants: Optional[Sequence[IntegrationPartnerAppSalesTenantData]] = None


class TimeReportingArticleRegistration(ModelBase):
    created_by: Annotated[Optional[str], Field(None, alias="createdBy")]
    created_time: Annotated[Optional[AwareDatetime], Field(None, alias="createdTime")]
    document_id: Annotated[Optional[int], Field(None, alias="documentId")]
    document_type: Annotated[Optional[DocumentType], Field(None, alias="documentType")]
    id: Optional[UUID] = None
    invoice_basis_id: Annotated[Optional[int], Field(None, alias="invoiceBasisId")]
    invoice_text: Annotated[
        Optional[str], Field(None, alias="invoiceText", max_length=1000)
    ]
    item: Optional[TimeReportingTRItem] = None
    non_invoiceable: Annotated[Optional[bool], Field(None, alias="nonInvoiceable")]
    note: Annotated[Optional[str], Field(None, max_length=1000)]
    order_index: Annotated[Optional[int], Field(None, alias="orderIndex")]
    owner_id: Annotated[Optional[str], Field(None, alias="ownerId")]
    time_locked: Annotated[Optional[bool], Field(None, alias="timeLocked")]
    total_quantity: Annotated[Optional[float], Field(None, alias="totalQuantity")]
    unit_cost: Annotated[Optional[float], Field(None, alias="unitCost")]
    unit_price: Annotated[Optional[float], Field(None, alias="unitPrice")]


class TimeReportingBaseArticleRegistration(ModelBase):
    article_registrations: Annotated[
        Optional[Sequence[TimeReportingArticleRegistration]],
        Field(None, alias="articleRegistrations"),
    ]
    cost_center: Annotated[
        Optional[TimeReportingTRCostCenter], Field(None, alias="costCenter")
    ]
    created_time: Annotated[Optional[AwareDatetime], Field(None, alias="createdTime")]
    customer: TimeReportingTRCustomer
    id: Optional[UUID] = None
    owner_id: Annotated[Optional[str], Field(None, alias="ownerId")]
    project: Optional[TimeReportingTRProject] = None
    purchase_date: Annotated[date, Field(alias="purchaseDate")]
    registered_article: Annotated[
        Optional[TimeReportingArticleRegistration],
        Field(None, alias="registeredArticle"),
    ]
    registration_type: Annotated[
        Optional[RegistrationType], Field(None, alias="registrationType")
    ]
    version: Optional[int] = None


class TimeReportingDetailedRegistration(ModelBase):
    charge_hours: Annotated[Optional[float], Field(None, alias="chargeHours")]
    child_id: Annotated[Optional[UUID], Field(None, alias="childId")]
    cost_center: Annotated[
        Optional[TimeReportingTRCostCenter], Field(None, alias="costCenter")
    ]
    created_by: Annotated[Optional[str], Field(None, alias="createdBy")]
    created_time: Annotated[Optional[AwareDatetime], Field(None, alias="createdTime")]
    customer: Optional[TimeReportingTRCustomer] = None
    document_id: Annotated[Optional[int], Field(None, alias="documentId")]
    document_type: Annotated[Optional[DocumentType], Field(None, alias="documentType")]
    id: Optional[UUID] = None
    invoice_basis_id: Annotated[Optional[int], Field(None, alias="invoiceBasisId")]
    invoice_text: Annotated[
        Optional[str], Field(None, alias="invoiceText", max_length=1000)
    ]
    non_invoiceable: Annotated[Optional[bool], Field(None, alias="nonInvoiceable")]
    note: Annotated[Optional[str], Field(None, max_length=1000)]
    project: Optional[TimeReportingTRProject] = None
    registration_code: Annotated[
        TimeReportingRegistrationCode, Field(alias="registrationCode")
    ]
    service: Optional[TimeReportingTRItem] = None
    start_time: Annotated[Optional[AwareDatetime], Field(None, alias="startTime")]
    stop_time: Annotated[Optional[AwareDatetime], Field(None, alias="stopTime")]
    unit_cost: Annotated[Optional[float], Field(None, alias="unitCost")]
    unit_price: Annotated[Optional[float], Field(None, alias="unitPrice")]
    updated_by: Annotated[Optional[str], Field(None, alias="updatedBy")]
    user_id: Annotated[Optional[str], Field(None, alias="userId")]
    worked_date: Annotated[date, Field(alias="workedDate")]
    worked_hours: Annotated[Optional[float], Field(None, alias="workedHours")]


class WarehousePurchaseOrder(ModelBase):
    confirmation_email: Annotated[
        Optional[str], Field(None, alias="confirmationEmail", max_length=100)
    ]
    cost_center_code: Annotated[
        Optional[str], Field(None, alias="costCenterCode", max_length=25)
    ]
    currency_code: Annotated[str, Field(alias="currencyCode", max_length=3)]
    currency_rate: Annotated[float, Field(alias="currencyRate")]
    currency_unit: Annotated[Optional[int], Field(None, alias="currencyUnit", ge=1)]
    customer_id: Annotated[
        Optional[str], Field(None, alias="customerId", max_length=25)
    ]
    customer_name: Annotated[
        Optional[str], Field(None, alias="customerName", max_length=1024)
    ]
    customer_number: Annotated[
        Optional[str], Field(None, alias="customerNumber", max_length=1024)
    ]
    delivery_address: Annotated[
        str, Field(alias="deliveryAddress", max_length=1024, min_length=1)
    ]
    delivery_address2: Annotated[
        Optional[str], Field(None, alias="deliveryAddress2", max_length=1024)
    ]
    delivery_city: Annotated[
        str, Field(alias="deliveryCity", max_length=50, min_length=1)
    ]
    delivery_country_code: Annotated[
        Optional[str], Field(None, alias="deliveryCountryCode", max_length=3)
    ]
    delivery_date: Annotated[Optional[date], Field(None, alias="deliveryDate")]
    delivery_name: Annotated[
        str, Field(alias="deliveryName", max_length=50, min_length=1)
    ]
    delivery_zip_code: Annotated[
        str, Field(alias="deliveryZipCode", max_length=10, min_length=1)
    ]
    dropship: Optional[bool] = None
    id: Optional[int] = None
    internal_reference: Annotated[
        Optional[str], Field(None, alias="internalReference", max_length=50)
    ]
    language_code: Annotated[
        Optional[str], Field(None, alias="languageCode", max_length=3)
    ]
    manually_completed: Annotated[
        Optional[bool], Field(None, alias="manuallyCompleted")
    ]
    message_to_supplier: Annotated[
        Optional[str], Field(None, alias="messageToSupplier", max_length=1000)
    ]
    note: Annotated[Optional[str], Field(None, max_length=1000)]
    order_date: Annotated[date, Field(alias="orderDate")]
    order_value: Annotated[Optional[float], Field(None, alias="orderValue")]
    order_value_in_sek: Annotated[Optional[float], Field(None, alias="orderValueInSEK")]
    our_reference: Annotated[
        Optional[str], Field(None, alias="ourReference", max_length=50)
    ]
    outbound_document_reference: Annotated[
        Optional[WarehouseDocumentReference],
        Field(None, alias="outboundDocumentReference"),
    ]
    payment_terms_code: Annotated[str, Field(alias="paymentTermsCode", max_length=20)]
    project_id: Annotated[Optional[str], Field(None, alias="projectId", max_length=25)]
    purchase_order_state: Annotated[
        Optional[PurchaseOrderState], Field(None, alias="purchaseOrderState")
    ]
    purchase_type: Annotated[Optional[PurchaseType], Field(None, alias="purchaseType")]
    response_state: Annotated[
        Optional[ResponseState], Field(None, alias="responseState")
    ]
    rows: Optional[Sequence[WarehousePurchaseOrderRow]] = None
    stock_point_code: Annotated[Optional[str], Field(None, alias="stockPointCode")]
    stock_point_id: Annotated[Optional[UUID], Field(None, alias="stockPointId")]
    supplier: Optional[str] = None
    supplier_address: Annotated[
        Optional[str], Field(None, alias="supplierAddress", max_length=1024)
    ]
    supplier_address2: Annotated[
        Optional[str], Field(None, alias="supplierAddress2", max_length=1024)
    ]
    supplier_city: Annotated[
        Optional[str], Field(None, alias="supplierCity", max_length=1024)
    ]
    supplier_country_code: Annotated[
        Optional[str], Field(None, alias="supplierCountryCode", max_length=3)
    ]
    supplier_email: Annotated[
        Optional[str], Field(None, alias="supplierEmail", max_length=100)
    ]
    supplier_name: Annotated[
        Optional[str], Field(None, alias="supplierName", max_length=1024)
    ]
    supplier_number: Annotated[str, Field(alias="supplierNumber", max_length=1024)]
    supplier_post_code: Annotated[
        Optional[str], Field(None, alias="supplierPostCode", max_length=1024)
    ]
    total_received_quantity: Annotated[
        Optional[float], Field(None, alias="totalReceivedQuantity")
    ]
    translated_response_state: Annotated[
        Optional[str], Field(None, alias="translatedResponseState")
    ]
    voided: Optional[bool] = None
    your_reference: Annotated[
        Optional[str], Field(None, alias="yourReference", max_length=50)
    ]
