RAPP.Mercedes.VanCustomerAccount.Api

<back to all web services

VehicleVisits

The following routes are available for this service:
POST/vehiclevisits/
import 'package:servicestack/servicestack.dart';

class ReturnStatus implements IConvertible
{
    String? ReturnCode;
    String? Message;

    ReturnStatus({this.ReturnCode,this.Message});
    ReturnStatus.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

class Visit implements IConvertible
{
    String? VisitType;
    DateTime? VisitDate;
    double? Mileage;
    String? RegistrationNumber;
    String? DealerName;
    String? ContractNumber;

    Visit({this.VisitType,this.VisitDate,this.Mileage,this.RegistrationNumber,this.DealerName,this.ContractNumber});
    Visit.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        VisitType = json['VisitType'];
        VisitDate = JsonConverters.fromJson(json['VisitDate'],'DateTime',context!);
        Mileage = JsonConverters.toDouble(json['Mileage']);
        RegistrationNumber = json['RegistrationNumber'];
        DealerName = json['DealerName'];
        ContractNumber = json['ContractNumber'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'VisitType': VisitType,
        'VisitDate': JsonConverters.toJson(VisitDate,'DateTime',context!),
        'Mileage': Mileage,
        'RegistrationNumber': RegistrationNumber,
        'DealerName': DealerName,
        'ContractNumber': ContractNumber
    };

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

class VehicleVisitsResponse implements IConvertible
{
    ReturnStatus? Status;
    int? NumberOfPages;
    List<Visit>? Visits;

    VehicleVisitsResponse({this.Status,this.NumberOfPages,this.Visits});
    VehicleVisitsResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Status = JsonConverters.fromJson(json['Status'],'ReturnStatus',context!);
        NumberOfPages = json['NumberOfPages'];
        Visits = JsonConverters.fromJson(json['Visits'],'List<Visit>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Status': JsonConverters.toJson(Status,'ReturnStatus',context!),
        'NumberOfPages': NumberOfPages,
        'Visits': JsonConverters.toJson(Visits,'List<Visit>',context!)
    };

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

class VehicleVisits implements IConvertible
{
    String? CIAMId;
    String? ChassisNumber;
    int? ItemsPerPage;
    int? PageNumber;

    VehicleVisits({this.CIAMId,this.ChassisNumber,this.ItemsPerPage,this.PageNumber});
    VehicleVisits.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        CIAMId = json['CIAMId'];
        ChassisNumber = json['ChassisNumber'];
        ItemsPerPage = json['ItemsPerPage'];
        PageNumber = json['PageNumber'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'CIAMId': CIAMId,
        'ChassisNumber': ChassisNumber,
        'ItemsPerPage': ItemsPerPage,
        'PageNumber': PageNumber
    };

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

TypeContext _ctx = TypeContext(library: 'webservices.mbukdatabase.co.uk', types: <String, TypeInfo> {
    'ReturnStatus': TypeInfo(TypeOf.Class, create:() => ReturnStatus()),
    'Visit': TypeInfo(TypeOf.Class, create:() => Visit()),
    'VehicleVisitsResponse': TypeInfo(TypeOf.Class, create:() => VehicleVisitsResponse()),
    'List<Visit>': TypeInfo(TypeOf.Class, create:() => <Visit>[]),
    'VehicleVisits': TypeInfo(TypeOf.Class, create:() => VehicleVisits()),
});

Dart VehicleVisits 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 /vehiclevisits/ HTTP/1.1 
Host: webservices.mbukdatabase.co.uk 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"CIAMId":"String","ChassisNumber":"String","ItemsPerPage":0,"PageNumber":0}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"Status":{"ReturnCode":"String","Message":"String"},"NumberOfPages":0,"Visits":[{"VisitType":"String","VisitDate":"\/Date(-62135596800000-0000)\/","Mileage":0,"RegistrationNumber":"String","DealerName":"String","ContractNumber":"String"}]}