SIRVA.Relocation.Services.InitiationGateway

<back to all web services

TransfereeInitiationRequest

Requires Authentication
The following routes are available for this service:
POST/Initiation/TransfereeInitiates a transferee.
<?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 TransfereeInitiationResponse implements JsonSerializable
{
    public function __construct(
        /** @var ResponseStatus|null */
        public ?ResponseStatus $responseStatus=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['responseStatus'])) $this->responseStatus = JsonConverters::from('ResponseStatus', $o['responseStatus']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->responseStatus)) $o['responseStatus'] = JsonConverters::to('ResponseStatus', $this->responseStatus);
        return empty($o) ? new class(){} : $o;
    }
}

class CustomField implements JsonSerializable
{
    public function __construct(
        /** @description Custom field name */
        // @ApiMember(Description="Custom field name", IsRequired=true)
        /** @var string */
        public string $fieldName='',

        /** @description Custom field value */
        // @ApiMember(Description="Custom field value")
        /** @var string|null */
        public ?string $fieldValue=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['fieldName'])) $this->fieldName = $o['fieldName'];
        if (isset($o['fieldValue'])) $this->fieldValue = $o['fieldValue'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->fieldName)) $o['fieldName'] = $this->fieldName;
        if (isset($this->fieldValue)) $o['fieldValue'] = $this->fieldValue;
        return empty($o) ? new class(){} : $o;
    }
}

class Location implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $title=null,
        /** @var string|null */
        public ?string $city=null,
        /** @var string|null */
        public ?string $stateCode=null,
        /** @var string|null */
        public ?string $countryCode=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['title'])) $this->title = $o['title'];
        if (isset($o['city'])) $this->city = $o['city'];
        if (isset($o['stateCode'])) $this->stateCode = $o['stateCode'];
        if (isset($o['countryCode'])) $this->countryCode = $o['countryCode'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->title)) $o['title'] = $this->title;
        if (isset($this->city)) $o['city'] = $this->city;
        if (isset($this->stateCode)) $o['stateCode'] = $this->stateCode;
        if (isset($this->countryCode)) $o['countryCode'] = $this->countryCode;
        return empty($o) ? new class(){} : $o;
    }
}

class Address extends Location implements JsonSerializable
{
    /**
     * @param string|null $title
     * @param string|null $city
     * @param string|null $stateCode
     * @param string|null $countryCode
     */
    public function __construct(
        ?string $title=null,
        ?string $city=null,
        ?string $stateCode=null,
        ?string $countryCode=null,
        /** @var string|null */
        public ?string $line1=null,
        /** @var string|null */
        public ?string $line2=null,
        /** @var string|null */
        public ?string $line3=null,
        /** @var string|null */
        public ?string $postalCode=null
    ) {
        parent::__construct($title,$city,$stateCode,$countryCode);
    }

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
        if (isset($o['line1'])) $this->line1 = $o['line1'];
        if (isset($o['line2'])) $this->line2 = $o['line2'];
        if (isset($o['line3'])) $this->line3 = $o['line3'];
        if (isset($o['postalCode'])) $this->postalCode = $o['postalCode'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        if (isset($this->line1)) $o['line1'] = $this->line1;
        if (isset($this->line2)) $o['line2'] = $this->line2;
        if (isset($this->line3)) $o['line3'] = $this->line3;
        if (isset($this->postalCode)) $o['postalCode'] = $this->postalCode;
        return empty($o) ? new class(){} : $o;
    }
}

enum MaritalStatus : string
{
    case Single = 'Single';
    case Married = 'Married';
    case DomesticPartner = 'DomesticPartner';
    case Divorcee = 'Divorcee';
    case Defacto = 'Defacto';
    case Other = 'Other';
    case Separated = 'Separated';
    case Interdependent = 'Interdependent';
    case Widowed = 'Widowed';
    case Divorced = 'Divorced';
}

enum HomeOwnerStatus : string
{
    case Homeowner = 'Homeowner';
    case Renter = 'Renter';
}

class SpousePartner implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $firstName=null,
        /** @var string|null */
        public ?string $lastName=null,
        /** @var DateTime|null */
        public ?DateTime $birthDate=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['birthDate'])) $this->birthDate = JsonConverters::from('DateTime', $o['birthDate']);
    }
    
    /** @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->birthDate)) $o['birthDate'] = JsonConverters::to('DateTime', $this->birthDate);
        return empty($o) ? new class(){} : $o;
    }
}

enum DependentAssigneeRelationship : string
{
    case Child = 'Child';
    case Other = 'Other';
}

class Dependent implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $firstName=null,
        /** @var string|null */
        public ?string $lastName=null,
        /** @var DateTime|null */
        public ?DateTime $birthDate=null,
        // @ApiMember(IsRequired=true, Name="RelationshipToAssignee")
        /** @var DependentAssigneeRelationship|null */
        public ?DependentAssigneeRelationship $relationshipToAssignee=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['birthDate'])) $this->birthDate = JsonConverters::from('DateTime', $o['birthDate']);
        if (isset($o['relationshipToAssignee'])) $this->relationshipToAssignee = JsonConverters::from('DependentAssigneeRelationship', $o['relationshipToAssignee']);
    }
    
    /** @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->birthDate)) $o['birthDate'] = JsonConverters::to('DateTime', $this->birthDate);
        if (isset($this->relationshipToAssignee)) $o['relationshipToAssignee'] = JsonConverters::to('DependentAssigneeRelationship', $this->relationshipToAssignee);
        return empty($o) ? new class(){} : $o;
    }
}

class ServiceData implements JsonSerializable
{
    public function __construct(
        /** @description Service data field name */
        // @ApiMember(Description="Service data field name", IsRequired=true)
        /** @var string */
        public string $fieldName='',

        /** @description Service data field value */
        // @ApiMember(Description="Service data field value", IsRequired=true)
        /** @var string */
        public string $fieldValue=''
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['fieldName'])) $this->fieldName = $o['fieldName'];
        if (isset($o['fieldValue'])) $this->fieldValue = $o['fieldValue'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->fieldName)) $o['fieldName'] = $this->fieldName;
        if (isset($this->fieldValue)) $o['fieldValue'] = $this->fieldValue;
        return empty($o) ? new class(){} : $o;
    }
}

class Service implements JsonSerializable
{
    public function __construct(
        /** @description Service name */
        // @ApiMember(Description="Service name", IsRequired=true)
        /** @var string */
        public string $name='',

        /** @description Service data */
        // @ApiMember(Description="Service data")
        /** @var array<ServiceData>|null */
        public ?array $data=null,

        /** @description Cancel */
        // @ApiMember(Description="Cancel")
        /** @var string|null */
        public ?string $cancel=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['name'])) $this->name = $o['name'];
        if (isset($o['data'])) $this->data = JsonConverters::fromArray('ServiceData', $o['data']);
        if (isset($o['cancel'])) $this->cancel = $o['cancel'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->name)) $o['name'] = $this->name;
        if (isset($this->data)) $o['data'] = JsonConverters::toArray('ServiceData', $this->data);
        if (isset($this->cancel)) $o['cancel'] = $this->cancel;
        return empty($o) ? new class(){} : $o;
    }
}

class TransfereeInitiation implements JsonSerializable
{
    public function __construct(
        /** @description Client ID */
        // @ApiMember(Description="Client ID")
        /** @var string|null */
        public ?string $clientId=null,

        /** @description External ID. This must be unique to the intiation's parent client */
        // @ApiMember(Description="External ID. This must be unique to the intiation's parent client", IsRequired=true)
        /** @var string */
        public string $externalId='',

        /** @description Transferee first name */
        // @ApiMember(Description="Transferee first name", IsRequired=true)
        /** @var string */
        public string $firstName='',

        /** @description Transferee last name */
        // @ApiMember(Description="Transferee last name", IsRequired=true)
        /** @var string */
        public string $lastName='',

        /** @description Assignment type */
        // @ApiMember(Description="Assignment type")
        /** @var string|null */
        public ?string $assignmentType=null,

        /** @description Is this transferee pre-decision */
        // @ApiMember(Description="Is this transferee pre-decision")
        /** @var bool|null */
        public ?bool $preDecision=null,

        /** @description Is this transferee a VIP */
        // @ApiMember(Description="Is this transferee a VIP")
        /** @var bool|null */
        public ?bool $vip=null,

        /** @description Custom fields */
        // @ApiMember(Description="Custom fields")
        /** @var array<CustomField>|null */
        public ?array $customFields=null,

        /** @description Employee ID */
        // @ApiMember(Description="Employee ID")
        /** @var string|null */
        public ?string $employeeId=null,

        /** @description Start date */
        // @ApiMember(Description="Start date")
        /** @var DateTime|null */
        public ?DateTime $startDate=null,

        /** @description End date */
        // @ApiMember(Description="End date")
        /** @var DateTime|null */
        public ?DateTime $endDate=null,

        /** @description Origin work location */
        // @ApiMember(Description="Origin work location", IsRequired=true)
        /** @var Location|null */
        public ?Location $originWorkLocation=null,

        /** @description Origin home address */
        // @ApiMember(Description="Origin home address", IsRequired=true)
        /** @var Address|null */
        public ?Address $originHomeAddress=null,

        /** @description Destination work location */
        // @ApiMember(Description="Destination work location", IsRequired=true)
        /** @var Location|null */
        public ?Location $destinationWorkLocation=null,

        /** @description Repat */
        // @ApiMember(Description="Repat")
        /** @var string|null */
        public ?string $repat=null,

        /** @description Repat From City */
        // @ApiMember(Description="Repat From City")
        /** @var string|null */
        public ?string $repatFromCity=null,

        /** @description Repat From State code */
        // @ApiMember(Description="Repat From State code")
        /** @var string|null */
        public ?string $repatFromStateCode=null,

        /** @description Repat From Country Code */
        // @ApiMember(Description="Repat From Country Code")
        /** @var string|null */
        public ?string $repatFromCountryCode=null,

        /** @description Repat To City */
        // @ApiMember(Description="Repat To City")
        /** @var string|null */
        public ?string $repatToCity=null,

        /** @description Repat To State Code */
        // @ApiMember(Description="Repat To State Code")
        /** @var string|null */
        public ?string $repatToStateCode=null,

        /** @description Repat To Country Code */
        // @ApiMember(Description="Repat To Country Code")
        /** @var string|null */
        public ?string $repatToCountryCode=null,

        /** @description Transferee citizenship country */
        // @ApiMember(Description="Transferee citizenship country")
        /** @var string|null */
        public ?string $citizenshipCountry=null,

        /** @description Transferee dual citizenship country */
        // @ApiMember(Description="Transferee dual citizenship country")
        /** @var string|null */
        public ?string $dualCitizenshipCountry=null,

        /** @description Policy */
        // @ApiMember(Description="Policy", IsRequired=true)
        /** @var string */
        public string $policy='',

        /** @description Job title */
        // @ApiMember(Description="Job title")
        /** @var string|null */
        public ?string $jobTitle=null,

        /** @description Marital status */
        // @ApiMember(Description="Marital status", Name="MaritalStatus")
        /** @var MaritalStatus|null */
        public ?MaritalStatus $maritalStatus=null,

        /** @description Pay grade */
        // @ApiMember(Description="Pay grade")
        /** @var string|null */
        public ?string $payGrade=null,

        /** @description Assignment family size */
        // @ApiMember(Description="Assignment family size")
        /** @var int|null */
        public ?int $assignmentFamilySize=null,

        /** @description Home owner status */
        // @ApiMember(Description="Home owner status", Name="HomeOwnerStatus")
        /** @var HomeOwnerStatus|null */
        public ?HomeOwnerStatus $homeOwnerStatus=null,

        /** @description Line of business */
        // @ApiMember(Description="Line of business", IsRequired=true)
        /** @var string */
        public string $lineOfBusiness='',

        /** @description HostCurrency */
        // @ApiMember(Description="HostCurrency")
        /** @var string|null */
        public ?string $hostCurrency=null,

        /** @description ServiceLevel */
        // @ApiMember(Description="ServiceLevel")
        /** @var string|null */
        public ?string $serviceLevel=null,

        /** @description CompanyCodePrimary */
        // @ApiMember(Description="CompanyCodePrimary")
        /** @var string|null */
        public ?string $companyCodePrimary=null,

        /** @description CompanyCodeSecondary */
        // @ApiMember(Description="CompanyCodeSecondary")
        /** @var string|null */
        public ?string $companyCodeSecondary=null,

        /** @description CostCenterPrimary */
        // @ApiMember(Description="CostCenterPrimary")
        /** @var string|null */
        public ?string $costCenterPrimary=null,

        /** @description CostCenterSecondary */
        // @ApiMember(Description="CostCenterSecondary")
        /** @var string|null */
        public ?string $costCenterSecondary=null,

        /** @description CostCenterTertiary */
        // @ApiMember(Description="CostCenterTertiary")
        /** @var string|null */
        public ?string $costCenterTertiary=null,

        /** @description Is the assignment confidential */
        // @ApiMember(Description="Is the assignment confidential")
        /** @var bool|null */
        public ?bool $confidential=null,

        /** @description Special Instructions */
        // @ApiMember(Description="Special Instructions")
        /** @var string|null */
        public ?string $specialInstructions=null,

        /** @description Destination entity legal name */
        // @ApiMember(Description="Destination entity legal name")
        /** @var string|null */
        public ?string $destinationEntityLegalName=null,

        /** @description Transferee mobile phone number */
        // @ApiMember(Description="Transferee mobile phone number", IsRequired=true)
        /** @var string */
        public string $mobilePhoneNumber='',

        /** @description Transferee work phone number */
        // @ApiMember(Description="Transferee work phone number")
        /** @var string|null */
        public ?string $workPhoneNumber=null,

        /** @description Transferee home phone number */
        // @ApiMember(Description="Transferee home phone number")
        /** @var string|null */
        public ?string $homePhoneNumber=null,

        /** @description Transferee primary email */
        // @ApiMember(Description="Transferee primary email", IsRequired=true)
        /** @var string */
        public string $primaryEmail='',

        /** @description Transferee secondary email */
        // @ApiMember(Description="Transferee secondary email")
        /** @var string|null */
        public ?string $secondaryEmail=null,

        /** @description HR Contact First Name */
        // @ApiMember(Description="HR Contact First Name")
        /** @var string|null */
        public ?string $hrContactFirstName=null,

        /** @description HR Contact Last Name */
        // @ApiMember(Description="HR Contact Last Name")
        /** @var string|null */
        public ?string $hrContactLastName=null,

        /** @description HR contact full name */
        // @ApiMember(Description="HR contact full name")
        /** @var string|null */
        public ?string $hrContactFullName=null,

        /** @description Transferee annual salary */
        // @ApiMember(Description="Transferee annual salary")
        /** @var string|null */
        public ?string $annualSalary=null,

        /** @description Transferee spouse/partner */
        // @ApiMember(Description="Transferee spouse/partner")
        /** @var SpousePartner|null */
        public ?SpousePartner $spousePartner=null,

        /** @description Transferee dependents */
        // @ApiMember(Description="Transferee dependents")
        /** @var array<Dependent>|null */
        public ?array $dependents=null,

        /** @description Assignment Services */
        // @ApiMember(Description="Assignment Services")
        /** @var array<Service>|null */
        public ?array $services=null,

        /** @description Relocation Status */
        // @ApiMember(Description="Relocation Status")
        /** @var string|null */
        public ?string $relocationStatus=null,

        /** @description Cancel */
        // @ApiMember(Description="Cancel")
        /** @var string|null */
        public ?string $cancel=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['clientId'])) $this->clientId = $o['clientId'];
        if (isset($o['externalId'])) $this->externalId = $o['externalId'];
        if (isset($o['firstName'])) $this->firstName = $o['firstName'];
        if (isset($o['lastName'])) $this->lastName = $o['lastName'];
        if (isset($o['assignmentType'])) $this->assignmentType = $o['assignmentType'];
        if (isset($o['preDecision'])) $this->preDecision = $o['preDecision'];
        if (isset($o['vip'])) $this->vip = $o['vip'];
        if (isset($o['customFields'])) $this->customFields = JsonConverters::fromArray('CustomField', $o['customFields']);
        if (isset($o['employeeId'])) $this->employeeId = $o['employeeId'];
        if (isset($o['startDate'])) $this->startDate = JsonConverters::from('DateTime', $o['startDate']);
        if (isset($o['endDate'])) $this->endDate = JsonConverters::from('DateTime', $o['endDate']);
        if (isset($o['originWorkLocation'])) $this->originWorkLocation = JsonConverters::from('Location', $o['originWorkLocation']);
        if (isset($o['originHomeAddress'])) $this->originHomeAddress = JsonConverters::from('Address', $o['originHomeAddress']);
        if (isset($o['destinationWorkLocation'])) $this->destinationWorkLocation = JsonConverters::from('Location', $o['destinationWorkLocation']);
        if (isset($o['repat'])) $this->repat = $o['repat'];
        if (isset($o['repatFromCity'])) $this->repatFromCity = $o['repatFromCity'];
        if (isset($o['repatFromStateCode'])) $this->repatFromStateCode = $o['repatFromStateCode'];
        if (isset($o['repatFromCountryCode'])) $this->repatFromCountryCode = $o['repatFromCountryCode'];
        if (isset($o['repatToCity'])) $this->repatToCity = $o['repatToCity'];
        if (isset($o['repatToStateCode'])) $this->repatToStateCode = $o['repatToStateCode'];
        if (isset($o['repatToCountryCode'])) $this->repatToCountryCode = $o['repatToCountryCode'];
        if (isset($o['citizenshipCountry'])) $this->citizenshipCountry = $o['citizenshipCountry'];
        if (isset($o['dualCitizenshipCountry'])) $this->dualCitizenshipCountry = $o['dualCitizenshipCountry'];
        if (isset($o['policy'])) $this->policy = $o['policy'];
        if (isset($o['jobTitle'])) $this->jobTitle = $o['jobTitle'];
        if (isset($o['maritalStatus'])) $this->maritalStatus = JsonConverters::from('MaritalStatus', $o['maritalStatus']);
        if (isset($o['payGrade'])) $this->payGrade = $o['payGrade'];
        if (isset($o['assignmentFamilySize'])) $this->assignmentFamilySize = $o['assignmentFamilySize'];
        if (isset($o['homeOwnerStatus'])) $this->homeOwnerStatus = JsonConverters::from('HomeOwnerStatus', $o['homeOwnerStatus']);
        if (isset($o['lineOfBusiness'])) $this->lineOfBusiness = $o['lineOfBusiness'];
        if (isset($o['hostCurrency'])) $this->hostCurrency = $o['hostCurrency'];
        if (isset($o['serviceLevel'])) $this->serviceLevel = $o['serviceLevel'];
        if (isset($o['companyCodePrimary'])) $this->companyCodePrimary = $o['companyCodePrimary'];
        if (isset($o['companyCodeSecondary'])) $this->companyCodeSecondary = $o['companyCodeSecondary'];
        if (isset($o['costCenterPrimary'])) $this->costCenterPrimary = $o['costCenterPrimary'];
        if (isset($o['costCenterSecondary'])) $this->costCenterSecondary = $o['costCenterSecondary'];
        if (isset($o['costCenterTertiary'])) $this->costCenterTertiary = $o['costCenterTertiary'];
        if (isset($o['confidential'])) $this->confidential = $o['confidential'];
        if (isset($o['specialInstructions'])) $this->specialInstructions = $o['specialInstructions'];
        if (isset($o['destinationEntityLegalName'])) $this->destinationEntityLegalName = $o['destinationEntityLegalName'];
        if (isset($o['mobilePhoneNumber'])) $this->mobilePhoneNumber = $o['mobilePhoneNumber'];
        if (isset($o['workPhoneNumber'])) $this->workPhoneNumber = $o['workPhoneNumber'];
        if (isset($o['homePhoneNumber'])) $this->homePhoneNumber = $o['homePhoneNumber'];
        if (isset($o['primaryEmail'])) $this->primaryEmail = $o['primaryEmail'];
        if (isset($o['secondaryEmail'])) $this->secondaryEmail = $o['secondaryEmail'];
        if (isset($o['hrContactFirstName'])) $this->hrContactFirstName = $o['hrContactFirstName'];
        if (isset($o['hrContactLastName'])) $this->hrContactLastName = $o['hrContactLastName'];
        if (isset($o['hrContactFullName'])) $this->hrContactFullName = $o['hrContactFullName'];
        if (isset($o['annualSalary'])) $this->annualSalary = $o['annualSalary'];
        if (isset($o['spousePartner'])) $this->spousePartner = JsonConverters::from('SpousePartner', $o['spousePartner']);
        if (isset($o['dependents'])) $this->dependents = JsonConverters::fromArray('Dependent', $o['dependents']);
        if (isset($o['services'])) $this->services = JsonConverters::fromArray('Service', $o['services']);
        if (isset($o['relocationStatus'])) $this->relocationStatus = $o['relocationStatus'];
        if (isset($o['cancel'])) $this->cancel = $o['cancel'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->clientId)) $o['clientId'] = $this->clientId;
        if (isset($this->externalId)) $o['externalId'] = $this->externalId;
        if (isset($this->firstName)) $o['firstName'] = $this->firstName;
        if (isset($this->lastName)) $o['lastName'] = $this->lastName;
        if (isset($this->assignmentType)) $o['assignmentType'] = $this->assignmentType;
        if (isset($this->preDecision)) $o['preDecision'] = $this->preDecision;
        if (isset($this->vip)) $o['vip'] = $this->vip;
        if (isset($this->customFields)) $o['customFields'] = JsonConverters::toArray('CustomField', $this->customFields);
        if (isset($this->employeeId)) $o['employeeId'] = $this->employeeId;
        if (isset($this->startDate)) $o['startDate'] = JsonConverters::to('DateTime', $this->startDate);
        if (isset($this->endDate)) $o['endDate'] = JsonConverters::to('DateTime', $this->endDate);
        if (isset($this->originWorkLocation)) $o['originWorkLocation'] = JsonConverters::to('Location', $this->originWorkLocation);
        if (isset($this->originHomeAddress)) $o['originHomeAddress'] = JsonConverters::to('Address', $this->originHomeAddress);
        if (isset($this->destinationWorkLocation)) $o['destinationWorkLocation'] = JsonConverters::to('Location', $this->destinationWorkLocation);
        if (isset($this->repat)) $o['repat'] = $this->repat;
        if (isset($this->repatFromCity)) $o['repatFromCity'] = $this->repatFromCity;
        if (isset($this->repatFromStateCode)) $o['repatFromStateCode'] = $this->repatFromStateCode;
        if (isset($this->repatFromCountryCode)) $o['repatFromCountryCode'] = $this->repatFromCountryCode;
        if (isset($this->repatToCity)) $o['repatToCity'] = $this->repatToCity;
        if (isset($this->repatToStateCode)) $o['repatToStateCode'] = $this->repatToStateCode;
        if (isset($this->repatToCountryCode)) $o['repatToCountryCode'] = $this->repatToCountryCode;
        if (isset($this->citizenshipCountry)) $o['citizenshipCountry'] = $this->citizenshipCountry;
        if (isset($this->dualCitizenshipCountry)) $o['dualCitizenshipCountry'] = $this->dualCitizenshipCountry;
        if (isset($this->policy)) $o['policy'] = $this->policy;
        if (isset($this->jobTitle)) $o['jobTitle'] = $this->jobTitle;
        if (isset($this->maritalStatus)) $o['maritalStatus'] = JsonConverters::to('MaritalStatus', $this->maritalStatus);
        if (isset($this->payGrade)) $o['payGrade'] = $this->payGrade;
        if (isset($this->assignmentFamilySize)) $o['assignmentFamilySize'] = $this->assignmentFamilySize;
        if (isset($this->homeOwnerStatus)) $o['homeOwnerStatus'] = JsonConverters::to('HomeOwnerStatus', $this->homeOwnerStatus);
        if (isset($this->lineOfBusiness)) $o['lineOfBusiness'] = $this->lineOfBusiness;
        if (isset($this->hostCurrency)) $o['hostCurrency'] = $this->hostCurrency;
        if (isset($this->serviceLevel)) $o['serviceLevel'] = $this->serviceLevel;
        if (isset($this->companyCodePrimary)) $o['companyCodePrimary'] = $this->companyCodePrimary;
        if (isset($this->companyCodeSecondary)) $o['companyCodeSecondary'] = $this->companyCodeSecondary;
        if (isset($this->costCenterPrimary)) $o['costCenterPrimary'] = $this->costCenterPrimary;
        if (isset($this->costCenterSecondary)) $o['costCenterSecondary'] = $this->costCenterSecondary;
        if (isset($this->costCenterTertiary)) $o['costCenterTertiary'] = $this->costCenterTertiary;
        if (isset($this->confidential)) $o['confidential'] = $this->confidential;
        if (isset($this->specialInstructions)) $o['specialInstructions'] = $this->specialInstructions;
        if (isset($this->destinationEntityLegalName)) $o['destinationEntityLegalName'] = $this->destinationEntityLegalName;
        if (isset($this->mobilePhoneNumber)) $o['mobilePhoneNumber'] = $this->mobilePhoneNumber;
        if (isset($this->workPhoneNumber)) $o['workPhoneNumber'] = $this->workPhoneNumber;
        if (isset($this->homePhoneNumber)) $o['homePhoneNumber'] = $this->homePhoneNumber;
        if (isset($this->primaryEmail)) $o['primaryEmail'] = $this->primaryEmail;
        if (isset($this->secondaryEmail)) $o['secondaryEmail'] = $this->secondaryEmail;
        if (isset($this->hrContactFirstName)) $o['hrContactFirstName'] = $this->hrContactFirstName;
        if (isset($this->hrContactLastName)) $o['hrContactLastName'] = $this->hrContactLastName;
        if (isset($this->hrContactFullName)) $o['hrContactFullName'] = $this->hrContactFullName;
        if (isset($this->annualSalary)) $o['annualSalary'] = $this->annualSalary;
        if (isset($this->spousePartner)) $o['spousePartner'] = JsonConverters::to('SpousePartner', $this->spousePartner);
        if (isset($this->dependents)) $o['dependents'] = JsonConverters::toArray('Dependent', $this->dependents);
        if (isset($this->services)) $o['services'] = JsonConverters::toArray('Service', $this->services);
        if (isset($this->relocationStatus)) $o['relocationStatus'] = $this->relocationStatus;
        if (isset($this->cancel)) $o['cancel'] = $this->cancel;
        return empty($o) ? new class(){} : $o;
    }
}

class TransfereeInitiationRequest implements IRequireClientScoped, IPost, JsonSerializable
{
    public function __construct(
        /** @description Transferee initiation info needed for creation. */
        // @ApiMember(Description="Transferee initiation info needed for creation.", IsRequired=true, ParameterType="body")
        /** @var TransfereeInitiation|null */
        public ?TransfereeInitiation $initiationInfo=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['initiationInfo'])) $this->initiationInfo = JsonConverters::from('TransfereeInitiation', $o['initiationInfo']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->initiationInfo)) $o['initiationInfo'] = JsonConverters::to('TransfereeInitiation', $this->initiationInfo);
        return empty($o) ? new class(){} : $o;
    }
}

PHP TransfereeInitiationRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /Initiation/Transferee HTTP/1.1 
Host: initiation-api-test.sirva.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	initiationInfo: 
	{
		clientId: String,
		externalId: String,
		firstName: String,
		lastName: String,
		assignmentType: String,
		preDecision: False,
		vip: False,
		customFields: 
		[
			{
				fieldName: String,
				fieldValue: String
			}
		],
		employeeId: String,
		startDate: 0001-01-01,
		endDate: 0001-01-01,
		originWorkLocation: 
		{
			title: String,
			city: String,
			stateCode: String,
			countryCode: String
		},
		originHomeAddress: 
		{
			line1: String,
			line2: String,
			line3: String,
			postalCode: String,
			title: String,
			city: String,
			stateCode: String,
			countryCode: String
		},
		destinationWorkLocation: 
		{
			title: String,
			city: String,
			stateCode: String,
			countryCode: String
		},
		repat: String,
		repatFromCity: String,
		repatFromStateCode: String,
		repatFromCountryCode: String,
		repatToCity: String,
		repatToStateCode: String,
		repatToCountryCode: String,
		citizenshipCountry: String,
		dualCitizenshipCountry: String,
		policy: String,
		jobTitle: String,
		maritalStatus: Single,
		payGrade: String,
		assignmentFamilySize: 0,
		homeOwnerStatus: Homeowner,
		lineOfBusiness: String,
		hostCurrency: String,
		serviceLevel: String,
		companyCodePrimary: String,
		companyCodeSecondary: String,
		costCenterPrimary: String,
		costCenterSecondary: String,
		costCenterTertiary: String,
		confidential: False,
		specialInstructions: String,
		destinationEntityLegalName: String,
		mobilePhoneNumber: String,
		workPhoneNumber: String,
		homePhoneNumber: String,
		primaryEmail: String,
		secondaryEmail: String,
		hrContactFirstName: String,
		hrContactLastName: String,
		hrContactFullName: String,
		annualSalary: String,
		spousePartner: 
		{
			firstName: String,
			lastName: String,
			birthDate: 0001-01-01
		},
		dependents: 
		[
			{
				firstName: String,
				lastName: String,
				birthDate: 0001-01-01,
				relationshipToAssignee: Child
			}
		],
		services: 
		[
			{
				name: String,
				data: 
				[
					{
						fieldName: String,
						fieldValue: String
					}
				],
				cancel: String
			}
		],
		relocationStatus: String,
		cancel: String
	}
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	responseStatus: 
	{
		errorCode: String,
		message: String,
		stackTrace: String,
		errors: 
		[
			{
				errorCode: String,
				fieldName: String,
				message: String,
				meta: 
				{
					String: String
				}
			}
		],
		meta: 
		{
			String: String
		}
	}
}