| GET, POST | /pickmeup/history | Get the user's recent history of bookings. |
|---|
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports WebService.ClientServiceModel.PickMeUp
Imports WebService.ClientServiceModel.Base
Imports CommonService.Api.Models.Base
Namespace Global
Namespace CommonService.Api.Models.Base
Public Partial Class ApiServiceResponse
Implements IServiceResponse
Public Overridable Property Description As String
Public Overridable Property Heading As String
Public Overridable Property WasSuccessful As Boolean
Public Overridable Property ModelState As Object
End Class
End Namespace
Namespace WebService.ClientServiceModel.Base
Public Partial Class ApiServiceRequest
Implements IServiceRequest
Implements IHasApiKey
'''<Summary>
'''The API Key required for authentication
'''</Summary>
<ApiMember(DataType:="string", Description:="The API Key required for authentication", IsRequired:=true)>
Public Overridable Property ApiKey As String
End Class
End Namespace
Namespace WebService.ClientServiceModel.PickMeUp
Public Partial Class BookingLocation
'''<Summary>
'''Latitude of the pickup/drop-off location.
'''</Summary>
<ApiMember(Description:="Latitude of the pickup/drop-off location.", IsRequired:=true)>
Public Overridable Property Latitude As Double
'''<Summary>
'''Longitude of the pickup/drop-off location.
'''</Summary>
<ApiMember(Description:="Longitude of the pickup/drop-off location.", IsRequired:=true)>
Public Overridable Property Longitude As Double
'''<Summary>
'''Address of the pickup/drop-off location.
'''</Summary>
<ApiMember(Description:="Address of the pickup/drop-off location.", IsRequired:=true)>
Public Overridable Property Address As String
End Class
Public Partial Class PickMeUpBookingItem
'''<Summary>
'''Date and Time of the pickup in ISO 8601 format.
'''</Summary>
<ApiMember(Description:="Date and Time of the pickup in ISO 8601 format.")>
Public Overridable Property BookingTime As String
'''<Summary>
'''The booking reference number returned by the service provider. To be shown to the client.
'''</Summary>
<ApiMember(Description:="The booking reference number returned by the service provider. To be shown to the client.")>
Public Overridable Property ReferenceNumber As String
'''<Summary>
'''Date and Time the booking request was made in ISO 8601 format.
'''</Summary>
<ApiMember(Description:="Date and Time the booking request was made in ISO 8601 format.")>
Public Overridable Property DateCreated As String
'''<Summary>
'''Status of the booking as returned by the service provider.
'''</Summary>
<ApiMember(Description:="Status of the booking as returned by the service provider.")>
Public Overridable Property Status As String
'''<Summary>
'''Name of contact person at pickup.
'''</Summary>
<ApiMember(Description:="Name of contact person at pickup.", IsRequired:=true)>
Public Overridable Property ContactName As String
'''<Summary>
'''Contact number of contact person at pickup.
'''</Summary>
<ApiMember(Description:="Contact number of contact person at pickup.", IsRequired:=true)>
Public Overridable Property ContactNumber As String
'''<Summary>
'''The number of people to be picked up.
'''</Summary>
<ApiMember(Description:="The number of people to be picked up.", IsRequired:=true)>
Public Overridable Property PassengerCount As String
'''<Summary>
'''The location details of where the clients are to be picked up.
'''</Summary>
<ApiMember(Description:="The location details of where the clients are to be picked up.", IsRequired:=true)>
Public Overridable Property PickupLocation As BookingLocation
'''<Summary>
'''The location details of where the clients are to be dropped off.
'''</Summary>
<ApiMember(Description:="The location details of where the clients are to be dropped off.", IsRequired:=true)>
Public Overridable Property DropoffLocation As BookingLocation
End Class
Public Partial Class PickMeUpHistoryRequest
Inherits ApiServiceRequest
'''<Summary>
'''ID Number of the user's history to retrieve.
'''</Summary>
<ApiMember(Description:="ID Number of the user's history to retrieve.", IsRequired:=true)>
Public Overridable Property IdNumber As String
End Class
Public Partial Class PickMeUpHistoryResponse
Inherits ApiServiceResponse
Public Sub New()
PickMeUpHistory = New List(Of PickMeUpBookingItem)
TakeMeHomeHistory = New List(Of PickMeUpBookingItem)
End Sub
'''<Summary>
'''Is the requested product set up and enabled on Galaxy.
'''</Summary>
<ApiMember(Description:="Is the requested product set up and enabled on Galaxy.")>
Public Overridable Property ProductAvailable As Boolean
'''<Summary>
'''Does the user have access to this product, based on their Galaxy profile.
'''</Summary>
<ApiMember(Description:="Does the user have access to this product, based on their Galaxy profile.")>
Public Overridable Property UserHasAccess As Boolean
'''<Summary>
'''List of booking history items for the Pick Me Up service.
'''</Summary>
<ApiMember(Description:="List of booking history items for the Pick Me Up service.")>
Public Overridable Property PickMeUpHistory As List(Of PickMeUpBookingItem)
'''<Summary>
'''List of booking history items for the Take Me Home service.
'''</Summary>
<ApiMember(Description:="List of booking history items for the Take Me Home service.")>
Public Overridable Property TakeMeHomeHistory As List(Of PickMeUpBookingItem)
End Class
End Namespace
End Namespace
VB.NET PickMeUpHistoryRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
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: application/json
Content-Type: application/json
Content-Length: length
{"IdNumber":"String","ApiKey":"String"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"ProductAvailable":false,"UserHasAccess":false,"PickMeUpHistory":[{}],"TakeMeHomeHistory":[{}],"Description":"String","Heading":"String","WasSuccessful":false,"ModelState":{}}