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

import typing_extensions
import typing_extensions
import typing
from .money import MoneyParams
from ..types.refund_status import RefundStatus
from .additional_recipient import AdditionalRecipientParams


class RefundParams(typing_extensions.TypedDict):
    """
    Represents a refund processed for a Square transaction.
    """

    id: str
    """
    The refund's unique ID.
    """

    location_id: str
    """
    The ID of the refund's associated location.
    """

    transaction_id: typing_extensions.NotRequired[typing.Optional[str]]
    """
    The ID of the transaction that the refunded tender is part of.
    """

    tender_id: str
    """
    The ID of the refunded tender.
    """

    created_at: typing_extensions.NotRequired[str]
    """
    The timestamp for when the refund was created, in RFC 3339 format.
    """

    reason: str
    """
    The reason for the refund being issued.
    """

    amount_money: MoneyParams
    """
    The amount of money refunded to the buyer.
    """

    status: RefundStatus
    """
    The current status of the refund (`PENDING`, `APPROVED`, `REJECTED`,
    or `FAILED`).
    See [RefundStatus](#type-refundstatus) for possible values
    """

    processing_fee_money: typing_extensions.NotRequired[MoneyParams]
    """
    The amount of Square processing fee money refunded to the *merchant*.
    """

    additional_recipients: typing_extensions.NotRequired[typing.Optional[typing.Sequence[AdditionalRecipientParams]]]
    """
    Additional recipients (other than the merchant) receiving a portion of this refund.
    For example, fees assessed on a refund of a purchase by a third party integration.
    """
