| GET,OPTIONS | /v1/dispatch/holds |
|---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class DispatchHoldsRequest
{
public Integer Days = null;
public Integer getDays() { return Days; }
public DispatchHoldsRequest setDays(Integer value) { this.Days = value; return this; }
}
public static class DispatchHoldsResponse
{
public ArrayList<DispatchHoldView> Holds = new ArrayList<DispatchHoldView>();
public ArrayList<DispatchOfflineWindowView> Windows = new ArrayList<DispatchOfflineWindowView>();
public ArrayList<DispatchHoldScopeView> Scopes = new ArrayList<DispatchHoldScopeView>();
public DispatchHoldSuggestionView Suggestion = null;
public ResponseStatus ResponseStatus = null;
public ArrayList<DispatchHoldView> getHolds() { return Holds; }
public DispatchHoldsResponse setHolds(ArrayList<DispatchHoldView> value) { this.Holds = value; return this; }
public ArrayList<DispatchOfflineWindowView> getWindows() { return Windows; }
public DispatchHoldsResponse setWindows(ArrayList<DispatchOfflineWindowView> value) { this.Windows = value; return this; }
public ArrayList<DispatchHoldScopeView> getScopes() { return Scopes; }
public DispatchHoldsResponse setScopes(ArrayList<DispatchHoldScopeView> value) { this.Scopes = value; return this; }
public DispatchHoldSuggestionView getSuggestion() { return Suggestion; }
public DispatchHoldsResponse setSuggestion(DispatchHoldSuggestionView value) { this.Suggestion = value; return this; }
public ResponseStatus getResponseStatus() { return ResponseStatus; }
public DispatchHoldsResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
}
public static class DispatchHoldView
{
public Integer HoldId = null;
public String Code = null;
public String ScopeKind = null;
public String ScopeKey = null;
public String ScopeLabel = null;
public String Reason = null;
public String Note = null;
public Date StartUtc = null;
public Date EndUtc = null;
public String Source = null;
public String IncidentRef = null;
public Date LiftedUtc = null;
public String LiftedBy = null;
public Date CreatedUtc = null;
public String CreatedBy = null;
public String Status = null;
public Integer getHoldId() { return HoldId; }
public DispatchHoldView setHoldId(Integer value) { this.HoldId = value; return this; }
public String getCode() { return Code; }
public DispatchHoldView setCode(String value) { this.Code = value; return this; }
public String getScopeKind() { return ScopeKind; }
public DispatchHoldView setScopeKind(String value) { this.ScopeKind = value; return this; }
public String getScopeKey() { return ScopeKey; }
public DispatchHoldView setScopeKey(String value) { this.ScopeKey = value; return this; }
public String getScopeLabel() { return ScopeLabel; }
public DispatchHoldView setScopeLabel(String value) { this.ScopeLabel = value; return this; }
public String getReason() { return Reason; }
public DispatchHoldView setReason(String value) { this.Reason = value; return this; }
public String getNote() { return Note; }
public DispatchHoldView setNote(String value) { this.Note = value; return this; }
public Date getStartUtc() { return StartUtc; }
public DispatchHoldView setStartUtc(Date value) { this.StartUtc = value; return this; }
public Date getEndUtc() { return EndUtc; }
public DispatchHoldView setEndUtc(Date value) { this.EndUtc = value; return this; }
public String getSource() { return Source; }
public DispatchHoldView setSource(String value) { this.Source = value; return this; }
public String getIncidentRef() { return IncidentRef; }
public DispatchHoldView setIncidentRef(String value) { this.IncidentRef = value; return this; }
public Date getLiftedUtc() { return LiftedUtc; }
public DispatchHoldView setLiftedUtc(Date value) { this.LiftedUtc = value; return this; }
public String getLiftedBy() { return LiftedBy; }
public DispatchHoldView setLiftedBy(String value) { this.LiftedBy = value; return this; }
public Date getCreatedUtc() { return CreatedUtc; }
public DispatchHoldView setCreatedUtc(Date value) { this.CreatedUtc = value; return this; }
public String getCreatedBy() { return CreatedBy; }
public DispatchHoldView setCreatedBy(String value) { this.CreatedBy = value; return this; }
public String getStatus() { return Status; }
public DispatchHoldView setStatus(String value) { this.Status = value; return this; }
}
public static class DispatchOfflineWindowView
{
public Integer OfflineWindowId = null;
public String FromHour = null;
public String ToHour = null;
public Integer getOfflineWindowId() { return OfflineWindowId; }
public DispatchOfflineWindowView setOfflineWindowId(Integer value) { this.OfflineWindowId = value; return this; }
public String getFromHour() { return FromHour; }
public DispatchOfflineWindowView setFromHour(String value) { this.FromHour = value; return this; }
public String getToHour() { return ToHour; }
public DispatchOfflineWindowView setToHour(String value) { this.ToHour = value; return this; }
}
public static class DispatchHoldScopeView
{
public String Kind = null;
public String Key = null;
public String Label = null;
public String getKind() { return Kind; }
public DispatchHoldScopeView setKind(String value) { this.Kind = value; return this; }
public String getKey() { return Key; }
public DispatchHoldScopeView setKey(String value) { this.Key = value; return this; }
public String getLabel() { return Label; }
public DispatchHoldScopeView setLabel(String value) { this.Label = value; return this; }
}
public static class DispatchHoldSuggestionView
{
public String ForDate = null;
public String Kind = null;
public Integer Severity = null;
public String Headline = null;
public String DayLabel = null;
public String ScopeKind = null;
public String ScopeLabel = null;
public String Reason = null;
public Date StartUtc = null;
public Date EndUtc = null;
public String WindowLocal = null;
public String Text = null;
public String getForDate() { return ForDate; }
public DispatchHoldSuggestionView setForDate(String value) { this.ForDate = value; return this; }
public String getKind() { return Kind; }
public DispatchHoldSuggestionView setKind(String value) { this.Kind = value; return this; }
public Integer getSeverity() { return Severity; }
public DispatchHoldSuggestionView setSeverity(Integer value) { this.Severity = value; return this; }
public String getHeadline() { return Headline; }
public DispatchHoldSuggestionView setHeadline(String value) { this.Headline = value; return this; }
public String getDayLabel() { return DayLabel; }
public DispatchHoldSuggestionView setDayLabel(String value) { this.DayLabel = value; return this; }
public String getScopeKind() { return ScopeKind; }
public DispatchHoldSuggestionView setScopeKind(String value) { this.ScopeKind = value; return this; }
public String getScopeLabel() { return ScopeLabel; }
public DispatchHoldSuggestionView setScopeLabel(String value) { this.ScopeLabel = value; return this; }
public String getReason() { return Reason; }
public DispatchHoldSuggestionView setReason(String value) { this.Reason = value; return this; }
public Date getStartUtc() { return StartUtc; }
public DispatchHoldSuggestionView setStartUtc(Date value) { this.StartUtc = value; return this; }
public Date getEndUtc() { return EndUtc; }
public DispatchHoldSuggestionView setEndUtc(Date value) { this.EndUtc = value; return this; }
public String getWindowLocal() { return WindowLocal; }
public DispatchHoldSuggestionView setWindowLocal(String value) { this.WindowLocal = value; return this; }
public String getText() { return Text; }
public DispatchHoldSuggestionView setText(String value) { this.Text = value; return this; }
}
}
Java DispatchHoldsRequest DTOs
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 /v1/dispatch/holds HTTP/1.1 Host: api.dev.dynamics.trendsic.com Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<DispatchHoldsResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<Holds>
<DispatchHoldView>
<Code>String</Code>
<CreatedBy>String</CreatedBy>
<CreatedUtc>0001-01-01T00:00:00</CreatedUtc>
<EndUtc>0001-01-01T00:00:00</EndUtc>
<HoldId>0</HoldId>
<IncidentRef>String</IncidentRef>
<LiftedBy>String</LiftedBy>
<LiftedUtc>0001-01-01T00:00:00</LiftedUtc>
<Note>String</Note>
<Reason>String</Reason>
<ScopeKey>String</ScopeKey>
<ScopeKind>String</ScopeKind>
<ScopeLabel>String</ScopeLabel>
<Source>String</Source>
<StartUtc>0001-01-01T00:00:00</StartUtc>
<Status>String</Status>
</DispatchHoldView>
</Holds>
<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>
<Scopes>
<DispatchHoldScopeView>
<Key>String</Key>
<Kind>String</Kind>
<Label>String</Label>
</DispatchHoldScopeView>
</Scopes>
<Suggestion>
<DayLabel>String</DayLabel>
<EndUtc>0001-01-01T00:00:00</EndUtc>
<ForDate>String</ForDate>
<Headline>String</Headline>
<Kind>String</Kind>
<Reason>String</Reason>
<ScopeKind>String</ScopeKind>
<ScopeLabel>String</ScopeLabel>
<Severity>0</Severity>
<StartUtc>0001-01-01T00:00:00</StartUtc>
<Text>String</Text>
<WindowLocal>String</WindowLocal>
</Suggestion>
<Windows>
<DispatchOfflineWindowView>
<FromHour>String</FromHour>
<OfflineWindowId>0</OfflineWindowId>
<ToHour>String</ToHour>
</DispatchOfflineWindowView>
</Windows>
</DispatchHoldsResponse>