| GET | /stock/{brand}/{posCode} | Get Paginated Stock |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class GetStockPaginated implements IPagedRequest
{
/**
* Brand
*/
@ApiMember(Description="Brand", IsRequired=true)
public String brand = null;
/**
* POS Legacy
*/
@ApiMember(Description="POS Legacy", IsRequired=true)
public String posCode = null;
/**
* Search Key (Article or SerialNumber)
*/
@ApiMember(Description="Search Key (Article or SerialNumber)")
public String searchKey = null;
/**
* Index of the result set returned
*/
@ApiMember(Description="Index of the result set returned")
public Integer page = null;
/**
* Size of the result set returned
*/
@ApiMember(Description="Size of the result set returned")
public Integer items = null;
/**
* Omit precise record count - save on performance
*/
@ApiMember(Description="Omit precise record count - save on performance")
public Boolean noCount = null;
/**
* Sorting expression
*/
@ApiMember(Description="Sorting expression")
public String sortBy = null;
/**
* Parameter - Include Chain POSes Stock
*/
@ApiMember(Description="Parameter - Include Chain POSes Stock ")
public Boolean includeChainPosesStock = null;
/**
* Include Retail Sales Price in the Output, by default: false
*/
@ApiMember(Description="Include Retail Sales Price in the Output, by default: false")
public Boolean includeRSP = null;
public String getBrand() { return brand; }
public GetStockPaginated setBrand(String value) { this.brand = value; return this; }
public String getPosCode() { return posCode; }
public GetStockPaginated setPosCode(String value) { this.posCode = value; return this; }
public String getSearchKey() { return searchKey; }
public GetStockPaginated setSearchKey(String value) { this.searchKey = value; return this; }
public Integer getPage() { return page; }
public GetStockPaginated setPage(Integer value) { this.page = value; return this; }
public Integer getItems() { return items; }
public GetStockPaginated setItems(Integer value) { this.items = value; return this; }
public Boolean isNoCount() { return noCount; }
public GetStockPaginated setNoCount(Boolean value) { this.noCount = value; return this; }
public String getSortBy() { return sortBy; }
public GetStockPaginated setSortBy(String value) { this.sortBy = value; return this; }
public Boolean isIncludeChainPosesStock() { return includeChainPosesStock; }
public GetStockPaginated setIncludeChainPosesStock(Boolean value) { this.includeChainPosesStock = value; return this; }
public Boolean isIncludeRSP() { return includeRSP; }
public GetStockPaginated setIncludeRSP(Boolean value) { this.includeRSP = value; return this; }
}
public static class GetStockPaginatedResponse
{
/**
* Total Pages
*/
@ApiMember(Description="Total Pages", IsRequired=true)
public Integer totalPages = null;
/**
* Total Results
*/
@ApiMember(Description="Total Results", IsRequired=true)
public Integer totalResults = null;
/**
* Index of the result set returned
*/
@ApiMember(Description="Index of the result set returned", IsRequired=true)
public Integer page = null;
/**
* Size of the result set returned
*/
@ApiMember(Description="Size of the result set returned", IsRequired=true)
public Integer items = null;
/**
* List of movements
*/
@ApiMember(Description="List of movements", IsRequired=true)
public ArrayList<PaginatedStockElement> elements = null;
public Integer getTotalPages() { return totalPages; }
public GetStockPaginatedResponse setTotalPages(Integer value) { this.totalPages = value; return this; }
public Integer getTotalResults() { return totalResults; }
public GetStockPaginatedResponse setTotalResults(Integer value) { this.totalResults = value; return this; }
public Integer getPage() { return page; }
public GetStockPaginatedResponse setPage(Integer value) { this.page = value; return this; }
public Integer getItems() { return items; }
public GetStockPaginatedResponse setItems(Integer value) { this.items = value; return this; }
public ArrayList<PaginatedStockElement> getElements() { return elements; }
public GetStockPaginatedResponse setElements(ArrayList<PaginatedStockElement> value) { this.elements = value; return this; }
}
public static class PaginatedStockElement
{
/**
* Pos Code
*/
@ApiMember(Description="Pos Code", IsRequired=true)
public String posCode = null;
/**
* Pos Code To Be Displayed
*/
@ApiMember(Description="Pos Code To Be Displayed", IsRequired=true)
public String posCodeToBeDisplayed = null;
/**
* Article Code
*/
@ApiMember(Description="Article Code", IsRequired=true)
public String articleCode = null;
/**
* Serial Number
*/
@ApiMember(Description="Serial Number")
public String serialNumber = null;
/**
* Current Stock Quantity
*/
@ApiMember(Description="Current Stock Quantity", IsRequired=true)
public Integer quantity = null;
/**
* Type e.g. consignment or standard
*/
@ApiMember(Description="Type e.g. consignment or standard", IsRequired=true)
public String type = null;
/**
* Is Consignment Sellable
*/
@ApiMember(Description="Is Consignment Sellable ", IsRequired=true)
public Boolean isConsignmentSellable = null;
/**
* Retail Sales Price
*/
@ApiMember(Description="Retail Sales Price", IsRequired=true)
public RetailSalesPrice retailSalesPrice = null;
public String getPosCode() { return posCode; }
public PaginatedStockElement setPosCode(String value) { this.posCode = value; return this; }
public String getPosCodeToBeDisplayed() { return posCodeToBeDisplayed; }
public PaginatedStockElement setPosCodeToBeDisplayed(String value) { this.posCodeToBeDisplayed = value; return this; }
public String getArticleCode() { return articleCode; }
public PaginatedStockElement setArticleCode(String value) { this.articleCode = value; return this; }
public String getSerialNumber() { return serialNumber; }
public PaginatedStockElement setSerialNumber(String value) { this.serialNumber = value; return this; }
public Integer getQuantity() { return quantity; }
public PaginatedStockElement setQuantity(Integer value) { this.quantity = value; return this; }
public String getType() { return type; }
public PaginatedStockElement setType(String value) { this.type = value; return this; }
public Boolean getIsConsignmentSellable() { return isConsignmentSellable; }
public PaginatedStockElement setIsConsignmentSellable(Boolean value) { this.isConsignmentSellable = value; return this; }
public RetailSalesPrice getRetailSalesPrice() { return retailSalesPrice; }
public PaginatedStockElement setRetailSalesPrice(RetailSalesPrice value) { this.retailSalesPrice = value; return this; }
}
public static class RetailSalesPrice
{
/**
* Currency Iso Code
*/
@ApiMember(Description="Currency Iso Code", IsRequired=true)
public String currencyIsoCode = null;
/**
* Value
*/
@ApiMember(Description="Value", IsRequired=true)
public BigDecimal value = null;
public String getCurrencyIsoCode() { return currencyIsoCode; }
public RetailSalesPrice setCurrencyIsoCode(String value) { this.currencyIsoCode = value; return this; }
public BigDecimal getValue() { return value; }
public RetailSalesPrice setValue(BigDecimal value) { this.value = value; return this; }
}
}
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 /stock/{brand}/{posCode} HTTP/1.1
Host: dev-api-booster.richemont.com
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"totalPages":0,"totalResults":0,"page":0,"items":0}