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

import datetime as dt
import typing

from ...core.datetime_utils import serialize_datetime
from .legal_structure_enum import LegalStructureEnum
from .trusted_user import TrustedUser
from .vertical_enum import VerticalEnum

try:
    import pydantic.v1 as pydantic  # type: ignore
except ImportError:
    import pydantic  # type: ignore


class RegisterRequest(pydantic.BaseModel):
    business_name: str = pydantic.Field(alias="businessName")
    """
    The legal name of your business.
    """

    ein: str = pydantic.Field()
    """
    Your Employer Identification Number.
    """

    vertical: VerticalEnum = pydantic.Field()
    """
    The industry vertical of your business.
    """

    address: str = pydantic.Field()
    """
    The business address.
    """

    city: str = pydantic.Field()
    """
    The city of your business.
    """

    state: str = pydantic.Field()
    """
    The state of your business. Must be a valid US state code.
    """

    postal_code: str = pydantic.Field(alias="postalCode")
    """
    The postal code of your business.
    """

    country: str = pydantic.Field()
    """
    The country of your business.
    """

    email: str = pydantic.Field()
    """
    The email address for your business.
    """

    type: LegalStructureEnum = pydantic.Field()
    """
    Legal structure of the business.
    """

    website: str = pydantic.Field()
    """
    Your business's website URL.
    """

    opt_in_info: str = pydantic.Field()
    """
    Information regarding opt-in procedures for your messaging service.
    
    EX: “Customers must explicitly consent on our website and during the phone call.”
    """

    message_samples: typing.List[str] = pydantic.Field(alias="messageSamples")
    """
    An array of three strings, each a sample message you plan to use.
    """

    trusted_user: TrustedUser = pydantic.Field()
    """
    An object containing details about the trusted user registering the brand.
    """

    def json(self, **kwargs: typing.Any) -> str:
        kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
        return super().json(**kwargs_with_defaults)

    def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
        kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
        return super().dict(**kwargs_with_defaults)

    class Config:
        frozen = True
        smart_union = True
        allow_population_by_field_name = True
        json_encoders = {dt.datetime: serialize_datetime}
