import { ApiClientInterface } from '../ApiClient.ts'; import { Order } from './Order.ts'; import { OrderCreateOptions } from './CreateOrderOptions.ts'; import { PaymentMethod } from './Payment.ts'; import { CreateProduct } from './Product.ts'; import { DeprecatedTransaction } from '../transaction/DeprecatedTransaction.ts'; export declare class OrderApi { private readonly apiClient; constructor(apiClient: ApiClientInterface); /** * Create an order on this TGU. An order represents the total order as it exists in your shop and can be fulfilled through one or more payments. * * Once you have created an order, you should redirect the user to the URL in the `links.redirect` object. * * @see https://developer.pay.nl/reference/api_create_order-1 */ create(options: OrderCreateOptions): Promise; /** * Retrieve the current status of an order along with its corresponding payment attempts. * * @see https://developer.pay.nl/reference/api_get_status-1 * @see https://developer.pay.nl/reference/get_transactions-transactionid */ get(orderId: string): Promise; /** * Retrieve the current status of an order along with its corresponding payment attempts. * * @see https://developer.pay.nl/reference/api_get_status-1 */ status(orderId: string): Promise; /** * Update an order with a reference and/or description. This action is only allowed available for orders of the type * 'payment_based_checkout' and only if the value to update is currently not set. * * @see https://developer.pay.nl/reference/api_update_order-1 */ update(orderId: string, reference?: string, description?: string): Promise; /** * Approve an order that is flagged for a risk check by the Verify module, continuing the regular order flow. * * @see https://developer.pay.nl/reference/api_approve_order-1 */ approve(orderId: string): Promise; /** * Decline an order that is flagged for a risk check by the Verify module, refunding all payments made on this order. * * @see https://developer.pay.nl/reference/api_decline_order-1 */ decline(orderId: string): Promise; /** * Capture an order that has an active reservation (Status 95). Reservations are commonly used for CreditCard and * Buy now, Pay later payments. By using this API, the entire order will be captured. * * @see https://developer.pay.nl/reference/api_capture_order-1 */ capture(orderId: string): Promise; /** * Capture a specific amount on an order that has an active reservation (Status 95). Reservations are commonly used * for CreditCard and Buy now, Pay later payments. With this API, you can capture a specific amount from the order * while the reservation remains active. * * @see https://developer.pay.nl/reference/api_capture_amount-1 */ captureWithAmount(orderId: string, amountInCents: number): Promise; /** * Capture an order that has an active reservation (Status 95). Reservations are commonly used for CreditCard and * Buy now, Pay later payments. By using this API, the entire order will be captured. * * @see https://developer.pay.nl/reference/api_capture_products-1 */ captureWithProducts(orderId: string, products: CreateProduct[]): Promise; /** * Append a new payment based on an existing pending order. When the summed amount of all completed payments reaches * the order amount, the order will be completed. * * @see https://developer.pay.nl/reference/api_create_order_payment */ payment(orderId: string, paymentMethod: PaymentMethod): Promise; /** * Cancel an order with an active reservation (Status 95), voiding all payments made for that order as well. * * @see https://developer.pay.nl/reference/api_void_order-1 */ void(orderId: string): Promise; /** * Abort an order, halting the regular order flow and voiding any payment attempts made to fulfill this order. * * @see https://developer.pay.nl/reference/api_abort_order-1 */ abort(orderId: string): Promise; /** * Refund an order, with an optional amount. If no amount is specified, the full order amount will be refunded. * * @see https://developer.pay.nl/reference/patch_transactions-transactionid-refund */ refund(orderId: string, amountInCents?: number): Promise; }