| GET | /{Workspace}/ArrivalDepartureList/Current | ||
|---|---|---|---|
| GET | /{Workspace}/ArrivalDepartureList/History/{Days} | ||
| GET | /{Workspace}/ArrivalDepartureList/User/{ObjectId}/History/{Days}/ | ||
| GET | /{Workspace}/ArrivalDepartureList/Task/{ObjectId}/History/ | ||
| GET | /{Workspace}/ArrivalDepartureList/Contact/{ObjectId}/History/ |
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
/**
* Returns a list of ArrivalDeparture objects, based on the criteria within the end point. /{Workspace}/ArrivalDeparture/User/{ObjectId}/History/{Days}/ - GET - Return the history of a specific user for X days, sorted by arrival date descending. /{Workspace}/ArrivalDeparture/History/{Days} - GET - Return the history of all users for X days, sorted by user descending then arrival date descending. /{Workspace}/ArrivalDeparture/Current - GET - Return the latest arrival departure object for each user, sorted by arrivaldate descending./{Workspace}/ArrivalDepartureList/Task/{ObjectId}/History/ - GET - Return the history of all arrival departure objects related to a specific task./{Workspace}/ArrivalDepartureList/Contact/{ObjectId}/History/ - GET - Return the history of all arrival departure objects related to a specific contact.
*/
public static class ArrivalDepartureList
{
public String Workspace = null;
public String ObjectId = null;
public String Days = null;
public String DateGenerated = null;
public ArrayList<ArrivalDeparture> ArrivalDepartures = null;
public String getWorkspace() { return Workspace; }
public ArrivalDepartureList setWorkspace(String value) { this.Workspace = value; return this; }
public String getObjectId() { return ObjectId; }
public ArrivalDepartureList setObjectId(String value) { this.ObjectId = value; return this; }
public String getDays() { return Days; }
public ArrivalDepartureList setDays(String value) { this.Days = value; return this; }
public String getDateGenerated() { return DateGenerated; }
public ArrivalDepartureList setDateGenerated(String value) { this.DateGenerated = value; return this; }
public ArrayList<ArrivalDeparture> getArrivalDepartures() { return ArrivalDepartures; }
public ArrivalDepartureList setArrivalDepartures(ArrayList<ArrivalDeparture> value) { this.ArrivalDepartures = value; return this; }
}
/**
* Service representing an ArrivalDeparture object in a workspace.
*/
public static class ArrivalDeparture
{
public String Workspace = null;
public String ObjectId = null;
public String ArrivalTime = null;
public String DepartureTime = null;
public Location GeofenceLocation = null;
public String GeofenceId = null;
public Double GeofenceRadius = null;
public String User = null;
public String Task = null;
public String getWorkspace() { return Workspace; }
public ArrivalDeparture setWorkspace(String value) { this.Workspace = value; return this; }
public String getObjectId() { return ObjectId; }
public ArrivalDeparture setObjectId(String value) { this.ObjectId = value; return this; }
public String getArrivalTime() { return ArrivalTime; }
public ArrivalDeparture setArrivalTime(String value) { this.ArrivalTime = value; return this; }
public String getDepartureTime() { return DepartureTime; }
public ArrivalDeparture setDepartureTime(String value) { this.DepartureTime = value; return this; }
public Location getGeofenceLocation() { return GeofenceLocation; }
public ArrivalDeparture setGeofenceLocation(Location value) { this.GeofenceLocation = value; return this; }
public String getGeofenceId() { return GeofenceId; }
public ArrivalDeparture setGeofenceId(String value) { this.GeofenceId = value; return this; }
public Double getGeofenceRadius() { return GeofenceRadius; }
public ArrivalDeparture setGeofenceRadius(Double value) { this.GeofenceRadius = value; return this; }
public String getUser() { return User; }
public ArrivalDeparture setUser(String value) { this.User = value; return this; }
public String getTask() { return Task; }
public ArrivalDeparture setTask(String value) { this.Task = value; return this; }
}
public static class Location
{
public Double y = null;
public Double x = null;
public Double getY() { return y; }
public Location setY(Double value) { this.y = value; return this; }
public Double getX() { return x; }
public Location setX(Double value) { this.x = value; return this; }
}
}
Java ArrivalDepartureList DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /{Workspace}/ArrivalDepartureList/Current HTTP/1.1
Host: dev.fieldsquared.com
Accept: text/jsv