import { IOrderItem } from '../../merchant'; import { IClosedPaymentParams, IClosedTransaction, IClosedTransactionDetail } from './closed-transaction.interface'; import { TransactionOptions } from '../transaction.interface'; /** * Represents a closed transaction. */ export declare class ClosedTransaction { /** * HTTP Request */ private request; /** * The private key for authentication. */ private privateKey; /** * The merchant code for identification. */ private merchantCode; /** * Order items */ private orderItems; /** * Creates an instance of ClosedTransaction. * * @param {TransactionOptions} options - The transaction options. */ constructor(options: TransactionOptions); /** * Adds an order item to the transaction. * * @param {IOrderItem} orderItem - The order item to add. * @returns The updated ClosedTransaction instance. */ addOrderItem(orderItem: IOrderItem): ClosedTransaction; /** * Adds multiple order items to the transaction. * * @param {IOrderItem[]} orderItems - The order items to add. * @returns The updated ClosedTransaction instance. */ addOrderItems(orderItems: IOrderItem[]): ClosedTransaction; /** * Creating a new transaction or generating a payment code. * * @param params - The payment parameters. * @returns A promise that resolves to the created closed transaction. * @throws {TripayError} Throws an error if failed to create the transaction. * @see [Create Closed Payment - Tripay](https://tripay.co.id/developer?tab=transaction-create) */ create(params: IClosedPaymentParams): Promise; /** * Fetching the details of a previously made transaction. * It can also be used to check the payment status. * * @param reference - The reference of the transaction. * @returns A promise that resolves to the details of the closed transaction. * @throws {TripayError} Throws an error if failed to retrieve the transaction. * @see [Detail Closed Transaction - Tripay](https://tripay.co.id/developer?tab=transaction-detail) */ detail(reference: string): Promise; }