| All Verbs | /api/profile/business |
|---|
<?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 AddBusinessProfileResponse implements JsonSerializable
{
public function __construct(
/** @description Short description of the overall status of the web service response. */
// @ApiMember(DataType="string", Description="Short description of the overall status of the web service response.", Name="Message", ParameterType="query")
/** @var string|null */
public ?string $Message=null,
/** @description Holds a code representing the exception type. */
// @ApiMember(DataType="string", Description="Holds a code representing the exception type.", Name="ErrorCode", ParameterType="query")
/** @var string|null */
public ?string $ErrorCode=null,
/** @description Details of 1 or more validation errors from the web service */
// @ApiMember(DataType="List<ResponseError>", Description="Details of 1 or more validation errors from the web service", Name="Errors", ParameterType="query")
/** @var array<ResponseError>|null */
public ?array $Errors=null,
/** @description Guid representing the object that is the Businesses User Profile Id in Eros. */
// @ApiMember(DataType="Guid", Description="Guid representing the object that is the Businesses User Profile Id in Eros.", Name="UserProfileId", ParameterType="query")
/** @var string */
public string $UserProfileId='',
/** @description Service Stack Response Status. */
// @ApiMember(DataType="ResponseStatus", Description="Service Stack Response Status.", Name="ResponseStatus", ParameterType="query")
/** @var ResponseStatus|null */
public ?ResponseStatus $ResponseStatus=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Message'])) $this->Message = $o['Message'];
if (isset($o['ErrorCode'])) $this->ErrorCode = $o['ErrorCode'];
if (isset($o['Errors'])) $this->Errors = JsonConverters::fromArray('ResponseError', $o['Errors']);
if (isset($o['UserProfileId'])) $this->UserProfileId = $o['UserProfileId'];
if (isset($o['ResponseStatus'])) $this->ResponseStatus = JsonConverters::from('ResponseStatus', $o['ResponseStatus']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Message)) $o['Message'] = $this->Message;
if (isset($this->ErrorCode)) $o['ErrorCode'] = $this->ErrorCode;
if (isset($this->Errors)) $o['Errors'] = JsonConverters::toArray('ResponseError', $this->Errors);
if (isset($this->UserProfileId)) $o['UserProfileId'] = $this->UserProfileId;
if (isset($this->ResponseStatus)) $o['ResponseStatus'] = JsonConverters::to('ResponseStatus', $this->ResponseStatus);
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(Description="The latitude of an address - geographic coordinates specifying the north-south position of a point on the Earth's surface.", 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(Description="The longitude of an address - geographic coordinates specifying the east-west position of a point on the Earth's surface.", ParameterType="query")
/** @var float */
public float $Longitude=0.0,
/** @description The altitude of an address - the altitude above sea level." */
// @ApiMember(Description="The altitude of an address - the altitude above sea level.\"", ParameterType="query")
/** @var float|null */
public ?float $Altitude=null,
/** @description Accuracy of the latitude and longitude. */
// @ApiMember(Description="Accuracy of the latitude and longitude.", ParameterType="query")
/** @var float|null */
public ?float $Accuracy=null,
/** @description Accurancy of the Altitude. */
// @ApiMember(Description="Accurancy of the Altitude.", ParameterType="query")
/** @var float|null */
public ?float $AltitudeAccuracy=null,
/** @description Direction you are heading. */
// @ApiMember(Description="Direction you are heading.", ParameterType="query")
/** @var float|null */
public ?float $Heading=null,
/** @description Speed you are going. */
// @ApiMember(Description="Speed you are going.", ParameterType="query")
/** @var float|null */
public ?float $Speed=null,
/** @description Speed your altitude is ascending/descending at. */
// @ApiMember(Description="Speed your altitude is ascending/descending at.", 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="body")
/** @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.", Name="Latitude", ParameterType="body")
/** @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.", Name="Longitude", ParameterType="body")
/** @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="body")
/** @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="body")
/** @var string */
public string $SuburbId='',
/** @description The suburb name. */
// @ApiMember(DataType="string", Description="The suburb name.", Name="SuburbName", ParameterType="body")
/** @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="body")
/** @var string|null */
public ?string $StateShortName=null,
/** @description The suburb postcode. */
// @ApiMember(DataType="string", Description="The suburb postcode.", Name="PostCode", ParameterType="body")
/** @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="body")
/** @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="body")
/** @var string|null */
public ?string $CountryName=null,
/** @description ISO Country Code. */
// @ApiMember(Description="ISO Country Code.", 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="body")
/** @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="body")
/** @var string|null */
public ?string $SubUnit=null,
/** @description The address building number. */
// @ApiMember(DataType="string", Description="The address building number.", Name="BuildingNumber", ParameterType="body")
/** @var string|null */
public ?string $BuildingNumber=null,
/** @description The address street number. */
// @ApiMember(DataType="string", Description="The address street number.", Name="StreetNumber", ParameterType="body")
/** @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="body")
/** @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="body")
/** @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="body")
/** @var string|null */
public ?string $AddressLineTwo=null,
/** @description The full address string. */
// @ApiMember(DataType="string", Description="The full address string.", Name="AddressFull", ParameterType="body")
/** @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="body")
/** @var bool|null */
public ?bool $IsPhysical=null,
/** @description Notes about the address. */
// @ApiMember(DataType="string", Description="Notes about the address.", Name="Notes")
/** @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="body")
/** @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="body")
/** @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(
/** @description Address Details */
// @ApiMember(DataType="AddressModel", Description="Address Details", Name="Address", ParameterType="body")
/** @var AddressModel|null */
public ?AddressModel $Address=null,
/** @description True if this is a postal address. */
// @ApiMember(DataType="bool", Description="True if this is a postal address.", Name="IsPostal", ParameterType="body")
/** @var bool|null */
public ?bool $IsPostal=null,
/** @description True if this is the primary address. */
// @ApiMember(DataType="bool", Description="True if this is the primary address.", Name="IsPrimaryLocation", ParameterType="body")
/** @var bool|null */
public ?bool $IsPrimaryLocation=null,
/** @description True if this address is the registered tax address. */
// @ApiMember(DataType="bool", Description="True if this address is the registered tax address.", Name="IsRegisteredLocation", ParameterType="body")
/** @var bool|null */
public ?bool $IsRegisteredLocation=null,
/** @description Suburb Name */
// @ApiMember(DataType="string", Description="Suburb Name", Name="SuburbName", ParameterType="body")
/** @var string|null */
public ?string $SuburbName=null,
/** @description State Name */
// @ApiMember(DataType="string", Description="State Name", Name="StateName", ParameterType="body")
/** @var string|null */
public ?string $StateName=null,
/** @description Country Name */
// @ApiMember(DataType="string", Description="Country Name", Name="CountryName", ParameterType="body")
/** @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(
/** @description Country Code */
// @ApiMember(DataType="string", Description="Country Code", Name="CountryCode", ParameterType="body")
/** @var string|null */
public ?string $CountryCode=null,
/** @description Area Code */
// @ApiMember(DataType="string", Description="Area Code", Name="AreaCode", ParameterType="body")
/** @var string|null */
public ?string $AreaCode=null,
/** @description Local Number */
// @ApiMember(DataType="string", Description="Local Number", Name="LocalNumber", ParameterType="body")
/** @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(
/** @description Id of the Contact Method */
// @ApiMember(DataType="Guid", Description="Id of the Contact Method", Name="ContactMethodId", ParameterType="body")
/** @var string */
public string $ContactMethodId='',
/** @description Contact Method Name */
// @ApiMember(DataType="string", Description="Contact Method Name", Name="ContactMethodName", ParameterType="body")
/** @var string|null */
public ?string $ContactMethodName=null,
/** @description If the contact method is an address, this will contain the address details. */
// @ApiMember(DataType="ContactAddressModel", Description="If the contact method is an address, this will contain the address details.", Name="ContactAddress", ParameterType="body")
/** @var ContactAddressModel|null */
public ?ContactAddressModel $ContactAddress=null,
/** @description If the contact method is a phone, this will contain the phone details */
// @ApiMember(DataType="PhoneModel", Description="If the contact method is a phone, this will contain the phone details", Name="ContactPhone", ParameterType="body")
/** @var PhoneModel|null */
public ?PhoneModel $ContactPhone=null,
/** @description Id of the country */
// @ApiMember(DataType="Guid?", Description="Id of the country", Name="CountryId", ParameterType="body")
/** @var string|null */
public ?string $CountryId=null,
/** @description A summary string representing the contact details */
// @ApiMember(DataType="string", Description="A summary string representing the contact details", Name="ContactDetails", ParameterType="body")
/** @var string|null */
public ?string $ContactDetails=null,
/** @description Notes about the contact details */
// @ApiMember(DataType="string", Description="Notes about the contact details", Name="Notes", ParameterType="body")
/** @var string|null */
public ?string $Notes=null,
/** @description Area Code if contact details are a phone number */
// @ApiMember(DataType="string", Description="Area Code if contact details are a phone number", Name="ContactDetailsCode", ParameterType="body")
/** @var string|null */
public ?string $ContactDetailsCode=null,
/** @description Order number of the contact method */
// @ApiMember(DataType="int", Description="Order number of the contact method", Name="OrderContactMethod", ParameterType="body")
/** @var int */
public int $OrderContactMethod=0,
/** @description True if this is the primary contact method */
// @ApiMember(DataType="bool", Description="True if this is the primary contact method", Name="IsPrimaryContactMethod", ParameterType="body")
/** @var bool|null */
public ?bool $IsPrimaryContactMethod=null,
/** @description True if this contact method is an address */
// @ApiMember(DataType="bool", Description="True if this contact method is an address", Name="IsAddress", ParameterType="body")
/** @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;
}
}
/** @description Updates a Users Profile information' */
// @Api(Description="Updates a Users Profile information'")
class SaveUserProfile implements JsonSerializable
{
public function __construct(
/** @description The users profile Guid. */
// @ApiMember(DataType="Guid", Description="The users profile Guid.", IsRequired=true, Name="UserProfileId", ParameterType="query")
/** @var string */
public string $UserProfileId='',
/** @description The users Guid. This is used for validation to ensure the user in the session is only changing his own user information. */
// @ApiMember(DataType="Guid", Description="The users Guid. This is used for validation to ensure the user in the session is only changing his own user information.", IsRequired=true, Name="UserId", ParameterType="query")
/** @var string */
public string $UserId='',
/** @description The users contact Guid. */
// @ApiMember(DataType="Guid", Description="The users contact Guid.", IsRequired=true, Name="ContactId", ParameterType="query")
/** @var string */
public string $ContactId='',
/** @description The users profile name. */
// @ApiMember(DataType="string", Description="The users profile name.", IsRequired=true, Name="ProfileName", ParameterType="query")
/** @var string */
public string $ProfileName='',
/** @description The users (contact) title. */
// @ApiMember(DataType="string", Description="The users (contact) title.", Name="Title", ParameterType="query")
/** @var string|null */
public ?string $Title=null,
/** @description The users (contact) first name(s). */
// @ApiMember(DataType="string", Description="The users (contact) first name(s).", IsRequired=true, Name="FirstName", ParameterType="query")
/** @var string */
public string $FirstName='',
/** @description The users (contact) surname. */
// @ApiMember(DataType="string", Description="The users (contact) surname.", IsRequired=true, Name="Surname", ParameterType="query")
/** @var string */
public string $Surname='',
/** @description The contact profile description. */
// @ApiMember(DataType="string", Description="The contact profile description.", Name="Description", ParameterType="query")
/** @var string|null */
public ?string $Description=null,
/** @description The contacts profession/trade/industry details. */
// @ApiMember(DataType="string", Description="The contacts profession/trade/industry details.", Name="EmploymentIndustry", ParameterType="query")
/** @var string|null */
public ?string $EmploymentIndustry=null,
/** @description The contact details of who they work/subcontract for. */
// @ApiMember(DataType="string", Description="The contact details of who they work/subcontract for.", Name="EmploymentRole", ParameterType="query")
/** @var string|null */
public ?string $EmploymentRole=null,
/** @description The contacts work area/suburbs. */
// @ApiMember(DataType="string", Description="The contacts work area/suburbs.", Name="EmploymentGeographicArea", ParameterType="query")
/** @var string|null */
public ?string $EmploymentGeographicArea=null,
/** @description The contacts timezone. */
// @ApiMember(DataType="Guid", Description="The contacts timezone.", Name="Timezone", ParameterType="query")
/** @var string */
public string $Timezone='',
/** @description A list of the contact details for the contact. Note: an email must always be set for a business. */
// @ApiMember(DataType="List<ContactDetailModel>", Description="A list of the contact details for the contact. Note: an email must always be set for a business.", IsRequired=true, Name="ContactDetails", ParameterType="query")
/** @var array<ContactDetailModel>|null */
public ?array $ContactDetails=null,
/** @description Type of contact (person, organisation etc.) linked to the profile */
// @ApiMember(DataType="string", Description="Type of contact (person, organisation etc.) linked to the profile", Name="ContactType")
/** @var string */
public string $ContactType='',
/** @description Legal name of contact linked to the profile */
// @ApiMember(DataType="string", Description="Legal name of contact linked to the profile", Name="LegalName")
/** @var string|null */
public ?string $LegalName=null,
/** @description Trading name of contact linked to the profile */
// @ApiMember(DataType="string", Description="Trading name of contact linked to the profile", Name="TradingName")
/** @var string|null */
public ?string $TradingName=null,
/** @description Abn of contact linked to the profile */
// @ApiMember(DataType="string", Description="Abn of contact linked to the profile", Name="Abn")
/** @var string|null */
public ?string $Abn=null,
/** @description Acn of contact linked to the profile */
// @ApiMember(DataType="string", Description="Acn of contact linked to the profile", Name="Acn")
/** @var string|null */
public ?string $Acn=null,
/** @description Arbn of contact linked to the profile */
// @ApiMember(DataType="string", Description="Arbn of contact linked to the profile", Name="Arbn")
/** @var string|null */
public ?string $Arbn=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 Gender Guid of the contact. */
// @ApiMember(DataType="Guid", Description="The Gender Guid of the contact.", Name="GenderId", ParameterType="query")
/** @var string|null */
public ?string $GenderId=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['UserProfileId'])) $this->UserProfileId = $o['UserProfileId'];
if (isset($o['UserId'])) $this->UserId = $o['UserId'];
if (isset($o['ContactId'])) $this->ContactId = $o['ContactId'];
if (isset($o['ProfileName'])) $this->ProfileName = $o['ProfileName'];
if (isset($o['Title'])) $this->Title = $o['Title'];
if (isset($o['FirstName'])) $this->FirstName = $o['FirstName'];
if (isset($o['Surname'])) $this->Surname = $o['Surname'];
if (isset($o['Description'])) $this->Description = $o['Description'];
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['Timezone'])) $this->Timezone = $o['Timezone'];
if (isset($o['ContactDetails'])) $this->ContactDetails = JsonConverters::fromArray('ContactDetailModel', $o['ContactDetails']);
if (isset($o['ContactType'])) $this->ContactType = $o['ContactType'];
if (isset($o['LegalName'])) $this->LegalName = $o['LegalName'];
if (isset($o['TradingName'])) $this->TradingName = $o['TradingName'];
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['GstRegistered'])) $this->GstRegistered = $o['GstRegistered'];
if (isset($o['GenderId'])) $this->GenderId = $o['GenderId'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->UserProfileId)) $o['UserProfileId'] = $this->UserProfileId;
if (isset($this->UserId)) $o['UserId'] = $this->UserId;
if (isset($this->ContactId)) $o['ContactId'] = $this->ContactId;
if (isset($this->ProfileName)) $o['ProfileName'] = $this->ProfileName;
if (isset($this->Title)) $o['Title'] = $this->Title;
if (isset($this->FirstName)) $o['FirstName'] = $this->FirstName;
if (isset($this->Surname)) $o['Surname'] = $this->Surname;
if (isset($this->Description)) $o['Description'] = $this->Description;
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->Timezone)) $o['Timezone'] = $this->Timezone;
if (isset($this->ContactDetails)) $o['ContactDetails'] = JsonConverters::toArray('ContactDetailModel', $this->ContactDetails);
if (isset($this->ContactType)) $o['ContactType'] = $this->ContactType;
if (isset($this->LegalName)) $o['LegalName'] = $this->LegalName;
if (isset($this->TradingName)) $o['TradingName'] = $this->TradingName;
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->GstRegistered)) $o['GstRegistered'] = $this->GstRegistered;
if (isset($this->GenderId)) $o['GenderId'] = $this->GenderId;
return empty($o) ? new class(){} : $o;
}
}
/** @description Updates a Users Profile information' */
// @Api(Description="Updates a Users Profile information'")
class AddBusinessProfile implements JsonSerializable
{
public function __construct(
/** @description The users business profile information to link to their user ID. */
// @ApiMember(DataType="SaveUserProfile", Description="The users business profile information to link to their user ID.", Name="BusinessProfile", ParameterType="query")
/** @var SaveUserProfile|null */
public ?SaveUserProfile $BusinessProfile=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['BusinessProfile'])) $this->BusinessProfile = JsonConverters::from('SaveUserProfile', $o['BusinessProfile']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->BusinessProfile)) $o['BusinessProfile'] = JsonConverters::to('SaveUserProfile', $this->BusinessProfile);
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 /api/profile/business HTTP/1.1
Host: pfapi.pstpf.com.au
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"BusinessProfile":{"UserProfileId":"00000000-0000-0000-0000-000000000000","UserId":"00000000-0000-0000-0000-000000000000","ContactId":"00000000-0000-0000-0000-000000000000","ProfileName":"String","Title":"String","FirstName":"String","Surname":"String","Description":"String","EmploymentIndustry":"String","EmploymentRole":"String","EmploymentGeographicArea":"String","Timezone":"00000000-0000-0000-0000-000000000000","ContactDetails":[{"ContactMethodId":"00000000-0000-0000-0000-000000000000","ContactMethodName":"String","ContactAddress":{"Address":{"DistanceAway":0,"Latitude":0,"Longitude":0,"AddressFormatId":"00000000-0000-0000-0000-000000000000","SuburbId":"00000000-0000-0000-0000-000000000000","SuburbName":"String","StateShortName":"String","PostCode":"String","CountryId":"00000000-0000-0000-0000-000000000000","CountryName":"String","ISOCountryCode":"String","LotNumber":"String","SubUnit":"String","BuildingNumber":"String","StreetNumber":"String","StreetName":"String","AddressLineOne":"String","AddressLineTwo":"String","AddressFull":"String","IsPhysical":false,"Notes":"String","AutoMapCoordinates":false,"LocationCoordinates":{"Latitude":0,"Longitude":0,"Altitude":0,"Accuracy":0,"AltitudeAccuracy":0,"Heading":0,"Speed":0,"VerticalSpeed":0}},"IsPostal":false,"IsPrimaryLocation":false,"IsRegisteredLocation":false,"SuburbName":"String","StateName":"String","CountryName":"String"},"ContactPhone":{"CountryCode":"String","AreaCode":"String","LocalNumber":"String"},"CountryId":"00000000000000000000000000000000","ContactDetails":"String","Notes":"String","ContactDetailsCode":"String","OrderContactMethod":0,"IsPrimaryContactMethod":false,"IsAddress":true}],"ContactType":"00000000-0000-0000-0000-000000000000","LegalName":"String","TradingName":"String","Abn":"String","Acn":"String","Arbn":"String","GstRegistered":false,"GenderId":"00000000000000000000000000000000"}}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"Message":"String","ErrorCode":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"UserProfileId":"00000000-0000-0000-0000-000000000000","ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}