GET | /api/GetStations |
---|
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports AIM.WebService
Imports AIM
Namespace Global
Namespace AIM
<DataContract>
Public Partial Class LocationInfo
<DataMember>
Public Overridable Property Id As Long
<DataMember>
Public Overridable Property Desc As String
<DataMember>
Public Overridable Property ShortDesc As String
<DataMember>
Public Overridable Property Region As String
<DataMember>
Public Overridable Property Latitude As Decimal
<DataMember>
Public Overridable Property Longitude As Decimal
<DataMember>
Public Overridable Property InStorePickup As String
<DataMember>
Public Overridable Property Active As Boolean
<DataMember>
Public Overridable Property CashSaleAcct As Nullable(Of Integer)
End Class
End Namespace
Namespace AIM.WebService
<DataContract>
Public Partial Class BaseRequest
'''<Summary>
'''This is your AIM API Key provided by Tri-Tech
'''</Summary>
<DataMember>
<ApiMember(DataType:="string", Description:="This is your AIM API Key provided by Tri-Tech", IsRequired:=true, Name:="ApiKey", ParameterType:="header")>
Public Overridable Property ApiKey As String
<DataMember>
<ApiMember(DataType:="string", Name:="OAuthToken", ParameterType:="header")>
Public Overridable Property OAuthToken As String
End Class
<DataContract>
Public Partial Class BaseResponse
'''<Summary>
'''
'''</Summary>
<DataMember>
<ApiMember(DataType:="BaseResponseResult", Description:="", Name:="Status", ParameterType:="body")>
Public Overridable Property Status As BaseResponseResult
<DataContract>
Public Partial Class BaseResponseResult
'''<Summary>
'''
'''</Summary>
<DataMember>
<ApiMember(DataType:="string", Description:="", Name:="StatusCode", ParameterType:="body")>
Public Overridable Property StatusCode As String
'''<Summary>
'''
'''</Summary>
<DataMember>
<ApiMember(DataType:="string", Description:="", Name:="Login", ParameterType:="body")>
Public Overridable Property Login As String
'''<Summary>
'''
'''</Summary>
<DataMember>
<ApiMember(DataType:="string", Description:="", Name:="ErrorCode", ParameterType:="body")>
Public Overridable Property ErrorCode As String
'''<Summary>
'''
'''</Summary>
<DataMember>
<ApiMember(DataType:="string", Description:="", Name:="ErrorDisplayText", ParameterType:="body")>
Public Overridable Property ErrorDisplayText As String
'''<Summary>
'''
'''</Summary>
<DataMember>
<ApiMember(DataType:="string", Description:="", Name:="ErrorMessage", ParameterType:="body")>
Public Overridable Property ErrorMessage As String
'''<Summary>
'''
'''</Summary>
<DataMember>
<ApiMember(DataType:="string", Description:="", ExcludeInSchema:=true, Name:="DomainName", ParameterType:="body")>
Public Overridable Property DomainName As String
'''<Summary>
'''
'''</Summary>
<DataMember>
<ApiMember(DataType:="string", Description:="", ExcludeInSchema:=true, Name:="IPAddress", ParameterType:="body")>
Public Overridable Property IpAddress As String
End Class
End Class
<DataContract>
Public Partial Class BaseSecureRequest
Inherits BaseRequest
'''<Summary>
'''
'''</Summary>
<DataMember>
<ApiMember(DataType:="string", Description:="", Name:="Token", ParameterType:="Header")>
Public Overridable Property Token As String
'''<Summary>
'''
'''</Summary>
<DataMember>
<ApiMember(DataType:="string", Description:="", Name:="DeviceId", ParameterType:="Header")>
Public Overridable Property DeviceId As String
'''<Summary>
'''
'''</Summary>
<DataMember>
<ApiMember(DataType:="string", Description:="", IsRequired:=true, Name:="AppId", ParameterType:="Header")>
Public Overridable Property AppId As String
End Class
'''<Summary>
'''GetStationsRequires active-e Station Reservations Service
'''</Summary>
<DataContract>
Public Partial Class GetStationsRequest
Inherits BaseSecureRequest
'''<Summary>
'''If sent, only stations at the passed location will be returned.
'''</Summary>
<DataMember>
<ApiMember(DataType:="integer", Description:="If sent, only stations at the passed location will be returned.", Format:="int64", Name:="LocationId", ParameterType:="query")>
Public Overridable Property LocationId As Nullable(Of Long)
'''<Summary>
'''If sent, only stations in the passed Station group will be returned
'''</Summary>
<DataMember>
<ApiMember(DataType:="integer", Description:="If sent, only stations in the passed Station group will be returned", Format:="int64", Name:="GroupId", ParameterType:="query")>
Public Overridable Property GroupId As Nullable(Of Long)
<DataMember>
Public Overridable Property Acct As Nullable(Of Integer)
<DataMember>
Public Overridable Property GenerateAvailabilityCalendar As Boolean
'''<Summary>
'''If sent, the availability calendar will be for the next X days
'''</Summary>
<DataMember>
<ApiMember(DataType:="integer", Description:="If sent, the availability calendar will be for the next X days", Format:="int64", Name:="AvailabilityCalendarDays", ParameterType:="query")>
Public Overridable Property AvailabilityCalendarDays As Nullable(Of Integer)
'''<Summary>
'''If sent, the availability calendar will be for the sent date only
'''</Summary>
<DataMember>
<ApiMember(DataType:="integer", Description:="If sent, the availability calendar will be for the sent date only", Format:="int64", Name:="AvailabilityCalendarDate", ParameterType:="query")>
Public Overridable Property AvailabilityCalendarDate As Nullable(Of Date)
'''<Summary>
'''If sent, the availability calendar will look for available slots of length X minutes. Uses the interval of the station group if not sent.
'''</Summary>
<DataMember>
<ApiMember(DataType:="integer", Description:="If sent, the availability calendar will look for available slots of length X minutes. Uses the interval of the station group if not sent.", Format:="int64", Name:="AvailabilityCalendarReservationLength", ParameterType:="query")>
Public Overridable Property AvailabilityCalendarReservationLength As Nullable(Of Integer)
End Class
<DataContract>
Public Partial Class GetStationsResponse
Inherits BaseResponse
Public Sub New()
Stations = New List(Of StationInfo)
End Sub
<DataMember>
Public Overridable Property Stations As List(Of StationInfo)
<DataContract>
Public Partial Class StationInfo
Public Sub New()
Reservations = New List(Of ReservationInfo)
AvailabilityCalendar = New List(Of Date)
End Sub
<DataMember>
Public Overridable Property Id As Long
<DataMember>
Public Overridable Property Name As String
<DataMember>
Public Overridable Property WebDescription As String
<DataMember>
Public Overridable Property MaxUsers As Integer
<DataMember>
Public Overridable Property Location As LocationInfo
<DataMember>
Public Overridable Property CurrentStatus As String
<DataMember>
Public Overridable Property Reservations As List(Of ReservationInfo)
<DataMember>
Public Overridable Property AvailabilityCalendar As List(Of Date)
<DataMember>
Public Overridable Property Topic As String
<DataContract>
Public Partial Class ReservationInfo
<DataMember>
Public Overridable Property Start As Date
<DataMember>
Public Overridable Property [End] As Date
<DataMember>
Public Overridable Property CustomerAcct As Nullable(Of Integer)
End Class
End Class
End Class
End Namespace
End Namespace
VB.NET GetStationsRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /api/GetStations HTTP/1.1 Host: active-ewebservice.biz Accept: application/xml
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <GetStationsResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AIM.WebService"> <Status> <DomainName>String</DomainName> <ErrorCode>String</ErrorCode> <ErrorDisplayText>String</ErrorDisplayText> <ErrorMessage>String</ErrorMessage> <IpAddress>String</IpAddress> <Login>String</Login> <StatusCode>String</StatusCode> </Status> <Stations> <GetStationsResponse.StationInfo> <AvailabilityCalendar xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d4p1:dateTime>0001-01-01T00:00:00</d4p1:dateTime> </AvailabilityCalendar> <CurrentStatus>String</CurrentStatus> <Id>0</Id> <Location xmlns:d4p1="http://schemas.datacontract.org/2004/07/AIM"> <d4p1:Active>false</d4p1:Active> <d4p1:CashSaleAcct>0</d4p1:CashSaleAcct> <d4p1:Desc>String</d4p1:Desc> <d4p1:Id>0</d4p1:Id> <d4p1:InStorePickup>String</d4p1:InStorePickup> <d4p1:Latitude>0</d4p1:Latitude> <d4p1:Longitude>0</d4p1:Longitude> <d4p1:Region>String</d4p1:Region> <d4p1:ShortDesc>String</d4p1:ShortDesc> </Location> <MaxUsers>0</MaxUsers> <Name>String</Name> <Reservations> <GetStationsResponse.StationInfo.ReservationInfo> <CustomerAcct>0</CustomerAcct> <End>0001-01-01T00:00:00</End> <Start>0001-01-01T00:00:00</Start> </GetStationsResponse.StationInfo.ReservationInfo> </Reservations> <Topic>String</Topic> <WebDescription>String</WebDescription> </GetStationsResponse.StationInfo> </Stations> </GetStationsResponse>