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

from ..core.unchecked_base_model import UncheckedBaseModel
from .money import Money
import pydantic
import typing
from ..core.pydantic_utilities import IS_PYDANTIC_V2


class GiftCardActivityUnlinkedActivityRefund(UncheckedBaseModel):
    """
    Represents details about an `UNLINKED_ACTIVITY_REFUND` [gift card activity type](entity:GiftCardActivityType).
    """

    amount_money: Money = pydantic.Field()
    """
    The amount added to the gift card for the refund. This value is a positive integer.
    """

    reference_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    A client-specified ID that associates the gift card activity with an entity in another system.
    """

    payment_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    The ID of the refunded payment. This field is not used starting in Square version 2022-06-16.
    """

    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
