| GET, POST | /pickmeup/history | Get the user's recent history of bookings. |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class PickMeUpHistoryRequest extends ApiServiceRequest
{
/**
* ID Number of the user's history to retrieve.
*/
@ApiMember(Description="ID Number of the user's history to retrieve.", IsRequired=true)
public String IdNumber = null;
public String getIdNumber() { return IdNumber; }
public PickMeUpHistoryRequest setIdNumber(String value) { this.IdNumber = value; return this; }
}
public static class ApiServiceRequest implements IServiceRequest, IHasApiKey
{
/**
* The API Key required for authentication
*/
@ApiMember(DataType="string", Description="The API Key required for authentication", IsRequired=true)
public String ApiKey = null;
public String getApiKey() { return ApiKey; }
public ApiServiceRequest setApiKey(String value) { this.ApiKey = value; return this; }
}
public static class PickMeUpHistoryResponse extends ApiServiceResponse
{
/**
* Is the requested product set up and enabled on Galaxy.
*/
@ApiMember(Description="Is the requested product set up and enabled on Galaxy.")
public Boolean ProductAvailable = null;
/**
* Does the user have access to this product, based on their Galaxy profile.
*/
@ApiMember(Description="Does the user have access to this product, based on their Galaxy profile.")
public Boolean UserHasAccess = null;
/**
* List of booking history items for the Pick Me Up service.
*/
@ApiMember(Description="List of booking history items for the Pick Me Up service.")
public ArrayList<PickMeUpBookingItem> PickMeUpHistory = null;
/**
* List of booking history items for the Take Me Home service.
*/
@ApiMember(Description="List of booking history items for the Take Me Home service.")
public ArrayList<PickMeUpBookingItem> TakeMeHomeHistory = null;
public Boolean isProductAvailable() { return ProductAvailable; }
public PickMeUpHistoryResponse setProductAvailable(Boolean value) { this.ProductAvailable = value; return this; }
public Boolean isUserHasAccess() { return UserHasAccess; }
public PickMeUpHistoryResponse setUserHasAccess(Boolean value) { this.UserHasAccess = value; return this; }
public ArrayList<PickMeUpBookingItem> getPickMeUpHistory() { return PickMeUpHistory; }
public PickMeUpHistoryResponse setPickMeUpHistory(ArrayList<PickMeUpBookingItem> value) { this.PickMeUpHistory = value; return this; }
public ArrayList<PickMeUpBookingItem> getTakeMeHomeHistory() { return TakeMeHomeHistory; }
public PickMeUpHistoryResponse setTakeMeHomeHistory(ArrayList<PickMeUpBookingItem> value) { this.TakeMeHomeHistory = value; return this; }
}
public static class ApiServiceResponse implements IServiceResponse
{
public String Description = null;
public String Heading = null;
public Boolean WasSuccessful = null;
public Object ModelState = null;
public String getDescription() { return Description; }
public ApiServiceResponse setDescription(String value) { this.Description = value; return this; }
public String getHeading() { return Heading; }
public ApiServiceResponse setHeading(String value) { this.Heading = value; return this; }
public Boolean isWasSuccessful() { return WasSuccessful; }
public ApiServiceResponse setWasSuccessful(Boolean value) { this.WasSuccessful = value; return this; }
public Object getModelState() { return ModelState; }
public ApiServiceResponse setModelState(Object value) { this.ModelState = value; return this; }
}
public static class PickMeUpBookingItem
{
/**
* Date and Time of the pickup in ISO 8601 format.
*/
@ApiMember(Description="Date and Time of the pickup in ISO 8601 format.")
public String BookingTime = null;
/**
* The booking reference number returned by the service provider. To be shown to the client.
*/
@ApiMember(Description="The booking reference number returned by the service provider. To be shown to the client.")
public String ReferenceNumber = null;
/**
* Date and Time the booking request was made in ISO 8601 format.
*/
@ApiMember(Description="Date and Time the booking request was made in ISO 8601 format.")
public String DateCreated = null;
/**
* Status of the booking as returned by the service provider.
*/
@ApiMember(Description="Status of the booking as returned by the service provider.")
public String Status = null;
/**
* Name of contact person at pickup.
*/
@ApiMember(Description="Name of contact person at pickup.", IsRequired=true)
public String ContactName = null;
/**
* Contact number of contact person at pickup.
*/
@ApiMember(Description="Contact number of contact person at pickup.", IsRequired=true)
public String ContactNumber = null;
/**
* The number of people to be picked up.
*/
@ApiMember(Description="The number of people to be picked up.", IsRequired=true)
public String PassengerCount = null;
/**
* The location details of where the clients are to be picked up.
*/
@ApiMember(Description="The location details of where the clients are to be picked up.", IsRequired=true)
public BookingLocation PickupLocation = null;
/**
* The location details of where the clients are to be dropped off.
*/
@ApiMember(Description="The location details of where the clients are to be dropped off.", IsRequired=true)
public BookingLocation DropoffLocation = null;
public String getBookingTime() { return BookingTime; }
public PickMeUpBookingItem setBookingTime(String value) { this.BookingTime = value; return this; }
public String getReferenceNumber() { return ReferenceNumber; }
public PickMeUpBookingItem setReferenceNumber(String value) { this.ReferenceNumber = value; return this; }
public String getDateCreated() { return DateCreated; }
public PickMeUpBookingItem setDateCreated(String value) { this.DateCreated = value; return this; }
public String getStatus() { return Status; }
public PickMeUpBookingItem setStatus(String value) { this.Status = value; return this; }
public String getContactName() { return ContactName; }
public PickMeUpBookingItem setContactName(String value) { this.ContactName = value; return this; }
public String getContactNumber() { return ContactNumber; }
public PickMeUpBookingItem setContactNumber(String value) { this.ContactNumber = value; return this; }
public String getPassengerCount() { return PassengerCount; }
public PickMeUpBookingItem setPassengerCount(String value) { this.PassengerCount = value; return this; }
public BookingLocation getPickupLocation() { return PickupLocation; }
public PickMeUpBookingItem setPickupLocation(BookingLocation value) { this.PickupLocation = value; return this; }
public BookingLocation getDropoffLocation() { return DropoffLocation; }
public PickMeUpBookingItem setDropoffLocation(BookingLocation value) { this.DropoffLocation = value; return this; }
}
public static class BookingLocation
{
/**
* Latitude of the pickup/drop-off location.
*/
@ApiMember(Description="Latitude of the pickup/drop-off location.", IsRequired=true)
public Double Latitude = null;
/**
* Longitude of the pickup/drop-off location.
*/
@ApiMember(Description="Longitude of the pickup/drop-off location.", IsRequired=true)
public Double Longitude = null;
/**
* Address of the pickup/drop-off location.
*/
@ApiMember(Description="Address of the pickup/drop-off location.", IsRequired=true)
public String Address = null;
public Double getLatitude() { return Latitude; }
public BookingLocation setLatitude(Double value) { this.Latitude = value; return this; }
public Double getLongitude() { return Longitude; }
public BookingLocation setLongitude(Double value) { this.Longitude = value; return this; }
public String getAddress() { return Address; }
public BookingLocation setAddress(String value) { this.Address = value; return this; }
}
}
Java PickMeUpHistoryRequest 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.
POST /pickmeup/history HTTP/1.1
Host: galaxymobile.api.client.prod.86degrees.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
IdNumber: String,
ApiKey: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
ProductAvailable: False,
UserHasAccess: False,
PickMeUpHistory:
[
{
}
],
TakeMeHomeHistory:
[
{
}
],
Description: String,
Heading: String,
WasSuccessful: False,
ModelState: {}
}