POST | /authplus/realtime |
---|
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 AuthPlusRealtimeCheckDataRequest implements IConvertible
{
String? ApplicationGUID;
int? CSR;
List<OwnerDetails>? Owners;
AuthPlusRealtimeCheckDataRequest({this.ApplicationGUID,this.CSR,this.Owners});
AuthPlusRealtimeCheckDataRequest.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() => "AuthPlusRealtimeCheckDataRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'wp_cddws_test.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>[]),
'AuthPlusRealtimeCheckDataRequest': TypeInfo(TypeOf.Class, create:() => AuthPlusRealtimeCheckDataRequest()),
'List<OwnerDetails>': TypeInfo(TypeOf.Class, create:() => <OwnerDetails>[]),
});
Dart AuthPlusRealtimeCheckDataRequest 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 /authplus/realtime HTTP/1.1
Host: wp-cddws-test.worldpay.com
Accept: text/jsv
Content-Type: text/jsv
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
}
]
}
]
}