UNPKG

@vansite/ts-sharetribe-flex-sdk

Version:

This is a TypeScript SDK for Sharetribe Flex API. It reduces the complexity of the API and provides a more user-friendly interface.

38 lines (37 loc) 1.43 kB
/** * @fileoverview Client for creating Stripe Persons in the Sharetribe Marketplace API. * * A "Person" represents an individual associated with a Stripe Connect account * (e.g. owner, director, representative). Required for compliance in many countries. * * @see https://www.sharetribe.com/api-reference/marketplace.html#stripe-persons */ import type { AxiosResponse } from "axios"; import MarketplaceApi from "./index"; import { ExtraParameter, StripePersonsCreateParameter, StripePersonsResponse } from "../../types"; /** * Stripe Persons API client (current user) */ declare class StripePersons { readonly authRequired = true; private readonly axios; private readonly endpoint; private readonly headers; constructor(api: MarketplaceApi); /** * Create a new Person for the current user's Stripe Connect account * * @template P * @template EP * @param {P & StripePersonsCreateParameter} params * @param {EP} [extraParams] * @returns {Promise<AxiosResponse<StripePersonsResponse<"create">>>} * * @example * await sdk.stripePersons.create({ * personToken: "person_tok_1AbC2DeFGhiJkLMnOPqRsTuV" * }); */ create<P extends StripePersonsCreateParameter, EP extends ExtraParameter | undefined = undefined>(params: P, extraParams?: EP): Promise<AxiosResponse<StripePersonsResponse<"create">>>; } export default StripePersons;