| Requires any of the roles: | Agent, Administrator |
| GET,OPTIONS | /v1/AgentRecruit |
|---|
<?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 AgentRecruit implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $Rank=null,
/** @var string|null */
public ?string $AgentLevel=null,
/** @var string|null */
public ?string $UL1FirstName=null,
/** @var string|null */
public ?string $UL1MiddleName=null,
/** @var string|null */
public ?string $UL1LastName=null,
/** @var string|null */
public ?string $UL2FirstName=null,
/** @var string|null */
public ?string $UL2MiddleName=null,
/** @var string|null */
public ?string $UL2LastName=null,
/** @var string|null */
public ?string $UL3FirstName=null,
/** @var string|null */
public ?string $UL3MiddleName=null,
/** @var string|null */
public ?string $UL3LastName=null,
/** @var string|null */
public ?string $UL4FirstName=null,
/** @var string|null */
public ?string $UL4MiddleName=null,
/** @var string|null */
public ?string $UL4LastName=null,
/** @var string|null */
public ?string $Company=null,
/** @var string|null */
public ?string $FirstName=null,
/** @var string|null */
public ?string $LastName=null,
/** @var string|null */
public ?string $MiddleInitial=null,
/** @var string|null */
public ?string $Address1=null,
/** @var string|null */
public ?string $Address2=null,
/** @var string|null */
public ?string $City=null,
/** @var string|null */
public ?string $State=null,
/** @var string|null */
public ?string $Zip=null,
/** @var string|null */
public ?string $Country=null,
/** @var string|null */
public ?string $Email=null,
/** @var string|null */
public ?string $HomePhone=null,
/** @var string|null */
public ?string $CellPhone=null,
/** @var string|null */
public ?string $WorkPhone=null,
/** @var string|null */
public ?string $AgentNumber=null,
/** @var string|null */
public ?string $PlacementAgentName=null,
/** @var string|null */
public ?string $PlacementAgent=null,
/** @var DateTime */
public DateTime $CreatedDate=new DateTime(),
/** @var string|null */
public ?string $Level=null,
/** @var DateTime */
public DateTime $LastLoginDate=new DateTime(),
/** @var string|null */
public ?string $Package=null,
/** @var float */
public float $AppCount=0.0,
/** @var float */
public float $Cashflow=0.0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Rank'])) $this->Rank = $o['Rank'];
if (isset($o['AgentLevel'])) $this->AgentLevel = $o['AgentLevel'];
if (isset($o['UL1FirstName'])) $this->UL1FirstName = $o['UL1FirstName'];
if (isset($o['UL1MiddleName'])) $this->UL1MiddleName = $o['UL1MiddleName'];
if (isset($o['UL1LastName'])) $this->UL1LastName = $o['UL1LastName'];
if (isset($o['UL2FirstName'])) $this->UL2FirstName = $o['UL2FirstName'];
if (isset($o['UL2MiddleName'])) $this->UL2MiddleName = $o['UL2MiddleName'];
if (isset($o['UL2LastName'])) $this->UL2LastName = $o['UL2LastName'];
if (isset($o['UL3FirstName'])) $this->UL3FirstName = $o['UL3FirstName'];
if (isset($o['UL3MiddleName'])) $this->UL3MiddleName = $o['UL3MiddleName'];
if (isset($o['UL3LastName'])) $this->UL3LastName = $o['UL3LastName'];
if (isset($o['UL4FirstName'])) $this->UL4FirstName = $o['UL4FirstName'];
if (isset($o['UL4MiddleName'])) $this->UL4MiddleName = $o['UL4MiddleName'];
if (isset($o['UL4LastName'])) $this->UL4LastName = $o['UL4LastName'];
if (isset($o['Company'])) $this->Company = $o['Company'];
if (isset($o['FirstName'])) $this->FirstName = $o['FirstName'];
if (isset($o['LastName'])) $this->LastName = $o['LastName'];
if (isset($o['MiddleInitial'])) $this->MiddleInitial = $o['MiddleInitial'];
if (isset($o['Address1'])) $this->Address1 = $o['Address1'];
if (isset($o['Address2'])) $this->Address2 = $o['Address2'];
if (isset($o['City'])) $this->City = $o['City'];
if (isset($o['State'])) $this->State = $o['State'];
if (isset($o['Zip'])) $this->Zip = $o['Zip'];
if (isset($o['Country'])) $this->Country = $o['Country'];
if (isset($o['Email'])) $this->Email = $o['Email'];
if (isset($o['HomePhone'])) $this->HomePhone = $o['HomePhone'];
if (isset($o['CellPhone'])) $this->CellPhone = $o['CellPhone'];
if (isset($o['WorkPhone'])) $this->WorkPhone = $o['WorkPhone'];
if (isset($o['AgentNumber'])) $this->AgentNumber = $o['AgentNumber'];
if (isset($o['PlacementAgentName'])) $this->PlacementAgentName = $o['PlacementAgentName'];
if (isset($o['PlacementAgent'])) $this->PlacementAgent = $o['PlacementAgent'];
if (isset($o['CreatedDate'])) $this->CreatedDate = JsonConverters::from('DateTime', $o['CreatedDate']);
if (isset($o['Level'])) $this->Level = $o['Level'];
if (isset($o['LastLoginDate'])) $this->LastLoginDate = JsonConverters::from('DateTime', $o['LastLoginDate']);
if (isset($o['Package'])) $this->Package = $o['Package'];
if (isset($o['AppCount'])) $this->AppCount = $o['AppCount'];
if (isset($o['Cashflow'])) $this->Cashflow = $o['Cashflow'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Rank)) $o['Rank'] = $this->Rank;
if (isset($this->AgentLevel)) $o['AgentLevel'] = $this->AgentLevel;
if (isset($this->UL1FirstName)) $o['UL1FirstName'] = $this->UL1FirstName;
if (isset($this->UL1MiddleName)) $o['UL1MiddleName'] = $this->UL1MiddleName;
if (isset($this->UL1LastName)) $o['UL1LastName'] = $this->UL1LastName;
if (isset($this->UL2FirstName)) $o['UL2FirstName'] = $this->UL2FirstName;
if (isset($this->UL2MiddleName)) $o['UL2MiddleName'] = $this->UL2MiddleName;
if (isset($this->UL2LastName)) $o['UL2LastName'] = $this->UL2LastName;
if (isset($this->UL3FirstName)) $o['UL3FirstName'] = $this->UL3FirstName;
if (isset($this->UL3MiddleName)) $o['UL3MiddleName'] = $this->UL3MiddleName;
if (isset($this->UL3LastName)) $o['UL3LastName'] = $this->UL3LastName;
if (isset($this->UL4FirstName)) $o['UL4FirstName'] = $this->UL4FirstName;
if (isset($this->UL4MiddleName)) $o['UL4MiddleName'] = $this->UL4MiddleName;
if (isset($this->UL4LastName)) $o['UL4LastName'] = $this->UL4LastName;
if (isset($this->Company)) $o['Company'] = $this->Company;
if (isset($this->FirstName)) $o['FirstName'] = $this->FirstName;
if (isset($this->LastName)) $o['LastName'] = $this->LastName;
if (isset($this->MiddleInitial)) $o['MiddleInitial'] = $this->MiddleInitial;
if (isset($this->Address1)) $o['Address1'] = $this->Address1;
if (isset($this->Address2)) $o['Address2'] = $this->Address2;
if (isset($this->City)) $o['City'] = $this->City;
if (isset($this->State)) $o['State'] = $this->State;
if (isset($this->Zip)) $o['Zip'] = $this->Zip;
if (isset($this->Country)) $o['Country'] = $this->Country;
if (isset($this->Email)) $o['Email'] = $this->Email;
if (isset($this->HomePhone)) $o['HomePhone'] = $this->HomePhone;
if (isset($this->CellPhone)) $o['CellPhone'] = $this->CellPhone;
if (isset($this->WorkPhone)) $o['WorkPhone'] = $this->WorkPhone;
if (isset($this->AgentNumber)) $o['AgentNumber'] = $this->AgentNumber;
if (isset($this->PlacementAgentName)) $o['PlacementAgentName'] = $this->PlacementAgentName;
if (isset($this->PlacementAgent)) $o['PlacementAgent'] = $this->PlacementAgent;
if (isset($this->CreatedDate)) $o['CreatedDate'] = JsonConverters::to('DateTime', $this->CreatedDate);
if (isset($this->Level)) $o['Level'] = $this->Level;
if (isset($this->LastLoginDate)) $o['LastLoginDate'] = JsonConverters::to('DateTime', $this->LastLoginDate);
if (isset($this->Package)) $o['Package'] = $this->Package;
if (isset($this->AppCount)) $o['AppCount'] = $this->AppCount;
if (isset($this->Cashflow)) $o['Cashflow'] = $this->Cashflow;
return empty($o) ? new class(){} : $o;
}
}
class AgentRecruitResponse implements JsonSerializable
{
public function __construct(
/** @var ResponseStatus|null */
public ?ResponseStatus $ResponseStatus=null,
/** @var array<AgentRecruit>|null */
public ?array $AgentRecruit=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ResponseStatus'])) $this->ResponseStatus = JsonConverters::from('ResponseStatus', $o['ResponseStatus']);
if (isset($o['AgentRecruit'])) $this->AgentRecruit = JsonConverters::fromArray('AgentRecruit', $o['AgentRecruit']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ResponseStatus)) $o['ResponseStatus'] = JsonConverters::to('ResponseStatus', $this->ResponseStatus);
if (isset($this->AgentRecruit)) $o['AgentRecruit'] = JsonConverters::toArray('AgentRecruit', $this->AgentRecruit);
return empty($o) ? new class(){} : $o;
}
}
class AgentRecruitRequest implements JsonSerializable
{
public function __construct(
/** @var array<AgentRecruit>|null */
public ?array $AgentRecruit=null,
/** @var DateTime */
public DateTime $StartDate=new DateTime(),
/** @var DateTime */
public DateTime $EndDate=new DateTime()
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['AgentRecruit'])) $this->AgentRecruit = JsonConverters::fromArray('AgentRecruit', $o['AgentRecruit']);
if (isset($o['StartDate'])) $this->StartDate = JsonConverters::from('DateTime', $o['StartDate']);
if (isset($o['EndDate'])) $this->EndDate = JsonConverters::from('DateTime', $o['EndDate']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->AgentRecruit)) $o['AgentRecruit'] = JsonConverters::toArray('AgentRecruit', $this->AgentRecruit);
if (isset($this->StartDate)) $o['StartDate'] = JsonConverters::to('DateTime', $this->StartDate);
if (isset($this->EndDate)) $o['EndDate'] = JsonConverters::to('DateTime', $this->EndDate);
return empty($o) ? new class(){} : $o;
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v1/AgentRecruit 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"}},"AgentRecruit":[{"Rank":"String","AgentLevel":"String","UL1FirstName":"String","UL1MiddleName":"String","UL1LastName":"String","UL2FirstName":"String","UL2MiddleName":"String","UL2LastName":"String","UL3FirstName":"String","UL3MiddleName":"String","UL3LastName":"String","UL4FirstName":"String","UL4MiddleName":"String","UL4LastName":"String","Company":"String","FirstName":"String","LastName":"String","MiddleInitial":"String","Address1":"String","Address2":"String","City":"String","State":"String","Zip":"String","Country":"String","Email":"String","HomePhone":"String","CellPhone":"String","WorkPhone":"String","AgentNumber":"String","PlacementAgentName":"String","PlacementAgent":"String","CreatedDate":"0001-01-01T00:00:00.0000000","Level":"0","LastLoginDate":"0001-01-01T00:00:00.0000000","Package":"String","AppCount":0,"Cashflow":0}]}