cloudflare/cloudflare-typescript

Public

mirrored fromhttps://github.com/cloudflare/cloudflare-typescriptAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
v3.0.0-beta.8

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

src/resources/billing/profiles.ts

24lines · modecode

1// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
3import * as Core from 'cloudflare/core';
4import { APIResource } from 'cloudflare/resource';
5import * as ProfilesAPI from 'cloudflare/resources/billing/profiles';
6
7export class Profiles extends APIResource {
8 /**
9 * Gets the current billing profile for the account.
10 */
11 get(accountIdentifier: unknown, options?: Core.RequestOptions): Core.APIPromise<ProfileGetResponse> {
12 return (
13 this._client.get(`/accounts/${accountIdentifier}/billing/profile`, options) as Core.APIPromise<{
14 result: ProfileGetResponse;
15 }>
16 )._thenUnwrap((obj) => obj.result);
17 }
18}
19
20export type ProfileGetResponse = unknown | string | null;
21
22export namespace Profiles {
23 export import ProfileGetResponse = ProfilesAPI.ProfileGetResponse;
24}
25