Trendsic Platform Service

<back to all web services

AgentRecruitRequest

Requires Authentication
Requires any of the roles:Agent, Administrator
The following routes are available for this service:
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;
    }
}

PHP AgentRecruitRequest DTOs

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

HTTP + XML

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

<AgentRecruitResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <AgentRecruit>
    <AgentRecruit>
      <Address1>String</Address1>
      <Address2>String</Address2>
      <AgentLevel>String</AgentLevel>
      <AgentNumber>String</AgentNumber>
      <AppCount>0</AppCount>
      <Cashflow>0</Cashflow>
      <CellPhone>String</CellPhone>
      <City>String</City>
      <Company>String</Company>
      <Country>String</Country>
      <CreatedDate>0001-01-01T00:00:00</CreatedDate>
      <Email>String</Email>
      <FirstName>String</FirstName>
      <HomePhone>String</HomePhone>
      <LastLoginDate>0001-01-01T00:00:00</LastLoginDate>
      <LastName>String</LastName>
      <Level>0</Level>
      <MiddleInitial>String</MiddleInitial>
      <Package>String</Package>
      <PlacementAgent>String</PlacementAgent>
      <PlacementAgentName>String</PlacementAgentName>
      <Rank>String</Rank>
      <State>String</State>
      <UL1FirstName>String</UL1FirstName>
      <UL1LastName>String</UL1LastName>
      <UL1MiddleName>String</UL1MiddleName>
      <UL2FirstName>String</UL2FirstName>
      <UL2LastName>String</UL2LastName>
      <UL2MiddleName>String</UL2MiddleName>
      <UL3FirstName>String</UL3FirstName>
      <UL3LastName>String</UL3LastName>
      <UL3MiddleName>String</UL3MiddleName>
      <UL4FirstName>String</UL4FirstName>
      <UL4LastName>String</UL4LastName>
      <UL4MiddleName>String</UL4MiddleName>
      <WorkPhone>String</WorkPhone>
      <Zip>String</Zip>
    </AgentRecruit>
  </AgentRecruit>
  <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>
</AgentRecruitResponse>