Mercedes.Agency.Orchestration.API

<back to all web services

VehicleSwapResolveAuditByGuidRequest

VehicleSwap
Requires Authentication
The following routes are available for this service:
GET/v1/vehicleswap/resolve/{VehicleSwapGuid}/auditGet mismatched vehicle swap auditsGet mismatched vehicle swap audits for given vehicle swap
import 'package:servicestack/servicestack.dart';

class BaseVehicleSwapResolveRequest implements IConvertible
{
    String? VehicleSwapGuid;

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

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

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

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

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

    Map<String, dynamic> toJson() => super.toJson();
    getTypeName() => "VehicleSwapResolveAuditByGuidRequest";
    TypeContext? context = _ctx;
}

class DisplayVehicleSwapResolveAudit implements IConvertible
{
    int? Id;
    String? Action;
    DateTime? Created;
    String? Guid;
    String? User;

    DisplayVehicleSwapResolveAudit({this.Id,this.Action,this.Created,this.Guid,this.User});
    DisplayVehicleSwapResolveAudit.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        Action = json['Action'];
        Created = JsonConverters.fromJson(json['Created'],'DateTime',context!);
        Guid = json['Guid'];
        User = json['User'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'Action': Action,
        'Created': JsonConverters.toJson(Created,'DateTime',context!),
        'Guid': Guid,
        'User': User
    };

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

class VehicleSwapResolveAuditResponse implements IConvertible
{
    List<DisplayVehicleSwapResolveAudit>? Audits = [];

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

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

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

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

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

Dart VehicleSwapResolveAuditByGuidRequest 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/resolve/{VehicleSwapGuid}/audit 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

{"Audits":[{"Id":0,"Action":"String","Created":"\/Date(-62135596800000-0000)\/","Guid":"00000000000000000000000000000000","User":"String"}]}