POST | /DocumentVerification/submit |
---|
import 'package:servicestack/servicestack.dart';
class DocumentData implements IConvertible
{
String? DocumentType;
String? FileName;
String? FileData;
DocumentData({this.DocumentType,this.FileName,this.FileData});
DocumentData.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
DocumentType = json['DocumentType'];
FileName = json['FileName'];
FileData = json['FileData'];
return this;
}
Map<String, dynamic> toJson() => {
'DocumentType': DocumentType,
'FileName': FileName,
'FileData': FileData
};
getTypeName() => "DocumentData";
TypeContext? context = _ctx;
}
class DocumentVerificationRequest implements IConvertible
{
String? ApplicationGUID;
List<DocumentData>? Documents;
DocumentVerificationRequest({this.ApplicationGUID,this.Documents});
DocumentVerificationRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ApplicationGUID = json['ApplicationGUID'];
Documents = JsonConverters.fromJson(json['Documents'],'List<DocumentData>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'ApplicationGUID': ApplicationGUID,
'Documents': JsonConverters.toJson(Documents,'List<DocumentData>',context!)
};
getTypeName() => "DocumentVerificationRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'wp_cddws_test.worldpay.com', types: <String, TypeInfo> {
'DocumentData': TypeInfo(TypeOf.Class, create:() => DocumentData()),
'DocumentVerificationRequest': TypeInfo(TypeOf.Class, create:() => DocumentVerificationRequest()),
'List<DocumentData>': TypeInfo(TypeOf.Class, create:() => <DocumentData>[]),
});
Dart DocumentVerificationRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /DocumentVerification/submit HTTP/1.1
Host: wp-cddws-test.worldpay.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
ApplicationGUID: String,
Documents:
[
{
DocumentType: String,
FileName: String,
FileData: String
}
]
}