Mercedes.VehicleManagement.API

<back to all web services

CentralVehiclesCsvRequest

Vehicle
Requires Authentication
The following routes are available for this service:
POST/v1/{VehicleType}/Vehicle/CentralCsvFilter central vehicle data for CSV
import 'package:servicestack/servicestack.dart';

class CsvVehicleData implements IConvertible
{
    // @DataMember(Name="Comm")
    String? Comm;

    String? retailer;
    String? description;
    String? model;
    String? colour;
    // @DataMember(Name="Fuel Type")
    String? Fuel_Type;

    // @DataMember(Name="Trans")
    String? Trans;

    String? otr;
    // @DataMember(Name="Age (Days)")
    int? Age__Days_;

    // @DataMember(Name="Current Offer")
    String? Current_Offer;

    // @DataMember(Name="Offer To")
    String? Offer_To;

    // @DataMember(Name="Active Offers")
    List<String>? Active_Offers = [];

    // @DataMember(Name="Ncl Modified")
    String? Ncl_Modified;

    // @DataMember(Name="Net Price")
    String? Net_Price;

    String? vin;
    // @DataMember(Name="Electric Range")
    int? Electric_Range;

    // @DataMember(Name="Electric Consumption")
    int? Electric_Consumption;

    // @DataMember(Name="Special Info")
    int? Special_Info;

    // @DataMember(Name="Personalised")
    int? Personalised;

    CsvVehicleData({this.Comm,this.retailer,this.description,this.model,this.colour,this.Fuel_Type,this.Trans,this.otr,this.Age__Days_,this.Current_Offer,this.Offer_To,this.Active_Offers,this.Ncl_Modified,this.Net_Price,this.vin,this.Electric_Range,this.Electric_Consumption,this.Special_Info,this.Personalised});
    CsvVehicleData.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Comm = json['commissionNumber'];
        retailer = json['retailer'];
        description = json['description'];
        model = json['model'];
        colour = json['colour'];
        Fuel_Type = json['fuelType'];
        Trans = json['transmission'];
        otr = json['otr'];
        Age__Days_ = json['daysSincePortArrival'];
        Current_Offer = json['offerAmount'];
        Offer_To = json['offerExpiry'];
        Active_Offers = JsonConverters.fromJson(json['activeOffers'],'List<String>',context!);
        Ncl_Modified = json['modified'];
        Net_Price = json['retailPrice'];
        vin = json['vin'];
        Electric_Range = json['electricRange'];
        Electric_Consumption = json['electricConsumption'];
        Special_Info = json['campaignMessagesTotal'];
        Personalised = json['campaignPersonalisedOfferTotal'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'comm': Comm,
        'retailer': retailer,
        'description': description,
        'model': model,
        'colour': colour,
        'fuel_Type': Fuel_Type,
        'trans': Trans,
        'otr': otr,
        'age__Days_': Age__Days_,
        'current_Offer': Current_Offer,
        'offer_To': Offer_To,
        'active_Offers': JsonConverters.toJson(Active_Offers,'List<String>',context!),
        'ncl_Modified': Ncl_Modified,
        'net_Price': Net_Price,
        'vin': vin,
        'electric_Range': Electric_Range,
        'electric_Consumption': Electric_Consumption,
        'special_Info': Special_Info,
        'personalised': Personalised
    };

    getTypeName() => "CsvVehicleData";
    TypeContext? context = _ctx;
}

class CentralStockResponse implements IConvertible
{
    List<CsvVehicleData>? vehicles;

    CentralStockResponse({this.vehicles});
    CentralStockResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        vehicles = JsonConverters.fromJson(json['vehicles'],'List<CsvVehicleData>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'vehicles': JsonConverters.toJson(vehicles,'List<CsvVehicleData>',context!)
    };

    getTypeName() => "CentralStockResponse";
    TypeContext? context = _ctx;
}

class CentralVehiclesCsvRequest implements IPost, IConvertible
{
    int? min;
    int? max;
    bool? noPortArrivalDate;
    String? vehicleType;

    CentralVehiclesCsvRequest({this.min,this.max,this.noPortArrivalDate,this.vehicleType});
    CentralVehiclesCsvRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        min = json['min'];
        max = json['max'];
        noPortArrivalDate = json['noPortArrivalDate'];
        vehicleType = json['vehicleType'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'min': min,
        'max': max,
        'noPortArrivalDate': noPortArrivalDate,
        'vehicleType': vehicleType
    };

    getTypeName() => "CentralVehiclesCsvRequest";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'uat_api_vehicle_mgt_mb_dhc.rapp_customers.co.uk', types: <String, TypeInfo> {
    'CsvVehicleData': TypeInfo(TypeOf.Class, create:() => CsvVehicleData()),
    'CentralStockResponse': TypeInfo(TypeOf.Class, create:() => CentralStockResponse()),
    'List<CsvVehicleData>': TypeInfo(TypeOf.Class, create:() => <CsvVehicleData>[]),
    'CentralVehiclesCsvRequest': TypeInfo(TypeOf.Class, create:() => CentralVehiclesCsvRequest()),
});

Dart CentralVehiclesCsvRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /v1/{VehicleType}/Vehicle/CentralCsv HTTP/1.1 
Host: uat-api-vehicle-mgt-mb-dhc.rapp-customers.co.uk 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	min: 0,
	max: 0,
	noPortArrivalDate: False,
	vehicleType: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	
}