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

from __future__ import annotations
from ascend_sdk import utils
from ascend_sdk.types import BaseModel
from ascend_sdk.utils import validate_open_enum
from enum import Enum
from pydantic.functional_validators import PlainValidator
from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class TaxProfileUpdateFederalTaxClassification(str, Enum, metaclass=utils.OpenEnumMeta):
    r"""Federal tax classification."""

    FEDERAL_TAX_CLASSIFICATION_UNSPECIFIED = "FEDERAL_TAX_CLASSIFICATION_UNSPECIFIED"
    INDIV_SOLEPROP_OR_SINGLEMEMBERLLC = "INDIV_SOLEPROP_OR_SINGLEMEMBERLLC"
    PARTNERSHIP = "PARTNERSHIP"
    C_CORPORATION = "C_CORPORATION"
    S_CORPORATION = "S_CORPORATION"
    TRUST_ESTATE = "TRUST_ESTATE"
    LLC_TAXED_AS_C_CORP = "LLC_TAXED_AS_C_CORP"
    LLC_TAXED_AS_S_CORP = "LLC_TAXED_AS_S_CORP"
    LLC_TAXED_AS_PARTNERSHIP = "LLC_TAXED_AS_PARTNERSHIP"
    OTHER = "OTHER"


class TaxProfileUpdateIrsFormType(str, Enum, metaclass=utils.OpenEnumMeta):
    r"""IRS form type."""

    IRS_FORM_TYPE_UNSPECIFIED = "IRS_FORM_TYPE_UNSPECIFIED"
    W_9 = "W_9"


class TaxProfileUpdateUsTinStatus(str, Enum, metaclass=utils.OpenEnumMeta):
    r"""United States Individual Taxpayer Identification Number (ITIN) status."""

    US_TIN_STATUS_UNSPECIFIED = "US_TIN_STATUS_UNSPECIFIED"
    PASSING = "PASSING"
    FAILING = "FAILING"


class TaxProfileUpdateTypedDict(TypedDict):
    r"""Tax Profile pertaining to the Legal Entity or Natural Person."""

    federal_tax_classification: NotRequired[TaxProfileUpdateFederalTaxClassification]
    r"""Federal tax classification."""
    irs_form_type: NotRequired[TaxProfileUpdateIrsFormType]
    r"""IRS form type."""
    legal_tax_region_code: NotRequired[str]
    r"""Legal tax region must be \"US\" if provided W-9, otherwise must be a non-US country."""
    us_tin_status: NotRequired[TaxProfileUpdateUsTinStatus]
    r"""United States Individual Taxpayer Identification Number (ITIN) status."""


class TaxProfileUpdate(BaseModel):
    r"""Tax Profile pertaining to the Legal Entity or Natural Person."""

    federal_tax_classification: Annotated[
        Optional[TaxProfileUpdateFederalTaxClassification],
        PlainValidator(validate_open_enum(False)),
    ] = None
    r"""Federal tax classification."""

    irs_form_type: Annotated[
        Optional[TaxProfileUpdateIrsFormType], PlainValidator(validate_open_enum(False))
    ] = None
    r"""IRS form type."""

    legal_tax_region_code: Optional[str] = None
    r"""Legal tax region must be \"US\" if provided W-9, otherwise must be a non-US country."""

    us_tin_status: Annotated[
        Optional[TaxProfileUpdateUsTinStatus], PlainValidator(validate_open_enum(False))
    ] = None
    r"""United States Individual Taxpayer Identification Number (ITIN) status."""
