POST, GET | /api/C2BGetInstrumentInfo |
---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
/**
* C2BGetInstrumentInfoRequires active-e Contracts Service.
*/
@DataContract
public static class C2BGetInstrumentInfoRequest extends BaseSecureRequest
{
/**
* ID of the Teacher/Instrument record.
*/
@DataMember
@ApiMember(DataType="integer", Description="ID of the Teacher/Instrument record.", Format="int64", Name="RsiPk", ParameterType="query")
public Long RsiPk = null;
/**
* ID of the Teacher record.
*/
@DataMember
@ApiMember(DataType="integer", Description="ID of the Teacher record.", Format="int64", Name="TeacherId", ParameterType="query")
public Long TeacherId = null;
/**
* Optional Plan Code Override. If not sent, plancode from the school will be used.
*/
@DataMember
@ApiMember(DataType="string", Description="Optional Plan Code Override. If not sent, plancode from the school will be used.", Name="PlanCode", ParameterType="query")
public String PlanCode = null;
/**
* If set to false, less details will be sent. Defaults to True.
*/
@DataMember
@ApiMember(DataType="boolean", Description="If set to false, less details will be sent. Defaults to True.", Name="GetDetails", ParameterType="query")
public Boolean GetDetails = null;
/**
* If set to true, Out of Stock items will be included.
*/
@DataMember
@ApiMember(DataType="boolean", Description="If set to true, Out of Stock items will be included.", Name="IncludeOutOfStockItems", ParameterType="query")
public Boolean IncludeOutOfStockItems = null;
/**
* If set to true, each instrument will include a list of accessory options. Defaults to False.
*/
@DataMember
@ApiMember(DataType="boolean", Description="If set to true, each instrument will include a list of accessory options. Defaults to False.", Name="IncludeAccessoryOptions", ParameterType="query")
public Boolean IncludeAccessoryOptions = null;
/**
* If set to true, each instrument will include a list of delivery options. Defaults to False.
*/
@DataMember
@ApiMember(DataType="boolean", Description="If set to true, each instrument will include a list of delivery options. Defaults to False.", Name="IncludeDeliveryOptions", ParameterType="query")
public Boolean IncludeDeliveryOptions = null;
/**
* If set to true, each instrument will include a list of maintenance options. Defaults to False.
*/
@DataMember
@ApiMember(DataType="boolean", Description="If set to true, each instrument will include a list of maintenance options. Defaults to False.", Name="IncludeMaintenanceOptions", ParameterType="query")
public Boolean IncludeMaintenanceOptions = null;
public Long getRsiPk() { return RsiPk; }
public C2BGetInstrumentInfoRequest setRsiPk(Long value) { this.RsiPk = value; return this; }
public Long getTeacherId() { return TeacherId; }
public C2BGetInstrumentInfoRequest setTeacherId(Long value) { this.TeacherId = value; return this; }
public String getPlanCode() { return PlanCode; }
public C2BGetInstrumentInfoRequest setPlanCode(String value) { this.PlanCode = value; return this; }
public Boolean isGetDetails() { return GetDetails; }
public C2BGetInstrumentInfoRequest setGetDetails(Boolean value) { this.GetDetails = value; return this; }
public Boolean isIncludeOutOfStockItems() { return IncludeOutOfStockItems; }
public C2BGetInstrumentInfoRequest setIncludeOutOfStockItems(Boolean value) { this.IncludeOutOfStockItems = value; return this; }
public Boolean isIncludeAccessoryOptions() { return IncludeAccessoryOptions; }
public C2BGetInstrumentInfoRequest setIncludeAccessoryOptions(Boolean value) { this.IncludeAccessoryOptions = value; return this; }
public Boolean isIncludeDeliveryOptions() { return IncludeDeliveryOptions; }
public C2BGetInstrumentInfoRequest setIncludeDeliveryOptions(Boolean value) { this.IncludeDeliveryOptions = value; return this; }
public Boolean isIncludeMaintenanceOptions() { return IncludeMaintenanceOptions; }
public C2BGetInstrumentInfoRequest setIncludeMaintenanceOptions(Boolean value) { this.IncludeMaintenanceOptions = value; return this; }
}
@DataContract
public static class BaseSecureRequest extends BaseRequest
{
/**
*
*/
@DataMember
@ApiMember(DataType="string", Description="", Name="Token", ParameterType="Header")
public String Token = null;
/**
*
*/
@DataMember
@ApiMember(DataType="string", Description="", Name="DeviceId", ParameterType="Header")
public String DeviceId = null;
/**
*
*/
@DataMember
@ApiMember(DataType="string", Description="", IsRequired=true, Name="AppId", ParameterType="Header")
public String AppId = null;
public String getToken() { return Token; }
public BaseSecureRequest setToken(String value) { this.Token = value; return this; }
public String getDeviceId() { return DeviceId; }
public BaseSecureRequest setDeviceId(String value) { this.DeviceId = value; return this; }
public String getAppId() { return AppId; }
public BaseSecureRequest setAppId(String value) { this.AppId = value; return this; }
}
@DataContract
public static class BaseRequest
{
/**
* This is your AIM API Key provided by Tri-Tech
*/
@DataMember
@ApiMember(DataType="string", Description="This is your AIM API Key provided by Tri-Tech", IsRequired=true, Name="ApiKey", ParameterType="header")
public String ApiKey = null;
@DataMember
@ApiMember(DataType="string", Name="OAuthToken", ParameterType="header")
public String OAuthToken = null;
public String getApiKey() { return ApiKey; }
public BaseRequest setApiKey(String value) { this.ApiKey = value; return this; }
public String getOAuthToken() { return OAuthToken; }
public BaseRequest setOAuthToken(String value) { this.OAuthToken = value; return this; }
}
@DataContract
public static class C2BGetInstrumentInfoResponse extends BaseResponse
{
@DataMember
public ArrayList<C2BInstrumentGeneric> Instruments = null;
public ArrayList<C2BInstrumentGeneric> getInstruments() { return Instruments; }
public C2BGetInstrumentInfoResponse setInstruments(ArrayList<C2BInstrumentGeneric> value) { this.Instruments = value; return this; }
}
@DataContract
public static class BaseResponse
{
/**
*
*/
@DataMember
@ApiMember(DataType="BaseResponseResult", Description="", Name="Status", ParameterType="body")
public BaseResponseResult Status = null;
public BaseResponseResult getStatus() { return Status; }
public BaseResponse setStatus(BaseResponseResult value) { this.Status = value; return this; }
}
@DataContract
public static class BaseResponseResult
{
/**
*
*/
@DataMember
@ApiMember(DataType="string", Description="", Name="StatusCode", ParameterType="body")
public String StatusCode = null;
/**
*
*/
@DataMember
@ApiMember(DataType="string", Description="", Name="Login", ParameterType="body")
public String Login = null;
/**
*
*/
@DataMember
@ApiMember(DataType="string", Description="", Name="ErrorCode", ParameterType="body")
public String ErrorCode = null;
/**
*
*/
@DataMember
@ApiMember(DataType="string", Description="", Name="ErrorDisplayText", ParameterType="body")
public String ErrorDisplayText = null;
/**
*
*/
@DataMember
@ApiMember(DataType="string", Description="", Name="ErrorMessage", ParameterType="body")
public String ErrorMessage = null;
/**
*
*/
@DataMember
@ApiMember(DataType="string", Description="", ExcludeInSchema=true, Name="DomainName", ParameterType="body")
public String DomainName = null;
/**
*
*/
@DataMember
@ApiMember(DataType="string", Description="", ExcludeInSchema=true, Name="IPAddress", ParameterType="body")
public String IpAddress = null;
public String getStatusCode() { return StatusCode; }
public BaseResponseResult setStatusCode(String value) { this.StatusCode = value; return this; }
public String getLogin() { return Login; }
public BaseResponseResult setLogin(String value) { this.Login = value; return this; }
public String getErrorCode() { return ErrorCode; }
public BaseResponseResult setErrorCode(String value) { this.ErrorCode = value; return this; }
public String getErrorDisplayText() { return ErrorDisplayText; }
public BaseResponseResult setErrorDisplayText(String value) { this.ErrorDisplayText = value; return this; }
public String getErrorMessage() { return ErrorMessage; }
public BaseResponseResult setErrorMessage(String value) { this.ErrorMessage = value; return this; }
public String getDomainName() { return DomainName; }
public BaseResponseResult setDomainName(String value) { this.DomainName = value; return this; }
public String getIpAddress() { return IpAddress; }
public BaseResponseResult setIpAddress(String value) { this.IpAddress = value; return this; }
}
@DataContract
public static class C2BInstrumentGeneric
{
@DataMember
public String InstrumentName = null;
@DataMember
public String Sku = null;
@DataMember
public String Topic = null;
@DataMember
public String Image = null;
@DataMember
public Integer Level = null;
@DataMember
public BigDecimal RentPrice = null;
@DataMember
public BigDecimal CashPrice = null;
@DataMember
public String Token = null;
@DataMember
public Long InstrumentId = null;
@DataMember
public Long InstrumentTeacherId = null;
@DataMember
public ArrayList<C2BGradeGeneric> GradeList = null;
@DataMember
public Boolean HasGrades = null;
@DataMember
public Integer DisplayOrder = null;
@DataMember
public ArrayList<C2BAccessoryGeneric> AccessoryList = null;
@DataMember
public ArrayList<C2BAccessoryGeneric> DeliveryList = null;
@DataMember
public ArrayList<C2BAccessoryGeneric> MaintenanceList = null;
public String getInstrumentName() { return InstrumentName; }
public C2BInstrumentGeneric setInstrumentName(String value) { this.InstrumentName = value; return this; }
public String getSku() { return Sku; }
public C2BInstrumentGeneric setSku(String value) { this.Sku = value; return this; }
public String getTopic() { return Topic; }
public C2BInstrumentGeneric setTopic(String value) { this.Topic = value; return this; }
public String getImage() { return Image; }
public C2BInstrumentGeneric setImage(String value) { this.Image = value; return this; }
public Integer getLevel() { return Level; }
public C2BInstrumentGeneric setLevel(Integer value) { this.Level = value; return this; }
public BigDecimal getRentPrice() { return RentPrice; }
public C2BInstrumentGeneric setRentPrice(BigDecimal value) { this.RentPrice = value; return this; }
public BigDecimal getCashPrice() { return CashPrice; }
public C2BInstrumentGeneric setCashPrice(BigDecimal value) { this.CashPrice = value; return this; }
public String getToken() { return Token; }
public C2BInstrumentGeneric setToken(String value) { this.Token = value; return this; }
public Long getInstrumentId() { return InstrumentId; }
public C2BInstrumentGeneric setInstrumentId(Long value) { this.InstrumentId = value; return this; }
public Long getInstrumentTeacherId() { return InstrumentTeacherId; }
public C2BInstrumentGeneric setInstrumentTeacherId(Long value) { this.InstrumentTeacherId = value; return this; }
public ArrayList<C2BGradeGeneric> getGradeList() { return GradeList; }
public C2BInstrumentGeneric setGradeList(ArrayList<C2BGradeGeneric> value) { this.GradeList = value; return this; }
public Boolean isHasGrades() { return HasGrades; }
public C2BInstrumentGeneric setHasGrades(Boolean value) { this.HasGrades = value; return this; }
public Integer getDisplayOrder() { return DisplayOrder; }
public C2BInstrumentGeneric setDisplayOrder(Integer value) { this.DisplayOrder = value; return this; }
public ArrayList<C2BAccessoryGeneric> getAccessoryList() { return AccessoryList; }
public C2BInstrumentGeneric setAccessoryList(ArrayList<C2BAccessoryGeneric> value) { this.AccessoryList = value; return this; }
public ArrayList<C2BAccessoryGeneric> getDeliveryList() { return DeliveryList; }
public C2BInstrumentGeneric setDeliveryList(ArrayList<C2BAccessoryGeneric> value) { this.DeliveryList = value; return this; }
public ArrayList<C2BAccessoryGeneric> getMaintenanceList() { return MaintenanceList; }
public C2BInstrumentGeneric setMaintenanceList(ArrayList<C2BAccessoryGeneric> value) { this.MaintenanceList = value; return this; }
}
@DataContract
public static class C2BGradeGeneric
{
@DataMember
public Integer Level = null;
@DataMember
public String Grade = null;
@DataMember
public BigDecimal DownPay = null;
@DataMember
public BigDecimal DownMaint = null;
@DataMember
public BigDecimal MoPay = null;
@DataMember
public BigDecimal MoMaint = null;
@DataMember
public Long Id = null;
@DataMember
public Boolean OutOfStock = null;
@DataMember
public BigDecimal RentPrice = null;
@DataMember
public BigDecimal CashPrice = null;
@DataMember
public BigDecimal DownPayTax = null;
@DataMember
public BigDecimal DownMaintTax = null;
@DataMember
public BigDecimal MoPayTax = null;
@DataMember
public BigDecimal MoMaintTax = null;
@DataMember
public BigDecimal RentPricePlusTax = null;
@DataMember
public BigDecimal RentPricePlusTaxLessDownpay = null;
@DataMember
public Integer Months = null;
public Integer getLevel() { return Level; }
public C2BGradeGeneric setLevel(Integer value) { this.Level = value; return this; }
public String getGrade() { return Grade; }
public C2BGradeGeneric setGrade(String value) { this.Grade = value; return this; }
public BigDecimal getDownPay() { return DownPay; }
public C2BGradeGeneric setDownPay(BigDecimal value) { this.DownPay = value; return this; }
public BigDecimal getDownMaint() { return DownMaint; }
public C2BGradeGeneric setDownMaint(BigDecimal value) { this.DownMaint = value; return this; }
public BigDecimal getMoPay() { return MoPay; }
public C2BGradeGeneric setMoPay(BigDecimal value) { this.MoPay = value; return this; }
public BigDecimal getMoMaint() { return MoMaint; }
public C2BGradeGeneric setMoMaint(BigDecimal value) { this.MoMaint = value; return this; }
public Long getId() { return Id; }
public C2BGradeGeneric setId(Long value) { this.Id = value; return this; }
public Boolean isOutOfStock() { return OutOfStock; }
public C2BGradeGeneric setOutOfStock(Boolean value) { this.OutOfStock = value; return this; }
public BigDecimal getRentPrice() { return RentPrice; }
public C2BGradeGeneric setRentPrice(BigDecimal value) { this.RentPrice = value; return this; }
public BigDecimal getCashPrice() { return CashPrice; }
public C2BGradeGeneric setCashPrice(BigDecimal value) { this.CashPrice = value; return this; }
public BigDecimal getDownPayTax() { return DownPayTax; }
public C2BGradeGeneric setDownPayTax(BigDecimal value) { this.DownPayTax = value; return this; }
public BigDecimal getDownMaintTax() { return DownMaintTax; }
public C2BGradeGeneric setDownMaintTax(BigDecimal value) { this.DownMaintTax = value; return this; }
public BigDecimal getMoPayTax() { return MoPayTax; }
public C2BGradeGeneric setMoPayTax(BigDecimal value) { this.MoPayTax = value; return this; }
public BigDecimal getMoMaintTax() { return MoMaintTax; }
public C2BGradeGeneric setMoMaintTax(BigDecimal value) { this.MoMaintTax = value; return this; }
public BigDecimal getRentPricePlusTax() { return RentPricePlusTax; }
public C2BGradeGeneric setRentPricePlusTax(BigDecimal value) { this.RentPricePlusTax = value; return this; }
public BigDecimal getRentPricePlusTaxLessDownpay() { return RentPricePlusTaxLessDownpay; }
public C2BGradeGeneric setRentPricePlusTaxLessDownpay(BigDecimal value) { this.RentPricePlusTaxLessDownpay = value; return this; }
public Integer getMonths() { return Months; }
public C2BGradeGeneric setMonths(Integer value) { this.Months = value; return this; }
}
@DataContract
public static class C2BAccessoryGeneric
{
@DataMember
public String AccessoryDesc = null;
@DataMember
public BigDecimal Price = null;
@DataMember
public Boolean Required = null;
@DataMember
public Boolean Default = null;
@DataMember
public Boolean RequiresLocation = null;
@DataMember
public String Type = null;
@DataMember
public String Topic = null;
@DataMember
public Long Id = null;
@DataMember
public Integer DisplayOrder = null;
@DataMember
public String Sku = null;
@DataMember
public BigDecimal TaxAmount = null;
@DataMember
public Integer CatNum = null;
public String getAccessoryDesc() { return AccessoryDesc; }
public C2BAccessoryGeneric setAccessoryDesc(String value) { this.AccessoryDesc = value; return this; }
public BigDecimal getPrice() { return Price; }
public C2BAccessoryGeneric setPrice(BigDecimal value) { this.Price = value; return this; }
public Boolean isRequired() { return Required; }
public C2BAccessoryGeneric setRequired(Boolean value) { this.Required = value; return this; }
public Boolean isDefault() { return Default; }
public C2BAccessoryGeneric setDefault(Boolean value) { this.Default = value; return this; }
public Boolean isRequiresLocation() { return RequiresLocation; }
public C2BAccessoryGeneric setRequiresLocation(Boolean value) { this.RequiresLocation = value; return this; }
public String getType() { return Type; }
public C2BAccessoryGeneric setType(String value) { this.Type = value; return this; }
public String getTopic() { return Topic; }
public C2BAccessoryGeneric setTopic(String value) { this.Topic = value; return this; }
public Long getId() { return Id; }
public C2BAccessoryGeneric setId(Long value) { this.Id = value; return this; }
public Integer getDisplayOrder() { return DisplayOrder; }
public C2BAccessoryGeneric setDisplayOrder(Integer value) { this.DisplayOrder = value; return this; }
public String getSku() { return Sku; }
public C2BAccessoryGeneric setSku(String value) { this.Sku = value; return this; }
public BigDecimal getTaxAmount() { return TaxAmount; }
public C2BAccessoryGeneric setTaxAmount(BigDecimal value) { this.TaxAmount = value; return this; }
public Integer getCatNum() { return CatNum; }
public C2BAccessoryGeneric setCatNum(Integer value) { this.CatNum = value; return this; }
}
}
Java C2BGetInstrumentInfoRequest 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/C2BGetInstrumentInfo HTTP/1.1
Host: active-ewebservice.biz
Accept: application/json
Content-Type: application/json
Content-Length: length
{"RsiPk":0,"TeacherId":0,"PlanCode":"String","GetDetails":false,"IncludeOutOfStockItems":false,"IncludeAccessoryOptions":false,"IncludeDeliveryOptions":false,"IncludeMaintenanceOptions":false,"Token":"String","DeviceId":"String","AppId":"String","ApiKey":"String","OAuthToken":"String"}
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"Instruments":[{}],"Status":{"StatusCode":"String","Login":"String","ErrorCode":"String","ErrorDisplayText":"String","ErrorMessage":"String","DomainName":"String","IpAddress":"String"}}