| GET | /v1/{VehicleType}/Vehicle/{vehicleIdentifier} | Get vehicle data by commission number | This endpoint calls Vehicle Data API and returns the data that populates the car details page in OneAdmin |
|---|
import 'package:servicestack/servicestack.dart';
class OfferVehicle implements IConvertible
{
String retailPriceExVAT = "";
OfferVehicle({this.retailPriceExVAT=""});
OfferVehicle.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
retailPriceExVAT = json['retailPriceExVAT'] ?? "";
return this;
}
Map<String, dynamic> toJson() => {
'retailPriceExVAT': retailPriceExVAT
};
getTypeName() => "OfferVehicle";
TypeContext? context = _ctx;
}
class Offer implements IConvertible
{
int id = 0;
String offerType = "";
String campaignName = "";
String from = "";
String to = "";
String value = "";
double? net;
OfferVehicle? offerVehicle;
bool? pending;
String documentUrl = "";
bool? personalised;
bool? isPersonalisedMonetaryOffer;
bool? campaignVIPDiscount;
double? offerValueNet;
bool? campaignGovernmentGrant;
Offer({this.id=0,this.offerType="",this.campaignName="",this.from="",this.to="",this.value="",this.net,this.offerVehicle,this.pending,this.documentUrl="",this.personalised,this.isPersonalisedMonetaryOffer,this.campaignVIPDiscount,this.offerValueNet,this.campaignGovernmentGrant});
Offer.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'] ?? 0;
offerType = json['offerType'] ?? "";
campaignName = json['campaignName'] ?? "";
from = json['from'] ?? "";
to = json['to'] ?? "";
value = json['value'] ?? "";
net = JsonConverters.toDouble(json['net']);
offerVehicle = JsonConverters.fromJson(json['offerVehicle'],'OfferVehicle',context!);
pending = json['pending'];
documentUrl = json['documentUrl'] ?? "";
personalised = json['personalised'];
isPersonalisedMonetaryOffer = json['isPersonalisedMonetaryOffer'];
campaignVIPDiscount = json['campaignVIPDiscount'];
offerValueNet = JsonConverters.toDouble(json['offerValueNet']);
campaignGovernmentGrant = json['campaignGovernmentGrant'];
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'offerType': offerType,
'campaignName': campaignName,
'from': from,
'to': to,
'value': value,
'net': net,
'offerVehicle': JsonConverters.toJson(offerVehicle,'OfferVehicle',context!),
'pending': pending,
'documentUrl': documentUrl,
'personalised': personalised,
'isPersonalisedMonetaryOffer': isPersonalisedMonetaryOffer,
'campaignVIPDiscount': campaignVIPDiscount,
'offerValueNet': offerValueNet,
'campaignGovernmentGrant': campaignGovernmentGrant
};
getTypeName() => "Offer";
TypeContext? context = _ctx;
}
class PersonalisedOffer extends Offer implements IConvertible
{
String category = "";
String description = "";
String reference = "";
int campaignId = 0;
bool? certificateRequired;
bool? autoSelect;
PersonalisedOffer({this.category="",this.description="",this.reference="",this.campaignId=0,this.certificateRequired,this.autoSelect});
PersonalisedOffer.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
category = json['category'] ?? "";
description = json['description'] ?? "";
reference = json['reference'] ?? "";
campaignId = json['campaignId'] ?? 0;
certificateRequired = json['certificateRequired'];
autoSelect = json['autoSelect'];
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'category': category,
'description': description,
'reference': reference,
'campaignId': campaignId,
'certificateRequired': certificateRequired,
'autoSelect': autoSelect
});
getTypeName() => "PersonalisedOffer";
TypeContext? context = _ctx;
}
class Message implements IConvertible
{
int id = 0;
String vin = "";
int campaignId = 0;
String value = "";
String campaignDescription = "";
String from = "";
String to = "";
String documentUrl = "";
Message({this.id=0,this.vin="",this.campaignId=0,this.value="",this.campaignDescription="",this.from="",this.to="",this.documentUrl=""});
Message.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'] ?? 0;
vin = json['vin'] ?? "";
campaignId = json['campaignId'] ?? 0;
value = json['value'] ?? "";
campaignDescription = json['campaignDescription'] ?? "";
from = json['from'] ?? "";
to = json['to'] ?? "";
documentUrl = json['documentUrl'] ?? "";
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'vin': vin,
'campaignId': campaignId,
'value': value,
'campaignDescription': campaignDescription,
'from': from,
'to': to,
'documentUrl': documentUrl
};
getTypeName() => "Message";
TypeContext? context = _ctx;
}
class OfferHistory implements IConvertible
{
int id = 0;
String auditType = "";
String offerType = "";
String source = "";
String from = "";
String to = "";
bool? personalised;
String value = "";
String net = "";
String vat = "";
String description = "";
String vin = "";
String gssn = "";
String creation = "";
String modified = "";
String userId = "";
int user = 0;
int offerId = 0;
String commissionNumber = "";
int? campaignId;
String campaignDescription = "";
DateTime? creationDate;
bool? isUsedCarOffer;
OfferHistory({this.id=0,this.auditType="",this.offerType="",this.source="",this.from="",this.to="",this.personalised,this.value="",this.net="",this.vat="",this.description="",this.vin="",this.gssn="",this.creation="",this.modified="",this.userId="",this.user=0,this.offerId=0,this.commissionNumber="",this.campaignId,this.campaignDescription="",this.creationDate,this.isUsedCarOffer});
OfferHistory.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'] ?? 0;
auditType = json['auditType'] ?? "";
offerType = json['offerType'] ?? "";
source = json['source'] ?? "";
from = json['from'] ?? "";
to = json['to'] ?? "";
personalised = json['personalised'];
value = json['value'] ?? "";
net = json['net'] ?? "";
vat = json['vat'] ?? "";
description = json['description'] ?? "";
vin = json['vin'] ?? "";
gssn = json['gssn'] ?? "";
creation = json['creation'] ?? "";
modified = json['modified'] ?? "";
userId = json['userId'] ?? "";
user = json['user'] ?? 0;
offerId = json['offerId'] ?? 0;
commissionNumber = json['commissionNumber'] ?? "";
campaignId = json['campaignId'];
campaignDescription = json['campaignDescription'] ?? "";
creationDate = JsonConverters.fromJson(json['creationDate'],'DateTime',context!) ?? DateTime(0);
isUsedCarOffer = json['isUsedCarOffer'];
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'auditType': auditType,
'offerType': offerType,
'source': source,
'from': from,
'to': to,
'personalised': personalised,
'value': value,
'net': net,
'vat': vat,
'description': description,
'vin': vin,
'gssn': gssn,
'creation': creation,
'modified': modified,
'userId': userId,
'user': user,
'offerId': offerId,
'commissionNumber': commissionNumber,
'campaignId': campaignId,
'campaignDescription': campaignDescription,
'creationDate': JsonConverters.toJson(creationDate,'DateTime',context!),
'isUsedCarOffer': isUsedCarOffer
};
getTypeName() => "OfferHistory";
TypeContext? context = _ctx;
}
class FinanceOffer implements IConvertible
{
String campaignDescription = "";
String termsAndConditions = "";
String label = "";
int campaignId = 0;
String documentUrl = "";
String from = "";
int id = 0;
String to = "";
String value = "";
String vin = "";
bool? enabled;
bool? pending;
String offerType = "";
FinanceOffer({this.campaignDescription="",this.termsAndConditions="",this.label="",this.campaignId=0,this.documentUrl="",this.from="",this.id=0,this.to="",this.value="",this.vin="",this.enabled,this.pending,this.offerType=""});
FinanceOffer.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
campaignDescription = json['campaignDescription'] ?? "";
termsAndConditions = json['termsAndConditions'] ?? "";
label = json['label'] ?? "";
campaignId = json['campaignId'] ?? 0;
documentUrl = json['documentUrl'] ?? "";
from = json['from'] ?? "";
id = json['id'] ?? 0;
to = json['to'] ?? "";
value = json['value'] ?? "";
vin = json['vin'] ?? "";
enabled = json['enabled'];
pending = json['pending'];
offerType = json['offerType'] ?? "";
return this;
}
Map<String, dynamic> toJson() => {
'campaignDescription': campaignDescription,
'termsAndConditions': termsAndConditions,
'label': label,
'campaignId': campaignId,
'documentUrl': documentUrl,
'from': from,
'id': id,
'to': to,
'value': value,
'vin': vin,
'enabled': enabled,
'pending': pending,
'offerType': offerType
};
getTypeName() => "FinanceOffer";
TypeContext? context = _ctx;
}
class VehicleByIdentifierResponse implements IConvertible
{
List<Offer> campaignOffers = [];
List<PersonalisedOffer> campaignPersonalisedOffers = [];
List<PersonalisedOffer> campaignVoucherOffers = [];
List<Offer> campaignGovernmentGrantOffers = [];
List<Message> campaignMessages = [];
List<OfferHistory>? offerHistories;
List<FinanceOffer>? financeOffers;
VehicleByIdentifierResponse({this.campaignOffers=const [],this.campaignPersonalisedOffers=const [],this.campaignVoucherOffers=const [],this.campaignGovernmentGrantOffers=const [],this.campaignMessages=const [],this.offerHistories,this.financeOffers});
VehicleByIdentifierResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
campaignOffers = JsonConverters.fromJson(json['campaignOffers'],'List<Offer>',context!) ?? [];
campaignPersonalisedOffers = JsonConverters.fromJson(json['campaignPersonalisedOffers'],'List<PersonalisedOffer>',context!) ?? [];
campaignVoucherOffers = JsonConverters.fromJson(json['campaignVoucherOffers'],'List<PersonalisedOffer>',context!) ?? [];
campaignGovernmentGrantOffers = JsonConverters.fromJson(json['campaignGovernmentGrantOffers'],'List<Offer>',context!) ?? [];
campaignMessages = JsonConverters.fromJson(json['campaignMessages'],'List<Message>',context!) ?? [];
offerHistories = JsonConverters.fromJson(json['offerHistories'],'List<OfferHistory>',context!);
financeOffers = JsonConverters.fromJson(json['financeOffers'],'List<FinanceOffer>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'campaignOffers': JsonConverters.toJson(campaignOffers,'List<Offer>',context!),
'campaignPersonalisedOffers': JsonConverters.toJson(campaignPersonalisedOffers,'List<PersonalisedOffer>',context!),
'campaignVoucherOffers': JsonConverters.toJson(campaignVoucherOffers,'List<PersonalisedOffer>',context!),
'campaignGovernmentGrantOffers': JsonConverters.toJson(campaignGovernmentGrantOffers,'List<Offer>',context!),
'campaignMessages': JsonConverters.toJson(campaignMessages,'List<Message>',context!),
'offerHistories': JsonConverters.toJson(offerHistories,'List<OfferHistory>',context!),
'financeOffers': JsonConverters.toJson(financeOffers,'List<FinanceOffer>',context!)
};
getTypeName() => "VehicleByIdentifierResponse";
TypeContext? context = _ctx;
}
class VehicleDataBase implements IConvertible
{
String vin = "";
String description = "";
String model = "";
String otr = "";
String retailPriceExVAT = "";
String actualPrice = "";
String p11D = "";
String fuelType = "";
String transmission = "";
String transmissionType = "";
String colour = "";
String colourCode = "";
String colourDescription = "";
String commissionNumber = "";
bool? offerAvailable;
int campaignDiscountOfferTotal = 0;
int campaignDiscountOfferTotalCurrent = 0;
int campaignDiscountOfferTotalPending = 0;
int campaignServiceOfferTotal = 0;
int campaignServiceOfferTotalCurrent = 0;
int campaignServiceOfferTotalPending = 0;
int campaignCustomOfferTotal = 0;
int campaignPersonalisedOfferTotalCurrent = 0;
int campaignPersonalisedOfferTotalPending = 0;
int campaignPersonalisedOfferTotal = 0;
int campaignCustomOfferTotalCurrent = 0;
int campaignCustomOfferTotalPending = 0;
int campaignOtherOfferTotal = 0;
int campaignOtherOfferTotalCurrent = 0;
int campaignOtherOfferTotalPending = 0;
int retailerDiscountOfferTotal = 0;
int retailerDiscountOfferTotalCurrent = 0;
int retailerDiscountOfferTotalPending = 0;
int retailerServiceOfferTotal = 0;
int retailerServiceOfferTotalCurrent = 0;
int retailerServiceOfferTotalPending = 0;
int retailerCustomOfferTotal = 0;
int retailerCustomOfferTotalCurrent = 0;
int retailerCustomOfferTotalPending = 0;
int retailerWarrantyOfferTotal = 0;
int retailerWarrantyOfferTotalCurrent = 0;
int retailerWarrantyOfferTotalPending = 0;
int retailerOfferTotal = 0;
int retailerOfferTotalCurrent = 0;
int retailerOfferTotalPending = 0;
int campaignOfferTotal = 0;
int campaignOfferTotalCurrent = 0;
int campaignOfferTotalPending = 0;
int campaignAndOfferTotal = 0;
int campaignAndOfferTotalCurrent = 0;
int campaignAndOfferTotalPending = 0;
int offerTotal = 0;
int offerTotalCurrent = 0;
int offerTotalPending = 0;
String creation = "";
String modified = "";
int electricRange = 0;
int electricConsumption = 0;
DateTime? portArrivalDate;
int? daysSincePortArrival;
double retailPriceIncVAT = 0;
String bodyStyle = "";
String upholstery = "";
String upholsteryCode = "";
String upholsteryType = "";
List<String> packageNames = [];
String line = "";
String mappedLine = "";
double currentRetailerOfferPrice = 0;
String retailPrice = "";
bool? vatQualifying;
int retailerId = 0;
String gssnId = "";
bool? noImage;
String imageUrl = "";
bool? isAvailableOnline;
bool? isBackOrdered;
String creationDate = "";
String maintenanceDate = "";
String registrationNumber = "";
DateTime? registrationDate;
int? mileage;
DateTime? tradeInDate;
String source = "";
String vehicleType = "";
String offerAmount = "";
String offerExpiry = "";
List<int> activeOffers = [];
int campaignMessagesTotal = 0;
bool? underOffer;
bool? isDisplayStock;
String displayRetailer = "";
String displayRetailerGssnId = "";
String location = "";
String account = "";
String accountType = "";
String usageCode = "";
String bm7NST = "";
bool? isSellable;
bool? secured;
bool? specialist;
bool? isMotabilityRetailer;
String upholsteryDescription = "";
bool? inBackOrderAccount;
String? fullModelYearCode;
String baumuster = "";
bool? isMotability;
double? pipAdvanceRentalGross;
double? wpmsAdvanceRentalGross;
List<String>? ispVehicleCustomerDescriptions;
bool? eligibleForMaTransfer;
String? confirmedProductionDate;
String? forecastedArrivalDate;
VehicleDataBase({this.vin="",this.description="",this.model="",this.otr="",this.retailPriceExVAT="",this.actualPrice="",this.p11D="",this.fuelType="",this.transmission="",this.transmissionType="",this.colour="",this.colourCode="",this.colourDescription="",this.commissionNumber="",this.offerAvailable,this.campaignDiscountOfferTotal=0,this.campaignDiscountOfferTotalCurrent=0,this.campaignDiscountOfferTotalPending=0,this.campaignServiceOfferTotal=0,this.campaignServiceOfferTotalCurrent=0,this.campaignServiceOfferTotalPending=0,this.campaignCustomOfferTotal=0,this.campaignPersonalisedOfferTotalCurrent=0,this.campaignPersonalisedOfferTotalPending=0,this.campaignPersonalisedOfferTotal=0,this.campaignCustomOfferTotalCurrent=0,this.campaignCustomOfferTotalPending=0,this.campaignOtherOfferTotal=0,this.campaignOtherOfferTotalCurrent=0,this.campaignOtherOfferTotalPending=0,this.retailerDiscountOfferTotal=0,this.retailerDiscountOfferTotalCurrent=0,this.retailerDiscountOfferTotalPending=0,this.retailerServiceOfferTotal=0,this.retailerServiceOfferTotalCurrent=0,this.retailerServiceOfferTotalPending=0,this.retailerCustomOfferTotal=0,this.retailerCustomOfferTotalCurrent=0,this.retailerCustomOfferTotalPending=0,this.retailerWarrantyOfferTotal=0,this.retailerWarrantyOfferTotalCurrent=0,this.retailerWarrantyOfferTotalPending=0,this.retailerOfferTotal=0,this.retailerOfferTotalCurrent=0,this.retailerOfferTotalPending=0,this.campaignOfferTotal=0,this.campaignOfferTotalCurrent=0,this.campaignOfferTotalPending=0,this.campaignAndOfferTotal=0,this.campaignAndOfferTotalCurrent=0,this.campaignAndOfferTotalPending=0,this.offerTotal=0,this.offerTotalCurrent=0,this.offerTotalPending=0,this.creation="",this.modified="",this.electricRange=0,this.electricConsumption=0,this.portArrivalDate,this.daysSincePortArrival,this.retailPriceIncVAT=0,this.bodyStyle="",this.upholstery="",this.upholsteryCode="",this.upholsteryType="",this.packageNames=const [],this.line="",this.mappedLine="",this.currentRetailerOfferPrice=0,this.retailPrice="",this.vatQualifying,this.retailerId=0,this.gssnId="",this.noImage,this.imageUrl="",this.isAvailableOnline,this.isBackOrdered,this.creationDate="",this.maintenanceDate="",this.registrationNumber="",this.registrationDate,this.mileage,this.tradeInDate,this.source="",this.vehicleType="",this.offerAmount="",this.offerExpiry="",this.activeOffers=const [],this.campaignMessagesTotal=0,this.underOffer,this.isDisplayStock,this.displayRetailer="",this.displayRetailerGssnId="",this.location="",this.account="",this.accountType="",this.usageCode="",this.bm7NST="",this.isSellable,this.secured,this.specialist,this.isMotabilityRetailer,this.upholsteryDescription="",this.inBackOrderAccount,this.fullModelYearCode,this.baumuster="",this.isMotability,this.pipAdvanceRentalGross,this.wpmsAdvanceRentalGross,this.ispVehicleCustomerDescriptions,this.eligibleForMaTransfer,this.confirmedProductionDate,this.forecastedArrivalDate});
VehicleDataBase.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
vin = json['vin'] ?? "";
description = json['description'] ?? "";
model = json['model'] ?? "";
otr = json['otr'] ?? "";
retailPriceExVAT = json['retailPriceExVAT'] ?? "";
actualPrice = json['actualPrice'] ?? "";
p11D = json['p11D'] ?? "";
fuelType = json['fuelType'] ?? "";
transmission = json['transmission'] ?? "";
transmissionType = json['transmissionType'] ?? "";
colour = json['colour'] ?? "";
colourCode = json['colourCode'] ?? "";
colourDescription = json['colourDescription'] ?? "";
commissionNumber = json['commissionNumber'] ?? "";
offerAvailable = json['offerAvailable'];
campaignDiscountOfferTotal = json['campaignDiscountOfferTotal'] ?? 0;
campaignDiscountOfferTotalCurrent = json['campaignDiscountOfferTotalCurrent'] ?? 0;
campaignDiscountOfferTotalPending = json['campaignDiscountOfferTotalPending'] ?? 0;
campaignServiceOfferTotal = json['campaignServiceOfferTotal'] ?? 0;
campaignServiceOfferTotalCurrent = json['campaignServiceOfferTotalCurrent'] ?? 0;
campaignServiceOfferTotalPending = json['campaignServiceOfferTotalPending'] ?? 0;
campaignCustomOfferTotal = json['campaignCustomOfferTotal'] ?? 0;
campaignPersonalisedOfferTotalCurrent = json['campaignPersonalisedOfferTotalCurrent'] ?? 0;
campaignPersonalisedOfferTotalPending = json['campaignPersonalisedOfferTotalPending'] ?? 0;
campaignPersonalisedOfferTotal = json['campaignPersonalisedOfferTotal'] ?? 0;
campaignCustomOfferTotalCurrent = json['campaignCustomOfferTotalCurrent'] ?? 0;
campaignCustomOfferTotalPending = json['campaignCustomOfferTotalPending'] ?? 0;
campaignOtherOfferTotal = json['campaignOtherOfferTotal'] ?? 0;
campaignOtherOfferTotalCurrent = json['campaignOtherOfferTotalCurrent'] ?? 0;
campaignOtherOfferTotalPending = json['campaignOtherOfferTotalPending'] ?? 0;
retailerDiscountOfferTotal = json['retailerDiscountOfferTotal'] ?? 0;
retailerDiscountOfferTotalCurrent = json['retailerDiscountOfferTotalCurrent'] ?? 0;
retailerDiscountOfferTotalPending = json['retailerDiscountOfferTotalPending'] ?? 0;
retailerServiceOfferTotal = json['retailerServiceOfferTotal'] ?? 0;
retailerServiceOfferTotalCurrent = json['retailerServiceOfferTotalCurrent'] ?? 0;
retailerServiceOfferTotalPending = json['retailerServiceOfferTotalPending'] ?? 0;
retailerCustomOfferTotal = json['retailerCustomOfferTotal'] ?? 0;
retailerCustomOfferTotalCurrent = json['retailerCustomOfferTotalCurrent'] ?? 0;
retailerCustomOfferTotalPending = json['retailerCustomOfferTotalPending'] ?? 0;
retailerWarrantyOfferTotal = json['retailerWarrantyOfferTotal'] ?? 0;
retailerWarrantyOfferTotalCurrent = json['retailerWarrantyOfferTotalCurrent'] ?? 0;
retailerWarrantyOfferTotalPending = json['retailerWarrantyOfferTotalPending'] ?? 0;
retailerOfferTotal = json['retailerOfferTotal'] ?? 0;
retailerOfferTotalCurrent = json['retailerOfferTotalCurrent'] ?? 0;
retailerOfferTotalPending = json['retailerOfferTotalPending'] ?? 0;
campaignOfferTotal = json['campaignOfferTotal'] ?? 0;
campaignOfferTotalCurrent = json['campaignOfferTotalCurrent'] ?? 0;
campaignOfferTotalPending = json['campaignOfferTotalPending'] ?? 0;
campaignAndOfferTotal = json['campaignAndOfferTotal'] ?? 0;
campaignAndOfferTotalCurrent = json['campaignAndOfferTotalCurrent'] ?? 0;
campaignAndOfferTotalPending = json['campaignAndOfferTotalPending'] ?? 0;
offerTotal = json['offerTotal'] ?? 0;
offerTotalCurrent = json['offerTotalCurrent'] ?? 0;
offerTotalPending = json['offerTotalPending'] ?? 0;
creation = json['creation'] ?? "";
modified = json['modified'] ?? "";
electricRange = json['electricRange'] ?? 0;
electricConsumption = json['electricConsumption'] ?? 0;
portArrivalDate = JsonConverters.fromJson(json['portArrivalDate'],'DateTime',context!);
daysSincePortArrival = json['daysSincePortArrival'];
retailPriceIncVAT = JsonConverters.toDouble(json['retailPriceIncVAT']) ?? 0;
bodyStyle = json['bodyStyle'] ?? "";
upholstery = json['upholstery'] ?? "";
upholsteryCode = json['upholsteryCode'] ?? "";
upholsteryType = json['upholsteryType'] ?? "";
packageNames = JsonConverters.fromJson(json['packageNames'],'List<String>',context!) ?? [];
line = json['line'] ?? "";
mappedLine = json['mappedLine'] ?? "";
currentRetailerOfferPrice = JsonConverters.toDouble(json['currentRetailerOfferPrice']) ?? 0;
retailPrice = json['retailPrice'] ?? "";
vatQualifying = json['vatQualifying'];
retailerId = json['retailerId'] ?? 0;
gssnId = json['gssnId'] ?? "";
noImage = json['noImage'];
imageUrl = json['imageUrl'] ?? "";
isAvailableOnline = json['isAvailableOnline'];
isBackOrdered = json['isBackOrdered'];
creationDate = json['creationDate'] ?? "";
maintenanceDate = json['maintenanceDate'] ?? "";
registrationNumber = json['registrationNumber'] ?? "";
registrationDate = JsonConverters.fromJson(json['registrationDate'],'DateTime',context!);
mileage = json['mileage'];
tradeInDate = JsonConverters.fromJson(json['tradeInDate'],'DateTime',context!);
source = json['source'] ?? "";
vehicleType = json['vehicleType'] ?? "";
offerAmount = json['offerAmount'] ?? "";
offerExpiry = json['offerExpiry'] ?? "";
activeOffers = JsonConverters.fromJson(json['activeOffers'],'List<int>',context!) ?? [];
campaignMessagesTotal = json['campaignMessagesTotal'] ?? 0;
underOffer = json['underOffer'];
isDisplayStock = json['isDisplayStock'];
displayRetailer = json['displayRetailer'] ?? "";
displayRetailerGssnId = json['displayRetailerGssnId'] ?? "";
location = json['location'] ?? "";
account = json['account'] ?? "";
accountType = json['accountType'] ?? "";
usageCode = json['usageCode'] ?? "";
bm7NST = json['bm7NST'] ?? "";
isSellable = json['isSellable'];
secured = json['secured'];
specialist = json['specialist'];
isMotabilityRetailer = json['isMotabilityRetailer'];
upholsteryDescription = json['upholsteryDescription'] ?? "";
inBackOrderAccount = json['inBackOrderAccount'];
fullModelYearCode = json['fullModelYearCode'];
baumuster = json['baumuster'] ?? "";
isMotability = json['isMotability'];
pipAdvanceRentalGross = JsonConverters.toDouble(json['pipAdvanceRentalGross']);
wpmsAdvanceRentalGross = JsonConverters.toDouble(json['wpmsAdvanceRentalGross']);
ispVehicleCustomerDescriptions = JsonConverters.fromJson(json['ispVehicleCustomerDescriptions'],'List<String>',context!);
eligibleForMaTransfer = json['eligibleForMaTransfer'];
confirmedProductionDate = json['confirmedProductionDate'];
forecastedArrivalDate = json['forecastedArrivalDate'];
return this;
}
Map<String, dynamic> toJson() => {
'vin': vin,
'description': description,
'model': model,
'otr': otr,
'retailPriceExVAT': retailPriceExVAT,
'actualPrice': actualPrice,
'p11D': p11D,
'fuelType': fuelType,
'transmission': transmission,
'transmissionType': transmissionType,
'colour': colour,
'colourCode': colourCode,
'colourDescription': colourDescription,
'commissionNumber': commissionNumber,
'offerAvailable': offerAvailable,
'campaignDiscountOfferTotal': campaignDiscountOfferTotal,
'campaignDiscountOfferTotalCurrent': campaignDiscountOfferTotalCurrent,
'campaignDiscountOfferTotalPending': campaignDiscountOfferTotalPending,
'campaignServiceOfferTotal': campaignServiceOfferTotal,
'campaignServiceOfferTotalCurrent': campaignServiceOfferTotalCurrent,
'campaignServiceOfferTotalPending': campaignServiceOfferTotalPending,
'campaignCustomOfferTotal': campaignCustomOfferTotal,
'campaignPersonalisedOfferTotalCurrent': campaignPersonalisedOfferTotalCurrent,
'campaignPersonalisedOfferTotalPending': campaignPersonalisedOfferTotalPending,
'campaignPersonalisedOfferTotal': campaignPersonalisedOfferTotal,
'campaignCustomOfferTotalCurrent': campaignCustomOfferTotalCurrent,
'campaignCustomOfferTotalPending': campaignCustomOfferTotalPending,
'campaignOtherOfferTotal': campaignOtherOfferTotal,
'campaignOtherOfferTotalCurrent': campaignOtherOfferTotalCurrent,
'campaignOtherOfferTotalPending': campaignOtherOfferTotalPending,
'retailerDiscountOfferTotal': retailerDiscountOfferTotal,
'retailerDiscountOfferTotalCurrent': retailerDiscountOfferTotalCurrent,
'retailerDiscountOfferTotalPending': retailerDiscountOfferTotalPending,
'retailerServiceOfferTotal': retailerServiceOfferTotal,
'retailerServiceOfferTotalCurrent': retailerServiceOfferTotalCurrent,
'retailerServiceOfferTotalPending': retailerServiceOfferTotalPending,
'retailerCustomOfferTotal': retailerCustomOfferTotal,
'retailerCustomOfferTotalCurrent': retailerCustomOfferTotalCurrent,
'retailerCustomOfferTotalPending': retailerCustomOfferTotalPending,
'retailerWarrantyOfferTotal': retailerWarrantyOfferTotal,
'retailerWarrantyOfferTotalCurrent': retailerWarrantyOfferTotalCurrent,
'retailerWarrantyOfferTotalPending': retailerWarrantyOfferTotalPending,
'retailerOfferTotal': retailerOfferTotal,
'retailerOfferTotalCurrent': retailerOfferTotalCurrent,
'retailerOfferTotalPending': retailerOfferTotalPending,
'campaignOfferTotal': campaignOfferTotal,
'campaignOfferTotalCurrent': campaignOfferTotalCurrent,
'campaignOfferTotalPending': campaignOfferTotalPending,
'campaignAndOfferTotal': campaignAndOfferTotal,
'campaignAndOfferTotalCurrent': campaignAndOfferTotalCurrent,
'campaignAndOfferTotalPending': campaignAndOfferTotalPending,
'offerTotal': offerTotal,
'offerTotalCurrent': offerTotalCurrent,
'offerTotalPending': offerTotalPending,
'creation': creation,
'modified': modified,
'electricRange': electricRange,
'electricConsumption': electricConsumption,
'portArrivalDate': JsonConverters.toJson(portArrivalDate,'DateTime',context!),
'daysSincePortArrival': daysSincePortArrival,
'retailPriceIncVAT': retailPriceIncVAT,
'bodyStyle': bodyStyle,
'upholstery': upholstery,
'upholsteryCode': upholsteryCode,
'upholsteryType': upholsteryType,
'packageNames': JsonConverters.toJson(packageNames,'List<String>',context!),
'line': line,
'mappedLine': mappedLine,
'currentRetailerOfferPrice': currentRetailerOfferPrice,
'retailPrice': retailPrice,
'vatQualifying': vatQualifying,
'retailerId': retailerId,
'gssnId': gssnId,
'noImage': noImage,
'imageUrl': imageUrl,
'isAvailableOnline': isAvailableOnline,
'isBackOrdered': isBackOrdered,
'creationDate': creationDate,
'maintenanceDate': maintenanceDate,
'registrationNumber': registrationNumber,
'registrationDate': JsonConverters.toJson(registrationDate,'DateTime',context!),
'mileage': mileage,
'tradeInDate': JsonConverters.toJson(tradeInDate,'DateTime',context!),
'source': source,
'vehicleType': vehicleType,
'offerAmount': offerAmount,
'offerExpiry': offerExpiry,
'activeOffers': JsonConverters.toJson(activeOffers,'List<int>',context!),
'campaignMessagesTotal': campaignMessagesTotal,
'underOffer': underOffer,
'isDisplayStock': isDisplayStock,
'displayRetailer': displayRetailer,
'displayRetailerGssnId': displayRetailerGssnId,
'location': location,
'account': account,
'accountType': accountType,
'usageCode': usageCode,
'bm7NST': bm7NST,
'isSellable': isSellable,
'secured': secured,
'specialist': specialist,
'isMotabilityRetailer': isMotabilityRetailer,
'upholsteryDescription': upholsteryDescription,
'inBackOrderAccount': inBackOrderAccount,
'fullModelYearCode': fullModelYearCode,
'baumuster': baumuster,
'isMotability': isMotability,
'pipAdvanceRentalGross': pipAdvanceRentalGross,
'wpmsAdvanceRentalGross': wpmsAdvanceRentalGross,
'ispVehicleCustomerDescriptions': JsonConverters.toJson(ispVehicleCustomerDescriptions,'List<String>',context!),
'eligibleForMaTransfer': eligibleForMaTransfer,
'confirmedProductionDate': confirmedProductionDate,
'forecastedArrivalDate': forecastedArrivalDate
};
getTypeName() => "VehicleDataBase";
TypeContext? context = _ctx;
}
class VehicleData extends VehicleDataBase implements IConvertible
{
String engine = "";
VehicleData({this.engine=""});
VehicleData.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() => "VehicleData";
TypeContext? context = _ctx;
}
class Equipment implements IConvertible
{
int? id;
String? code;
String? description;
Equipment({this.id,this.code,this.description});
Equipment.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
code = json['code'];
description = json['description'];
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'code': code,
'description': description
};
getTypeName() => "Equipment";
TypeContext? context = _ctx;
}
class VehicleIdentifierData extends VehicleData implements IConvertible
{
String retailer = "";
bool? hasMotabilityError;
List<Equipment> equipment = [];
String? vehicleClass;
VehicleIdentifierData({this.retailer="",this.hasMotabilityError,this.equipment=const [],this.vehicleClass});
VehicleIdentifierData.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
retailer = json['retailer'] ?? "";
hasMotabilityError = json['hasMotabilityError'];
equipment = JsonConverters.fromJson(json['equipment'],'List<Equipment>',context!) ?? [];
vehicleClass = json['vehicleClass'];
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'retailer': retailer,
'hasMotabilityError': hasMotabilityError,
'equipment': JsonConverters.toJson(equipment,'List<Equipment>',context!),
'vehicleClass': vehicleClass
});
getTypeName() => "VehicleIdentifierData";
TypeContext? context = _ctx;
}
class VehicleByCommissionNumberResponse extends VehicleByIdentifierResponse implements IConvertible
{
VehicleIdentifierData? vehicle;
VehicleByCommissionNumberResponse({this.vehicle});
VehicleByCommissionNumberResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
vehicle = JsonConverters.fromJson(json['vehicle'],'VehicleIdentifierData',context!);
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'vehicle': JsonConverters.toJson(vehicle,'VehicleIdentifierData',context!)
});
getTypeName() => "VehicleByCommissionNumberResponse";
TypeContext? context = _ctx;
}
class VehicleByCommissionNumberRequest implements IGet, IConvertible
{
String vehicleIdentifier = "";
String vehicleType = "";
VehicleByCommissionNumberRequest({this.vehicleIdentifier="",this.vehicleType=""});
VehicleByCommissionNumberRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
vehicleIdentifier = json['vehicleIdentifier'] ?? "";
vehicleType = json['vehicleType'] ?? "";
return this;
}
Map<String, dynamic> toJson() => {
'vehicleIdentifier': vehicleIdentifier,
'vehicleType': vehicleType
};
getTypeName() => "VehicleByCommissionNumberRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'uat_api_vehicle_mgt_mb_dhc.rapp_customers.co.uk', types: <String, TypeInfo> {
'OfferVehicle': TypeInfo(TypeOf.Class, create:() => OfferVehicle()),
'Offer': TypeInfo(TypeOf.Class, create:() => Offer()),
'PersonalisedOffer': TypeInfo(TypeOf.Class, create:() => PersonalisedOffer()),
'Message': TypeInfo(TypeOf.Class, create:() => Message()),
'OfferHistory': TypeInfo(TypeOf.Class, create:() => OfferHistory()),
'FinanceOffer': TypeInfo(TypeOf.Class, create:() => FinanceOffer()),
'VehicleByIdentifierResponse': TypeInfo(TypeOf.Class, create:() => VehicleByIdentifierResponse()),
'List<Offer>': TypeInfo(TypeOf.Class, create:() => <Offer>[]),
'List<PersonalisedOffer>': TypeInfo(TypeOf.Class, create:() => <PersonalisedOffer>[]),
'List<Message>': TypeInfo(TypeOf.Class, create:() => <Message>[]),
'List<OfferHistory>': TypeInfo(TypeOf.Class, create:() => <OfferHistory>[]),
'List<FinanceOffer>': TypeInfo(TypeOf.Class, create:() => <FinanceOffer>[]),
'VehicleDataBase': TypeInfo(TypeOf.Class, create:() => VehicleDataBase()),
'VehicleData': TypeInfo(TypeOf.Class, create:() => VehicleData()),
'Equipment': TypeInfo(TypeOf.Class, create:() => Equipment()),
'VehicleIdentifierData': TypeInfo(TypeOf.Class, create:() => VehicleIdentifierData()),
'List<Equipment>': TypeInfo(TypeOf.Class, create:() => <Equipment>[]),
'VehicleByCommissionNumberResponse': TypeInfo(TypeOf.Class, create:() => VehicleByCommissionNumberResponse()),
'VehicleByCommissionNumberRequest': TypeInfo(TypeOf.Class, create:() => VehicleByCommissionNumberRequest()),
});
Dart VehicleByCommissionNumberRequest 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/{VehicleType}/Vehicle/{vehicleIdentifier} 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:
{
retailer: String,
hasMotabilityError: False,
equipment:
[
{
id: 0,
code: String,
description: String
}
],
vehicleClass: String,
engine: String,
vin: String,
description: String,
model: String,
otr: String,
retailPriceExVAT: String,
actualPrice: String,
p11D: String,
fuelType: String,
transmission: String,
transmissionType: String,
colour: String,
colourCode: String,
colourDescription: String,
commissionNumber: String,
offerAvailable: False,
campaignDiscountOfferTotal: 0,
campaignDiscountOfferTotalCurrent: 0,
campaignDiscountOfferTotalPending: 0,
campaignServiceOfferTotal: 0,
campaignServiceOfferTotalCurrent: 0,
campaignServiceOfferTotalPending: 0,
campaignCustomOfferTotal: 0,
campaignPersonalisedOfferTotalCurrent: 0,
campaignPersonalisedOfferTotalPending: 0,
campaignPersonalisedOfferTotal: 0,
campaignCustomOfferTotalCurrent: 0,
campaignCustomOfferTotalPending: 0,
campaignOtherOfferTotal: 0,
campaignOtherOfferTotalCurrent: 0,
campaignOtherOfferTotalPending: 0,
retailerDiscountOfferTotal: 0,
retailerDiscountOfferTotalCurrent: 0,
retailerDiscountOfferTotalPending: 0,
retailerServiceOfferTotal: 0,
retailerServiceOfferTotalCurrent: 0,
retailerServiceOfferTotalPending: 0,
retailerCustomOfferTotal: 0,
retailerCustomOfferTotalCurrent: 0,
retailerCustomOfferTotalPending: 0,
retailerWarrantyOfferTotal: 0,
retailerWarrantyOfferTotalCurrent: 0,
retailerWarrantyOfferTotalPending: 0,
retailerOfferTotal: 0,
retailerOfferTotalCurrent: 0,
retailerOfferTotalPending: 0,
campaignOfferTotal: 0,
campaignOfferTotalCurrent: 0,
campaignOfferTotalPending: 0,
campaignAndOfferTotal: 0,
campaignAndOfferTotalCurrent: 0,
campaignAndOfferTotalPending: 0,
offerTotal: 0,
offerTotalCurrent: 0,
offerTotalPending: 0,
creation: String,
modified: String,
electricRange: 0,
electricConsumption: 0,
portArrivalDate: 0001-01-01,
daysSincePortArrival: 0,
retailPriceIncVAT: 0,
bodyStyle: String,
upholstery: String,
upholsteryCode: String,
upholsteryType: String,
packageNames:
[
String
],
line: String,
mappedLine: String,
currentRetailerOfferPrice: 0,
retailPrice: String,
vatQualifying: False,
retailerId: 0,
gssnId: String,
noImage: False,
imageUrl: String,
isAvailableOnline: False,
isBackOrdered: False,
creationDate: String,
maintenanceDate: String,
registrationNumber: String,
registrationDate: 0001-01-01,
mileage: 0,
tradeInDate: 0001-01-01,
source: String,
vehicleType: String,
offerAmount: String,
offerExpiry: String,
activeOffers:
[
0
],
campaignMessagesTotal: 0,
underOffer: False,
isDisplayStock: False,
displayRetailer: String,
displayRetailerGssnId: String,
location: String,
account: String,
accountType: String,
usageCode: String,
bm7NST: String,
isSellable: False,
secured: False,
specialist: False,
isMotabilityRetailer: False,
upholsteryDescription: String,
inBackOrderAccount: False,
fullModelYearCode: String,
baumuster: String,
isMotability: False,
pipAdvanceRentalGross: 0,
wpmsAdvanceRentalGross: 0,
ispVehicleCustomerDescriptions:
[
String
],
eligibleForMaTransfer: False,
confirmedProductionDate: String,
forecastedArrivalDate: String
},
campaignOffers:
[
{
id: 0,
offerType: String,
campaignName: String,
from: String,
to: String,
value: String,
net: 0,
offerVehicle:
{
retailPriceExVAT: String
},
pending: False,
documentUrl: String,
personalised: False,
isPersonalisedMonetaryOffer: False,
campaignVIPDiscount: False,
offerValueNet: 0,
campaignGovernmentGrant: False
}
],
campaignPersonalisedOffers:
[
{
category: String,
description: String,
reference: String,
campaignId: 0,
certificateRequired: False,
autoSelect: False,
id: 0,
offerType: String,
campaignName: String,
from: String,
to: String,
value: String,
net: 0,
offerVehicle:
{
retailPriceExVAT: String
},
pending: False,
documentUrl: String,
personalised: False,
isPersonalisedMonetaryOffer: False,
campaignVIPDiscount: False,
offerValueNet: 0,
campaignGovernmentGrant: False
}
],
campaignVoucherOffers:
[
{
category: String,
description: String,
reference: String,
campaignId: 0,
certificateRequired: False,
autoSelect: False,
id: 0,
offerType: String,
campaignName: String,
from: String,
to: String,
value: String,
net: 0,
offerVehicle:
{
retailPriceExVAT: String
},
pending: False,
documentUrl: String,
personalised: False,
isPersonalisedMonetaryOffer: False,
campaignVIPDiscount: False,
offerValueNet: 0,
campaignGovernmentGrant: False
}
],
campaignGovernmentGrantOffers:
[
{
id: 0,
offerType: String,
campaignName: String,
from: String,
to: String,
value: String,
net: 0,
offerVehicle:
{
retailPriceExVAT: String
},
pending: False,
documentUrl: String,
personalised: False,
isPersonalisedMonetaryOffer: False,
campaignVIPDiscount: False,
offerValueNet: 0,
campaignGovernmentGrant: False
}
],
campaignMessages:
[
{
id: 0,
vin: String,
campaignId: 0,
value: String,
campaignDescription: String,
from: String,
to: String,
documentUrl: String
}
],
offerHistories:
[
{
id: 0,
auditType: String,
offerType: String,
source: String,
from: String,
to: String,
personalised: False,
value: String,
net: String,
vat: String,
description: String,
vin: String,
gssn: String,
creation: String,
modified: String,
userId: String,
user: 0,
offerId: 0,
commissionNumber: String,
campaignId: 0,
campaignDescription: String,
creationDate: 0001-01-01,
isUsedCarOffer: False
}
],
financeOffers:
[
{
campaignDescription: String,
termsAndConditions: String,
label: String,
campaignId: 0,
documentUrl: String,
from: String,
id: 0,
to: String,
value: String,
vin: String,
enabled: False,
pending: False,
offerType: String
}
]
}