@BoxResourceType(value="device_pin") public class BoxDevicePin extends BoxResource
Unless otherwise noted, the methods in this class can throw an unchecked BoxAPIException
(unchecked
meaning that the compiler won't force you to handle it) if an error occurs. If you wish to implement custom error
handling for errors related to the Box REST API, you should capture this exception explicitly.
Modifier and Type | Class and Description |
---|---|
class |
BoxDevicePin.Info
Contains information about a task assignment.
|
Modifier and Type | Field and Description |
---|---|
static URLTemplate |
DEVICE_PIN_URL_TEMPLATE
The URL template used for operation with the device pin.
|
static URLTemplate |
ENTERPRISE_DEVICE_PINS_TEMPLATE
The URL template used to get all the device pins within a given enterprise.
|
Constructor and Description |
---|
BoxDevicePin(BoxAPIConnection api,
String id)
Constructs a device pin for a resource with a given ID.
|
Modifier and Type | Method and Description |
---|---|
void |
delete()
Deletes the device pin.
|
static Iterable<BoxDevicePin.Info> |
getEnterpriceDevicePins(BoxAPIConnection api,
String enterpriseID,
int limit,
String... fields)
Returns iterable with all the device pins within a given enterprise.
|
static Iterable<BoxDevicePin.Info> |
getEnterpriceDevicePins(BoxAPIConnection api,
String enterpriseID,
String... fields)
Returns iterable with all the device pins within a given enterprise.
|
BoxDevicePin.Info |
getInfo(String... fields)
Gets information about the device pin.
|
equals, getAPI, getID, getResourceType, hashCode
public static final URLTemplate DEVICE_PIN_URL_TEMPLATE
public static final URLTemplate ENTERPRISE_DEVICE_PINS_TEMPLATE
public BoxDevicePin(BoxAPIConnection api, String id)
api
- the API connection to be used by the resource.id
- the ID of the resource.public static Iterable<BoxDevicePin.Info> getEnterpriceDevicePins(BoxAPIConnection api, String enterpriseID, String... fields)
api
- API used to connect the Box.enterpriseID
- ID of the enterprise to get all the device pins within.fields
- the optional fields to retrieve.public static Iterable<BoxDevicePin.Info> getEnterpriceDevicePins(BoxAPIConnection api, String enterpriseID, int limit, String... fields)
api
- API used to connect the Box.enterpriseID
- ID of the enterprise to get all the device pins within.limit
- the maximum number of items per single response.fields
- the optional fields to retrieve.public BoxDevicePin.Info getInfo(String... fields)
fields
- the fields to retrieve.public void delete()