| POST | /api/purchaseCondition/search/sender | Search purchase condition based on search parameters |
|---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
/**
* Purchase Conditions
*/
@Api(Description="Purchase Conditions")
@ApiResponse(Description="Paged Purchase data", IsDefaultResponse=true, ResponseType=0, Culture=neutral, PublicKeyToken=null]].class, StatusCode=200)
public static class SearchSenderPurchaseCondition
{
/**
* Search query
*/
@ApiMember(Description="Search query", ParameterType="model")
public SearchPurchaseConditionByDateFilter query = null;
public SearchPurchaseConditionByDateFilter getQuery() { return query; }
public SearchSenderPurchaseCondition setQuery(SearchPurchaseConditionByDateFilter value) { this.query = value; return this; }
}
public static class SearchPurchaseConditionByDateFilter implements ISearchPurchaseConditionByDateFilter
{
public Date fromDate = null;
public Date toDate = null;
public String continuationToken = null;
public Integer requestedPage = null;
public Integer numberOfRecordsPerPage = null;
public String orderBy = null;
public ORDER order = null;
public Date getFromDate() { return fromDate; }
public SearchPurchaseConditionByDateFilter setFromDate(Date value) { this.fromDate = value; return this; }
public Date getToDate() { return toDate; }
public SearchPurchaseConditionByDateFilter setToDate(Date value) { this.toDate = value; return this; }
public String getContinuationToken() { return continuationToken; }
public SearchPurchaseConditionByDateFilter setContinuationToken(String value) { this.continuationToken = value; return this; }
public Integer getRequestedPage() { return requestedPage; }
public SearchPurchaseConditionByDateFilter setRequestedPage(Integer value) { this.requestedPage = value; return this; }
public Integer getNumberOfRecordsPerPage() { return numberOfRecordsPerPage; }
public SearchPurchaseConditionByDateFilter setNumberOfRecordsPerPage(Integer value) { this.numberOfRecordsPerPage = value; return this; }
public String getOrderBy() { return orderBy; }
public SearchPurchaseConditionByDateFilter setOrderBy(String value) { this.orderBy = value; return this; }
public ORDER getOrder() { return order; }
public SearchPurchaseConditionByDateFilter 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 SearchSenderPurchaseCondition 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/purchaseCondition/search/sender HTTP/1.1
Host: stf-api-uat.data-xchange.co.za
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"query":{"continuationToken":"String","requestedPage":0,"numberOfRecordsPerPage":0,"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":[{}]}