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

from __future__ import annotations
from .issuedcardauthorizationeventresult import IssuedCardAuthorizationEventResult
from .issuedcardeventtype import IssuedCardEventType
from datetime import datetime
from moovio_sdk.types import BaseModel
import pydantic
from typing_extensions import Annotated, TypedDict


class IssuedCardAuthorizationEventTypedDict(TypedDict):
    event_id: str
    r"""The identifier for this event. Use the `eventType` field to determine what resource is identified by this ID (`authorization`, `reversal`, etc.)."""
    event_type: IssuedCardEventType
    r"""The type of event that occurred on the card."""
    amount: str
    r"""A decimal-formatted numerical string that represents up to 2 decimal place precision. In USD for example, 12.34 is $12.34 and 0.99 is $0.99."""
    result: IssuedCardAuthorizationEventResult
    r"""The result of an event."""
    created_on: datetime


class IssuedCardAuthorizationEvent(BaseModel):
    event_id: Annotated[str, pydantic.Field(alias="eventID")]
    r"""The identifier for this event. Use the `eventType` field to determine what resource is identified by this ID (`authorization`, `reversal`, etc.)."""

    event_type: Annotated[IssuedCardEventType, pydantic.Field(alias="eventType")]
    r"""The type of event that occurred on the card."""

    amount: str
    r"""A decimal-formatted numerical string that represents up to 2 decimal place precision. In USD for example, 12.34 is $12.34 and 0.99 is $0.99."""

    result: IssuedCardAuthorizationEventResult
    r"""The result of an event."""

    created_on: Annotated[datetime, pydantic.Field(alias="createdOn")]


try:
    IssuedCardAuthorizationEvent.model_rebuild()
except NameError:
    pass
