| GET,OPTIONS | /v1/staff/posting/detail |
|---|
<?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 StaffPostingDto implements JsonSerializable
{
public function __construct(
/** @var int */
public int $StaffPostingID=0,
/** @var string|null */
public ?string $PositionTag=null,
/** @var string|null */
public ?string $Title=null,
/** @var string|null */
public ?string $Body=null,
/** @var float */
public float $RateTarget=0.0,
/** @var string|null */
public ?string $LocationText=null,
/** @var string|null */
public ?string $WindowText=null,
/** @var array<string>|null */
public ?array $Sites=null,
/** @var string|null */
public ?string $Status=null,
/** @var string|null */
public ?string $ApplyUrl=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['StaffPostingID'])) $this->StaffPostingID = $o['StaffPostingID'];
if (isset($o['PositionTag'])) $this->PositionTag = $o['PositionTag'];
if (isset($o['Title'])) $this->Title = $o['Title'];
if (isset($o['Body'])) $this->Body = $o['Body'];
if (isset($o['RateTarget'])) $this->RateTarget = $o['RateTarget'];
if (isset($o['LocationText'])) $this->LocationText = $o['LocationText'];
if (isset($o['WindowText'])) $this->WindowText = $o['WindowText'];
if (isset($o['Sites'])) $this->Sites = JsonConverters::fromArray('string', $o['Sites']);
if (isset($o['Status'])) $this->Status = $o['Status'];
if (isset($o['ApplyUrl'])) $this->ApplyUrl = $o['ApplyUrl'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->StaffPostingID)) $o['StaffPostingID'] = $this->StaffPostingID;
if (isset($this->PositionTag)) $o['PositionTag'] = $this->PositionTag;
if (isset($this->Title)) $o['Title'] = $this->Title;
if (isset($this->Body)) $o['Body'] = $this->Body;
if (isset($this->RateTarget)) $o['RateTarget'] = $this->RateTarget;
if (isset($this->LocationText)) $o['LocationText'] = $this->LocationText;
if (isset($this->WindowText)) $o['WindowText'] = $this->WindowText;
if (isset($this->Sites)) $o['Sites'] = JsonConverters::toArray('string', $this->Sites);
if (isset($this->Status)) $o['Status'] = $this->Status;
if (isset($this->ApplyUrl)) $o['ApplyUrl'] = $this->ApplyUrl;
return empty($o) ? new class(){} : $o;
}
}
class StaffApplicantDto implements JsonSerializable
{
public function __construct(
/** @var int */
public int $StaffApplicantID=0,
/** @var string|null */
public ?string $Name=null,
/** @var string|null */
public ?string $Source=null,
/** @var int */
public int $YearsExperience=0,
/** @var float */
public float $AskRate=0.0,
/** @var int */
public int $DistanceMi=0,
/** @var string|null */
public ?string $Base=null,
/** @var string|null */
public ?string $FitTier=null,
/** @var int */
public int $FitScore=0,
/** @var array<string>|null */
public ?array $MatchedSkills=null,
/** @var array<string>|null */
public ?array $Reasons=null,
/** @var string|null */
public ?string $ResumeText=null,
/** @var string|null */
public ?string $Status=null,
/** @var string|null */
public ?string $InterviewSlot=null,
/** @var string|null */
public ?string $Ago=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['StaffApplicantID'])) $this->StaffApplicantID = $o['StaffApplicantID'];
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['Source'])) $this->Source = $o['Source'];
if (isset($o['YearsExperience'])) $this->YearsExperience = $o['YearsExperience'];
if (isset($o['AskRate'])) $this->AskRate = $o['AskRate'];
if (isset($o['DistanceMi'])) $this->DistanceMi = $o['DistanceMi'];
if (isset($o['Base'])) $this->Base = $o['Base'];
if (isset($o['FitTier'])) $this->FitTier = $o['FitTier'];
if (isset($o['FitScore'])) $this->FitScore = $o['FitScore'];
if (isset($o['MatchedSkills'])) $this->MatchedSkills = JsonConverters::fromArray('string', $o['MatchedSkills']);
if (isset($o['Reasons'])) $this->Reasons = JsonConverters::fromArray('string', $o['Reasons']);
if (isset($o['ResumeText'])) $this->ResumeText = $o['ResumeText'];
if (isset($o['Status'])) $this->Status = $o['Status'];
if (isset($o['InterviewSlot'])) $this->InterviewSlot = $o['InterviewSlot'];
if (isset($o['Ago'])) $this->Ago = $o['Ago'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->StaffApplicantID)) $o['StaffApplicantID'] = $this->StaffApplicantID;
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->Source)) $o['Source'] = $this->Source;
if (isset($this->YearsExperience)) $o['YearsExperience'] = $this->YearsExperience;
if (isset($this->AskRate)) $o['AskRate'] = $this->AskRate;
if (isset($this->DistanceMi)) $o['DistanceMi'] = $this->DistanceMi;
if (isset($this->Base)) $o['Base'] = $this->Base;
if (isset($this->FitTier)) $o['FitTier'] = $this->FitTier;
if (isset($this->FitScore)) $o['FitScore'] = $this->FitScore;
if (isset($this->MatchedSkills)) $o['MatchedSkills'] = JsonConverters::toArray('string', $this->MatchedSkills);
if (isset($this->Reasons)) $o['Reasons'] = JsonConverters::toArray('string', $this->Reasons);
if (isset($this->ResumeText)) $o['ResumeText'] = $this->ResumeText;
if (isset($this->Status)) $o['Status'] = $this->Status;
if (isset($this->InterviewSlot)) $o['InterviewSlot'] = $this->InterviewSlot;
if (isset($this->Ago)) $o['Ago'] = $this->Ago;
return empty($o) ? new class(){} : $o;
}
}
class StaffPostingResponse implements JsonSerializable
{
public function __construct(
/** @var ResponseStatus|null */
public ?ResponseStatus $ResponseStatus=null,
/** @var StaffPostingDto|null */
public ?StaffPostingDto $Posting=null,
/** @var array<StaffApplicantDto>|null */
public ?array $Applicants=null,
/** @var int */
public int $ApplicantTotal=0,
/** @var int */
public int $ApplicantStrong=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ResponseStatus'])) $this->ResponseStatus = JsonConverters::from('ResponseStatus', $o['ResponseStatus']);
if (isset($o['Posting'])) $this->Posting = JsonConverters::from('StaffPostingDto', $o['Posting']);
if (isset($o['Applicants'])) $this->Applicants = JsonConverters::fromArray('StaffApplicantDto', $o['Applicants']);
if (isset($o['ApplicantTotal'])) $this->ApplicantTotal = $o['ApplicantTotal'];
if (isset($o['ApplicantStrong'])) $this->ApplicantStrong = $o['ApplicantStrong'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ResponseStatus)) $o['ResponseStatus'] = JsonConverters::to('ResponseStatus', $this->ResponseStatus);
if (isset($this->Posting)) $o['Posting'] = JsonConverters::to('StaffPostingDto', $this->Posting);
if (isset($this->Applicants)) $o['Applicants'] = JsonConverters::toArray('StaffApplicantDto', $this->Applicants);
if (isset($this->ApplicantTotal)) $o['ApplicantTotal'] = $this->ApplicantTotal;
if (isset($this->ApplicantStrong)) $o['ApplicantStrong'] = $this->ApplicantStrong;
return empty($o) ? new class(){} : $o;
}
}
class StaffPostingGetRequest implements JsonSerializable
{
public function __construct(
/** @var int */
public int $PlaceholderContactID=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['PlaceholderContactID'])) $this->PlaceholderContactID = $o['PlaceholderContactID'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->PlaceholderContactID)) $o['PlaceholderContactID'] = $this->PlaceholderContactID;
return empty($o) ? new class(){} : $o;
}
}
PHP StaffPostingGetRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v1/staff/posting/detail HTTP/1.1 Host: api.dev.dynamics.trendsic.com Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<StaffPostingResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<ApplicantStrong>0</ApplicantStrong>
<ApplicantTotal>0</ApplicantTotal>
<Applicants>
<StaffApplicantDto>
<Ago>String</Ago>
<AskRate>0</AskRate>
<Base>String</Base>
<DistanceMi>0</DistanceMi>
<FitScore>0</FitScore>
<FitTier>String</FitTier>
<InterviewSlot>String</InterviewSlot>
<MatchedSkills xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:string>String</d4p1:string>
</MatchedSkills>
<Name>String</Name>
<Reasons xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:string>String</d4p1:string>
</Reasons>
<ResumeText>String</ResumeText>
<Source>String</Source>
<StaffApplicantID>0</StaffApplicantID>
<Status>String</Status>
<YearsExperience>0</YearsExperience>
</StaffApplicantDto>
</Applicants>
<Posting>
<ApplyUrl>String</ApplyUrl>
<Body>String</Body>
<LocationText>String</LocationText>
<PositionTag>String</PositionTag>
<RateTarget>0</RateTarget>
<Sites xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:string>String</d3p1:string>
</Sites>
<StaffPostingID>0</StaffPostingID>
<Status>String</Status>
<Title>String</Title>
<WindowText>String</WindowText>
</Posting>
<ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:Message>String</d2p1:Message>
<d2p1:StackTrace>String</d2p1:StackTrace>
<d2p1:Errors>
<d2p1:ResponseError>
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:FieldName>String</d2p1:FieldName>
<d2p1:Message>String</d2p1:Message>
<d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:KeyValueOfstringstring>
<d5p1:Key>String</d5p1:Key>
<d5p1:Value>String</d5p1:Value>
</d5p1:KeyValueOfstringstring>
</d2p1:Meta>
</d2p1:ResponseError>
</d2p1:Errors>
<d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:KeyValueOfstringstring>
<d3p1:Key>String</d3p1:Key>
<d3p1:Value>String</d3p1:Value>
</d3p1:KeyValueOfstringstring>
</d2p1:Meta>
</ResponseStatus>
</StaffPostingResponse>