Mercedes.VehicleManagement.API

<back to all web services

SecuredVehicleAuditRequest

SecuredAudit
Requires Authentication
The following routes are available for this service:
GET/v1/SecuredAudit/{identifier}Gets vehicle secured audits for supplied identifierGets vehicle secured audits for supplied identifier
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 VehicleSecuredAuditDetails extends VehicleAuditDetails implements IConvertible
{
    String? vin;
    String? commissionNumber;
    bool? isBulkUpdate;

    VehicleSecuredAuditDetails({this.vin,this.commissionNumber,this.isBulkUpdate});
    VehicleSecuredAuditDetails.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        vin = json['vin'];
        commissionNumber = json['commissionNumber'];
        isBulkUpdate = json['isBulkUpdate'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'vin': vin,
        'commissionNumber': commissionNumber,
        'isBulkUpdate': isBulkUpdate
    });

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

class SecuredVehicleAuditResponse implements IConvertible
{
    List<VehicleSecuredAuditDetails>? vehicleSecuredAudits;

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

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

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

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

class SecuredVehicleAuditRequest implements IGet, IConvertible
{
    String? identifier;

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

    fromMap(Map<String, dynamic> json) {
        identifier = json['identifier'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'identifier': identifier
    };

    getTypeName() => "SecuredVehicleAuditRequest";
    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()),
    'VehicleSecuredAuditDetails': TypeInfo(TypeOf.Class, create:() => VehicleSecuredAuditDetails()),
    'SecuredVehicleAuditResponse': TypeInfo(TypeOf.Class, create:() => SecuredVehicleAuditResponse()),
    'List<VehicleSecuredAuditDetails>': TypeInfo(TypeOf.Class, create:() => <VehicleSecuredAuditDetails>[]),
    'SecuredVehicleAuditRequest': TypeInfo(TypeOf.Class, create:() => SecuredVehicleAuditRequest()),
});

Dart SecuredVehicleAuditRequest DTOs

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

HTTP + CSV

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

GET /v1/SecuredAudit/{identifier} HTTP/1.1 
Host: uat-api-vehicle-mgt-mb-dhc.rapp-customers.co.uk 
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"vehicleSecuredAudits":[{"vin":"String","commissionNumber":"String","isBulkUpdate":false,"userId":"String","status":false,"notes":"String","creationDate":"String"}]}