# This file was auto-generated by Fern from our API Definition.

import typing

import pydantic
import typing_extensions
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ...core.serialization import FieldMetadata
from ...money_out_types.types.authorize_payment_method import AuthorizePaymentMethod
from .payout_payment_detail import PayoutPaymentDetail
from .payout_schedule_detail import PayoutScheduleDetail
from .payout_set_pause import PayoutSetPause


class UpdatePayoutSubscriptionBody(UniversalBaseModel):
    set_pause: typing_extensions.Annotated[
        typing.Optional[PayoutSetPause], FieldMetadata(alias="setPause"), pydantic.Field(alias="setPause")
    ] = None
    payment_details: typing_extensions.Annotated[
        typing.Optional[PayoutPaymentDetail],
        FieldMetadata(alias="paymentDetails"),
        pydantic.Field(alias="paymentDetails", description="Object describing details of the payout."),
    ] = None
    payment_method: typing_extensions.Annotated[
        typing.Optional[AuthorizePaymentMethod],
        FieldMetadata(alias="paymentMethod"),
        pydantic.Field(alias="paymentMethod"),
    ] = None
    schedule_details: typing_extensions.Annotated[
        typing.Optional[PayoutScheduleDetail],
        FieldMetadata(alias="scheduleDetails"),
        pydantic.Field(
            alias="scheduleDetails", description="Object describing the schedule for the payout subscription."
        ),
    ] = None

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
