UNPKG

@mollie/api-client

Version:
55 lines (54 loc) 2.08 kB
import type TransformingNetworkClient from '../../communication/TransformingNetworkClient'; import type HelpfulIterator from '../../plumbing/iteration/HelpfulIterator'; import type Callback from '../../types/Callback'; import type Nullable from '../../types/Nullable'; import { type ThrottlingParameter } from '../../types/parameters'; import Helper from '../Helper'; import type Chargeback from '../chargebacks/Chargeback'; import type Method from '../methods/Method'; import type Payment from '../payments/Payment'; import type Refund from '../refunds/Refund'; import type Profile from './Profile'; import { type ProfileData } from './data'; export default class ProfileHelper extends Helper<ProfileData, Profile> { protected readonly links: ProfileData['_links']; constructor(networkClient: TransformingNetworkClient, links: ProfileData['_links']); /** * Link to the profile in the Mollie dashboard. * * @since 4.6.0 * @see https://docs.mollie.com/reference/get-profile?path=_links/dashboard#response */ getDashboardUrl(): Nullable<string>; /** * The Checkout preview URL. You need to be logged in to access this page. * * @see https://docs.mollie.com/reference/get-profile?path=_links/checkoutPreviewUrl#response */ getCheckoutPreviewUrl(): Nullable<string>; /** * Returns the chargebacks that belong to this profile. * * @since 3.6.0 */ getChargebacks(parameters?: ThrottlingParameter): HelpfulIterator<Chargeback>; /** * Returns the methods that are enabled for this profile. * * @since 3.6.0 */ getMethods(): Promise<Array<Method>>; getMethods(callback: Callback<Array<Method>>): void; /** * Returns the payments that belong to this profile. * * @since 3.6.0 */ getPayments(parameters?: ThrottlingParameter): HelpfulIterator<Payment>; /** * Returns the refunds that belong to this profile. * * @since 3.6.0 */ getRefunds(parameters?: ThrottlingParameter): HelpfulIterator<Refund>; }