| POST | /upliftrequest/auth |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class UpliftRequestAuthRequest extends ApiServiceRequest
{
public UUID UpliftRequestOnDeviceId = null;
public Integer OutletId = null;
public Integer PrincipalId = null;
public BigDecimal TotalValue = null;
public Double TotalUnits = null;
public String Region = null;
public String Channel = null;
public ArrayList<UpliftRequestProductData> Products = null;
public UUID getUpliftRequestOnDeviceId() { return UpliftRequestOnDeviceId; }
public UpliftRequestAuthRequest setUpliftRequestOnDeviceId(UUID value) { this.UpliftRequestOnDeviceId = value; return this; }
public Integer getOutletId() { return OutletId; }
public UpliftRequestAuthRequest setOutletId(Integer value) { this.OutletId = value; return this; }
public Integer getPrincipalId() { return PrincipalId; }
public UpliftRequestAuthRequest setPrincipalId(Integer value) { this.PrincipalId = value; return this; }
public BigDecimal getTotalValue() { return TotalValue; }
public UpliftRequestAuthRequest setTotalValue(BigDecimal value) { this.TotalValue = value; return this; }
public Double getTotalUnits() { return TotalUnits; }
public UpliftRequestAuthRequest setTotalUnits(Double value) { this.TotalUnits = value; return this; }
public String getRegion() { return Region; }
public UpliftRequestAuthRequest setRegion(String value) { this.Region = value; return this; }
public String getChannel() { return Channel; }
public UpliftRequestAuthRequest setChannel(String value) { this.Channel = value; return this; }
public ArrayList<UpliftRequestProductData> getProducts() { return Products; }
public UpliftRequestAuthRequest setProducts(ArrayList<UpliftRequestProductData> value) { this.Products = value; return this; }
}
public static class ApiServiceRequest implements IServiceRequest, IHasApiKey, IHasDeviceInfo
{
/**
* The API Key required for authentication
*/
@ApiMember(DataType="string", Description="The API Key required for authentication", IsRequired=true)
public String ApiKey = null;
/**
* Latitude of the user making this request
*/
@ApiMember(DataType="double", Description="Latitude of the user making this request")
public Double Latitude = null;
/**
* Longitude of the user making this request
*/
@ApiMember(DataType="double", Description="Longitude of the user making this request")
public Double Longitude = null;
public String getApiKey() { return ApiKey; }
public ApiServiceRequest setApiKey(String value) { this.ApiKey = value; return this; }
public Double getLatitude() { return Latitude; }
public ApiServiceRequest setLatitude(Double value) { this.Latitude = value; return this; }
public Double getLongitude() { return Longitude; }
public ApiServiceRequest setLongitude(Double value) { this.Longitude = value; return this; }
}
public static class UpliftRequestProductData
{
public UUID Id = null;
public Integer UpliftRequestProductId = null;
public Integer ProductId = null;
public Integer PrincipalId = null;
public BigDecimal UnitPrice = null;
public String Name = null;
public String Category = null;
public String UnitBarcode = null;
public String UnitSize = null;
public BigDecimal UnitWeight = null;
public String Code = null;
public ArrayList<Object> Images = null;
public Double Quantity = null;
public BigDecimal Value = null;
public String ProductionDate = null;
public String ExpiryDate = null;
public String BatchCode = null;
public SealData Seal = null;
public String SerialNumber = null;
public Integer StockStatusId = null;
public String PrincipalLogoUrl = null;
public String PrincipalName = null;
public String StockStatusName = null;
public String StockStatusColor = null;
public Integer UnitOfMeasureId = null;
public UUID getId() { return Id; }
public UpliftRequestProductData setId(UUID value) { this.Id = value; return this; }
public Integer getUpliftRequestProductId() { return UpliftRequestProductId; }
public UpliftRequestProductData setUpliftRequestProductId(Integer value) { this.UpliftRequestProductId = value; return this; }
public Integer getProductId() { return ProductId; }
public UpliftRequestProductData setProductId(Integer value) { this.ProductId = value; return this; }
public Integer getPrincipalId() { return PrincipalId; }
public UpliftRequestProductData setPrincipalId(Integer value) { this.PrincipalId = value; return this; }
public BigDecimal getUnitPrice() { return UnitPrice; }
public UpliftRequestProductData setUnitPrice(BigDecimal value) { this.UnitPrice = value; return this; }
public String getName() { return Name; }
public UpliftRequestProductData setName(String value) { this.Name = value; return this; }
public String getCategory() { return Category; }
public UpliftRequestProductData setCategory(String value) { this.Category = value; return this; }
public String getUnitBarcode() { return UnitBarcode; }
public UpliftRequestProductData setUnitBarcode(String value) { this.UnitBarcode = value; return this; }
public String getUnitSize() { return UnitSize; }
public UpliftRequestProductData setUnitSize(String value) { this.UnitSize = value; return this; }
public BigDecimal getUnitWeight() { return UnitWeight; }
public UpliftRequestProductData setUnitWeight(BigDecimal value) { this.UnitWeight = value; return this; }
public String getCode() { return Code; }
public UpliftRequestProductData setCode(String value) { this.Code = value; return this; }
public ArrayList<Object> getImages() { return Images; }
public UpliftRequestProductData setImages(ArrayList<Object> value) { this.Images = value; return this; }
public Double getQuantity() { return Quantity; }
public UpliftRequestProductData setQuantity(Double value) { this.Quantity = value; return this; }
public BigDecimal getValue() { return Value; }
public UpliftRequestProductData setValue(BigDecimal value) { this.Value = value; return this; }
public String getProductionDate() { return ProductionDate; }
public UpliftRequestProductData setProductionDate(String value) { this.ProductionDate = value; return this; }
public String getExpiryDate() { return ExpiryDate; }
public UpliftRequestProductData setExpiryDate(String value) { this.ExpiryDate = value; return this; }
public String getBatchCode() { return BatchCode; }
public UpliftRequestProductData setBatchCode(String value) { this.BatchCode = value; return this; }
public SealData getSeal() { return Seal; }
public UpliftRequestProductData setSeal(SealData value) { this.Seal = value; return this; }
public String getSerialNumber() { return SerialNumber; }
public UpliftRequestProductData setSerialNumber(String value) { this.SerialNumber = value; return this; }
public Integer getStockStatusId() { return StockStatusId; }
public UpliftRequestProductData setStockStatusId(Integer value) { this.StockStatusId = value; return this; }
public String getPrincipalLogoUrl() { return PrincipalLogoUrl; }
public UpliftRequestProductData setPrincipalLogoUrl(String value) { this.PrincipalLogoUrl = value; return this; }
public String getPrincipalName() { return PrincipalName; }
public UpliftRequestProductData setPrincipalName(String value) { this.PrincipalName = value; return this; }
public String getStockStatusName() { return StockStatusName; }
public UpliftRequestProductData setStockStatusName(String value) { this.StockStatusName = value; return this; }
public String getStockStatusColor() { return StockStatusColor; }
public UpliftRequestProductData setStockStatusColor(String value) { this.StockStatusColor = value; return this; }
public Integer getUnitOfMeasureId() { return UnitOfMeasureId; }
public UpliftRequestProductData setUnitOfMeasureId(Integer value) { this.UnitOfMeasureId = value; return this; }
}
public static class SealData extends Seal
{
}
public static class Seal
{
public String Number = null;
public Double Weight = null;
public String getNumber() { return Number; }
public Seal setNumber(String value) { this.Number = value; return this; }
public Double getWeight() { return Weight; }
public Seal setWeight(Double value) { this.Weight = value; return this; }
}
public static class UpliftRequestAuthRequestResponse extends ApiServiceResponse
{
public UUID UpliftRequestAuthRequestId = null;
public UUID getUpliftRequestAuthRequestId() { return UpliftRequestAuthRequestId; }
public UpliftRequestAuthRequestResponse setUpliftRequestAuthRequestId(UUID value) { this.UpliftRequestAuthRequestId = value; return this; }
}
public static class ApiServiceResponse implements IServiceResponse
{
/**
* Information about the response.
*/
@ApiMember(Description="Information about the response.", IsRequired=true)
public String Description = null;
/**
* Heading or summary of the response.
*/
@ApiMember(Description="Heading or summary of the response.", IsRequired=true)
public String Heading = null;
/**
* Did the intended operation for this response complete successfully?
*/
@ApiMember(DataType="boolean", Description="Did the intended operation for this response complete successfully?", IsRequired=true)
public Boolean WasSuccessful = null;
public ResponseStatus ResponseStatus = null;
public String getDescription() { return Description; }
public ApiServiceResponse setDescription(String value) { this.Description = value; return this; }
public String getHeading() { return Heading; }
public ApiServiceResponse setHeading(String value) { this.Heading = value; return this; }
public Boolean isWasSuccessful() { return WasSuccessful; }
public ApiServiceResponse setWasSuccessful(Boolean value) { this.WasSuccessful = value; return this; }
public ResponseStatus getResponseStatus() { return ResponseStatus; }
public ApiServiceResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
}
}
Java UpliftRequestAuthRequest 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 /upliftrequest/auth HTTP/1.1
Host: returnit-api-dev.happen.zone
Accept: application/json
Content-Type: application/json
Content-Length: length
{"OutletId":0,"PrincipalId":0,"TotalValue":0,"TotalUnits":0,"Region":"String","Channel":"String","Products":[{"UpliftRequestProductId":0,"ProductId":0,"PrincipalId":0,"UnitPrice":0,"Name":"String","Category":"String","UnitBarcode":"String","UnitSize":"String","UnitWeight":0,"Code":"String","Images":[{}],"Quantity":0,"Value":0,"ProductionDate":"String","ExpiryDate":"String","BatchCode":"String","Seal":{"Number":"String","Weight":0},"SerialNumber":"String","StockStatusId":0,"PrincipalLogoUrl":"String","PrincipalName":"String","StockStatusName":"String","StockStatusColor":"String","UnitOfMeasureId":0}],"ApiKey":"String","Latitude":0,"Longitude":0}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"Description":"String","Heading":"String","WasSuccessful":false,"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}