# 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 .notification_standard_request_content import NotificationStandardRequestContent
from .notification_standard_request_frequency import NotificationStandardRequestFrequency
from .notification_standard_request_method import NotificationStandardRequestMethod
from .ownerid import Ownerid
from .ownertype import Ownertype
from .statusnotification import Statusnotification


class NotificationStandardRequest(UniversalBaseModel):
    """
    Information about the standard notification configuration (email, sms, web).
    """

    content: typing.Optional[NotificationStandardRequestContent] = None
    frequency: NotificationStandardRequestFrequency
    method: NotificationStandardRequestMethod = pydantic.Field()
    """
    Get near-instant notifications via email, SMS, or webhooks for important events like new payment disputes, merchant activations, fraud alerts, approved transactions, settlement history, vendor payouts, and more. Use webhooks with notifications to get real-time updates and automate operations based on key those key events. See [Notifications](/developers/developer-guides/notifications-and-webhooks-overview#notifications) for more.
    """

    owner_id: typing_extensions.Annotated[typing.Optional[Ownerid], FieldMetadata(alias="ownerId")] = None
    owner_type: typing_extensions.Annotated[Ownertype, FieldMetadata(alias="ownerType")]
    status: typing.Optional[Statusnotification] = None
    target: str = pydantic.Field()
    """
    Specify the notification target.
    
    - For method=email the expected value is a list of email addresses separated by semicolon.
    - For method=sms the expected value is a list of phone numbers separated by semicolon.
    - For method=web the expected value is a valid and complete URL. Webhooks support only standard HTTP ports: 80, 443, 8080, or 4443.
    """

    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
