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

from __future__ import annotations
from datetime import datetime
from paygentic_sdk.types import BaseModel
import pydantic
from typing import Literal
from typing_extensions import Annotated, TypedDict


SubscriptionPortalObject = Literal["subscriptionPortal",]


class SubscriptionPortalTypedDict(TypedDict):
    object: SubscriptionPortalObject
    expires_at: datetime
    r"""Portal link expiration timestamp in ISO 8601 format. Sample values: '2024-01-15T23:59:59Z', '2024-02-01T12:00:00Z'"""
    url: str
    r"""Secure portal access URL for customer subscription management. Sample values: 'https://portal.paygentic.com/sub/abc123?token=xyz789', 'https://customer.example.com/portal/sub_456def'"""


class SubscriptionPortal(BaseModel):
    object: SubscriptionPortalObject

    expires_at: Annotated[datetime, pydantic.Field(alias="expiresAt")]
    r"""Portal link expiration timestamp in ISO 8601 format. Sample values: '2024-01-15T23:59:59Z', '2024-02-01T12:00:00Z'"""

    url: str
    r"""Secure portal access URL for customer subscription management. Sample values: 'https://portal.paygentic.com/sub/abc123?token=xyz789', 'https://customer.example.com/portal/sub_456def'"""


try:
    SubscriptionPortal.model_rebuild()
except NameError:
    pass
