| GET,OPTIONS | /v1/project/{ProjectID}/agreements | ||
|---|---|---|---|
| GET,POST,PUT,DELETE,OPTIONS | /v1/serviceagreement | ||
| GET,DELETE,OPTIONS | /v1/serviceagreement/{AgreementID} |
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class ServiceAgreementRequest
{
public Integer AgreementID = null;
public Integer ProjectID = null;
public ArrayList<ServiceAgreement> ServiceAgreement = new ArrayList<ServiceAgreement>();
public Integer getAgreementID() { return AgreementID; }
public ServiceAgreementRequest setAgreementID(Integer value) { this.AgreementID = value; return this; }
public Integer getProjectID() { return ProjectID; }
public ServiceAgreementRequest setProjectID(Integer value) { this.ProjectID = value; return this; }
public ArrayList<ServiceAgreement> getServiceAgreement() { return ServiceAgreement; }
public ServiceAgreementRequest setServiceAgreement(ArrayList<ServiceAgreement> value) { this.ServiceAgreement = value; return this; }
}
public static class ServiceAgreement
{
public Integer AgreementID = null;
public UUID AgreementUID = null;
public UUID TenantId = null;
public UUID BranchId = null;
public String BranchName = null;
public Integer ProjectID = null;
public String ProjectName = null;
public String Name = null;
public String Status = null;
public String PricingShape = null;
public BigDecimal MonthlyAmount = null;
public BigDecimal PerVisitAmount = null;
public String SkipPolicy = null;
public Integer SeasonStartMonth = null;
public Integer SeasonStartDay = null;
public Integer SeasonEndMonth = null;
public Integer SeasonEndDay = null;
public String RecurrenceFrequency = null;
public String RecurrenceBy = null;
public String RecurrenceByValue = null;
public Date EffectiveStartDate = null;
public Date EndDate = null;
public Integer PreferredCrewID = null;
public String PreferredCrewName = null;
public String ExternalRef = null;
public String CreatedBy = null;
public Date CreatedAt = null;
public String UpdatedBy = null;
public Date UpdatedAt = null;
public Date NextVisitDate = null;
public Integer VisitsThisPeriod = null;
public Integer getAgreementID() { return AgreementID; }
public ServiceAgreement setAgreementID(Integer value) { this.AgreementID = value; return this; }
public UUID getAgreementUID() { return AgreementUID; }
public ServiceAgreement setAgreementUID(UUID value) { this.AgreementUID = value; return this; }
public UUID getTenantId() { return TenantId; }
public ServiceAgreement setTenantId(UUID value) { this.TenantId = value; return this; }
public UUID getBranchId() { return BranchId; }
public ServiceAgreement setBranchId(UUID value) { this.BranchId = value; return this; }
public String getBranchName() { return BranchName; }
public ServiceAgreement setBranchName(String value) { this.BranchName = value; return this; }
public Integer getProjectID() { return ProjectID; }
public ServiceAgreement setProjectID(Integer value) { this.ProjectID = value; return this; }
public String getProjectName() { return ProjectName; }
public ServiceAgreement setProjectName(String value) { this.ProjectName = value; return this; }
public String getName() { return Name; }
public ServiceAgreement setName(String value) { this.Name = value; return this; }
public String getStatus() { return Status; }
public ServiceAgreement setStatus(String value) { this.Status = value; return this; }
public String getPricingShape() { return PricingShape; }
public ServiceAgreement setPricingShape(String value) { this.PricingShape = value; return this; }
public BigDecimal getMonthlyAmount() { return MonthlyAmount; }
public ServiceAgreement setMonthlyAmount(BigDecimal value) { this.MonthlyAmount = value; return this; }
public BigDecimal getPerVisitAmount() { return PerVisitAmount; }
public ServiceAgreement setPerVisitAmount(BigDecimal value) { this.PerVisitAmount = value; return this; }
public String getSkipPolicy() { return SkipPolicy; }
public ServiceAgreement setSkipPolicy(String value) { this.SkipPolicy = value; return this; }
public Integer getSeasonStartMonth() { return SeasonStartMonth; }
public ServiceAgreement setSeasonStartMonth(Integer value) { this.SeasonStartMonth = value; return this; }
public Integer getSeasonStartDay() { return SeasonStartDay; }
public ServiceAgreement setSeasonStartDay(Integer value) { this.SeasonStartDay = value; return this; }
public Integer getSeasonEndMonth() { return SeasonEndMonth; }
public ServiceAgreement setSeasonEndMonth(Integer value) { this.SeasonEndMonth = value; return this; }
public Integer getSeasonEndDay() { return SeasonEndDay; }
public ServiceAgreement setSeasonEndDay(Integer value) { this.SeasonEndDay = value; return this; }
public String getRecurrenceFrequency() { return RecurrenceFrequency; }
public ServiceAgreement setRecurrenceFrequency(String value) { this.RecurrenceFrequency = value; return this; }
public String getRecurrenceBy() { return RecurrenceBy; }
public ServiceAgreement setRecurrenceBy(String value) { this.RecurrenceBy = value; return this; }
public String getRecurrenceByValue() { return RecurrenceByValue; }
public ServiceAgreement setRecurrenceByValue(String value) { this.RecurrenceByValue = value; return this; }
public Date getEffectiveStartDate() { return EffectiveStartDate; }
public ServiceAgreement setEffectiveStartDate(Date value) { this.EffectiveStartDate = value; return this; }
public Date getEndDate() { return EndDate; }
public ServiceAgreement setEndDate(Date value) { this.EndDate = value; return this; }
public Integer getPreferredCrewID() { return PreferredCrewID; }
public ServiceAgreement setPreferredCrewID(Integer value) { this.PreferredCrewID = value; return this; }
public String getPreferredCrewName() { return PreferredCrewName; }
public ServiceAgreement setPreferredCrewName(String value) { this.PreferredCrewName = value; return this; }
public String getExternalRef() { return ExternalRef; }
public ServiceAgreement setExternalRef(String value) { this.ExternalRef = value; return this; }
public String getCreatedBy() { return CreatedBy; }
public ServiceAgreement setCreatedBy(String value) { this.CreatedBy = value; return this; }
public Date getCreatedAt() { return CreatedAt; }
public ServiceAgreement setCreatedAt(Date value) { this.CreatedAt = value; return this; }
public String getUpdatedBy() { return UpdatedBy; }
public ServiceAgreement setUpdatedBy(String value) { this.UpdatedBy = value; return this; }
public Date getUpdatedAt() { return UpdatedAt; }
public ServiceAgreement setUpdatedAt(Date value) { this.UpdatedAt = value; return this; }
public Date getNextVisitDate() { return NextVisitDate; }
public ServiceAgreement setNextVisitDate(Date value) { this.NextVisitDate = value; return this; }
public Integer getVisitsThisPeriod() { return VisitsThisPeriod; }
public ServiceAgreement setVisitsThisPeriod(Integer value) { this.VisitsThisPeriod = value; return this; }
}
public static class ServiceAgreementResponse
{
public ResponseStatus ResponseStatus = null;
public ArrayList<ServiceAgreement> ServiceAgreement = new ArrayList<ServiceAgreement>();
public ResponseStatus getResponseStatus() { return ResponseStatus; }
public ServiceAgreementResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
public ArrayList<ServiceAgreement> getServiceAgreement() { return ServiceAgreement; }
public ServiceAgreementResponse setServiceAgreement(ArrayList<ServiceAgreement> value) { this.ServiceAgreement = value; return this; }
}
}
Java ServiceAgreementRequest 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/serviceagreement HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<ServiceAgreementRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<AgreementID>0</AgreementID>
<ProjectID>0</ProjectID>
<ServiceAgreement>
<ServiceAgreement>
<AgreementID>0</AgreementID>
<AgreementUID>00000000-0000-0000-0000-000000000000</AgreementUID>
<BranchId>00000000-0000-0000-0000-000000000000</BranchId>
<BranchName>String</BranchName>
<CreatedAt>0001-01-01T00:00:00</CreatedAt>
<CreatedBy>String</CreatedBy>
<EffectiveStartDate>0001-01-01T00:00:00</EffectiveStartDate>
<EndDate>0001-01-01T00:00:00</EndDate>
<ExternalRef>String</ExternalRef>
<MonthlyAmount>0</MonthlyAmount>
<Name>String</Name>
<NextVisitDate>0001-01-01T00:00:00</NextVisitDate>
<PerVisitAmount>0</PerVisitAmount>
<PreferredCrewID>0</PreferredCrewID>
<PreferredCrewName>String</PreferredCrewName>
<PricingShape>String</PricingShape>
<ProjectID>0</ProjectID>
<ProjectName>String</ProjectName>
<RecurrenceBy>String</RecurrenceBy>
<RecurrenceByValue>String</RecurrenceByValue>
<RecurrenceFrequency>String</RecurrenceFrequency>
<SeasonEndDay>0</SeasonEndDay>
<SeasonEndMonth>0</SeasonEndMonth>
<SeasonStartDay>0</SeasonStartDay>
<SeasonStartMonth>0</SeasonStartMonth>
<SkipPolicy>String</SkipPolicy>
<Status>String</Status>
<TenantId>00000000-0000-0000-0000-000000000000</TenantId>
<UpdatedAt>0001-01-01T00:00:00</UpdatedAt>
<UpdatedBy>String</UpdatedBy>
<VisitsThisPeriod>0</VisitsThisPeriod>
</ServiceAgreement>
</ServiceAgreement>
</ServiceAgreementRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<ServiceAgreementResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<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>
<ServiceAgreement>
<ServiceAgreement>
<AgreementID>0</AgreementID>
<AgreementUID>00000000-0000-0000-0000-000000000000</AgreementUID>
<BranchId>00000000-0000-0000-0000-000000000000</BranchId>
<BranchName>String</BranchName>
<CreatedAt>0001-01-01T00:00:00</CreatedAt>
<CreatedBy>String</CreatedBy>
<EffectiveStartDate>0001-01-01T00:00:00</EffectiveStartDate>
<EndDate>0001-01-01T00:00:00</EndDate>
<ExternalRef>String</ExternalRef>
<MonthlyAmount>0</MonthlyAmount>
<Name>String</Name>
<NextVisitDate>0001-01-01T00:00:00</NextVisitDate>
<PerVisitAmount>0</PerVisitAmount>
<PreferredCrewID>0</PreferredCrewID>
<PreferredCrewName>String</PreferredCrewName>
<PricingShape>String</PricingShape>
<ProjectID>0</ProjectID>
<ProjectName>String</ProjectName>
<RecurrenceBy>String</RecurrenceBy>
<RecurrenceByValue>String</RecurrenceByValue>
<RecurrenceFrequency>String</RecurrenceFrequency>
<SeasonEndDay>0</SeasonEndDay>
<SeasonEndMonth>0</SeasonEndMonth>
<SeasonStartDay>0</SeasonStartDay>
<SeasonStartMonth>0</SeasonStartMonth>
<SkipPolicy>String</SkipPolicy>
<Status>String</Status>
<TenantId>00000000-0000-0000-0000-000000000000</TenantId>
<UpdatedAt>0001-01-01T00:00:00</UpdatedAt>
<UpdatedBy>String</UpdatedBy>
<VisitsThisPeriod>0</VisitsThisPeriod>
</ServiceAgreement>
</ServiceAgreement>
</ServiceAgreementResponse>