Trendsic Platform Service

<back to all web services

StaffPostingGetRequest

Requires Authentication
The following routes are available for this service:
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 .other suffix or ?format=other

HTTP + OTHER

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: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"Posting":{"StaffPostingID":0,"PositionTag":"String","Title":"String","Body":"String","RateTarget":0,"LocationText":"String","WindowText":"String","Sites":["String"],"Status":"String","ApplyUrl":"String"},"Applicants":[{"StaffApplicantID":0,"Name":"String","Source":"String","YearsExperience":0,"AskRate":0,"DistanceMi":0,"Base":"String","FitTier":"String","FitScore":0,"MatchedSkills":["String"],"Reasons":["String"],"ResumeText":"String","Status":"String","InterviewSlot":"String","Ago":"String"}],"ApplicantTotal":0,"ApplicantStrong":0}