<?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};
class ContactRole implements JsonSerializable
{
public function __construct(
/** @description Guid of the Role List Item object within Eros. */
// @ApiMember(DataType="Guid", Description="Guid of the Role List Item object within Eros.", IsRequired=true, Name="RoleId", ParameterType="query")
/** @var string */
public string $RoleId='',
/** @description The unique key that represents the role type on the external system. */
// @ApiMember(DataType="string", Description="The unique key that represents the role type on the external system.", Name="AlternateKey", ParameterType="query")
/** @var string|null */
public ?string $AlternateKey=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['RoleId'])) $this->RoleId = $o['RoleId'];
if (isset($o['AlternateKey'])) $this->AlternateKey = $o['AlternateKey'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->RoleId)) $o['RoleId'] = $this->RoleId;
if (isset($this->AlternateKey)) $o['AlternateKey'] = $this->AlternateKey;
return empty($o) ? new class(){} : $o;
}
}
class LocationCoordinatesModel implements JsonSerializable
{
public function __construct(
/** @description The latitude of an address - geographic coordinates specifying the north-south position of a point on the Earth's surface. */
// @ApiMember(DataType="Double?", Description="The latitude of an address - geographic coordinates specifying the north-south position of a point on the Earth's surface.", IsRequired=true, Name="Latitude", ParameterType="query")
/** @var float */
public float $Latitude=0.0,
/** @description The longitude of an address - geographic coordinates specifying the east-west position of a point on the Earth's surface. */
// @ApiMember(DataType="Double?", Description="The longitude of an address - geographic coordinates specifying the east-west position of a point on the Earth's surface.", IsRequired=true, Name="Longitude", ParameterType="query")
/** @var float */
public float $Longitude=0.0,
/** @description The altitude of an address - the altitude above sea level. */
// @ApiMember(DataType="Double?", Description="The altitude of an address - the altitude above sea level.", Name="Altitude", ParameterType="query")
/** @var float|null */
public ?float $Altitude=null,
/** @description Accuracy of the latitude and longitude. */
// @ApiMember(DataType="Double?", Description="Accuracy of the latitude and longitude.", Name="Accuracy", ParameterType="query")
/** @var float|null */
public ?float $Accuracy=null,
/** @description Accurancy of the Altitude. */
// @ApiMember(DataType="Double?", Description="Accurancy of the Altitude.", Name="AltitudeAccuracy", ParameterType="query")
/** @var float|null */
public ?float $AltitudeAccuracy=null,
/** @description Direction you are heading. */
// @ApiMember(DataType="Double?", Description="Direction you are heading.", Name="Heading", ParameterType="query")
/** @var float|null */
public ?float $Heading=null,
/** @description Speed you are going. */
// @ApiMember(DataType="Double?", Description="Speed you are going.", Name="Speed", ParameterType="query")
/** @var float|null */
public ?float $Speed=null,
/** @description Speed your altitude is ascending/descending at. */
// @ApiMember(DataType="Double?", Description="Speed your altitude is ascending/descending at.", Name="VerticalSpeed", ParameterType="query")
/** @var float|null */
public ?float $VerticalSpeed=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Latitude'])) $this->Latitude = $o['Latitude'];
if (isset($o['Longitude'])) $this->Longitude = $o['Longitude'];
if (isset($o['Altitude'])) $this->Altitude = $o['Altitude'];
if (isset($o['Accuracy'])) $this->Accuracy = $o['Accuracy'];
if (isset($o['AltitudeAccuracy'])) $this->AltitudeAccuracy = $o['AltitudeAccuracy'];
if (isset($o['Heading'])) $this->Heading = $o['Heading'];
if (isset($o['Speed'])) $this->Speed = $o['Speed'];
if (isset($o['VerticalSpeed'])) $this->VerticalSpeed = $o['VerticalSpeed'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Latitude)) $o['Latitude'] = $this->Latitude;
if (isset($this->Longitude)) $o['Longitude'] = $this->Longitude;
if (isset($this->Altitude)) $o['Altitude'] = $this->Altitude;
if (isset($this->Accuracy)) $o['Accuracy'] = $this->Accuracy;
if (isset($this->AltitudeAccuracy)) $o['AltitudeAccuracy'] = $this->AltitudeAccuracy;
if (isset($this->Heading)) $o['Heading'] = $this->Heading;
if (isset($this->Speed)) $o['Speed'] = $this->Speed;
if (isset($this->VerticalSpeed)) $o['VerticalSpeed'] = $this->VerticalSpeed;
return empty($o) ? new class(){} : $o;
}
}
class AddressModel implements JsonSerializable
{
public function __construct(
/** @description The distance between this project and another specified set of gps coordinates. */
// @ApiMember(DataType="double", Description="The distance between this project and another specified set of gps coordinates.", Name="DistanceAway", ParameterType="query")
/** @var float */
public float $DistanceAway=0.0,
/** @description The latitude of an address - geographic coordinates specifying the north-south position of a point on the Earth's surface. */
// @ApiMember(DataType="Double?", Description="The latitude of an address - geographic coordinates specifying the north-south position of a point on the Earth's surface.", IsRequired=true, Name="Latitude", ParameterType="query")
/** @var float */
public float $Latitude=0.0,
/** @description The longitude of an address - geographic coordinates specifying the east-west position of a point on the Earth's surface. */
// @ApiMember(DataType="Double?", Description="The longitude of an address - geographic coordinates specifying the east-west position of a point on the Earth's surface.", IsRequired=true, Name="Longitude", ParameterType="query")
/** @var float */
public float $Longitude=0.0,
/** @description Address Format Id Guid - this will be determined by the service. */
// @ApiMember(DataType="Guid", Description="Address Format Id Guid - this will be determined by the service.", Name="AddressFormatId", ParameterType="query")
/** @var string */
public string $AddressFormatId='',
/** @description Suburb Id Guid - this will attempt to be determined by the SuburbName, StateShortName and Postcode entered. */
// @ApiMember(DataType="Guid", Description="Suburb Id Guid - this will attempt to be determined by the SuburbName, StateShortName and Postcode entered.", Name="SuburbId", ParameterType="query")
/** @var string */
public string $SuburbId='',
/** @description The suburb name. */
// @ApiMember(DataType="string", Description="The suburb name.", Name="SuburbName", ParameterType="query")
/** @var string|null */
public ?string $SuburbName=null,
/** @description The shortened State Name e.g Vic for Victoria. */
// @ApiMember(DataType="string", Description="The shortened State Name e.g Vic for Victoria.", Name="StateShortName", ParameterType="query")
/** @var string|null */
public ?string $StateShortName=null,
/** @description The suburb postcode. */
// @ApiMember(DataType="string", Description="The suburb postcode.", Name="PostCode", ParameterType="query")
/** @var string|null */
public ?string $PostCode=null,
/** @description Country Id Guid - this will be determined by the CountrName or ISOCountryCode entered. */
// @ApiMember(DataType="Guid", Description="Country Id Guid - this will be determined by the CountrName or ISOCountryCode entered.", Name="CountryId", ParameterType="query")
/** @var string */
public string $CountryId='',
/** @description the name of the country the address is within. */
// @ApiMember(DataType="string", Description="the name of the country the address is within.", Name="CountryName", ParameterType="query")
/** @var string|null */
public ?string $CountryName=null,
/** @description A 2 digit ISO Country Code representing the country. */
// @ApiMember(DataType="string", Description="A 2 digit ISO Country Code representing the country.", Name="ISOCountryCode", ParameterType="query")
/** @var string|null */
public ?string $ISOCountryCode=null,
/** @description The address Lot number. */
// @ApiMember(DataType="string", Description="The address Lot number.", Name="LotNumber", ParameterType="query")
/** @var string|null */
public ?string $LotNumber=null,
/** @description The address Sub Unit number. */
// @ApiMember(DataType="string", Description="The address Sub Unit number.", Name="SubUnit", ParameterType="query")
/** @var string|null */
public ?string $SubUnit=null,
/** @description The address building number. */
// @ApiMember(DataType="string", Description="The address building number.", Name="BuildingNumber", ParameterType="query")
/** @var string|null */
public ?string $BuildingNumber=null,
/** @description The address street number. */
// @ApiMember(DataType="string", Description="The address street number.", Name="StreetNumber", ParameterType="query")
/** @var string|null */
public ?string $StreetNumber=null,
/** @description The address street name including street type. */
// @ApiMember(DataType="string", Description="The address street name including street type.", Name="StreetName", ParameterType="query")
/** @var string|null */
public ?string $StreetName=null,
/** @description A formatted address Line 1. */
// @ApiMember(DataType="string", Description="A formatted address Line 1.", Name="AddressLineOne", ParameterType="query")
/** @var string|null */
public ?string $AddressLineOne=null,
/** @description A formatted address Line 2. */
// @ApiMember(DataType="string", Description="A formatted address Line 2.", Name="AddressLineTwo", ParameterType="query")
/** @var string|null */
public ?string $AddressLineTwo=null,
/** @description The full address string. */
// @ApiMember(DataType="string", Description="The full address string.", Name="AddressFull", ParameterType="query")
/** @var string|null */
public ?string $AddressFull=null,
/** @description True if the address is a physical location. */
// @ApiMember(DataType="bool?", Description="True if the address is a physical location.", Name="IsPhysical", ParameterType="query")
/** @var bool|null */
public ?bool $IsPhysical=null,
/** @description Notes about the address. */
// @ApiMember(DataType="string", Description="Notes about the address.", Name="Notes", ParameterType="query")
/** @var string|null */
public ?string $Notes=null,
/** @description If true, the address is eligible for having its coordinates calculated/updated. */
// @ApiMember(DataType="bool?", Description="If true, the address is eligible for having its coordinates calculated/updated.", Name="AutoMapCoordinates", ParameterType="query")
/** @var bool|null */
public ?bool $AutoMapCoordinates=null,
/** @description Location Coordinates for the address. */
// @ApiMember(DataType="LocationCoordinates", Description="Location Coordinates for the address.", Name="LocationCoordinates", ParameterType="query")
/** @var LocationCoordinatesModel|null */
public ?LocationCoordinatesModel $LocationCoordinates=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['DistanceAway'])) $this->DistanceAway = $o['DistanceAway'];
if (isset($o['Latitude'])) $this->Latitude = $o['Latitude'];
if (isset($o['Longitude'])) $this->Longitude = $o['Longitude'];
if (isset($o['AddressFormatId'])) $this->AddressFormatId = $o['AddressFormatId'];
if (isset($o['SuburbId'])) $this->SuburbId = $o['SuburbId'];
if (isset($o['SuburbName'])) $this->SuburbName = $o['SuburbName'];
if (isset($o['StateShortName'])) $this->StateShortName = $o['StateShortName'];
if (isset($o['PostCode'])) $this->PostCode = $o['PostCode'];
if (isset($o['CountryId'])) $this->CountryId = $o['CountryId'];
if (isset($o['CountryName'])) $this->CountryName = $o['CountryName'];
if (isset($o['ISOCountryCode'])) $this->ISOCountryCode = $o['ISOCountryCode'];
if (isset($o['LotNumber'])) $this->LotNumber = $o['LotNumber'];
if (isset($o['SubUnit'])) $this->SubUnit = $o['SubUnit'];
if (isset($o['BuildingNumber'])) $this->BuildingNumber = $o['BuildingNumber'];
if (isset($o['StreetNumber'])) $this->StreetNumber = $o['StreetNumber'];
if (isset($o['StreetName'])) $this->StreetName = $o['StreetName'];
if (isset($o['AddressLineOne'])) $this->AddressLineOne = $o['AddressLineOne'];
if (isset($o['AddressLineTwo'])) $this->AddressLineTwo = $o['AddressLineTwo'];
if (isset($o['AddressFull'])) $this->AddressFull = $o['AddressFull'];
if (isset($o['IsPhysical'])) $this->IsPhysical = $o['IsPhysical'];
if (isset($o['Notes'])) $this->Notes = $o['Notes'];
if (isset($o['AutoMapCoordinates'])) $this->AutoMapCoordinates = $o['AutoMapCoordinates'];
if (isset($o['LocationCoordinates'])) $this->LocationCoordinates = JsonConverters::from('LocationCoordinatesModel', $o['LocationCoordinates']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->DistanceAway)) $o['DistanceAway'] = $this->DistanceAway;
if (isset($this->Latitude)) $o['Latitude'] = $this->Latitude;
if (isset($this->Longitude)) $o['Longitude'] = $this->Longitude;
if (isset($this->AddressFormatId)) $o['AddressFormatId'] = $this->AddressFormatId;
if (isset($this->SuburbId)) $o['SuburbId'] = $this->SuburbId;
if (isset($this->SuburbName)) $o['SuburbName'] = $this->SuburbName;
if (isset($this->StateShortName)) $o['StateShortName'] = $this->StateShortName;
if (isset($this->PostCode)) $o['PostCode'] = $this->PostCode;
if (isset($this->CountryId)) $o['CountryId'] = $this->CountryId;
if (isset($this->CountryName)) $o['CountryName'] = $this->CountryName;
if (isset($this->ISOCountryCode)) $o['ISOCountryCode'] = $this->ISOCountryCode;
if (isset($this->LotNumber)) $o['LotNumber'] = $this->LotNumber;
if (isset($this->SubUnit)) $o['SubUnit'] = $this->SubUnit;
if (isset($this->BuildingNumber)) $o['BuildingNumber'] = $this->BuildingNumber;
if (isset($this->StreetNumber)) $o['StreetNumber'] = $this->StreetNumber;
if (isset($this->StreetName)) $o['StreetName'] = $this->StreetName;
if (isset($this->AddressLineOne)) $o['AddressLineOne'] = $this->AddressLineOne;
if (isset($this->AddressLineTwo)) $o['AddressLineTwo'] = $this->AddressLineTwo;
if (isset($this->AddressFull)) $o['AddressFull'] = $this->AddressFull;
if (isset($this->IsPhysical)) $o['IsPhysical'] = $this->IsPhysical;
if (isset($this->Notes)) $o['Notes'] = $this->Notes;
if (isset($this->AutoMapCoordinates)) $o['AutoMapCoordinates'] = $this->AutoMapCoordinates;
if (isset($this->LocationCoordinates)) $o['LocationCoordinates'] = JsonConverters::to('LocationCoordinatesModel', $this->LocationCoordinates);
return empty($o) ? new class(){} : $o;
}
}
class ContactAddressModel implements JsonSerializable
{
public function __construct(
/** @var AddressModel|null */
public ?AddressModel $Address=null,
/** @var bool|null */
public ?bool $IsPostal=null,
/** @var bool|null */
public ?bool $IsPrimaryLocation=null,
/** @var bool|null */
public ?bool $IsRegisteredLocation=null,
/** @var string|null */
public ?string $SuburbName=null,
/** @var string|null */
public ?string $StateName=null,
/** @var string|null */
public ?string $CountryName=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Address'])) $this->Address = JsonConverters::from('AddressModel', $o['Address']);
if (isset($o['IsPostal'])) $this->IsPostal = $o['IsPostal'];
if (isset($o['IsPrimaryLocation'])) $this->IsPrimaryLocation = $o['IsPrimaryLocation'];
if (isset($o['IsRegisteredLocation'])) $this->IsRegisteredLocation = $o['IsRegisteredLocation'];
if (isset($o['SuburbName'])) $this->SuburbName = $o['SuburbName'];
if (isset($o['StateName'])) $this->StateName = $o['StateName'];
if (isset($o['CountryName'])) $this->CountryName = $o['CountryName'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Address)) $o['Address'] = JsonConverters::to('AddressModel', $this->Address);
if (isset($this->IsPostal)) $o['IsPostal'] = $this->IsPostal;
if (isset($this->IsPrimaryLocation)) $o['IsPrimaryLocation'] = $this->IsPrimaryLocation;
if (isset($this->IsRegisteredLocation)) $o['IsRegisteredLocation'] = $this->IsRegisteredLocation;
if (isset($this->SuburbName)) $o['SuburbName'] = $this->SuburbName;
if (isset($this->StateName)) $o['StateName'] = $this->StateName;
if (isset($this->CountryName)) $o['CountryName'] = $this->CountryName;
return empty($o) ? new class(){} : $o;
}
}
class PhoneModel implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $CountryCode=null,
/** @var string|null */
public ?string $AreaCode=null,
/** @var string|null */
public ?string $LocalNumber=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['CountryCode'])) $this->CountryCode = $o['CountryCode'];
if (isset($o['AreaCode'])) $this->AreaCode = $o['AreaCode'];
if (isset($o['LocalNumber'])) $this->LocalNumber = $o['LocalNumber'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->CountryCode)) $o['CountryCode'] = $this->CountryCode;
if (isset($this->AreaCode)) $o['AreaCode'] = $this->AreaCode;
if (isset($this->LocalNumber)) $o['LocalNumber'] = $this->LocalNumber;
return empty($o) ? new class(){} : $o;
}
}
class ContactDetailModel implements JsonSerializable
{
public function __construct(
/** @var string */
public string $ContactMethodId='',
/** @var string|null */
public ?string $ContactMethodName=null,
/** @var ContactAddressModel|null */
public ?ContactAddressModel $ContactAddress=null,
/** @var PhoneModel|null */
public ?PhoneModel $ContactPhone=null,
/** @var string|null */
public ?string $CountryId=null,
/** @var string|null */
public ?string $ContactDetails=null,
/** @var string|null */
public ?string $Notes=null,
/** @var string|null */
public ?string $ContactDetailsCode=null,
/** @var int */
public int $OrderContactMethod=0,
/** @var bool|null */
public ?bool $IsPrimaryContactMethod=null,
/** @var bool|null */
public ?bool $IsAddress=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ContactMethodId'])) $this->ContactMethodId = $o['ContactMethodId'];
if (isset($o['ContactMethodName'])) $this->ContactMethodName = $o['ContactMethodName'];
if (isset($o['ContactAddress'])) $this->ContactAddress = JsonConverters::from('ContactAddressModel', $o['ContactAddress']);
if (isset($o['ContactPhone'])) $this->ContactPhone = JsonConverters::from('PhoneModel', $o['ContactPhone']);
if (isset($o['CountryId'])) $this->CountryId = $o['CountryId'];
if (isset($o['ContactDetails'])) $this->ContactDetails = $o['ContactDetails'];
if (isset($o['Notes'])) $this->Notes = $o['Notes'];
if (isset($o['ContactDetailsCode'])) $this->ContactDetailsCode = $o['ContactDetailsCode'];
if (isset($o['OrderContactMethod'])) $this->OrderContactMethod = $o['OrderContactMethod'];
if (isset($o['IsPrimaryContactMethod'])) $this->IsPrimaryContactMethod = $o['IsPrimaryContactMethod'];
if (isset($o['IsAddress'])) $this->IsAddress = $o['IsAddress'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ContactMethodId)) $o['ContactMethodId'] = $this->ContactMethodId;
if (isset($this->ContactMethodName)) $o['ContactMethodName'] = $this->ContactMethodName;
if (isset($this->ContactAddress)) $o['ContactAddress'] = JsonConverters::to('ContactAddressModel', $this->ContactAddress);
if (isset($this->ContactPhone)) $o['ContactPhone'] = JsonConverters::to('PhoneModel', $this->ContactPhone);
if (isset($this->CountryId)) $o['CountryId'] = $this->CountryId;
if (isset($this->ContactDetails)) $o['ContactDetails'] = $this->ContactDetails;
if (isset($this->Notes)) $o['Notes'] = $this->Notes;
if (isset($this->ContactDetailsCode)) $o['ContactDetailsCode'] = $this->ContactDetailsCode;
if (isset($this->OrderContactMethod)) $o['OrderContactMethod'] = $this->OrderContactMethod;
if (isset($this->IsPrimaryContactMethod)) $o['IsPrimaryContactMethod'] = $this->IsPrimaryContactMethod;
if (isset($this->IsAddress)) $o['IsAddress'] = $this->IsAddress;
return empty($o) ? new class(){} : $o;
}
}
class SubscriptionContactModel implements JsonSerializable
{
public function __construct(
/** @description Guid of the contact object within Eros. */
// @ApiMember(DataType="Guid", Description="Guid of the contact object within Eros.", Name="ContactId", ParameterType="query")
/** @var string */
public string $ContactId='',
/** @description Guid of the Contact Type List Item object within Eros. */
// @ApiMember(DataType="Guid", Description="Guid of the Contact Type List Item object within Eros.", IsRequired=true, Name="ContactType", ParameterType="query")
/** @var string */
public string $ContactType='',
/** @description Guid of the Marital Status List Item object within Eros. */
// @ApiMember(DataType="Guid?", Description="Guid of the Marital Status List Item object within Eros.", Name="MaritalStatus", ParameterType="query")
/** @var string|null */
public ?string $MaritalStatus=null,
/** @description Guid of the Gender List Item object within Eros. */
// @ApiMember(DataType="Guid?", Description="Guid of the Gender List Item object within Eros.", Name="Gender", ParameterType="query")
/** @var string|null */
public ?string $Gender=null,
/** @description The first given name for the contact. Applies to a person contact type. */
// @ApiMember(DataType="string", Description="The first given name for the contact. Applies to a person contact type.", Name="FirstName", ParameterType="query")
/** @var string|null */
public ?string $FirstName=null,
/** @description The middle name(s) for the contact. Applies to a person contact type. */
// @ApiMember(DataType="string", Description="The middle name(s) for the contact. Applies to a person contact type.", Name="MiddleName", ParameterType="query")
/** @var string|null */
public ?string $MiddleName=null,
/** @description The surname for the contact. Applies to a person contact type. */
// @ApiMember(DataType="string", Description="The surname for the contact. Applies to a person contact type.", Name="Surname", ParameterType="query")
/** @var string|null */
public ?string $Surname=null,
/** @description The full name for the contact. */
// @ApiMember(DataType="string", Description="The full name for the contact.", Name="FullName", ParameterType="query")
/** @var string|null */
public ?string $FullName=null,
/** @description A short name for the contact. */
// @ApiMember(DataType="string", Description="A short name for the contact.", Name="ShortName", ParameterType="query")
/** @var string|null */
public ?string $ShortName=null,
/** @description The birth date for the contact. Applies to a person contact type. */
// @ApiMember(DataType="DateTime?", Description="The birth date for the contact. Applies to a person contact type.", Name="BirthDate", ParameterType="query")
/** @var DateTime|null */
public ?DateTime $BirthDate=null,
/** @description The title for the contact. Applies to a person contact type. */
// @ApiMember(DataType="string", Description="The title for the contact. Applies to a person contact type.", Name="Title", ParameterType="query")
/** @var string|null */
public ?string $Title=null,
/** @description A salutation for the contact. */
// @ApiMember(DataType="string", Description="A salutation for the contact.", Name="Salutation", ParameterType="query")
/** @var string|null */
public ?string $Salutation=null,
/** @description The A.B.N for the contact. */
// @ApiMember(DataType="string", Description="The A.B.N for the contact.", Name="Abn", ParameterType="query")
/** @var string|null */
public ?string $Abn=null,
/** @description The A.C.N for the contact. */
// @ApiMember(DataType="string", Description="The A.C.N for the contact.", Name="Acn", ParameterType="query")
/** @var string|null */
public ?string $Acn=null,
/** @description The A.R.B.N for the contact. */
// @ApiMember(DataType="string", Description="The A.R.B.N for the contact.", Name="Arbn", ParameterType="query")
/** @var string|null */
public ?string $Arbn=null,
/** @description A trading name for the contact. */
// @ApiMember(DataType="string", Description="A trading name for the contact.", Name="TradingName", ParameterType="query")
/** @var string|null */
public ?string $TradingName=null,
/** @description A legal name for the contact. */
// @ApiMember(DataType="string", Description="A legal name for the contact.", Name="LegalName", ParameterType="query")
/** @var string|null */
public ?string $LegalName=null,
/** @description Any notes/description for the contact. */
// @ApiMember(DataType="string", Description="Any notes/description for the contact.", Name="Notes", ParameterType="query")
/** @var string|null */
public ?string $Notes=null,
/** @description Contact Employment Industry. */
// @ApiMember(DataType="string", Description="Contact Employment Industry.", Name="EmploymentIndustry", ParameterType="query")
/** @var string|null */
public ?string $EmploymentIndustry=null,
/** @description Contact Employment Role. */
// @ApiMember(DataType="string", Description="Contact Employment Role.", Name="EmploymentRole", ParameterType="query")
/** @var string|null */
public ?string $EmploymentRole=null,
/** @description Contact Employment Geographic Area. */
// @ApiMember(DataType="string", Description="Contact Employment Geographic Area.", Name="EmploymentGeographicArea", ParameterType="query")
/** @var string|null */
public ?string $EmploymentGeographicArea=null,
/** @description The Contacts Drivers Licence Number */
// @ApiMember(DataType="string", Description="The Contacts Drivers Licence Number", Name="DriversLicence", ParameterType="query")
/** @var string|null */
public ?string $DriversLicence=null,
/** @description Indicates if the Contact is registered for GST */
// @ApiMember(DataType="bool", Description="Indicates if the Contact is registered for GST", Name="GstRegistered", ParameterType="query")
/** @var bool|null */
public ?bool $GstRegistered=null,
/** @description The status of the contact in EROS */
// @ApiMember(DataType="string", Description="The status of the contact in EROS", Name="RecordStatus", ParameterType="query")
/** @var string|null */
public ?string $RecordStatus=null,
/** @description A list of roles this contact has. */
// @ApiMember(DataType="List<ContactRole>", Description="A list of roles this contact has.", IsRequired=true, Name="ContactRoles", ParameterType="query")
/** @var array<ContactRole>|null */
public ?array $ContactRoles=null,
/** @description A list of the contact details for the contact. */
// @ApiMember(DataType="List<ContactDetailModel>", Description="A list of the contact details for the contact.", IsRequired=true, Name="ContactDetails", ParameterType="query")
/** @var array<ContactDetailModel>|null */
public ?array $ContactDetails=null,
/** @description Custom Content XML for the contact. */
// @ApiMember(DataType="string", Description="Custom Content XML for the contact.", Name="CustomContentXML", ParameterType="query")
/** @var string|null */
public ?string $CustomContentXML=null,
/** @var string|null */
public ?string $BlobImageURLPrimary=null,
/** @var string|null */
public ?string $BlobImageURLPrimaryThumbnail=null,
/** @description The primary mobile for the contact. */
// @ApiMember(DataType="string", Description="The primary mobile for the contact.", Name="PrimaryMobile", ParameterType="query")
/** @var string|null */
public ?string $PrimaryMobile=null,
/** @description The primary email for the contact. */
// @ApiMember(DataType="string", Description="The primary email for the contact.", Name="PrimaryEmail", ParameterType="query")
/** @var string|null */
public ?string $PrimaryEmail=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ContactId'])) $this->ContactId = $o['ContactId'];
if (isset($o['ContactType'])) $this->ContactType = $o['ContactType'];
if (isset($o['MaritalStatus'])) $this->MaritalStatus = $o['MaritalStatus'];
if (isset($o['Gender'])) $this->Gender = $o['Gender'];
if (isset($o['FirstName'])) $this->FirstName = $o['FirstName'];
if (isset($o['MiddleName'])) $this->MiddleName = $o['MiddleName'];
if (isset($o['Surname'])) $this->Surname = $o['Surname'];
if (isset($o['FullName'])) $this->FullName = $o['FullName'];
if (isset($o['ShortName'])) $this->ShortName = $o['ShortName'];
if (isset($o['BirthDate'])) $this->BirthDate = JsonConverters::from('DateTime', $o['BirthDate']);
if (isset($o['Title'])) $this->Title = $o['Title'];
if (isset($o['Salutation'])) $this->Salutation = $o['Salutation'];
if (isset($o['Abn'])) $this->Abn = $o['Abn'];
if (isset($o['Acn'])) $this->Acn = $o['Acn'];
if (isset($o['Arbn'])) $this->Arbn = $o['Arbn'];
if (isset($o['TradingName'])) $this->TradingName = $o['TradingName'];
if (isset($o['LegalName'])) $this->LegalName = $o['LegalName'];
if (isset($o['Notes'])) $this->Notes = $o['Notes'];
if (isset($o['EmploymentIndustry'])) $this->EmploymentIndustry = $o['EmploymentIndustry'];
if (isset($o['EmploymentRole'])) $this->EmploymentRole = $o['EmploymentRole'];
if (isset($o['EmploymentGeographicArea'])) $this->EmploymentGeographicArea = $o['EmploymentGeographicArea'];
if (isset($o['DriversLicence'])) $this->DriversLicence = $o['DriversLicence'];
if (isset($o['GstRegistered'])) $this->GstRegistered = $o['GstRegistered'];
if (isset($o['RecordStatus'])) $this->RecordStatus = $o['RecordStatus'];
if (isset($o['ContactRoles'])) $this->ContactRoles = JsonConverters::fromArray('ContactRole', $o['ContactRoles']);
if (isset($o['ContactDetails'])) $this->ContactDetails = JsonConverters::fromArray('ContactDetailModel', $o['ContactDetails']);
if (isset($o['CustomContentXML'])) $this->CustomContentXML = $o['CustomContentXML'];
if (isset($o['BlobImageURLPrimary'])) $this->BlobImageURLPrimary = $o['BlobImageURLPrimary'];
if (isset($o['BlobImageURLPrimaryThumbnail'])) $this->BlobImageURLPrimaryThumbnail = $o['BlobImageURLPrimaryThumbnail'];
if (isset($o['PrimaryMobile'])) $this->PrimaryMobile = $o['PrimaryMobile'];
if (isset($o['PrimaryEmail'])) $this->PrimaryEmail = $o['PrimaryEmail'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ContactId)) $o['ContactId'] = $this->ContactId;
if (isset($this->ContactType)) $o['ContactType'] = $this->ContactType;
if (isset($this->MaritalStatus)) $o['MaritalStatus'] = $this->MaritalStatus;
if (isset($this->Gender)) $o['Gender'] = $this->Gender;
if (isset($this->FirstName)) $o['FirstName'] = $this->FirstName;
if (isset($this->MiddleName)) $o['MiddleName'] = $this->MiddleName;
if (isset($this->Surname)) $o['Surname'] = $this->Surname;
if (isset($this->FullName)) $o['FullName'] = $this->FullName;
if (isset($this->ShortName)) $o['ShortName'] = $this->ShortName;
if (isset($this->BirthDate)) $o['BirthDate'] = JsonConverters::to('DateTime', $this->BirthDate);
if (isset($this->Title)) $o['Title'] = $this->Title;
if (isset($this->Salutation)) $o['Salutation'] = $this->Salutation;
if (isset($this->Abn)) $o['Abn'] = $this->Abn;
if (isset($this->Acn)) $o['Acn'] = $this->Acn;
if (isset($this->Arbn)) $o['Arbn'] = $this->Arbn;
if (isset($this->TradingName)) $o['TradingName'] = $this->TradingName;
if (isset($this->LegalName)) $o['LegalName'] = $this->LegalName;
if (isset($this->Notes)) $o['Notes'] = $this->Notes;
if (isset($this->EmploymentIndustry)) $o['EmploymentIndustry'] = $this->EmploymentIndustry;
if (isset($this->EmploymentRole)) $o['EmploymentRole'] = $this->EmploymentRole;
if (isset($this->EmploymentGeographicArea)) $o['EmploymentGeographicArea'] = $this->EmploymentGeographicArea;
if (isset($this->DriversLicence)) $o['DriversLicence'] = $this->DriversLicence;
if (isset($this->GstRegistered)) $o['GstRegistered'] = $this->GstRegistered;
if (isset($this->RecordStatus)) $o['RecordStatus'] = $this->RecordStatus;
if (isset($this->ContactRoles)) $o['ContactRoles'] = JsonConverters::toArray('ContactRole', $this->ContactRoles);
if (isset($this->ContactDetails)) $o['ContactDetails'] = JsonConverters::toArray('ContactDetailModel', $this->ContactDetails);
if (isset($this->CustomContentXML)) $o['CustomContentXML'] = $this->CustomContentXML;
if (isset($this->BlobImageURLPrimary)) $o['BlobImageURLPrimary'] = $this->BlobImageURLPrimary;
if (isset($this->BlobImageURLPrimaryThumbnail)) $o['BlobImageURLPrimaryThumbnail'] = $this->BlobImageURLPrimaryThumbnail;
if (isset($this->PrimaryMobile)) $o['PrimaryMobile'] = $this->PrimaryMobile;
if (isset($this->PrimaryEmail)) $o['PrimaryEmail'] = $this->PrimaryEmail;
return empty($o) ? new class(){} : $o;
}
}
class ContactsStaff implements JsonSerializable
{
public function __construct(
/** @var string */
public string $ContactId='',
/** @var string */
public string $ContactStaffId=''
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ContactId'])) $this->ContactId = $o['ContactId'];
if (isset($o['ContactStaffId'])) $this->ContactStaffId = $o['ContactStaffId'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ContactId)) $o['ContactId'] = $this->ContactId;
if (isset($this->ContactStaffId)) $o['ContactStaffId'] = $this->ContactStaffId;
return empty($o) ? new class(){} : $o;
}
}
class GetContactsModel implements JsonSerializable
{
public function __construct(
/** @description List of Contacts with details. */
// @ApiMember(DataType="string", Description="List of Contacts with details.", IsRequired=true, Name="Contacts", ParameterType="query")
/** @var array<SubscriptionContactModel>|null */
public ?array $Contacts=null,
/** @description List of contact-staff details. */
// @ApiMember(DataType="string", Description="List of contact-staff details.", IsRequired=true, Name="ContactStaff", ParameterType="query")
/** @var array<ContactsStaff>|null */
public ?array $ContactStaff=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Contacts'])) $this->Contacts = JsonConverters::fromArray('SubscriptionContactModel', $o['Contacts']);
if (isset($o['ContactStaff'])) $this->ContactStaff = JsonConverters::fromArray('ContactsStaff', $o['ContactStaff']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Contacts)) $o['Contacts'] = JsonConverters::toArray('SubscriptionContactModel', $this->Contacts);
if (isset($this->ContactStaff)) $o['ContactStaff'] = JsonConverters::toArray('ContactsStaff', $this->ContactStaff);
return empty($o) ? new class(){} : $o;
}
}
/** @description Returns a list of contacts with specified roles. There are options to include custom and also to include each contacts connected contacts */
// @Api(Description="Returns a list of contacts with specified roles. There are options to include custom and also to include each contacts connected contacts")
class GetContacts implements JsonSerializable
{
public function __construct(
/** @description Guid representing the external system datasource requesting the contact information. This is required to return any existing object subscription details for each contact. */
// @ApiMember(DataType="Guid", Description="Guid representing the external system datasource requesting the contact information. This is required to return any existing object subscription details for each contact.", IsRequired=true, Name="SuiteDataSourceInstanceId", ParameterType="query")
/** @var string */
public string $SuiteDataSourceInstanceId='',
/** @description A list of 1 or more roles that a contact must have in order to be returned. (Roles are treated as OR not AND, ie a contact may have one or the other to be returned, but not necessarily both) */
// @ApiMember(DataType="List<Guid>", Description="A list of 1 or more roles that a contact must have in order to be returned. (Roles are treated as OR not AND, ie a contact may have one or the other to be returned, but not necessarily both)", IsRequired=true, Name="ContactRoles", ParameterType="query")
/** @var array<string>|null */
public ?array $ContactRoles=null,
/** @description A list of contact types that we want returned. If no contact types are specified all 4 major contact types are eligible to be returned. (organisation/person - real/virtual) */
// @ApiMember(DataType="List<Guid>", Description="A list of contact types that we want returned. If no contact types are specified all 4 major contact types are eligible to be returned. (organisation/person - real/virtual)", Name="ContactTypes", ParameterType="query")
/** @var array<string>|null */
public ?array $ContactTypes=null,
/** @description Set to true if you want to include the any linked staff for each contact. */
// @ApiMember(DataType="bool", Description="Set to true if you want to include the any linked staff for each contact.", IsRequired=true, Name="IncludeStaff", ParameterType="query")
/** @var bool|null */
public ?bool $IncludeStaff=null,
/** @description To include custom content then you need to specify the view Id of the content to include. */
// @ApiMember(DataType="Guid", Description="To include custom content then you need to specify the view Id of the content to include.", Name="CustomContentViewId", ParameterType="query")
/** @var string */
public string $CustomContentViewId='',
/** @description Set the date to return only contacts that have been modified since a particular date. */
// @ApiMember(DataType="DateTime", Description="Set the date to return only contacts that have been modified since a particular date.", Name="ModifiedSince", ParameterType="query")
/** @var DateTime */
public DateTime $ModifiedSince=new DateTime()
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['SuiteDataSourceInstanceId'])) $this->SuiteDataSourceInstanceId = $o['SuiteDataSourceInstanceId'];
if (isset($o['ContactRoles'])) $this->ContactRoles = JsonConverters::fromArray('Guid', $o['ContactRoles']);
if (isset($o['ContactTypes'])) $this->ContactTypes = JsonConverters::fromArray('Guid', $o['ContactTypes']);
if (isset($o['IncludeStaff'])) $this->IncludeStaff = $o['IncludeStaff'];
if (isset($o['CustomContentViewId'])) $this->CustomContentViewId = $o['CustomContentViewId'];
if (isset($o['ModifiedSince'])) $this->ModifiedSince = JsonConverters::from('DateTime', $o['ModifiedSince']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->SuiteDataSourceInstanceId)) $o['SuiteDataSourceInstanceId'] = $this->SuiteDataSourceInstanceId;
if (isset($this->ContactRoles)) $o['ContactRoles'] = JsonConverters::toArray('Guid', $this->ContactRoles);
if (isset($this->ContactTypes)) $o['ContactTypes'] = JsonConverters::toArray('Guid', $this->ContactTypes);
if (isset($this->IncludeStaff)) $o['IncludeStaff'] = $this->IncludeStaff;
if (isset($this->CustomContentViewId)) $o['CustomContentViewId'] = $this->CustomContentViewId;
if (isset($this->ModifiedSince)) $o['ModifiedSince'] = JsonConverters::to('DateTime', $this->ModifiedSince);
return empty($o) ? new class(){} : $o;
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /csv/reply/GetContacts HTTP/1.1
Host: production-eros-platform-apisubscription.azurewebsites.net
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"ContactRoles":["00000000-0000-0000-0000-000000000000"],"ContactTypes":["00000000-0000-0000-0000-000000000000"],"IncludeStaff":false,"ModifiedSince":"0001-01-01T00:00:00.0000000"}
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length {}