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

from __future__ import annotations
from .company_bank_account import CompanyBankAccount, CompanyBankAccountTypedDict
from .versionheader import VersionHeader
from enum import Enum
from gusto_embedded.types import BaseModel
from gusto_embedded.utils import FieldMetadata, HeaderMetadata, RequestMetadata
import pydantic
from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class OwnerType(str, Enum):
    r"""The owner type of the bank account"""

    COMPANY = "Company"


class PostV1PlaidProcessorTokenRequestBodyTypedDict(TypedDict):
    owner_type: OwnerType
    r"""The owner type of the bank account"""
    owner_id: str
    r"""The owner UUID of the bank account"""
    processor_token: str
    r"""The Plaid processor token"""


class PostV1PlaidProcessorTokenRequestBody(BaseModel):
    owner_type: OwnerType
    r"""The owner type of the bank account"""

    owner_id: str
    r"""The owner UUID of the bank account"""

    processor_token: str
    r"""The Plaid processor token"""


class PostV1PlaidProcessorTokenRequestTypedDict(TypedDict):
    request_body: PostV1PlaidProcessorTokenRequestBodyTypedDict
    x_gusto_api_version: NotRequired[VersionHeader]
    r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used."""


class PostV1PlaidProcessorTokenRequest(BaseModel):
    request_body: Annotated[
        PostV1PlaidProcessorTokenRequestBody,
        FieldMetadata(request=RequestMetadata(media_type="application/json")),
    ]

    x_gusto_api_version: Annotated[
        Optional[VersionHeader],
        pydantic.Field(alias="X-Gusto-API-Version"),
        FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
    ] = VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_04_01
    r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used."""


PostV1PlaidProcessorTokenResponseBodyTypedDict = CompanyBankAccountTypedDict
r"""A JSON object containing bank information"""


PostV1PlaidProcessorTokenResponseBody = CompanyBankAccount
r"""A JSON object containing bank information"""
