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

from __future__ import annotations
from .customerorderconfirmpayment import (
    CustomerOrderConfirmPayment,
    CustomerOrderConfirmPaymentTypedDict,
)
from polar_sdk.types import BaseModel
from polar_sdk.utils import (
    FieldMetadata,
    PathParamMetadata,
    RequestMetadata,
    SecurityMetadata,
)
from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class CustomerPortalOrdersConfirmRetryPaymentSecurityTypedDict(TypedDict):
    customer_session: NotRequired[str]
    member_session: NotRequired[str]


class CustomerPortalOrdersConfirmRetryPaymentSecurity(BaseModel):
    customer_session: Annotated[
        Optional[str],
        FieldMetadata(
            security=SecurityMetadata(
                scheme=True,
                scheme_type="http",
                sub_type="bearer",
                field_name="Authorization",
            )
        ),
    ] = None

    member_session: Annotated[
        Optional[str],
        FieldMetadata(
            security=SecurityMetadata(
                scheme=True,
                scheme_type="http",
                sub_type="bearer",
                field_name="Authorization",
            )
        ),
    ] = None


class CustomerPortalOrdersConfirmRetryPaymentRequestTypedDict(TypedDict):
    id: str
    r"""The order ID."""
    customer_order_confirm_payment: CustomerOrderConfirmPaymentTypedDict


class CustomerPortalOrdersConfirmRetryPaymentRequest(BaseModel):
    id: Annotated[
        str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
    ]
    r"""The order ID."""

    customer_order_confirm_payment: Annotated[
        CustomerOrderConfirmPayment,
        FieldMetadata(request=RequestMetadata(media_type="application/json")),
    ]
