# 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 .odp_setup_processing_region import OdpSetupProcessingRegion


class OdpSetup(UniversalBaseModel):
    allow_ach: typing_extensions.Annotated[
        typing.Optional[bool],
        FieldMetadata(alias="allowAch"),
        pydantic.Field(alias="allowAch", description="Enables or disables ACH payout functionality"),
    ] = None
    allow_checks: typing_extensions.Annotated[
        typing.Optional[bool],
        FieldMetadata(alias="allowChecks"),
        pydantic.Field(alias="allowChecks", description="Enables or disables check printing payout functionality"),
    ] = None
    allow_v_card: typing_extensions.Annotated[
        typing.Optional[bool],
        FieldMetadata(alias="allowVCard"),
        pydantic.Field(alias="allowVCard", description="Enables or disables vCard payout functionality"),
    ] = None
    processing_region: typing.Optional[OdpSetupProcessingRegion] = pydantic.Field(default=None)
    """
    Region where payment processing occurs
    """

    processor: typing.Optional[str] = pydantic.Field(default=None)
    """
    Payment processor identifier
    """

    issuer_network_settings_id: typing_extensions.Annotated[
        typing.Optional[str],
        FieldMetadata(alias="issuerNetworkSettingsId"),
        pydantic.Field(
            alias="issuerNetworkSettingsId", description="Reference ID for the program enabled for ODP issuance"
        ),
    ] = 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
