Trendsic Platform Service

<back to all web services

AgentCrmRecruitRequest

Requires Authentication
Requires any of the roles:Worker, Agent, Administrator
The following routes are available for this service:
GET,OPTIONS/v1/AgentCrmRecruit/{AgentId}
<?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 AgentCrmRecruit 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 $firstMVP=null,
        /** @var string|null */
        public ?string $lastMVP=null,
        /** @var string|null */
        public ?string $firstAVP=null,
        /** @var string|null */
        public ?string $lastAVP=null,
        /** @var string|null */
        public ?string $firstRVP=null,
        /** @var string|null */
        public ?string $lastRVP=null,
        /** @var string|null */
        public ?string $ResidentLicenseState=null,
        /** @var string|null */
        public ?string $ResidentLicenseExpirationDate=null,
        /** @var int */
        public int $AgentId=0,
        /** @var string|null */
        public ?string $AgentStatus=null,
        /** @var string|null */
        public ?string $Office=null,
        /** @var float */
        public float $Upline1Percent=0.0,
        /** @var float */
        public float $Upline2Percent=0.0,
        /** @var float */
        public float $Upline3Percent=0.0,
        /** @var float */
        public float $Upline4Percent=0.0,
        /** @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 $Email=null,
        /** @var string|null */
        public ?string $BusinessEmail=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 $Fax=null,
        /** @var string|null */
        public ?string $AgentNumber=null,
        /** @var string|null */
        public ?string $PlacementAgent=null,
        /** @var DateTime */
        public DateTime $CreatedDate=new DateTime(),
        /** @var string|null */
        public ?string $Level=null,
        /** @var string|null */
        public ?string $Package=null,
        /** @var float */
        public float $AppCount=0.0,
        /** @var float */
        public float $Cashflow=0.0,
        /** @var string|null */
        public ?string $TimeZone=null,
        /** @var string|null */
        public ?string $Tags=null,
        /** @var float */
        public float $Longitude=0.0,
        /** @var float */
        public float $Latitude=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['firstMVP'])) $this->firstMVP = $o['firstMVP'];
        if (isset($o['lastMVP'])) $this->lastMVP = $o['lastMVP'];
        if (isset($o['firstAVP'])) $this->firstAVP = $o['firstAVP'];
        if (isset($o['lastAVP'])) $this->lastAVP = $o['lastAVP'];
        if (isset($o['firstRVP'])) $this->firstRVP = $o['firstRVP'];
        if (isset($o['lastRVP'])) $this->lastRVP = $o['lastRVP'];
        if (isset($o['ResidentLicenseState'])) $this->ResidentLicenseState = $o['ResidentLicenseState'];
        if (isset($o['ResidentLicenseExpirationDate'])) $this->ResidentLicenseExpirationDate = $o['ResidentLicenseExpirationDate'];
        if (isset($o['AgentId'])) $this->AgentId = $o['AgentId'];
        if (isset($o['AgentStatus'])) $this->AgentStatus = $o['AgentStatus'];
        if (isset($o['Office'])) $this->Office = $o['Office'];
        if (isset($o['Upline1Percent'])) $this->Upline1Percent = $o['Upline1Percent'];
        if (isset($o['Upline2Percent'])) $this->Upline2Percent = $o['Upline2Percent'];
        if (isset($o['Upline3Percent'])) $this->Upline3Percent = $o['Upline3Percent'];
        if (isset($o['Upline4Percent'])) $this->Upline4Percent = $o['Upline4Percent'];
        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['Email'])) $this->Email = $o['Email'];
        if (isset($o['BusinessEmail'])) $this->BusinessEmail = $o['BusinessEmail'];
        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['Fax'])) $this->Fax = $o['Fax'];
        if (isset($o['AgentNumber'])) $this->AgentNumber = $o['AgentNumber'];
        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['Package'])) $this->Package = $o['Package'];
        if (isset($o['AppCount'])) $this->AppCount = $o['AppCount'];
        if (isset($o['Cashflow'])) $this->Cashflow = $o['Cashflow'];
        if (isset($o['TimeZone'])) $this->TimeZone = $o['TimeZone'];
        if (isset($o['Tags'])) $this->Tags = $o['Tags'];
        if (isset($o['Longitude'])) $this->Longitude = $o['Longitude'];
        if (isset($o['Latitude'])) $this->Latitude = $o['Latitude'];
    }
    
    /** @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->firstMVP)) $o['firstMVP'] = $this->firstMVP;
        if (isset($this->lastMVP)) $o['lastMVP'] = $this->lastMVP;
        if (isset($this->firstAVP)) $o['firstAVP'] = $this->firstAVP;
        if (isset($this->lastAVP)) $o['lastAVP'] = $this->lastAVP;
        if (isset($this->firstRVP)) $o['firstRVP'] = $this->firstRVP;
        if (isset($this->lastRVP)) $o['lastRVP'] = $this->lastRVP;
        if (isset($this->ResidentLicenseState)) $o['ResidentLicenseState'] = $this->ResidentLicenseState;
        if (isset($this->ResidentLicenseExpirationDate)) $o['ResidentLicenseExpirationDate'] = $this->ResidentLicenseExpirationDate;
        if (isset($this->AgentId)) $o['AgentId'] = $this->AgentId;
        if (isset($this->AgentStatus)) $o['AgentStatus'] = $this->AgentStatus;
        if (isset($this->Office)) $o['Office'] = $this->Office;
        if (isset($this->Upline1Percent)) $o['Upline1Percent'] = $this->Upline1Percent;
        if (isset($this->Upline2Percent)) $o['Upline2Percent'] = $this->Upline2Percent;
        if (isset($this->Upline3Percent)) $o['Upline3Percent'] = $this->Upline3Percent;
        if (isset($this->Upline4Percent)) $o['Upline4Percent'] = $this->Upline4Percent;
        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->Email)) $o['Email'] = $this->Email;
        if (isset($this->BusinessEmail)) $o['BusinessEmail'] = $this->BusinessEmail;
        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->Fax)) $o['Fax'] = $this->Fax;
        if (isset($this->AgentNumber)) $o['AgentNumber'] = $this->AgentNumber;
        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->Package)) $o['Package'] = $this->Package;
        if (isset($this->AppCount)) $o['AppCount'] = $this->AppCount;
        if (isset($this->Cashflow)) $o['Cashflow'] = $this->Cashflow;
        if (isset($this->TimeZone)) $o['TimeZone'] = $this->TimeZone;
        if (isset($this->Tags)) $o['Tags'] = $this->Tags;
        if (isset($this->Longitude)) $o['Longitude'] = $this->Longitude;
        if (isset($this->Latitude)) $o['Latitude'] = $this->Latitude;
        return empty($o) ? new class(){} : $o;
    }
}

class AgentCrmRecruitResponse implements JsonSerializable
{
    public function __construct(
        /** @var ResponseStatus|null */
        public ?ResponseStatus $ResponseStatus=null,
        /** @var array<AgentCrmRecruit>|null */
        public ?array $AgentCrmRecruit=null
    ) {
    }

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

class AgentCrmRecruitRequest implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $AgentID=0,
        /** @var array<AgentCrmRecruit>|null */
        public ?array $AgentCrmRecruit=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['AgentID'])) $this->AgentID = $o['AgentID'];
        if (isset($o['AgentCrmRecruit'])) $this->AgentCrmRecruit = JsonConverters::fromArray('AgentCrmRecruit', $o['AgentCrmRecruit']);
        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->AgentID)) $o['AgentID'] = $this->AgentID;
        if (isset($this->AgentCrmRecruit)) $o['AgentCrmRecruit'] = JsonConverters::toArray('AgentCrmRecruit', $this->AgentCrmRecruit);
        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 AgentCrmRecruitRequest 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.

GET /v1/AgentCrmRecruit/{AgentId} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
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
		}
	},
	AgentCrmRecruit: 
	[
		{
			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,
			firstMVP: String,
			lastMVP: String,
			firstAVP: String,
			lastAVP: String,
			firstRVP: String,
			lastRVP: String,
			ResidentLicenseState: String,
			ResidentLicenseExpirationDate: String,
			AgentId: 0,
			AgentStatus: String,
			Office: String,
			Upline1Percent: 0,
			Upline2Percent: 0,
			Upline3Percent: 0,
			Upline4Percent: 0,
			FirstName: String,
			LastName: String,
			MiddleInitial: String,
			Address1: String,
			Address2: String,
			City: String,
			State: String,
			Zip: String,
			Email: String,
			BusinessEmail: String,
			HomePhone: String,
			CellPhone: String,
			WorkPhone: String,
			Fax: String,
			AgentNumber: String,
			PlacementAgent: String,
			CreatedDate: 0001-01-01,
			Level: String,
			Package: String,
			AppCount: 0,
			Cashflow: 0,
			TimeZone: String,
			Tags: String,
			Longitude: 0,
			Latitude: 0
		}
	]
}