import type { Transaction } from './Transaction'; import type { FailureReason } from './FailureReason'; import type { RefundType } from './RefundType'; import type { Label } from './Label'; import type { Environment } from './Environment'; import type { LineItem } from './LineItem'; import type { Tax } from './Tax'; import type { LineItemReduction } from './LineItemReduction'; import type { RefundState } from './RefundState'; /** * A refund is a credit issued to the customer, which can be initiated either by the merchant or by the customer as a reversal. * @export * @interface Refund */ export interface Refund { /** * The total amount settled for the refund, factoring in reductions, taxes, and any additional applied fees. * @type {number} * @memberof Refund */ readonly totalSettledAmount?: number; /** * The reductions applied on the original transaction items, detailing specific adjustments associated with the refund. * @type {Array} * @memberof Refund */ readonly reductions?: Array; /** * The original base line items from the transaction prior to the refund, serving as a reference for the refunded amounts. * @type {Array} * @memberof Refund */ readonly baseLineItems?: Array; /** * The date and time when the processing of the refund was started. * @type {Date} * @memberof Refund */ readonly processingOn?: Date; /** * The tax breakdown applied to the refund amount, helping with tax calculations or reporting. * @type {Set} * @memberof Refund */ readonly taxes?: Set; /** * The language that is linked to the object. * @type {string} * @memberof Refund */ readonly language?: string; /** * * @type {RefundType} * @memberof Refund */ type?: RefundType; /** * The date and time when the object was created. * @type {Date} * @memberof Refund */ readonly createdOn?: Date; /** * The line items included in the refund, representing the reductions. * @type {Array} * @memberof Refund */ readonly lineItems?: Array; /** * Allow to store additional information about the object. * @type {{ [key: string]: string; }} * @memberof Refund */ readonly metaData?: { [key: string]: string; }; /** * The date and time when the refund succeeded. * @type {Date} * @memberof Refund */ readonly succeededOn?: Date; /** * The line items from the original transaction, adjusted to reflect any reductions applied during the refund process. * @type {Array} * @memberof Refund */ readonly reducedLineItems?: Array; /** * A unique identifier for the object. * @type {number} * @memberof Refund */ readonly id?: number; /** * * @type {RefundState} * @memberof Refund */ state?: RefundState; /** * The merchant's reference used to identify the refund. * @type {string} * @memberof Refund */ readonly merchantReference?: string; /** * The transaction completion that the refund belongs to. * @type {number} * @memberof Refund */ readonly completion?: number; /** * The total monetary amount of the refund, representing the exact credit issued to the customer. * @type {number} * @memberof Refund */ readonly amount?: number; /** * The date and time when the object is planned to be permanently removed. If the value is empty, the object will not be removed. * @type {Date} * @memberof Refund */ readonly plannedPurgeDate?: Date; /** * A client-generated nonce which uniquely identifies some action to be executed. Subsequent requests with the same external ID do not execute the action again, but return the original result. * @type {string} * @memberof Refund */ readonly externalId?: string; /** * The time zone that this object is associated with. * @type {string} * @memberof Refund */ readonly timeZone?: string; /** * The version is used for optimistic locking and incremented whenever the object is updated. * @type {number} * @memberof Refund */ readonly version?: number; /** * The labels providing additional information about the object. * @type {Set