| POST,PATCH,OPTIONS | /v1/projects/{ProjectID}/punch/{PunchItemID}/status |
|---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class PunchStatusRequest
{
public Integer ProjectID = null;
public Integer PunchItemID = null;
public String Status = null;
public Integer getProjectID() { return ProjectID; }
public PunchStatusRequest setProjectID(Integer value) { this.ProjectID = value; return this; }
public Integer getPunchItemID() { return PunchItemID; }
public PunchStatusRequest setPunchItemID(Integer value) { this.PunchItemID = value; return this; }
public String getStatus() { return Status; }
public PunchStatusRequest setStatus(String value) { this.Status = value; return this; }
}
public static class PunchItemResponse
{
public ResponseStatus ResponseStatus = null;
public PunchItem Item = null;
public PunchSummary Summary = null;
public ResponseStatus getResponseStatus() { return ResponseStatus; }
public PunchItemResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
public PunchItem getItem() { return Item; }
public PunchItemResponse setItem(PunchItem value) { this.Item = value; return this; }
public PunchSummary getSummary() { return Summary; }
public PunchItemResponse setSummary(PunchSummary value) { this.Summary = value; return this; }
}
public static class PunchItem
{
public Integer PunchItemID = null;
public UUID PunchItemUID = null;
public Integer ProjectID = null;
public String PunchNo = null;
public String Title = null;
public String Description = null;
public String Area = null;
public String Trade = null;
public String Status = null;
public String Priority = null;
public String AssignedSub = null;
public String AssignedTo = null;
public Integer AssignedSubContactID = null;
public Integer PhotoCount = null;
public String OriginType = null;
public String OriginRef = null;
public Date OpenedAt = null;
public Date VerifiedAt = null;
public Date ClosedAt = null;
public String CreatedBy = null;
public Date CreatedAt = null;
public Date UpdatedAt = null;
public Integer getPunchItemID() { return PunchItemID; }
public PunchItem setPunchItemID(Integer value) { this.PunchItemID = value; return this; }
public UUID getPunchItemUID() { return PunchItemUID; }
public PunchItem setPunchItemUID(UUID value) { this.PunchItemUID = value; return this; }
public Integer getProjectID() { return ProjectID; }
public PunchItem setProjectID(Integer value) { this.ProjectID = value; return this; }
public String getPunchNo() { return PunchNo; }
public PunchItem setPunchNo(String value) { this.PunchNo = value; return this; }
public String getTitle() { return Title; }
public PunchItem setTitle(String value) { this.Title = value; return this; }
public String getDescription() { return Description; }
public PunchItem setDescription(String value) { this.Description = value; return this; }
public String getArea() { return Area; }
public PunchItem setArea(String value) { this.Area = value; return this; }
public String getTrade() { return Trade; }
public PunchItem setTrade(String value) { this.Trade = value; return this; }
public String getStatus() { return Status; }
public PunchItem setStatus(String value) { this.Status = value; return this; }
public String getPriority() { return Priority; }
public PunchItem setPriority(String value) { this.Priority = value; return this; }
public String getAssignedSub() { return AssignedSub; }
public PunchItem setAssignedSub(String value) { this.AssignedSub = value; return this; }
public String getAssignedTo() { return AssignedTo; }
public PunchItem setAssignedTo(String value) { this.AssignedTo = value; return this; }
public Integer getAssignedSubContactID() { return AssignedSubContactID; }
public PunchItem setAssignedSubContactID(Integer value) { this.AssignedSubContactID = value; return this; }
public Integer getPhotoCount() { return PhotoCount; }
public PunchItem setPhotoCount(Integer value) { this.PhotoCount = value; return this; }
public String getOriginType() { return OriginType; }
public PunchItem setOriginType(String value) { this.OriginType = value; return this; }
public String getOriginRef() { return OriginRef; }
public PunchItem setOriginRef(String value) { this.OriginRef = value; return this; }
public Date getOpenedAt() { return OpenedAt; }
public PunchItem setOpenedAt(Date value) { this.OpenedAt = value; return this; }
public Date getVerifiedAt() { return VerifiedAt; }
public PunchItem setVerifiedAt(Date value) { this.VerifiedAt = value; return this; }
public Date getClosedAt() { return ClosedAt; }
public PunchItem setClosedAt(Date value) { this.ClosedAt = value; return this; }
public String getCreatedBy() { return CreatedBy; }
public PunchItem setCreatedBy(String value) { this.CreatedBy = value; return this; }
public Date getCreatedAt() { return CreatedAt; }
public PunchItem setCreatedAt(Date value) { this.CreatedAt = value; return this; }
public Date getUpdatedAt() { return UpdatedAt; }
public PunchItem setUpdatedAt(Date value) { this.UpdatedAt = value; return this; }
}
public static class PunchSummary
{
public Integer ProjectID = null;
public Integer TotalItems = null;
public Integer OpenCount = null;
public Integer VerifyCount = null;
public Integer ClosedCount = null;
public Integer RejectedCount = null;
public Integer PercentComplete = null;
public Integer getProjectID() { return ProjectID; }
public PunchSummary setProjectID(Integer value) { this.ProjectID = value; return this; }
public Integer getTotalItems() { return TotalItems; }
public PunchSummary setTotalItems(Integer value) { this.TotalItems = value; return this; }
public Integer getOpenCount() { return OpenCount; }
public PunchSummary setOpenCount(Integer value) { this.OpenCount = value; return this; }
public Integer getVerifyCount() { return VerifyCount; }
public PunchSummary setVerifyCount(Integer value) { this.VerifyCount = value; return this; }
public Integer getClosedCount() { return ClosedCount; }
public PunchSummary setClosedCount(Integer value) { this.ClosedCount = value; return this; }
public Integer getRejectedCount() { return RejectedCount; }
public PunchSummary setRejectedCount(Integer value) { this.RejectedCount = value; return this; }
public Integer getPercentComplete() { return PercentComplete; }
public PunchSummary setPercentComplete(Integer value) { this.PercentComplete = value; return this; }
}
}
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.
POST /v1/projects/{ProjectID}/punch/{PunchItemID}/status HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<PunchStatusRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<ProjectID>0</ProjectID>
<PunchItemID>0</PunchItemID>
<Status>String</Status>
</PunchStatusRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<PunchItemResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<Item>
<Area>String</Area>
<AssignedSub>String</AssignedSub>
<AssignedSubContactID>0</AssignedSubContactID>
<AssignedTo>String</AssignedTo>
<ClosedAt>0001-01-01T00:00:00</ClosedAt>
<CreatedAt>0001-01-01T00:00:00</CreatedAt>
<CreatedBy>String</CreatedBy>
<Description>String</Description>
<OpenedAt>0001-01-01T00:00:00</OpenedAt>
<OriginRef>String</OriginRef>
<OriginType>String</OriginType>
<PhotoCount>0</PhotoCount>
<Priority>String</Priority>
<ProjectID>0</ProjectID>
<PunchItemID>0</PunchItemID>
<PunchItemUID>00000000-0000-0000-0000-000000000000</PunchItemUID>
<PunchNo>String</PunchNo>
<Status>String</Status>
<Title>String</Title>
<Trade>String</Trade>
<UpdatedAt>0001-01-01T00:00:00</UpdatedAt>
<VerifiedAt>0001-01-01T00:00:00</VerifiedAt>
</Item>
<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>
<Summary>
<ClosedCount>0</ClosedCount>
<OpenCount>0</OpenCount>
<PercentComplete>0</PercentComplete>
<ProjectID>0</ProjectID>
<RejectedCount>0</RejectedCount>
<TotalItems>0</TotalItems>
<VerifyCount>0</VerifyCount>
</Summary>
</PunchItemResponse>