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

import typing_extensions
import typing_extensions
import typing


class WebhookSubscriptionParams(typing_extensions.TypedDict):
    """
    Represents the details of a webhook subscription, including notification URL,
    event types, and signature key.
    """

    id: typing_extensions.NotRequired[str]
    """
    A Square-generated unique ID for the subscription.
    """

    name: typing_extensions.NotRequired[typing.Optional[str]]
    """
    The name of this subscription.
    """

    enabled: typing_extensions.NotRequired[typing.Optional[bool]]
    """
    Indicates whether the subscription is enabled (`true`) or not (`false`).
    """

    event_types: typing_extensions.NotRequired[typing.Optional[typing.Sequence[str]]]
    """
    The event types associated with this subscription.
    """

    notification_url: typing_extensions.NotRequired[typing.Optional[str]]
    """
    The URL to which webhooks are sent.
    """

    api_version: typing_extensions.NotRequired[typing.Optional[str]]
    """
    The API version of the subscription.
    This field is optional for `CreateWebhookSubscription`. 
    The value defaults to the API version used by the application.
    """

    signature_key: typing_extensions.NotRequired[str]
    """
    The Square-generated signature key used to validate the origin of the webhook event.
    """

    created_at: typing_extensions.NotRequired[str]
    """
    The timestamp of when the subscription was created, in RFC 3339 format. For example, "2016-09-04T23:59:33.123Z".
    """

    updated_at: typing_extensions.NotRequired[str]
    """
    The timestamp of when the subscription was last updated, in RFC 3339 format.
    For example, "2016-09-04T23:59:33.123Z".
    """
