GET | /api/InvoiceDetail |
---|
"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 InvoiceLineItem {
/** @param {{Quantity?:number,Sku?:string,Description?:string,PriceEach?:number,Extended?:number,Discount?:number,Total?:number,OriginalRef?:string,Notes?:string,Source?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
Quantity;
/** @type {string} */
Sku;
/** @type {string} */
Description;
/** @type {number} */
PriceEach;
/** @type {number} */
Extended;
/** @type {number} */
Discount;
/** @type {number} */
Total;
/** @type {string} */
OriginalRef;
/** @type {string} */
Notes;
/** @type {string} */
Source;
}
export class InvoicePaymentItem {
/** @param {{PayRef?:string,DateTime?:string,Amount?:number,Notes?:string,Source?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
PayRef;
/** @type {string} */
DateTime;
/** @type {number} */
Amount;
/** @type {string} */
Notes;
/** @type {string} */
Source;
}
export class InvoiceInfo {
/** @param {{InvoiceNumber?:string,DateTime?:string,SoldToAcct?:number,SoldToName?:string,BillToAcct?:number,BillToName?:string,Type?:string,PO?:string,OriginalAmount?:number,Balance?:number,Location?:string,ShipToName?:string,ShipToAddress?:string,ShipToId?:number,LineItems?:InvoiceLineItem[],Payments?:InvoicePaymentItem[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
InvoiceNumber;
/** @type {string} */
DateTime;
/** @type {number} */
SoldToAcct;
/** @type {string} */
SoldToName;
/** @type {number} */
BillToAcct;
/** @type {string} */
BillToName;
/** @type {string} */
Type;
/** @type {string} */
PO;
/** @type {number} */
OriginalAmount;
/** @type {number} */
Balance;
/** @type {string} */
Location;
/** @type {string} */
ShipToName;
/** @type {string} */
ShipToAddress;
/** @type {?number} */
ShipToId;
/** @type {InvoiceLineItem[]} */
LineItems;
/** @type {InvoicePaymentItem[]} */
Payments;
}
export class InvoiceDetailResponse extends BaseResponse {
/** @param {{Invoices?:InvoiceInfo[],RemainingRecords?:number,Status?:BaseResponseResult}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/** @type {InvoiceInfo[]} */
Invoices;
/** @type {number} */
RemainingRecords;
}
export class InvoiceDetailRequest extends BaseSecureRequest {
/** @param {{Acct?:number,InvoiceStartDate?:string,InvoiceEndDate?:string,StartOffset?:number,RecordCount?:number,AIMRef?:string,WebRef?:string,Token?:string,DeviceId?:string,AppId?:string,ApiKey?:string,OAuthToken?:string}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/** @type {?number} */
Acct;
/** @type {?string} */
InvoiceStartDate;
/** @type {?string} */
InvoiceEndDate;
/**
* @type {?number}
* @description The Starting Offset. Defaults to 0 if not sent. */
StartOffset;
/**
* @type {?number}
* @description The # of records to be returned. Defaults to 100 if not sent. */
RecordCount;
/**
* @type {string}
* @description The Invoice Ref# to be looked up. If sent, do not send WebRef, Acct, InvoiceStartDate, InvoiceEndDate, StartOffset, or RecordCount */
AIMRef;
/**
* @type {string}
* @description The WebRef to be looked up. If sent, do not send AIMRef, Acct, InvoiceStartDate, InvoiceEndDate, StartOffset, or RecordCount */
WebRef;
}
JavaScript InvoiceDetailRequest 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/InvoiceDetail HTTP/1.1 Host: active-ewebservice.biz Accept: application/xml
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <InvoiceDetailResponse 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> <Invoices> <InvoiceInfo> <Balance>0</Balance> <BillToAcct>0</BillToAcct> <BillToName>String</BillToName> <DateTime>0001-01-01T00:00:00</DateTime> <InvoiceNumber>String</InvoiceNumber> <LineItems> <InvoiceLineItem> <Description>String</Description> <Discount>0</Discount> <Extended>0</Extended> <Notes>String</Notes> <OriginalRef>String</OriginalRef> <PriceEach>0</PriceEach> <Quantity>0</Quantity> <Sku>String</Sku> <Source>String</Source> <Total>0</Total> </InvoiceLineItem> </LineItems> <Location>String</Location> <OriginalAmount>0</OriginalAmount> <PO>String</PO> <Payments> <InvoicePaymentItem> <Amount>0</Amount> <DateTime>0001-01-01T00:00:00</DateTime> <Notes>String</Notes> <PayRef>String</PayRef> <Source>String</Source> </InvoicePaymentItem> </Payments> <ShipToAddress>String</ShipToAddress> <ShipToId>0</ShipToId> <ShipToName>String</ShipToName> <SoldToAcct>0</SoldToAcct> <SoldToName>String</SoldToName> <Type>String</Type> </InvoiceInfo> </Invoices> <RemainingRecords>0</RemainingRecords> </InvoiceDetailResponse>