from .client import post_request as post_request
from .model import MoneybirdModel as MoneybirdModel
from dataclasses import dataclass
from enum import Enum
from typing import Any, Self

class LinkBookingType(Enum):
    LedgerAccount = ...
    SalesInvoice = ...
    Document = ...
    PaymentTransactionBatch = ...
    PurchaseTransaction = ...
    NewPurchaseInvoice = ...
    NewReceipt = ...
    PaymentTransaction = ...
    PurchaseTransactionBatch = ...
    ExternalSalesInvoice = ...
    Payment = ...
    VatDocument = ...

class UnlinkBookingType(Enum):
    LedgerAccountBooking = ...
    Payment = ...

@dataclass
class FinancialMutation(MoneybirdModel):
    id: str | None = ...
    administration_id: str | None = ...
    amount: str | None = ...
    code: str | None = ...
    date: str | None = ...
    message: str | None = ...
    contra_account_name: str | None = ...
    contra_account_number: str | None = ...
    state: str | None = ...
    amount_open: str | None = ...
    sepa_fields: str | None = ...
    batch_reference: str | None = ...
    financial_account_id: str | None = ...
    currency: str | None = ...
    original_amount: str | None = ...
    created_at: str | None = ...
    updated_at: str | None = ...
    version: str | None = ...
    financial_statement_id: str | None = ...
    processed_at: str | None = ...
    account_servicer_transaction_id: str | None = ...
    payments: list = ...
    ledger_account_bookings: list = ...
    def save(self) -> None: ...
    def delete(self) -> None: ...
    def book_payment(self, price_base: float, booking_id: int, booking_type: LinkBookingType = ...) -> None: ...
    def remove_payment(self, booking_id: int, booking_type: UnlinkBookingType = ...) -> None: ...
    @classmethod
    def update_by_id(cls, id: int, data: dict[str, Any]) -> Self: ...
    @classmethod
    def delete_by_id(cls, id: int) -> Self: ...
    def __init__(self, id=..., administration_id=..., amount=..., code=..., date=..., message=..., contra_account_name=..., contra_account_number=..., state=..., amount_open=..., sepa_fields=..., batch_reference=..., financial_account_id=..., currency=..., original_amount=..., created_at=..., updated_at=..., version=..., financial_statement_id=..., processed_at=..., account_servicer_transaction_id=..., payments=..., ledger_account_bookings=...) -> None: ...
