GET | /api/CategoryListing |
---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
/**
* CategoryListingRequires active-e Inventory Service.
*/
@DataContract
public static class CategoryListingRequest extends BaseSecureRequest
{
/**
* If true, Inactive Categories and Subcategories will be returned. Defaults to false.
*/
@DataMember
@ApiMember(DataType="boolean", Description="If true, Inactive Categories and Subcategories will be returned. Defaults to false.", Name="IncludeInactive", ParameterType="query")
public Boolean IncludeInactive = null;
/**
* Category Number lookup. If sent, only this category and it's subs will be returned. Further parameters will be ignored.
*/
@DataMember
@ApiMember(DataType="integer", Description="Category Number lookup. If sent, only this category and it's subs will be returned. Further parameters will be ignored.", Format="int64", Name="CategoryNumber", ParameterType="query")
public Integer CategoryNumber = null;
/**
* If true, Inventory Categories will be returned. Defaults to true.
*/
@DataMember
@ApiMember(DataType="boolean", Description="If true, Inventory Categories will be returned. Defaults to true.", Name="IncludeInventory", ParameterType="query")
public Boolean IncludeInventory = null;
/**
* If true, Non-Inventory Categories will be returned. Defaults to false.
*/
@DataMember
@ApiMember(DataType="boolean", Description="If true, Non-Inventory Categories will be returned. Defaults to false.", Name="IncludeNonInventory", ParameterType="query")
public Boolean IncludeNonInventory = null;
/**
* If true, Return Payment Categories will be returned. Defaults to false.
*/
@DataMember
@ApiMember(DataType="boolean", Description="If true, Return Payment Categories will be returned. Defaults to false.", Name="IncludeReturn", ParameterType="query")
public Boolean IncludeReturn = null;
/**
* If true, Payment Categories will be returned. Defaults to false.
*/
@DataMember
@ApiMember(DataType="boolean", Description="If true, Payment Categories will be returned. Defaults to false.", Name="IncludePayment", ParameterType="query")
public Boolean IncludePayment = null;
public Boolean isIncludeInactive() { return IncludeInactive; }
public CategoryListingRequest setIncludeInactive(Boolean value) { this.IncludeInactive = value; return this; }
public Integer getCategoryNumber() { return CategoryNumber; }
public CategoryListingRequest setCategoryNumber(Integer value) { this.CategoryNumber = value; return this; }
public Boolean isIncludeInventory() { return IncludeInventory; }
public CategoryListingRequest setIncludeInventory(Boolean value) { this.IncludeInventory = value; return this; }
public Boolean isIncludeNonInventory() { return IncludeNonInventory; }
public CategoryListingRequest setIncludeNonInventory(Boolean value) { this.IncludeNonInventory = value; return this; }
public Boolean isIncludeReturn() { return IncludeReturn; }
public CategoryListingRequest setIncludeReturn(Boolean value) { this.IncludeReturn = value; return this; }
public Boolean isIncludePayment() { return IncludePayment; }
public CategoryListingRequest setIncludePayment(Boolean value) { this.IncludePayment = 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 CategoryListingResponse extends BaseResponse
{
@DataMember
public ArrayList<CategoryInfo> CategoryListing = null;
public ArrayList<CategoryInfo> getCategoryListing() { return CategoryListing; }
public CategoryListingResponse setCategoryListing(ArrayList<CategoryInfo> value) { this.CategoryListing = 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 CategoryInfo
{
@DataMember
public Integer CategoryNumber = null;
@DataMember
public String CategoryType = null;
@DataMember
public String Description = null;
@DataMember
public Boolean Active = null;
@DataMember
public ArrayList<SubCategoryInfo> SubCategoryListing = null;
@DataMember
public String PaymentCategoryType = null;
@DataMember
public Boolean AllowedOnMobile = null;
public Integer getCategoryNumber() { return CategoryNumber; }
public CategoryInfo setCategoryNumber(Integer value) { this.CategoryNumber = value; return this; }
public String getCategoryType() { return CategoryType; }
public CategoryInfo setCategoryType(String value) { this.CategoryType = value; return this; }
public String getDescription() { return Description; }
public CategoryInfo setDescription(String value) { this.Description = value; return this; }
public Boolean isActive() { return Active; }
public CategoryInfo setActive(Boolean value) { this.Active = value; return this; }
public ArrayList<SubCategoryInfo> getSubCategoryListing() { return SubCategoryListing; }
public CategoryInfo setSubCategoryListing(ArrayList<SubCategoryInfo> value) { this.SubCategoryListing = value; return this; }
public String getPaymentCategoryType() { return PaymentCategoryType; }
public CategoryInfo setPaymentCategoryType(String value) { this.PaymentCategoryType = value; return this; }
public Boolean isAllowedOnMobile() { return AllowedOnMobile; }
public CategoryInfo setAllowedOnMobile(Boolean value) { this.AllowedOnMobile = value; return this; }
}
@DataContract
public static class SubCategoryInfo
{
@DataMember
public Integer SubNumber = null;
@DataMember
public String Description = null;
@DataMember
public Boolean Active = null;
@DataMember
public BigDecimal Price = null;
@DataMember
public ArrayList<SubCategoryAttributeInfo> SkuAttributes = null;
@DataMember
public ArrayList<SubCategoryAttributeInfo> SerialAttributes = null;
public Integer getSubNumber() { return SubNumber; }
public SubCategoryInfo setSubNumber(Integer value) { this.SubNumber = value; return this; }
public String getDescription() { return Description; }
public SubCategoryInfo setDescription(String value) { this.Description = value; return this; }
public Boolean isActive() { return Active; }
public SubCategoryInfo setActive(Boolean value) { this.Active = value; return this; }
public BigDecimal getPrice() { return Price; }
public SubCategoryInfo setPrice(BigDecimal value) { this.Price = value; return this; }
public ArrayList<SubCategoryAttributeInfo> getSkuAttributes() { return SkuAttributes; }
public SubCategoryInfo setSkuAttributes(ArrayList<SubCategoryAttributeInfo> value) { this.SkuAttributes = value; return this; }
public ArrayList<SubCategoryAttributeInfo> getSerialAttributes() { return SerialAttributes; }
public SubCategoryInfo setSerialAttributes(ArrayList<SubCategoryAttributeInfo> value) { this.SerialAttributes = value; return this; }
}
@DataContract
public static class SubCategoryAttributeInfo
{
@DataMember
public String AttributeName = null;
@DataMember
public Integer Priority = null;
public String getAttributeName() { return AttributeName; }
public SubCategoryAttributeInfo setAttributeName(String value) { this.AttributeName = value; return this; }
public Integer getPriority() { return Priority; }
public SubCategoryAttributeInfo setPriority(Integer value) { this.Priority = value; return this; }
}
}
Java CategoryListingRequest 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/CategoryListing HTTP/1.1 Host: active-ewebservice.biz Accept: text/jsonl
HTTP/1.1 200 OK Content-Type: text/jsonl Content-Length: length {"CategoryListing":[{"CategoryNumber":0,"CategoryType":"String","Description":"String","Active":false,"SubCategoryListing":[{"SubNumber":0,"Description":"String","Active":false,"Price":0,"SkuAttributes":[{"AttributeName":"String","Priority":0}],"SerialAttributes":[{"AttributeName":"String","Priority":0}]}],"PaymentCategoryType":"String","AllowedOnMobile":false}],"Status":{"StatusCode":"String","Login":"String","ErrorCode":"String","ErrorDisplayText":"String","ErrorMessage":"String","DomainName":"String","IpAddress":"String"}}