GET | /api/History360 |
---|
"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 Item360 {
/** @param {{PslrId?:number,Quantity?:number,Price?:number,TotalDiscountAmount?:number,SerialNumber?:string,Condition?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {?number} */
PslrId;
/** @type {number} */
Quantity;
/** @type {number} */
Price;
/** @type {number} */
TotalDiscountAmount;
/** @type {string} */
SerialNumber;
/** @type {string} */
Condition;
}
export class Invoice360 {
/** @param {{Id?:string,DueDate?:string,Total?:number,Status?:string,AmountPaid?:number,LateFeeAmount?:number,PurchaseDate?:string,StoreLocationId?:number,Items?:Item360[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Id;
/** @type {?string} */
DueDate;
/** @type {number} */
Total;
/** @type {string} */
Status;
/** @type {number} */
AmountPaid;
/** @type {number} */
LateFeeAmount;
/** @type {string} */
PurchaseDate;
/** @type {?number} */
StoreLocationId;
/** @type {Item360[]} */
Items;
}
export class Order360 {
/** @param {{Id?:number,Date?:string,Discount?:number,PaymentType?:string,SubTotal?:number,Tax?:number,ShippingAmount?:number,Total?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
Id;
/** @type {string} */
Date;
/** @type {number} */
Discount;
/** @type {string} */
PaymentType;
/** @type {number} */
SubTotal;
/** @type {number} */
Tax;
/** @type {number} */
ShippingAmount;
/** @type {number} */
Total;
}
export class Job360 {
/** @param {{ItemId?:string,ItemType?:string,Title?:string,Quantity?:number,Price?:number,TotalDiscountAmount?:number,SerialNumber?:string,Condition?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
ItemId;
/** @type {string} */
ItemType;
/** @type {string} */
Title;
/** @type {number} */
Quantity;
/** @type {number} */
Price;
/** @type {number} */
TotalDiscountAmount;
/** @type {string} */
SerialNumber;
/** @type {string} */
Condition;
}
export class WorkOrder360 {
/** @param {{Id?:string,Status?:string,Deposit?:number,StoreLocationId?:number,CreationDate?:string,CompletedDate?:string,Price?:number,Jobs?:Job360[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Id;
/** @type {string} */
Status;
/** @type {number} */
Deposit;
/** @type {?number} */
StoreLocationId;
/** @type {string} */
CreationDate;
/** @type {?string} */
CompletedDate;
/** @type {number} */
Price;
/** @type {Job360[]} */
Jobs;
}
export class Contract360 {
/** @param {{Id?:string,PaymentDate?:string,StoreLocationId?:number,AmountDue?:number,LateFee?:number,ContractStatus?:string,Amount?:number,ContractItems?:Item360[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Id;
/** @type {string} */
PaymentDate;
/** @type {?number} */
StoreLocationId;
/** @type {number} */
AmountDue;
/** @type {number} */
LateFee;
/** @type {string} */
ContractStatus;
/** @type {number} */
Amount;
/** @type {Item360[]} */
ContractItems;
}
export class History360Response extends BaseResponse {
/** @param {{Invoices?:Invoice360[],Orders?:Order360[],WorkOrders?:WorkOrder360[],Contracts?:Contract360[],Status?:BaseResponseResult}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/** @type {Invoice360[]} */
Invoices;
/** @type {Order360[]} */
Orders;
/** @type {WorkOrder360[]} */
WorkOrders;
/** @type {Contract360[]} */
Contracts;
}
export class History360Request extends BaseSecureRequest {
/** @param {{CustomerAccount?:number,IncludeInvoices?:boolean,IncludeOrders?:boolean,IncludeWorkOrders?:boolean,IncludeContracts?:boolean,IncludeClosed?:boolean,ClosedStartDate?:string,Token?:string,DeviceId?:string,AppId?:string,ApiKey?:string,OAuthToken?:string}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/** @type {number} */
CustomerAccount;
/** @type {boolean} */
IncludeInvoices;
/** @type {boolean} */
IncludeOrders;
/** @type {boolean} */
IncludeWorkOrders;
/** @type {boolean} */
IncludeContracts;
/** @type {boolean} */
IncludeClosed;
/** @type {?string} */
ClosedStartDate;
}
JavaScript History360Request DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /api/History360 HTTP/1.1 Host: active-ewebservice.biz Accept: text/jsonl
HTTP/1.1 200 OK Content-Type: text/jsonl Content-Length: length {"Invoices":[{"Id":"String","DueDate":"0001-01-01T00:00:00.0000000","Total":0,"Status":"String","AmountPaid":0,"LateFeeAmount":0,"StoreLocationId":0,"Items":[{"PslrId":0,"Quantity":0,"Price":0,"TotalDiscountAmount":0,"SerialNumber":"String","Condition":"String"}]}],"Orders":[{"Id":0,"Discount":0,"PaymentType":"String","SubTotal":0,"Tax":0,"ShippingAmount":0,"Total":0}],"WorkOrders":[{"Id":"String","Status":"String","Deposit":0,"StoreLocationId":0,"CompletedDate":"0001-01-01T00:00:00.0000000","Price":0,"Jobs":[{"ItemId":"String","ItemType":"String","Title":"String","Quantity":0,"Price":0,"TotalDiscountAmount":0,"SerialNumber":"String","Condition":"String"}]}],"Contracts":[{"Id":"String","StoreLocationId":0,"AmountDue":0,"LateFee":0,"ContractStatus":"String","Amount":0,"ContractItems":[{"PslrId":0,"Quantity":0,"Price":0,"TotalDiscountAmount":0,"SerialNumber":"String","Condition":"String"}]}],"Status":{"StatusCode":"String","Login":"String","ErrorCode":"String","ErrorDisplayText":"String","ErrorMessage":"String","DomainName":"String","IpAddress":"String"}}