Trendsic Platform Service

<back to all web services

SmartsheetsTransferRequest

Requires Authentication
Requires any of the roles:Agent, Administrator
The following routes are available for this service:
POST,OPTIONS/v1/Smartsheets/TransferLines
<?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 QueueDefault implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $LocationId='',
        /** @var array<string>|null */
        public ?array $Services=null
    ) {
    }

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

class Agent implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $AgentId=0,
        /** @var string|null */
        public ?string $Company=null,
        /** @var string|null */
        public ?string $AgentName=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 $EmailSignature=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 $InsLicensed=null,
        /** @var bool|null */
        public ?bool $AgreeToDisclosures=null,
        /** @var DateTime|null */
        public ?DateTime $AgreeToDate=null,
        /** @var DateTime|null */
        public ?DateTime $PaidDate=null,
        /** @var string|null */
        public ?string $AgentNumber=null,
        /** @var string|null */
        public ?string $ReferringAgent=null,
        /** @var string|null */
        public ?string $PlacementAgent=null,
        /** @var DateTime|null */
        public ?DateTime $CreatedDate=null,
        /** @var string */
        public string $UserId='',
        /** @var bool|null */
        public ?bool $IsAgent=null,
        /** @var string|null */
        public ?string $Package=null,
        /** @var string|null */
        public ?string $StoreName=null,
        /** @var string|null */
        public ?string $Notes=null,
        /** @var int|null */
        public ?int $Upline1=null,
        /** @var int|null */
        public ?int $Upline2=null,
        /** @var int|null */
        public ?int $Upline3=null,
        /** @var int|null */
        public ?int $Upline4=null,
        /** @var int|null */
        public ?int $MVPID=null,
        /** @var int|null */
        public ?int $AVPID=null,
        /** @var int|null */
        public ?int $RVPID=null,
        /** @var float|null */
        public ?float $AgentLevel=null,
        /** @var bool|null */
        public ?bool $IsMVP=null,
        /** @var bool|null */
        public ?bool $IsRVP=null,
        /** @var bool|null */
        public ?bool $IsAVP=null,
        /** @var bool|null */
        public ?bool $IsAdmin=null,
        /** @var bool|null */
        public ?bool $IsBusinessCardAdmin=null,
        /** @var string|null */
        public ?string $TeamName=null,
        /** @var string */
        public string $LocationId='',
        /** @var string */
        public string $CalendarId='',
        /** @var string|null */
        public ?string $Rank=null,
        /** @var bool|null */
        public ?bool $NBC=null,
        /** @var float|null */
        public ?float $Upline1Percent=null,
        /** @var float|null */
        public ?float $Upline2Percent=null,
        /** @var float|null */
        public ?float $Upline3Percent=null,
        /** @var float|null */
        public ?float $Upline4Percent=null,
        /** @var string|null */
        public ?string $AgentStatus=null,
        /** @var string|null */
        public ?string $Office=null,
        /** @var DateTime|null */
        public ?DateTime $DOB=null,
        /** @var string|null */
        public ?string $SSN=null,
        /** @var string|null */
        public ?string $Fax=null,
        /** @var string|null */
        public ?string $BusinessEmail=null,
        /** @var DateTime|null */
        public ?DateTime $ModifiedDate=null,
        /** @var string|null */
        public ?string $ModifiedBy=null,
        /** @var string|null */
        public ?string $TimeZone=null,
        /** @var bool|null */
        public ?bool $LeaderLocked=null,
        /** @var DateTime */
        public DateTime $LastSubmittedBusinessDate=new DateTime(),
        /** @var DateTime */
        public DateTime $GracePeriodDate=new DateTime(),
        /** @var bool|null */
        public ?bool $Vested=null,
        /** @var DateTime */
        public DateTime $DirectPay=new DateTime(),
        /** @var string|null */
        public ?string $DirectPayApprBy=null,
        /** @var float|null */
        public ?float $FactFinderBilling=null,
        /** @var string|null */
        public ?string $FullName=null,
        /** @var string|null */
        public ?string $ByLastName=null,
        /** @var bool|null */
        public ?bool $IsSecurityLicensed=null,
        /** @var bool|null */
        public ?bool $IsEncompassAdmin=null,
        /** @var string */
        public string $ApiKey='',
        /** @var string|null */
        public ?string $LastSessionId=null,
        /** @var DateTime|null */
        public ?DateTime $LastLogin=null,
        /** @var bool|null */
        public ?bool $MfaActive=null,
        /** @var bool|null */
        public ?bool $RequireMFA=null,
        /** @var string|null */
        public ?string $SMSPhoneNumber=null,
        /** @var bool|null */
        public ?bool $VerifiedEmailStatus=null,
        /** @var bool|null */
        public ?bool $VerifiedCellPhoneStatus=null,
        /** @var string|null */
        public ?string $SchedulerUrl=null,
        /** @var QueueDefault|null */
        public ?QueueDefault $QueueDefaults=null,
        /** @var array<string>|null */
        public ?array $Roles=null,
        /** @var bool|null */
        public ?bool $PasswordUpdated=null,
        /** @var bool|null */
        public ?bool $RestrictToSingleSession=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['AgentId'])) $this->AgentId = $o['AgentId'];
        if (isset($o['Company'])) $this->Company = $o['Company'];
        if (isset($o['AgentName'])) $this->AgentName = $o['AgentName'];
        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['EmailSignature'])) $this->EmailSignature = $o['EmailSignature'];
        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['InsLicensed'])) $this->InsLicensed = $o['InsLicensed'];
        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['ReferringAgent'])) $this->ReferringAgent = $o['ReferringAgent'];
        if (isset($o['PlacementAgent'])) $this->PlacementAgent = $o['PlacementAgent'];
        if (isset($o['CreatedDate'])) $this->CreatedDate = JsonConverters::from('DateTime', $o['CreatedDate']);
        if (isset($o['UserId'])) $this->UserId = $o['UserId'];
        if (isset($o['IsAgent'])) $this->IsAgent = $o['IsAgent'];
        if (isset($o['Package'])) $this->Package = $o['Package'];
        if (isset($o['StoreName'])) $this->StoreName = $o['StoreName'];
        if (isset($o['Notes'])) $this->Notes = $o['Notes'];
        if (isset($o['Upline1'])) $this->Upline1 = $o['Upline1'];
        if (isset($o['Upline2'])) $this->Upline2 = $o['Upline2'];
        if (isset($o['Upline3'])) $this->Upline3 = $o['Upline3'];
        if (isset($o['Upline4'])) $this->Upline4 = $o['Upline4'];
        if (isset($o['MVPID'])) $this->MVPID = $o['MVPID'];
        if (isset($o['AVPID'])) $this->AVPID = $o['AVPID'];
        if (isset($o['RVPID'])) $this->RVPID = $o['RVPID'];
        if (isset($o['AgentLevel'])) $this->AgentLevel = $o['AgentLevel'];
        if (isset($o['IsMVP'])) $this->IsMVP = $o['IsMVP'];
        if (isset($o['IsRVP'])) $this->IsRVP = $o['IsRVP'];
        if (isset($o['IsAVP'])) $this->IsAVP = $o['IsAVP'];
        if (isset($o['IsAdmin'])) $this->IsAdmin = $o['IsAdmin'];
        if (isset($o['IsBusinessCardAdmin'])) $this->IsBusinessCardAdmin = $o['IsBusinessCardAdmin'];
        if (isset($o['TeamName'])) $this->TeamName = $o['TeamName'];
        if (isset($o['LocationId'])) $this->LocationId = $o['LocationId'];
        if (isset($o['CalendarId'])) $this->CalendarId = $o['CalendarId'];
        if (isset($o['Rank'])) $this->Rank = $o['Rank'];
        if (isset($o['NBC'])) $this->NBC = $o['NBC'];
        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['AgentStatus'])) $this->AgentStatus = $o['AgentStatus'];
        if (isset($o['Office'])) $this->Office = $o['Office'];
        if (isset($o['DOB'])) $this->DOB = JsonConverters::from('DateTime', $o['DOB']);
        if (isset($o['SSN'])) $this->SSN = $o['SSN'];
        if (isset($o['Fax'])) $this->Fax = $o['Fax'];
        if (isset($o['BusinessEmail'])) $this->BusinessEmail = $o['BusinessEmail'];
        if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTime', $o['ModifiedDate']);
        if (isset($o['ModifiedBy'])) $this->ModifiedBy = $o['ModifiedBy'];
        if (isset($o['TimeZone'])) $this->TimeZone = $o['TimeZone'];
        if (isset($o['LeaderLocked'])) $this->LeaderLocked = $o['LeaderLocked'];
        if (isset($o['LastSubmittedBusinessDate'])) $this->LastSubmittedBusinessDate = JsonConverters::from('DateTime', $o['LastSubmittedBusinessDate']);
        if (isset($o['GracePeriodDate'])) $this->GracePeriodDate = JsonConverters::from('DateTime', $o['GracePeriodDate']);
        if (isset($o['Vested'])) $this->Vested = $o['Vested'];
        if (isset($o['DirectPay'])) $this->DirectPay = JsonConverters::from('DateTime', $o['DirectPay']);
        if (isset($o['DirectPayApprBy'])) $this->DirectPayApprBy = $o['DirectPayApprBy'];
        if (isset($o['FactFinderBilling'])) $this->FactFinderBilling = $o['FactFinderBilling'];
        if (isset($o['FullName'])) $this->FullName = $o['FullName'];
        if (isset($o['ByLastName'])) $this->ByLastName = $o['ByLastName'];
        if (isset($o['IsSecurityLicensed'])) $this->IsSecurityLicensed = $o['IsSecurityLicensed'];
        if (isset($o['IsEncompassAdmin'])) $this->IsEncompassAdmin = $o['IsEncompassAdmin'];
        if (isset($o['ApiKey'])) $this->ApiKey = $o['ApiKey'];
        if (isset($o['LastSessionId'])) $this->LastSessionId = $o['LastSessionId'];
        if (isset($o['LastLogin'])) $this->LastLogin = JsonConverters::from('DateTime', $o['LastLogin']);
        if (isset($o['MfaActive'])) $this->MfaActive = $o['MfaActive'];
        if (isset($o['RequireMFA'])) $this->RequireMFA = $o['RequireMFA'];
        if (isset($o['SMSPhoneNumber'])) $this->SMSPhoneNumber = $o['SMSPhoneNumber'];
        if (isset($o['VerifiedEmailStatus'])) $this->VerifiedEmailStatus = $o['VerifiedEmailStatus'];
        if (isset($o['VerifiedCellPhoneStatus'])) $this->VerifiedCellPhoneStatus = $o['VerifiedCellPhoneStatus'];
        if (isset($o['SchedulerUrl'])) $this->SchedulerUrl = $o['SchedulerUrl'];
        if (isset($o['QueueDefaults'])) $this->QueueDefaults = JsonConverters::from('QueueDefault', $o['QueueDefaults']);
        if (isset($o['Roles'])) $this->Roles = JsonConverters::fromArray('string', $o['Roles']);
        if (isset($o['PasswordUpdated'])) $this->PasswordUpdated = $o['PasswordUpdated'];
        if (isset($o['RestrictToSingleSession'])) $this->RestrictToSingleSession = $o['RestrictToSingleSession'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->AgentId)) $o['AgentId'] = $this->AgentId;
        if (isset($this->Company)) $o['Company'] = $this->Company;
        if (isset($this->AgentName)) $o['AgentName'] = $this->AgentName;
        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->EmailSignature)) $o['EmailSignature'] = $this->EmailSignature;
        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->InsLicensed)) $o['InsLicensed'] = $this->InsLicensed;
        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->ReferringAgent)) $o['ReferringAgent'] = $this->ReferringAgent;
        if (isset($this->PlacementAgent)) $o['PlacementAgent'] = $this->PlacementAgent;
        if (isset($this->CreatedDate)) $o['CreatedDate'] = JsonConverters::to('DateTime', $this->CreatedDate);
        if (isset($this->UserId)) $o['UserId'] = $this->UserId;
        if (isset($this->IsAgent)) $o['IsAgent'] = $this->IsAgent;
        if (isset($this->Package)) $o['Package'] = $this->Package;
        if (isset($this->StoreName)) $o['StoreName'] = $this->StoreName;
        if (isset($this->Notes)) $o['Notes'] = $this->Notes;
        if (isset($this->Upline1)) $o['Upline1'] = $this->Upline1;
        if (isset($this->Upline2)) $o['Upline2'] = $this->Upline2;
        if (isset($this->Upline3)) $o['Upline3'] = $this->Upline3;
        if (isset($this->Upline4)) $o['Upline4'] = $this->Upline4;
        if (isset($this->MVPID)) $o['MVPID'] = $this->MVPID;
        if (isset($this->AVPID)) $o['AVPID'] = $this->AVPID;
        if (isset($this->RVPID)) $o['RVPID'] = $this->RVPID;
        if (isset($this->AgentLevel)) $o['AgentLevel'] = $this->AgentLevel;
        if (isset($this->IsMVP)) $o['IsMVP'] = $this->IsMVP;
        if (isset($this->IsRVP)) $o['IsRVP'] = $this->IsRVP;
        if (isset($this->IsAVP)) $o['IsAVP'] = $this->IsAVP;
        if (isset($this->IsAdmin)) $o['IsAdmin'] = $this->IsAdmin;
        if (isset($this->IsBusinessCardAdmin)) $o['IsBusinessCardAdmin'] = $this->IsBusinessCardAdmin;
        if (isset($this->TeamName)) $o['TeamName'] = $this->TeamName;
        if (isset($this->LocationId)) $o['LocationId'] = $this->LocationId;
        if (isset($this->CalendarId)) $o['CalendarId'] = $this->CalendarId;
        if (isset($this->Rank)) $o['Rank'] = $this->Rank;
        if (isset($this->NBC)) $o['NBC'] = $this->NBC;
        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->AgentStatus)) $o['AgentStatus'] = $this->AgentStatus;
        if (isset($this->Office)) $o['Office'] = $this->Office;
        if (isset($this->DOB)) $o['DOB'] = JsonConverters::to('DateTime', $this->DOB);
        if (isset($this->SSN)) $o['SSN'] = $this->SSN;
        if (isset($this->Fax)) $o['Fax'] = $this->Fax;
        if (isset($this->BusinessEmail)) $o['BusinessEmail'] = $this->BusinessEmail;
        if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTime', $this->ModifiedDate);
        if (isset($this->ModifiedBy)) $o['ModifiedBy'] = $this->ModifiedBy;
        if (isset($this->TimeZone)) $o['TimeZone'] = $this->TimeZone;
        if (isset($this->LeaderLocked)) $o['LeaderLocked'] = $this->LeaderLocked;
        if (isset($this->LastSubmittedBusinessDate)) $o['LastSubmittedBusinessDate'] = JsonConverters::to('DateTime', $this->LastSubmittedBusinessDate);
        if (isset($this->GracePeriodDate)) $o['GracePeriodDate'] = JsonConverters::to('DateTime', $this->GracePeriodDate);
        if (isset($this->Vested)) $o['Vested'] = $this->Vested;
        if (isset($this->DirectPay)) $o['DirectPay'] = JsonConverters::to('DateTime', $this->DirectPay);
        if (isset($this->DirectPayApprBy)) $o['DirectPayApprBy'] = $this->DirectPayApprBy;
        if (isset($this->FactFinderBilling)) $o['FactFinderBilling'] = $this->FactFinderBilling;
        if (isset($this->FullName)) $o['FullName'] = $this->FullName;
        if (isset($this->ByLastName)) $o['ByLastName'] = $this->ByLastName;
        if (isset($this->IsSecurityLicensed)) $o['IsSecurityLicensed'] = $this->IsSecurityLicensed;
        if (isset($this->IsEncompassAdmin)) $o['IsEncompassAdmin'] = $this->IsEncompassAdmin;
        if (isset($this->ApiKey)) $o['ApiKey'] = $this->ApiKey;
        if (isset($this->LastSessionId)) $o['LastSessionId'] = $this->LastSessionId;
        if (isset($this->LastLogin)) $o['LastLogin'] = JsonConverters::to('DateTime', $this->LastLogin);
        if (isset($this->MfaActive)) $o['MfaActive'] = $this->MfaActive;
        if (isset($this->RequireMFA)) $o['RequireMFA'] = $this->RequireMFA;
        if (isset($this->SMSPhoneNumber)) $o['SMSPhoneNumber'] = $this->SMSPhoneNumber;
        if (isset($this->VerifiedEmailStatus)) $o['VerifiedEmailStatus'] = $this->VerifiedEmailStatus;
        if (isset($this->VerifiedCellPhoneStatus)) $o['VerifiedCellPhoneStatus'] = $this->VerifiedCellPhoneStatus;
        if (isset($this->SchedulerUrl)) $o['SchedulerUrl'] = $this->SchedulerUrl;
        if (isset($this->QueueDefaults)) $o['QueueDefaults'] = JsonConverters::to('QueueDefault', $this->QueueDefaults);
        if (isset($this->Roles)) $o['Roles'] = JsonConverters::toArray('string', $this->Roles);
        if (isset($this->PasswordUpdated)) $o['PasswordUpdated'] = $this->PasswordUpdated;
        if (isset($this->RestrictToSingleSession)) $o['RestrictToSingleSession'] = $this->RestrictToSingleSession;
        return empty($o) ? new class(){} : $o;
    }
}

class SmartsheetRecord implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $ID=0,
        /** @var string|null */
        public ?string $TableName=null,
        /** @var string */
        public string $PolicyAssociateId='',
        /** @var string|null */
        public ?string $AgentName=null,
        /** @var string|null */
        public ?string $ClientName=null,
        /** @var string|null */
        public ?string $PolicyNumber=null,
        /** @var string|null */
        public ?string $TransactionId=null,
        /** @var string|null */
        public ?string $type=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['ID'])) $this->ID = $o['ID'];
        if (isset($o['TableName'])) $this->TableName = $o['TableName'];
        if (isset($o['PolicyAssociateId'])) $this->PolicyAssociateId = $o['PolicyAssociateId'];
        if (isset($o['AgentName'])) $this->AgentName = $o['AgentName'];
        if (isset($o['ClientName'])) $this->ClientName = $o['ClientName'];
        if (isset($o['PolicyNumber'])) $this->PolicyNumber = $o['PolicyNumber'];
        if (isset($o['TransactionId'])) $this->TransactionId = $o['TransactionId'];
        if (isset($o['type'])) $this->type = $o['type'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->ID)) $o['ID'] = $this->ID;
        if (isset($this->TableName)) $o['TableName'] = $this->TableName;
        if (isset($this->PolicyAssociateId)) $o['PolicyAssociateId'] = $this->PolicyAssociateId;
        if (isset($this->AgentName)) $o['AgentName'] = $this->AgentName;
        if (isset($this->ClientName)) $o['ClientName'] = $this->ClientName;
        if (isset($this->PolicyNumber)) $o['PolicyNumber'] = $this->PolicyNumber;
        if (isset($this->TransactionId)) $o['TransactionId'] = $this->TransactionId;
        if (isset($this->type)) $o['type'] = $this->type;
        return empty($o) ? new class(){} : $o;
    }
}

class SmartsheetsTransferRequest implements JsonSerializable
{
    public function __construct(
        /** @var Agent|null */
        public ?Agent $agent=null,
        /** @var array<SmartsheetRecord>|null */
        public ?array $lines=null
    ) {
    }

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

PHP SmartsheetsTransferRequest 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.

POST /v1/Smartsheets/TransferLines HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<SmartsheetsTransferRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <agent>
    <AVPID>0</AVPID>
    <Address1>String</Address1>
    <Address2>String</Address2>
    <AgentId>0</AgentId>
    <AgentLevel>0</AgentLevel>
    <AgentName>String</AgentName>
    <AgentNumber>String</AgentNumber>
    <AgentStatus>String</AgentStatus>
    <AgreeToDate>0001-01-01T00:00:00</AgreeToDate>
    <AgreeToDisclosures>false</AgreeToDisclosures>
    <ApiKey>00000000-0000-0000-0000-000000000000</ApiKey>
    <BusinessEmail>String</BusinessEmail>
    <ByLastName>String</ByLastName>
    <CalendarId>00000000-0000-0000-0000-000000000000</CalendarId>
    <CellPhone>String</CellPhone>
    <City>String</City>
    <Company>String</Company>
    <Country>String</Country>
    <CreatedDate>0001-01-01T00:00:00</CreatedDate>
    <DOB>0001-01-01T00:00:00</DOB>
    <DirectPay>0001-01-01T00:00:00</DirectPay>
    <DirectPayApprBy>String</DirectPayApprBy>
    <Email>String</Email>
    <EmailSignature>String</EmailSignature>
    <FactFinderBilling>0</FactFinderBilling>
    <Fax>String</Fax>
    <FirstName>String</FirstName>
    <FullName>String</FullName>
    <GracePeriodDate>0001-01-01T00:00:00</GracePeriodDate>
    <HomePhone>String</HomePhone>
    <InsLicensed>false</InsLicensed>
    <IsAVP>false</IsAVP>
    <IsAdmin>false</IsAdmin>
    <IsAgent>false</IsAgent>
    <IsBusinessCardAdmin>false</IsBusinessCardAdmin>
    <IsEncompassAdmin>false</IsEncompassAdmin>
    <IsMVP>false</IsMVP>
    <IsRVP>false</IsRVP>
    <IsSecurityLicensed>false</IsSecurityLicensed>
    <LastLogin>0001-01-01T00:00:00</LastLogin>
    <LastName>String</LastName>
    <LastSessionId>String</LastSessionId>
    <LastSubmittedBusinessDate>0001-01-01T00:00:00</LastSubmittedBusinessDate>
    <LeaderLocked>false</LeaderLocked>
    <LocationId>00000000-0000-0000-0000-000000000000</LocationId>
    <MVPID>0</MVPID>
    <MfaActive>false</MfaActive>
    <MiddleInitial>String</MiddleInitial>
    <ModifiedBy>String</ModifiedBy>
    <ModifiedDate>0001-01-01T00:00:00</ModifiedDate>
    <NBC>false</NBC>
    <Notes>String</Notes>
    <Office>String</Office>
    <Package>String</Package>
    <PaidDate>0001-01-01T00:00:00</PaidDate>
    <PasswordUpdated>false</PasswordUpdated>
    <PlacementAgent>String</PlacementAgent>
    <QueueDefaults>
      <LocationId>00000000-0000-0000-0000-000000000000</LocationId>
      <Services xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:guid>00000000-0000-0000-0000-000000000000</d4p1:guid>
      </Services>
    </QueueDefaults>
    <RVPID>0</RVPID>
    <Rank>String</Rank>
    <ReferringAgent>String</ReferringAgent>
    <RequireMFA>false</RequireMFA>
    <RestrictToSingleSession>false</RestrictToSingleSession>
    <Roles xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:string>String</d3p1:string>
    </Roles>
    <SMSPhoneNumber>String</SMSPhoneNumber>
    <SSN>String</SSN>
    <SchedulerUrl>String</SchedulerUrl>
    <State>String</State>
    <StoreName>String</StoreName>
    <TeamName>String</TeamName>
    <TimeZone>String</TimeZone>
    <Upline1>0</Upline1>
    <Upline1Percent>0</Upline1Percent>
    <Upline2>0</Upline2>
    <Upline2Percent>0</Upline2Percent>
    <Upline3>0</Upline3>
    <Upline3Percent>0</Upline3Percent>
    <Upline4>0</Upline4>
    <Upline4Percent>0</Upline4Percent>
    <UserId>00000000-0000-0000-0000-000000000000</UserId>
    <VerifiedCellPhoneStatus>false</VerifiedCellPhoneStatus>
    <VerifiedEmailStatus>false</VerifiedEmailStatus>
    <Vested>false</Vested>
    <WorkPhone>String</WorkPhone>
    <Zip>String</Zip>
  </agent>
  <lines>
    <SmartsheetRecord>
      <AgentName>String</AgentName>
      <ClientName>String</ClientName>
      <ID>0</ID>
      <PolicyAssociateId>00000000-0000-0000-0000-000000000000</PolicyAssociateId>
      <PolicyNumber>String</PolicyNumber>
      <TableName>String</TableName>
      <TransactionId>String</TransactionId>
      <type>String</type>
    </SmartsheetRecord>
  </lines>
</SmartsheetsTransferRequest>