| POST,OPTIONS | /v1/dispatch/settlements/generate |
|---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class DispatchSettlementGenerateRequest
{
public Integer VendorID = null;
public Date PeriodStart = null;
public Date PeriodEnd = null;
public Integer getVendorID() { return VendorID; }
public DispatchSettlementGenerateRequest setVendorID(Integer value) { this.VendorID = value; return this; }
public Date getPeriodStart() { return PeriodStart; }
public DispatchSettlementGenerateRequest setPeriodStart(Date value) { this.PeriodStart = value; return this; }
public Date getPeriodEnd() { return PeriodEnd; }
public DispatchSettlementGenerateRequest setPeriodEnd(Date value) { this.PeriodEnd = value; return this; }
}
public static class DispatchSettlementsResponse
{
public ArrayList<DispatchSettlementView> Settlements = new ArrayList<DispatchSettlementView>();
public DispatchSettlementView Settlement = null;
public ArrayList<DispatchSettlementSuggestView> Suggestions = new ArrayList<DispatchSettlementSuggestView>();
public ResponseStatus ResponseStatus = null;
public ArrayList<DispatchSettlementView> getSettlements() { return Settlements; }
public DispatchSettlementsResponse setSettlements(ArrayList<DispatchSettlementView> value) { this.Settlements = value; return this; }
public DispatchSettlementView getSettlement() { return Settlement; }
public DispatchSettlementsResponse setSettlement(DispatchSettlementView value) { this.Settlement = value; return this; }
public ArrayList<DispatchSettlementSuggestView> getSuggestions() { return Suggestions; }
public DispatchSettlementsResponse setSuggestions(ArrayList<DispatchSettlementSuggestView> value) { this.Suggestions = value; return this; }
public ResponseStatus getResponseStatus() { return ResponseStatus; }
public DispatchSettlementsResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
}
public static class DispatchSettlementView
{
public Integer SettlementId = null;
public String Code = null;
public Integer VendorID = null;
public String VendorName = null;
public Date PeriodStart = null;
public Date PeriodEnd = null;
public Integer LoadCount = null;
public BigDecimal GrossRevenue = null;
public BigDecimal SplitPct = null;
public BigDecimal CarrierShare = null;
public BigDecimal DeductionsTotal = null;
public BigDecimal Net = null;
public String Status = null;
public String Notes = null;
public Date GeneratedUtc = null;
public Date SentUtc = null;
public Date ApprovedUtc = null;
public String ApprovedBy = null;
public Date PaidUtc = null;
public String PaidRef = null;
public Integer ContactCount = null;
public ArrayList<DispatchSettlementDeductionView> Deductions = new ArrayList<DispatchSettlementDeductionView>();
public ArrayList<DispatchLoadView> Loads = new ArrayList<DispatchLoadView>();
public Integer getSettlementId() { return SettlementId; }
public DispatchSettlementView setSettlementId(Integer value) { this.SettlementId = value; return this; }
public String getCode() { return Code; }
public DispatchSettlementView setCode(String value) { this.Code = value; return this; }
public Integer getVendorID() { return VendorID; }
public DispatchSettlementView setVendorID(Integer value) { this.VendorID = value; return this; }
public String getVendorName() { return VendorName; }
public DispatchSettlementView setVendorName(String value) { this.VendorName = value; return this; }
public Date getPeriodStart() { return PeriodStart; }
public DispatchSettlementView setPeriodStart(Date value) { this.PeriodStart = value; return this; }
public Date getPeriodEnd() { return PeriodEnd; }
public DispatchSettlementView setPeriodEnd(Date value) { this.PeriodEnd = value; return this; }
public Integer getLoadCount() { return LoadCount; }
public DispatchSettlementView setLoadCount(Integer value) { this.LoadCount = value; return this; }
public BigDecimal getGrossRevenue() { return GrossRevenue; }
public DispatchSettlementView setGrossRevenue(BigDecimal value) { this.GrossRevenue = value; return this; }
public BigDecimal getSplitPct() { return SplitPct; }
public DispatchSettlementView setSplitPct(BigDecimal value) { this.SplitPct = value; return this; }
public BigDecimal getCarrierShare() { return CarrierShare; }
public DispatchSettlementView setCarrierShare(BigDecimal value) { this.CarrierShare = value; return this; }
public BigDecimal getDeductionsTotal() { return DeductionsTotal; }
public DispatchSettlementView setDeductionsTotal(BigDecimal value) { this.DeductionsTotal = value; return this; }
public BigDecimal getNet() { return Net; }
public DispatchSettlementView setNet(BigDecimal value) { this.Net = value; return this; }
public String getStatus() { return Status; }
public DispatchSettlementView setStatus(String value) { this.Status = value; return this; }
public String getNotes() { return Notes; }
public DispatchSettlementView setNotes(String value) { this.Notes = value; return this; }
public Date getGeneratedUtc() { return GeneratedUtc; }
public DispatchSettlementView setGeneratedUtc(Date value) { this.GeneratedUtc = value; return this; }
public Date getSentUtc() { return SentUtc; }
public DispatchSettlementView setSentUtc(Date value) { this.SentUtc = value; return this; }
public Date getApprovedUtc() { return ApprovedUtc; }
public DispatchSettlementView setApprovedUtc(Date value) { this.ApprovedUtc = value; return this; }
public String getApprovedBy() { return ApprovedBy; }
public DispatchSettlementView setApprovedBy(String value) { this.ApprovedBy = value; return this; }
public Date getPaidUtc() { return PaidUtc; }
public DispatchSettlementView setPaidUtc(Date value) { this.PaidUtc = value; return this; }
public String getPaidRef() { return PaidRef; }
public DispatchSettlementView setPaidRef(String value) { this.PaidRef = value; return this; }
public Integer getContactCount() { return ContactCount; }
public DispatchSettlementView setContactCount(Integer value) { this.ContactCount = value; return this; }
public ArrayList<DispatchSettlementDeductionView> getDeductions() { return Deductions; }
public DispatchSettlementView setDeductions(ArrayList<DispatchSettlementDeductionView> value) { this.Deductions = value; return this; }
public ArrayList<DispatchLoadView> getLoads() { return Loads; }
public DispatchSettlementView setLoads(ArrayList<DispatchLoadView> value) { this.Loads = value; return this; }
}
public static class DispatchSettlementDeductionView
{
public Integer DeductionId = null;
public String Kind = null;
public String Label = null;
public BigDecimal Amount = null;
public String Note = null;
public Integer getDeductionId() { return DeductionId; }
public DispatchSettlementDeductionView setDeductionId(Integer value) { this.DeductionId = value; return this; }
public String getKind() { return Kind; }
public DispatchSettlementDeductionView setKind(String value) { this.Kind = value; return this; }
public String getLabel() { return Label; }
public DispatchSettlementDeductionView setLabel(String value) { this.Label = value; return this; }
public BigDecimal getAmount() { return Amount; }
public DispatchSettlementDeductionView setAmount(BigDecimal value) { this.Amount = value; return this; }
public String getNote() { return Note; }
public DispatchSettlementDeductionView setNote(String value) { this.Note = value; return this; }
}
public static class DispatchLoadView
{
public Integer LoadId = null;
public String Code = null;
public String Module = null;
public String TruckLabel = null;
public String DriverLabel = null;
public String CarrierLabel = null;
public String SourceLabel = null;
public String DestinationLabel = null;
public BigDecimal Qty = null;
public String Unit = null;
public String QtyText = null;
public String TicketCode = null;
public BigDecimal RateApplied = null;
public String RateBasis = null;
public BigDecimal Revenue = null;
public String PayPlanLabel = null;
public BigDecimal Pay = null;
public String Status = null;
public Date OpenedUtc = null;
public Date ClosedUtc = null;
public Integer Photos = null;
public ArrayList<DispatchLoadStageView> Stages = new ArrayList<DispatchLoadStageView>();
public Integer getLoadId() { return LoadId; }
public DispatchLoadView setLoadId(Integer value) { this.LoadId = value; return this; }
public String getCode() { return Code; }
public DispatchLoadView setCode(String value) { this.Code = value; return this; }
public String getModule() { return Module; }
public DispatchLoadView setModule(String value) { this.Module = value; return this; }
public String getTruckLabel() { return TruckLabel; }
public DispatchLoadView setTruckLabel(String value) { this.TruckLabel = value; return this; }
public String getDriverLabel() { return DriverLabel; }
public DispatchLoadView setDriverLabel(String value) { this.DriverLabel = value; return this; }
public String getCarrierLabel() { return CarrierLabel; }
public DispatchLoadView setCarrierLabel(String value) { this.CarrierLabel = value; return this; }
public String getSourceLabel() { return SourceLabel; }
public DispatchLoadView setSourceLabel(String value) { this.SourceLabel = value; return this; }
public String getDestinationLabel() { return DestinationLabel; }
public DispatchLoadView setDestinationLabel(String value) { this.DestinationLabel = value; return this; }
public BigDecimal getQty() { return Qty; }
public DispatchLoadView setQty(BigDecimal value) { this.Qty = value; return this; }
public String getUnit() { return Unit; }
public DispatchLoadView setUnit(String value) { this.Unit = value; return this; }
public String getQtyText() { return QtyText; }
public DispatchLoadView setQtyText(String value) { this.QtyText = value; return this; }
public String getTicketCode() { return TicketCode; }
public DispatchLoadView setTicketCode(String value) { this.TicketCode = value; return this; }
public BigDecimal getRateApplied() { return RateApplied; }
public DispatchLoadView setRateApplied(BigDecimal value) { this.RateApplied = value; return this; }
public String getRateBasis() { return RateBasis; }
public DispatchLoadView setRateBasis(String value) { this.RateBasis = value; return this; }
public BigDecimal getRevenue() { return Revenue; }
public DispatchLoadView setRevenue(BigDecimal value) { this.Revenue = value; return this; }
public String getPayPlanLabel() { return PayPlanLabel; }
public DispatchLoadView setPayPlanLabel(String value) { this.PayPlanLabel = value; return this; }
public BigDecimal getPay() { return Pay; }
public DispatchLoadView setPay(BigDecimal value) { this.Pay = value; return this; }
public String getStatus() { return Status; }
public DispatchLoadView setStatus(String value) { this.Status = value; return this; }
public Date getOpenedUtc() { return OpenedUtc; }
public DispatchLoadView setOpenedUtc(Date value) { this.OpenedUtc = value; return this; }
public Date getClosedUtc() { return ClosedUtc; }
public DispatchLoadView setClosedUtc(Date value) { this.ClosedUtc = value; return this; }
public Integer getPhotos() { return Photos; }
public DispatchLoadView setPhotos(Integer value) { this.Photos = value; return this; }
public ArrayList<DispatchLoadStageView> getStages() { return Stages; }
public DispatchLoadView setStages(ArrayList<DispatchLoadStageView> value) { this.Stages = value; return this; }
}
public static class DispatchLoadStageView
{
public String Stage = null;
public Date AtUtc = null;
public String Note = null;
public String getStage() { return Stage; }
public DispatchLoadStageView setStage(String value) { this.Stage = value; return this; }
public Date getAtUtc() { return AtUtc; }
public DispatchLoadStageView setAtUtc(Date value) { this.AtUtc = value; return this; }
public String getNote() { return Note; }
public DispatchLoadStageView setNote(String value) { this.Note = value; return this; }
}
public static class DispatchSettlementSuggestView
{
public Integer VendorID = null;
public String VendorName = null;
public BigDecimal SplitPct = null;
public String Terms = null;
public Boolean W9OnFile = null;
public Date CoiExpires = null;
public Date PeriodStart = null;
public Date PeriodEnd = null;
public Integer UnsettledLoads = null;
public Integer UnpricedLoads = null;
public BigDecimal UnsettledPay = null;
public Integer getVendorID() { return VendorID; }
public DispatchSettlementSuggestView setVendorID(Integer value) { this.VendorID = value; return this; }
public String getVendorName() { return VendorName; }
public DispatchSettlementSuggestView setVendorName(String value) { this.VendorName = value; return this; }
public BigDecimal getSplitPct() { return SplitPct; }
public DispatchSettlementSuggestView setSplitPct(BigDecimal value) { this.SplitPct = value; return this; }
public String getTerms() { return Terms; }
public DispatchSettlementSuggestView setTerms(String value) { this.Terms = value; return this; }
public Boolean isW9OnFile() { return W9OnFile; }
public DispatchSettlementSuggestView setW9OnFile(Boolean value) { this.W9OnFile = value; return this; }
public Date getCoiExpires() { return CoiExpires; }
public DispatchSettlementSuggestView setCoiExpires(Date value) { this.CoiExpires = value; return this; }
public Date getPeriodStart() { return PeriodStart; }
public DispatchSettlementSuggestView setPeriodStart(Date value) { this.PeriodStart = value; return this; }
public Date getPeriodEnd() { return PeriodEnd; }
public DispatchSettlementSuggestView setPeriodEnd(Date value) { this.PeriodEnd = value; return this; }
public Integer getUnsettledLoads() { return UnsettledLoads; }
public DispatchSettlementSuggestView setUnsettledLoads(Integer value) { this.UnsettledLoads = value; return this; }
public Integer getUnpricedLoads() { return UnpricedLoads; }
public DispatchSettlementSuggestView setUnpricedLoads(Integer value) { this.UnpricedLoads = value; return this; }
public BigDecimal getUnsettledPay() { return UnsettledPay; }
public DispatchSettlementSuggestView setUnsettledPay(BigDecimal value) { this.UnsettledPay = value; return this; }
}
}
Java DispatchSettlementGenerateRequest 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/dispatch/settlements/generate HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<DispatchSettlementGenerateRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<PeriodEnd>0001-01-01T00:00:00</PeriodEnd>
<PeriodStart>0001-01-01T00:00:00</PeriodStart>
<VendorID>0</VendorID>
</DispatchSettlementGenerateRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<DispatchSettlementsResponse 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>
<Settlement>
<ApprovedBy>String</ApprovedBy>
<ApprovedUtc>0001-01-01T00:00:00</ApprovedUtc>
<CarrierShare>0</CarrierShare>
<Code>String</Code>
<ContactCount>0</ContactCount>
<Deductions>
<DispatchSettlementDeductionView>
<Amount>0</Amount>
<DeductionId>0</DeductionId>
<Kind>String</Kind>
<Label>String</Label>
<Note>String</Note>
</DispatchSettlementDeductionView>
</Deductions>
<DeductionsTotal>0</DeductionsTotal>
<GeneratedUtc>0001-01-01T00:00:00</GeneratedUtc>
<GrossRevenue>0</GrossRevenue>
<LoadCount>0</LoadCount>
<Loads>
<DispatchLoadView>
<CarrierLabel>String</CarrierLabel>
<ClosedUtc>0001-01-01T00:00:00</ClosedUtc>
<Code>String</Code>
<DestinationLabel>String</DestinationLabel>
<DriverLabel>String</DriverLabel>
<LoadId>0</LoadId>
<Module>String</Module>
<OpenedUtc>0001-01-01T00:00:00</OpenedUtc>
<Pay>0</Pay>
<PayPlanLabel>String</PayPlanLabel>
<Photos>0</Photos>
<Qty>0</Qty>
<QtyText>String</QtyText>
<RateApplied>0</RateApplied>
<RateBasis>String</RateBasis>
<Revenue>0</Revenue>
<SourceLabel>String</SourceLabel>
<Stages>
<DispatchLoadStageView>
<AtUtc>0001-01-01T00:00:00</AtUtc>
<Note>String</Note>
<Stage>String</Stage>
</DispatchLoadStageView>
</Stages>
<Status>String</Status>
<TicketCode>String</TicketCode>
<TruckLabel>String</TruckLabel>
<Unit>String</Unit>
</DispatchLoadView>
</Loads>
<Net>0</Net>
<Notes>String</Notes>
<PaidRef>String</PaidRef>
<PaidUtc>0001-01-01T00:00:00</PaidUtc>
<PeriodEnd>0001-01-01T00:00:00</PeriodEnd>
<PeriodStart>0001-01-01T00:00:00</PeriodStart>
<SentUtc>0001-01-01T00:00:00</SentUtc>
<SettlementId>0</SettlementId>
<SplitPct>0</SplitPct>
<Status>String</Status>
<VendorID>0</VendorID>
<VendorName>String</VendorName>
</Settlement>
<Settlements>
<DispatchSettlementView>
<ApprovedBy>String</ApprovedBy>
<ApprovedUtc>0001-01-01T00:00:00</ApprovedUtc>
<CarrierShare>0</CarrierShare>
<Code>String</Code>
<ContactCount>0</ContactCount>
<Deductions>
<DispatchSettlementDeductionView>
<Amount>0</Amount>
<DeductionId>0</DeductionId>
<Kind>String</Kind>
<Label>String</Label>
<Note>String</Note>
</DispatchSettlementDeductionView>
</Deductions>
<DeductionsTotal>0</DeductionsTotal>
<GeneratedUtc>0001-01-01T00:00:00</GeneratedUtc>
<GrossRevenue>0</GrossRevenue>
<LoadCount>0</LoadCount>
<Loads>
<DispatchLoadView>
<CarrierLabel>String</CarrierLabel>
<ClosedUtc>0001-01-01T00:00:00</ClosedUtc>
<Code>String</Code>
<DestinationLabel>String</DestinationLabel>
<DriverLabel>String</DriverLabel>
<LoadId>0</LoadId>
<Module>String</Module>
<OpenedUtc>0001-01-01T00:00:00</OpenedUtc>
<Pay>0</Pay>
<PayPlanLabel>String</PayPlanLabel>
<Photos>0</Photos>
<Qty>0</Qty>
<QtyText>String</QtyText>
<RateApplied>0</RateApplied>
<RateBasis>String</RateBasis>
<Revenue>0</Revenue>
<SourceLabel>String</SourceLabel>
<Stages>
<DispatchLoadStageView>
<AtUtc>0001-01-01T00:00:00</AtUtc>
<Note>String</Note>
<Stage>String</Stage>
</DispatchLoadStageView>
</Stages>
<Status>String</Status>
<TicketCode>String</TicketCode>
<TruckLabel>String</TruckLabel>
<Unit>String</Unit>
</DispatchLoadView>
</Loads>
<Net>0</Net>
<Notes>String</Notes>
<PaidRef>String</PaidRef>
<PaidUtc>0001-01-01T00:00:00</PaidUtc>
<PeriodEnd>0001-01-01T00:00:00</PeriodEnd>
<PeriodStart>0001-01-01T00:00:00</PeriodStart>
<SentUtc>0001-01-01T00:00:00</SentUtc>
<SettlementId>0</SettlementId>
<SplitPct>0</SplitPct>
<Status>String</Status>
<VendorID>0</VendorID>
<VendorName>String</VendorName>
</DispatchSettlementView>
</Settlements>
<Suggestions>
<DispatchSettlementSuggestView>
<CoiExpires>0001-01-01T00:00:00</CoiExpires>
<PeriodEnd>0001-01-01T00:00:00</PeriodEnd>
<PeriodStart>0001-01-01T00:00:00</PeriodStart>
<SplitPct>0</SplitPct>
<Terms>String</Terms>
<UnpricedLoads>0</UnpricedLoads>
<UnsettledLoads>0</UnsettledLoads>
<UnsettledPay>0</UnsettledPay>
<VendorID>0</VendorID>
<VendorName>String</VendorName>
<W9OnFile>false</W9OnFile>
</DispatchSettlementSuggestView>
</Suggestions>
</DispatchSettlementsResponse>