Mercedes.Agency.Orchestration.API

<back to all web services

VehicleSwapActiveRequest

VehicleSwapActive
Requires Authentication
The following routes are available for this service:
GET/v1/VehicleSwap/ActiveGet Active Vehicle Swap recordsThis endpoint calls the same named endpoint in the Agency API to return active Vehicle Swap records.
import 'package:servicestack/servicestack.dart';

class VehicleSwapActive implements IConvertible
{
    int? Id;
    String? Reference;
    String? OrderType;
    String? VehicleSwapGuid;
    String? OrderGuid;
    String? Showroom;
    String? CommissionNumber;
    String? RequestReason;
    bool? SentToCesar;
    DateTime? CreationDate;
    DateTime? MaintenanceDate;

    VehicleSwapActive({this.Id,this.Reference,this.OrderType,this.VehicleSwapGuid,this.OrderGuid,this.Showroom,this.CommissionNumber,this.RequestReason,this.SentToCesar,this.CreationDate,this.MaintenanceDate});
    VehicleSwapActive.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        Reference = json['Reference'];
        OrderType = json['OrderType'];
        VehicleSwapGuid = json['VehicleSwapGuid'];
        OrderGuid = json['OrderGuid'];
        Showroom = json['Showroom'];
        CommissionNumber = json['CommissionNumber'];
        RequestReason = json['RequestReason'];
        SentToCesar = json['SentToCesar'];
        CreationDate = JsonConverters.fromJson(json['CreationDate'],'DateTime',context!);
        MaintenanceDate = JsonConverters.fromJson(json['MaintenanceDate'],'DateTime',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'Reference': Reference,
        'OrderType': OrderType,
        'VehicleSwapGuid': VehicleSwapGuid,
        'OrderGuid': OrderGuid,
        'Showroom': Showroom,
        'CommissionNumber': CommissionNumber,
        'RequestReason': RequestReason,
        'SentToCesar': SentToCesar,
        'CreationDate': JsonConverters.toJson(CreationDate,'DateTime',context!),
        'MaintenanceDate': JsonConverters.toJson(MaintenanceDate,'DateTime',context!)
    };

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

class VehicleSwapActiveResponse implements IConvertible
{
    List<VehicleSwapActive>? ActiveVehicleSwaps = [];

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

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

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

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

class VehicleSwapActiveRequest implements IGet, IConvertible
{
    VehicleSwapActiveRequest();
    VehicleSwapActiveRequest.fromJson(Map<String, dynamic> json) : super();
    fromMap(Map<String, dynamic> json) {
        return this;
    }

    Map<String, dynamic> toJson() => {};
    getTypeName() => "VehicleSwapActiveRequest";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'prod_api_agency_orch_mb_dhc.rapp_customers.co.uk', types: <String, TypeInfo> {
    'VehicleSwapActive': TypeInfo(TypeOf.Class, create:() => VehicleSwapActive()),
    'VehicleSwapActiveResponse': TypeInfo(TypeOf.Class, create:() => VehicleSwapActiveResponse()),
    'List<VehicleSwapActive>': TypeInfo(TypeOf.Class, create:() => <VehicleSwapActive>[]),
    'VehicleSwapActiveRequest': TypeInfo(TypeOf.Class, create:() => VehicleSwapActiveRequest()),
});

Dart VehicleSwapActiveRequest 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/VehicleSwap/Active HTTP/1.1 
Host: prod-api-agency-orch-mb-dhc.rapp-customers.co.uk 
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"ActiveVehicleSwaps":[{"Id":0,"Reference":"String","OrderType":"String","VehicleSwapGuid":"00000000000000000000000000000000","OrderGuid":"00000000000000000000000000000000","Showroom":"String","CommissionNumber":"String","RequestReason":"String","SentToCesar":false,"CreationDate":"\/Date(-62135596800000-0000)\/","MaintenanceDate":"\/Date(-62135596800000-0000)\/"}]}