File tree Expand file tree Collapse file tree 3 files changed +14
-9
lines changed
tests/api-resources/accounts Expand file tree Collapse file tree 3 files changed +14
-9
lines changed Original file line number Diff line number Diff line change 1
1
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
4
4
config_hash : 9f61e9f02b675e373b140471d52b670c
Original file line number Diff line number Diff line change @@ -56,7 +56,6 @@ export class Accounts extends APIResource {
56
56
* ```ts
57
57
* const account = await client.accounts.create({
58
58
* name: 'name',
59
- * type: 'standard',
60
59
* });
61
60
* ```
62
61
*/
@@ -75,6 +74,7 @@ export class Accounts extends APIResource {
75
74
* account_id: '023e105f4ecef8ad9ca31a8372d0c353',
76
75
* id: '023e105f4ecef8ad9ca31a8372d0c353',
77
76
* name: 'Demo Account',
77
+ * type: 'standard',
78
78
* });
79
79
* ```
80
80
*/
@@ -168,6 +168,8 @@ export interface Account {
168
168
*/
169
169
name : string ;
170
170
171
+ type : 'standard' | 'enterprise' ;
172
+
171
173
/**
172
174
* Timestamp for the creation of the account
173
175
*/
@@ -210,11 +212,7 @@ export interface AccountCreateParams {
210
212
*/
211
213
name : string ;
212
214
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' ;
218
216
219
217
/**
220
218
* information related to the tenant unit, and optionally, an id of the unit to
@@ -254,6 +252,11 @@ export interface AccountUpdateParams {
254
252
*/
255
253
name : string ;
256
254
255
+ /**
256
+ * Body param:
257
+ */
258
+ type : 'standard' | 'enterprise' ;
259
+
257
260
/**
258
261
* Body param: Account settings
259
262
*/
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ const client = new Cloudflare({
11
11
12
12
describe ( 'resource accounts' , ( ) => {
13
13
test ( 'create: only required params' , async ( ) => {
14
- const responsePromise = client . accounts . create ( { name : 'name' , type : 'standard' } ) ;
14
+ const responsePromise = client . accounts . create ( { name : 'name' } ) ;
15
15
const rawResponse = await responsePromise . asResponse ( ) ;
16
16
expect ( rawResponse ) . toBeInstanceOf ( Response ) ;
17
17
const response = await responsePromise ;
@@ -34,6 +34,7 @@ describe('resource accounts', () => {
34
34
account_id : '023e105f4ecef8ad9ca31a8372d0c353' ,
35
35
id : '023e105f4ecef8ad9ca31a8372d0c353' ,
36
36
name : 'Demo Account' ,
37
+ type : 'standard' ,
37
38
} ) ;
38
39
const rawResponse = await responsePromise . asResponse ( ) ;
39
40
expect ( rawResponse ) . toBeInstanceOf ( Response ) ;
@@ -49,6 +50,7 @@ describe('resource accounts', () => {
49
50
account_id : '023e105f4ecef8ad9ca31a8372d0c353' ,
50
51
id : '023e105f4ecef8ad9ca31a8372d0c353' ,
51
52
name : 'Demo Account' ,
53
+ type : 'standard' ,
52
54
settings : { abuse_contact_email : 'abuse_contact_email' , enforce_twofactor : true } ,
53
55
} ) ;
54
56
} ) ;
You can’t perform that action at this time.
0 commit comments