Constructor
new TermsOfService(client)
Parameters:
| Name | Type | Description | 
|---|---|---|
client | 
            
            BoxClient | The Box API Client that is responsible for making calls to the API | 
- Source:
 
Members
(readonly) status :TermsOfServicesStatus
    Enum value of status of the custom terms of services, either currently enabled or currently disabled
    Type:
- Source:
 
(readonly) type :TermsOfServicesType
    Enum value of scope of the custom terms of services set to either managed by an enterprise or enternal to an enterprise
    Type:
- Source:
 
Methods
create(termsOfServicesType, termsOfServicesStatus, termsOfServicesText, callbackopt) → {Promise.<Object>}
    Creates a custom terms of services with user specified values
API Endpoint: '/terms_of_services'
Method: POST
    Parameters:
| Name | Type | Attributes | Description | 
|---|---|---|---|
termsOfServicesType | 
            
            TermsOfServicesType | Determine if the custom terms of service is scoped internall or externally to an enterprise | |
termsOfServicesStatus | 
            
            TermsOfServicesStatus | Determine if the custom terms of service is enabled or disabled | |
termsOfServicesText | 
            
            string | Text field for message associated with custom terms of services | |
callback | 
            
            function | 
                
                    <optional> | 
            
            
            Passed the terms of services information if successful, error otherwise | 
- Source:
 
Returns:
    A promise resolving to the terms of services object
- Type
 - Promise.<Object>
 
create(termsOfServicesType, termsOfServicesStatus, termsOfServicesText, callbackopt) → {Promise.<Object>}
    Creates a custom terms of services with user specified values
API Endpoint: '/terms_of_services'
Method: POST
    Parameters:
| Name | Type | Attributes | Description | 
|---|---|---|---|
termsOfServicesType | 
            
            TermsOfServicesType | Determine if the custom terms of service is scoped internall or externally to an enterprise | |
termsOfServicesStatus | 
            
            TermsOfServicesStatus | Determine if the custom terms of service is enabled or disabled | |
termsOfServicesText | 
            
            string | Text field for message associated with custom terms of services | |
callback | 
            
            function | 
                
                    <optional> | 
            
            
            Passed the terms of services information if successful, error otherwise | 
- Source:
 
Returns:
    A promise resolving to the terms of services object
- Type
 - Promise.<Object>
 
createUserStatus(termsOfServicesID, isAccepted, optionsopt, callbackopt) → {Promise.<Object>}
    Accepts/rejects custom terms of services for the user
API Endpoint: '/terms_of_service_user_statuses'
Method: POST
    Parameters:
| Name | Type | Attributes | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
termsOfServicesID | 
            
            string | Terms of services ID to retrieve user statuses on | |||||||||
isAccepted | 
            
            boolean | Determines wehether the terms of services has been accepted or rejected | |||||||||
options | 
            
            Object | 
                
                    <optional> | 
            
            
            Additional options. Can be left null in most cases.
                Properties
  | 
        ||||||||
callback | 
            
            function | 
                
                    <optional> | 
            
            
            Passed the terms of service user status information if successful, error otherwise | 
- Source:
 
Returns:
    A promise resolving to the terms of service user status
- Type
 - Promise.<Object>
 
createUserStatus(termsOfServicesID, isAccepted, optionsopt, callbackopt) → {Promise.<Object>}
    Accepts/rejects custom terms of services for the user
API Endpoint: '/terms_of_service_user_statuses'
Method: POST
    Parameters:
| Name | Type | Attributes | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
termsOfServicesID | 
            
            string | Terms of services ID to retrieve user statuses on | |||||||||
isAccepted | 
            
            boolean | Determines wehether the terms of services has been accepted or rejected | |||||||||
options | 
            
            Object | 
                
                    <optional> | 
            
            
            Additional options. Can be left null in most cases.
                Properties
  | 
        ||||||||
callback | 
            
            function | 
                
                    <optional> | 
            
            
            Passed the terms of service user status information if successful, error otherwise | 
- Source:
 
Returns:
    A promise resolving to the terms of service user status
- Type
 - Promise.<Object>
 
get(termsOfServicesID, optionsopt, callbackopt) → {Promise.<Object>}
    Gets a specific custom terms of services with specified ID
API Endpoint: '/terms_of_services/:termsOfServicesID'
Method: GET
    Parameters:
| Name | Type | Attributes | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
termsOfServicesID | 
            
            string | The id of the custom terms of services to retrieve | |||||||||
options | 
            
            Object | 
                
                    <optional> | 
            
            
            Additional options. Can be left null in most cases.
                Properties
  | 
        ||||||||
callback | 
            
            function | 
                
                    <optional> | 
            
            
            Passed the terms of services information with specified ID if successful, error otherwise | 
- Source:
 
Returns:
    A promise resolving to the terms of services object
- Type
 - Promise.<Object>
 
get(termsOfServicesID, optionsopt, callbackopt) → {Promise.<Object>}
    Gets a specific custom terms of services with specified ID
API Endpoint: '/terms_of_services/:termsOfServicesID'
Method: GET
    Parameters:
| Name | Type | Attributes | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
termsOfServicesID | 
            
            string | The id of the custom terms of services to retrieve | |||||||||
options | 
            
            Object | 
                
                    <optional> | 
            
            
            Additional options. Can be left null in most cases.
                Properties
  | 
        ||||||||
callback | 
            
            function | 
                
                    <optional> | 
            
            
            Passed the terms of services information with specified ID if successful, error otherwise | 
- Source:
 
Returns:
    A promise resolving to the terms of services object
- Type
 - Promise.<Object>
 
getAll(optionsopt, callbackopt) → {Promise.<Object>}
    Gets custom terms of services for the user's enterprise
API Endpoint: '/terms_of_services'
Method: GET
    Parameters:
| Name | Type | Attributes | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | 
            
            Object | 
                
                    <optional> | 
            
            
            Additional options. Can be left null in most cases.
                Properties
  | 
        ||||||||||||
callback | 
            
            function | 
                
                    <optional> | 
            
            
            Passed the terms of services information if successful, error otherwise | 
- Source:
 
Returns:
    A promise resolving to the terms of services object
- Type
 - Promise.<Object>
 
getAll(optionsopt, callbackopt) → {Promise.<Object>}
    Gets custom terms of services for the user's enterprise
API Endpoint: '/terms_of_services'
Method: GET
    Parameters:
| Name | Type | Attributes | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | 
            
            Object | 
                
                    <optional> | 
            
            
            Additional options. Can be left null in most cases.
                Properties
  | 
        ||||||||||||
callback | 
            
            function | 
                
                    <optional> | 
            
            
            Passed the terms of services information if successful, error otherwise | 
- Source:
 
Returns:
    A promise resolving to the terms of services object
- Type
 - Promise.<Object>
 
getUserStatus(termsOfServicesID, optionsopt, callbackopt) → {Promise.<Object>}
    Gets a terms os service status given the terms of services id
API Endpoint: '/terms_of_service_user_statuses'
Method: GET
    Parameters:
| Name | Type | Attributes | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
termsOfServicesID | 
            
            string | The ID of the terms of services to retrieve status on | |||||||||
options | 
            
            Object | 
                
                    <optional> | 
            
            
            Additional options. Can be left null in most cases
                Properties
  | 
        ||||||||
callback | 
            
            function | 
                
                    <optional> | 
            
            
            Passed the terms of service user status information if successful, error otherwise | 
- Source:
 
Returns:
    A promise resolving to the terms of service user status
- Type
 - Promise.<Object>
 
getUserStatus(termsOfServicesID, optionsopt, callbackopt) → {Promise.<Object>}
    Gets a terms os service status given the terms of services id
API Endpoint: '/terms_of_service_user_statuses'
Method: GET
    Parameters:
| Name | Type | Attributes | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
termsOfServicesID | 
            
            string | The ID of the terms of services to retrieve status on | |||||||||
options | 
            
            Object | 
                
                    <optional> | 
            
            
            Additional options. Can be left null in most cases
                Properties
  | 
        ||||||||
callback | 
            
            function | 
                
                    <optional> | 
            
            
            Passed the terms of service user status information if successful, error otherwise | 
- Source:
 
Returns:
    A promise resolving to the terms of service user status
- Type
 - Promise.<Object>
 
setUserStatus(termsOfServicesID, isAccepted, optionsopt, callbackopt) → {Promise.<Object>}
    Creates a user status for terms of service, if already exists then update existing user status for terms of service
API Endpoint: '/terms_of_service_user_statuses'
Method: POST/PUT
    Parameters:
| Name | Type | Attributes | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
termsOfServicesID | 
            
            string | Terms of services ID to retrieve user statuses on | |||||||||
isAccepted | 
            
            boolean | Determines wehether the terms of services has been accepted or rejected | |||||||||
options | 
            
            Object | 
                
                    <optional> | 
            
            
            Additional options. Can be left null in most cases.
                Properties
  | 
        ||||||||
callback | 
            
            function | 
                
                    <optional> | 
            
            
            Passed the terms of service user status information if successful, error otherwise | 
- Source:
 
Returns:
    A promise resolving to the terms of service user status
- Type
 - Promise.<Object>
 
setUserStatus(termsOfServicesID, isAccepted, optionsopt, callbackopt) → {Promise.<Object>}
    Creates a user status for terms of service, if already exists then update existing user status for terms of service
API Endpoint: '/terms_of_service_user_statuses'
Method: POST/PUT
    Parameters:
| Name | Type | Attributes | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
termsOfServicesID | 
            
            string | Terms of services ID to retrieve user statuses on | |||||||||
isAccepted | 
            
            boolean | Determines wehether the terms of services has been accepted or rejected | |||||||||
options | 
            
            Object | 
                
                    <optional> | 
            
            
            Additional options. Can be left null in most cases.
                Properties
  | 
        ||||||||
callback | 
            
            function | 
                
                    <optional> | 
            
            
            Passed the terms of service user status information if successful, error otherwise | 
- Source:
 
Returns:
    A promise resolving to the terms of service user status
- Type
 - Promise.<Object>
 
update(termsOfServicesID, updates, callbackopt) → {Promise.<Object>}
    Updates a custom terms of services with new specified values
API Endpoint: '/terms_of_services/:termsOfServicesID'
Method: PUT
    Parameters:
| Name | Type | Attributes | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
termsOfServicesID | 
            
            string | The id of the custom terms of services to update | |||||||||||||
updates | 
            
            Object | Fields ot the Terms of Service to update
                Properties
  | 
        |||||||||||||
callback | 
            
            function | 
                
                    <optional> | 
            
            
            Passed the terms of services updated information if successful, error otherwise | 
- Source:
 
Returns:
    A promise resolving to the terms of services object
- Type
 - Promise.<Object>
 
update(termsOfServicesID, updates, callbackopt) → {Promise.<Object>}
    Updates a custom terms of services with new specified values
API Endpoint: '/terms_of_services/:termsOfServicesID'
Method: PUT
    Parameters:
| Name | Type | Attributes | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
termsOfServicesID | 
            
            string | The id of the custom terms of services to update | |||||||||||||
updates | 
            
            Object | Fields ot the Terms of Service to update
                Properties
  | 
        |||||||||||||
callback | 
            
            function | 
                
                    <optional> | 
            
            
            Passed the terms of services updated information if successful, error otherwise | 
- Source:
 
Returns:
    A promise resolving to the terms of services object
- Type
 - Promise.<Object>
 
updateUserStatus(termsOfServiceUserStatusID, isAccepted, callbackopt) → {Promise.<Object>}
    Accepts/rejects custom terms of services for the user
API Endpoint: '/terms_of_service_user_statuses'
Method: PUT
    Parameters:
| Name | Type | Attributes | Description | 
|---|---|---|---|
termsOfServiceUserStatusID | 
            
            string | Terms of service user status object ID | |
isAccepted | 
            
            boolean | Determines wehether the terms of services has been accepted or rejected | |
callback | 
            
            function | 
                
                    <optional> | 
            
            
            Passed the terms of service user status updated information if successful, error otherwise | 
- Source:
 
Returns:
    A promise resolving to the updated terms of service user status
- Type
 - Promise.<Object>
 
updateUserStatus(termsOfServiceUserStatusID, isAccepted, callbackopt) → {Promise.<Object>}
    Accepts/rejects custom terms of services for the user
API Endpoint: '/terms_of_service_user_statuses'
Method: PUT
    Parameters:
| Name | Type | Attributes | Description | 
|---|---|---|---|
termsOfServiceUserStatusID | 
            
            string | Terms of service user status object ID | |
isAccepted | 
            
            boolean | Determines wehether the terms of services has been accepted or rejected | |
callback | 
            
            function | 
                
                    <optional> | 
            
            
            Passed the terms of service user status updated information if successful, error otherwise | 
- Source:
 
Returns:
    A promise resolving to the updated terms of service user status
- Type
 - Promise.<Object>