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 .xml suffix or ?format=xml
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: application/xml
Content-Type: application/xml
Content-Length: length
<DocumentVerificationRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CDD_Engine_WS.dto.Requests">
<ApplicationGUID>String</ApplicationGUID>
<Documents xmlns:d2p1="http://schemas.datacontract.org/2004/07/ThirdPartyServices_ClassLibraries.DocumentValidations">
<d2p1:DocumentData>
<d2p1:DocumentType>String</d2p1:DocumentType>
<d2p1:FileData>String</d2p1:FileData>
<d2p1:FileName>String</d2p1:FileName>
</d2p1:DocumentData>
</Documents>
</DocumentVerificationRequest>