"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from __future__ import annotations
from .sales_invoice_discount_type_response import SalesInvoiceDiscountTypeResponse
from mollie.types import BaseModel
from mollie.utils import validate_open_enum
from pydantic.functional_validators import PlainValidator
from typing_extensions import Annotated, TypedDict


class SalesInvoiceDiscountResponseTypedDict(TypedDict):
    type: SalesInvoiceDiscountTypeResponse
    r"""The type of discount."""
    value: str
    r"""A string containing an exact monetary amount in the given currency, or the percentage."""


class SalesInvoiceDiscountResponse(BaseModel):
    type: Annotated[
        SalesInvoiceDiscountTypeResponse, PlainValidator(validate_open_enum(False))
    ]
    r"""The type of discount."""

    value: str
    r"""A string containing an exact monetary amount in the given currency, or the percentage."""
