import type * as Square from "../index"; /** * Represents a payment refund processed by the Square Terminal. Only supports Interac (Canadian debit network) payment refunds. */ export interface TerminalRefund { /** A unique ID for this `TerminalRefund`. */ id?: string; /** The reference to the payment refund created by completing this `TerminalRefund`. */ refundId?: string; /** The unique ID of the payment being refunded. */ paymentId: string; /** The reference to the Square order ID for the payment identified by the `payment_id`. */ orderId?: string; /** * The amount of money, inclusive of `tax_money`, that the `TerminalRefund` should return. * This value is limited to the amount taken in the original payment minus any completed or * pending refunds. */ amountMoney: Square.Money; /** A description of the reason for the refund. */ reason: string; /** * The unique ID of the device intended for this `TerminalRefund`. * The Id can be retrieved from /v2/devices api. */ deviceId: string; /** * The RFC 3339 duration, after which the refund is automatically canceled. * A `TerminalRefund` that is `PENDING` is automatically `CANCELED` and has a cancellation reason * of `TIMED_OUT`. * * Default: 5 minutes from creation. * * Maximum: 5 minutes */ deadlineDuration?: string | null; /** * The status of the `TerminalRefund`. * Options: `PENDING`, `IN_PROGRESS`, `CANCEL_REQUESTED`, `CANCELED`, or `COMPLETED`. */ status?: string; /** * Present if the status is `CANCELED`. * See [ActionCancelReason](#type-actioncancelreason) for possible values */ cancelReason?: Square.ActionCancelReason; /** The time when the `TerminalRefund` was created, as an RFC 3339 timestamp. */ createdAt?: string; /** The time when the `TerminalRefund` was last updated, as an RFC 3339 timestamp. */ updatedAt?: string; /** The ID of the application that created the refund. */ appId?: string; /** The location of the device where the `TerminalRefund` was directed. */ locationId?: string; }