GET | /user/{supplieruserid}/purchaseorder/{purchaseorderid} |
---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class BrowsePurchaseOrder extends PurchaseOrderBase implements IGet
{
}
public static class PurchaseOrderBase
{
public Integer PurchaseOrderId = null;
public Integer SupplierUserId = null;
public Integer getPurchaseOrderId() { return PurchaseOrderId; }
public PurchaseOrderBase setPurchaseOrderId(Integer value) { this.PurchaseOrderId = value; return this; }
public Integer getSupplierUserId() { return SupplierUserId; }
public PurchaseOrderBase setSupplierUserId(Integer value) { this.SupplierUserId = value; return this; }
}
public static class BrowsePurchaseOrderResponse extends ResponseBase
{
public PurchaseOrderDetails PurchaseOrder = null;
public PurchaseOrderDetails getPurchaseOrder() { return PurchaseOrder; }
public BrowsePurchaseOrderResponse setPurchaseOrder(PurchaseOrderDetails value) { this.PurchaseOrder = value; return this; }
}
public static class ResponseBase
{
public ResponseStatus ResponseStatus = null;
public ResponseStatus getResponseStatus() { return ResponseStatus; }
public ResponseBase setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
}
public static class PurchaseOrderDetails extends ModifyPurchaseOrderBase
{
public Integer Id = null;
public Date CancellationDateTime = null;
public Boolean IsCancelled = null;
public HashMap<String,String> Meta = null;
public Integer TenderUserId = null;
public Integer TenderId = null;
public Integer UserId = null;
public ArrayList<PurchaseOrderVersionSimple> PurchaseOrderVersions = null;
public Integer getId() { return Id; }
public PurchaseOrderDetails setId(Integer value) { this.Id = value; return this; }
public Date getCancellationDateTime() { return CancellationDateTime; }
public PurchaseOrderDetails setCancellationDateTime(Date value) { this.CancellationDateTime = value; return this; }
public Boolean getIsCancelled() { return IsCancelled; }
public PurchaseOrderDetails setIsCancelled(Boolean value) { this.IsCancelled = value; return this; }
public HashMap<String,String> getMeta() { return Meta; }
public PurchaseOrderDetails setMeta(HashMap<String,String> value) { this.Meta = value; return this; }
public Integer getTenderUserId() { return TenderUserId; }
public PurchaseOrderDetails setTenderUserId(Integer value) { this.TenderUserId = value; return this; }
public Integer getTenderId() { return TenderId; }
public PurchaseOrderDetails setTenderId(Integer value) { this.TenderId = value; return this; }
public Integer getUserId() { return UserId; }
public PurchaseOrderDetails setUserId(Integer value) { this.UserId = value; return this; }
public ArrayList<PurchaseOrderVersionSimple> getPurchaseOrderVersions() { return PurchaseOrderVersions; }
public PurchaseOrderDetails setPurchaseOrderVersions(ArrayList<PurchaseOrderVersionSimple> value) { this.PurchaseOrderVersions = value; return this; }
}
public static class ModifyPurchaseOrderBase extends ModifyRequestBase
{
public String PurchaseOrderIdentifier = null;
public Integer TenderUserId = null;
public Integer SupplierUserId = null;
public String Buyer = null;
public String Subject = null;
public Date ConfirmationDeadline = null;
public String getPurchaseOrderIdentifier() { return PurchaseOrderIdentifier; }
public ModifyPurchaseOrderBase setPurchaseOrderIdentifier(String value) { this.PurchaseOrderIdentifier = value; return this; }
public Integer getTenderUserId() { return TenderUserId; }
public ModifyPurchaseOrderBase setTenderUserId(Integer value) { this.TenderUserId = value; return this; }
public Integer getSupplierUserId() { return SupplierUserId; }
public ModifyPurchaseOrderBase setSupplierUserId(Integer value) { this.SupplierUserId = value; return this; }
public String getBuyer() { return Buyer; }
public ModifyPurchaseOrderBase setBuyer(String value) { this.Buyer = value; return this; }
public String getSubject() { return Subject; }
public ModifyPurchaseOrderBase setSubject(String value) { this.Subject = value; return this; }
public Date getConfirmationDeadline() { return ConfirmationDeadline; }
public ModifyPurchaseOrderBase setConfirmationDeadline(Date value) { this.ConfirmationDeadline = value; return this; }
}
public static class ModifyRequestBase implements IConcurrencyStamp
{
public String ConcurrencyStamp = null;
public String getConcurrencyStamp() { return ConcurrencyStamp; }
public ModifyRequestBase setConcurrencyStamp(String value) { this.ConcurrencyStamp = value; return this; }
}
public static class PurchaseOrderVersionSimple
{
public Integer Id = null;
public Integer PurchaseOrderId = null;
public Integer SupplierUserId = null;
public Integer Version = null;
public Boolean IsViewed = null;
public ReviewStatus Status = null;
public Integer getId() { return Id; }
public PurchaseOrderVersionSimple setId(Integer value) { this.Id = value; return this; }
public Integer getPurchaseOrderId() { return PurchaseOrderId; }
public PurchaseOrderVersionSimple setPurchaseOrderId(Integer value) { this.PurchaseOrderId = value; return this; }
public Integer getSupplierUserId() { return SupplierUserId; }
public PurchaseOrderVersionSimple setSupplierUserId(Integer value) { this.SupplierUserId = value; return this; }
public Integer getVersion() { return Version; }
public PurchaseOrderVersionSimple setVersion(Integer value) { this.Version = value; return this; }
public Boolean getIsViewed() { return IsViewed; }
public PurchaseOrderVersionSimple setIsViewed(Boolean value) { this.IsViewed = value; return this; }
public ReviewStatus getStatus() { return Status; }
public PurchaseOrderVersionSimple setStatus(ReviewStatus value) { this.Status = value; return this; }
}
public static enum ReviewStatus
{
@SerializedName("0") Draft(0),
@SerializedName("1") Commented(1),
@SerializedName("2") Accepted(2);
private final int value;
ReviewStatus(final int intValue) { value = intValue; }
public int getValue() { return value; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /user/{supplieruserid}/purchaseorder/{purchaseorderid} HTTP/1.1 Host: szallitoiportal-be.veolia.hu Accept: application/xml
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <BrowsePurchaseOrderResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Portal.ServiceDto"> <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types"> <d2p1:ErrorCode>String</d2p1:ErrorCode> <d2p1:Message>String</d2p1:Message> <d2p1:StackTrace>String</d2p1:StackTrace> <d2p1:Errors> <d2p1:ResponseError> <d2p1:ErrorCode>String</d2p1:ErrorCode> <d2p1:FieldName>String</d2p1:FieldName> <d2p1:Message>String</d2p1:Message> <d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d5p1:KeyValueOfstringstring> <d5p1:Key>String</d5p1:Key> <d5p1:Value>String</d5p1:Value> </d5p1:KeyValueOfstringstring> </d2p1:Meta> </d2p1:ResponseError> </d2p1:Errors> <d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d3p1:KeyValueOfstringstring> <d3p1:Key>String</d3p1:Key> <d3p1:Value>String</d3p1:Value> </d3p1:KeyValueOfstringstring> </d2p1:Meta> </ResponseStatus> <PurchaseOrder> <ConcurrencyStamp>String</ConcurrencyStamp> <Buyer>String</Buyer> <ConfirmationDeadline>0001-01-01T00:00:00</ConfirmationDeadline> <PurchaseOrderIdentifier>String</PurchaseOrderIdentifier> <Subject>String</Subject> <SupplierUserId>0</SupplierUserId> <TenderUserId i:nil="true" /> <CancellationDateTime>0001-01-01T00:00:00</CancellationDateTime> <Id>0</Id> <IsCancelled>false</IsCancelled> <Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d3p1:KeyValueOfstringstring> <d3p1:Key>String</d3p1:Key> <d3p1:Value>String</d3p1:Value> </d3p1:KeyValueOfstringstring> </Meta> <PurchaseOrderVersions> <PurchaseOrderVersionSimple> <Id>0</Id> <IsViewed>false</IsViewed> <PurchaseOrderId>0</PurchaseOrderId> <Status>Draft</Status> <SupplierUserId>0</SupplierUserId> <Version>0</Version> </PurchaseOrderVersionSimple> </PurchaseOrderVersions> <TenderId>0</TenderId> <TenderUserId>0</TenderUserId> <UserId>0</UserId> </PurchaseOrder> </BrowsePurchaseOrderResponse>