Mercedes.VehicleManagement.API

<back to all web services

SecuredStatusRequest

Vehicle
Requires Authentication
The following routes are available for this service:
POST/v1/Vehicle/SecuredStatusSet secured status for vehicle
import 'package:servicestack/servicestack.dart';

class ValidateVehicleResponse implements IConvertible
{
    String? comm;
    String? failureReason;
    int? failureReasonId;

    ValidateVehicleResponse({this.comm,this.failureReason,this.failureReasonId});
    ValidateVehicleResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'comm': comm,
        'failureReason': failureReason,
        'failureReasonId': failureReasonId
    };

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

class ValidateSecuredStatusResponse implements IConvertible
{
    List<ValidateVehicleResponse>? validateVehicleResponses = [];

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

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

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

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

class SecuredStatusRequest implements IPost, IConvertible
{
    String? commissionNumber;
    String? vehicleType;
    String? reason;
    bool? secured;

    SecuredStatusRequest({this.commissionNumber,this.vehicleType,this.reason,this.secured});
    SecuredStatusRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        commissionNumber = json['commissionNumber'];
        vehicleType = json['vehicleType'];
        reason = json['reason'];
        secured = json['secured'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'commissionNumber': commissionNumber,
        'vehicleType': vehicleType,
        'reason': reason,
        'secured': secured
    };

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

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

Dart SecuredStatusRequest 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

HTTP + JSON

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

POST /v1/Vehicle/SecuredStatus HTTP/1.1 
Host: uat-api-vehicle-mgt-mb-dhc.rapp-customers.co.uk 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"commissionNumber":"String","vehicleType":"String","reason":"String","secured":false}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"validateVehicleResponses":[{}]}