Skip to content

Commit 450515b

Browse files
feat(api): api update
1 parent 6d94d7c commit 450515b

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 1807
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-eac16ab278d6c20275e36fa2221681752ea3ea39a28e1a1831f6ae1ac1ada331.yml
3-
openapi_spec_hash: 3d7cb149a255b68b7456c0b17cc2be10
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5b01b9e6ca395f0369a7b1588b1a2bc1dfe4c9eeb74060351d4278196ea5dc06.yml
3+
openapi_spec_hash: 221f19700024a495ee3e0b9c9be004be
44
config_hash: 9f61e9f02b675e373b140471d52b670c

src/resources/accounts/accounts.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ export class Accounts extends APIResource {
5656
* ```ts
5757
* const account = await client.accounts.create({
5858
* name: 'name',
59-
* type: 'standard',
6059
* });
6160
* ```
6261
*/
@@ -75,6 +74,7 @@ export class Accounts extends APIResource {
7574
* account_id: '023e105f4ecef8ad9ca31a8372d0c353',
7675
* id: '023e105f4ecef8ad9ca31a8372d0c353',
7776
* name: 'Demo Account',
77+
* type: 'standard',
7878
* });
7979
* ```
8080
*/
@@ -168,6 +168,8 @@ export interface Account {
168168
*/
169169
name: string;
170170

171+
type: 'standard' | 'enterprise';
172+
171173
/**
172174
* Timestamp for the creation of the account
173175
*/
@@ -210,11 +212,7 @@ export interface AccountCreateParams {
210212
*/
211213
name: string;
212214

213-
/**
214-
* the type of account being created. For self-serve customers, use standard. for
215-
* enterprise customers, use enterprise.
216-
*/
217-
type: 'standard' | 'enterprise';
215+
type?: 'standard' | 'enterprise';
218216

219217
/**
220218
* information related to the tenant unit, and optionally, an id of the unit to
@@ -254,6 +252,11 @@ export interface AccountUpdateParams {
254252
*/
255253
name: string;
256254

255+
/**
256+
* Body param:
257+
*/
258+
type: 'standard' | 'enterprise';
259+
257260
/**
258261
* Body param: Account settings
259262
*/

tests/api-resources/accounts/accounts.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const client = new Cloudflare({
1111

1212
describe('resource accounts', () => {
1313
test('create: only required params', async () => {
14-
const responsePromise = client.accounts.create({ name: 'name', type: 'standard' });
14+
const responsePromise = client.accounts.create({ name: 'name' });
1515
const rawResponse = await responsePromise.asResponse();
1616
expect(rawResponse).toBeInstanceOf(Response);
1717
const response = await responsePromise;
@@ -34,6 +34,7 @@ describe('resource accounts', () => {
3434
account_id: '023e105f4ecef8ad9ca31a8372d0c353',
3535
id: '023e105f4ecef8ad9ca31a8372d0c353',
3636
name: 'Demo Account',
37+
type: 'standard',
3738
});
3839
const rawResponse = await responsePromise.asResponse();
3940
expect(rawResponse).toBeInstanceOf(Response);
@@ -49,6 +50,7 @@ describe('resource accounts', () => {
4950
account_id: '023e105f4ecef8ad9ca31a8372d0c353',
5051
id: '023e105f4ecef8ad9ca31a8372d0c353',
5152
name: 'Demo Account',
53+
type: 'standard',
5254
settings: { abuse_contact_email: 'abuse_contact_email', enforce_twofactor: true },
5355
});
5456
});

0 commit comments

Comments
 (0)