POST, GET | /api/C2BGetInstrumentDetail |
---|
"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 C2BPlanCodeGeneric {
/** @param {{Code?:string,Name?:string,Months?:number,Topic?:string,Url?:string,FinalTopic?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Code;
/** @type {string} */
Name;
/** @type {number} */
Months;
/** @type {string} */
Topic;
/** @type {string} */
Url;
/** @type {string} */
FinalTopic;
}
export class C2BDeliveryInfo {
/** @param {{FirstDelivery?:string,DeliveryTime?:string,DeliveryThreshold?:number,SundayDelivery?:boolean,MondayDelivery?:boolean,TuesdayDelivery?:boolean,WednesdayDelivery?:boolean,ThursdayDelivery?:boolean,FridayDelivery?:boolean,SaturdayDelivery?:boolean}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
FirstDelivery;
/** @type {string} */
DeliveryTime;
/** @type {number} */
DeliveryThreshold;
/** @type {boolean} */
SundayDelivery;
/** @type {boolean} */
MondayDelivery;
/** @type {boolean} */
TuesdayDelivery;
/** @type {boolean} */
WednesdayDelivery;
/** @type {boolean} */
ThursdayDelivery;
/** @type {boolean} */
FridayDelivery;
/** @type {boolean} */
SaturdayDelivery;
}
export class C2BTeacherGeneric {
/** @param {{TeacherName?:string,SchoolName?:string,DistrictName?:string,Topic?:string,Id?:number,DeliveryInfo?:C2BDeliveryInfo,AIMSchoolId?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
TeacherName;
/** @type {string} */
SchoolName;
/** @type {string} */
DistrictName;
/** @type {string} */
Topic;
/** @type {number} */
Id;
/** @type {C2BDeliveryInfo} */
DeliveryInfo;
/** @type {?number} */
AIMSchoolId;
}
export class C2BSchoolGeneric {
/** @param {{SchoolName?:string,DistrictName?:string,TeacherCount?:number,Topic?:string,Id?:number,DeliveryInfo?:C2BDeliveryInfo,AIMSchoolId?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
SchoolName;
/** @type {string} */
DistrictName;
/** @type {number} */
TeacherCount;
/** @type {string} */
Topic;
/** @type {number} */
Id;
/** @type {C2BDeliveryInfo} */
DeliveryInfo;
/** @type {?number} */
AIMSchoolId;
}
export class C2BDistrictGeneric {
/** @param {{DistrictName?:string,SchoolCount?:number,TeacherCount?:number,Topic?:string,Id?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
DistrictName;
/** @type {number} */
SchoolCount;
/** @type {number} */
TeacherCount;
/** @type {string} */
Topic;
/** @type {number} */
Id;
}
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 C2BInstrumentDetailGeneric {
/** @param {{PlanCode?:C2BPlanCodeGeneric,Teacher?:C2BTeacherGeneric,School?:C2BSchoolGeneric,DeliveryDate?:string,SalesPerson?:string,District?:C2BDistrictGeneric,Instrument?:C2BInstrumentGeneric,Grade?:C2BGradeGeneric,AccessoryList?:C2BAccessoryGeneric[],DeliveryList?:C2BAccessoryGeneric[],MaintenanceList?:C2BAccessoryGeneric[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {C2BPlanCodeGeneric} */
PlanCode;
/** @type {C2BTeacherGeneric} */
Teacher;
/** @type {C2BSchoolGeneric} */
School;
/** @type {string} */
DeliveryDate;
/** @type {string} */
SalesPerson;
/** @type {C2BDistrictGeneric} */
District;
/** @type {C2BInstrumentGeneric} */
Instrument;
/** @type {C2BGradeGeneric} */
Grade;
/** @type {C2BAccessoryGeneric[]} */
AccessoryList;
/** @type {C2BAccessoryGeneric[]} */
DeliveryList;
/** @type {C2BAccessoryGeneric[]} */
MaintenanceList;
}
export class MobileLayout {
/** @param {{title?:string,returnurl?:string,sections?:Section[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
title;
/** @type {string} */
returnurl;
/** @type {Section[]} */
sections;
}
export class C2BGetInstrumentDetailResponse extends BaseResponse {
/** @param {{InstrumentDetails?:C2BInstrumentDetailGeneric,MobileLayout?:MobileLayout,Status?:BaseResponseResult}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/** @type {C2BInstrumentDetailGeneric} */
InstrumentDetails;
/** @type {MobileLayout} */
MobileLayout;
}
export class C2BGetInstrumentDetailRequest extends BaseSecureRequest {
/** @param {{RsiPk?:number,TeacherId?:number,InstrumentId?:number,RateId?:number,IncludeMobileLayout?:string,DeliveryId?:number,LocationId?:number,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. Either this *or* TeacherId + InstrumentId must be sent. */
RsiPk;
/**
* @type {?number}
* @description ID of the Teacher record. Either this+InstrumentID *or* RsiPk must be sent. */
TeacherId;
/**
* @type {?number}
* @description ID of the Instrument record. Either this+TeacherID *or* RsiPk must be sent. */
InstrumentId;
/**
* @type {number}
* @description ID of the Rate to be used. This is required. */
RateId;
/**
* @type {string}
* @description If 'Y', then Mobile Layout will be returned. */
IncludeMobileLayout;
/**
* @type {number}
* @description ID of the Delivery option to be used. */
DeliveryId;
/**
* @type {number}
* @description ID of the Location. Used for Location required Delivery options. */
LocationId;
}
export class Section {
/** @param {{header?:string,id?:string,margin?:string,elements?:Element[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
header;
/** @type {string} */
id;
/** @type {string} */
margin;
/** @type {Element[]} */
elements;
}
export class LicenseMap {
/** @param {{name?:string,value?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
name;
/** @type {string} */
value;
}
export class Element {
/** @param {{type?:string,label?:string,id?:string,fontsize?:string,margin?:string,backgroundcolor?:string,textcolor?:string,height?:string,width?:string,value?:string,addvalue?:boolean,values?:string[],textalign?:string,required?:boolean,placeholder?:string,fontbold?:boolean,selected?:boolean,disabled?:boolean,totalamount?:boolean,elements?:Element[],map?:LicenseMap[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
type;
/** @type {string} */
label;
/** @type {string} */
id;
/** @type {string} */
fontsize;
/** @type {string} */
margin;
/** @type {string} */
backgroundcolor;
/** @type {string} */
textcolor;
/** @type {string} */
height;
/** @type {string} */
width;
/** @type {string} */
value;
/** @type {boolean} */
addvalue;
/** @type {string[]} */
values;
/** @type {string} */
textalign;
/** @type {?boolean} */
required;
/** @type {string} */
placeholder;
/** @type {?boolean} */
fontbold;
/** @type {?boolean} */
selected;
/** @type {?boolean} */
disabled;
/** @type {?boolean} */
totalamount;
/** @type {Element[]} */
elements;
/** @type {LicenseMap[]} */
map;
}
JavaScript C2BGetInstrumentDetailRequest 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.
POST /api/C2BGetInstrumentDetail HTTP/1.1
Host: active-ewebservice.biz
Accept: application/json
Content-Type: application/json
Content-Length: length
{"RsiPk":0,"TeacherId":0,"InstrumentId":0,"RateId":0,"IncludeMobileLayout":"String","DeliveryId":0,"LocationId":0,"Token":"String","DeviceId":"String","AppId":"String","ApiKey":"String","OAuthToken":"String"}
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"MobileLayout":{"title":"String","returnurl":"String","sections":[{"header":"String","id":"String","margin":"String","elements":[{"type":"String","label":"String","id":"String","fontsize":"String","margin":"String","backgroundcolor":"String","textcolor":"String","height":"String","width":"String","value":"String","addvalue":false,"values":["String"],"textalign":"String","required":false,"placeholder":"String","fontbold":false,"selected":false,"disabled":false,"totalamount":false}]}]},"Status":{"StatusCode":"String","Login":"String","ErrorCode":"String","ErrorDisplayText":"String","ErrorMessage":"String","DomainName":"String","IpAddress":"String"}}