@mollie/api-client
Version:
Official Mollie API client for Node
56 lines (55 loc) • 2.85 kB
TypeScript
import type TransformingNetworkClient from '../../communication/TransformingNetworkClient';
import type Page from '../../data/page/Page';
import { type SettlementData } from '../../data/settlements/data';
import type SettlementModel from '../../data/settlements/SettlementModel';
import type Callback from '../../types/Callback';
import Binder from '../Binder';
import { type IterateParameters, type PageParameters } from './parameters';
export default class SettlementsBinder extends Binder<SettlementData, SettlementModel> {
protected readonly networkClient: TransformingNetworkClient;
constructor(networkClient: TransformingNetworkClient);
/**
* Successful payments, together with refunds, captures and chargebacks are collected into *settlements*, which are then paid out according to your organization's payout schedule. By retrieving a
* single settlement, you can check which payments were paid out with it, when the settlement took place, and what invoices were created to invoice the costs in the settlement.
*
* Beside payments, settlements can be composed of other entities such as refunds, chargebacks or captures.
*
* @since 3.7.0
* @see https://docs.mollie.com/reference/v2/settlements-api/get-settlement
*/
get(id: string): Promise<SettlementModel>;
get(id: string, callback: Callback<SettlementModel>): void;
/**
* Retrieve the details of the current settlement that has not yet been paid out.
*
* @since 3.7.0
* @see https://docs.mollie.com/reference/v2/settlements-api/get-next-settlement
*/
getNext(): Promise<SettlementModel>;
getNext(callback: Callback<SettlementModel>): void;
/**
* Retrieve the details of the open balance of the organization. This will return a settlement object representing your organization's balance.
*
* @since 3.7.0
* @see https://docs.mollie.com/reference/v2/settlements-api/get-open-settlement
*/
getOpen(): Promise<SettlementModel>;
getOpen(callback: Callback<SettlementModel>): void;
/**
* Retrieve all payments links created with the current website profile, ordered from newest to oldest.
*
* The results are paginated. See pagination for more information.
*
* @since 3.7.0
* @see https://docs.mollie.com/reference/v2/payment-links-api/list-payment-links
*/
page(parameters?: PageParameters): Promise<Page<SettlementModel>>;
page(parameters: PageParameters, callback: Callback<Page<SettlementModel>>): void;
/**
* Retrieve a single payment link object by its token.
*
* @since 3.7.0
* @see https://docs.mollie.com/reference/v2/payment-links-api/get-payment-link
*/
iterate(parameters?: IterateParameters): import("../../plumbing/iteration/HelpfulIterator").default<SettlementModel>;
}