| PUT,OPTIONS | /v1/dispatch/courier/runs/{Id} |
|---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class CourierRunUpdateRequest
{
public Integer Id = null;
public ArrayList<String> Codes = new ArrayList<String>();
public Integer DriverContactId = null;
public Boolean ClearDriver = null;
public Integer EquipmentID = null;
public Integer getId() { return Id; }
public CourierRunUpdateRequest setId(Integer value) { this.Id = value; return this; }
public ArrayList<String> getCodes() { return Codes; }
public CourierRunUpdateRequest setCodes(ArrayList<String> value) { this.Codes = value; return this; }
public Integer getDriverContactId() { return DriverContactId; }
public CourierRunUpdateRequest setDriverContactId(Integer value) { this.DriverContactId = value; return this; }
public Boolean isClearDriver() { return ClearDriver; }
public CourierRunUpdateRequest setClearDriver(Boolean value) { this.ClearDriver = value; return this; }
public Integer getEquipmentID() { return EquipmentID; }
public CourierRunUpdateRequest setEquipmentID(Integer value) { this.EquipmentID = value; return this; }
}
public static class CourierRunResponse
{
public ArrayList<CourierRunView> Runs = new ArrayList<CourierRunView>();
public CourierRunView Run = null;
public String Message = null;
public ResponseStatus ResponseStatus = null;
public ArrayList<CourierRunView> getRuns() { return Runs; }
public CourierRunResponse setRuns(ArrayList<CourierRunView> value) { this.Runs = value; return this; }
public CourierRunView getRun() { return Run; }
public CourierRunResponse setRun(CourierRunView value) { this.Run = value; return this; }
public String getMessage() { return Message; }
public CourierRunResponse setMessage(String value) { this.Message = value; return this; }
public ResponseStatus getResponseStatus() { return ResponseStatus; }
public CourierRunResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
}
public static class CourierRunView
{
public Integer CourierRunID = null;
public String Code = null;
public String Status = null;
public Integer CourierProfileId = null;
public String ProfileName = null;
public Integer CourierFacilityId = null;
public String FacilityName = null;
public String FacilityAddress = null;
public Integer DriverContactId = null;
public String DriverName = null;
public Integer EquipmentID = null;
public String VehicleUnit = null;
public String UnitOne = null;
public String UnitMany = null;
public Integer Units = null;
public Integer StopCount = null;
public Integer StopsDone = null;
public BigDecimal Pay = null;
public Date BuiltUtc = null;
public Date StartedUtc = null;
public Date CompletedUtc = null;
public Integer ToLoad = null;
public Integer ToReturn = null;
public ArrayList<CourierStopView> Stops = new ArrayList<CourierStopView>();
public Integer getCourierRunID() { return CourierRunID; }
public CourierRunView setCourierRunID(Integer value) { this.CourierRunID = value; return this; }
public String getCode() { return Code; }
public CourierRunView setCode(String value) { this.Code = value; return this; }
public String getStatus() { return Status; }
public CourierRunView setStatus(String value) { this.Status = value; return this; }
public Integer getCourierProfileId() { return CourierProfileId; }
public CourierRunView setCourierProfileId(Integer value) { this.CourierProfileId = value; return this; }
public String getProfileName() { return ProfileName; }
public CourierRunView setProfileName(String value) { this.ProfileName = value; return this; }
public Integer getCourierFacilityId() { return CourierFacilityId; }
public CourierRunView setCourierFacilityId(Integer value) { this.CourierFacilityId = value; return this; }
public String getFacilityName() { return FacilityName; }
public CourierRunView setFacilityName(String value) { this.FacilityName = value; return this; }
public String getFacilityAddress() { return FacilityAddress; }
public CourierRunView setFacilityAddress(String value) { this.FacilityAddress = value; return this; }
public Integer getDriverContactId() { return DriverContactId; }
public CourierRunView setDriverContactId(Integer value) { this.DriverContactId = value; return this; }
public String getDriverName() { return DriverName; }
public CourierRunView setDriverName(String value) { this.DriverName = value; return this; }
public Integer getEquipmentID() { return EquipmentID; }
public CourierRunView setEquipmentID(Integer value) { this.EquipmentID = value; return this; }
public String getVehicleUnit() { return VehicleUnit; }
public CourierRunView setVehicleUnit(String value) { this.VehicleUnit = value; return this; }
public String getUnitOne() { return UnitOne; }
public CourierRunView setUnitOne(String value) { this.UnitOne = value; return this; }
public String getUnitMany() { return UnitMany; }
public CourierRunView setUnitMany(String value) { this.UnitMany = value; return this; }
public Integer getUnits() { return Units; }
public CourierRunView setUnits(Integer value) { this.Units = value; return this; }
public Integer getStopCount() { return StopCount; }
public CourierRunView setStopCount(Integer value) { this.StopCount = value; return this; }
public Integer getStopsDone() { return StopsDone; }
public CourierRunView setStopsDone(Integer value) { this.StopsDone = value; return this; }
public BigDecimal getPay() { return Pay; }
public CourierRunView setPay(BigDecimal value) { this.Pay = value; return this; }
public Date getBuiltUtc() { return BuiltUtc; }
public CourierRunView setBuiltUtc(Date value) { this.BuiltUtc = value; return this; }
public Date getStartedUtc() { return StartedUtc; }
public CourierRunView setStartedUtc(Date value) { this.StartedUtc = value; return this; }
public Date getCompletedUtc() { return CompletedUtc; }
public CourierRunView setCompletedUtc(Date value) { this.CompletedUtc = value; return this; }
public Integer getToLoad() { return ToLoad; }
public CourierRunView setToLoad(Integer value) { this.ToLoad = value; return this; }
public Integer getToReturn() { return ToReturn; }
public CourierRunView setToReturn(Integer value) { this.ToReturn = value; return this; }
public ArrayList<CourierStopView> getStops() { return Stops; }
public CourierRunView setStops(ArrayList<CourierStopView> value) { this.Stops = value; return this; }
}
public static class CourierStopView
{
public Integer Sequence = null;
public String Status = null;
public Integer DispatchOdRequestID = null;
public String Code = null;
public String CourierStep = null;
public String Address = null;
public String Unit = null;
public String City = null;
public String Zip = null;
public BigDecimal Lat = null;
public BigDecimal Lng = null;
public String CustomerName = null;
public String CustomerPhone = null;
public String Handoff = null;
public String GateCode = null;
public String Instructions = null;
public Integer Units = null;
public String DueText = null;
public String Note = null;
public ArrayList<String> Needs = new ArrayList<String>();
public ArrayList<CourierItemView> Items = new ArrayList<CourierItemView>();
public Integer getSequence() { return Sequence; }
public CourierStopView setSequence(Integer value) { this.Sequence = value; return this; }
public String getStatus() { return Status; }
public CourierStopView setStatus(String value) { this.Status = value; return this; }
public Integer getDispatchOdRequestID() { return DispatchOdRequestID; }
public CourierStopView setDispatchOdRequestID(Integer value) { this.DispatchOdRequestID = value; return this; }
public String getCode() { return Code; }
public CourierStopView setCode(String value) { this.Code = value; return this; }
public String getCourierStep() { return CourierStep; }
public CourierStopView setCourierStep(String value) { this.CourierStep = value; return this; }
public String getAddress() { return Address; }
public CourierStopView setAddress(String value) { this.Address = value; return this; }
public String getUnit() { return Unit; }
public CourierStopView setUnit(String value) { this.Unit = value; return this; }
public String getCity() { return City; }
public CourierStopView setCity(String value) { this.City = value; return this; }
public String getZip() { return Zip; }
public CourierStopView setZip(String value) { this.Zip = value; return this; }
public BigDecimal getLat() { return Lat; }
public CourierStopView setLat(BigDecimal value) { this.Lat = value; return this; }
public BigDecimal getLng() { return Lng; }
public CourierStopView setLng(BigDecimal value) { this.Lng = value; return this; }
public String getCustomerName() { return CustomerName; }
public CourierStopView setCustomerName(String value) { this.CustomerName = value; return this; }
public String getCustomerPhone() { return CustomerPhone; }
public CourierStopView setCustomerPhone(String value) { this.CustomerPhone = value; return this; }
public String getHandoff() { return Handoff; }
public CourierStopView setHandoff(String value) { this.Handoff = value; return this; }
public String getGateCode() { return GateCode; }
public CourierStopView setGateCode(String value) { this.GateCode = value; return this; }
public String getInstructions() { return Instructions; }
public CourierStopView setInstructions(String value) { this.Instructions = value; return this; }
public Integer getUnits() { return Units; }
public CourierStopView setUnits(Integer value) { this.Units = value; return this; }
public String getDueText() { return DueText; }
public CourierStopView setDueText(String value) { this.DueText = value; return this; }
public String getNote() { return Note; }
public CourierStopView setNote(String value) { this.Note = value; return this; }
public ArrayList<String> getNeeds() { return Needs; }
public CourierStopView setNeeds(ArrayList<String> value) { this.Needs = value; return this; }
public ArrayList<CourierItemView> getItems() { return Items; }
public CourierStopView setItems(ArrayList<CourierItemView> value) { this.Items = value; return this; }
}
public static class CourierItemView
{
public Integer CourierItemID = null;
public Integer DispatchOdRequestID = null;
public Integer Seq = null;
public String TagCode = null;
public String Custody = null;
public Boolean IsOpen = null;
public Boolean IsMissing = null;
public String MissingReason = null;
public Boolean IsManual = null;
public Boolean ReTagFlag = null;
public Boolean Scanned = null;
public Integer getCourierItemID() { return CourierItemID; }
public CourierItemView setCourierItemID(Integer value) { this.CourierItemID = value; return this; }
public Integer getDispatchOdRequestID() { return DispatchOdRequestID; }
public CourierItemView setDispatchOdRequestID(Integer value) { this.DispatchOdRequestID = value; return this; }
public Integer getSeq() { return Seq; }
public CourierItemView setSeq(Integer value) { this.Seq = value; return this; }
public String getTagCode() { return TagCode; }
public CourierItemView setTagCode(String value) { this.TagCode = value; return this; }
public String getCustody() { return Custody; }
public CourierItemView setCustody(String value) { this.Custody = value; return this; }
public Boolean getIsOpen() { return IsOpen; }
public CourierItemView setIsOpen(Boolean value) { this.IsOpen = value; return this; }
public Boolean getIsMissing() { return IsMissing; }
public CourierItemView setIsMissing(Boolean value) { this.IsMissing = value; return this; }
public String getMissingReason() { return MissingReason; }
public CourierItemView setMissingReason(String value) { this.MissingReason = value; return this; }
public Boolean getIsManual() { return IsManual; }
public CourierItemView setIsManual(Boolean value) { this.IsManual = value; return this; }
public Boolean isReTagFlag() { return ReTagFlag; }
public CourierItemView setReTagFlag(Boolean value) { this.ReTagFlag = value; return this; }
public Boolean isScanned() { return Scanned; }
public CourierItemView setScanned(Boolean value) { this.Scanned = value; return this; }
}
}
Java CourierRunUpdateRequest 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.
PUT /v1/dispatch/courier/runs/{Id} HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<CourierRunUpdateRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<ClearDriver>false</ClearDriver>
<Codes xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>String</d2p1:string>
</Codes>
<DriverContactId>0</DriverContactId>
<EquipmentID>0</EquipmentID>
<Id>0</Id>
</CourierRunUpdateRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<CourierRunResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<Message>String</Message>
<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>
<Run>
<BuiltUtc>0001-01-01T00:00:00</BuiltUtc>
<Code>String</Code>
<CompletedUtc>0001-01-01T00:00:00</CompletedUtc>
<CourierFacilityId>0</CourierFacilityId>
<CourierProfileId>0</CourierProfileId>
<CourierRunID>0</CourierRunID>
<DriverContactId>0</DriverContactId>
<DriverName>String</DriverName>
<EquipmentID>0</EquipmentID>
<FacilityAddress>String</FacilityAddress>
<FacilityName>String</FacilityName>
<Pay>0</Pay>
<ProfileName>String</ProfileName>
<StartedUtc>0001-01-01T00:00:00</StartedUtc>
<Status>String</Status>
<StopCount>0</StopCount>
<Stops>
<CourierStopView>
<Address>String</Address>
<City>String</City>
<Code>String</Code>
<CourierStep>String</CourierStep>
<CustomerName>String</CustomerName>
<CustomerPhone>String</CustomerPhone>
<DispatchOdRequestID>0</DispatchOdRequestID>
<DueText>String</DueText>
<GateCode>String</GateCode>
<Handoff>String</Handoff>
<Instructions>String</Instructions>
<Items>
<CourierItemView>
<CourierItemID>0</CourierItemID>
<Custody>String</Custody>
<DispatchOdRequestID>0</DispatchOdRequestID>
<IsManual>false</IsManual>
<IsMissing>false</IsMissing>
<IsOpen>false</IsOpen>
<MissingReason>String</MissingReason>
<ReTagFlag>false</ReTagFlag>
<Scanned>false</Scanned>
<Seq>0</Seq>
<TagCode>String</TagCode>
</CourierItemView>
</Items>
<Lat>0</Lat>
<Lng>0</Lng>
<Needs xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:string>String</d5p1:string>
</Needs>
<Note>String</Note>
<Sequence>0</Sequence>
<Status>String</Status>
<Unit>String</Unit>
<Units>0</Units>
<Zip>String</Zip>
</CourierStopView>
</Stops>
<StopsDone>0</StopsDone>
<ToLoad>0</ToLoad>
<ToReturn>0</ToReturn>
<UnitMany>String</UnitMany>
<UnitOne>String</UnitOne>
<Units>0</Units>
<VehicleUnit>String</VehicleUnit>
</Run>
<Runs>
<CourierRunView>
<BuiltUtc>0001-01-01T00:00:00</BuiltUtc>
<Code>String</Code>
<CompletedUtc>0001-01-01T00:00:00</CompletedUtc>
<CourierFacilityId>0</CourierFacilityId>
<CourierProfileId>0</CourierProfileId>
<CourierRunID>0</CourierRunID>
<DriverContactId>0</DriverContactId>
<DriverName>String</DriverName>
<EquipmentID>0</EquipmentID>
<FacilityAddress>String</FacilityAddress>
<FacilityName>String</FacilityName>
<Pay>0</Pay>
<ProfileName>String</ProfileName>
<StartedUtc>0001-01-01T00:00:00</StartedUtc>
<Status>String</Status>
<StopCount>0</StopCount>
<Stops>
<CourierStopView>
<Address>String</Address>
<City>String</City>
<Code>String</Code>
<CourierStep>String</CourierStep>
<CustomerName>String</CustomerName>
<CustomerPhone>String</CustomerPhone>
<DispatchOdRequestID>0</DispatchOdRequestID>
<DueText>String</DueText>
<GateCode>String</GateCode>
<Handoff>String</Handoff>
<Instructions>String</Instructions>
<Items>
<CourierItemView>
<CourierItemID>0</CourierItemID>
<Custody>String</Custody>
<DispatchOdRequestID>0</DispatchOdRequestID>
<IsManual>false</IsManual>
<IsMissing>false</IsMissing>
<IsOpen>false</IsOpen>
<MissingReason>String</MissingReason>
<ReTagFlag>false</ReTagFlag>
<Scanned>false</Scanned>
<Seq>0</Seq>
<TagCode>String</TagCode>
</CourierItemView>
</Items>
<Lat>0</Lat>
<Lng>0</Lng>
<Needs xmlns:d6p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d6p1:string>String</d6p1:string>
</Needs>
<Note>String</Note>
<Sequence>0</Sequence>
<Status>String</Status>
<Unit>String</Unit>
<Units>0</Units>
<Zip>String</Zip>
</CourierStopView>
</Stops>
<StopsDone>0</StopsDone>
<ToLoad>0</ToLoad>
<ToReturn>0</ToReturn>
<UnitMany>String</UnitMany>
<UnitOne>String</UnitOne>
<Units>0</Units>
<VehicleUnit>String</VehicleUnit>
</CourierRunView>
</Runs>
</CourierRunResponse>