cloudflare
Version:
The official TypeScript library for the Cloudflare API
105 lines (65 loc) • 1.89 kB
text/typescript
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from '../../../core/resource';
import { APIPromise } from '../../../core/api-promise';
import { RequestOptions } from '../../../internal/request-options';
export class BaseProfile extends APIResource {
static override readonly _key: readonly ['user', 'billing', 'profile'] = Object.freeze([
'user',
'billing',
'profile',
] as const);
/**
* Accesses your billing profile object.
*
* @deprecated
*/
get(options?: RequestOptions): APIPromise<ProfileGetResponse> {
return (
this._client.get('/user/billing/profile', options) as APIPromise<{ result: ProfileGetResponse }>
)._thenUnwrap((obj) => obj.result);
}
}
export class Profile extends BaseProfile {}
export interface ProfileGetResponse {
/**
* Billing item identifier tag.
*/
id?: string;
account_type?: string;
address?: string;
address2?: string;
balance?: string;
card_expiry_month?: number;
card_expiry_year?: number;
card_number?: string;
city?: string;
company?: string;
country?: string;
created_on?: string;
edited_on?: string;
enterprise_billing_email?: string;
enterprise_primary_email?: string;
first_name?: string;
is_partner?: boolean;
last_name?: string;
next_bill_date?: string;
payment_address?: string;
payment_address2?: string;
payment_city?: string;
payment_country?: string;
payment_email?: string;
payment_first_name?: string;
payment_last_name?: string;
payment_state?: string;
payment_zipcode?: string;
primary_email?: string;
state?: string;
tax_id_type?: string;
telephone?: string;
validation_code?: string;
vat?: string;
zipcode?: string;
}
export declare namespace Profile {
export { type ProfileGetResponse as ProfileGetResponse };
}