| GET | /v1/details/{vehicleType}/{Identifier} | Get Vehicle Details | |
|---|---|---|---|
| GET | /details/{vehicleType}/{Identifier} | Get Vehicle Details |
import 'package:servicestack/servicestack.dart';
class VehicleAuditDetails implements IConvertible
{
String userId = "";
bool? status;
String notes = "";
String creationDate = "";
VehicleAuditDetails({this.userId="",this.status,this.notes="",this.creationDate=""});
VehicleAuditDetails.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
userId = json['userId'] ?? "";
status = json['status'];
notes = json['notes'] ?? "";
creationDate = json['creationDate'] ?? "";
return this;
}
Map<String, dynamic> toJson() => {
'userId': userId,
'status': status,
'notes': notes,
'creationDate': creationDate
};
getTypeName() => "VehicleAuditDetails";
TypeContext? context = _ctx;
}
class BackOrderVehicleDetailsBase implements IConvertible
{
String vin = "";
String commissionNumber = "";
String description = "";
String model = "";
String fullModelYearCode = "";
int retailerId = 0;
String imageUrl = "";
String colour = "";
String colourDescription = "";
String bodyStyle = "";
String fuelType = "";
String transmission = "";
String transmissionType = "";
String package = "";
List<String> packages = [];
String line = "";
String mappedLine = "";
String upholstery = "";
String upholsteryDescription = "";
String usageCode = "";
String account = "";
String nst = "";
String baumuster = "";
double? electricRange;
double? electricConsumption;
double retailPrice_ExVAT = 0;
double? actualPrice;
double otrPrice = 0;
double p11D = 0;
String vehicleType = "";
bool? secured;
DateTime? portArrivalDate;
String displayRetailer = "";
String location = "";
String bm7NST = "";
bool? isAvailableOnline;
bool? isSpecialistCar;
bool? isSellable;
bool? inBackOrderAccount;
List<VehicleAuditDetails> vehicleAuditDetails = [];
List<String>? ispVehicleCustomerDescriptions;
bool? underOffer;
bool? isAllocatedToBackOrder;
bool? eligibleForMaTransfer;
String? confirmedProductionDate;
String? forecastedArrivalDate;
BackOrderVehicleDetailsBase({this.vin="",this.commissionNumber="",this.description="",this.model="",this.fullModelYearCode="",this.retailerId=0,this.imageUrl="",this.colour="",this.colourDescription="",this.bodyStyle="",this.fuelType="",this.transmission="",this.transmissionType="",this.package="",this.packages=const [],this.line="",this.mappedLine="",this.upholstery="",this.upholsteryDescription="",this.usageCode="",this.account="",this.nst="",this.baumuster="",this.electricRange,this.electricConsumption,this.retailPrice_ExVAT=0,this.actualPrice,this.otrPrice=0,this.p11D=0,this.vehicleType="",this.secured,this.portArrivalDate,this.displayRetailer="",this.location="",this.bm7NST="",this.isAvailableOnline,this.isSpecialistCar,this.isSellable,this.inBackOrderAccount,this.vehicleAuditDetails=const [],this.ispVehicleCustomerDescriptions,this.underOffer,this.isAllocatedToBackOrder,this.eligibleForMaTransfer,this.confirmedProductionDate,this.forecastedArrivalDate});
BackOrderVehicleDetailsBase.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
vin = json['vin'] ?? "";
commissionNumber = json['commissionNumber'] ?? "";
description = json['description'] ?? "";
model = json['model'] ?? "";
fullModelYearCode = json['fullModelYearCode'] ?? "";
retailerId = json['retailerId'] ?? 0;
imageUrl = json['imageUrl'] ?? "";
colour = json['colour'] ?? "";
colourDescription = json['colourDescription'] ?? "";
bodyStyle = json['bodyStyle'] ?? "";
fuelType = json['fuelType'] ?? "";
transmission = json['transmission'] ?? "";
transmissionType = json['transmissionType'] ?? "";
package = json['package'] ?? "";
packages = JsonConverters.fromJson(json['packages'],'List<String>',context!) ?? [];
line = json['line'] ?? "";
mappedLine = json['mappedLine'] ?? "";
upholstery = json['upholstery'] ?? "";
upholsteryDescription = json['upholsteryDescription'] ?? "";
usageCode = json['usageCode'] ?? "";
account = json['account'] ?? "";
nst = json['nst'] ?? "";
baumuster = json['baumuster'] ?? "";
electricRange = JsonConverters.toDouble(json['electricRange']);
electricConsumption = JsonConverters.toDouble(json['electricConsumption']);
retailPrice_ExVAT = JsonConverters.toDouble(json['retailPrice_ExVAT']) ?? 0;
actualPrice = JsonConverters.toDouble(json['actualPrice']);
otrPrice = JsonConverters.toDouble(json['otrPrice']) ?? 0;
p11D = JsonConverters.toDouble(json['p11D']) ?? 0;
vehicleType = json['vehicleType'] ?? "";
secured = json['secured'];
portArrivalDate = JsonConverters.fromJson(json['portArrivalDate'],'DateTime',context!);
displayRetailer = json['displayRetailer'] ?? "";
location = json['location'] ?? "";
bm7NST = json['bm7NST'] ?? "";
isAvailableOnline = json['isAvailableOnline'];
isSpecialistCar = json['isSpecialistCar'];
isSellable = json['isSellable'];
inBackOrderAccount = json['inBackOrderAccount'];
vehicleAuditDetails = JsonConverters.fromJson(json['vehicleAuditDetails'],'List<VehicleAuditDetails>',context!) ?? [];
ispVehicleCustomerDescriptions = JsonConverters.fromJson(json['ispVehicleCustomerDescriptions'],'List<String>',context!);
underOffer = json['underOffer'];
isAllocatedToBackOrder = json['isAllocatedToBackOrder'];
eligibleForMaTransfer = json['eligibleForMaTransfer'];
confirmedProductionDate = json['confirmedProductionDate'];
forecastedArrivalDate = json['forecastedArrivalDate'];
return this;
}
Map<String, dynamic> toJson() => {
'vin': vin,
'commissionNumber': commissionNumber,
'description': description,
'model': model,
'fullModelYearCode': fullModelYearCode,
'retailerId': retailerId,
'imageUrl': imageUrl,
'colour': colour,
'colourDescription': colourDescription,
'bodyStyle': bodyStyle,
'fuelType': fuelType,
'transmission': transmission,
'transmissionType': transmissionType,
'package': package,
'packages': JsonConverters.toJson(packages,'List<String>',context!),
'line': line,
'mappedLine': mappedLine,
'upholstery': upholstery,
'upholsteryDescription': upholsteryDescription,
'usageCode': usageCode,
'account': account,
'nst': nst,
'baumuster': baumuster,
'electricRange': electricRange,
'electricConsumption': electricConsumption,
'retailPrice_ExVAT': retailPrice_ExVAT,
'actualPrice': actualPrice,
'otrPrice': otrPrice,
'p11D': p11D,
'vehicleType': vehicleType,
'secured': secured,
'portArrivalDate': JsonConverters.toJson(portArrivalDate,'DateTime',context!),
'displayRetailer': displayRetailer,
'location': location,
'bm7NST': bm7NST,
'isAvailableOnline': isAvailableOnline,
'isSpecialistCar': isSpecialistCar,
'isSellable': isSellable,
'inBackOrderAccount': inBackOrderAccount,
'vehicleAuditDetails': JsonConverters.toJson(vehicleAuditDetails,'List<VehicleAuditDetails>',context!),
'ispVehicleCustomerDescriptions': JsonConverters.toJson(ispVehicleCustomerDescriptions,'List<String>',context!),
'underOffer': underOffer,
'isAllocatedToBackOrder': isAllocatedToBackOrder,
'eligibleForMaTransfer': eligibleForMaTransfer,
'confirmedProductionDate': confirmedProductionDate,
'forecastedArrivalDate': forecastedArrivalDate
};
getTypeName() => "BackOrderVehicleDetailsBase";
TypeContext? context = _ctx;
}
class BackOrderVehicleDetails extends BackOrderVehicleDetailsBase implements IConvertible
{
String? engine;
BackOrderVehicleDetails({this.engine});
BackOrderVehicleDetails.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
engine = json['engine'];
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'engine': engine
});
getTypeName() => "BackOrderVehicleDetails";
TypeContext? context = _ctx;
}
class VehicleDetailsResponse implements IConvertible
{
BackOrderVehicleDetails? vehicle;
VehicleDetailsResponse({this.vehicle});
VehicleDetailsResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
vehicle = JsonConverters.fromJson(json['vehicle'],'BackOrderVehicleDetails',context!);
return this;
}
Map<String, dynamic> toJson() => {
'vehicle': JsonConverters.toJson(vehicle,'BackOrderVehicleDetails',context!)
};
getTypeName() => "VehicleDetailsResponse";
TypeContext? context = _ctx;
}
class VehicleDetailsRequest implements IGet, IConvertible
{
String identifier = "";
String vehicleType = "";
VehicleDetailsRequest({this.identifier="",this.vehicleType=""});
VehicleDetailsRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
identifier = json['identifier'] ?? "";
vehicleType = json['vehicleType'] ?? "";
return this;
}
Map<String, dynamic> toJson() => {
'identifier': identifier,
'vehicleType': vehicleType
};
getTypeName() => "VehicleDetailsRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'uat_api_vehicle_mgt_mb_dhc.rapp_customers.co.uk', types: <String, TypeInfo> {
'VehicleAuditDetails': TypeInfo(TypeOf.Class, create:() => VehicleAuditDetails()),
'BackOrderVehicleDetailsBase': TypeInfo(TypeOf.Class, create:() => BackOrderVehicleDetailsBase()),
'List<VehicleAuditDetails>': TypeInfo(TypeOf.Class, create:() => <VehicleAuditDetails>[]),
'BackOrderVehicleDetails': TypeInfo(TypeOf.Class, create:() => BackOrderVehicleDetails()),
'VehicleDetailsResponse': TypeInfo(TypeOf.Class, create:() => VehicleDetailsResponse()),
'VehicleDetailsRequest': TypeInfo(TypeOf.Class, create:() => VehicleDetailsRequest()),
});
Dart VehicleDetailsRequest 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/details/{vehicleType}/{Identifier} HTTP/1.1
Host: uat-api-vehicle-mgt-mb-dhc.rapp-customers.co.uk
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
vehicle:
{
engine: String,
vin: String,
commissionNumber: String,
description: String,
model: String,
fullModelYearCode: String,
retailerId: 0,
imageUrl: String,
colour: String,
colourDescription: String,
bodyStyle: String,
fuelType: String,
transmission: String,
transmissionType: String,
package: String,
packages:
[
String
],
line: String,
mappedLine: String,
upholstery: String,
upholsteryDescription: String,
usageCode: String,
account: String,
nst: String,
baumuster: String,
electricRange: 0,
electricConsumption: 0,
retailPrice_ExVAT: 0,
actualPrice: 0,
otrPrice: 0,
p11D: 0,
vehicleType: String,
secured: False,
portArrivalDate: 0001-01-01,
displayRetailer: String,
location: String,
bm7NST: String,
isAvailableOnline: False,
isSpecialistCar: False,
isSellable: False,
inBackOrderAccount: False,
vehicleAuditDetails:
[
{
userId: String,
status: False,
notes: String,
creationDate: String
}
],
ispVehicleCustomerDescriptions:
[
String
],
underOffer: False,
isAllocatedToBackOrder: False,
eligibleForMaTransfer: False,
confirmedProductionDate: String,
forecastedArrivalDate: String
}
}