MBFSPreferences

<back to all web services

CustomerPreferencesRequest

The following routes are available for this service:
All Verbs/CustomerPreferences/
import 'package:servicestack/servicestack.dart';

class Response implements IConvertible
{
    String? Code;
    String? Message;

    Response({this.Code,this.Message});
    Response.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

class MarketingPreference implements IConvertible
{
    String? OptInMail;
    String? OptInTelephone;
    String? OptInEmail;
    String? OptInSMS;
    String? TimeStamp;
    bool? MMF_Portal_Registered;

    MarketingPreference({this.OptInMail,this.OptInTelephone,this.OptInEmail,this.OptInSMS,this.TimeStamp,this.MMF_Portal_Registered});
    MarketingPreference.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        OptInMail = json['OptInMail'];
        OptInTelephone = json['OptInTelephone'];
        OptInEmail = json['OptInEmail'];
        OptInSMS = json['OptInSMS'];
        TimeStamp = json['TimeStamp'];
        MMF_Portal_Registered = json['MMF_Portal_Registered'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'OptInMail': OptInMail,
        'OptInTelephone': OptInTelephone,
        'OptInEmail': OptInEmail,
        'OptInSMS': OptInSMS,
        'TimeStamp': TimeStamp,
        'MMF_Portal_Registered': MMF_Portal_Registered
    };

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

class CustomerPreferencesResponse implements IConvertible
{
    Response? ResponseStatus;
    MarketingPreference? MarketingPreference;

    CustomerPreferencesResponse({this.ResponseStatus,this.MarketingPreference});
    CustomerPreferencesResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'ResponseStatus': JsonConverters.toJson(ResponseStatus,'Response',context!),
        'MarketingPreference': JsonConverters.toJson(MarketingPreference,'MarketingPreference',context!)
    };

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

class CustomerPreferencesRequest implements IConvertible
{
    String? BP_ID;
    String? Username;
    String? Token;
    String? Timestamp;

    CustomerPreferencesRequest({this.BP_ID,this.Username,this.Token,this.Timestamp});
    CustomerPreferencesRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        BP_ID = json['BP_ID'];
        Username = json['Username'];
        Token = json['Token'];
        Timestamp = json['Timestamp'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'BP_ID': BP_ID,
        'Username': Username,
        'Token': Token,
        'Timestamp': Timestamp
    };

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

TypeContext _ctx = TypeContext(library: 'webservices.mbukdatabase.co.uk', types: <String, TypeInfo> {
    'Response': TypeInfo(TypeOf.Class, create:() => Response()),
    'MarketingPreference': TypeInfo(TypeOf.Class, create:() => MarketingPreference()),
    'CustomerPreferencesResponse': TypeInfo(TypeOf.Class, create:() => CustomerPreferencesResponse()),
    'CustomerPreferencesRequest': TypeInfo(TypeOf.Class, create:() => CustomerPreferencesRequest()),
});

Dart CustomerPreferencesRequest 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.

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

{"BP_ID":"String","Username":"String","Token":"String","Timestamp":"String"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"ResponseStatus":{"Code":"String","Message":"String"},"MarketingPreference":{"OptInMail":"String","OptInTelephone":"String","OptInEmail":"String","OptInSMS":"String","TimeStamp":"String","MMF_Portal_Registered":false}}