/** * This file was auto-generated by Fern from our API Definition. */ import * as environments from "../../../../environments"; import * as core from "../../../../core"; import * as Abound from "../../../index"; export declare namespace FormW8Ben { interface Options { environment?: core.Supplier; /** Specify a custom URL to connect the client to. */ baseUrl?: core.Supplier; apiKey: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Additional headers to include in the request. */ headers?: Record; } } export declare class FormW8Ben { protected readonly _options: FormW8Ben.Options; constructor(_options: FormW8Ben.Options); /** * Returns a list of W-8BEN documents. * * @param {Abound.FormW8BenListRequest} request * @param {FormW8Ben.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Abound.types.BadRequestErrorSchema} * @throws {@link Abound.types.UnauthorizedErrorSchema} * @throws {@link Abound.types.NotFoundErrorSchema} * @throws {@link Abound.types.InternalServerErrorSchema} * * @example * await client.formW8Ben.list() */ list(request?: Abound.FormW8BenListRequest, requestOptions?: FormW8Ben.RequestOptions): Promise; /** * Creates a W-8BEN document and, if present, subsequently kicks off a TIN Verification. A TIN Verification will only kickoff if the name and TIN combo has not been seen before. * * @param {Abound.W8BenRequestSchema} request * @param {FormW8Ben.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Abound.types.BadRequestErrorSchema} * @throws {@link Abound.types.UnauthorizedErrorSchema} * @throws {@link Abound.types.NotFoundErrorSchema} * @throws {@link Abound.types.InternalServerErrorSchema} * * @example * await client.formW8Ben.create({ * payee: { * name: "Ada Lovelace", * citizenshipCountry: "GB", * tin: "000000000", * foreignTin: "DQ123456C", * dateOfBirth: "1982-12-10", * permanentResidenceAddress: { * address: "43 Hilly Fields", * address2: "Suite 32", * city: "Lewisham", * state: "London", * postalCode: "SE13 7JN", * country: "GB" * }, * mailingAddress: { * address: "256 Byron Street", * address2: "Suite 32", * city: "Palo Alto", * postalCode: "94306", * state: "CA", * country: "US" * } * }, * formFields: { * isForeignTinNotRequired: false, * taxTreatyCode: "GB_17_INDEPENDENT_PERSONAL_SERVICES", * referenceNumbers: ["123456789"], * isCertified: true, * electronicSignature: { * signature: "Ada Lovelace", * printedName: "Ada Lovelace", * signedAt: "2024-01-01T00:00:00.000Z", * ipAddress: "127.0.0.1" * } * } * }) */ create(request: Abound.W8BenRequestSchema, requestOptions?: FormW8Ben.RequestOptions): Promise; /** * Retrieves the details of an existing W-8BEN document. * * @param {Abound.types.DocumentId} documentId * @param {FormW8Ben.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Abound.types.BadRequestErrorSchema} * @throws {@link Abound.types.UnauthorizedErrorSchema} * @throws {@link Abound.types.NotFoundErrorSchema} * @throws {@link Abound.types.InternalServerErrorSchema} * * @example * await client.formW8Ben.retrieve("documentId_samplexEM8PRV7sh") */ retrieve(documentId: Abound.types.DocumentId, requestOptions?: FormW8Ben.RequestOptions): Promise; protected _getAuthorizationHeader(): Promise; }