mercadopago
Version:
Mercadopago SDK for Node.js
53 lines (52 loc) • 2.54 kB
TypeScript
/**
* Merchant Order client for the MercadoPago API.
*
* Provides methods to create, retrieve, update, and search merchant orders.
* A merchant order groups multiple payments, items, and shipments under
* a single order entity, typically originating from a checkout preference.
*
* @module merchantOrder
*/
import type { MercadoPagoConfig } from '../../mercadoPagoConfig';
import type { MerchantOrderResponse } from './commonTypes';
import type { MerchantOrderCreateData } from './create/types';
import type { MerchantOrderUpdateData } from './update/types';
import type { MerchantOrderSearchData, MerchantOrderSearchResultsPage } from './search/types';
import type { MerchantOrderGetData } from './get/types';
/**
* Client facade for MercadoPago Merchant Order operations.
*
* Use this class to manage orders that aggregate payments, items, and
* shipments originating from checkout preferences or marketplace flows.
*
* @see {@link https://www.mercadopago.com/developers/en/reference/online-payments/checkout-pro/merchant_orders/get-merchant-order/get Documentation }.
*/
export declare class MerchantOrder {
/** SDK configuration providing credentials and HTTP options. */
private config;
constructor(mercadoPagoConfig: MercadoPagoConfig);
/**
* Create a new merchant order.
*
* @see {@link https://github.com/mercadopago/sdk-nodejs/blob/master/src/examples/merchantOrder/create.ts Usage Example }.
*/
create({ body, requestOptions }: MerchantOrderCreateData): Promise<MerchantOrderResponse>;
/**
* Retrieve a merchant order by its ID.
*
* @see {@link https://github.com/mercadopago/sdk-nodejs/blob/master/src/examples/merchantOrder/get.ts Usage Example }.
*/
get({ merchantOrderId, requestOptions }: MerchantOrderGetData): Promise<MerchantOrderResponse>;
/**
* Update an existing merchant order (items, shipments, notification URL, etc.).
*
* @see {@link https://github.com/mercadopago/sdk-nodejs/blob/master/src/examples/merchantOrder/update.ts Usage Example }.
*/
update({ merchantOrderId, body, requestOptions }: MerchantOrderUpdateData): Promise<MerchantOrderResponse>;
/**
* Search merchant orders with optional filters such as status, payer, or date range.
*
* @see {@link https://github.com/mercadopago/sdk-nodejs/blob/master/src/examples/merchantOrder/search.ts Usage Example }.
*/
search(merchantOrderSearchOptions?: MerchantOrderSearchData): Promise<MerchantOrderSearchResultsPage>;
}