@BoxResourceType(value="terms_of_service") public class BoxTermsOfService extends BoxResource
Modifier and Type | Class and Description |
---|---|
class |
BoxTermsOfService.Info
Contains information about the terms of service.
|
static class |
BoxTermsOfService.TermsOfServiceStatus
Enumerates the possible status that a terms of service can have.
|
static class |
BoxTermsOfService.TermsOfServiceType
Enumerates the possible types of terms of service.
|
Modifier and Type | Field and Description |
---|---|
static URLTemplate |
ALL_TERMS_OF_SERVICES_URL_TEMPLATE
All Terms of Services URL Template.
|
static URLTemplate |
TERMS_OF_SERVICE_URL_TEMPLATE
Terms of Services URL Template.
|
Constructor and Description |
---|
BoxTermsOfService(BoxAPIConnection api,
String id)
Constructs a BoxTermsOfService for a Box Enterprise with a given ID.
|
Modifier and Type | Method and Description |
---|---|
static BoxTermsOfService.Info |
create(BoxAPIConnection api,
BoxTermsOfService.TermsOfServiceStatus termsOfServiceStatus,
BoxTermsOfService.TermsOfServiceType termsOfServiceType,
String text)
Creates a new Terms of Services.
|
static List<BoxTermsOfService.Info> |
getAllTermsOfServices(BoxAPIConnection api)
Retrieves a list of Terms of Services that belong to your Enterprise as an Iterable.
|
static List<BoxTermsOfService.Info> |
getAllTermsOfServices(BoxAPIConnection api,
BoxTermsOfService.TermsOfServiceType termsOfServiceType)
Retrieves a list of Terms of Service that belong to your Enterprise as an Iterable.
|
BoxTermsOfService.Info |
getInfo() |
void |
updateInfo(BoxTermsOfService.Info info)
Updates the information about this terms of service with modified locally info.
|
equals, getAPI, getID, getResourceType, hashCode
public static final URLTemplate TERMS_OF_SERVICE_URL_TEMPLATE
public static final URLTemplate ALL_TERMS_OF_SERVICES_URL_TEMPLATE
public BoxTermsOfService(BoxAPIConnection api, String id)
api
- the API connection to be used by the resource.id
- the ID of the resource.public static BoxTermsOfService.Info create(BoxAPIConnection api, BoxTermsOfService.TermsOfServiceStatus termsOfServiceStatus, BoxTermsOfService.TermsOfServiceType termsOfServiceType, String text)
api
- the API connection to be used by the resource.termsOfServiceStatus
- the current status of the terms of services. Set to "enabled" or "disabled".termsOfServiceType
- the scope of terms of service. Set to "external" or "managed".text
- the text field of terms of service containing terms of service agreement info.public static List<BoxTermsOfService.Info> getAllTermsOfServices(BoxAPIConnection api)
api
- the API connection to be used by the resource.public static List<BoxTermsOfService.Info> getAllTermsOfServices(BoxAPIConnection api, BoxTermsOfService.TermsOfServiceType termsOfServiceType)
api
- api the API connection to be used by the resource.termsOfServiceType
- the type of terms of service to be retrieved. Can be set to "managed" or "external"public void updateInfo(BoxTermsOfService.Info info)
info
- the updated info.public BoxTermsOfService.Info getInfo()
BoxTermsOfService
.