| POST,OPTIONS | /v1/AgentRegistrationTemp |
|---|
<?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 AgentRegistrationTemp implements JsonSerializable
{
public function __construct(
/** @var int */
public int $AgentRegistrationTempId=0,
/** @var string|null */
public ?string $ApplicationId=null,
/** @var string|null */
public ?string $Company=null,
/** @var string|null */
public ?string $EIN=null,
/** @var string|null */
public ?string $FirstName=null,
/** @var string|null */
public ?string $MiddleName=null,
/** @var string|null */
public ?string $LastName=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 $HomePhone=null,
/** @var string|null */
public ?string $CellPhone=null,
/** @var string|null */
public ?string $WorkPhone=null,
/** @var bool|null */
public ?bool $AgreeToDisclosures=null,
/** @var DateTime */
public DateTime $AgreeToDate=new DateTime(),
/** @var DateTime */
public DateTime $PaidDate=new DateTime(),
/** @var string|null */
public ?string $AgentNumber=null,
/** @var string|null */
public ?string $Upline1Name=null,
/** @var int */
public int $Upline1=0,
/** @var string|null */
public ?string $Upline2Name=null,
/** @var int */
public int $Upline2=0,
/** @var string|null */
public ?string $RecruitedBy=null,
/** @var DateTime */
public DateTime $CreatedDate=new DateTime(),
/** @var DateTime|null */
public ?DateTime $DOB=null,
/** @var string|null */
public ?string $SSN=null,
/** @var string|null */
public ?string $Password=null,
/** @var float */
public float $Upline1Percent=0.0,
/** @var float */
public float $Upline2Percent=0.0,
/** @var int */
public int $AgentId=0,
/** @var string|null */
public ?string $AccountName=null,
/** @var string|null */
public ?string $AccountType=null,
/** @var string|null */
public ?string $AccountNumber=null,
/** @var string|null */
public ?string $AccountRouting=null,
/** @var string|null */
public ?string $w9_1=null,
/** @var string|null */
public ?string $w9_2=null,
/** @var string|null */
public ?string $w9_3_1=null,
/** @var string|null */
public ?string $w9_3_2=null,
/** @var string|null */
public ?string $w9_3_3=null,
/** @var string|null */
public ?string $w9_3_4=null,
/** @var string|null */
public ?string $w9_3_5=null,
/** @var string|null */
public ?string $w9_3_6=null,
/** @var string|null */
public ?string $w9_3_7=null,
/** @var string|null */
public ?string $w9_3_8=null,
/** @var string|null */
public ?string $w9_4_1=null,
/** @var string|null */
public ?string $w9_4_2=null,
/** @var string|null */
public ?string $w9_5=null,
/** @var string|null */
public ?string $w9_6=null,
/** @var string|null */
public ?string $w9_7=null,
/** @var bool|null */
public ?bool $IsSecurityLicensed=null,
/** @var string|null */
public ?string $SecurityLicense=null,
/** @var string|null */
public ?string $Position=null,
/** @var string|null */
public ?string $School=null,
/** @var string|null */
public ?string $District=null,
/** @var string|null */
public ?string $StoreName=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['AgentRegistrationTempId'])) $this->AgentRegistrationTempId = $o['AgentRegistrationTempId'];
if (isset($o['ApplicationId'])) $this->ApplicationId = $o['ApplicationId'];
if (isset($o['Company'])) $this->Company = $o['Company'];
if (isset($o['EIN'])) $this->EIN = $o['EIN'];
if (isset($o['FirstName'])) $this->FirstName = $o['FirstName'];
if (isset($o['MiddleName'])) $this->MiddleName = $o['MiddleName'];
if (isset($o['LastName'])) $this->LastName = $o['LastName'];
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['HomePhone'])) $this->HomePhone = $o['HomePhone'];
if (isset($o['CellPhone'])) $this->CellPhone = $o['CellPhone'];
if (isset($o['WorkPhone'])) $this->WorkPhone = $o['WorkPhone'];
if (isset($o['AgreeToDisclosures'])) $this->AgreeToDisclosures = $o['AgreeToDisclosures'];
if (isset($o['AgreeToDate'])) $this->AgreeToDate = JsonConverters::from('DateTime', $o['AgreeToDate']);
if (isset($o['PaidDate'])) $this->PaidDate = JsonConverters::from('DateTime', $o['PaidDate']);
if (isset($o['AgentNumber'])) $this->AgentNumber = $o['AgentNumber'];
if (isset($o['Upline1Name'])) $this->Upline1Name = $o['Upline1Name'];
if (isset($o['Upline1'])) $this->Upline1 = $o['Upline1'];
if (isset($o['Upline2Name'])) $this->Upline2Name = $o['Upline2Name'];
if (isset($o['Upline2'])) $this->Upline2 = $o['Upline2'];
if (isset($o['RecruitedBy'])) $this->RecruitedBy = $o['RecruitedBy'];
if (isset($o['CreatedDate'])) $this->CreatedDate = JsonConverters::from('DateTime', $o['CreatedDate']);
if (isset($o['DOB'])) $this->DOB = JsonConverters::from('DateTime', $o['DOB']);
if (isset($o['SSN'])) $this->SSN = $o['SSN'];
if (isset($o['Password'])) $this->Password = $o['Password'];
if (isset($o['Upline1Percent'])) $this->Upline1Percent = $o['Upline1Percent'];
if (isset($o['Upline2Percent'])) $this->Upline2Percent = $o['Upline2Percent'];
if (isset($o['AgentId'])) $this->AgentId = $o['AgentId'];
if (isset($o['AccountName'])) $this->AccountName = $o['AccountName'];
if (isset($o['AccountType'])) $this->AccountType = $o['AccountType'];
if (isset($o['AccountNumber'])) $this->AccountNumber = $o['AccountNumber'];
if (isset($o['AccountRouting'])) $this->AccountRouting = $o['AccountRouting'];
if (isset($o['w9_1'])) $this->w9_1 = $o['w9_1'];
if (isset($o['w9_2'])) $this->w9_2 = $o['w9_2'];
if (isset($o['w9_3_1'])) $this->w9_3_1 = $o['w9_3_1'];
if (isset($o['w9_3_2'])) $this->w9_3_2 = $o['w9_3_2'];
if (isset($o['w9_3_3'])) $this->w9_3_3 = $o['w9_3_3'];
if (isset($o['w9_3_4'])) $this->w9_3_4 = $o['w9_3_4'];
if (isset($o['w9_3_5'])) $this->w9_3_5 = $o['w9_3_5'];
if (isset($o['w9_3_6'])) $this->w9_3_6 = $o['w9_3_6'];
if (isset($o['w9_3_7'])) $this->w9_3_7 = $o['w9_3_7'];
if (isset($o['w9_3_8'])) $this->w9_3_8 = $o['w9_3_8'];
if (isset($o['w9_4_1'])) $this->w9_4_1 = $o['w9_4_1'];
if (isset($o['w9_4_2'])) $this->w9_4_2 = $o['w9_4_2'];
if (isset($o['w9_5'])) $this->w9_5 = $o['w9_5'];
if (isset($o['w9_6'])) $this->w9_6 = $o['w9_6'];
if (isset($o['w9_7'])) $this->w9_7 = $o['w9_7'];
if (isset($o['IsSecurityLicensed'])) $this->IsSecurityLicensed = $o['IsSecurityLicensed'];
if (isset($o['SecurityLicense'])) $this->SecurityLicense = $o['SecurityLicense'];
if (isset($o['Position'])) $this->Position = $o['Position'];
if (isset($o['School'])) $this->School = $o['School'];
if (isset($o['District'])) $this->District = $o['District'];
if (isset($o['StoreName'])) $this->StoreName = $o['StoreName'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->AgentRegistrationTempId)) $o['AgentRegistrationTempId'] = $this->AgentRegistrationTempId;
if (isset($this->ApplicationId)) $o['ApplicationId'] = $this->ApplicationId;
if (isset($this->Company)) $o['Company'] = $this->Company;
if (isset($this->EIN)) $o['EIN'] = $this->EIN;
if (isset($this->FirstName)) $o['FirstName'] = $this->FirstName;
if (isset($this->MiddleName)) $o['MiddleName'] = $this->MiddleName;
if (isset($this->LastName)) $o['LastName'] = $this->LastName;
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->HomePhone)) $o['HomePhone'] = $this->HomePhone;
if (isset($this->CellPhone)) $o['CellPhone'] = $this->CellPhone;
if (isset($this->WorkPhone)) $o['WorkPhone'] = $this->WorkPhone;
if (isset($this->AgreeToDisclosures)) $o['AgreeToDisclosures'] = $this->AgreeToDisclosures;
if (isset($this->AgreeToDate)) $o['AgreeToDate'] = JsonConverters::to('DateTime', $this->AgreeToDate);
if (isset($this->PaidDate)) $o['PaidDate'] = JsonConverters::to('DateTime', $this->PaidDate);
if (isset($this->AgentNumber)) $o['AgentNumber'] = $this->AgentNumber;
if (isset($this->Upline1Name)) $o['Upline1Name'] = $this->Upline1Name;
if (isset($this->Upline1)) $o['Upline1'] = $this->Upline1;
if (isset($this->Upline2Name)) $o['Upline2Name'] = $this->Upline2Name;
if (isset($this->Upline2)) $o['Upline2'] = $this->Upline2;
if (isset($this->RecruitedBy)) $o['RecruitedBy'] = $this->RecruitedBy;
if (isset($this->CreatedDate)) $o['CreatedDate'] = JsonConverters::to('DateTime', $this->CreatedDate);
if (isset($this->DOB)) $o['DOB'] = JsonConverters::to('DateTime', $this->DOB);
if (isset($this->SSN)) $o['SSN'] = $this->SSN;
if (isset($this->Password)) $o['Password'] = $this->Password;
if (isset($this->Upline1Percent)) $o['Upline1Percent'] = $this->Upline1Percent;
if (isset($this->Upline2Percent)) $o['Upline2Percent'] = $this->Upline2Percent;
if (isset($this->AgentId)) $o['AgentId'] = $this->AgentId;
if (isset($this->AccountName)) $o['AccountName'] = $this->AccountName;
if (isset($this->AccountType)) $o['AccountType'] = $this->AccountType;
if (isset($this->AccountNumber)) $o['AccountNumber'] = $this->AccountNumber;
if (isset($this->AccountRouting)) $o['AccountRouting'] = $this->AccountRouting;
if (isset($this->w9_1)) $o['w9_1'] = $this->w9_1;
if (isset($this->w9_2)) $o['w9_2'] = $this->w9_2;
if (isset($this->w9_3_1)) $o['w9_3_1'] = $this->w9_3_1;
if (isset($this->w9_3_2)) $o['w9_3_2'] = $this->w9_3_2;
if (isset($this->w9_3_3)) $o['w9_3_3'] = $this->w9_3_3;
if (isset($this->w9_3_4)) $o['w9_3_4'] = $this->w9_3_4;
if (isset($this->w9_3_5)) $o['w9_3_5'] = $this->w9_3_5;
if (isset($this->w9_3_6)) $o['w9_3_6'] = $this->w9_3_6;
if (isset($this->w9_3_7)) $o['w9_3_7'] = $this->w9_3_7;
if (isset($this->w9_3_8)) $o['w9_3_8'] = $this->w9_3_8;
if (isset($this->w9_4_1)) $o['w9_4_1'] = $this->w9_4_1;
if (isset($this->w9_4_2)) $o['w9_4_2'] = $this->w9_4_2;
if (isset($this->w9_5)) $o['w9_5'] = $this->w9_5;
if (isset($this->w9_6)) $o['w9_6'] = $this->w9_6;
if (isset($this->w9_7)) $o['w9_7'] = $this->w9_7;
if (isset($this->IsSecurityLicensed)) $o['IsSecurityLicensed'] = $this->IsSecurityLicensed;
if (isset($this->SecurityLicense)) $o['SecurityLicense'] = $this->SecurityLicense;
if (isset($this->Position)) $o['Position'] = $this->Position;
if (isset($this->School)) $o['School'] = $this->School;
if (isset($this->District)) $o['District'] = $this->District;
if (isset($this->StoreName)) $o['StoreName'] = $this->StoreName;
return empty($o) ? new class(){} : $o;
}
}
class AgentRegistrationTempResponse implements JsonSerializable
{
public function __construct(
/** @var bool|null */
public ?bool $Success=null,
/** @var string|null */
public ?string $Message=null,
/** @var ResponseStatus|null */
public ?ResponseStatus $ResponseStatus=null,
/** @var int */
public int $AgentRegistrationTempId=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Success'])) $this->Success = $o['Success'];
if (isset($o['Message'])) $this->Message = $o['Message'];
if (isset($o['ResponseStatus'])) $this->ResponseStatus = JsonConverters::from('ResponseStatus', $o['ResponseStatus']);
if (isset($o['AgentRegistrationTempId'])) $this->AgentRegistrationTempId = $o['AgentRegistrationTempId'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Success)) $o['Success'] = $this->Success;
if (isset($this->Message)) $o['Message'] = $this->Message;
if (isset($this->ResponseStatus)) $o['ResponseStatus'] = JsonConverters::to('ResponseStatus', $this->ResponseStatus);
if (isset($this->AgentRegistrationTempId)) $o['AgentRegistrationTempId'] = $this->AgentRegistrationTempId;
return empty($o) ? new class(){} : $o;
}
}
class AgentRegistrationTempRequest extends AgentRegistrationTemp implements JsonSerializable
{
/**
* @param int $AgentRegistrationTempId
* @param string|null $ApplicationId
* @param string|null $Company
* @param string|null $EIN
* @param string|null $FirstName
* @param string|null $MiddleName
* @param string|null $LastName
* @param string|null $Address1
* @param string|null $Address2
* @param string|null $City
* @param string|null $State
* @param string|null $Zip
* @param string|null $Email
* @param string|null $HomePhone
* @param string|null $CellPhone
* @param string|null $WorkPhone
* @param bool|null $AgreeToDisclosures
* @param DateTime $AgreeToDate
* @param DateTime $PaidDate
* @param string|null $AgentNumber
* @param string|null $Upline1Name
* @param int $Upline1
* @param string|null $Upline2Name
* @param int $Upline2
* @param string|null $RecruitedBy
* @param DateTime $CreatedDate
* @param DateTime|null $DOB
* @param string|null $SSN
* @param string|null $Password
* @param float $Upline1Percent
* @param float $Upline2Percent
* @param int $AgentId
* @param string|null $AccountName
* @param string|null $AccountType
* @param string|null $AccountNumber
* @param string|null $AccountRouting
* @param string|null $w9_1
* @param string|null $w9_2
* @param string|null $w9_3_1
* @param string|null $w9_3_2
* @param string|null $w9_3_3
* @param string|null $w9_3_4
* @param string|null $w9_3_5
* @param string|null $w9_3_6
* @param string|null $w9_3_7
* @param string|null $w9_3_8
* @param string|null $w9_4_1
* @param string|null $w9_4_2
* @param string|null $w9_5
* @param string|null $w9_6
* @param string|null $w9_7
* @param bool|null $IsSecurityLicensed
* @param string|null $SecurityLicense
* @param string|null $Position
* @param string|null $School
* @param string|null $District
* @param string|null $StoreName
*/
public function __construct(
int $AgentRegistrationTempId=0,
?string $ApplicationId=null,
?string $Company=null,
?string $EIN=null,
?string $FirstName=null,
?string $MiddleName=null,
?string $LastName=null,
?string $Address1=null,
?string $Address2=null,
?string $City=null,
?string $State=null,
?string $Zip=null,
?string $Email=null,
?string $HomePhone=null,
?string $CellPhone=null,
?string $WorkPhone=null,
?bool $AgreeToDisclosures=null,
DateTime $AgreeToDate=new DateTime(),
DateTime $PaidDate=new DateTime(),
?string $AgentNumber=null,
?string $Upline1Name=null,
int $Upline1=0,
?string $Upline2Name=null,
int $Upline2=0,
?string $RecruitedBy=null,
DateTime $CreatedDate=new DateTime(),
?DateTime $DOB=null,
?string $SSN=null,
?string $Password=null,
float $Upline1Percent=0.0,
float $Upline2Percent=0.0,
int $AgentId=0,
?string $AccountName=null,
?string $AccountType=null,
?string $AccountNumber=null,
?string $AccountRouting=null,
?string $w9_1=null,
?string $w9_2=null,
?string $w9_3_1=null,
?string $w9_3_2=null,
?string $w9_3_3=null,
?string $w9_3_4=null,
?string $w9_3_5=null,
?string $w9_3_6=null,
?string $w9_3_7=null,
?string $w9_3_8=null,
?string $w9_4_1=null,
?string $w9_4_2=null,
?string $w9_5=null,
?string $w9_6=null,
?string $w9_7=null,
?bool $IsSecurityLicensed=null,
?string $SecurityLicense=null,
?string $Position=null,
?string $School=null,
?string $District=null,
?string $StoreName=null
) {
parent::__construct($AgentRegistrationTempId,$ApplicationId,$Company,$EIN,$FirstName,$MiddleName,$LastName,$Address1,$Address2,$City,$State,$Zip,$Email,$HomePhone,$CellPhone,$WorkPhone,$AgreeToDisclosures,$AgreeToDate,$PaidDate,$AgentNumber,$Upline1Name,$Upline1,$Upline2Name,$Upline2,$RecruitedBy,$CreatedDate,$DOB,$SSN,$Password,$Upline1Percent,$Upline2Percent,$AgentId,$AccountName,$AccountType,$AccountNumber,$AccountRouting,$w9_1,$w9_2,$w9_3_1,$w9_3_2,$w9_3_3,$w9_3_4,$w9_3_5,$w9_3_6,$w9_3_7,$w9_3_8,$w9_4_1,$w9_4_2,$w9_5,$w9_6,$w9_7,$IsSecurityLicensed,$SecurityLicense,$Position,$School,$District,$StoreName);
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
return empty($o) ? new class(){} : $o;
}
}
PHP AgentRegistrationTempRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/AgentRegistrationTemp HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
AgentRegistrationTempId: 0,
ApplicationId: String,
Company: String,
EIN: String,
FirstName: String,
MiddleName: String,
LastName: String,
Address1: String,
Address2: String,
City: String,
State: String,
Zip: String,
Email: String,
HomePhone: String,
CellPhone: String,
WorkPhone: String,
AgreeToDisclosures: False,
AgreeToDate: 0001-01-01,
PaidDate: 0001-01-01,
AgentNumber: String,
Upline1Name: String,
Upline1: 0,
Upline2Name: String,
Upline2: 0,
RecruitedBy: String,
CreatedDate: 0001-01-01,
DOB: 0001-01-01,
SSN: String,
Password: String,
Upline1Percent: 0,
Upline2Percent: 0,
AgentId: 0,
AccountName: String,
AccountType: String,
AccountNumber: String,
AccountRouting: String,
w9_1: String,
w9_2: String,
w9_3_1: String,
w9_3_2: String,
w9_3_3: String,
w9_3_4: String,
w9_3_5: String,
w9_3_6: String,
w9_3_7: String,
w9_3_8: String,
w9_4_1: String,
w9_4_2: String,
w9_5: String,
w9_6: String,
w9_7: String,
IsSecurityLicensed: False,
SecurityLicense: String,
Position: String,
School: String,
District: String,
StoreName: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
Success: False,
Message: String,
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
},
AgentRegistrationTempId: 0
}