| GET,OPTIONS | /v1/worker/dispatch/od/pay |
|---|
"use strict";
export class CourierPayLineView {
/** @param {{DispatchLoadID?:number,Kind?:string,Label?:string,Qty?:number,Rate?:number,Amount?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
DispatchLoadID;
/** @type {string} */
Kind;
/** @type {string} */
Label;
/** @type {?number} */
Qty;
/** @type {?number} */
Rate;
/** @type {number} */
Amount;
}
export class CourierDriverPayRow {
/** @param {{DispatchLoadID?:number,Code?:string,Kind?:string,OrderCode?:string,RunCode?:string,QtyText?:string,SourceLabel?:string,DestinationLabel?:string,Status?:string,Pay?:number,OpenedUtc?:string,ClosedUtc?:string,Lines?:CourierPayLineView[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
DispatchLoadID;
/** @type {string} */
Code;
/** @type {string} */
Kind;
/** @type {string} */
OrderCode;
/** @type {string} */
RunCode;
/** @type {string} */
QtyText;
/** @type {string} */
SourceLabel;
/** @type {string} */
DestinationLabel;
/** @type {string} */
Status;
/** @type {?number} */
Pay;
/** @type {?string} */
OpenedUtc;
/** @type {?string} */
ClosedUtc;
/** @type {CourierPayLineView[]} */
Lines = [];
}
export class CourierEarnRow {
/** @param {{Kind?:string,LineKind?:string,AtUtc?:string,TimeText?:string,DayIdx?:number,FromDayIdx?:number,ToDayIdx?:number,OnToday?:boolean,Count?:number,Units?:number,Seq?:number,Street?:string,City?:string,Zip?:string,Amount?:number,Hours?:number,Code?:string,RunCode?:string,Qty?:number,Rate?:number,Label?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Kind;
/** @type {string} */
LineKind;
/** @type {?string} */
AtUtc;
/** @type {string} */
TimeText;
/** @type {?number} */
DayIdx;
/** @type {?number} */
FromDayIdx;
/** @type {?number} */
ToDayIdx;
/** @type {boolean} */
OnToday;
/** @type {number} */
Count;
/** @type {?number} */
Units;
/** @type {?number} */
Seq;
/** @type {string} */
Street;
/** @type {string} */
City;
/** @type {string} */
Zip;
/** @type {?number} */
Amount;
/** @type {?number} */
Hours;
/** @type {string} */
Code;
/** @type {string} */
RunCode;
/** @type {?number} */
Qty;
/** @type {?number} */
Rate;
/** @type {string} */
Label;
}
export class CourierEarnPlan {
/** @param {{Name?:string,WorkerClass?:string,PerPickup?:number,PerStop?:number,PerMissed?:number,PerCancel?:number,WaitAfterMin?:number,WaitPerMin?:number,MaxPaidWaitMin?:number,MileageOn?:boolean,PerMile?:number,MinPerJob?:number,TipsPct?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Name;
/** @type {string} */
WorkerClass;
/** @type {number} */
PerPickup;
/** @type {number} */
PerStop;
/** @type {number} */
PerMissed;
/** @type {number} */
PerCancel;
/** @type {number} */
WaitAfterMin;
/** @type {number} */
WaitPerMin;
/** @type {?number} */
MaxPaidWaitMin;
/** @type {boolean} */
MileageOn;
/** @type {number} */
PerMile;
/** @type {number} */
MinPerJob;
/** @type {number} */
TipsPct;
}
export class CourierDriverPayResponse {
/** @param {{Rows?:CourierDriverPayRow[],Total?:number,Available?:boolean,ServerUtc?:string,Range?:string,IsHourly?:boolean,TodayTotal?:number,WeekTotal?:number,TipsToday?:number,TipsWeek?:number,WeekStartUtc?:string,WeekStartDay?:number,Today?:CourierEarnRow[],Earlier?:CourierEarnRow[],Tips?:CourierEarnRow[],Plan?:CourierEarnPlan,PickupsWeek?:number,StopsWeek?:number,HoursToday?:number,HoursWeek?:number,ClockOn?:boolean,ClockSinceText?:string,HideAddresses?:boolean,Detailed?:boolean,UnitOne?:string,UnitMany?:string,UnitOneEs?:string,UnitManyEs?:string,ResponseStatus?:ResponseStatus}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {CourierDriverPayRow[]} */
Rows = [];
/** @type {number} */
Total;
/** @type {boolean} */
Available;
/** @type {string} */
ServerUtc;
/** @type {string} */
Range;
/** @type {boolean} */
IsHourly;
/** @type {number} */
TodayTotal;
/** @type {number} */
WeekTotal;
/** @type {number} */
TipsToday;
/** @type {number} */
TipsWeek;
/** @type {?string} */
WeekStartUtc;
/** @type {number} */
WeekStartDay;
/** @type {CourierEarnRow[]} */
Today = [];
/** @type {CourierEarnRow[]} */
Earlier = [];
/** @type {CourierEarnRow[]} */
Tips = [];
/** @type {CourierEarnPlan} */
Plan;
/** @type {number} */
PickupsWeek;
/** @type {number} */
StopsWeek;
/** @type {?number} */
HoursToday;
/** @type {?number} */
HoursWeek;
/** @type {boolean} */
ClockOn;
/** @type {string} */
ClockSinceText;
/** @type {boolean} */
HideAddresses;
/** @type {boolean} */
Detailed;
/** @type {string} */
UnitOne;
/** @type {string} */
UnitMany;
/** @type {string} */
UnitOneEs;
/** @type {string} */
UnitManyEs;
/** @type {ResponseStatus} */
ResponseStatus;
}
export class CourierDriverPayRequest {
/** @param {{Range?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Range;
}
JavaScript CourierDriverPayRequest 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.
GET /v1/worker/dispatch/od/pay HTTP/1.1 Host: api.dev.dynamics.trendsic.com Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<CourierDriverPayResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<Available>false</Available>
<ClockOn>false</ClockOn>
<ClockSinceText>String</ClockSinceText>
<Detailed>false</Detailed>
<Earlier>
<CourierEarnRow>
<Amount>0</Amount>
<AtUtc>0001-01-01T00:00:00</AtUtc>
<City>String</City>
<Code>String</Code>
<Count>0</Count>
<DayIdx>0</DayIdx>
<FromDayIdx>0</FromDayIdx>
<Hours>0</Hours>
<Kind>String</Kind>
<Label>String</Label>
<LineKind>String</LineKind>
<OnToday>false</OnToday>
<Qty>0</Qty>
<Rate>0</Rate>
<RunCode>String</RunCode>
<Seq>0</Seq>
<Street>String</Street>
<TimeText>String</TimeText>
<ToDayIdx>0</ToDayIdx>
<Units>0</Units>
<Zip>String</Zip>
</CourierEarnRow>
</Earlier>
<HideAddresses>false</HideAddresses>
<HoursToday>0</HoursToday>
<HoursWeek>0</HoursWeek>
<IsHourly>false</IsHourly>
<PickupsWeek>0</PickupsWeek>
<Plan>
<MaxPaidWaitMin>0</MaxPaidWaitMin>
<MileageOn>false</MileageOn>
<MinPerJob>0</MinPerJob>
<Name>String</Name>
<PerCancel>0</PerCancel>
<PerMile>0</PerMile>
<PerMissed>0</PerMissed>
<PerPickup>0</PerPickup>
<PerStop>0</PerStop>
<TipsPct>0</TipsPct>
<WaitAfterMin>0</WaitAfterMin>
<WaitPerMin>0</WaitPerMin>
<WorkerClass>String</WorkerClass>
</Plan>
<Range>String</Range>
<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>
<Rows>
<CourierDriverPayRow>
<ClosedUtc>0001-01-01T00:00:00</ClosedUtc>
<Code>String</Code>
<DestinationLabel>String</DestinationLabel>
<DispatchLoadID>0</DispatchLoadID>
<Kind>String</Kind>
<Lines>
<CourierPayLineView>
<Amount>0</Amount>
<DispatchLoadID>0</DispatchLoadID>
<Kind>String</Kind>
<Label>String</Label>
<Qty>0</Qty>
<Rate>0</Rate>
</CourierPayLineView>
</Lines>
<OpenedUtc>0001-01-01T00:00:00</OpenedUtc>
<OrderCode>String</OrderCode>
<Pay>0</Pay>
<QtyText>String</QtyText>
<RunCode>String</RunCode>
<SourceLabel>String</SourceLabel>
<Status>String</Status>
</CourierDriverPayRow>
</Rows>
<ServerUtc>0001-01-01T00:00:00</ServerUtc>
<StopsWeek>0</StopsWeek>
<Tips>
<CourierEarnRow>
<Amount>0</Amount>
<AtUtc>0001-01-01T00:00:00</AtUtc>
<City>String</City>
<Code>String</Code>
<Count>0</Count>
<DayIdx>0</DayIdx>
<FromDayIdx>0</FromDayIdx>
<Hours>0</Hours>
<Kind>String</Kind>
<Label>String</Label>
<LineKind>String</LineKind>
<OnToday>false</OnToday>
<Qty>0</Qty>
<Rate>0</Rate>
<RunCode>String</RunCode>
<Seq>0</Seq>
<Street>String</Street>
<TimeText>String</TimeText>
<ToDayIdx>0</ToDayIdx>
<Units>0</Units>
<Zip>String</Zip>
</CourierEarnRow>
</Tips>
<TipsToday>0</TipsToday>
<TipsWeek>0</TipsWeek>
<Today>
<CourierEarnRow>
<Amount>0</Amount>
<AtUtc>0001-01-01T00:00:00</AtUtc>
<City>String</City>
<Code>String</Code>
<Count>0</Count>
<DayIdx>0</DayIdx>
<FromDayIdx>0</FromDayIdx>
<Hours>0</Hours>
<Kind>String</Kind>
<Label>String</Label>
<LineKind>String</LineKind>
<OnToday>false</OnToday>
<Qty>0</Qty>
<Rate>0</Rate>
<RunCode>String</RunCode>
<Seq>0</Seq>
<Street>String</Street>
<TimeText>String</TimeText>
<ToDayIdx>0</ToDayIdx>
<Units>0</Units>
<Zip>String</Zip>
</CourierEarnRow>
</Today>
<TodayTotal>0</TodayTotal>
<Total>0</Total>
<UnitMany>String</UnitMany>
<UnitManyEs>String</UnitManyEs>
<UnitOne>String</UnitOne>
<UnitOneEs>String</UnitOneEs>
<WeekStartDay>0</WeekStartDay>
<WeekStartUtc>0001-01-01T00:00:00</WeekStartUtc>
<WeekTotal>0</WeekTotal>
</CourierDriverPayResponse>