POST | /api/StoreToStoreTransfer |
---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
/**
* StoreToStoreTransferRequires active-e Inventory Service
*/
@DataContract
public static class StoreToStoreTransferRequest extends BaseSecureRequest
{
@DataMember
public Long FromLocPk = null;
@DataMember
public String FromLocation = null;
@DataMember
public Long ToLocPk = null;
@DataMember
public String ToLocation = null;
@DataMember
public ArrayList<ScanTransferItem> Items = null;
@DataMember
public Boolean IsRequest = null;
@DataMember
public String RequestRefNumber = null;
@DataMember
public String Notes = null;
public Long getFromLocPk() { return FromLocPk; }
public StoreToStoreTransferRequest setFromLocPk(Long value) { this.FromLocPk = value; return this; }
public String getFromLocation() { return FromLocation; }
public StoreToStoreTransferRequest setFromLocation(String value) { this.FromLocation = value; return this; }
public Long getToLocPk() { return ToLocPk; }
public StoreToStoreTransferRequest setToLocPk(Long value) { this.ToLocPk = value; return this; }
public String getToLocation() { return ToLocation; }
public StoreToStoreTransferRequest setToLocation(String value) { this.ToLocation = value; return this; }
public ArrayList<ScanTransferItem> getItems() { return Items; }
public StoreToStoreTransferRequest setItems(ArrayList<ScanTransferItem> value) { this.Items = value; return this; }
public Boolean getIsRequest() { return IsRequest; }
public StoreToStoreTransferRequest setIsRequest(Boolean value) { this.IsRequest = value; return this; }
public String getRequestRefNumber() { return RequestRefNumber; }
public StoreToStoreTransferRequest setRequestRefNumber(String value) { this.RequestRefNumber = value; return this; }
public String getNotes() { return Notes; }
public StoreToStoreTransferRequest setNotes(String value) { this.Notes = 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 ScanTransferItem implements IScanItem
{
@DataMember
public Long SkuPk = null;
@DataMember
public Long SasPk = null;
@DataMember
public String Sku = null;
@DataMember
public String Serial = null;
@DataMember
public BigDecimal Quantity = null;
@DataMember
public ExceptionInfo ExceptionInfo = null;
@DataMember
public Boolean OvershipItem = null;
public Long getSkuPk() { return SkuPk; }
public ScanTransferItem setSkuPk(Long value) { this.SkuPk = value; return this; }
public Long getSasPk() { return SasPk; }
public ScanTransferItem setSasPk(Long value) { this.SasPk = value; return this; }
public String getSku() { return Sku; }
public ScanTransferItem setSku(String value) { this.Sku = value; return this; }
public String getSerial() { return Serial; }
public ScanTransferItem setSerial(String value) { this.Serial = value; return this; }
public BigDecimal getQuantity() { return Quantity; }
public ScanTransferItem setQuantity(BigDecimal value) { this.Quantity = value; return this; }
public ExceptionInfo getExceptionInfo() { return ExceptionInfo; }
public ScanTransferItem setExceptionInfo(ExceptionInfo value) { this.ExceptionInfo = value; return this; }
public Boolean isOvershipItem() { return OvershipItem; }
public ScanTransferItem setOvershipItem(Boolean value) { this.OvershipItem = value; return this; }
}
@DataContract
public static class ExceptionInfo
{
@DataMember
public String Barcode = null;
@DataMember
public String Description = null;
@DataMember
public String Base64Image = null;
@DataMember
public Integer Category = null;
@DataMember
public Integer SubCategory = null;
public String getBarcode() { return Barcode; }
public ExceptionInfo setBarcode(String value) { this.Barcode = value; return this; }
public String getDescription() { return Description; }
public ExceptionInfo setDescription(String value) { this.Description = value; return this; }
public String getBase64Image() { return Base64Image; }
public ExceptionInfo setBase64Image(String value) { this.Base64Image = value; return this; }
public Integer getCategory() { return Category; }
public ExceptionInfo setCategory(Integer value) { this.Category = value; return this; }
public Integer getSubCategory() { return SubCategory; }
public ExceptionInfo setSubCategory(Integer value) { this.SubCategory = value; return this; }
}
@DataContract
public static class StoreToStoreTransferResponse extends BaseResponse
{
@DataMember
public String RefNumber = null;
@DataMember
public ArrayList<ScanErrorItem> ErrorItems = null;
public String getRefNumber() { return RefNumber; }
public StoreToStoreTransferResponse setRefNumber(String value) { this.RefNumber = value; return this; }
public ArrayList<ScanErrorItem> getErrorItems() { return ErrorItems; }
public StoreToStoreTransferResponse setErrorItems(ArrayList<ScanErrorItem> value) { this.ErrorItems = 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 ScanErrorItem implements IScanItem
{
@DataMember
public Long SkuPk = null;
@DataMember
public Long SasPk = null;
@DataMember
public String Sku = null;
@DataMember
public String Serial = null;
@DataMember
public BigDecimal Quantity = null;
@DataMember
public ExceptionInfo ExceptionInfo = null;
@DataMember
public String ErrorMessage = null;
public Long getSkuPk() { return SkuPk; }
public ScanErrorItem setSkuPk(Long value) { this.SkuPk = value; return this; }
public Long getSasPk() { return SasPk; }
public ScanErrorItem setSasPk(Long value) { this.SasPk = value; return this; }
public String getSku() { return Sku; }
public ScanErrorItem setSku(String value) { this.Sku = value; return this; }
public String getSerial() { return Serial; }
public ScanErrorItem setSerial(String value) { this.Serial = value; return this; }
public BigDecimal getQuantity() { return Quantity; }
public ScanErrorItem setQuantity(BigDecimal value) { this.Quantity = value; return this; }
public ExceptionInfo getExceptionInfo() { return ExceptionInfo; }
public ScanErrorItem setExceptionInfo(ExceptionInfo value) { this.ExceptionInfo = value; return this; }
public String getErrorMessage() { return ErrorMessage; }
public ScanErrorItem setErrorMessage(String value) { this.ErrorMessage = value; return this; }
}
}
Java StoreToStoreTransferRequest 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/StoreToStoreTransfer HTTP/1.1
Host: active-ewebservice.biz
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<StoreToStoreTransferRequest 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>
<FromLocPk>0</FromLocPk>
<FromLocation>String</FromLocation>
<IsRequest>false</IsRequest>
<Items>
<StoreToStoreTransferRequest.ScanTransferItem>
<ExceptionInfo xmlns:d4p1="http://schemas.datacontract.org/2004/07/AIM">
<d4p1:Barcode>String</d4p1:Barcode>
<d4p1:Base64Image>String</d4p1:Base64Image>
<d4p1:Category>0</d4p1:Category>
<d4p1:Description>String</d4p1:Description>
<d4p1:SubCategory>0</d4p1:SubCategory>
</ExceptionInfo>
<OvershipItem>false</OvershipItem>
<Quantity>0</Quantity>
<SasPk>0</SasPk>
<Serial>String</Serial>
<Sku>String</Sku>
<SkuPk>0</SkuPk>
</StoreToStoreTransferRequest.ScanTransferItem>
</Items>
<Notes>String</Notes>
<RequestRefNumber>String</RequestRefNumber>
<ToLocPk>0</ToLocPk>
<ToLocation>String</ToLocation>
</StoreToStoreTransferRequest>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <StoreToStoreTransferResponse 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> <ErrorItems xmlns:d2p1="http://schemas.datacontract.org/2004/07/AIM"> <d2p1:ScanErrorItem> <d2p1:ErrorMessage>String</d2p1:ErrorMessage> <d2p1:ExceptionInfo> <d2p1:Barcode>String</d2p1:Barcode> <d2p1:Base64Image>String</d2p1:Base64Image> <d2p1:Category>0</d2p1:Category> <d2p1:Description>String</d2p1:Description> <d2p1:SubCategory>0</d2p1:SubCategory> </d2p1:ExceptionInfo> <d2p1:Quantity>0</d2p1:Quantity> <d2p1:SasPk>0</d2p1:SasPk> <d2p1:Serial>String</d2p1:Serial> <d2p1:Sku>String</d2p1:Sku> <d2p1:SkuPk>0</d2p1:SkuPk> </d2p1:ScanErrorItem> </ErrorItems> <RefNumber>String</RefNumber> </StoreToStoreTransferResponse>