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

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from ..core.unchecked_base_model import UncheckedBaseModel
from .error import Error
from .gift_card_activity import GiftCardActivity


class ListGiftCardActivitiesResponse(UncheckedBaseModel):
    """
    A response that contains a list of `GiftCardActivity` objects. If the request resulted in errors,
    the response contains a set of `Error` objects.
    """

    errors: typing.Optional[typing.List[Error]] = pydantic.Field(default=None)
    """
    Any errors that occurred during the request.
    """

    gift_card_activities: typing.Optional[typing.List[GiftCardActivity]] = pydantic.Field(default=None)
    """
    The requested gift card activities or an empty object if none are found.
    """

    cursor: typing.Optional[str] = pydantic.Field(default=None)
    """
    When a response is truncated, it includes a cursor that you can use in a
    subsequent request to retrieve the next set of activities. If a cursor is not present, this is
    the final response.
    For more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination).
    """

    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
