POST | /peps/get | Get a PEP search |
---|
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
// @DataContract
class Authentication implements IConvertible
{
/**
* The API User ID provided by us when you signed up to use our API
*/
// @DataMember
// @ApiMember(Description="The API User ID provided by us when you signed up to use our API", IsRequired=true, ParameterType="header, body")
String? apiUserId;
/**
* The API User Key provided by us when you signed up to use our API
*/
// @DataMember
// @ApiMember(Description="The API User Key provided by us when you signed up to use our API", IsRequired=true, ParameterType="header, body")
String? apiUserKey;
Authentication({this.apiUserId,this.apiUserKey});
Authentication.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
apiUserId = json['apiUserId'];
apiUserKey = json['apiUserKey'];
return this;
}
Map<String, dynamic> toJson() => {
'apiUserId': apiUserId,
'apiUserKey': apiUserKey
};
getTypeName() => "Authentication";
TypeContext? context = _ctx;
}
// @DataContract
class BaseRequest implements IBaseRequest, IConvertible
{
/**
* The authentication credentials
*/
// @DataMember
// @ApiMember(Description="The authentication credentials", IsRequired=true, ParameterType="header, body")
Authentication? authentication;
BaseRequest({this.authentication});
BaseRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
authentication = JsonConverters.fromJson(json['authentication'],'Authentication',context!);
return this;
}
Map<String, dynamic> toJson() => {
'authentication': JsonConverters.toJson(authentication,'Authentication',context!)
};
getTypeName() => "BaseRequest";
TypeContext? context = _ctx;
}
// @DataContract
class ResponseError implements IConvertible
{
// @DataMember(Order=1)
String? errorCode;
// @DataMember(Order=2)
String? fieldName;
// @DataMember(Order=3)
String? message;
// @DataMember(Order=4)
Map<String,String?>? meta;
ResponseError({this.errorCode,this.fieldName,this.message,this.meta});
ResponseError.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
errorCode = json['errorCode'];
fieldName = json['fieldName'];
message = json['message'];
meta = JsonConverters.toStringMap(json['meta']);
return this;
}
Map<String, dynamic> toJson() => {
'errorCode': errorCode,
'fieldName': fieldName,
'message': message,
'meta': meta
};
getTypeName() => "ResponseError";
TypeContext? context = _ctx;
}
class ArrayOfResponseError extends ListBase<ResponseError> implements IConvertible
{
final List<ResponseError> l = [];
set length(int newLength) { l.length = newLength; }
int get length => l.length;
ResponseError operator [](int index) => l[index];
void operator []=(int index, ResponseError value) { l[index] = value; }
ArrayOfResponseError();
ArrayOfResponseError.fromJson(Map<String, dynamic> json) : super();
fromMap(Map<String, dynamic> json) {
return this;
}
Map<String, dynamic> toJson() => {};
getTypeName() => "ArrayOfResponseError";
TypeContext? context = _ctx;
}
// @DataContract
class ResponseStatus implements IConvertible
{
// @DataMember(Order=1)
String? errorCode;
// @DataMember(Order=2)
String? message;
// @DataMember(Order=3)
String? stackTrace;
// @DataMember(Order=4)
ArrayOfResponseError? errors;
// @DataMember(Order=5)
Map<String,String?>? meta;
ResponseStatus({this.errorCode,this.message,this.stackTrace,this.errors,this.meta});
ResponseStatus.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
errorCode = json['errorCode'];
message = json['message'];
stackTrace = json['stackTrace'];
errors = JsonConverters.fromJson(json['errors'],'ArrayOfResponseError',context!);
meta = JsonConverters.toStringMap(json['meta']);
return this;
}
Map<String, dynamic> toJson() => {
'errorCode': errorCode,
'message': message,
'stackTrace': stackTrace,
'errors': JsonConverters.toJson(errors,'ArrayOfResponseError',context!),
'meta': meta
};
getTypeName() => "ResponseStatus";
TypeContext? context = _ctx;
}
class BaseResponse implements IBaseDataResponse, IHasResponseStatus, IConvertible
{
/**
* The status of the response
*/
// @ApiMember(Description="The status of the response")
ResponseStatus? responseStatus;
BaseResponse({this.responseStatus});
BaseResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
responseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!)
};
getTypeName() => "BaseResponse";
TypeContext? context = _ctx;
}
class LinkedTo implements IConvertible
{
int? clientId;
int? id;
String? type;
String? subtype;
String? status;
String? description;
bool? isArchived;
String? name;
DateTime? date;
LinkedTo({this.clientId,this.id,this.type,this.subtype,this.status,this.description,this.isArchived,this.name,this.date});
LinkedTo.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
clientId = json['clientId'];
id = json['id'];
type = json['type'];
subtype = json['subtype'];
status = json['status'];
description = json['description'];
isArchived = json['isArchived'];
name = json['name'];
date = JsonConverters.fromJson(json['date'],'DateTime',context!);
return this;
}
Map<String, dynamic> toJson() => {
'clientId': clientId,
'id': id,
'type': type,
'subtype': subtype,
'status': status,
'description': description,
'isArchived': isArchived,
'name': name,
'date': JsonConverters.toJson(date,'DateTime',context!)
};
getTypeName() => "LinkedTo";
TypeContext? context = _ctx;
}
class ArrayOfLinkedTo extends ListBase<LinkedTo> implements IConvertible
{
final List<LinkedTo> l = [];
set length(int newLength) { l.length = newLength; }
int get length => l.length;
LinkedTo operator [](int index) => l[index];
void operator []=(int index, LinkedTo value) { l[index] = value; }
ArrayOfLinkedTo();
ArrayOfLinkedTo.fromJson(Map<String, dynamic> json) : super();
fromMap(Map<String, dynamic> json) {
return this;
}
Map<String, dynamic> toJson() => {};
getTypeName() => "ArrayOfLinkedTo";
TypeContext? context = _ctx;
}
class SearchCriteria implements IConvertible
{
String? name;
String? address;
String? country;
String? dateOfBirth;
String? nationality;
String? reference;
SearchCriteria({this.name,this.address,this.country,this.dateOfBirth,this.nationality,this.reference});
SearchCriteria.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
name = json['name'];
address = json['address'];
country = json['country'];
dateOfBirth = json['dateOfBirth'];
nationality = json['nationality'];
reference = json['reference'];
return this;
}
Map<String, dynamic> toJson() => {
'name': name,
'address': address,
'country': country,
'dateOfBirth': dateOfBirth,
'nationality': nationality,
'reference': reference
};
getTypeName() => "SearchCriteria";
TypeContext? context = _ctx;
}
class PepSearchResultAddress implements IConvertible
{
String? addressLine1;
String? addressLine2;
String? addressLine3;
String? addressLine4;
String? town;
String? county;
String? postCode;
String? country;
String? isoCountry;
bool? softDelete;
DateTime? dateLastUpdated;
PepSearchResultAddress({this.addressLine1,this.addressLine2,this.addressLine3,this.addressLine4,this.town,this.county,this.postCode,this.country,this.isoCountry,this.softDelete,this.dateLastUpdated});
PepSearchResultAddress.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
addressLine1 = json['addressLine1'];
addressLine2 = json['addressLine2'];
addressLine3 = json['addressLine3'];
addressLine4 = json['addressLine4'];
town = json['town'];
county = json['county'];
postCode = json['postCode'];
country = json['country'];
isoCountry = json['isoCountry'];
softDelete = json['softDelete'];
dateLastUpdated = JsonConverters.fromJson(json['dateLastUpdated'],'DateTime',context!);
return this;
}
Map<String, dynamic> toJson() => {
'addressLine1': addressLine1,
'addressLine2': addressLine2,
'addressLine3': addressLine3,
'addressLine4': addressLine4,
'town': town,
'county': county,
'postCode': postCode,
'country': country,
'isoCountry': isoCountry,
'softDelete': softDelete,
'dateLastUpdated': JsonConverters.toJson(dateLastUpdated,'DateTime',context!)
};
getTypeName() => "PepSearchResultAddress";
TypeContext? context = _ctx;
}
class PepSearchResultAlias implements IConvertible
{
String? forename;
String? middleName;
String? surname;
bool? softDelete;
DateTime? dateOfSoftDelete;
DateTime? dateLastUpdated;
String? title;
String? alternateTitle;
String? businessName;
PepSearchResultAlias({this.forename,this.middleName,this.surname,this.softDelete,this.dateOfSoftDelete,this.dateLastUpdated,this.title,this.alternateTitle,this.businessName});
PepSearchResultAlias.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
forename = json['forename'];
middleName = json['middleName'];
surname = json['surname'];
softDelete = json['softDelete'];
dateOfSoftDelete = JsonConverters.fromJson(json['dateOfSoftDelete'],'DateTime',context!);
dateLastUpdated = JsonConverters.fromJson(json['dateLastUpdated'],'DateTime',context!);
title = json['title'];
alternateTitle = json['alternateTitle'];
businessName = json['businessName'];
return this;
}
Map<String, dynamic> toJson() => {
'forename': forename,
'middleName': middleName,
'surname': surname,
'softDelete': softDelete,
'dateOfSoftDelete': JsonConverters.toJson(dateOfSoftDelete,'DateTime',context!),
'dateLastUpdated': JsonConverters.toJson(dateLastUpdated,'DateTime',context!),
'title': title,
'alternateTitle': alternateTitle,
'businessName': businessName
};
getTypeName() => "PepSearchResultAlias";
TypeContext? context = _ctx;
}
class PepSearchResultArticleSnippet implements IConvertible
{
String? title;
String? text;
String? adverseTerms;
PepSearchResultArticleSnippet({this.title,this.text,this.adverseTerms});
PepSearchResultArticleSnippet.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
title = json['title'];
text = json['text'];
adverseTerms = json['adverseTerms'];
return this;
}
Map<String, dynamic> toJson() => {
'title': title,
'text': text,
'adverseTerms': adverseTerms
};
getTypeName() => "PepSearchResultArticleSnippet";
TypeContext? context = _ctx;
}
class PepSearchResultArticle implements IConvertible
{
String? url;
String? originalUrl;
String? source;
DateTime? dateOfCapture;
DateTime? dateLastUpdated;
List<PepSearchResultArticleSnippet>? snippets;
PepSearchResultArticle({this.url,this.originalUrl,this.source,this.dateOfCapture,this.dateLastUpdated,this.snippets});
PepSearchResultArticle.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
url = json['url'];
originalUrl = json['originalUrl'];
source = json['source'];
dateOfCapture = JsonConverters.fromJson(json['dateOfCapture'],'DateTime',context!);
dateLastUpdated = JsonConverters.fromJson(json['dateLastUpdated'],'DateTime',context!);
snippets = JsonConverters.fromJson(json['snippets'],'List<PepSearchResultArticleSnippet>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'url': url,
'originalUrl': originalUrl,
'source': source,
'dateOfCapture': JsonConverters.toJson(dateOfCapture,'DateTime',context!),
'dateLastUpdated': JsonConverters.toJson(dateLastUpdated,'DateTime',context!),
'snippets': JsonConverters.toJson(snippets,'List<PepSearchResultArticleSnippet>',context!)
};
getTypeName() => "PepSearchResultArticle";
TypeContext? context = _ctx;
}
class PepSearchResultIndividualAssociation implements IConvertible
{
String? linkDescription;
bool? softDelete;
DateTime? dateLastUpdated;
String? fullName;
PepSearchResultIndividualAssociation({this.linkDescription,this.softDelete,this.dateLastUpdated,this.fullName});
PepSearchResultIndividualAssociation.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
linkDescription = json['linkDescription'];
softDelete = json['softDelete'];
dateLastUpdated = JsonConverters.fromJson(json['dateLastUpdated'],'DateTime',context!);
fullName = json['fullName'];
return this;
}
Map<String, dynamic> toJson() => {
'linkDescription': linkDescription,
'softDelete': softDelete,
'dateLastUpdated': JsonConverters.toJson(dateLastUpdated,'DateTime',context!),
'fullName': fullName
};
getTypeName() => "PepSearchResultIndividualAssociation";
TypeContext? context = _ctx;
}
class PepSearchResultBusinessAssociation implements IConvertible
{
String? linkDescription;
bool? softDelete;
DateTime? dateLastUpdated;
String? businessName;
PepSearchResultBusinessAssociation({this.linkDescription,this.softDelete,this.dateLastUpdated,this.businessName});
PepSearchResultBusinessAssociation.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
linkDescription = json['linkDescription'];
softDelete = json['softDelete'];
dateLastUpdated = JsonConverters.fromJson(json['dateLastUpdated'],'DateTime',context!);
businessName = json['businessName'];
return this;
}
Map<String, dynamic> toJson() => {
'linkDescription': linkDescription,
'softDelete': softDelete,
'dateLastUpdated': JsonConverters.toJson(dateLastUpdated,'DateTime',context!),
'businessName': businessName
};
getTypeName() => "PepSearchResultBusinessAssociation";
TypeContext? context = _ctx;
}
class PepSearchResultNote implements IConvertible
{
String? source;
String? notes;
bool? softDelete;
DateTime? dateLastUpdated;
PepSearchResultNote({this.source,this.notes,this.softDelete,this.dateLastUpdated});
PepSearchResultNote.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
source = json['source'];
notes = json['notes'];
softDelete = json['softDelete'];
dateLastUpdated = JsonConverters.fromJson(json['dateLastUpdated'],'DateTime',context!);
return this;
}
Map<String, dynamic> toJson() => {
'source': source,
'notes': notes,
'softDelete': softDelete,
'dateLastUpdated': JsonConverters.toJson(dateLastUpdated,'DateTime',context!)
};
getTypeName() => "PepSearchResultNote";
TypeContext? context = _ctx;
}
class PepSearchResultPoliticalPosition implements IConvertible
{
String? description;
String? from;
String? to;
String? country;
bool? softDelete;
DateTime? dateLastUpdated;
PepSearchResultPoliticalPosition({this.description,this.from,this.to,this.country,this.softDelete,this.dateLastUpdated});
PepSearchResultPoliticalPosition.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
description = json['description'];
from = json['from'];
to = json['to'];
country = json['country'];
softDelete = json['softDelete'];
dateLastUpdated = JsonConverters.fromJson(json['dateLastUpdated'],'DateTime',context!);
return this;
}
Map<String, dynamic> toJson() => {
'description': description,
'from': from,
'to': to,
'country': country,
'softDelete': softDelete,
'dateLastUpdated': JsonConverters.toJson(dateLastUpdated,'DateTime',context!)
};
getTypeName() => "PepSearchResultPoliticalPosition";
TypeContext? context = _ctx;
}
class PepSearchResult implements IConvertible
{
double? resultSimilarity;
bool? resultResolved;
DateTime? dateLastUpdated;
bool? resultIsClient;
int? id;
String? type;
String? title;
String? forename;
String? middlename;
String? surname;
bool? softDelete;
DateTime? dateOfSoftDelete;
DateTime? dateOfCapture;
DateTime? dateOfBirth;
DateTime? dateOfDeath;
int? yearOfBirth;
int? yearOfDeath;
String? gender;
String? homeTelephone;
String? businessTelephone;
String? mobileTelephone;
String? fax;
String? email;
String? nationality;
String? source;
String? category;
String? picture;
String? alternateTitle;
String? businessName;
String? description;
String? telephone;
String? website;
int? pepTier;
List<PepSearchResultAddress>? addresses;
List<PepSearchResultAlias>? aliases;
List<PepSearchResultArticle>? articles;
List<PepSearchResultIndividualAssociation>? associations;
List<PepSearchResultBusinessAssociation>? businessAssociations;
List<PepSearchResultNote>? notes;
List<PepSearchResultPoliticalPosition>? politicalPositions;
PepSearchResult({this.resultSimilarity,this.resultResolved,this.dateLastUpdated,this.resultIsClient,this.id,this.type,this.title,this.forename,this.middlename,this.surname,this.softDelete,this.dateOfSoftDelete,this.dateOfCapture,this.dateOfBirth,this.dateOfDeath,this.yearOfBirth,this.yearOfDeath,this.gender,this.homeTelephone,this.businessTelephone,this.mobileTelephone,this.fax,this.email,this.nationality,this.source,this.category,this.picture,this.alternateTitle,this.businessName,this.description,this.telephone,this.website,this.pepTier,this.addresses,this.aliases,this.articles,this.associations,this.businessAssociations,this.notes,this.politicalPositions});
PepSearchResult.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
resultSimilarity = JsonConverters.toDouble(json['resultSimilarity']);
resultResolved = json['resultResolved'];
dateLastUpdated = JsonConverters.fromJson(json['dateLastUpdated'],'DateTime',context!);
resultIsClient = json['resultIsClient'];
id = json['id'];
type = json['type'];
title = json['title'];
forename = json['forename'];
middlename = json['middlename'];
surname = json['surname'];
softDelete = json['softDelete'];
dateOfSoftDelete = JsonConverters.fromJson(json['dateOfSoftDelete'],'DateTime',context!);
dateOfCapture = JsonConverters.fromJson(json['dateOfCapture'],'DateTime',context!);
dateOfBirth = JsonConverters.fromJson(json['dateOfBirth'],'DateTime',context!);
dateOfDeath = JsonConverters.fromJson(json['dateOfDeath'],'DateTime',context!);
yearOfBirth = json['yearOfBirth'];
yearOfDeath = json['yearOfDeath'];
gender = json['gender'];
homeTelephone = json['homeTelephone'];
businessTelephone = json['businessTelephone'];
mobileTelephone = json['mobileTelephone'];
fax = json['fax'];
email = json['email'];
nationality = json['nationality'];
source = json['source'];
category = json['category'];
picture = json['picture'];
alternateTitle = json['alternateTitle'];
businessName = json['businessName'];
description = json['description'];
telephone = json['telephone'];
website = json['website'];
pepTier = json['pepTier'];
addresses = JsonConverters.fromJson(json['addresses'],'List<PepSearchResultAddress>',context!);
aliases = JsonConverters.fromJson(json['aliases'],'List<PepSearchResultAlias>',context!);
articles = JsonConverters.fromJson(json['articles'],'List<PepSearchResultArticle>',context!);
associations = JsonConverters.fromJson(json['associations'],'List<PepSearchResultIndividualAssociation>',context!);
businessAssociations = JsonConverters.fromJson(json['businessAssociations'],'List<PepSearchResultBusinessAssociation>',context!);
notes = JsonConverters.fromJson(json['notes'],'List<PepSearchResultNote>',context!);
politicalPositions = JsonConverters.fromJson(json['politicalPositions'],'List<PepSearchResultPoliticalPosition>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'resultSimilarity': resultSimilarity,
'resultResolved': resultResolved,
'dateLastUpdated': JsonConverters.toJson(dateLastUpdated,'DateTime',context!),
'resultIsClient': resultIsClient,
'id': id,
'type': type,
'title': title,
'forename': forename,
'middlename': middlename,
'surname': surname,
'softDelete': softDelete,
'dateOfSoftDelete': JsonConverters.toJson(dateOfSoftDelete,'DateTime',context!),
'dateOfCapture': JsonConverters.toJson(dateOfCapture,'DateTime',context!),
'dateOfBirth': JsonConverters.toJson(dateOfBirth,'DateTime',context!),
'dateOfDeath': JsonConverters.toJson(dateOfDeath,'DateTime',context!),
'yearOfBirth': yearOfBirth,
'yearOfDeath': yearOfDeath,
'gender': gender,
'homeTelephone': homeTelephone,
'businessTelephone': businessTelephone,
'mobileTelephone': mobileTelephone,
'fax': fax,
'email': email,
'nationality': nationality,
'source': source,
'category': category,
'picture': picture,
'alternateTitle': alternateTitle,
'businessName': businessName,
'description': description,
'telephone': telephone,
'website': website,
'pepTier': pepTier,
'addresses': JsonConverters.toJson(addresses,'List<PepSearchResultAddress>',context!),
'aliases': JsonConverters.toJson(aliases,'List<PepSearchResultAlias>',context!),
'articles': JsonConverters.toJson(articles,'List<PepSearchResultArticle>',context!),
'associations': JsonConverters.toJson(associations,'List<PepSearchResultIndividualAssociation>',context!),
'businessAssociations': JsonConverters.toJson(businessAssociations,'List<PepSearchResultBusinessAssociation>',context!),
'notes': JsonConverters.toJson(notes,'List<PepSearchResultNote>',context!),
'politicalPositions': JsonConverters.toJson(politicalPositions,'List<PepSearchResultPoliticalPosition>',context!)
};
getTypeName() => "PepSearchResult";
TypeContext? context = _ctx;
}
class PepSearchResults implements IConvertible
{
List<PepSearchResult>? results;
PepSearchResults({this.results});
PepSearchResults.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
results = JsonConverters.fromJson(json['results'],'List<PepSearchResult>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'results': JsonConverters.toJson(results,'List<PepSearchResult>',context!)
};
getTypeName() => "PepSearchResults";
TypeContext? context = _ctx;
}
class PepSearchRecord implements IConvertible
{
int? id;
String? searchType;
DateTime? dateSearched;
DateTime? dateUpdated;
DateTime? dateRenewal;
DateTime? dateArchived;
bool? isArchived;
int? numOfResults;
bool? clientInResults;
bool? clientNotInResults;
bool? affectedByUpdate;
bool? isDayOneSearch;
SearchCriteria? searchCriteria;
PepSearchResults? searchResults;
PepSearchRecord({this.id,this.searchType,this.dateSearched,this.dateUpdated,this.dateRenewal,this.dateArchived,this.isArchived,this.numOfResults,this.clientInResults,this.clientNotInResults,this.affectedByUpdate,this.isDayOneSearch,this.searchCriteria,this.searchResults});
PepSearchRecord.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
searchType = json['searchType'];
dateSearched = JsonConverters.fromJson(json['dateSearched'],'DateTime',context!);
dateUpdated = JsonConverters.fromJson(json['dateUpdated'],'DateTime',context!);
dateRenewal = JsonConverters.fromJson(json['dateRenewal'],'DateTime',context!);
dateArchived = JsonConverters.fromJson(json['dateArchived'],'DateTime',context!);
isArchived = json['isArchived'];
numOfResults = json['numOfResults'];
clientInResults = json['clientInResults'];
clientNotInResults = json['clientNotInResults'];
affectedByUpdate = json['affectedByUpdate'];
isDayOneSearch = json['isDayOneSearch'];
searchCriteria = JsonConverters.fromJson(json['searchCriteria'],'SearchCriteria',context!);
searchResults = JsonConverters.fromJson(json['searchResults'],'PepSearchResults',context!);
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'searchType': searchType,
'dateSearched': JsonConverters.toJson(dateSearched,'DateTime',context!),
'dateUpdated': JsonConverters.toJson(dateUpdated,'DateTime',context!),
'dateRenewal': JsonConverters.toJson(dateRenewal,'DateTime',context!),
'dateArchived': JsonConverters.toJson(dateArchived,'DateTime',context!),
'isArchived': isArchived,
'numOfResults': numOfResults,
'clientInResults': clientInResults,
'clientNotInResults': clientNotInResults,
'affectedByUpdate': affectedByUpdate,
'isDayOneSearch': isDayOneSearch,
'searchCriteria': JsonConverters.toJson(searchCriteria,'SearchCriteria',context!),
'searchResults': JsonConverters.toJson(searchResults,'PepSearchResults',context!)
};
getTypeName() => "PepSearchRecord";
TypeContext? context = _ctx;
}
class GetPepSearchData extends BaseResponse implements IBaseSearchResponse, IConvertible
{
ArrayOfLinkedTo? linkedTo;
PepSearchRecord? searchRecord;
GetPepSearchData({this.linkedTo,this.searchRecord});
GetPepSearchData.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
linkedTo = JsonConverters.fromJson(json['linkedTo'],'ArrayOfLinkedTo',context!);
searchRecord = JsonConverters.fromJson(json['searchRecord'],'PepSearchRecord',context!);
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'linkedTo': JsonConverters.toJson(linkedTo,'ArrayOfLinkedTo',context!),
'searchRecord': JsonConverters.toJson(searchRecord,'PepSearchRecord',context!)
});
getTypeName() => "GetPepSearchData";
TypeContext? context = _ctx;
}
// @DataContract
class GetPepSearchResponse implements IConvertible
{
// @DataMember
GetPepSearchData? data;
GetPepSearchResponse({this.data});
GetPepSearchResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
data = JsonConverters.fromJson(json['data'],'GetPepSearchData',context!);
return this;
}
Map<String, dynamic> toJson() => {
'data': JsonConverters.toJson(data,'GetPepSearchData',context!)
};
getTypeName() => "GetPepSearchResponse";
TypeContext? context = _ctx;
}
class GetPepSearchRequest implements IConvertible
{
/**
* If the search was created against a single Sub User account, specify their username here
*/
// @ApiMember(Description="If the search was created against a single Sub User account, specify their username here")
String? subUserName;
/**
* If set to true, the response will exclude resolved search results, it will only include unresolved results
*/
// @ApiMember(Description="If set to true, the response will exclude resolved search results, it will only include unresolved results")
bool? onlyShowUnresolvedResults;
int? id;
GetPepSearchRequest({this.subUserName,this.onlyShowUnresolvedResults,this.id});
GetPepSearchRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
subUserName = json['subUserName'];
onlyShowUnresolvedResults = json['onlyShowUnresolvedResults'];
id = json['id'];
return this;
}
Map<String, dynamic> toJson() => {
'subUserName': subUserName,
'onlyShowUnresolvedResults': onlyShowUnresolvedResults,
'id': id
};
getTypeName() => "GetPepSearchRequest";
TypeContext? context = _ctx;
}
// @DataContract
class GetPepSearch extends BaseRequest implements IConvertible
{
// @DataMember
GetPepSearchRequest? request;
GetPepSearch({this.request});
GetPepSearch.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
request = JsonConverters.fromJson(json['request'],'GetPepSearchRequest',context!);
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'request': JsonConverters.toJson(request,'GetPepSearchRequest',context!)
});
getTypeName() => "GetPepSearch";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.sanctionssearch.com', types: <String, TypeInfo> {
'Authentication': TypeInfo(TypeOf.Class, create:() => Authentication()),
'BaseRequest': TypeInfo(TypeOf.Class, create:() => BaseRequest()),
'ArrayOfResponseError': TypeInfo(TypeOf.Class, create:() => ArrayOfResponseError()),
'BaseResponse': TypeInfo(TypeOf.Class, create:() => BaseResponse()),
'LinkedTo': TypeInfo(TypeOf.Class, create:() => LinkedTo()),
'ArrayOfLinkedTo': TypeInfo(TypeOf.Class, create:() => ArrayOfLinkedTo()),
'SearchCriteria': TypeInfo(TypeOf.Class, create:() => SearchCriteria()),
'PepSearchResultAddress': TypeInfo(TypeOf.Class, create:() => PepSearchResultAddress()),
'PepSearchResultAlias': TypeInfo(TypeOf.Class, create:() => PepSearchResultAlias()),
'PepSearchResultArticleSnippet': TypeInfo(TypeOf.Class, create:() => PepSearchResultArticleSnippet()),
'PepSearchResultArticle': TypeInfo(TypeOf.Class, create:() => PepSearchResultArticle()),
'List<PepSearchResultArticleSnippet>': TypeInfo(TypeOf.Class, create:() => <PepSearchResultArticleSnippet>[]),
'PepSearchResultIndividualAssociation': TypeInfo(TypeOf.Class, create:() => PepSearchResultIndividualAssociation()),
'PepSearchResultBusinessAssociation': TypeInfo(TypeOf.Class, create:() => PepSearchResultBusinessAssociation()),
'PepSearchResultNote': TypeInfo(TypeOf.Class, create:() => PepSearchResultNote()),
'PepSearchResultPoliticalPosition': TypeInfo(TypeOf.Class, create:() => PepSearchResultPoliticalPosition()),
'PepSearchResult': TypeInfo(TypeOf.Class, create:() => PepSearchResult()),
'List<PepSearchResultAddress>': TypeInfo(TypeOf.Class, create:() => <PepSearchResultAddress>[]),
'List<PepSearchResultAlias>': TypeInfo(TypeOf.Class, create:() => <PepSearchResultAlias>[]),
'List<PepSearchResultArticle>': TypeInfo(TypeOf.Class, create:() => <PepSearchResultArticle>[]),
'List<PepSearchResultIndividualAssociation>': TypeInfo(TypeOf.Class, create:() => <PepSearchResultIndividualAssociation>[]),
'List<PepSearchResultBusinessAssociation>': TypeInfo(TypeOf.Class, create:() => <PepSearchResultBusinessAssociation>[]),
'List<PepSearchResultNote>': TypeInfo(TypeOf.Class, create:() => <PepSearchResultNote>[]),
'List<PepSearchResultPoliticalPosition>': TypeInfo(TypeOf.Class, create:() => <PepSearchResultPoliticalPosition>[]),
'PepSearchResults': TypeInfo(TypeOf.Class, create:() => PepSearchResults()),
'List<PepSearchResult>': TypeInfo(TypeOf.Class, create:() => <PepSearchResult>[]),
'PepSearchRecord': TypeInfo(TypeOf.Class, create:() => PepSearchRecord()),
'GetPepSearchData': TypeInfo(TypeOf.Class, create:() => GetPepSearchData()),
'GetPepSearchResponse': TypeInfo(TypeOf.Class, create:() => GetPepSearchResponse()),
'GetPepSearchRequest': TypeInfo(TypeOf.Class, create:() => GetPepSearchRequest()),
'GetPepSearch': TypeInfo(TypeOf.Class, create:() => GetPepSearch()),
});
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 /peps/get HTTP/1.1
Host: api.sanctionssearch.com
Accept: application/json
Content-Type: application/json
Content-Length: length
{"request":{"subUserName":"String","onlyShowUnresolvedResults":false,"id":0},"authentication":{"apiUserId":"String","apiUserKey":"String"}}
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"data":{"linkedTo":[{"clientId":0,"id":0,"type":"String","subtype":"String","status":"String","description":"String","isArchived":false,"name":"String","date":"\/Date(-62135596800000-0000)\/"}],"searchRecord":{"id":0,"searchType":"String","dateSearched":"\/Date(-62135596800000-0000)\/","dateUpdated":"\/Date(-62135596800000-0000)\/","dateRenewal":"\/Date(-62135596800000-0000)\/","dateArchived":"\/Date(-62135596800000-0000)\/","isArchived":false,"numOfResults":0,"clientInResults":false,"clientNotInResults":false,"affectedByUpdate":false,"isDayOneSearch":false,"searchCriteria":{"name":"String","address":"String","country":"String","dateOfBirth":"String","nationality":"String","reference":"String"},"searchResults":{"results":[{"resultSimilarity":0,"resultResolved":false,"dateLastUpdated":"\/Date(-62135596800000-0000)\/","resultIsClient":false,"id":0,"type":"String","title":"String","forename":"String","middlename":"String","surname":"String","softDelete":false,"dateOfSoftDelete":"\/Date(-62135596800000-0000)\/","dateOfCapture":"\/Date(-62135596800000-0000)\/","dateOfBirth":"\/Date(-62135596800000-0000)\/","dateOfDeath":"\/Date(-62135596800000-0000)\/","yearOfBirth":0,"yearOfDeath":0,"gender":"String","homeTelephone":"String","businessTelephone":"String","mobileTelephone":"String","fax":"String","email":"String","nationality":"String","source":"String","category":"String","picture":"String","alternateTitle":"String","businessName":"String","description":"String","telephone":"String","website":"String","pepTier":0,"addresses":[{"addressLine1":"String","addressLine2":"String","addressLine3":"String","addressLine4":"String","town":"String","county":"String","postCode":"String","country":"String","isoCountry":"String","softDelete":false,"dateLastUpdated":"\/Date(-62135596800000-0000)\/"}],"aliases":[{"forename":"String","middleName":"String","surname":"String","softDelete":false,"dateOfSoftDelete":"\/Date(-62135596800000-0000)\/","dateLastUpdated":"\/Date(-62135596800000-0000)\/","title":"String","alternateTitle":"String","businessName":"String"}],"articles":[{"url":"String","originalUrl":"String","source":"String","dateOfCapture":"\/Date(-62135596800000-0000)\/","dateLastUpdated":"\/Date(-62135596800000-0000)\/","snippets":[{"title":"String","text":"String","adverseTerms":"String"}]}],"associations":[{"linkDescription":"String","softDelete":false,"dateLastUpdated":"\/Date(-62135596800000-0000)\/","fullName":"String"}],"businessAssociations":[{"linkDescription":"String","softDelete":false,"dateLastUpdated":"\/Date(-62135596800000-0000)\/","businessName":"String"}],"notes":[{"source":"String","notes":"String","softDelete":false,"dateLastUpdated":"\/Date(-62135596800000-0000)\/"}],"politicalPositions":[{"description":"String","from":"String","to":"String","country":"String","softDelete":false,"dateLastUpdated":"\/Date(-62135596800000-0000)\/"}]}]}},"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}}