AIM Web Services

<back to all web services

SaleInfoRequest

SaleInfo
Requires active-e Inventory Service

The following routes are available for this service:
GET/api/SaleInfo
import java.math.*;
import java.util.*;
import net.servicestack.client.*;

public class dtos
{

    /**
    * SaleInfoRequires active-e Inventory Service
    */
    @DataContract
    public static class SaleInfoRequest extends BaseSecureRequest
    {
        @DataMember
        public Long LocationId = null;

        /**
        * If sent, only sales that are active during the sent Date/Time are returned. Otherwise, the current Date/Time is used
        */
        @DataMember
        @ApiMember(Description="If sent, only sales that are active during the sent Date/Time are returned. Otherwise, the current Date/Time is used", Name="DateTime")
        public Date DateTime = null;
        
        public Long getLocationId() { return LocationId; }
        public SaleInfoRequest setLocationId(Long value) { this.LocationId = value; return this; }
        public Date getDateTime() { return DateTime; }
        public SaleInfoRequest setDateTime(Date value) { this.DateTime = value; return this; }
    }

    @DataContract
    public static class BaseSecureRequest extends BaseRequest
    {
        /**
        * 
        */
        @DataMember
        @ApiMember(DataType="string", Description="", Name="Token", ParameterType="Header")
        public String Token = null;

        /**
        * 
        */
        @DataMember
        @ApiMember(DataType="string", Description="", Name="DeviceId", ParameterType="Header")
        public String DeviceId = null;

        /**
        * 
        */
        @DataMember
        @ApiMember(DataType="string", Description="", IsRequired=true, Name="AppId", ParameterType="Header")
        public String AppId = null;
        
        public String getToken() { return Token; }
        public BaseSecureRequest setToken(String value) { this.Token = value; return this; }
        public String getDeviceId() { return DeviceId; }
        public BaseSecureRequest setDeviceId(String value) { this.DeviceId = value; return this; }
        public String getAppId() { return AppId; }
        public BaseSecureRequest setAppId(String value) { this.AppId = value; return this; }
    }

    @DataContract
    public static class BaseRequest
    {
        /**
        * This is your AIM API Key provided by Tri-Tech
        */
        @DataMember
        @ApiMember(DataType="string", Description="This is your AIM API Key provided by Tri-Tech", IsRequired=true, Name="ApiKey", ParameterType="header")
        public String ApiKey = null;

        @DataMember
        @ApiMember(DataType="string", Name="OAuthToken", ParameterType="header")
        public String OAuthToken = null;
        
        public String getApiKey() { return ApiKey; }
        public BaseRequest setApiKey(String value) { this.ApiKey = value; return this; }
        public String getOAuthToken() { return OAuthToken; }
        public BaseRequest setOAuthToken(String value) { this.OAuthToken = value; return this; }
    }

    @DataContract
    public static class SaleInfoResponse extends BaseResponse
    {
        @DataMember
        public ArrayList<SaleRecord> SaleRecords = null;
        
        public ArrayList<SaleRecord> getSaleRecords() { return SaleRecords; }
        public SaleInfoResponse setSaleRecords(ArrayList<SaleRecord> value) { this.SaleRecords = value; return this; }
    }

    @DataContract
    public static class BaseResponse
    {
        /**
        * 
        */
        @DataMember
        @ApiMember(DataType="BaseResponseResult", Description="", Name="Status", ParameterType="body")
        public BaseResponseResult Status = null;
        
        public BaseResponseResult getStatus() { return Status; }
        public BaseResponse setStatus(BaseResponseResult value) { this.Status = value; return this; }
    }

    @DataContract
    public static class BaseResponseResult
    {
        /**
        * 
        */
        @DataMember
        @ApiMember(DataType="string", Description="", Name="StatusCode", ParameterType="body")
        public String StatusCode = null;

        /**
        * 
        */
        @DataMember
        @ApiMember(DataType="string", Description="", Name="Login", ParameterType="body")
        public String Login = null;

        /**
        * 
        */
        @DataMember
        @ApiMember(DataType="string", Description="", Name="ErrorCode", ParameterType="body")
        public String ErrorCode = null;

        /**
        * 
        */
        @DataMember
        @ApiMember(DataType="string", Description="", Name="ErrorDisplayText", ParameterType="body")
        public String ErrorDisplayText = null;

        /**
        * 
        */
        @DataMember
        @ApiMember(DataType="string", Description="", Name="ErrorMessage", ParameterType="body")
        public String ErrorMessage = null;

        /**
        * 
        */
        @DataMember
        @ApiMember(DataType="string", Description="", ExcludeInSchema=true, Name="DomainName", ParameterType="body")
        public String DomainName = null;

        /**
        * 
        */
        @DataMember
        @ApiMember(DataType="string", Description="", ExcludeInSchema=true, Name="IPAddress", ParameterType="body")
        public String IpAddress = null;
        
        public String getStatusCode() { return StatusCode; }
        public BaseResponseResult setStatusCode(String value) { this.StatusCode = value; return this; }
        public String getLogin() { return Login; }
        public BaseResponseResult setLogin(String value) { this.Login = value; return this; }
        public String getErrorCode() { return ErrorCode; }
        public BaseResponseResult setErrorCode(String value) { this.ErrorCode = value; return this; }
        public String getErrorDisplayText() { return ErrorDisplayText; }
        public BaseResponseResult setErrorDisplayText(String value) { this.ErrorDisplayText = value; return this; }
        public String getErrorMessage() { return ErrorMessage; }
        public BaseResponseResult setErrorMessage(String value) { this.ErrorMessage = value; return this; }
        public String getDomainName() { return DomainName; }
        public BaseResponseResult setDomainName(String value) { this.DomainName = value; return this; }
        public String getIpAddress() { return IpAddress; }
        public BaseResponseResult setIpAddress(String value) { this.IpAddress = value; return this; }
    }

    @DataContract
    public static class SaleRecord
    {
        @DataMember
        public Long SadPk = null;

        @DataMember
        public Long SkuPk = null;

        @DataMember
        public Long SaqPk = null;

        @DataMember
        public String Model = null;

        @DataMember
        public String SKU = null;

        @DataMember
        public Long LocationId = null;

        @DataMember
        public Date StartDate = null;

        @DataMember
        public Date EndDate = null;

        @DataMember
        public Integer CustomerAccount = null;

        @DataMember
        public Long CustomerDefaultId = null;

        @DataMember
        public String Condition = null;

        @DataMember
        public DiscountFromPriceLevel DiscountFromPriceLevel = null;

        @DataMember
        public String DiscountByPriceLevel = null;

        @DataMember
        public BigDecimal DiscountBySetPrice = null;

        @DataMember
        public BigDecimal DiscountByAmount = null;

        @DataMember
        public RecurringSaleInfo RecurringSale = null;
        
        public Long getSadPk() { return SadPk; }
        public SaleRecord setSadPk(Long value) { this.SadPk = value; return this; }
        public Long getSkuPk() { return SkuPk; }
        public SaleRecord setSkuPk(Long value) { this.SkuPk = value; return this; }
        public Long getSaqPk() { return SaqPk; }
        public SaleRecord setSaqPk(Long value) { this.SaqPk = value; return this; }
        public String getModel() { return Model; }
        public SaleRecord setModel(String value) { this.Model = value; return this; }
        public String getSku() { return SKU; }
        public SaleRecord setSku(String value) { this.SKU = value; return this; }
        public Long getLocationId() { return LocationId; }
        public SaleRecord setLocationId(Long value) { this.LocationId = value; return this; }
        public Date getStartDate() { return StartDate; }
        public SaleRecord setStartDate(Date value) { this.StartDate = value; return this; }
        public Date getEndDate() { return EndDate; }
        public SaleRecord setEndDate(Date value) { this.EndDate = value; return this; }
        public Integer getCustomerAccount() { return CustomerAccount; }
        public SaleRecord setCustomerAccount(Integer value) { this.CustomerAccount = value; return this; }
        public Long getCustomerDefaultId() { return CustomerDefaultId; }
        public SaleRecord setCustomerDefaultId(Long value) { this.CustomerDefaultId = value; return this; }
        public String getCondition() { return Condition; }
        public SaleRecord setCondition(String value) { this.Condition = value; return this; }
        public DiscountFromPriceLevel getDiscountFromPriceLevel() { return DiscountFromPriceLevel; }
        public SaleRecord setDiscountFromPriceLevel(DiscountFromPriceLevel value) { this.DiscountFromPriceLevel = value; return this; }
        public String getDiscountByPriceLevel() { return DiscountByPriceLevel; }
        public SaleRecord setDiscountByPriceLevel(String value) { this.DiscountByPriceLevel = value; return this; }
        public BigDecimal getDiscountBySetPrice() { return DiscountBySetPrice; }
        public SaleRecord setDiscountBySetPrice(BigDecimal value) { this.DiscountBySetPrice = value; return this; }
        public BigDecimal getDiscountByAmount() { return DiscountByAmount; }
        public SaleRecord setDiscountByAmount(BigDecimal value) { this.DiscountByAmount = value; return this; }
        public RecurringSaleInfo getRecurringSale() { return RecurringSale; }
        public SaleRecord setRecurringSale(RecurringSaleInfo value) { this.RecurringSale = value; return this; }
    }

    @DataContract
    public static class DiscountFromPriceLevel
    {
        @DataMember
        public String BasePriceLevel = null;

        @DataMember
        public BigDecimal DisountPercentage = null;
        
        public String getBasePriceLevel() { return BasePriceLevel; }
        public DiscountFromPriceLevel setBasePriceLevel(String value) { this.BasePriceLevel = value; return this; }
        public BigDecimal getDisountPercentage() { return DisountPercentage; }
        public DiscountFromPriceLevel setDisountPercentage(BigDecimal value) { this.DisountPercentage = value; return this; }
    }

    @DataContract
    public static class RecurringSaleInfo
    {
        @DataMember
        public ArrayList<RecurringSaleDay> Days = null;
        
        public ArrayList<RecurringSaleDay> getDays() { return Days; }
        public RecurringSaleInfo setDays(ArrayList<RecurringSaleDay> value) { this.Days = value; return this; }
    }

    @DataContract
    public static class RecurringSaleDay
    {
        @DataMember
        public String Weekday = null;

        @DataMember
        public Integer BeginHour = null;

        @DataMember
        public Integer BeginMinute = null;

        @DataMember
        public Integer EndHour = null;

        @DataMember
        public Integer EndMinute = null;
        
        public String getWeekday() { return Weekday; }
        public RecurringSaleDay setWeekday(String value) { this.Weekday = value; return this; }
        public Integer getBeginHour() { return BeginHour; }
        public RecurringSaleDay setBeginHour(Integer value) { this.BeginHour = value; return this; }
        public Integer getBeginMinute() { return BeginMinute; }
        public RecurringSaleDay setBeginMinute(Integer value) { this.BeginMinute = value; return this; }
        public Integer getEndHour() { return EndHour; }
        public RecurringSaleDay setEndHour(Integer value) { this.EndHour = value; return this; }
        public Integer getEndMinute() { return EndMinute; }
        public RecurringSaleDay setEndMinute(Integer value) { this.EndMinute = value; return this; }
    }

}

Java SaleInfoRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other

HTTP + OTHER

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /api/SaleInfo HTTP/1.1 
Host: active-ewebservice.biz 
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"SaleRecords":[{"SadPk":0,"SkuPk":0,"SaqPk":0,"Model":"String","SKU":"String","LocationId":0,"CustomerAccount":0,"CustomerDefaultId":0,"Condition":"String","DiscountFromPriceLevel":{"BasePriceLevel":"String","DisountPercentage":0},"DiscountByPriceLevel":"String","DiscountBySetPrice":0,"DiscountByAmount":0,"RecurringSale":{"Days":[{"Weekday":"String","BeginHour":0,"BeginMinute":0,"EndHour":0,"EndMinute":0}]}}],"Status":{"StatusCode":"String","Login":"String","ErrorCode":"String","ErrorDisplayText":"String","ErrorMessage":"String","DomainName":"String","IpAddress":"String"}}