# This file was generated by liblab | https://liblab.com/

from __future__ import annotations
from .utils.json_map import JsonMap
from .base import BaseModel
from .invoice_status_enum import InvoiceStatusEnum


@JsonMap({"id_": "id"})
class DeelInvoice(BaseModel):
    """DeelInvoice

    :param id_: Unique identifier of the invoice.
    :type id_: str
    :param label: Label of the invoice.
    :type label: str
    :param status: Current status of the invoice.
    :type status: InvoiceStatusEnum
    :param currency: Currency code.
    :type currency: str
    :param total: Total invoice amount including Fee and VAT.
    :type total: str
    :param created_at: Long date-time format following ISO-8601
    :type created_at: str
    """

    def __init__(
        self,
        id_: str,
        label: str,
        status: InvoiceStatusEnum,
        currency: str,
        total: str,
        created_at: str,
    ):
        self.id_ = id_
        self.label = label
        self.status = self._enum_matching(status, InvoiceStatusEnum.list(), "status")
        self.currency = self._pattern_matching(currency, "^[A-Z]{3}$", "currency")
        self.total = total
        self.created_at = created_at
