| GET,OPTIONS | /v1/worker/dispatch/od/pay |
|---|
import Foundation
import ServiceStack
public class CourierDriverPayRequest : Codable
{
required public init(){}
}
public class CourierDriverPayResponse : Codable
{
public var rows:[CourierDriverPayRow] = []
public var total:Double
public var available:Bool
public var serverUtc:Date
public var responseStatus:ResponseStatus
required public init(){}
}
public class CourierDriverPayRow : Codable
{
public var dispatchLoadID:Int
public var code:String
public var kind:String
public var orderCode:String
public var runCode:String
public var qtyText:String
public var sourceLabel:String
public var destinationLabel:String
public var status:String
public var pay:Double?
public var openedUtc:Date?
public var closedUtc:Date?
public var lines:[CourierPayLineView] = []
required public init(){}
}
public class CourierPayLineView : Codable
{
public var dispatchLoadID:Int
public var kind:String
public var label:String
public var qty:Double?
public var rate:Double?
public var amount:Double
required public init(){}
}
Swift CourierDriverPayRequest 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.
GET /v1/worker/dispatch/od/pay HTTP/1.1 Host: api.dev.dynamics.trendsic.com Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
Rows:
[
{
DispatchLoadID: 0,
Code: String,
Kind: String,
OrderCode: String,
RunCode: String,
QtyText: String,
SourceLabel: String,
DestinationLabel: String,
Status: String,
Pay: 0,
OpenedUtc: 0001-01-01,
ClosedUtc: 0001-01-01,
Lines:
[
{
DispatchLoadID: 0,
Kind: String,
Label: String,
Qty: 0,
Rate: 0,
Amount: 0
}
]
}
],
Total: 0,
Available: False,
ServerUtc: 0001-01-01,
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
}
}