cloudflare/cloudflare-typescript
Publicmirrored fromhttps://github.com/cloudflare/cloudflare-typescriptAvailable
src/resources/billing/profiles.ts
24lines · modecode
| 1 | // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. |
| 2 | |
| 3 | import * as Core from 'cloudflare/core'; |
| 4 | import { APIResource } from 'cloudflare/resource'; |
| 5 | import * as ProfilesAPI from 'cloudflare/resources/billing/profiles'; |
| 6 | |
| 7 | export 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 | |
| 20 | export type ProfileGetResponse = unknown | string | null; |
| 21 | |
| 22 | export namespace Profiles { |
| 23 | export import ProfileGetResponse = ProfilesAPI.ProfileGetResponse; |
| 24 | } |
| 25 | |