import 'package:servicestack/servicestack.dart';
class DataStore implements IConvertible
{
    String? ErrorCode;
    String? ErrorMessage;
    DataStore({this.ErrorCode,this.ErrorMessage});
    DataStore.fromJson(Map<String, dynamic> json) { fromMap(json); }
    fromMap(Map<String, dynamic> json) {
        ErrorCode = json['ErrorCode'];
        ErrorMessage = json['ErrorMessage'];
        return this;
    }
    Map<String, dynamic> toJson() => {
        'ErrorCode': ErrorCode,
        'ErrorMessage': ErrorMessage
    };
    getTypeName() => "DataStore";
    TypeContext? context = _ctx;
}
class RequestorCredentials implements IConvertible
{
    // @Required()
    String? MerchantId;
    // @Required()
    String? UserName;
    // @Required()
    String? Password;
    // @Required()
    String? Version;
    RequestorCredentials({this.MerchantId,this.UserName,this.Password,this.Version});
    RequestorCredentials.fromJson(Map<String, dynamic> json) { fromMap(json); }
    fromMap(Map<String, dynamic> json) {
        MerchantId = json['MerchantId'];
        UserName = json['UserName'];
        Password = json['Password'];
        Version = json['Version'];
        return this;
    }
    Map<String, dynamic> toJson() => {
        'MerchantId': MerchantId,
        'UserName': UserName,
        'Password': Password,
        'Version': Version
    };
    getTypeName() => "RequestorCredentials";
    TypeContext? context = _ctx;
}
enum DataStoreScope
{
    AllMerchants,
    SingleMerchant,
}
class DataStoreFor implements IConvertible
{
    DataStoreScope? StoreScope;
    String? Value;
    DataStoreFor({this.StoreScope,this.Value});
    DataStoreFor.fromJson(Map<String, dynamic> json) { fromMap(json); }
    fromMap(Map<String, dynamic> json) {
        StoreScope = JsonConverters.fromJson(json['StoreScope'],'DataStoreScope',context!);
        Value = json['Value'];
        return this;
    }
    Map<String, dynamic> toJson() => {
        'StoreScope': JsonConverters.toJson(StoreScope,'DataStoreScope',context!),
        'Value': Value
    };
    getTypeName() => "DataStoreFor";
    TypeContext? context = _ctx;
}
class DataStoreRequest implements IConvertible
{
    RequestorCredentials? Credentials;
    DataStoreFor? Scope;
    DataStoreRequest({this.Credentials,this.Scope});
    DataStoreRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
    fromMap(Map<String, dynamic> json) {
        Credentials = JsonConverters.fromJson(json['Credentials'],'RequestorCredentials',context!);
        Scope = JsonConverters.fromJson(json['Scope'],'DataStoreFor',context!);
        return this;
    }
    Map<String, dynamic> toJson() => {
        'Credentials': JsonConverters.toJson(Credentials,'RequestorCredentials',context!),
        'Scope': JsonConverters.toJson(Scope,'DataStoreFor',context!)
    };
    getTypeName() => "DataStoreRequest";
    TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.paysecure.acculynk.net', types: <String, TypeInfo> {
    'DataStore': TypeInfo(TypeOf.Class, create:() => DataStore()),
    'RequestorCredentials': TypeInfo(TypeOf.Class, create:() => RequestorCredentials()),
    'DataStoreScope': TypeInfo(TypeOf.Enum, enumValues:DataStoreScope.values),
    'DataStoreFor': TypeInfo(TypeOf.Class, create:() => DataStoreFor()),
    'DataStoreRequest': TypeInfo(TypeOf.Class, create:() => DataStoreRequest()),
});
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 /xml/reply/DataStoreRequest HTTP/1.1 
Host: api.paysecure.acculynk.net 
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<DataStoreRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.servicestack.net/types">
  <Credentials>
    <MerchantId>String</MerchantId>
    <Password>String</Password>
    <UserName>String</UserName>
    <Version>String</Version>
  </Credentials>
  <Scope>
    <StoreScope>AllMerchants</StoreScope>
    <Value>String</Value>
  </Scope>
</DataStoreRequest>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <DataStore xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.servicestack.net/types"> <ErrorCode>String</ErrorCode> <ErrorMessage>String</ErrorMessage> </DataStore>