UNPKG

@mollie/api-client

Version:
24 lines (23 loc) 1.23 kB
import type TransformingNetworkClient from '../../communication/TransformingNetworkClient'; import type ClientLink from '../../data/client-links/ClientLink'; import type Callback from '../../types/Callback'; import { type CreateParameters } from './parameters'; export default class ClientLinksBinder { protected readonly networkClient: TransformingNetworkClient; constructor(networkClient: TransformingNetworkClient); /** * Link a new or existing organization to your OAuth application, in effect creating a new client. * The response contains a `clientLink` where you should redirect your customer to. * * Note: Before redirecting the customer to the `clientLink` URL, you need to append the following * query parameters: `client_id`, `state`, `scope`, and optionally `approval_prompt`. * * A client link must be used within 30 days of creation. After that period, it will expire and * you will need to create a new client link. * * @since 4.4.0 * @see https://docs.mollie.com/reference/create-client-link */ create(parameters: CreateParameters): Promise<ClientLink>; create(parameters: CreateParameters, callback: Callback<ClientLink>): void; }