RAPP.Mercedes.VanCustomerAccount.Api

<back to all web services

VehicleOwnership

The following routes are available for this service:
POST/vehicleownership/
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 Vehicle implements IConvertible
{
    String? ChassisNumber;
    String? RegistrationNumber;
    String? CommissionNumber;
    String? Make;
    String? Model;
    DateTime? NextMOTDate;
    DateTime? NextServiceDate;

    Vehicle({this.ChassisNumber,this.RegistrationNumber,this.CommissionNumber,this.Make,this.Model,this.NextMOTDate,this.NextServiceDate});
    Vehicle.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ChassisNumber = json['ChassisNumber'];
        RegistrationNumber = json['RegistrationNumber'];
        CommissionNumber = json['CommissionNumber'];
        Make = json['Make'];
        Model = json['Model'];
        NextMOTDate = JsonConverters.fromJson(json['NextMOTDate'],'DateTime',context!);
        NextServiceDate = JsonConverters.fromJson(json['NextServiceDate'],'DateTime',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ChassisNumber': ChassisNumber,
        'RegistrationNumber': RegistrationNumber,
        'CommissionNumber': CommissionNumber,
        'Make': Make,
        'Model': Model,
        'NextMOTDate': JsonConverters.toJson(NextMOTDate,'DateTime',context!),
        'NextServiceDate': JsonConverters.toJson(NextServiceDate,'DateTime',context!)
    };

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

class VehicleOwnershipResponse implements IConvertible
{
    ReturnStatus? Status;
    int? NumberOfPages;
    int? TotalNumberOfVehicles;
    List<Vehicle>? Vehicles;

    VehicleOwnershipResponse({this.Status,this.NumberOfPages,this.TotalNumberOfVehicles,this.Vehicles});
    VehicleOwnershipResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

class VehicleOwnership implements IConvertible
{
    String? CiamId;
    int? ItemsPerPage;
    int? PageNumber;
    String? SearchString;
    String? SortColumn;
    String? SortDirection;

    VehicleOwnership({this.CiamId,this.ItemsPerPage,this.PageNumber,this.SearchString,this.SortColumn,this.SortDirection});
    VehicleOwnership.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        CiamId = json['CiamId'];
        ItemsPerPage = json['ItemsPerPage'];
        PageNumber = json['PageNumber'];
        SearchString = json['SearchString'];
        SortColumn = json['SortColumn'];
        SortDirection = json['SortDirection'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'CiamId': CiamId,
        'ItemsPerPage': ItemsPerPage,
        'PageNumber': PageNumber,
        'SearchString': SearchString,
        'SortColumn': SortColumn,
        'SortDirection': SortDirection
    };

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

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

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

{"CiamId":"String","ItemsPerPage":0,"PageNumber":0,"SearchString":"String","SortColumn":"String","SortDirection":"String"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"Status":{"ReturnCode":"String","Message":"String"},"NumberOfPages":0,"TotalNumberOfVehicles":0,"Vehicles":[{"ChassisNumber":"String","RegistrationNumber":"String","CommissionNumber":"String","Make":"String","Model":"String","NextMOTDate":"\/Date(-62135596800000-0000)\/","NextServiceDate":"\/Date(-62135596800000-0000)\/"}]}