| GET | /v1/VehicleSwap/Historical | Get Historical Vehicle Records | This endpoint calls the same named endpoint in the Agency API to return historical Vehicle Swap records. |
|---|
import 'package:servicestack/servicestack.dart';
class VehicleSwapHistorical implements IConvertible
{
String? Reference;
String? OrderType;
String? VehicleSwapGuid;
String? OrderGuid;
String? Showroom;
String? GasUserId;
String? OldCommissionNumber;
String? NewCommissionNumber;
String? RequestReason;
bool? SentToCesar;
int? StatusId;
String? Status;
DateTime? SwapCreated;
DateTime? SwapUpdated;
VehicleSwapHistorical({this.Reference,this.OrderType,this.VehicleSwapGuid,this.OrderGuid,this.Showroom,this.GasUserId,this.OldCommissionNumber,this.NewCommissionNumber,this.RequestReason,this.SentToCesar,this.StatusId,this.Status,this.SwapCreated,this.SwapUpdated});
VehicleSwapHistorical.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Reference = json['Reference'];
OrderType = json['OrderType'];
VehicleSwapGuid = json['VehicleSwapGuid'];
OrderGuid = json['OrderGuid'];
Showroom = json['Showroom'];
GasUserId = json['GasUserId'];
OldCommissionNumber = json['OldCommissionNumber'];
NewCommissionNumber = json['NewCommissionNumber'];
RequestReason = json['RequestReason'];
SentToCesar = json['SentToCesar'];
StatusId = json['StatusId'];
Status = json['Status'];
SwapCreated = JsonConverters.fromJson(json['SwapCreated'],'DateTime',context!);
SwapUpdated = JsonConverters.fromJson(json['SwapUpdated'],'DateTime',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Reference': Reference,
'OrderType': OrderType,
'VehicleSwapGuid': VehicleSwapGuid,
'OrderGuid': OrderGuid,
'Showroom': Showroom,
'GasUserId': GasUserId,
'OldCommissionNumber': OldCommissionNumber,
'NewCommissionNumber': NewCommissionNumber,
'RequestReason': RequestReason,
'SentToCesar': SentToCesar,
'StatusId': StatusId,
'Status': Status,
'SwapCreated': JsonConverters.toJson(SwapCreated,'DateTime',context!),
'SwapUpdated': JsonConverters.toJson(SwapUpdated,'DateTime',context!)
};
getTypeName() => "VehicleSwapHistorical";
TypeContext? context = _ctx;
}
class VehicleSwapHistoricalResponse implements IConvertible
{
List<VehicleSwapHistorical>? HistoricalVehicleSwaps = [];
VehicleSwapHistoricalResponse({this.HistoricalVehicleSwaps});
VehicleSwapHistoricalResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
HistoricalVehicleSwaps = JsonConverters.fromJson(json['HistoricalVehicleSwaps'],'List<VehicleSwapHistorical>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'HistoricalVehicleSwaps': JsonConverters.toJson(HistoricalVehicleSwaps,'List<VehicleSwapHistorical>',context!)
};
getTypeName() => "VehicleSwapHistoricalResponse";
TypeContext? context = _ctx;
}
class VehicleSwapHistoricalRequest implements IPost, IConvertible
{
VehicleSwapHistoricalRequest();
VehicleSwapHistoricalRequest.fromJson(Map<String, dynamic> json) : super();
fromMap(Map<String, dynamic> json) {
return this;
}
Map<String, dynamic> toJson() => {};
getTypeName() => "VehicleSwapHistoricalRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'prod_api_agency_orch_mb_dhc.rapp_customers.co.uk', types: <String, TypeInfo> {
'VehicleSwapHistorical': TypeInfo(TypeOf.Class, create:() => VehicleSwapHistorical()),
'VehicleSwapHistoricalResponse': TypeInfo(TypeOf.Class, create:() => VehicleSwapHistoricalResponse()),
'List<VehicleSwapHistorical>': TypeInfo(TypeOf.Class, create:() => <VehicleSwapHistorical>[]),
'VehicleSwapHistoricalRequest': TypeInfo(TypeOf.Class, create:() => VehicleSwapHistoricalRequest()),
});
Dart VehicleSwapHistoricalRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v1/VehicleSwap/Historical HTTP/1.1 Host: prod-api-agency-orch-mb-dhc.rapp-customers.co.uk Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"HistoricalVehicleSwaps":[{"Reference":"String","OrderType":"String","VehicleSwapGuid":"00000000000000000000000000000000","OrderGuid":"00000000000000000000000000000000","Showroom":"String","GasUserId":"String","OldCommissionNumber":"String","NewCommissionNumber":"String","RequestReason":"String","SentToCesar":false,"StatusId":0,"SwapCreated":"\/Date(-62135596800000-0000)\/","SwapUpdated":"\/Date(-62135596800000-0000)\/"}]}