-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathaccounts.ts
More file actions
151 lines (129 loc) · 3.13 KB
/
Copy pathaccounts.ts
File metadata and controls
151 lines (129 loc) · 3.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from '../resource';
import * as Core from '../core';
export class Accounts extends APIResource {
/**
* Returns the account the API key or session is authenticated against, including
* id, name, tier, and billing summary.
*/
me(options?: Core.RequestOptions): Core.APIPromise<AccountView> {
return this._client.get('/v1/accounts/me', options);
}
}
/**
* Account information.
*/
export interface AccountView {
/**
* The account ID.
*/
id: string;
/**
* The account status.
*/
account_status:
| 'ACCOUNT_STATUS_INVALID'
| 'ACCOUNT_STATUS_ONBOARDING'
| 'ACCOUNT_STATUS_ENABLED'
| 'ACCOUNT_STATUS_DISABLED_BY_ADMIN'
| 'ACCOUNT_STATUS_DISABLED_QUOTA_REACHED'
| 'ACCOUNT_STATUS_TRIAL_CANCELLED'
| 'ACCOUNT_STATUS_STRIPE_PENDING_RESOURCES'
| 'UNRECOGNIZED';
/**
* The account billing information.
*/
billing: AccountView.Billing;
/**
* The account creation timestamp.
*/
created_at: string;
/**
* The account name.
*/
name: string;
/**
* The account tier.
*/
tier:
| 'ACCOUNT_TIER_INVALID'
| 'ACCOUNT_TIER_BASIC'
| 'ACCOUNT_TIER_PRO'
| 'ACCOUNT_TIER_ENTERPRISE'
| 'ACCOUNT_TIER_TRIAL'
| 'UNRECOGNIZED';
/**
* Deprecated: use billing.account_billing_type.
*/
account_billing_type?: 'STRIPE' | 'AWS_MARKETPLACE' | 'STRIPE_PROJECTS' | 'UNRECOGNIZED';
/**
* Deprecated: use billing.stripe.active_subscription.
*/
active_subscription?: string | null;
/**
* Deprecated: use billing.aws.customer_identifier.
*/
external_billing_account_id?: string | null;
/**
* Deprecated: use billing.stripe.customer_id.
*/
stripe_customer_id?: string | null;
}
export namespace AccountView {
/**
* The account billing information.
*/
export interface Billing {
/**
* The account billing type.
*/
account_billing_type: 'STRIPE' | 'AWS_MARKETPLACE' | 'STRIPE_PROJECTS' | 'UNRECOGNIZED';
/**
* AWS Marketplace billing information.
*/
aws?: Billing.Aws | null;
/**
* Stripe billing information.
*/
stripe?: Billing.Stripe | null;
/**
* Deprecated: use stripe.customer_id.
*/
stripe_customer_id?: string | null;
}
export namespace Billing {
/**
* AWS Marketplace billing information.
*/
export interface Aws {
/**
* The AWS account ID used for Marketplace billing (12-digit).
*/
customer_identifier?: string | null;
/**
* The AWS Marketplace license ARN.
*/
license_arn?: string | null;
/**
* The AWS Marketplace subscription status.
*/
subscription_status?: string | null;
}
/**
* Stripe billing information.
*/
export interface Stripe {
/**
* The active Stripe subscription ID.
*/
active_subscription?: string | null;
/**
* The Stripe customer ID.
*/
customer_id?: string | null;
}
}
}
export declare namespace Accounts {
export { type AccountView as AccountView };
}