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

from __future__ import annotations
from openrouter.types import BaseModel, UnrecognizedInt
from openrouter.utils import validate_open_enum
from pydantic.functional_validators import PlainValidator
from typing import Literal, Union
from typing_extensions import Annotated, TypedDict


ChainID = Union[
    Literal[
        1,
        137,
        8453,
    ],
    UnrecognizedInt,
]


class CreateChargeRequestTypedDict(TypedDict):
    r"""Create a Coinbase charge for crypto payment"""

    amount: float
    sender: str
    chain_id: ChainID


class CreateChargeRequest(BaseModel):
    r"""Create a Coinbase charge for crypto payment"""

    amount: float

    sender: str

    chain_id: Annotated[ChainID, PlainValidator(validate_open_enum(True))]
