Create a new sanctions search for an entity | This will create a new sanctions search for an entity, such as a company, vessel, organisation, or group. |
<?php namespace dtos;
use DateTime;
use Exception;
use DateInterval;
use JsonSerializable;
use ServiceStack\{IReturn,IReturnVoid,IGet,IPost,IPut,IDelete,IPatch,IMeta,IHasSessionId,IHasBearerToken,IHasVersion};
use ServiceStack\{ICrud,ICreateDb,IUpdateDb,IPatchDb,IDeleteDb,ISaveDb,AuditBase,QueryDb,QueryDb2,QueryData,QueryData2,QueryResponse};
use ServiceStack\{ResponseStatus,ResponseError,EmptyResponse,IdResponse,ArrayList,KeyValuePair2,StringResponse,StringsResponse,Tuple2,Tuple3,ByteArray};
use ServiceStack\{JsonConverters,Returns,TypeContext};
// @DataContract
class ResponseError implements JsonSerializable
{
public function __construct(
// @DataMember(Order=1)
/** @var string|null */
public ?string $ErrorCode=null,
// @DataMember(Order=2)
/** @var string|null */
public ?string $FieldName=null,
// @DataMember(Order=3)
/** @var string|null */
public ?string $Message=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ErrorCode'])) $this->ErrorCode = $o['ErrorCode'];
if (isset($o['FieldName'])) $this->FieldName = $o['FieldName'];
if (isset($o['Message'])) $this->Message = $o['Message'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ErrorCode)) $o['ErrorCode'] = $this->ErrorCode;
if (isset($this->FieldName)) $o['FieldName'] = $this->FieldName;
if (isset($this->Message)) $o['Message'] = $this->Message;
return empty($o) ? new class(){} : $o;
}
}
/**
* @template array of ResponseError
*/
class ArrayOfResponseError extends \ArrayObject implements JsonSerializable
{
public function __construct(ResponseError ...$items) {
parent::__construct($items, \ArrayObject::STD_PROP_LIST);
}
/** @throws \Exception */
public function append($value): void {
if ($value instanceof ResponseError)
parent::append($value);
else
throw new \Exception("Can only append a ResponseError to " . __CLASS__);
}
/** @throws Exception */
public function fromMap($o): void {
foreach ($o as $item) {
$el = new ResponseError();
$el->fromMap($item);
$this->append($el);
}
}
/** @throws Exception */
public function jsonSerialize(): array {
return parent::getArrayCopy();
}
}
// @DataContract
class ResponseStatus implements JsonSerializable
{
public function __construct(
// @DataMember(Order=1)
/** @var string|null */
public ?string $ErrorCode=null,
// @DataMember(Order=2)
/** @var string|null */
public ?string $Message=null,
// @DataMember(Order=3)
/** @var string|null */
public ?string $StackTrace=null,
// @DataMember(Order=4)
/** @var ArrayOfResponseError|null */
public ?ArrayOfResponseError $Errors=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ErrorCode'])) $this->ErrorCode = $o['ErrorCode'];
if (isset($o['Message'])) $this->Message = $o['Message'];
if (isset($o['StackTrace'])) $this->StackTrace = $o['StackTrace'];
if (isset($o['Errors'])) $this->Errors = JsonConverters::from('ArrayOfResponseError', $o['Errors']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ErrorCode)) $o['ErrorCode'] = $this->ErrorCode;
if (isset($this->Message)) $o['Message'] = $this->Message;
if (isset($this->StackTrace)) $o['StackTrace'] = $this->StackTrace;
if (isset($this->Errors)) $o['Errors'] = JsonConverters::to('ArrayOfResponseError', $this->Errors);
return empty($o) ? new class(){} : $o;
}
}
class SearchCriteria implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $Name=null,
/** @var string|null */
public ?string $DateOfBirth=null,
/** @var string|null */
public ?string $CountryOfBirth=null,
/** @var string|null */
public ?string $Nationality=null,
/** @var string|null */
public ?string $Address=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['DateOfBirth'])) $this->DateOfBirth = $o['DateOfBirth'];
if (isset($o['CountryOfBirth'])) $this->CountryOfBirth = $o['CountryOfBirth'];
if (isset($o['Nationality'])) $this->Nationality = $o['Nationality'];
if (isset($o['Address'])) $this->Address = $o['Address'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->DateOfBirth)) $o['DateOfBirth'] = $this->DateOfBirth;
if (isset($this->CountryOfBirth)) $o['CountryOfBirth'] = $this->CountryOfBirth;
if (isset($this->Nationality)) $o['Nationality'] = $this->Nationality;
if (isset($this->Address)) $o['Address'] = $this->Address;
return empty($o) ? new class(){} : $o;
}
}
class SearchResultHmTreasury implements JsonSerializable
{
public function __construct(
/** @var int */
public int $ResultStrength=0,
/** @var float */
public float $ResultSimilarity=0.0,
/** @var bool|null */
public ?bool $ResultResolved=null,
/** @var string|null */
public ?string $ResultType=null,
/** @var DateTime */
public DateTime $DateListed=new DateTime(),
/** @var DateTime */
public DateTime $DateUpdated=new DateTime(),
/** @var string|null */
public ?string $Name1=null,
/** @var string|null */
public ?string $Name2=null,
/** @var string|null */
public ?string $Name3=null,
/** @var string|null */
public ?string $Name4=null,
/** @var string|null */
public ?string $Name5=null,
/** @var string|null */
public ?string $Name6=null,
/** @var string|null */
public ?string $DateOfBirth=null,
/** @var string|null */
public ?string $CountryOfBirth=null,
/** @var string|null */
public ?string $Nationality=null,
/** @var string|null */
public ?string $Address1=null,
/** @var string|null */
public ?string $Address2=null,
/** @var string|null */
public ?string $Address3=null,
/** @var string|null */
public ?string $Address4=null,
/** @var string|null */
public ?string $Address5=null,
/** @var string|null */
public ?string $Address6=null,
/** @var string|null */
public ?string $PostCode=null,
/** @var string|null */
public ?string $Country=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ResultStrength'])) $this->ResultStrength = $o['ResultStrength'];
if (isset($o['ResultSimilarity'])) $this->ResultSimilarity = $o['ResultSimilarity'];
if (isset($o['ResultResolved'])) $this->ResultResolved = $o['ResultResolved'];
if (isset($o['ResultType'])) $this->ResultType = $o['ResultType'];
if (isset($o['DateListed'])) $this->DateListed = JsonConverters::from('DateTime', $o['DateListed']);
if (isset($o['DateUpdated'])) $this->DateUpdated = JsonConverters::from('DateTime', $o['DateUpdated']);
if (isset($o['Name1'])) $this->Name1 = $o['Name1'];
if (isset($o['Name2'])) $this->Name2 = $o['Name2'];
if (isset($o['Name3'])) $this->Name3 = $o['Name3'];
if (isset($o['Name4'])) $this->Name4 = $o['Name4'];
if (isset($o['Name5'])) $this->Name5 = $o['Name5'];
if (isset($o['Name6'])) $this->Name6 = $o['Name6'];
if (isset($o['DateOfBirth'])) $this->DateOfBirth = $o['DateOfBirth'];
if (isset($o['CountryOfBirth'])) $this->CountryOfBirth = $o['CountryOfBirth'];
if (isset($o['Nationality'])) $this->Nationality = $o['Nationality'];
if (isset($o['Address1'])) $this->Address1 = $o['Address1'];
if (isset($o['Address2'])) $this->Address2 = $o['Address2'];
if (isset($o['Address3'])) $this->Address3 = $o['Address3'];
if (isset($o['Address4'])) $this->Address4 = $o['Address4'];
if (isset($o['Address5'])) $this->Address5 = $o['Address5'];
if (isset($o['Address6'])) $this->Address6 = $o['Address6'];
if (isset($o['PostCode'])) $this->PostCode = $o['PostCode'];
if (isset($o['Country'])) $this->Country = $o['Country'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ResultStrength)) $o['ResultStrength'] = $this->ResultStrength;
if (isset($this->ResultSimilarity)) $o['ResultSimilarity'] = $this->ResultSimilarity;
if (isset($this->ResultResolved)) $o['ResultResolved'] = $this->ResultResolved;
if (isset($this->ResultType)) $o['ResultType'] = $this->ResultType;
if (isset($this->DateListed)) $o['DateListed'] = JsonConverters::to('DateTime', $this->DateListed);
if (isset($this->DateUpdated)) $o['DateUpdated'] = JsonConverters::to('DateTime', $this->DateUpdated);
if (isset($this->Name1)) $o['Name1'] = $this->Name1;
if (isset($this->Name2)) $o['Name2'] = $this->Name2;
if (isset($this->Name3)) $o['Name3'] = $this->Name3;
if (isset($this->Name4)) $o['Name4'] = $this->Name4;
if (isset($this->Name5)) $o['Name5'] = $this->Name5;
if (isset($this->Name6)) $o['Name6'] = $this->Name6;
if (isset($this->DateOfBirth)) $o['DateOfBirth'] = $this->DateOfBirth;
if (isset($this->CountryOfBirth)) $o['CountryOfBirth'] = $this->CountryOfBirth;
if (isset($this->Nationality)) $o['Nationality'] = $this->Nationality;
if (isset($this->Address1)) $o['Address1'] = $this->Address1;
if (isset($this->Address2)) $o['Address2'] = $this->Address2;
if (isset($this->Address3)) $o['Address3'] = $this->Address3;
if (isset($this->Address4)) $o['Address4'] = $this->Address4;
if (isset($this->Address5)) $o['Address5'] = $this->Address5;
if (isset($this->Address6)) $o['Address6'] = $this->Address6;
if (isset($this->PostCode)) $o['PostCode'] = $this->PostCode;
if (isset($this->Country)) $o['Country'] = $this->Country;
return empty($o) ? new class(){} : $o;
}
}
class SearchResultOfacAddress implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $Address1=null,
/** @var string|null */
public ?string $Address2=null,
/** @var string|null */
public ?string $Address3=null,
/** @var string|null */
public ?string $City=null,
/** @var string|null */
public ?string $State=null,
/** @var string|null */
public ?string $PostCode=null,
/** @var string|null */
public ?string $Country=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Address1'])) $this->Address1 = $o['Address1'];
if (isset($o['Address2'])) $this->Address2 = $o['Address2'];
if (isset($o['Address3'])) $this->Address3 = $o['Address3'];
if (isset($o['City'])) $this->City = $o['City'];
if (isset($o['State'])) $this->State = $o['State'];
if (isset($o['PostCode'])) $this->PostCode = $o['PostCode'];
if (isset($o['Country'])) $this->Country = $o['Country'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Address1)) $o['Address1'] = $this->Address1;
if (isset($this->Address2)) $o['Address2'] = $this->Address2;
if (isset($this->Address3)) $o['Address3'] = $this->Address3;
if (isset($this->City)) $o['City'] = $this->City;
if (isset($this->State)) $o['State'] = $this->State;
if (isset($this->PostCode)) $o['PostCode'] = $this->PostCode;
if (isset($this->Country)) $o['Country'] = $this->Country;
return empty($o) ? new class(){} : $o;
}
}
class SearchResultOfacAka implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $FirstName=null,
/** @var string|null */
public ?string $LastName=null,
/** @var string|null */
public ?string $Type=null,
/** @var string|null */
public ?string $Strength=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['FirstName'])) $this->FirstName = $o['FirstName'];
if (isset($o['LastName'])) $this->LastName = $o['LastName'];
if (isset($o['Type'])) $this->Type = $o['Type'];
if (isset($o['Strength'])) $this->Strength = $o['Strength'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->FirstName)) $o['FirstName'] = $this->FirstName;
if (isset($this->LastName)) $o['LastName'] = $this->LastName;
if (isset($this->Type)) $o['Type'] = $this->Type;
if (isset($this->Strength)) $o['Strength'] = $this->Strength;
return empty($o) ? new class(){} : $o;
}
}
class SearchResultOfacDateOfBirth implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $DateOfBirth=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['DateOfBirth'])) $this->DateOfBirth = $o['DateOfBirth'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->DateOfBirth)) $o['DateOfBirth'] = $this->DateOfBirth;
return empty($o) ? new class(){} : $o;
}
}
class SearchResultOfacNationality implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $Country=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Country'])) $this->Country = $o['Country'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Country)) $o['Country'] = $this->Country;
return empty($o) ? new class(){} : $o;
}
}
class SearchResultOfacPlaceOfBirth implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $PlaceOfBirth=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['PlaceOfBirth'])) $this->PlaceOfBirth = $o['PlaceOfBirth'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->PlaceOfBirth)) $o['PlaceOfBirth'] = $this->PlaceOfBirth;
return empty($o) ? new class(){} : $o;
}
}
class SearchResultOfac implements JsonSerializable
{
public function __construct(
/** @var int */
public int $ResultStrength=0,
/** @var float */
public float $ResultSimilarity=0.0,
/** @var bool|null */
public ?bool $ResultResolved=null,
/** @var string|null */
public ?string $ResultType=null,
/** @var DateTime */
public DateTime $DateUpdated=new DateTime(),
/** @var string|null */
public ?string $FirstName=null,
/** @var string|null */
public ?string $LastName=null,
/** @var array<SearchResultOfacAddress>|null */
public ?array $Addresses=null,
/** @var array<SearchResultOfacAka>|null */
public ?array $Akas=null,
/** @var array<SearchResultOfacDateOfBirth>|null */
public ?array $DateOfBirths=null,
/** @var array<SearchResultOfacNationality>|null */
public ?array $Nationalities=null,
/** @var array<SearchResultOfacPlaceOfBirth>|null */
public ?array $PlaceOfBirths=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ResultStrength'])) $this->ResultStrength = $o['ResultStrength'];
if (isset($o['ResultSimilarity'])) $this->ResultSimilarity = $o['ResultSimilarity'];
if (isset($o['ResultResolved'])) $this->ResultResolved = $o['ResultResolved'];
if (isset($o['ResultType'])) $this->ResultType = $o['ResultType'];
if (isset($o['DateUpdated'])) $this->DateUpdated = JsonConverters::from('DateTime', $o['DateUpdated']);
if (isset($o['FirstName'])) $this->FirstName = $o['FirstName'];
if (isset($o['LastName'])) $this->LastName = $o['LastName'];
if (isset($o['Addresses'])) $this->Addresses = JsonConverters::fromArray('SearchResultOfacAddress', $o['Addresses']);
if (isset($o['Akas'])) $this->Akas = JsonConverters::fromArray('SearchResultOfacAka', $o['Akas']);
if (isset($o['DateOfBirths'])) $this->DateOfBirths = JsonConverters::fromArray('SearchResultOfacDateOfBirth', $o['DateOfBirths']);
if (isset($o['Nationalities'])) $this->Nationalities = JsonConverters::fromArray('SearchResultOfacNationality', $o['Nationalities']);
if (isset($o['PlaceOfBirths'])) $this->PlaceOfBirths = JsonConverters::fromArray('SearchResultOfacPlaceOfBirth', $o['PlaceOfBirths']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ResultStrength)) $o['ResultStrength'] = $this->ResultStrength;
if (isset($this->ResultSimilarity)) $o['ResultSimilarity'] = $this->ResultSimilarity;
if (isset($this->ResultResolved)) $o['ResultResolved'] = $this->ResultResolved;
if (isset($this->ResultType)) $o['ResultType'] = $this->ResultType;
if (isset($this->DateUpdated)) $o['DateUpdated'] = JsonConverters::to('DateTime', $this->DateUpdated);
if (isset($this->FirstName)) $o['FirstName'] = $this->FirstName;
if (isset($this->LastName)) $o['LastName'] = $this->LastName;
if (isset($this->Addresses)) $o['Addresses'] = JsonConverters::toArray('SearchResultOfacAddress', $this->Addresses);
if (isset($this->Akas)) $o['Akas'] = JsonConverters::toArray('SearchResultOfacAka', $this->Akas);
if (isset($this->DateOfBirths)) $o['DateOfBirths'] = JsonConverters::toArray('SearchResultOfacDateOfBirth', $this->DateOfBirths);
if (isset($this->Nationalities)) $o['Nationalities'] = JsonConverters::toArray('SearchResultOfacNationality', $this->Nationalities);
if (isset($this->PlaceOfBirths)) $o['PlaceOfBirths'] = JsonConverters::toArray('SearchResultOfacPlaceOfBirth', $this->PlaceOfBirths);
return empty($o) ? new class(){} : $o;
}
}
class SearchResults implements JsonSerializable
{
public function __construct(
/** @var array<SearchResultHmTreasury>|null */
public ?array $HMTResults=null,
/** @var array<SearchResultOfac>|null */
public ?array $OfacResults=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['HMTResults'])) $this->HMTResults = JsonConverters::fromArray('SearchResultHmTreasury', $o['HMTResults']);
if (isset($o['OfacResults'])) $this->OfacResults = JsonConverters::fromArray('SearchResultOfac', $o['OfacResults']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->HMTResults)) $o['HMTResults'] = JsonConverters::toArray('SearchResultHmTreasury', $this->HMTResults);
if (isset($this->OfacResults)) $o['OfacResults'] = JsonConverters::toArray('SearchResultOfac', $this->OfacResults);
return empty($o) ? new class(){} : $o;
}
}
class SearchRecord implements JsonSerializable
{
public function __construct(
/** @var int */
public int $Id=0,
/** @var string|null */
public ?string $SearchType=null,
/** @var DateTime */
public DateTime $DateSearched=new DateTime(),
/** @var DateTime */
public DateTime $DateUpdated=new DateTime(),
/** @var int */
public int $NumOfResults=0,
/** @var bool|null */
public ?bool $ClientInResults=null,
/** @var bool|null */
public ?bool $ClientNotInResults=null,
/** @var bool|null */
public ?bool $AffectedByUpdate=null,
/** @var SearchCriteria|null */
public ?SearchCriteria $SearchCriteria=null,
/** @var SearchResults|null */
public ?SearchResults $SearchResults=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Id'])) $this->Id = $o['Id'];
if (isset($o['SearchType'])) $this->SearchType = $o['SearchType'];
if (isset($o['DateSearched'])) $this->DateSearched = JsonConverters::from('DateTime', $o['DateSearched']);
if (isset($o['DateUpdated'])) $this->DateUpdated = JsonConverters::from('DateTime', $o['DateUpdated']);
if (isset($o['NumOfResults'])) $this->NumOfResults = $o['NumOfResults'];
if (isset($o['ClientInResults'])) $this->ClientInResults = $o['ClientInResults'];
if (isset($o['ClientNotInResults'])) $this->ClientNotInResults = $o['ClientNotInResults'];
if (isset($o['AffectedByUpdate'])) $this->AffectedByUpdate = $o['AffectedByUpdate'];
if (isset($o['SearchCriteria'])) $this->SearchCriteria = JsonConverters::from('SearchCriteria', $o['SearchCriteria']);
if (isset($o['SearchResults'])) $this->SearchResults = JsonConverters::from('SearchResults', $o['SearchResults']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Id)) $o['Id'] = $this->Id;
if (isset($this->SearchType)) $o['SearchType'] = $this->SearchType;
if (isset($this->DateSearched)) $o['DateSearched'] = JsonConverters::to('DateTime', $this->DateSearched);
if (isset($this->DateUpdated)) $o['DateUpdated'] = JsonConverters::to('DateTime', $this->DateUpdated);
if (isset($this->NumOfResults)) $o['NumOfResults'] = $this->NumOfResults;
if (isset($this->ClientInResults)) $o['ClientInResults'] = $this->ClientInResults;
if (isset($this->ClientNotInResults)) $o['ClientNotInResults'] = $this->ClientNotInResults;
if (isset($this->AffectedByUpdate)) $o['AffectedByUpdate'] = $this->AffectedByUpdate;
if (isset($this->SearchCriteria)) $o['SearchCriteria'] = JsonConverters::to('SearchCriteria', $this->SearchCriteria);
if (isset($this->SearchResults)) $o['SearchResults'] = JsonConverters::to('SearchResults', $this->SearchResults);
return empty($o) ? new class(){} : $o;
}
}
// @DataContract
class AddCompanySearchData implements IBaseDataResponse, IHasResponseStatus, JsonSerializable
{
public function __construct(
// @DataMember
/** @var ResponseStatus|null */
public ?ResponseStatus $ResponseStatus=null,
// @DataMember
/** @var SearchRecord|null */
public ?SearchRecord $SearchRecord=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ResponseStatus'])) $this->ResponseStatus = JsonConverters::from('ResponseStatus', $o['ResponseStatus']);
if (isset($o['SearchRecord'])) $this->SearchRecord = JsonConverters::from('SearchRecord', $o['SearchRecord']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ResponseStatus)) $o['ResponseStatus'] = JsonConverters::to('ResponseStatus', $this->ResponseStatus);
if (isset($this->SearchRecord)) $o['SearchRecord'] = JsonConverters::to('SearchRecord', $this->SearchRecord);
return empty($o) ? new class(){} : $o;
}
}
// @DataContract
class AddCompanySearchResponse implements JsonSerializable
{
public function __construct(
// @DataMember
// @ApiMember(IsRequired=true)
/** @var AddCompanySearchData|null */
public ?AddCompanySearchData $Data=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Data'])) $this->Data = JsonConverters::from('AddCompanySearchData', $o['Data']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Data)) $o['Data'] = JsonConverters::to('AddCompanySearchData', $this->Data);
return empty($o) ? new class(){} : $o;
}
}
// @DataContract
class Authentication implements IAuthentication, JsonSerializable
{
public function __construct(
/** @description The API User ID that will authenticate your request */
// @DataMember
// @ApiMember(DataType="string", Description="The API User ID that will authenticate your request", IsRequired=true)
/** @var string */
public string $ApiUserId='',
/** @description The API User Key that will authenticate your request */
// @DataMember
// @ApiMember(DataType="string", Description="The API User Key that will authenticate your request", IsRequired=true)
/** @var string */
public string $ApiUserKey=''
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ApiUserId'])) $this->ApiUserId = $o['ApiUserId'];
if (isset($o['ApiUserKey'])) $this->ApiUserKey = $o['ApiUserKey'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ApiUserId)) $o['ApiUserId'] = $this->ApiUserId;
if (isset($this->ApiUserKey)) $o['ApiUserKey'] = $this->ApiUserKey;
return empty($o) ? new class(){} : $o;
}
}
/**
* @template array of String
*/
class ArrayOfSanctionsLists extends \ArrayObject implements JsonSerializable
{
public function __construct(String ...$items) {
parent::__construct($items, \ArrayObject::STD_PROP_LIST);
}
/** @throws \Exception */
public function append($value): void {
if ($value instanceof String)
parent::append($value);
else
throw new \Exception("Can only append a String to " . __CLASS__);
}
/** @throws Exception */
public function fromMap($o): void {
foreach ($o as $item) {
$el = new String();
$el->fromMap($item);
$this->append($el);
}
}
/** @throws Exception */
public function jsonSerialize(): array {
return parent::getArrayCopy();
}
}
class SearchCompanyRequest implements JsonSerializable
{
public function __construct(
/** @description The name of the entity that is being searched. */
// @ApiMember(DataType="string", Description="The name of the entity that is being searched.", IsRequired=true)
/** @var string */
public string $CompanyName='',
/** @description The country where the entity is registered. */
// @ApiMember(DataType="string", Description="The country where the entity is registered.", Format="int64")
/** @var string|null */
public ?string $Country=null,
/** @description The address where the entity is registered. */
// @ApiMember(DataType="string", Description="The address where the entity is registered.")
/** @var string|null */
public ?string $Address=null,
/** @description Array of sanctions lists to be included in the search. At least one is required. */
// @ApiMember(DataType="ArrayOfSanctionsLists", Description="Array of sanctions lists to be included in the search. At least one is required.", IsRequired=true)
/** @var ArrayOfSanctionsLists|null */
public ?ArrayOfSanctionsLists $SelectedSanctionsLists=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['CompanyName'])) $this->CompanyName = $o['CompanyName'];
if (isset($o['Country'])) $this->Country = $o['Country'];
if (isset($o['Address'])) $this->Address = $o['Address'];
if (isset($o['SelectedSanctionsLists'])) $this->SelectedSanctionsLists = JsonConverters::from('ArrayOfSanctionsLists', $o['SelectedSanctionsLists']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->CompanyName)) $o['CompanyName'] = $this->CompanyName;
if (isset($this->Country)) $o['Country'] = $this->Country;
if (isset($this->Address)) $o['Address'] = $this->Address;
if (isset($this->SelectedSanctionsLists)) $o['SelectedSanctionsLists'] = JsonConverters::to('ArrayOfSanctionsLists', $this->SelectedSanctionsLists);
return empty($o) ? new class(){} : $o;
}
}
/** @description Create a new sanctions search for an entity */
// @Api(Description="Create a new sanctions search for an entity")
// @ApiResponse(Description="Your request is successful if the \"<em>Data.ResponseStatus.Message</em>\" field is \"<b>Success</b>\".", StatusCode=200)
// @DataContract
class AddCompanySearch implements IBaseRequest, JsonSerializable
{
public function __construct(
/** @description Authentication object */
// @DataMember
// @ApiMember(DataType="Authentication", Description="Authentication object", IsRequired=true)
/** @var Authentication|null */
public ?Authentication $Authentication=null,
/** @description Request object */
// @DataMember
// @ApiMember(DataType="SearchCompanyRequest", Description="Request object", IsRequired=true)
/** @var SearchCompanyRequest|null */
public ?SearchCompanyRequest $Request=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Authentication'])) $this->Authentication = JsonConverters::from('Authentication', $o['Authentication']);
if (isset($o['Request'])) $this->Request = JsonConverters::from('SearchCompanyRequest', $o['Request']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Authentication)) $o['Authentication'] = JsonConverters::to('Authentication', $this->Authentication);
if (isset($this->Request)) $o['Request'] = JsonConverters::to('SearchCompanyRequest', $this->Request);
return empty($o) ? new class(){} : $o;
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .soap11 suffix or ?format=soap11
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /soap11 HTTP/1.1
Host: api.sanctionssearch.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: AddCompanySearch
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<AddCompanySearch xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.servicestack.net/types">
<Authentication>
<ApiUserId>String</ApiUserId>
<ApiUserKey>String</ApiUserKey>
</Authentication>
<Request>
<Address>String</Address>
<CompanyName>String</CompanyName>
<Country>String</Country>
<SelectedSanctionsLists>
<SanctionsListId>String</SanctionsListId>
</SelectedSanctionsLists>
</Request>
</AddCompanySearch>
</soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <AddCompanySearchResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.servicestack.net/types"> <Data> <ResponseStatus> <ErrorCode>String</ErrorCode> <Message>String</Message> <StackTrace>String</StackTrace> <Errors> <ResponseError> <ErrorCode>String</ErrorCode> <FieldName>String</FieldName> <Message>String</Message> </ResponseError> </Errors> </ResponseStatus> <SearchRecord> <AffectedByUpdate>false</AffectedByUpdate> <ClientInResults>false</ClientInResults> <ClientNotInResults>false</ClientNotInResults> <DateSearched>0001-01-01T00:00:00</DateSearched> <DateUpdated>0001-01-01T00:00:00</DateUpdated> <Id>0</Id> <NumOfResults>0</NumOfResults> <SearchCriteria> <Address>String</Address> <CountryOfBirth>String</CountryOfBirth> <DateOfBirth>String</DateOfBirth> <Name>String</Name> <Nationality>String</Nationality> </SearchCriteria> <SearchResults> <HMTResults> <SearchResultHmTreasury> <Address1>String</Address1> <Address2>String</Address2> <Address3>String</Address3> <Address4>String</Address4> <Address5>String</Address5> <Address6>String</Address6> <Country>String</Country> <CountryOfBirth>String</CountryOfBirth> <DateListed>0001-01-01T00:00:00</DateListed> <DateOfBirth>String</DateOfBirth> <DateUpdated>0001-01-01T00:00:00</DateUpdated> <Name1>String</Name1> <Name2>String</Name2> <Name3>String</Name3> <Name4>String</Name4> <Name5>String</Name5> <Name6>String</Name6> <Nationality>String</Nationality> <PostCode>String</PostCode> <ResultResolved>false</ResultResolved> <ResultSimilarity>0</ResultSimilarity> <ResultStrength>0</ResultStrength> <ResultType>String</ResultType> </SearchResultHmTreasury> </HMTResults> <OfacResults> <SearchResultOfac> <Addresses> <SearchResultOfacAddress> <Address1>String</Address1> <Address2>String</Address2> <Address3>String</Address3> <City>String</City> <Country>String</Country> <PostCode>String</PostCode> <State>String</State> </SearchResultOfacAddress> </Addresses> <Akas> <SearchResultOfacAka> <FirstName>String</FirstName> <LastName>String</LastName> <Strength>String</Strength> <Type>String</Type> </SearchResultOfacAka> </Akas> <DateOfBirths> <SearchResultOfacDateOfBirth> <DateOfBirth>String</DateOfBirth> </SearchResultOfacDateOfBirth> </DateOfBirths> <DateUpdated>0001-01-01T00:00:00</DateUpdated> <FirstName>String</FirstName> <LastName>String</LastName> <Nationalities> <SearchResultOfacNationality> <Country>String</Country> </SearchResultOfacNationality> </Nationalities> <PlaceOfBirths> <SearchResultOfacPlaceOfBirth> <PlaceOfBirth>String</PlaceOfBirth> </SearchResultOfacPlaceOfBirth> </PlaceOfBirths> <ResultResolved>false</ResultResolved> <ResultSimilarity>0</ResultSimilarity> <ResultStrength>0</ResultStrength> <ResultType>String</ResultType> </SearchResultOfac> </OfacResults> </SearchResults> <SearchType>String</SearchType> </SearchRecord> </Data> </AddCompanySearchResponse> </soap:Body> </soap:Envelope>