UNPKG

@vercel/sdk

Version:

<p align="center"> <a href="https://vercel.com"> <img src="https://assets.vercel.com/image/upload/v1588805858/repositories/vercel/logo.png" height="96"> <h3 align="center">Vercel</h3> </a> <p align="center">Develop. Preview. Ship.</p> </p>

31 lines (28 loc) 1.16 kB
/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { billingBuyCredits } from "../funcs/billingBuyCredits.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import { BuyCreditsRequest, BuyCreditsResponseBody, } from "../models/buycreditsop.js"; import { unwrapAsync } from "../types/fp.js"; export class Billing extends ClientSDK { /** * Purchase credits * * @remarks * Purchases credits for a Vercel team using the default payment method on file. The purchase is charged immediately via Stripe invoice. Supported credit types are `v0`, `gateway`, and `agent`. The `amount` field specifies the number of credits to purchase and must be a positive integer. An optional `source` query parameter can be provided to identify the caller. Defaults to `api` if not specified. This is only available for Owner, Member, Developer, Security, and Billing roles for the supplied team. */ async buyCredits( request: BuyCreditsRequest, options?: RequestOptions, ): Promise<BuyCreditsResponseBody> { return unwrapAsync(billingBuyCredits( this, request, options, )); } }