GET | /api/GetSchedulingLocations |
---|
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using AIM.WebService;
using AIM;
namespace AIM
{
[DataContract]
public partial class LocationInfo
{
[DataMember]
public virtual long Id { get; set; }
[DataMember]
public virtual string Desc { get; set; }
[DataMember]
public virtual string ShortDesc { get; set; }
[DataMember]
public virtual string Region { get; set; }
[DataMember]
public virtual decimal Latitude { get; set; }
[DataMember]
public virtual decimal Longitude { get; set; }
[DataMember]
public virtual string InStorePickup { get; set; }
[DataMember]
public virtual bool Active { get; set; }
[DataMember]
public virtual int? CashSaleAcct { get; set; }
}
}
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 virtual string ApiKey { get; set; }
[DataMember]
[ApiMember(DataType="string", Name="OAuthToken", ParameterType="header")]
public virtual string OAuthToken { get; set; }
}
[DataContract]
public partial class BaseResponse
{
///<summary>
///
///</summary>
[DataMember]
[ApiMember(DataType="BaseResponseResult", Description="", Name="Status", ParameterType="body")]
public virtual BaseResponseResult Status { get; set; }
[DataContract]
public partial class BaseResponseResult
{
///<summary>
///
///</summary>
[DataMember]
[ApiMember(DataType="string", Description="", Name="StatusCode", ParameterType="body")]
public virtual string StatusCode { get; set; }
///<summary>
///
///</summary>
[DataMember]
[ApiMember(DataType="string", Description="", Name="Login", ParameterType="body")]
public virtual string Login { get; set; }
///<summary>
///
///</summary>
[DataMember]
[ApiMember(DataType="string", Description="", Name="ErrorCode", ParameterType="body")]
public virtual string ErrorCode { get; set; }
///<summary>
///
///</summary>
[DataMember]
[ApiMember(DataType="string", Description="", Name="ErrorDisplayText", ParameterType="body")]
public virtual string ErrorDisplayText { get; set; }
///<summary>
///
///</summary>
[DataMember]
[ApiMember(DataType="string", Description="", Name="ErrorMessage", ParameterType="body")]
public virtual string ErrorMessage { get; set; }
///<summary>
///
///</summary>
[DataMember]
[ApiMember(DataType="string", Description="", ExcludeInSchema=true, Name="DomainName", ParameterType="body")]
public virtual string DomainName { get; set; }
///<summary>
///
///</summary>
[DataMember]
[ApiMember(DataType="string", Description="", ExcludeInSchema=true, Name="IPAddress", ParameterType="body")]
public virtual string IpAddress { get; set; }
}
}
///<summary>
///GetSchedulingLocationsRequires active-e Lesson Scheduling Service
///</summary>
[DataContract]
public partial class GetSchedulingLocationsRequest
: BaseRequest
{
///<summary>
///Location lookup. If sent, all other parameters will be ignored.
///</summary>
[DataMember]
[ApiMember(DataType="integer", Description="Location lookup. If sent, all other parameters will be ignored.", Format="int64", Name="LocationId", ParameterType="query")]
public virtual long? LocationId { get; set; }
///<summary>
///If sent, only locations that offer this lesson type will be returned.
///</summary>
[DataMember]
[ApiMember(DataType="integer", Description="If sent, only locations that offer this lesson type will be returned.", Format="int64", Name="TypeId", ParameterType="query")]
public virtual long? TypeId { get; set; }
///<summary>
///If sent, only locations that offer lessons of this grouping will be returned.
///</summary>
[DataMember]
[ApiMember(DataType="integer", Description="If sent, only locations that offer lessons of this grouping will be returned.", Format="int64", Name="GroupingId", ParameterType="query")]
public virtual long? GroupingId { get; set; }
///<summary>
///If sent, only locations where the sent instructor teaches will be returned.
///</summary>
[DataMember]
[ApiMember(DataType="integer", Description="If sent, only locations where the sent instructor teaches will be returned.", Format="int32", Name="InstructorId", ParameterType="query")]
public virtual int? InstructorId { get; set; }
[DataMember]
public virtual bool IncludeInactiveLocations { get; set; }
}
[DataContract]
public partial class GetSchedulingLocationsResponse
: BaseResponse
{
public GetSchedulingLocationsResponse()
{
Locations = new List<LocationInfo>{};
}
[DataMember]
public virtual List<LocationInfo> Locations { get; set; }
}
}
C# GetSchedulingLocationsRequest 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/GetSchedulingLocations HTTP/1.1 Host: active-ewebservice.biz Accept: application/xml
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <GetSchedulingLocationsResponse 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> <Locations xmlns:d2p1="http://schemas.datacontract.org/2004/07/AIM"> <d2p1:LocationInfo> <d2p1:Active>false</d2p1:Active> <d2p1:CashSaleAcct>0</d2p1:CashSaleAcct> <d2p1:Desc>String</d2p1:Desc> <d2p1:Id>0</d2p1:Id> <d2p1:InStorePickup>String</d2p1:InStorePickup> <d2p1:Latitude>0</d2p1:Latitude> <d2p1:Longitude>0</d2p1:Longitude> <d2p1:Region>String</d2p1:Region> <d2p1:ShortDesc>String</d2p1:ShortDesc> </d2p1:LocationInfo> </Locations> </GetSchedulingLocationsResponse>