| GET | /api/ShortTermRentalInventory |
|---|
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using AIM.WebService;
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; }
///<summary>
///The OAuthToken token return by AeServices30
///</summary>
[DataMember]
[ApiMember(DataType="string", Description="The OAuthToken token return by AeServices30", IsRequired=true, Name="OAuthToken", ParameterType="Header")]
public virtual string OAuthToken { get; set; }
///<summary>
///The Device ID of the Mobile Device. Not used for non-mobile devices.
///</summary>
[DataMember]
[ApiMember(DataType="string", Description="The Device ID of the Mobile Device. Not used for non-mobile devices.", Name="DeviceId", ParameterType="Header")]
public virtual string DeviceId { get; set; }
///<summary>
///An identifier for your integration
///</summary>
[DataMember]
[ApiMember(DataType="string", Description="An identifier for your integration", IsRequired=true, Name="AppId", ParameterType="Header")]
public virtual string AppId { 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; }
}
}
[DataContract]
public partial class BaseSecureRequest
: BaseRequest
{
///<summary>
///The Login Token return by the Security API. Required for secured calls.
///</summary>
[DataMember]
[ApiMember(DataType="string", Description="The Login Token return by the Security API. Required for secured calls.", Name="Token", ParameterType="Header")]
public virtual string Token { get; set; }
}
[DataContract]
public partial class ShortTermRentalInventoryObj
{
public ShortTermRentalInventoryObj()
{
Rates = new List<ShortTermRentalInventoryRate>{};
AvailableSerialPks = new List<long>{};
}
[DataMember]
public virtual List<ShortTermRentalInventoryRate> Rates { get; set; }
[DataMember]
public virtual List<long> AvailableSerialPks { get; set; }
[DataMember]
public virtual long? SaqPk { get; set; }
[DataMember]
public virtual long? SkuPk { get; set; }
[DataMember]
public virtual long? PkhPk { get; set; }
[DataMember]
public virtual string Sku { get; set; }
[DataMember]
public virtual string Package { get; set; }
[DataMember]
public virtual string InvType { get; set; }
[DataMember]
public virtual decimal AvailableQty { get; set; }
}
[DataContract]
public partial class ShortTermRentalInventoryRate
{
[DataMember]
public virtual string HeaderDesc { get; set; }
[DataMember]
public virtual string HeaderNotes { get; set; }
[DataMember]
public virtual string Desc { get; set; }
[DataMember]
public virtual string IntervalType { get; set; }
[DataMember]
public virtual string Group { get; set; }
[DataMember]
public virtual string Notes { get; set; }
[DataMember]
public virtual decimal Amt { get; set; }
[DataMember]
public virtual int TimeInterval { get; set; }
}
///<summary>
///ShortTermRentalInventoryRequires active-e Short Term Rental Service
///</summary>
[DataContract]
public partial class ShortTermRentalInventoryRequest
: BaseSecureRequest
{
///<summary>
///Item to lookup. Pass in either this *OR* ItemPk + PkType *OR* Category + SubCategory
///</summary>
[DataMember]
[ApiMember(Description="Item to lookup. Pass in either this *OR* ItemPk + PkType *OR* Category + SubCategory", Name="Item", ParameterType="query")]
public virtual string Item { get; set; }
[DataMember]
public virtual string LocationCode { get; set; }
///<summary>
///Key of the item to lookup. Pass in either this plus PkType *OR* Item *OR* Category + SubCategory
///</summary>
[DataMember]
[ApiMember(Description="Key of the item to lookup. Pass in either this plus PkType *OR* Item *OR* Category + SubCategory", Name="ItemPk", ParameterType="query")]
public virtual long? ItemPk { get; set; }
///<summary>
///Type of the key passed in. S for SasPk, Q for SaqPk, P for PkhPk. Pass in either this plus ItemPk *OR* Item *OR* Category + SubCategory
///</summary>
[DataMember]
[ApiMember(Description="Type of the key passed in. S for SasPk, Q for SaqPk, P for PkhPk. Pass in either this plus ItemPk *OR* Item *OR* Category + SubCategory", Name="PkType", ParameterType="query")]
public virtual string PkType { get; set; }
///<summary>
///Pass in either SubCategory + this *OR* Item *OR* ItemPk + PkType
///</summary>
[DataMember]
[ApiMember(Description="Pass in either SubCategory + this *OR* Item *OR* ItemPk + PkType", Name="Category", ParameterType="query")]
public virtual int? Category { get; set; }
///<summary>
///Pass in either Category + this *OR* Item *OR* ItemPk + PkType
///</summary>
[DataMember]
[ApiMember(Description="Pass in either Category + this *OR* Item *OR* ItemPk + PkType", Name="SubCategory", ParameterType="query")]
public virtual int? SubCategory { get; set; }
}
[DataContract]
public partial class ShortTermRentalInventoryResponse
: BaseResponse
{
public ShortTermRentalInventoryResponse()
{
Results = new List<ShortTermRentalInventoryObj>{};
}
[DataMember]
public virtual List<ShortTermRentalInventoryObj> Results { get; set; }
}
}
C# ShortTermRentalInventoryRequest 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/ShortTermRentalInventory HTTP/1.1 Host: active-ewebservice.biz Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<ShortTermRentalInventoryResponse 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>
<Results>
<ShortTermRentalInventoryObj>
<AvailableQty>0</AvailableQty>
<AvailableSerialPks xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:long>0</d4p1:long>
</AvailableSerialPks>
<InvType>String</InvType>
<Package>String</Package>
<PkhPk>0</PkhPk>
<Rates>
<ShortTermRentalInventoryRate>
<Amt>0</Amt>
<Desc>String</Desc>
<Group>String</Group>
<HeaderDesc>String</HeaderDesc>
<HeaderNotes>String</HeaderNotes>
<IntervalType>String</IntervalType>
<Notes>String</Notes>
<TimeInterval>0</TimeInterval>
</ShortTermRentalInventoryRate>
</Rates>
<SaqPk>0</SaqPk>
<Sku>String</Sku>
<SkuPk>0</SkuPk>
</ShortTermRentalInventoryObj>
</Results>
</ShortTermRentalInventoryResponse>