| GET | /buyin/{brand} | Get list of buyin | Get list of paginated buyin based on the search parameters submitted |
|---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class GetBuyInPaginated
{
/**
* Richemont Brand ID
*/
@ApiMember(Description="Richemont Brand ID")
public String brand = null;
/**
* Richemont POS code
*/
@ApiMember(Description="Richemont POS code", IsRequired=true)
public String posCode = null;
/**
* Richemont Reference Code of the item
*/
@ApiMember(Description="Richemont Reference Code of the item")
public String articleCode = null;
/**
* Serial Number of the item
*/
@ApiMember(Description="Serial Number of the item")
public String serialNumber = null;
/**
* Buy-in order status code
*/
@ApiMember(Description="Buy-in order status code")
public String buyInStatusId = null;
/**
* True is the buy-in’s piece is in stock, False otherwise
*/
@ApiMember(Description="True is the buy-in’s piece is in stock, False otherwise")
public Boolean isInStock = 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;
/**
* Omit precise record count - save on performance
*/
@ApiMember(Description="Omit precise record count - save on performance")
public Boolean noCount = null;
/**
* Sort Expression, Possible values: 'SaleDetailIdDESC', 'DocumentDate'.
*/
@ApiMember(Description="Sort Expression, Possible values: 'SaleDetailIdDESC', 'DocumentDate'.")
public String sortBy = null;
public String getBrand() { return brand; }
public GetBuyInPaginated setBrand(String value) { this.brand = value; return this; }
public String getPosCode() { return posCode; }
public GetBuyInPaginated setPosCode(String value) { this.posCode = value; return this; }
public String getArticleCode() { return articleCode; }
public GetBuyInPaginated setArticleCode(String value) { this.articleCode = value; return this; }
public String getSerialNumber() { return serialNumber; }
public GetBuyInPaginated setSerialNumber(String value) { this.serialNumber = value; return this; }
public String getBuyInStatusId() { return buyInStatusId; }
public GetBuyInPaginated setBuyInStatusId(String value) { this.buyInStatusId = value; return this; }
public Boolean getIsInStock() { return isInStock; }
public GetBuyInPaginated setIsInStock(Boolean value) { this.isInStock = value; return this; }
public Integer getPage() { return page; }
public GetBuyInPaginated setPage(Integer value) { this.page = value; return this; }
public Integer getItems() { return items; }
public GetBuyInPaginated setItems(Integer value) { this.items = value; return this; }
public Boolean isNoCount() { return noCount; }
public GetBuyInPaginated setNoCount(Boolean value) { this.noCount = value; return this; }
public String getSortBy() { return sortBy; }
public GetBuyInPaginated setSortBy(String value) { this.sortBy = value; return this; }
}
public static class GetBuyInPaginatedResponse
{
/**
* Index of the result set returnedr
*/
@ApiMember(Description="Index of the result set returnedr", 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;
/**
* Total amount of pages / result sets
*/
@ApiMember(Description="Total amount of pages / result sets", IsRequired=true)
public Integer totalPages = null;
/**
* Total amount of results
*/
@ApiMember(Description="Total amount of results", IsRequired=true)
public Integer totalResults = null;
/**
* List of Sale Details
*/
@ApiMember(Description="List of Sale Details", IsRequired=true)
public ArrayList<BuyIn> elements = null;
public Integer getPage() { return page; }
public GetBuyInPaginatedResponse setPage(Integer value) { this.page = value; return this; }
public Integer getItems() { return items; }
public GetBuyInPaginatedResponse setItems(Integer value) { this.items = value; return this; }
public Integer getTotalPages() { return totalPages; }
public GetBuyInPaginatedResponse setTotalPages(Integer value) { this.totalPages = value; return this; }
public Integer getTotalResults() { return totalResults; }
public GetBuyInPaginatedResponse setTotalResults(Integer value) { this.totalResults = value; return this; }
public ArrayList<BuyIn> getElements() { return elements; }
public GetBuyInPaginatedResponse setElements(ArrayList<BuyIn> value) { this.elements = value; return this; }
}
public static class BuyIn
{
/**
* Brand Trigram, e.g. CAR, IWC; compulsory only if articleCode is not provided
*/
@ApiMember(Description="Brand Trigram, e.g. CAR, IWC; compulsory only if articleCode is not provided", IsRequired=true)
public String brand = null;
/**
* Code of BuyIn
*/
@ApiMember(Description="Code of BuyIn", IsRequired=true)
public Integer buyInOrderId = null;
/**
* Richemont POS code
*/
@ApiMember(Description="Richemont POS code", IsRequired=true)
public String posCode = null;
/**
* Richemont Reference Code of the item
*/
@ApiMember(Description="Richemont Reference Code of the item", IsRequired=true)
public String articleCode = null;
/**
* Serial Number of the item
*/
@ApiMember(Description="Serial Number of the item")
public String serialNumber = null;
/**
* Buy-in order status code
*/
@ApiMember(Description="Buy-in order status code")
public String buyInStatusId = null;
/**
* Buy-in creation date
*/
@ApiMember(Description="Buy-in creation date")
public Date buyInDate = null;
/**
* Emails of Sale Representatives
*/
@ApiMember(Description="Emails of Sale Representatives")
public ArrayList<String> saleRepresentativeEmails = new ArrayList<String>();
/**
* True is the buy-in’s piece is in stock, False otherwise
*/
@ApiMember(Description="True is the buy-in’s piece is in stock, False otherwise")
public Boolean isInStock = null;
public String getBrand() { return brand; }
public BuyIn setBrand(String value) { this.brand = value; return this; }
public Integer getBuyInOrderId() { return buyInOrderId; }
public BuyIn setBuyInOrderId(Integer value) { this.buyInOrderId = value; return this; }
public String getPosCode() { return posCode; }
public BuyIn setPosCode(String value) { this.posCode = value; return this; }
public String getArticleCode() { return articleCode; }
public BuyIn setArticleCode(String value) { this.articleCode = value; return this; }
public String getSerialNumber() { return serialNumber; }
public BuyIn setSerialNumber(String value) { this.serialNumber = value; return this; }
public String getBuyInStatusId() { return buyInStatusId; }
public BuyIn setBuyInStatusId(String value) { this.buyInStatusId = value; return this; }
public Date getBuyInDate() { return buyInDate; }
public BuyIn setBuyInDate(Date value) { this.buyInDate = value; return this; }
public ArrayList<String> getSaleRepresentativeEmails() { return saleRepresentativeEmails; }
public BuyIn setSaleRepresentativeEmails(ArrayList<String> value) { this.saleRepresentativeEmails = value; return this; }
public Boolean getIsInStock() { return isInStock; }
public BuyIn setIsInStock(Boolean value) { this.isInStock = 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 /buyin/{brand} HTTP/1.1
Host: dev-api-booster.richemont.com
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"page":0,"items":0,"totalPages":0,"totalResults":0}