UNPKG

@mollie/api-client

Version:
28 lines (27 loc) 1.79 kB
import type TransformingNetworkClient from '../../communication/TransformingNetworkClient'; import type Page from '../../data/page/Page'; import { type SubscriptionData } from '../../data/subscriptions/data'; import type Subscription from '../../data/subscriptions/Subscription'; import type Callback from '../../types/Callback'; import Binder from '../Binder'; import { type IterateParameters, type PageParameters } from './parameters'; export default class SubscriptionsBinder extends Binder<SubscriptionData, Subscription> { protected readonly networkClient: TransformingNetworkClient; constructor(networkClient: TransformingNetworkClient); /** * Retrieve all subscriptions, ordered from newest to oldest. By using an API key all the subscriptions created with the current website profile will be returned. In the case of an OAuth Access * Token relies the website profile on the `profileId` field. All subscriptions of the merchant will be returned if you do not provide it. * * @since 3.2.0 (as `list`) * @see https://docs.mollie.com/reference/v2/subscriptions-api/list-all-subscriptions */ page(parameters?: PageParameters): Promise<Page<Subscription>>; page(parameters: PageParameters, callback: Callback<Page<Subscription>>): void; /** * Retrieve all subscriptions, ordered from newest to oldest. By using an API key all the subscriptions created with the current website profile will be returned. In the case of an OAuth Access * Token relies the website profile on the `profileId` field. All subscriptions of the merchant will be returned if you do not provide it. * * @since 3.6.0 */ iterate(parameters?: IterateParameters): import("../../plumbing/iteration/HelpfulIterator").default<Subscription>; }