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 11configured_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
44config_hash : 9f61e9f02b675e373b140471d52b670c
Original file line number Diff line number Diff 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 */
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ const client = new Cloudflare({
1111
1212describe ( '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 } ) ;
You can’t perform that action at this time.
0 commit comments