POST | /authplus/submit |
---|
import 'package:servicestack/servicestack.dart';
class AddressData implements IConvertible
{
String? address1;
String? address2;
String? address3;
String? postalCode;
String? city;
String? state;
String? countryCode;
AddressData({this.address1,this.address2,this.address3,this.postalCode,this.city,this.state,this.countryCode});
AddressData.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
address1 = json['address1'];
address2 = json['address2'];
address3 = json['address3'];
postalCode = json['postalCode'];
city = json['city'];
state = json['state'];
countryCode = json['countryCode'];
return this;
}
Map<String, dynamic> toJson() => {
'address1': address1,
'address2': address2,
'address3': address3,
'postalCode': postalCode,
'city': city,
'state': state,
'countryCode': countryCode
};
getTypeName() => "AddressData";
TypeContext? context = _ctx;
}
class ContactNameData implements IConvertible
{
String? title;
String? firstName;
String? middleName;
String? lastName;
ContactNameData({this.title,this.firstName,this.middleName,this.lastName});
ContactNameData.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
title = json['title'];
firstName = json['firstName'];
middleName = json['middleName'];
lastName = json['lastName'];
return this;
}
Map<String, dynamic> toJson() => {
'title': title,
'firstName': firstName,
'middleName': middleName,
'lastName': lastName
};
getTypeName() => "ContactNameData";
TypeContext? context = _ctx;
}
class IdentityVerificationDocuments implements IConvertible
{
String? documentId;
String? authenticity;
IdentityVerificationDocuments({this.documentId,this.authenticity});
IdentityVerificationDocuments.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
documentId = json['documentId'];
authenticity = json['authenticity'];
return this;
}
Map<String, dynamic> toJson() => {
'documentId': documentId,
'authenticity': authenticity
};
getTypeName() => "IdentityVerificationDocuments";
TypeContext? context = _ctx;
}
class OwnerDetails implements IConvertible
{
int? dayOfBirth;
int? monthOfBirth;
int? yearOfBirth;
double? ownershipPercentage;
AddressData? homeAddress;
bool? currentAddressLessThanThreeYears;
AddressData? previousHomeAddress;
ContactNameData? name;
bool? director;
String? nationality;
String? position;
int? timeAtHomeAddressYears;
int? timeAtHomeAddressMonths;
String? PrimaryPartyID;
List<IdentityVerificationDocuments>? identityVerificationDocuments;
OwnerDetails({this.dayOfBirth,this.monthOfBirth,this.yearOfBirth,this.ownershipPercentage,this.homeAddress,this.currentAddressLessThanThreeYears,this.previousHomeAddress,this.name,this.director,this.nationality,this.position,this.timeAtHomeAddressYears,this.timeAtHomeAddressMonths,this.PrimaryPartyID,this.identityVerificationDocuments});
OwnerDetails.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
dayOfBirth = json['dayOfBirth'];
monthOfBirth = json['monthOfBirth'];
yearOfBirth = json['yearOfBirth'];
ownershipPercentage = JsonConverters.toDouble(json['ownershipPercentage']);
homeAddress = JsonConverters.fromJson(json['homeAddress'],'AddressData',context!);
currentAddressLessThanThreeYears = json['currentAddressLessThanThreeYears'];
previousHomeAddress = JsonConverters.fromJson(json['previousHomeAddress'],'AddressData',context!);
name = JsonConverters.fromJson(json['name'],'ContactNameData',context!);
director = json['director'];
nationality = json['nationality'];
position = json['position'];
timeAtHomeAddressYears = json['timeAtHomeAddressYears'];
timeAtHomeAddressMonths = json['timeAtHomeAddressMonths'];
PrimaryPartyID = json['PrimaryPartyID'];
identityVerificationDocuments = JsonConverters.fromJson(json['identityVerificationDocuments'],'List<IdentityVerificationDocuments>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'dayOfBirth': dayOfBirth,
'monthOfBirth': monthOfBirth,
'yearOfBirth': yearOfBirth,
'ownershipPercentage': ownershipPercentage,
'homeAddress': JsonConverters.toJson(homeAddress,'AddressData',context!),
'currentAddressLessThanThreeYears': currentAddressLessThanThreeYears,
'previousHomeAddress': JsonConverters.toJson(previousHomeAddress,'AddressData',context!),
'name': JsonConverters.toJson(name,'ContactNameData',context!),
'director': director,
'nationality': nationality,
'position': position,
'timeAtHomeAddressYears': timeAtHomeAddressYears,
'timeAtHomeAddressMonths': timeAtHomeAddressMonths,
'PrimaryPartyID': PrimaryPartyID,
'identityVerificationDocuments': JsonConverters.toJson(identityVerificationDocuments,'List<IdentityVerificationDocuments>',context!)
};
getTypeName() => "OwnerDetails";
TypeContext? context = _ctx;
}
class AuthPlusCheckDataRequest implements IConvertible
{
String? ApplicationGUID;
int? CSR;
List<OwnerDetails>? Owners;
AuthPlusCheckDataRequest({this.ApplicationGUID,this.CSR,this.Owners});
AuthPlusCheckDataRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ApplicationGUID = json['ApplicationGUID'];
CSR = json['CSR'];
Owners = JsonConverters.fromJson(json['Owners'],'List<OwnerDetails>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'ApplicationGUID': ApplicationGUID,
'CSR': CSR,
'Owners': JsonConverters.toJson(Owners,'List<OwnerDetails>',context!)
};
getTypeName() => "AuthPlusCheckDataRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'wpcdd_featuretest_ws.worldpay.com', types: <String, TypeInfo> {
'AddressData': TypeInfo(TypeOf.Class, create:() => AddressData()),
'ContactNameData': TypeInfo(TypeOf.Class, create:() => ContactNameData()),
'IdentityVerificationDocuments': TypeInfo(TypeOf.Class, create:() => IdentityVerificationDocuments()),
'OwnerDetails': TypeInfo(TypeOf.Class, create:() => OwnerDetails()),
'List<IdentityVerificationDocuments>': TypeInfo(TypeOf.Class, create:() => <IdentityVerificationDocuments>[]),
'AuthPlusCheckDataRequest': TypeInfo(TypeOf.Class, create:() => AuthPlusCheckDataRequest()),
'List<OwnerDetails>': TypeInfo(TypeOf.Class, create:() => <OwnerDetails>[]),
});
Dart AuthPlusCheckDataRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /authplus/submit HTTP/1.1
Host: wpcdd-featuretest-ws.worldpay.com
Accept: application/json
Content-Type: application/json
Content-Length: length
{"ApplicationGUID":"String","CSR":0,"Owners":[{"dayOfBirth":0,"monthOfBirth":0,"yearOfBirth":0,"ownershipPercentage":0,"homeAddress":{"address1":"String","address2":"String","address3":"String","postalCode":"String","city":"String","state":"String","countryCode":"String"},"currentAddressLessThanThreeYears":false,"previousHomeAddress":{"address1":"String","address2":"String","address3":"String","postalCode":"String","city":"String","state":"String","countryCode":"String"},"name":{"title":"String","firstName":"String","middleName":"String","lastName":"String"},"director":false,"nationality":"String","position":"String","timeAtHomeAddressYears":0,"timeAtHomeAddressMonths":0,"PrimaryPartyID":"String","identityVerificationDocuments":[{"documentId":"String","authenticity":"String"}]}]}