PaySecure Pinless Web Services 2023:07:03:07

<back to all web services

DataStoreRequest

Requires Authentication
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()),
});

Dart DataStoreRequest DTOs

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

HTTP + OTHER

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

POST /jsonl/reply/DataStoreRequest HTTP/1.1 
Host: api.paysecure.acculynk.net 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"Credentials":{"MerchantId":"String","UserName":"String","Password":"String","Version":"String"},"Scope":{"StoreScope":"AllMerchants","Value":"String"}}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"ErrorCode":"String","ErrorMessage":"String"}