| POST,OPTIONS | /v1/dispatch/requests/{RequestId}/quote |
|---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class DispatchRequestQuoteRequest
{
public Integer RequestId = null;
public String RequiredRig = null;
public Integer UnitsPerTruck = null;
public BigDecimal RatePerLoad = null;
public BigDecimal UrgencyPct = null;
public BigDecimal CostPerLoad = null;
public Integer getRequestId() { return RequestId; }
public DispatchRequestQuoteRequest setRequestId(Integer value) { this.RequestId = value; return this; }
public String getRequiredRig() { return RequiredRig; }
public DispatchRequestQuoteRequest setRequiredRig(String value) { this.RequiredRig = value; return this; }
public Integer getUnitsPerTruck() { return UnitsPerTruck; }
public DispatchRequestQuoteRequest setUnitsPerTruck(Integer value) { this.UnitsPerTruck = value; return this; }
public BigDecimal getRatePerLoad() { return RatePerLoad; }
public DispatchRequestQuoteRequest setRatePerLoad(BigDecimal value) { this.RatePerLoad = value; return this; }
public BigDecimal getUrgencyPct() { return UrgencyPct; }
public DispatchRequestQuoteRequest setUrgencyPct(BigDecimal value) { this.UrgencyPct = value; return this; }
public BigDecimal getCostPerLoad() { return CostPerLoad; }
public DispatchRequestQuoteRequest setCostPerLoad(BigDecimal value) { this.CostPerLoad = value; return this; }
}
public static class DispatchRequestsResponse
{
public ArrayList<DispatchRequestView> Requests = new ArrayList<DispatchRequestView>();
public DispatchRequestView Request = null;
public ArrayList<DispatchRigCountView> RigCounts = new ArrayList<DispatchRigCountView>();
public ArrayList<DispatchCarrierPickView> Carriers = new ArrayList<DispatchCarrierPickView>();
public String QuoteLink = null;
public String Delivery = null;
public ResponseStatus ResponseStatus = null;
public ArrayList<DispatchRequestView> getRequests() { return Requests; }
public DispatchRequestsResponse setRequests(ArrayList<DispatchRequestView> value) { this.Requests = value; return this; }
public DispatchRequestView getRequest() { return Request; }
public DispatchRequestsResponse setRequest(DispatchRequestView value) { this.Request = value; return this; }
public ArrayList<DispatchRigCountView> getRigCounts() { return RigCounts; }
public DispatchRequestsResponse setRigCounts(ArrayList<DispatchRigCountView> value) { this.RigCounts = value; return this; }
public ArrayList<DispatchCarrierPickView> getCarriers() { return Carriers; }
public DispatchRequestsResponse setCarriers(ArrayList<DispatchCarrierPickView> value) { this.Carriers = value; return this; }
public String getQuoteLink() { return QuoteLink; }
public DispatchRequestsResponse setQuoteLink(String value) { this.QuoteLink = value; return this; }
public String getDelivery() { return Delivery; }
public DispatchRequestsResponse setDelivery(String value) { this.Delivery = value; return this; }
public ResponseStatus getResponseStatus() { return ResponseStatus; }
public DispatchRequestsResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
}
public static class DispatchRequestView
{
public Integer RequestId = null;
public String Code = null;
public String CustomerName = null;
public String CustomerPhone = null;
public String CustomerEmail = null;
public String Cargo = null;
public Integer Units = null;
public String FromLoc = null;
public String ToLoc = null;
public Integer Miles = null;
public String WindowText = null;
public Boolean IsUrgent = null;
public String Notes = null;
public String Source = null;
public String Status = null;
public String RequiredRig = null;
public Integer UnitsPerTruck = null;
public BigDecimal RatePerLoad = null;
public BigDecimal UrgencyPct = null;
public BigDecimal CostPerLoad = null;
public Integer LoadsNeeded = null;
public BigDecimal QuoteTotal = null;
public Integer QuoteVersion = null;
public Date QuotedUtc = null;
public String QuotedBy = null;
public Date AcceptTokenExpiresUtc = null;
public Date AcceptedUtc = null;
public String AcceptedVia = null;
public Date DeclinedUtc = null;
public String DeclinedBy = null;
public String DeclineReason = null;
public Integer JobsCreated = null;
public Integer JobsDone = null;
public Integer JobsNeedDriver = null;
public Date CreatedUtc = null;
public String CreatedBy = null;
public ArrayList<DispatchRequestEventView> Events = new ArrayList<DispatchRequestEventView>();
public Integer getRequestId() { return RequestId; }
public DispatchRequestView setRequestId(Integer value) { this.RequestId = value; return this; }
public String getCode() { return Code; }
public DispatchRequestView setCode(String value) { this.Code = value; return this; }
public String getCustomerName() { return CustomerName; }
public DispatchRequestView setCustomerName(String value) { this.CustomerName = value; return this; }
public String getCustomerPhone() { return CustomerPhone; }
public DispatchRequestView setCustomerPhone(String value) { this.CustomerPhone = value; return this; }
public String getCustomerEmail() { return CustomerEmail; }
public DispatchRequestView setCustomerEmail(String value) { this.CustomerEmail = value; return this; }
public String getCargo() { return Cargo; }
public DispatchRequestView setCargo(String value) { this.Cargo = value; return this; }
public Integer getUnits() { return Units; }
public DispatchRequestView setUnits(Integer value) { this.Units = value; return this; }
public String getFromLoc() { return FromLoc; }
public DispatchRequestView setFromLoc(String value) { this.FromLoc = value; return this; }
public String getToLoc() { return ToLoc; }
public DispatchRequestView setToLoc(String value) { this.ToLoc = value; return this; }
public Integer getMiles() { return Miles; }
public DispatchRequestView setMiles(Integer value) { this.Miles = value; return this; }
public String getWindowText() { return WindowText; }
public DispatchRequestView setWindowText(String value) { this.WindowText = value; return this; }
public Boolean getIsUrgent() { return IsUrgent; }
public DispatchRequestView setIsUrgent(Boolean value) { this.IsUrgent = value; return this; }
public String getNotes() { return Notes; }
public DispatchRequestView setNotes(String value) { this.Notes = value; return this; }
public String getSource() { return Source; }
public DispatchRequestView setSource(String value) { this.Source = value; return this; }
public String getStatus() { return Status; }
public DispatchRequestView setStatus(String value) { this.Status = value; return this; }
public String getRequiredRig() { return RequiredRig; }
public DispatchRequestView setRequiredRig(String value) { this.RequiredRig = value; return this; }
public Integer getUnitsPerTruck() { return UnitsPerTruck; }
public DispatchRequestView setUnitsPerTruck(Integer value) { this.UnitsPerTruck = value; return this; }
public BigDecimal getRatePerLoad() { return RatePerLoad; }
public DispatchRequestView setRatePerLoad(BigDecimal value) { this.RatePerLoad = value; return this; }
public BigDecimal getUrgencyPct() { return UrgencyPct; }
public DispatchRequestView setUrgencyPct(BigDecimal value) { this.UrgencyPct = value; return this; }
public BigDecimal getCostPerLoad() { return CostPerLoad; }
public DispatchRequestView setCostPerLoad(BigDecimal value) { this.CostPerLoad = value; return this; }
public Integer getLoadsNeeded() { return LoadsNeeded; }
public DispatchRequestView setLoadsNeeded(Integer value) { this.LoadsNeeded = value; return this; }
public BigDecimal getQuoteTotal() { return QuoteTotal; }
public DispatchRequestView setQuoteTotal(BigDecimal value) { this.QuoteTotal = value; return this; }
public Integer getQuoteVersion() { return QuoteVersion; }
public DispatchRequestView setQuoteVersion(Integer value) { this.QuoteVersion = value; return this; }
public Date getQuotedUtc() { return QuotedUtc; }
public DispatchRequestView setQuotedUtc(Date value) { this.QuotedUtc = value; return this; }
public String getQuotedBy() { return QuotedBy; }
public DispatchRequestView setQuotedBy(String value) { this.QuotedBy = value; return this; }
public Date getAcceptTokenExpiresUtc() { return AcceptTokenExpiresUtc; }
public DispatchRequestView setAcceptTokenExpiresUtc(Date value) { this.AcceptTokenExpiresUtc = value; return this; }
public Date getAcceptedUtc() { return AcceptedUtc; }
public DispatchRequestView setAcceptedUtc(Date value) { this.AcceptedUtc = value; return this; }
public String getAcceptedVia() { return AcceptedVia; }
public DispatchRequestView setAcceptedVia(String value) { this.AcceptedVia = value; return this; }
public Date getDeclinedUtc() { return DeclinedUtc; }
public DispatchRequestView setDeclinedUtc(Date value) { this.DeclinedUtc = value; return this; }
public String getDeclinedBy() { return DeclinedBy; }
public DispatchRequestView setDeclinedBy(String value) { this.DeclinedBy = value; return this; }
public String getDeclineReason() { return DeclineReason; }
public DispatchRequestView setDeclineReason(String value) { this.DeclineReason = value; return this; }
public Integer getJobsCreated() { return JobsCreated; }
public DispatchRequestView setJobsCreated(Integer value) { this.JobsCreated = value; return this; }
public Integer getJobsDone() { return JobsDone; }
public DispatchRequestView setJobsDone(Integer value) { this.JobsDone = value; return this; }
public Integer getJobsNeedDriver() { return JobsNeedDriver; }
public DispatchRequestView setJobsNeedDriver(Integer value) { this.JobsNeedDriver = value; return this; }
public Date getCreatedUtc() { return CreatedUtc; }
public DispatchRequestView setCreatedUtc(Date value) { this.CreatedUtc = value; return this; }
public String getCreatedBy() { return CreatedBy; }
public DispatchRequestView setCreatedBy(String value) { this.CreatedBy = value; return this; }
public ArrayList<DispatchRequestEventView> getEvents() { return Events; }
public DispatchRequestView setEvents(ArrayList<DispatchRequestEventView> value) { this.Events = value; return this; }
}
public static class DispatchRequestEventView
{
public Integer EventId = null;
public String Kind = null;
public String Detail = null;
public Date AtUtc = null;
public String ByWho = null;
public Integer getEventId() { return EventId; }
public DispatchRequestEventView setEventId(Integer value) { this.EventId = value; return this; }
public String getKind() { return Kind; }
public DispatchRequestEventView setKind(String value) { this.Kind = value; return this; }
public String getDetail() { return Detail; }
public DispatchRequestEventView setDetail(String value) { this.Detail = value; return this; }
public Date getAtUtc() { return AtUtc; }
public DispatchRequestEventView setAtUtc(Date value) { this.AtUtc = value; return this; }
public String getByWho() { return ByWho; }
public DispatchRequestEventView setByWho(String value) { this.ByWho = value; return this; }
}
public static class DispatchRigCountView
{
public String RigType = null;
public Integer Rigs = null;
public String getRigType() { return RigType; }
public DispatchRigCountView setRigType(String value) { this.RigType = value; return this; }
public Integer getRigs() { return Rigs; }
public DispatchRigCountView setRigs(Integer value) { this.Rigs = value; return this; }
}
public static class DispatchCarrierPickView
{
public Integer VendorID = null;
public String VendorName = null;
public Integer getVendorID() { return VendorID; }
public DispatchCarrierPickView setVendorID(Integer value) { this.VendorID = value; return this; }
public String getVendorName() { return VendorName; }
public DispatchCarrierPickView setVendorName(String value) { this.VendorName = value; return this; }
}
}
Java DispatchRequestQuoteRequest 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/dispatch/requests/{RequestId}/quote HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
RequestId: 0,
RequiredRig: String,
UnitsPerTruck: 0,
RatePerLoad: 0,
UrgencyPct: 0,
CostPerLoad: 0
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
Requests:
[
{
RequestId: 0,
Code: String,
CustomerName: String,
CustomerPhone: String,
CustomerEmail: String,
Cargo: String,
Units: 0,
FromLoc: String,
ToLoc: String,
Miles: 0,
WindowText: String,
IsUrgent: False,
Notes: String,
Source: String,
Status: String,
RequiredRig: String,
UnitsPerTruck: 0,
RatePerLoad: 0,
UrgencyPct: 0,
CostPerLoad: 0,
LoadsNeeded: 0,
QuoteTotal: 0,
QuoteVersion: 0,
QuotedUtc: 0001-01-01,
QuotedBy: String,
AcceptTokenExpiresUtc: 0001-01-01,
AcceptedUtc: 0001-01-01,
AcceptedVia: String,
DeclinedUtc: 0001-01-01,
DeclinedBy: String,
DeclineReason: String,
JobsCreated: 0,
JobsDone: 0,
JobsNeedDriver: 0,
CreatedUtc: 0001-01-01,
CreatedBy: String,
Events:
[
{
EventId: 0,
Kind: String,
Detail: String,
AtUtc: 0001-01-01,
ByWho: String
}
]
}
],
Request:
{
RequestId: 0,
Code: String,
CustomerName: String,
CustomerPhone: String,
CustomerEmail: String,
Cargo: String,
Units: 0,
FromLoc: String,
ToLoc: String,
Miles: 0,
WindowText: String,
IsUrgent: False,
Notes: String,
Source: String,
Status: String,
RequiredRig: String,
UnitsPerTruck: 0,
RatePerLoad: 0,
UrgencyPct: 0,
CostPerLoad: 0,
LoadsNeeded: 0,
QuoteTotal: 0,
QuoteVersion: 0,
QuotedUtc: 0001-01-01,
QuotedBy: String,
AcceptTokenExpiresUtc: 0001-01-01,
AcceptedUtc: 0001-01-01,
AcceptedVia: String,
DeclinedUtc: 0001-01-01,
DeclinedBy: String,
DeclineReason: String,
JobsCreated: 0,
JobsDone: 0,
JobsNeedDriver: 0,
CreatedUtc: 0001-01-01,
CreatedBy: String,
Events:
[
{
EventId: 0,
Kind: String,
Detail: String,
AtUtc: 0001-01-01,
ByWho: String
}
]
},
RigCounts:
[
{
RigType: String,
Rigs: 0
}
],
Carriers:
[
{
VendorID: 0,
VendorName: String
}
],
QuoteLink: String,
Delivery: String,
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
}
}