| GET,OPTIONS | /v1/routeplan/week |
|---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class RoutePlanWeekRequest
{
public String From = null;
public String getFrom() { return From; }
public RoutePlanWeekRequest setFrom(String value) { this.From = value; return this; }
}
public static class RoutePlanWeekResponse
{
public String FromIso = null;
public String ToIso = null;
public ArrayList<RoutePlanCrew> Crews = new ArrayList<RoutePlanCrew>();
public ArrayList<RoutePlanVisit> Visits = new ArrayList<RoutePlanVisit>();
public ArrayList<RoutePlanSkippedVisit> Skipped = new ArrayList<RoutePlanSkippedVisit>();
public ResponseStatus ResponseStatus = null;
public String getFromIso() { return FromIso; }
public RoutePlanWeekResponse setFromIso(String value) { this.FromIso = value; return this; }
public String getToIso() { return ToIso; }
public RoutePlanWeekResponse setToIso(String value) { this.ToIso = value; return this; }
public ArrayList<RoutePlanCrew> getCrews() { return Crews; }
public RoutePlanWeekResponse setCrews(ArrayList<RoutePlanCrew> value) { this.Crews = value; return this; }
public ArrayList<RoutePlanVisit> getVisits() { return Visits; }
public RoutePlanWeekResponse setVisits(ArrayList<RoutePlanVisit> value) { this.Visits = value; return this; }
public ArrayList<RoutePlanSkippedVisit> getSkipped() { return Skipped; }
public RoutePlanWeekResponse setSkipped(ArrayList<RoutePlanSkippedVisit> value) { this.Skipped = value; return this; }
public ResponseStatus getResponseStatus() { return ResponseStatus; }
public RoutePlanWeekResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
}
public static class RoutePlanCrew
{
public Integer CrewID = null;
public String CrewName = null;
public String CrewColor = null;
public String HomeZip = null;
public Double YardLat = null;
public Double YardLng = null;
public Integer DailyCapacityMin = null;
public Integer WeeklyCapacityMin = null;
public Boolean Specialist = null;
public Integer getCrewID() { return CrewID; }
public RoutePlanCrew setCrewID(Integer value) { this.CrewID = value; return this; }
public String getCrewName() { return CrewName; }
public RoutePlanCrew setCrewName(String value) { this.CrewName = value; return this; }
public String getCrewColor() { return CrewColor; }
public RoutePlanCrew setCrewColor(String value) { this.CrewColor = value; return this; }
public String getHomeZip() { return HomeZip; }
public RoutePlanCrew setHomeZip(String value) { this.HomeZip = value; return this; }
public Double getYardLat() { return YardLat; }
public RoutePlanCrew setYardLat(Double value) { this.YardLat = value; return this; }
public Double getYardLng() { return YardLng; }
public RoutePlanCrew setYardLng(Double value) { this.YardLng = value; return this; }
public Integer getDailyCapacityMin() { return DailyCapacityMin; }
public RoutePlanCrew setDailyCapacityMin(Integer value) { this.DailyCapacityMin = value; return this; }
public Integer getWeeklyCapacityMin() { return WeeklyCapacityMin; }
public RoutePlanCrew setWeeklyCapacityMin(Integer value) { this.WeeklyCapacityMin = value; return this; }
public Boolean isSpecialist() { return Specialist; }
public RoutePlanCrew setSpecialist(Boolean value) { this.Specialist = value; return this; }
}
public static class RoutePlanVisit
{
public Integer AgreementID = null;
public Integer AgreementJobID = null;
public String Name = null;
public String Sub = null;
public String ServiceType = null;
public String Zip = null;
public String Area = null;
public Double Lat = null;
public Double Lng = null;
public Integer DurationMin = null;
public String DueIso = null;
public String DueLabel = null;
public Boolean Overdue = null;
public Integer DefaultCrewID = null;
public Integer RouteCrewID = null;
public Integer RouteSeq = null;
public String RouteDateIso = null;
public Integer LateDays = null;
public Boolean AutoPay = null;
public String SkipPolicy = null;
public BigDecimal SkipCreditAmount = null;
public Integer getAgreementID() { return AgreementID; }
public RoutePlanVisit setAgreementID(Integer value) { this.AgreementID = value; return this; }
public Integer getAgreementJobID() { return AgreementJobID; }
public RoutePlanVisit setAgreementJobID(Integer value) { this.AgreementJobID = value; return this; }
public String getName() { return Name; }
public RoutePlanVisit setName(String value) { this.Name = value; return this; }
public String getSub() { return Sub; }
public RoutePlanVisit setSub(String value) { this.Sub = value; return this; }
public String getServiceType() { return ServiceType; }
public RoutePlanVisit setServiceType(String value) { this.ServiceType = value; return this; }
public String getZip() { return Zip; }
public RoutePlanVisit setZip(String value) { this.Zip = value; return this; }
public String getArea() { return Area; }
public RoutePlanVisit setArea(String value) { this.Area = value; return this; }
public Double getLat() { return Lat; }
public RoutePlanVisit setLat(Double value) { this.Lat = value; return this; }
public Double getLng() { return Lng; }
public RoutePlanVisit setLng(Double value) { this.Lng = value; return this; }
public Integer getDurationMin() { return DurationMin; }
public RoutePlanVisit setDurationMin(Integer value) { this.DurationMin = value; return this; }
public String getDueIso() { return DueIso; }
public RoutePlanVisit setDueIso(String value) { this.DueIso = value; return this; }
public String getDueLabel() { return DueLabel; }
public RoutePlanVisit setDueLabel(String value) { this.DueLabel = value; return this; }
public Boolean isOverdue() { return Overdue; }
public RoutePlanVisit setOverdue(Boolean value) { this.Overdue = value; return this; }
public Integer getDefaultCrewID() { return DefaultCrewID; }
public RoutePlanVisit setDefaultCrewID(Integer value) { this.DefaultCrewID = value; return this; }
public Integer getRouteCrewID() { return RouteCrewID; }
public RoutePlanVisit setRouteCrewID(Integer value) { this.RouteCrewID = value; return this; }
public Integer getRouteSeq() { return RouteSeq; }
public RoutePlanVisit setRouteSeq(Integer value) { this.RouteSeq = value; return this; }
public String getRouteDateIso() { return RouteDateIso; }
public RoutePlanVisit setRouteDateIso(String value) { this.RouteDateIso = value; return this; }
public Integer getLateDays() { return LateDays; }
public RoutePlanVisit setLateDays(Integer value) { this.LateDays = value; return this; }
public Boolean isAutoPay() { return AutoPay; }
public RoutePlanVisit setAutoPay(Boolean value) { this.AutoPay = value; return this; }
public String getSkipPolicy() { return SkipPolicy; }
public RoutePlanVisit setSkipPolicy(String value) { this.SkipPolicy = value; return this; }
public BigDecimal getSkipCreditAmount() { return SkipCreditAmount; }
public RoutePlanVisit setSkipCreditAmount(BigDecimal value) { this.SkipCreditAmount = value; return this; }
}
public static class RoutePlanSkippedVisit
{
public Integer AgreementJobID = null;
public Integer AgreementID = null;
public String Name = null;
public String DateIso = null;
public String Reason = null;
public BigDecimal CreditAmount = null;
public Integer getAgreementJobID() { return AgreementJobID; }
public RoutePlanSkippedVisit setAgreementJobID(Integer value) { this.AgreementJobID = value; return this; }
public Integer getAgreementID() { return AgreementID; }
public RoutePlanSkippedVisit setAgreementID(Integer value) { this.AgreementID = value; return this; }
public String getName() { return Name; }
public RoutePlanSkippedVisit setName(String value) { this.Name = value; return this; }
public String getDateIso() { return DateIso; }
public RoutePlanSkippedVisit setDateIso(String value) { this.DateIso = value; return this; }
public String getReason() { return Reason; }
public RoutePlanSkippedVisit setReason(String value) { this.Reason = value; return this; }
public BigDecimal getCreditAmount() { return CreditAmount; }
public RoutePlanSkippedVisit setCreditAmount(BigDecimal value) { this.CreditAmount = value; return this; }
}
}
Java RoutePlanWeekRequest 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/routeplan/week HTTP/1.1 Host: api.dev.dynamics.trendsic.com Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<RoutePlanWeekResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<Crews>
<RoutePlanCrew>
<CrewColor>String</CrewColor>
<CrewID>0</CrewID>
<CrewName>String</CrewName>
<DailyCapacityMin>0</DailyCapacityMin>
<HomeZip>String</HomeZip>
<Specialist>false</Specialist>
<WeeklyCapacityMin>0</WeeklyCapacityMin>
<YardLat>0</YardLat>
<YardLng>0</YardLng>
</RoutePlanCrew>
</Crews>
<FromIso>String</FromIso>
<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>
<Skipped>
<RoutePlanSkippedVisit>
<AgreementID>0</AgreementID>
<AgreementJobID>0</AgreementJobID>
<CreditAmount>0</CreditAmount>
<DateIso>String</DateIso>
<Name>String</Name>
<Reason>String</Reason>
</RoutePlanSkippedVisit>
</Skipped>
<ToIso>String</ToIso>
<Visits>
<RoutePlanVisit>
<AgreementID>0</AgreementID>
<AgreementJobID>0</AgreementJobID>
<Area>String</Area>
<AutoPay>false</AutoPay>
<DefaultCrewID>0</DefaultCrewID>
<DueIso>String</DueIso>
<DueLabel>String</DueLabel>
<DurationMin>0</DurationMin>
<Lat>0</Lat>
<LateDays>0</LateDays>
<Lng>0</Lng>
<Name>String</Name>
<Overdue>false</Overdue>
<RouteCrewID>0</RouteCrewID>
<RouteDateIso>String</RouteDateIso>
<RouteSeq>0</RouteSeq>
<ServiceType>String</ServiceType>
<SkipCreditAmount>0</SkipCreditAmount>
<SkipPolicy>String</SkipPolicy>
<Sub>String</Sub>
<Zip>String</Zip>
</RoutePlanVisit>
</Visits>
</RoutePlanWeekResponse>