| POST,OPTIONS | /v1/dispatch/courier/recurrences | ||
|---|---|---|---|
| PUT,OPTIONS | /v1/dispatch/courier/recurrences/{Id} |
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class CourierRecurrenceSaveRequest
{
public Integer Id = null;
public CourierRecurrenceView Recurrence = null;
public Integer getId() { return Id; }
public CourierRecurrenceSaveRequest setId(Integer value) { this.Id = value; return this; }
public CourierRecurrenceView getRecurrence() { return Recurrence; }
public CourierRecurrenceSaveRequest setRecurrence(CourierRecurrenceView value) { this.Recurrence = value; return this; }
}
public static class CourierRecurrenceView
{
public Integer CourierRecurrenceID = null;
public Integer CourierProfileId = null;
public String ProfileName = null;
public Integer CourierFacilityId = null;
public Integer CustomerContactId = null;
public String CustomerName = null;
public String CustomerPhone = null;
public String Address = null;
public String Unit = null;
public String City = null;
public String Zip = null;
public String Zone = null;
public BigDecimal Lat = null;
public BigDecimal Lng = null;
public Integer Weekday = null;
public String WindowStart = null;
public String WindowEnd = null;
public String Cadence = null;
public String AnchorDate = null;
public String ServiceLevelCode = null;
public Integer UnitsExpected = null;
public String Handoff = null;
public String Instructions = null;
public String PayMode = null;
public String AccountCode = null;
public Boolean Paused = null;
public String LastMaterializedDate = null;
public String NextDate = null;
public ArrayList<String> SkipDates = new ArrayList<String>();
public Integer getCourierRecurrenceID() { return CourierRecurrenceID; }
public CourierRecurrenceView setCourierRecurrenceID(Integer value) { this.CourierRecurrenceID = value; return this; }
public Integer getCourierProfileId() { return CourierProfileId; }
public CourierRecurrenceView setCourierProfileId(Integer value) { this.CourierProfileId = value; return this; }
public String getProfileName() { return ProfileName; }
public CourierRecurrenceView setProfileName(String value) { this.ProfileName = value; return this; }
public Integer getCourierFacilityId() { return CourierFacilityId; }
public CourierRecurrenceView setCourierFacilityId(Integer value) { this.CourierFacilityId = value; return this; }
public Integer getCustomerContactId() { return CustomerContactId; }
public CourierRecurrenceView setCustomerContactId(Integer value) { this.CustomerContactId = value; return this; }
public String getCustomerName() { return CustomerName; }
public CourierRecurrenceView setCustomerName(String value) { this.CustomerName = value; return this; }
public String getCustomerPhone() { return CustomerPhone; }
public CourierRecurrenceView setCustomerPhone(String value) { this.CustomerPhone = value; return this; }
public String getAddress() { return Address; }
public CourierRecurrenceView setAddress(String value) { this.Address = value; return this; }
public String getUnit() { return Unit; }
public CourierRecurrenceView setUnit(String value) { this.Unit = value; return this; }
public String getCity() { return City; }
public CourierRecurrenceView setCity(String value) { this.City = value; return this; }
public String getZip() { return Zip; }
public CourierRecurrenceView setZip(String value) { this.Zip = value; return this; }
public String getZone() { return Zone; }
public CourierRecurrenceView setZone(String value) { this.Zone = value; return this; }
public BigDecimal getLat() { return Lat; }
public CourierRecurrenceView setLat(BigDecimal value) { this.Lat = value; return this; }
public BigDecimal getLng() { return Lng; }
public CourierRecurrenceView setLng(BigDecimal value) { this.Lng = value; return this; }
public Integer getWeekday() { return Weekday; }
public CourierRecurrenceView setWeekday(Integer value) { this.Weekday = value; return this; }
public String getWindowStart() { return WindowStart; }
public CourierRecurrenceView setWindowStart(String value) { this.WindowStart = value; return this; }
public String getWindowEnd() { return WindowEnd; }
public CourierRecurrenceView setWindowEnd(String value) { this.WindowEnd = value; return this; }
public String getCadence() { return Cadence; }
public CourierRecurrenceView setCadence(String value) { this.Cadence = value; return this; }
public String getAnchorDate() { return AnchorDate; }
public CourierRecurrenceView setAnchorDate(String value) { this.AnchorDate = value; return this; }
public String getServiceLevelCode() { return ServiceLevelCode; }
public CourierRecurrenceView setServiceLevelCode(String value) { this.ServiceLevelCode = value; return this; }
public Integer getUnitsExpected() { return UnitsExpected; }
public CourierRecurrenceView setUnitsExpected(Integer value) { this.UnitsExpected = value; return this; }
public String getHandoff() { return Handoff; }
public CourierRecurrenceView setHandoff(String value) { this.Handoff = value; return this; }
public String getInstructions() { return Instructions; }
public CourierRecurrenceView setInstructions(String value) { this.Instructions = value; return this; }
public String getPayMode() { return PayMode; }
public CourierRecurrenceView setPayMode(String value) { this.PayMode = value; return this; }
public String getAccountCode() { return AccountCode; }
public CourierRecurrenceView setAccountCode(String value) { this.AccountCode = value; return this; }
public Boolean isPaused() { return Paused; }
public CourierRecurrenceView setPaused(Boolean value) { this.Paused = value; return this; }
public String getLastMaterializedDate() { return LastMaterializedDate; }
public CourierRecurrenceView setLastMaterializedDate(String value) { this.LastMaterializedDate = value; return this; }
public String getNextDate() { return NextDate; }
public CourierRecurrenceView setNextDate(String value) { this.NextDate = value; return this; }
public ArrayList<String> getSkipDates() { return SkipDates; }
public CourierRecurrenceView setSkipDates(ArrayList<String> value) { this.SkipDates = value; return this; }
}
public static class CourierRecurrenceResponse
{
public ArrayList<CourierRecurrenceView> Recurrences = new ArrayList<CourierRecurrenceView>();
public String Message = null;
public ResponseStatus ResponseStatus = null;
public ArrayList<CourierRecurrenceView> getRecurrences() { return Recurrences; }
public CourierRecurrenceResponse setRecurrences(ArrayList<CourierRecurrenceView> value) { this.Recurrences = value; return this; }
public String getMessage() { return Message; }
public CourierRecurrenceResponse setMessage(String value) { this.Message = value; return this; }
public ResponseStatus getResponseStatus() { return ResponseStatus; }
public CourierRecurrenceResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
}
}
Java CourierRecurrenceSaveRequest 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.
POST /v1/dispatch/courier/recurrences HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<CourierRecurrenceSaveRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<Id>0</Id>
<Recurrence>
<AccountCode>String</AccountCode>
<Address>String</Address>
<AnchorDate>String</AnchorDate>
<Cadence>String</Cadence>
<City>String</City>
<CourierFacilityId>0</CourierFacilityId>
<CourierProfileId>0</CourierProfileId>
<CourierRecurrenceID>0</CourierRecurrenceID>
<CustomerContactId>0</CustomerContactId>
<CustomerName>String</CustomerName>
<CustomerPhone>String</CustomerPhone>
<Handoff>String</Handoff>
<Instructions>String</Instructions>
<LastMaterializedDate>String</LastMaterializedDate>
<Lat>0</Lat>
<Lng>0</Lng>
<NextDate>String</NextDate>
<Paused>false</Paused>
<PayMode>String</PayMode>
<ProfileName>String</ProfileName>
<ServiceLevelCode>String</ServiceLevelCode>
<SkipDates xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:string>String</d3p1:string>
</SkipDates>
<Unit>String</Unit>
<UnitsExpected>0</UnitsExpected>
<Weekday>0</Weekday>
<WindowEnd>String</WindowEnd>
<WindowStart>String</WindowStart>
<Zip>String</Zip>
<Zone>String</Zone>
</Recurrence>
</CourierRecurrenceSaveRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<CourierRecurrenceResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<Message>String</Message>
<Recurrences>
<CourierRecurrenceView>
<AccountCode>String</AccountCode>
<Address>String</Address>
<AnchorDate>String</AnchorDate>
<Cadence>String</Cadence>
<City>String</City>
<CourierFacilityId>0</CourierFacilityId>
<CourierProfileId>0</CourierProfileId>
<CourierRecurrenceID>0</CourierRecurrenceID>
<CustomerContactId>0</CustomerContactId>
<CustomerName>String</CustomerName>
<CustomerPhone>String</CustomerPhone>
<Handoff>String</Handoff>
<Instructions>String</Instructions>
<LastMaterializedDate>String</LastMaterializedDate>
<Lat>0</Lat>
<Lng>0</Lng>
<NextDate>String</NextDate>
<Paused>false</Paused>
<PayMode>String</PayMode>
<ProfileName>String</ProfileName>
<ServiceLevelCode>String</ServiceLevelCode>
<SkipDates xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:string>String</d4p1:string>
</SkipDates>
<Unit>String</Unit>
<UnitsExpected>0</UnitsExpected>
<Weekday>0</Weekday>
<WindowEnd>String</WindowEnd>
<WindowStart>String</WindowStart>
<Zip>String</Zip>
<Zone>String</Zone>
</CourierRecurrenceView>
</Recurrences>
<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>
</CourierRecurrenceResponse>