RAPP.Mercedes.VanCustomerAccount.Api

<back to all web services

Update

The following routes are available for this service:
POST/update/
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 UpdateResponse implements IConvertible
{
    ReturnStatus? Status;

    UpdateResponse({this.Status});
    UpdateResponse.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() => "UpdateResponse";
    TypeContext? context = _ctx;
}

class Update implements IConvertible
{
    String? CiamId;
    String? FirstName;
    String? LastName;
    String? EmailAddress;
    String? MobileTelephoneNumber;
    String? HomeAddress_BuildingNumberName;
    String? HomeAddress_Line1;
    String? HomeAddress_Line2;
    String? HomeAddress_TownCity;
    String? HomeAddress_County;
    String? HomeAddress_Postcode;
    String? CompanyName;
    String? CompanyType;
    String? CompanyRegistrationNumber;
    String? VATNumber;
    String? BusinessAddress_BuildingNumberName;
    String? BusinessAddress_Line1;
    String? BusinessAddress_Line2;
    String? BusinessAddress_TownCity;
    String? BusinessAddress_County;
    String? BusinessAddress_Postcode;
    String? BusinessIndustryType;
    String? FleetSize;
    String? EmailOptIn;
    String? TelephoneOptIn;
    String? SMSOptIn;
    String? PostOptIn;

    Update({this.CiamId,this.FirstName,this.LastName,this.EmailAddress,this.MobileTelephoneNumber,this.HomeAddress_BuildingNumberName,this.HomeAddress_Line1,this.HomeAddress_Line2,this.HomeAddress_TownCity,this.HomeAddress_County,this.HomeAddress_Postcode,this.CompanyName,this.CompanyType,this.CompanyRegistrationNumber,this.VATNumber,this.BusinessAddress_BuildingNumberName,this.BusinessAddress_Line1,this.BusinessAddress_Line2,this.BusinessAddress_TownCity,this.BusinessAddress_County,this.BusinessAddress_Postcode,this.BusinessIndustryType,this.FleetSize,this.EmailOptIn,this.TelephoneOptIn,this.SMSOptIn,this.PostOptIn});
    Update.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        CiamId = json['CiamId'];
        FirstName = json['FirstName'];
        LastName = json['LastName'];
        EmailAddress = json['EmailAddress'];
        MobileTelephoneNumber = json['MobileTelephoneNumber'];
        HomeAddress_BuildingNumberName = json['HomeAddress_BuildingNumberName'];
        HomeAddress_Line1 = json['HomeAddress_Line1'];
        HomeAddress_Line2 = json['HomeAddress_Line2'];
        HomeAddress_TownCity = json['HomeAddress_TownCity'];
        HomeAddress_County = json['HomeAddress_County'];
        HomeAddress_Postcode = json['HomeAddress_Postcode'];
        CompanyName = json['CompanyName'];
        CompanyType = json['CompanyType'];
        CompanyRegistrationNumber = json['CompanyRegistrationNumber'];
        VATNumber = json['VATNumber'];
        BusinessAddress_BuildingNumberName = json['BusinessAddress_BuildingNumberName'];
        BusinessAddress_Line1 = json['BusinessAddress_Line1'];
        BusinessAddress_Line2 = json['BusinessAddress_Line2'];
        BusinessAddress_TownCity = json['BusinessAddress_TownCity'];
        BusinessAddress_County = json['BusinessAddress_County'];
        BusinessAddress_Postcode = json['BusinessAddress_Postcode'];
        BusinessIndustryType = json['BusinessIndustryType'];
        FleetSize = json['FleetSize'];
        EmailOptIn = json['EmailOptIn'];
        TelephoneOptIn = json['TelephoneOptIn'];
        SMSOptIn = json['SMSOptIn'];
        PostOptIn = json['PostOptIn'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'CiamId': CiamId,
        'FirstName': FirstName,
        'LastName': LastName,
        'EmailAddress': EmailAddress,
        'MobileTelephoneNumber': MobileTelephoneNumber,
        'HomeAddress_BuildingNumberName': HomeAddress_BuildingNumberName,
        'HomeAddress_Line1': HomeAddress_Line1,
        'HomeAddress_Line2': HomeAddress_Line2,
        'HomeAddress_TownCity': HomeAddress_TownCity,
        'HomeAddress_County': HomeAddress_County,
        'HomeAddress_Postcode': HomeAddress_Postcode,
        'CompanyName': CompanyName,
        'CompanyType': CompanyType,
        'CompanyRegistrationNumber': CompanyRegistrationNumber,
        'VATNumber': VATNumber,
        'BusinessAddress_BuildingNumberName': BusinessAddress_BuildingNumberName,
        'BusinessAddress_Line1': BusinessAddress_Line1,
        'BusinessAddress_Line2': BusinessAddress_Line2,
        'BusinessAddress_TownCity': BusinessAddress_TownCity,
        'BusinessAddress_County': BusinessAddress_County,
        'BusinessAddress_Postcode': BusinessAddress_Postcode,
        'BusinessIndustryType': BusinessIndustryType,
        'FleetSize': FleetSize,
        'EmailOptIn': EmailOptIn,
        'TelephoneOptIn': TelephoneOptIn,
        'SMSOptIn': SMSOptIn,
        'PostOptIn': PostOptIn
    };

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

TypeContext _ctx = TypeContext(library: 'webservices.mbukdatabase.co.uk', types: <String, TypeInfo> {
    'ReturnStatus': TypeInfo(TypeOf.Class, create:() => ReturnStatus()),
    'UpdateResponse': TypeInfo(TypeOf.Class, create:() => UpdateResponse()),
    'Update': TypeInfo(TypeOf.Class, create:() => Update()),
});

Dart Update DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /update/ HTTP/1.1 
Host: webservices.mbukdatabase.co.uk 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	CiamId: String,
	FirstName: String,
	LastName: String,
	EmailAddress: String,
	MobileTelephoneNumber: String,
	HomeAddress_BuildingNumberName: String,
	HomeAddress_Line1: String,
	HomeAddress_Line2: String,
	HomeAddress_TownCity: String,
	HomeAddress_County: String,
	HomeAddress_Postcode: String,
	CompanyName: String,
	CompanyType: String,
	CompanyRegistrationNumber: String,
	VATNumber: String,
	BusinessAddress_BuildingNumberName: String,
	BusinessAddress_Line1: String,
	BusinessAddress_Line2: String,
	BusinessAddress_TownCity: String,
	BusinessAddress_County: String,
	BusinessAddress_Postcode: String,
	BusinessIndustryType: String,
	FleetSize: String,
	EmailOptIn: String,
	TelephoneOptIn: String,
	SMSOptIn: String,
	PostOptIn: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Status: 
	{
		ReturnCode: String,
		Message: String
	}
}