| 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 .xml suffix or ?format=xml
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/xml
Content-Type: application/xml
Content-Length: length
<UpliftRequestAuthRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WebService.AppApi.Models">
<ApiKey xmlns="http://schemas.datacontract.org/2004/07/WebService.AppApi.Models.Base">String</ApiKey>
<Latitude xmlns="http://schemas.datacontract.org/2004/07/WebService.AppApi.Models.Base">0</Latitude>
<Longitude xmlns="http://schemas.datacontract.org/2004/07/WebService.AppApi.Models.Base">0</Longitude>
<Channel>String</Channel>
<OutletId>0</OutletId>
<PrincipalId>0</PrincipalId>
<Products>
<UpliftRequestProductData>
<BatchCode>String</BatchCode>
<Category>String</Category>
<Code>String</Code>
<ExpiryDate>String</ExpiryDate>
<Id>00000000-0000-0000-0000-000000000000</Id>
<Images xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:anyType />
</Images>
<Name>String</Name>
<PrincipalId>0</PrincipalId>
<PrincipalLogoUrl>String</PrincipalLogoUrl>
<PrincipalName>String</PrincipalName>
<ProductId>0</ProductId>
<ProductionDate>String</ProductionDate>
<Quantity>0</Quantity>
<Seal>
<Number xmlns="http://schemas.datacontract.org/2004/07/BusinessLogic.Entities">String</Number>
<Weight xmlns="http://schemas.datacontract.org/2004/07/BusinessLogic.Entities">0</Weight>
</Seal>
<SerialNumber>String</SerialNumber>
<StockStatusColor>String</StockStatusColor>
<StockStatusId>0</StockStatusId>
<StockStatusName>String</StockStatusName>
<UnitBarcode>String</UnitBarcode>
<UnitOfMeasureId>0</UnitOfMeasureId>
<UnitPrice>0</UnitPrice>
<UnitSize>String</UnitSize>
<UnitWeight>0</UnitWeight>
<UpliftRequestProductId>0</UpliftRequestProductId>
<Value>0</Value>
</UpliftRequestProductData>
</Products>
<Region>String</Region>
<TotalUnits>0</TotalUnits>
<TotalValue>0</TotalValue>
<UpliftRequestOnDeviceId>00000000-0000-0000-0000-000000000000</UpliftRequestOnDeviceId>
</UpliftRequestAuthRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<UpliftRequestAuthRequestResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WebService.AppApi.Models">
<Description xmlns="http://schemas.datacontract.org/2004/07/WebService.AppApi.Models.Base">String</Description>
<Heading xmlns="http://schemas.datacontract.org/2004/07/WebService.AppApi.Models.Base">String</Heading>
<ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types" xmlns="http://schemas.datacontract.org/2004/07/WebService.AppApi.Models.Base">
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:Message>String</d2p1:Message>
<d2p1:StackTrace>String</d2p1:StackTrace>
<d2p1:Errors>
<d2p1:ResponseError>
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:FieldName>String</d2p1:FieldName>
<d2p1:Message>String</d2p1:Message>
<d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:KeyValueOfstringstring>
<d5p1:Key>String</d5p1:Key>
<d5p1:Value>String</d5p1:Value>
</d5p1:KeyValueOfstringstring>
</d2p1:Meta>
</d2p1:ResponseError>
</d2p1:Errors>
<d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:KeyValueOfstringstring>
<d3p1:Key>String</d3p1:Key>
<d3p1:Value>String</d3p1:Value>
</d3p1:KeyValueOfstringstring>
</d2p1:Meta>
</ResponseStatus>
<WasSuccessful xmlns="http://schemas.datacontract.org/2004/07/WebService.AppApi.Models.Base">false</WasSuccessful>
<UpliftRequestAuthRequestId>00000000-0000-0000-0000-000000000000</UpliftRequestAuthRequestId>
</UpliftRequestAuthRequestResponse>