| GET | /pulsit/moduletriphistory |
|---|
import 'package:servicestack/servicestack.dart';
class ApiServiceRequest implements IServiceRequest, IHasApiKey, IConvertible
{
/**
* The API Key required for authentication
*/
// @ApiMember(DataType="string", Description="The API Key required for authentication", IsRequired=true)
String? ApiKey;
ApiServiceRequest({this.ApiKey});
ApiServiceRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ApiKey = json['ApiKey'];
return this;
}
Map<String, dynamic> toJson() => {
'ApiKey': ApiKey
};
getTypeName() => "ApiServiceRequest";
TypeContext? context = _ctx;
}
class ApiServiceResponse implements IServiceResponse, IConvertible
{
String? Description;
String? Heading;
bool? WasSuccessful;
dynamic? ModelState;
ApiServiceResponse({this.Description,this.Heading,this.WasSuccessful,this.ModelState});
ApiServiceResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Description = json['Description'];
Heading = json['Heading'];
WasSuccessful = json['WasSuccessful'];
ModelState = JsonConverters.fromJson(json['ModelState'],'dynamic',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Description': Description,
'Heading': Heading,
'WasSuccessful': WasSuccessful,
'ModelState': JsonConverters.toJson(ModelState,'dynamic',context!)
};
getTypeName() => "ApiServiceResponse";
TypeContext? context = _ctx;
}
class PulsitTripHistoryItem implements IConvertible
{
String? TripNumber;
String? StartPulsitId;
DateTime? StartEventTime;
double? StartLatitude;
double? StartLongitude;
String? StartAddress;
String? StopPulsitId;
DateTime? StopEventTime;
double? StopLatitude;
double? StopLongitude;
String? StopAddress;
double? TripMinutes;
PulsitTripHistoryItem({this.TripNumber,this.StartPulsitId,this.StartEventTime,this.StartLatitude,this.StartLongitude,this.StartAddress,this.StopPulsitId,this.StopEventTime,this.StopLatitude,this.StopLongitude,this.StopAddress,this.TripMinutes});
PulsitTripHistoryItem.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
TripNumber = json['TripNumber'];
StartPulsitId = json['StartPulsitId'];
StartEventTime = JsonConverters.fromJson(json['StartEventTime'],'DateTime',context!);
StartLatitude = JsonConverters.toDouble(json['StartLatitude']);
StartLongitude = JsonConverters.toDouble(json['StartLongitude']);
StartAddress = json['StartAddress'];
StopPulsitId = json['StopPulsitId'];
StopEventTime = JsonConverters.fromJson(json['StopEventTime'],'DateTime',context!);
StopLatitude = JsonConverters.toDouble(json['StopLatitude']);
StopLongitude = JsonConverters.toDouble(json['StopLongitude']);
StopAddress = json['StopAddress'];
TripMinutes = JsonConverters.toDouble(json['TripMinutes']);
return this;
}
Map<String, dynamic> toJson() => {
'TripNumber': TripNumber,
'StartPulsitId': StartPulsitId,
'StartEventTime': JsonConverters.toJson(StartEventTime,'DateTime',context!),
'StartLatitude': StartLatitude,
'StartLongitude': StartLongitude,
'StartAddress': StartAddress,
'StopPulsitId': StopPulsitId,
'StopEventTime': JsonConverters.toJson(StopEventTime,'DateTime',context!),
'StopLatitude': StopLatitude,
'StopLongitude': StopLongitude,
'StopAddress': StopAddress,
'TripMinutes': TripMinutes
};
getTypeName() => "PulsitTripHistoryItem";
TypeContext? context = _ctx;
}
class PulsitModuleTripHistoryResponse extends ApiServiceResponse implements IConvertible
{
List<PulsitTripHistoryItem>? Trips;
PulsitModuleTripHistoryResponse({this.Trips});
PulsitModuleTripHistoryResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
Trips = JsonConverters.fromJson(json['Trips'],'List<PulsitTripHistoryItem>',context!);
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'Trips': JsonConverters.toJson(Trips,'List<PulsitTripHistoryItem>',context!)
});
getTypeName() => "PulsitModuleTripHistoryResponse";
TypeContext? context = _ctx;
}
class PulsitModuleTripHistoryRequest extends ApiServiceRequest implements IConvertible
{
String? PulsitModuleId;
String? StartDate;
String? EndDate;
PulsitModuleTripHistoryRequest({this.PulsitModuleId,this.StartDate,this.EndDate});
PulsitModuleTripHistoryRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
PulsitModuleId = json['PulsitModuleId'];
StartDate = json['StartDate'];
EndDate = json['EndDate'];
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'PulsitModuleId': PulsitModuleId,
'StartDate': StartDate,
'EndDate': EndDate
});
getTypeName() => "PulsitModuleTripHistoryRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'galaxymobile.api.client.prod.86degrees.com', types: <String, TypeInfo> {
'ApiServiceRequest': TypeInfo(TypeOf.Class, create:() => ApiServiceRequest()),
'ApiServiceResponse': TypeInfo(TypeOf.Class, create:() => ApiServiceResponse()),
'PulsitTripHistoryItem': TypeInfo(TypeOf.Class, create:() => PulsitTripHistoryItem()),
'PulsitModuleTripHistoryResponse': TypeInfo(TypeOf.Class, create:() => PulsitModuleTripHistoryResponse()),
'List<PulsitTripHistoryItem>': TypeInfo(TypeOf.Class, create:() => <PulsitTripHistoryItem>[]),
'PulsitModuleTripHistoryRequest': TypeInfo(TypeOf.Class, create:() => PulsitModuleTripHistoryRequest()),
});
Dart PulsitModuleTripHistoryRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /pulsit/moduletriphistory HTTP/1.1 Host: galaxymobile.api.client.prod.86degrees.com Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"Trips":[{"TripNumber":"String","StartPulsitId":"String","StartEventTime":"0001-01-01T00:00:00.0000000","StartLatitude":0,"StartLongitude":0,"StartAddress":"String","StopPulsitId":"String","StopEventTime":"0001-01-01T00:00:00.0000000","StopLatitude":0,"StopLongitude":0,"StopAddress":"String","TripMinutes":0}],"Description":"String","Heading":"String","WasSuccessful":false,"ModelState":{}}