POST | /servicecontracts/ |
---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class ServiceContracts
{
public String CIAMId = null;
public String ChassisNumber = null;
public Short ItemsPerPage = null;
public Short PageNumber = null;
public String getCiamId() { return CIAMId; }
public ServiceContracts setCiamId(String value) { this.CIAMId = value; return this; }
public String getChassisNumber() { return ChassisNumber; }
public ServiceContracts setChassisNumber(String value) { this.ChassisNumber = value; return this; }
public Short getItemsPerPage() { return ItemsPerPage; }
public ServiceContracts setItemsPerPage(Short value) { this.ItemsPerPage = value; return this; }
public Short getPageNumber() { return PageNumber; }
public ServiceContracts setPageNumber(Short value) { this.PageNumber = value; return this; }
}
public static class ServiceContractsResponse
{
public ReturnStatus Status = null;
public Short NumberOfPages = null;
public ArrayList<Contract> Contracts = null;
public ReturnStatus getStatus() { return Status; }
public ServiceContractsResponse setStatus(ReturnStatus value) { this.Status = value; return this; }
public Short getNumberOfPages() { return NumberOfPages; }
public ServiceContractsResponse setNumberOfPages(Short value) { this.NumberOfPages = value; return this; }
public ArrayList<Contract> getContracts() { return Contracts; }
public ServiceContractsResponse setContracts(ArrayList<Contract> value) { this.Contracts = value; return this; }
}
public static class ReturnStatus
{
public String ReturnCode = null;
public String Message = null;
public String getReturnCode() { return ReturnCode; }
public ReturnStatus setReturnCode(String value) { this.ReturnCode = value; return this; }
public String getMessage() { return Message; }
public ReturnStatus setMessage(String value) { this.Message = value; return this; }
}
public static class Contract
{
public String ContractNumber = null;
public Date StartDate = null;
public Date EndDate = null;
public Date TerminationDate = null;
public Short ServicesSold = null;
public Short ServicesTaken = null;
public String Status = null;
public String getContractNumber() { return ContractNumber; }
public Contract setContractNumber(String value) { this.ContractNumber = value; return this; }
public Date getStartDate() { return StartDate; }
public Contract setStartDate(Date value) { this.StartDate = value; return this; }
public Date getEndDate() { return EndDate; }
public Contract setEndDate(Date value) { this.EndDate = value; return this; }
public Date getTerminationDate() { return TerminationDate; }
public Contract setTerminationDate(Date value) { this.TerminationDate = value; return this; }
public Short getServicesSold() { return ServicesSold; }
public Contract setServicesSold(Short value) { this.ServicesSold = value; return this; }
public Short getServicesTaken() { return ServicesTaken; }
public Contract setServicesTaken(Short value) { this.ServicesTaken = value; return this; }
public String getStatus() { return Status; }
public Contract setStatus(String value) { this.Status = value; return this; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /servicecontracts/ HTTP/1.1
Host: webservices.mbukdatabase.co.uk
Accept: application/json
Content-Type: application/json
Content-Length: length
{"CIAMId":"String","ChassisNumber":"String","ItemsPerPage":0,"PageNumber":0}
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"Status":{"ReturnCode":"String","Message":"String"},"NumberOfPages":0,"Contracts":[{"ContractNumber":"String","StartDate":"\/Date(-62135596800000-0000)\/","EndDate":"\/Date(-62135596800000-0000)\/","TerminationDate":"\/Date(-62135596800000-0000)\/","ServicesSold":0,"ServicesTaken":0,"Status":"String"}]}