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 .xml suffix or ?format=xml
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/xml
Content-Type: application/xml
Content-Length: length
<UpdateMileage xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/RAPP.Mercedes.VanCustomerAccount.Api.ServiceModel.SitecoreServiceModels">
<CIAMId>String</CIAMId>
<ChassisNumber>String</ChassisNumber>
<Mileage>0</Mileage>
</UpdateMileage>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <UpdateMileageResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/RAPP.Mercedes.VanCustomerAccount.Api.ServiceModel.SitecoreServiceModels"> <Status> <Message>String</Message> <ReturnCode>String</ReturnCode> </Status> </UpdateMileageResponse>