GET | /api/SaleInfo |
---|
"use strict";
export class BaseRequest {
/** @param {{ApiKey?:string,OAuthToken?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description This is your AIM API Key provided by Tri-Tech */
ApiKey;
/** @type {string} */
OAuthToken;
}
export class BaseSecureRequest extends BaseRequest {
/** @param {{Token?:string,DeviceId?:string,AppId?:string,ApiKey?:string,OAuthToken?:string}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/** @type {string} */
Token;
/** @type {string} */
DeviceId;
/** @type {string} */
AppId;
}
export class BaseResponseResult {
/** @param {{StatusCode?:string,Login?:string,ErrorCode?:string,ErrorDisplayText?:string,ErrorMessage?:string,DomainName?:string,IpAddress?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
StatusCode;
/** @type {string} */
Login;
/** @type {string} */
ErrorCode;
/** @type {string} */
ErrorDisplayText;
/** @type {string} */
ErrorMessage;
/** @type {string} */
DomainName;
/** @type {string} */
IpAddress;
}
export class BaseResponse {
/** @param {{Status?:BaseResponseResult}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {BaseResponseResult} */
Status;
}
export class DiscountFromPriceLevel {
/** @param {{BasePriceLevel?:string,DisountPercentage?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
BasePriceLevel;
/** @type {number} */
DisountPercentage;
}
export class RecurringSaleDay {
/** @param {{Weekday?:string,BeginHour?:number,BeginMinute?:number,EndHour?:number,EndMinute?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Weekday;
/** @type {number} */
BeginHour;
/** @type {number} */
BeginMinute;
/** @type {number} */
EndHour;
/** @type {number} */
EndMinute;
}
export class RecurringSaleInfo {
/** @param {{Days?:RecurringSaleDay[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {RecurringSaleDay[]} */
Days;
}
export class SaleRecord {
/** @param {{SadPk?:number,SkuPk?:number,SaqPk?:number,Model?:string,SKU?:string,LocationId?:number,StartDate?:string,EndDate?:string,CustomerAccount?:number,CustomerDefaultId?:number,Condition?:string,DiscountFromPriceLevel?:DiscountFromPriceLevel,DiscountByPriceLevel?:string,DiscountBySetPrice?:number,DiscountByAmount?:number,RecurringSale?:RecurringSaleInfo}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
SadPk;
/** @type {number} */
SkuPk;
/** @type {number} */
SaqPk;
/** @type {string} */
Model;
/** @type {string} */
SKU;
/** @type {number} */
LocationId;
/** @type {string} */
StartDate;
/** @type {string} */
EndDate;
/** @type {?number} */
CustomerAccount;
/** @type {?number} */
CustomerDefaultId;
/** @type {string} */
Condition;
/** @type {DiscountFromPriceLevel} */
DiscountFromPriceLevel;
/** @type {string} */
DiscountByPriceLevel;
/** @type {?number} */
DiscountBySetPrice;
/** @type {?number} */
DiscountByAmount;
/** @type {RecurringSaleInfo} */
RecurringSale;
}
export class SaleInfoResponse extends BaseResponse {
/** @param {{SaleRecords?:SaleRecord[],Status?:BaseResponseResult}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/** @type {SaleRecord[]} */
SaleRecords;
}
export class SaleInfoRequest extends BaseSecureRequest {
/** @param {{LocationId?:number,DateTime?:string,Token?:string,DeviceId?:string,AppId?:string,ApiKey?:string,OAuthToken?:string}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/** @type {?number} */
LocationId;
/**
* @type {?string}
* @description If sent, only sales that are active during the sent Date/Time are returned. Otherwise, the current Date/Time is used */
DateTime;
}
JavaScript SaleInfoRequest 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.
GET /api/SaleInfo HTTP/1.1 Host: active-ewebservice.biz Accept: application/json
HTTP/1.1 200 OK Content-Type: application/json 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"}}