POST | /updatemileage/ |
---|
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 UpdateMileageResponse implements IConvertible
{
ReturnStatus? Status;
UpdateMileageResponse({this.Status});
UpdateMileageResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Status = JsonConverters.fromJson(json['Status'],'ReturnStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Status': JsonConverters.toJson(Status,'ReturnStatus',context!)
};
getTypeName() => "UpdateMileageResponse";
TypeContext? context = _ctx;
}
class UpdateMileage implements IConvertible
{
String? CIAMId;
String? ChassisNumber;
int? Mileage;
UpdateMileage({this.CIAMId,this.ChassisNumber,this.Mileage});
UpdateMileage.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
CIAMId = json['CIAMId'];
ChassisNumber = json['ChassisNumber'];
Mileage = json['Mileage'];
return this;
}
Map<String, dynamic> toJson() => {
'CIAMId': CIAMId,
'ChassisNumber': ChassisNumber,
'Mileage': Mileage
};
getTypeName() => "UpdateMileage";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'webservices.mbukdatabase.co.uk', types: <String, TypeInfo> {
'ReturnStatus': TypeInfo(TypeOf.Class, create:() => ReturnStatus()),
'UpdateMileageResponse': TypeInfo(TypeOf.Class, create:() => UpdateMileageResponse()),
'UpdateMileage': TypeInfo(TypeOf.Class, create:() => UpdateMileage()),
});
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
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /updatemileage/ HTTP/1.1
Host: webservices.mbukdatabase.co.uk
Accept: application/json
Content-Type: application/json
Content-Length: length
{"CIAMId":"String","ChassisNumber":"String","Mileage":0}
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"Status":{"ReturnCode":"String","Message":"String"}}