| POST,OPTIONS | /v1/territory/agreementneeds |
|---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class AgreementNeedsSetRequest
{
public Integer AgreementID = null;
public ArrayList<Integer> EquipmentIDs = new ArrayList<Integer>();
public Integer getAgreementID() { return AgreementID; }
public AgreementNeedsSetRequest setAgreementID(Integer value) { this.AgreementID = value; return this; }
public ArrayList<Integer> getEquipmentIDs() { return EquipmentIDs; }
public AgreementNeedsSetRequest setEquipmentIDs(ArrayList<Integer> value) { this.EquipmentIDs = value; return this; }
}
public static class TerritoryResponse
{
public ResponseStatus ResponseStatus = null;
public ArrayList<Territory> Territories = new ArrayList<Territory>();
public ArrayList<TerritoryPropertyRow> Properties = new ArrayList<TerritoryPropertyRow>();
public ArrayList<CrewEquipmentRow> CrewEquipment = new ArrayList<CrewEquipmentRow>();
public ArrayList<AgreementNeedRow> AgreementNeeds = new ArrayList<AgreementNeedRow>();
public ResponseStatus getResponseStatus() { return ResponseStatus; }
public TerritoryResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
public ArrayList<Territory> getTerritories() { return Territories; }
public TerritoryResponse setTerritories(ArrayList<Territory> value) { this.Territories = value; return this; }
public ArrayList<TerritoryPropertyRow> getProperties() { return Properties; }
public TerritoryResponse setProperties(ArrayList<TerritoryPropertyRow> value) { this.Properties = value; return this; }
public ArrayList<CrewEquipmentRow> getCrewEquipment() { return CrewEquipment; }
public TerritoryResponse setCrewEquipment(ArrayList<CrewEquipmentRow> value) { this.CrewEquipment = value; return this; }
public ArrayList<AgreementNeedRow> getAgreementNeeds() { return AgreementNeeds; }
public TerritoryResponse setAgreementNeeds(ArrayList<AgreementNeedRow> value) { this.AgreementNeeds = value; return this; }
}
public static class Territory
{
public Integer TerritoryID = null;
public String TerritoryUID = null;
public String Name = null;
public String Color = null;
public String ZipCsv = null;
public Integer CrewID = null;
public String CrewName = null;
public Boolean Active = null;
public Integer getTerritoryID() { return TerritoryID; }
public Territory setTerritoryID(Integer value) { this.TerritoryID = value; return this; }
public String getTerritoryUID() { return TerritoryUID; }
public Territory setTerritoryUID(String value) { this.TerritoryUID = value; return this; }
public String getName() { return Name; }
public Territory setName(String value) { this.Name = value; return this; }
public String getColor() { return Color; }
public Territory setColor(String value) { this.Color = value; return this; }
public String getZipCsv() { return ZipCsv; }
public Territory setZipCsv(String value) { this.ZipCsv = value; return this; }
public Integer getCrewID() { return CrewID; }
public Territory setCrewID(Integer value) { this.CrewID = value; return this; }
public String getCrewName() { return CrewName; }
public Territory setCrewName(String value) { this.CrewName = value; return this; }
public Boolean isActive() { return Active; }
public Territory setActive(Boolean value) { this.Active = value; return this; }
}
public static class TerritoryPropertyRow
{
public Integer TerritoryID = null;
public Integer AgreementID = null;
public Integer getTerritoryID() { return TerritoryID; }
public TerritoryPropertyRow setTerritoryID(Integer value) { this.TerritoryID = value; return this; }
public Integer getAgreementID() { return AgreementID; }
public TerritoryPropertyRow setAgreementID(Integer value) { this.AgreementID = value; return this; }
}
public static class CrewEquipmentRow
{
public Integer CrewID = null;
public Integer EquipmentID = null;
public String EquipmentName = null;
public Integer getCrewID() { return CrewID; }
public CrewEquipmentRow setCrewID(Integer value) { this.CrewID = value; return this; }
public Integer getEquipmentID() { return EquipmentID; }
public CrewEquipmentRow setEquipmentID(Integer value) { this.EquipmentID = value; return this; }
public String getEquipmentName() { return EquipmentName; }
public CrewEquipmentRow setEquipmentName(String value) { this.EquipmentName = value; return this; }
}
public static class AgreementNeedRow
{
public Integer AgreementID = null;
public Integer EquipmentID = null;
public String EquipmentName = null;
public Integer getAgreementID() { return AgreementID; }
public AgreementNeedRow setAgreementID(Integer value) { this.AgreementID = value; return this; }
public Integer getEquipmentID() { return EquipmentID; }
public AgreementNeedRow setEquipmentID(Integer value) { this.EquipmentID = value; return this; }
public String getEquipmentName() { return EquipmentName; }
public AgreementNeedRow setEquipmentName(String value) { this.EquipmentName = value; return this; }
}
}
Java AgreementNeedsSetRequest 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/territory/agreementneeds HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<AgreementNeedsSetRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<AgreementID>0</AgreementID>
<EquipmentIDs xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:int>0</d2p1:int>
</EquipmentIDs>
</AgreementNeedsSetRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<TerritoryResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<AgreementNeeds>
<AgreementNeedRow>
<AgreementID>0</AgreementID>
<EquipmentID>0</EquipmentID>
<EquipmentName>String</EquipmentName>
</AgreementNeedRow>
</AgreementNeeds>
<CrewEquipment>
<CrewEquipmentRow>
<CrewID>0</CrewID>
<EquipmentID>0</EquipmentID>
<EquipmentName>String</EquipmentName>
</CrewEquipmentRow>
</CrewEquipment>
<Properties>
<TerritoryPropertyRow>
<AgreementID>0</AgreementID>
<TerritoryID>0</TerritoryID>
</TerritoryPropertyRow>
</Properties>
<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>
<Territories>
<Territory>
<Active>false</Active>
<Color>String</Color>
<CrewID>0</CrewID>
<CrewName>String</CrewName>
<Name>String</Name>
<TerritoryID>0</TerritoryID>
<TerritoryUID>String</TerritoryUID>
<ZipCsv>String</ZipCsv>
</Territory>
</Territories>
</TerritoryResponse>