cloudflare/cloudflare-typescript

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
v4.0.0

Branches

Tags

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

Clone

HTTPS

Download ZIP

src/resources/billing/profiles.ts

112lines · modecode

1// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
3import { APIResource } from '../../resource';
4import * as Core from '../../core';
5
6export class Profiles extends APIResource {
7 /**
8 * Gets the current billing profile for the account.
9 */
10 get(params: ProfileGetParams, options?: Core.RequestOptions): Core.APIPromise<ProfileGetResponse> {
11 const { account_id } = params;
12 return (
13 this._client.get(`/accounts/${account_id}/billing/profile`, options) as Core.APIPromise<{
14 result: ProfileGetResponse;
15 }>
16 )._thenUnwrap((obj) => obj.result);
17 }
18}
19
20export interface ProfileGetResponse {
21 /**
22 * Billing item identifier tag.
23 */
24 id?: string;
25
26 account_type?: string;
27
28 address?: string;
29
30 address2?: string;
31
32 balance?: string;
33
34 card_expiry_month?: number;
35
36 card_expiry_year?: number;
37
38 card_number?: string;
39
40 city?: string;
41
42 company?: string;
43
44 country?: string;
45
46 created_on?: string;
47
48 device_data?: string;
49
50 edited_on?: string;
51
52 enterprise_billing_email?: string;
53
54 enterprise_primary_email?: string;
55
56 first_name?: string;
57
58 is_partner?: boolean;
59
60 last_name?: string;
61
62 next_bill_date?: string;
63
64 payment_address?: string;
65
66 payment_address2?: string;
67
68 payment_city?: string;
69
70 payment_country?: string;
71
72 payment_email?: string;
73
74 payment_first_name?: string;
75
76 payment_gateway?: string;
77
78 payment_last_name?: string;
79
80 payment_nonce?: string;
81
82 payment_state?: string;
83
84 payment_zipcode?: string;
85
86 primary_email?: string;
87
88 state?: string;
89
90 tax_id_type?: string;
91
92 telephone?: string;
93
94 use_legacy?: boolean;
95
96 validation_code?: string;
97
98 vat?: string;
99
100 zipcode?: string;
101}
102
103export interface ProfileGetParams {
104 /**
105 * Identifier
106 */
107 account_id: string;
108}
109
110export declare namespace Profiles {
111 export { type ProfileGetResponse as ProfileGetResponse, type ProfileGetParams as ProfileGetParams };
112}
113