POST | /v1/Vehicle/ValidateBulkSecure | Validate setting secured status a group of vehicles |
---|
import 'package:servicestack/servicestack.dart';
class BulkSecureRow implements IConvertible
{
int? row;
String? comm;
String? reason;
BulkSecureRow({this.row,this.comm,this.reason});
BulkSecureRow.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
row = json['row'];
comm = json['comm'];
reason = json['reason'];
return this;
}
Map<String, dynamic> toJson() => {
'row': row,
'comm': comm,
'reason': reason
};
getTypeName() => "BulkSecureRow";
TypeContext? context = _ctx;
}
class BulkSecureValidationRow extends BulkSecureRow implements IConvertible
{
String? failureReason;
BulkSecureValidationRow({this.failureReason});
BulkSecureValidationRow.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
failureReason = json['failureReason'];
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'failureReason': failureReason
});
getTypeName() => "BulkSecureValidationRow";
TypeContext? context = _ctx;
}
class ValidateBulkSecureProcessResponse implements IConvertible
{
bool? success;
List<BulkSecureValidationRow>? validationRows = [];
ValidateBulkSecureProcessResponse({this.success,this.validationRows});
ValidateBulkSecureProcessResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
success = json['success'];
validationRows = JsonConverters.fromJson(json['validationRows'],'List<BulkSecureValidationRow>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'success': success,
'validationRows': JsonConverters.toJson(validationRows,'List<BulkSecureValidationRow>',context!)
};
getTypeName() => "ValidateBulkSecureProcessResponse";
TypeContext? context = _ctx;
}
class ValidateBulkSecureRequest implements IPost, IConvertible
{
ValidateBulkSecureRequest();
ValidateBulkSecureRequest.fromJson(Map<String, dynamic> json) : super();
fromMap(Map<String, dynamic> json) {
return this;
}
Map<String, dynamic> toJson() => {};
getTypeName() => "ValidateBulkSecureRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'uat_api_vehicle_mgt_mb_dhc.rapp_customers.co.uk', types: <String, TypeInfo> {
'BulkSecureRow': TypeInfo(TypeOf.Class, create:() => BulkSecureRow()),
'BulkSecureValidationRow': TypeInfo(TypeOf.Class, create:() => BulkSecureValidationRow()),
'ValidateBulkSecureProcessResponse': TypeInfo(TypeOf.Class, create:() => ValidateBulkSecureProcessResponse()),
'List<BulkSecureValidationRow>': TypeInfo(TypeOf.Class, create:() => <BulkSecureValidationRow>[]),
'ValidateBulkSecureRequest': TypeInfo(TypeOf.Class, create:() => ValidateBulkSecureRequest()),
});
Dart ValidateBulkSecureRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/Vehicle/ValidateBulkSecure HTTP/1.1
Host: uat-api-vehicle-mgt-mb-dhc.rapp-customers.co.uk
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<ValidateBulkSecureRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Mercedes.VehicleManagement.API.Shared.POCO.BulkSecure" />
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <ValidateBulkSecureProcessResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Mercedes.VehicleManagement.API.Shared.POCO.BulkSecure"> <Success>false</Success> <ValidationRows> <BulkSecureValidationRow> <Comm>String</Comm> <Reason>String</Reason> <Row>0</Row> <FailureReason>String</FailureReason> </BulkSecureValidationRow> </ValidationRows> </ValidateBulkSecureProcessResponse>