Constructor
new Enterprise(client) → {void}
Parameters:
| Name | Type | Description | 
|---|---|---|
client | 
            
            BoxClient | The Box API Client that is responsible for making calls to the API | 
- Source:
 
Returns:
- Type
 - void
 
Methods
addAppUser(name, optionsopt, callbackopt) → {Promise.<Object>}
    Create a new app user in the current enterprise
API Endpoint: '/users'
Method: POST
    Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
name | 
            
            string | The name of this user | |||||||||||||||||||||||||||||
options | 
            
            Object | 
                
                    <optional> | 
            
            
            Optional parameters, can be left null in most cases
                Properties
  | 
        ||||||||||||||||||||||||||||
callback | 
            
            function | 
                
                    <optional> | 
            
            
            Passed the created user if successful, error otherwise | 
- Source:
 
Returns:
    A promise resolving to the created user
- Type
 - Promise.<Object>
 
addAppUser(name, optionsopt, callbackopt) → {Promise.<Object>}
    Create a new app user in the current enterprise
API Endpoint: '/users'
Method: POST
    Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
name | 
            
            string | The name of this user | |||||||||||||||||||||||||||||
options | 
            
            Object | 
                
                    <optional> | 
            
            
            Optional parameters, can be left null in most cases
                Properties
  | 
        ||||||||||||||||||||||||||||
callback | 
            
            function | 
                
                    <optional> | 
            
            
            Passed the created user if successful, error otherwise | 
- Source:
 
Returns:
    A promise resolving to the created user
- Type
 - Promise.<Object>
 
addUser(login, name, optionsopt, callbackopt) → {Promise.<Object>}
    Create a new user in the current enterprise
API Endpoint: '/users'
Method: POST
    Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
login | 
            
            string | The email address this user uses to login | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
name | 
            
            string | The name of this user | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
options | 
            
            Object | 
                
                    <optional> | 
            
            
            Optional parameters, can be left null in most cases
                Properties
  | 
        ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
callback | 
            
            function | 
                
                    <optional> | 
            
            
            Passed the created user if successful, error otherwise | 
- Source:
 
Returns:
    A promise resolving to the created user
- Type
 - Promise.<Object>
 
addUser(login, name, optionsopt, callbackopt) → {Promise.<Object>}
    Create a new user in the current enterprise
API Endpoint: '/users'
Method: POST
    Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
login | 
            
            string | The email address this user uses to login | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
name | 
            
            string | The name of this user | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
options | 
            
            Object | 
                
                    <optional> | 
            
            
            Optional parameters, can be left null in most cases
                Properties
  | 
        ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
callback | 
            
            function | 
                
                    <optional> | 
            
            
            Passed the created user if successful, error otherwise | 
- Source:
 
Returns:
    A promise resolving to the created user
- Type
 - Promise.<Object>
 
getUsers(optionsopt, callbackopt) → {Promise.<Object>}
    Get a list of users in the current enterprise
API Endpoint: '/users'
Method: GET
    Parameters:
| Name | Type | Attributes | Description | |||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | 
            
            Object | 
                
                    <optional> | 
            
            
            Optional parameters, can be left null in most cases
                Properties
  | 
        |||||||||||||||||||||||||||||||||||
callback | 
            
            function | 
                
                    <optional> | 
            
            
            Passed the list of users if successful, error otherwise | 
- Source:
 
Returns:
    A promise resolving to the collection of users
- Type
 - Promise.<Object>
 
getUsers(optionsopt, callbackopt) → {Promise.<Object>}
    Get a list of users in the current enterprise
API Endpoint: '/users'
Method: GET
    Parameters:
| Name | Type | Attributes | Description | |||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | 
            
            Object | 
                
                    <optional> | 
            
            
            Optional parameters, can be left null in most cases
                Properties
  | 
        |||||||||||||||||||||||||||||||||||
callback | 
            
            function | 
                
                    <optional> | 
            
            
            Passed the list of users if successful, error otherwise | 
- Source:
 
Returns:
    A promise resolving to the collection of users
- Type
 - Promise.<Object>
 
inviteUser(enterpriseID, email, callbackopt) → {Promise.<Object>}
    Invites a user to join the enterprise
API Endpoint: '/invites'
Method: POST
    Parameters:
| Name | Type | Attributes | Description | 
|---|---|---|---|
enterpriseID | 
            
            string | The ID of the enterprise to invite the user to | |
email | 
            
            string | The email address of the user to invite | |
callback | 
            
            function | 
                
                    <optional> | 
            
            
            Passed the invite object if successful, error otherwise | 
- Source:
 
Returns:
    A promise resolving to the invite object
- Type
 - Promise.<Object>
 
inviteUser(enterpriseID, email, callbackopt) → {Promise.<Object>}
    Invites a user to join the enterprise
API Endpoint: '/invites'
Method: POST
    Parameters:
| Name | Type | Attributes | Description | 
|---|---|---|---|
enterpriseID | 
            
            string | The ID of the enterprise to invite the user to | |
email | 
            
            string | The email address of the user to invite | |
callback | 
            
            function | 
                
                    <optional> | 
            
            
            Passed the invite object if successful, error otherwise | 
- Source:
 
Returns:
    A promise resolving to the invite object
- Type
 - Promise.<Object>
 
transferUserContent(sourceUserID, destUserID, callbackopt) → {Promise.<Object>}
    Transfers all of a user's files into another user's account.
API Endpoint: '/users/:sourceUserID/folders/0'
Method: PUT
    Parameters:
| Name | Type | Attributes | Description | 
|---|---|---|---|
sourceUserID | 
            
            string | The ID of the user whose files will be transferred | |
destUserID | 
            
            string | The ID of the user to transfer the files to | |
callback | 
            
            function | 
                
                    <optional> | 
            
            
            Passed the new folder which contains all the files if successful, error otherwise | 
- Source:
 
Returns:
    A promise resolving to the folder containing the transferred content
- Type
 - Promise.<Object>
 
transferUserContent(sourceUserID, destUserID, callbackopt) → {Promise.<Object>}
    Transfers all of a user's files into another user's account.
API Endpoint: '/users/:sourceUserID/folders/0'
Method: PUT
    Parameters:
| Name | Type | Attributes | Description | 
|---|---|---|---|
sourceUserID | 
            
            string | The ID of the user whose files will be transferred | |
destUserID | 
            
            string | The ID of the user to transfer the files to | |
callback | 
            
            function | 
                
                    <optional> | 
            
            
            Passed the new folder which contains all the files if successful, error otherwise | 
- Source:
 
Returns:
    A promise resolving to the folder containing the transferred content
- Type
 - Promise.<Object>