| POST,OPTIONS | /v1/field/application |
|---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class ApplicationCreateRequest
{
public Integer WorkerScheduleItemID = null;
public Integer AgreementJobID = null;
public Integer JobID = null;
public Integer ProjectID = null;
public String AppliedAt = null;
public String AreaTreated = null;
public Integer MaterialID = null;
public BigDecimal AmountApplied = null;
public String AmountUnit = null;
public String Concentration = null;
public BigDecimal TreatedQuantity = null;
public String TreatedUnit = null;
public String TargetPest = null;
public BigDecimal WindSpeedMph = null;
public String WindDirection = null;
public BigDecimal TemperatureF = null;
public String WeatherSource = null;
public String Notes = null;
public Integer AmendsApplicationID = null;
public Integer getWorkerScheduleItemID() { return WorkerScheduleItemID; }
public ApplicationCreateRequest setWorkerScheduleItemID(Integer value) { this.WorkerScheduleItemID = value; return this; }
public Integer getAgreementJobID() { return AgreementJobID; }
public ApplicationCreateRequest setAgreementJobID(Integer value) { this.AgreementJobID = value; return this; }
public Integer getJobID() { return JobID; }
public ApplicationCreateRequest setJobID(Integer value) { this.JobID = value; return this; }
public Integer getProjectID() { return ProjectID; }
public ApplicationCreateRequest setProjectID(Integer value) { this.ProjectID = value; return this; }
public String getAppliedAt() { return AppliedAt; }
public ApplicationCreateRequest setAppliedAt(String value) { this.AppliedAt = value; return this; }
public String getAreaTreated() { return AreaTreated; }
public ApplicationCreateRequest setAreaTreated(String value) { this.AreaTreated = value; return this; }
public Integer getMaterialID() { return MaterialID; }
public ApplicationCreateRequest setMaterialID(Integer value) { this.MaterialID = value; return this; }
public BigDecimal getAmountApplied() { return AmountApplied; }
public ApplicationCreateRequest setAmountApplied(BigDecimal value) { this.AmountApplied = value; return this; }
public String getAmountUnit() { return AmountUnit; }
public ApplicationCreateRequest setAmountUnit(String value) { this.AmountUnit = value; return this; }
public String getConcentration() { return Concentration; }
public ApplicationCreateRequest setConcentration(String value) { this.Concentration = value; return this; }
public BigDecimal getTreatedQuantity() { return TreatedQuantity; }
public ApplicationCreateRequest setTreatedQuantity(BigDecimal value) { this.TreatedQuantity = value; return this; }
public String getTreatedUnit() { return TreatedUnit; }
public ApplicationCreateRequest setTreatedUnit(String value) { this.TreatedUnit = value; return this; }
public String getTargetPest() { return TargetPest; }
public ApplicationCreateRequest setTargetPest(String value) { this.TargetPest = value; return this; }
public BigDecimal getWindSpeedMph() { return WindSpeedMph; }
public ApplicationCreateRequest setWindSpeedMph(BigDecimal value) { this.WindSpeedMph = value; return this; }
public String getWindDirection() { return WindDirection; }
public ApplicationCreateRequest setWindDirection(String value) { this.WindDirection = value; return this; }
public BigDecimal getTemperatureF() { return TemperatureF; }
public ApplicationCreateRequest setTemperatureF(BigDecimal value) { this.TemperatureF = value; return this; }
public String getWeatherSource() { return WeatherSource; }
public ApplicationCreateRequest setWeatherSource(String value) { this.WeatherSource = value; return this; }
public String getNotes() { return Notes; }
public ApplicationCreateRequest setNotes(String value) { this.Notes = value; return this; }
public Integer getAmendsApplicationID() { return AmendsApplicationID; }
public ApplicationCreateRequest setAmendsApplicationID(Integer value) { this.AmendsApplicationID = value; return this; }
}
public static class ApplicationResponse
{
public ArrayList<ApplicationView> Applications = new ArrayList<ApplicationView>();
public Integer ChemicalApplicationID = null;
public ResponseStatus ResponseStatus = null;
public ArrayList<ApplicationView> getApplications() { return Applications; }
public ApplicationResponse setApplications(ArrayList<ApplicationView> value) { this.Applications = value; return this; }
public Integer getChemicalApplicationID() { return ChemicalApplicationID; }
public ApplicationResponse setChemicalApplicationID(Integer value) { this.ChemicalApplicationID = value; return this; }
public ResponseStatus getResponseStatus() { return ResponseStatus; }
public ApplicationResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
}
public static class ApplicationView
{
public Integer ChemicalApplicationID = null;
public Date AppliedAt = null;
public String AreaTreated = null;
public String ProductName = null;
public String EpaRegistrationNumber = null;
public BigDecimal AmountApplied = null;
public String AmountUnit = null;
public String Concentration = null;
public BigDecimal TreatedQuantity = null;
public String TreatedUnit = null;
public String TargetPest = null;
public String ApplicatorName = null;
public String ApplicatorLicence = null;
public BigDecimal WindSpeedMph = null;
public String WindDirection = null;
public BigDecimal TemperatureF = null;
public String Notes = null;
public Date SubmittedAt = null;
public Integer AmendsApplicationID = null;
public Boolean IsAmended = null;
public Integer getChemicalApplicationID() { return ChemicalApplicationID; }
public ApplicationView setChemicalApplicationID(Integer value) { this.ChemicalApplicationID = value; return this; }
public Date getAppliedAt() { return AppliedAt; }
public ApplicationView setAppliedAt(Date value) { this.AppliedAt = value; return this; }
public String getAreaTreated() { return AreaTreated; }
public ApplicationView setAreaTreated(String value) { this.AreaTreated = value; return this; }
public String getProductName() { return ProductName; }
public ApplicationView setProductName(String value) { this.ProductName = value; return this; }
public String getEpaRegistrationNumber() { return EpaRegistrationNumber; }
public ApplicationView setEpaRegistrationNumber(String value) { this.EpaRegistrationNumber = value; return this; }
public BigDecimal getAmountApplied() { return AmountApplied; }
public ApplicationView setAmountApplied(BigDecimal value) { this.AmountApplied = value; return this; }
public String getAmountUnit() { return AmountUnit; }
public ApplicationView setAmountUnit(String value) { this.AmountUnit = value; return this; }
public String getConcentration() { return Concentration; }
public ApplicationView setConcentration(String value) { this.Concentration = value; return this; }
public BigDecimal getTreatedQuantity() { return TreatedQuantity; }
public ApplicationView setTreatedQuantity(BigDecimal value) { this.TreatedQuantity = value; return this; }
public String getTreatedUnit() { return TreatedUnit; }
public ApplicationView setTreatedUnit(String value) { this.TreatedUnit = value; return this; }
public String getTargetPest() { return TargetPest; }
public ApplicationView setTargetPest(String value) { this.TargetPest = value; return this; }
public String getApplicatorName() { return ApplicatorName; }
public ApplicationView setApplicatorName(String value) { this.ApplicatorName = value; return this; }
public String getApplicatorLicence() { return ApplicatorLicence; }
public ApplicationView setApplicatorLicence(String value) { this.ApplicatorLicence = value; return this; }
public BigDecimal getWindSpeedMph() { return WindSpeedMph; }
public ApplicationView setWindSpeedMph(BigDecimal value) { this.WindSpeedMph = value; return this; }
public String getWindDirection() { return WindDirection; }
public ApplicationView setWindDirection(String value) { this.WindDirection = value; return this; }
public BigDecimal getTemperatureF() { return TemperatureF; }
public ApplicationView setTemperatureF(BigDecimal value) { this.TemperatureF = value; return this; }
public String getNotes() { return Notes; }
public ApplicationView setNotes(String value) { this.Notes = value; return this; }
public Date getSubmittedAt() { return SubmittedAt; }
public ApplicationView setSubmittedAt(Date value) { this.SubmittedAt = value; return this; }
public Integer getAmendsApplicationID() { return AmendsApplicationID; }
public ApplicationView setAmendsApplicationID(Integer value) { this.AmendsApplicationID = value; return this; }
public Boolean getIsAmended() { return IsAmended; }
public ApplicationView setIsAmended(Boolean value) { this.IsAmended = value; return this; }
}
}
Java ApplicationCreateRequest 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/field/application HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
WorkerScheduleItemID: 0,
AgreementJobID: 0,
JobID: 0,
ProjectID: 0,
AppliedAt: String,
AreaTreated: String,
MaterialID: 0,
AmountApplied: 0,
AmountUnit: String,
Concentration: String,
TreatedQuantity: 0,
TreatedUnit: String,
TargetPest: String,
WindSpeedMph: 0,
WindDirection: String,
TemperatureF: 0,
WeatherSource: String,
Notes: String,
AmendsApplicationID: 0
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
Applications:
[
{
ChemicalApplicationID: 0,
AppliedAt: 0001-01-01,
AreaTreated: String,
ProductName: String,
EpaRegistrationNumber: String,
AmountApplied: 0,
AmountUnit: String,
Concentration: String,
TreatedQuantity: 0,
TreatedUnit: String,
TargetPest: String,
ApplicatorName: String,
ApplicatorLicence: String,
WindSpeedMph: 0,
WindDirection: String,
TemperatureF: 0,
Notes: String,
SubmittedAt: 0001-01-01,
AmendsApplicationID: 0,
IsAmended: False
}
],
ChemicalApplicationID: 0,
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
}
}