| 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 .jsv suffix or ?format=jsv
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: text/jsv
Content-Type: text/jsv
Content-Length: length
{
AgreementID: 0,
ProjectID: 0,
ServiceAgreement:
[
{
AgreementID: 0,
AgreementUID: 00000000000000000000000000000000,
TenantId: 00000000000000000000000000000000,
BranchId: 00000000000000000000000000000000,
BranchName: String,
ProjectID: 0,
ProjectName: String,
Name: String,
Status: String,
PricingShape: String,
MonthlyAmount: 0,
PerVisitAmount: 0,
SkipPolicy: String,
SeasonStartMonth: 0,
SeasonStartDay: 0,
SeasonEndMonth: 0,
SeasonEndDay: 0,
RecurrenceFrequency: String,
RecurrenceBy: String,
RecurrenceByValue: String,
EffectiveStartDate: 0001-01-01,
EndDate: 0001-01-01,
PreferredCrewID: 0,
PreferredCrewName: String,
ExternalRef: String,
CreatedBy: String,
CreatedAt: 0001-01-01,
UpdatedBy: String,
UpdatedAt: 0001-01-01,
NextVisitDate: 0001-01-01,
VisitsThisPeriod: 0
}
]
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
},
ServiceAgreement:
[
{
AgreementID: 0,
AgreementUID: 00000000000000000000000000000000,
TenantId: 00000000000000000000000000000000,
BranchId: 00000000000000000000000000000000,
BranchName: String,
ProjectID: 0,
ProjectName: String,
Name: String,
Status: String,
PricingShape: String,
MonthlyAmount: 0,
PerVisitAmount: 0,
SkipPolicy: String,
SeasonStartMonth: 0,
SeasonStartDay: 0,
SeasonEndMonth: 0,
SeasonEndDay: 0,
RecurrenceFrequency: String,
RecurrenceBy: String,
RecurrenceByValue: String,
EffectiveStartDate: 0001-01-01,
EndDate: 0001-01-01,
PreferredCrewID: 0,
PreferredCrewName: String,
ExternalRef: String,
CreatedBy: String,
CreatedAt: 0001-01-01,
UpdatedBy: String,
UpdatedAt: 0001-01-01,
NextVisitDate: 0001-01-01,
VisitsThisPeriod: 0
}
]
}