POST, GET | /api/C2BGetInstrumentInfo |
---|
"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 C2BGradeGeneric {
/** @param {{Level?:number,Grade?:string,DownPay?:number,DownMaint?:number,MoPay?:number,MoMaint?:number,Id?:number,OutOfStock?:boolean,RentPrice?:number,CashPrice?:number,DownPayTax?:number,DownMaintTax?:number,MoPayTax?:number,MoMaintTax?:number,RentPricePlusTax?:number,RentPricePlusTaxLessDownpay?:number,Months?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
Level;
/** @type {string} */
Grade;
/** @type {number} */
DownPay;
/** @type {number} */
DownMaint;
/** @type {number} */
MoPay;
/** @type {number} */
MoMaint;
/** @type {number} */
Id;
/** @type {boolean} */
OutOfStock;
/** @type {number} */
RentPrice;
/** @type {number} */
CashPrice;
/** @type {?number} */
DownPayTax;
/** @type {?number} */
DownMaintTax;
/** @type {?number} */
MoPayTax;
/** @type {?number} */
MoMaintTax;
/** @type {number} */
RentPricePlusTax;
/** @type {number} */
RentPricePlusTaxLessDownpay;
/** @type {number} */
Months;
}
export class C2BAccessoryGeneric {
/** @param {{AccessoryDesc?:string,Price?:number,Required?:boolean,Default?:boolean,RequiresLocation?:boolean,Type?:string,Topic?:string,Id?:number,DisplayOrder?:number,Sku?:string,TaxAmount?:number,CatNum?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
AccessoryDesc;
/** @type {number} */
Price;
/** @type {boolean} */
Required;
/** @type {boolean} */
Default;
/** @type {boolean} */
RequiresLocation;
/** @type {string} */
Type;
/** @type {string} */
Topic;
/** @type {number} */
Id;
/** @type {number} */
DisplayOrder;
/** @type {string} */
Sku;
/** @type {?number} */
TaxAmount;
/** @type {?number} */
CatNum;
}
export class C2BInstrumentGeneric {
/** @param {{InstrumentName?:string,Sku?:string,Topic?:string,Image?:string,Level?:number,RentPrice?:number,CashPrice?:number,Token?:string,InstrumentId?:number,InstrumentTeacherId?:number,GradeList?:C2BGradeGeneric[],HasGrades?:boolean,DisplayOrder?:number,AccessoryList?:C2BAccessoryGeneric[],DeliveryList?:C2BAccessoryGeneric[],MaintenanceList?:C2BAccessoryGeneric[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
InstrumentName;
/** @type {string} */
Sku;
/** @type {string} */
Topic;
/** @type {string} */
Image;
/** @type {number} */
Level;
/** @type {?number} */
RentPrice;
/** @type {?number} */
CashPrice;
/** @type {string} */
Token;
/** @type {number} */
InstrumentId;
/** @type {number} */
InstrumentTeacherId;
/** @type {C2BGradeGeneric[]} */
GradeList;
/** @type {boolean} */
HasGrades;
/** @type {number} */
DisplayOrder;
/** @type {C2BAccessoryGeneric[]} */
AccessoryList;
/** @type {C2BAccessoryGeneric[]} */
DeliveryList;
/** @type {C2BAccessoryGeneric[]} */
MaintenanceList;
}
export class C2BGetInstrumentInfoResponse extends BaseResponse {
/** @param {{Instruments?:C2BInstrumentGeneric[],Status?:BaseResponseResult}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/** @type {C2BInstrumentGeneric[]} */
Instruments;
}
export class C2BGetInstrumentInfoRequest extends BaseSecureRequest {
/** @param {{RsiPk?:number,TeacherId?:number,PlanCode?:string,GetDetails?:boolean,IncludeOutOfStockItems?:boolean,IncludeAccessoryOptions?:boolean,IncludeDeliveryOptions?:boolean,IncludeMaintenanceOptions?:boolean,Token?:string,DeviceId?:string,AppId?:string,ApiKey?:string,OAuthToken?:string}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/**
* @type {?number}
* @description ID of the Teacher/Instrument record. */
RsiPk;
/**
* @type {?number}
* @description ID of the Teacher record. */
TeacherId;
/**
* @type {string}
* @description Optional Plan Code Override. If not sent, plancode from the school will be used. */
PlanCode;
/**
* @type {?boolean}
* @description If set to false, less details will be sent. Defaults to True. */
GetDetails;
/**
* @type {?boolean}
* @description If set to true, Out of Stock items will be included. */
IncludeOutOfStockItems;
/**
* @type {?boolean}
* @description If set to true, each instrument will include a list of accessory options. Defaults to False. */
IncludeAccessoryOptions;
/**
* @type {?boolean}
* @description If set to true, each instrument will include a list of delivery options. Defaults to False. */
IncludeDeliveryOptions;
/**
* @type {?boolean}
* @description If set to true, each instrument will include a list of maintenance options. Defaults to False. */
IncludeMaintenanceOptions;
}
JavaScript C2BGetInstrumentInfoRequest 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.
POST /api/C2BGetInstrumentInfo HTTP/1.1
Host: active-ewebservice.biz
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<C2BGetInstrumentInfoRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AIM.WebService">
<ApiKey>String</ApiKey>
<OAuthToken>String</OAuthToken>
<AppId>String</AppId>
<DeviceId>String</DeviceId>
<Token>String</Token>
<GetDetails>false</GetDetails>
<IncludeAccessoryOptions>false</IncludeAccessoryOptions>
<IncludeDeliveryOptions>false</IncludeDeliveryOptions>
<IncludeMaintenanceOptions>false</IncludeMaintenanceOptions>
<IncludeOutOfStockItems>false</IncludeOutOfStockItems>
<PlanCode>String</PlanCode>
<RsiPk>0</RsiPk>
<TeacherId>0</TeacherId>
</C2BGetInstrumentInfoRequest>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <C2BGetInstrumentInfoResponse 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> <Instruments xmlns:d2p1="http://schemas.datacontract.org/2004/07/AIM"> <d2p1:C2BInstrumentGeneric i:nil="true" /> </Instruments> </C2BGetInstrumentInfoResponse>