| POST | /api/itemDataNotification/search | Search item data notification based on search parameters |
|---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
import com.google.gson.annotations.*;
import com.google.gson.reflect.*;
public class dtos
{
/**
* Item Data Notification
*/
@Api(Description="Item Data Notification")
@ApiResponse(Description="Paged ItemDataNotification data", IsDefaultResponse=true, ResponseType=0, Culture=neutral, PublicKeyToken=null]].class, StatusCode=200)
public static class SearchItemDataNotification
{
/**
* Search query
*/
@ApiMember(Description="Search query", ParameterType="model")
public SearchItemDataNotificationQuery query = null;
public SearchItemDataNotificationQuery getQuery() { return query; }
public SearchItemDataNotification setQuery(SearchItemDataNotificationQuery value) { this.query = value; return this; }
}
public static class SearchItemDataNotificationQuery implements ISearchItemDataNotification
{
public String receiverGln = null;
public String senderGln = null;
public ArrayList<String> partnerGln = new ArrayList<String>();
public Integer requestedPage = null;
public Integer numberOfRecordsPerPage = null;
public String continuationToken = null;
public String categoryCode = null;
public String identifier = null;
public String tradeItemDescription = null;
public String gtin = null;
public String orderBy = null;
public ORDER order = null;
public String getReceiverGln() { return receiverGln; }
public SearchItemDataNotificationQuery setReceiverGln(String value) { this.receiverGln = value; return this; }
public String getSenderGln() { return senderGln; }
public SearchItemDataNotificationQuery setSenderGln(String value) { this.senderGln = value; return this; }
public ArrayList<String> getPartnerGln() { return partnerGln; }
public SearchItemDataNotificationQuery setPartnerGln(ArrayList<String> value) { this.partnerGln = value; return this; }
public Integer getRequestedPage() { return requestedPage; }
public SearchItemDataNotificationQuery setRequestedPage(Integer value) { this.requestedPage = value; return this; }
public Integer getNumberOfRecordsPerPage() { return numberOfRecordsPerPage; }
public SearchItemDataNotificationQuery setNumberOfRecordsPerPage(Integer value) { this.numberOfRecordsPerPage = value; return this; }
public String getContinuationToken() { return continuationToken; }
public SearchItemDataNotificationQuery setContinuationToken(String value) { this.continuationToken = value; return this; }
public String getCategoryCode() { return categoryCode; }
public SearchItemDataNotificationQuery setCategoryCode(String value) { this.categoryCode = value; return this; }
public String getIdentifier() { return identifier; }
public SearchItemDataNotificationQuery setIdentifier(String value) { this.identifier = value; return this; }
public String getTradeItemDescription() { return tradeItemDescription; }
public SearchItemDataNotificationQuery setTradeItemDescription(String value) { this.tradeItemDescription = value; return this; }
public String getGtin() { return gtin; }
public SearchItemDataNotificationQuery setGtin(String value) { this.gtin = value; return this; }
public String getOrderBy() { return orderBy; }
public SearchItemDataNotificationQuery setOrderBy(String value) { this.orderBy = value; return this; }
public ORDER getOrder() { return order; }
public SearchItemDataNotificationQuery setOrder(ORDER value) { this.order = value; return this; }
}
public static enum ORDER
{
Asc,
Desc;
}
public static class PagedQueryResponseWithToken<T> extends PagedQueryResult<ResultItem<InvoiceMessage>>
{
public String continuationToken = null;
public String getContinuationToken() { return continuationToken; }
public PagedQueryResponseWithToken<T> setContinuationToken(String value) { this.continuationToken = value; return this; }
}
public static class PagedQueryResult<T>
{
public Long startIndex = null;
public Long endIndex = null;
public Integer numberOfRecordsReturned = null;
public Integer totalNumberOfPages = null;
public Long totalNumberOfRecords = null;
public ArrayList<ResultItem<ClaimMessage>> results = new ArrayList<ResultItem<ClaimMessage>>();
public Long getStartIndex() { return startIndex; }
public PagedQueryResult<T> setStartIndex(Long value) { this.startIndex = value; return this; }
public Long getEndIndex() { return endIndex; }
public PagedQueryResult<T> setEndIndex(Long value) { this.endIndex = value; return this; }
public Integer getNumberOfRecordsReturned() { return numberOfRecordsReturned; }
public PagedQueryResult<T> setNumberOfRecordsReturned(Integer value) { this.numberOfRecordsReturned = value; return this; }
public Integer getTotalNumberOfPages() { return totalNumberOfPages; }
public PagedQueryResult<T> setTotalNumberOfPages(Integer value) { this.totalNumberOfPages = value; return this; }
public Long getTotalNumberOfRecords() { return totalNumberOfRecords; }
public PagedQueryResult<T> setTotalNumberOfRecords(Long value) { this.totalNumberOfRecords = value; return this; }
public ArrayList<ResultItem<ClaimMessage>> getResults() { return results; }
public PagedQueryResult<T> setResults(ArrayList<ResultItem<ClaimMessage>> value) { this.results = value; return this; }
}
}
Java SearchItemDataNotification DTOs
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.
POST /api/itemDataNotification/search HTTP/1.1
Host: stf-api-uat.data-xchange.co.za
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"query":{"receiverGln":"String","senderGln":"String","partnerGln":["String"],"requestedPage":0,"numberOfRecordsPerPage":0,"continuationToken":"String","categoryCode":"String","identifier":"String","tradeItemDescription":"String","gtin":"String","orderBy":"String","order":"ASC"}}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"continuationToken":"String","startIndex":0,"endIndex":0,"numberOfRecordsReturned":0,"totalNumberOfPages":0,"totalNumberOfRecords":0,"results":[{}]}