| Requires any of the roles: | Agent, Administrator |
| GET,OPTIONS | /v1/LSW_OLifE/{StartDate}/{EndDate} | ||
|---|---|---|---|
| GET,OPTIONS | /v1/LSW_OLifE/{StartDate}/{EndDate}/{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 LSW_OLifE implements JsonSerializable
{
public function __construct(
/** @var int */
public int $OLifeID=0,
/** @var string|null */
public ?string $SourceInfo=null,
/** @var DateTime */
public DateTime $CreateDate=new DateTime(),
/** @var DateTime */
public DateTime $TransExeDate=new DateTime(),
/** @var string|null */
public ?string $HoldingID=null,
/** @var string|null */
public ?string $HoldingTypeCode=null,
/** @var string|null */
public ?string $HoldingStatus=null,
/** @var DateTime */
public DateTime $AsOfDate=new DateTime(),
/** @var string|null */
public ?string $Policy_PolNumber=null,
/** @var string|null */
public ?string $Policy_LineOfBusiness=null,
/** @var string|null */
public ?string $Policy_ProductType=null,
/** @var string|null */
public ?string $Policy_ProductCode=null,
/** @var string|null */
public ?string $Policy_CarrierCode=null,
/** @var string|null */
public ?string $Policy_PlanName=null,
/** @var string|null */
public ?string $Policy_PolicyStatus=null,
/** @var string|null */
public ?string $Policy_Jurisdiction=null,
/** @var DateTime */
public DateTime $Policy_StatusChangeDate=new DateTime(),
/** @var string|null */
public ?string $Policy_PaymentMode=null,
/** @var string|null */
public ?string $Policy_PaymentModeTC=null,
/** @var float */
public float $Policy_PaymentAmt=0.0,
/** @var float */
public float $TotalPolicy_PaymentAmt=0.0,
/** @var string|null */
public ?string $Policy_PaymentMethod=null,
/** @var float */
public float $Life_TargetPremAmt=0.0,
/** @var float */
public float $TotalLife_TargetPremAmt=0.0,
/** @var float */
public float $Life_FaceAmt=0.0,
/** @var float */
public float $TotalLife_FaceAmt=0.0,
/** @var string|null */
public ?string $ApplicationInfo_TrackingID=null,
/** @var string|null */
public ?string $ApplicationInfo_CWAAmt=null,
/** @var string|null */
public ?string $TotalApplicationInfo_CWAAmt=null,
/** @var string|null */
public ?string $ApplicationInfo_SubmissionType=null,
/** @var DateTime */
public DateTime $ApplicationInfo_HOPolicyMailDate=new DateTime(),
/** @var string|null */
public ?string $ApplicationInfo_HoUnderwriterName=null,
/** @var DateTime */
public DateTime $ApplicationInfo_PlacementEndDate=new DateTime(),
/** @var string|null */
public ?string $ApplicationInfo_NBContactName=null,
/** @var DateTime */
public DateTime $ApplicationInfo_SignedDate=new DateTime(),
/** @var string|null */
public ?string $Client=null,
/** @var int */
public int $AgentID=0,
/** @var string|null */
public ?string $AgentNM=null,
/** @var string|null */
public ?string $Agent1Percent=null,
/** @var string|null */
public ?string $AgentNM2=null,
/** @var string|null */
public ?string $Agent2Percent=null,
/** @var string|null */
public ?string $AgentNM3=null,
/** @var string|null */
public ?string $Agent3Percent=null,
/** @var string|null */
public ?string $AgentNM4=null,
/** @var string|null */
public ?string $Agent4Percent=null,
/** @var float */
public float $QualifyingLifePremium=0.0,
/** @var float */
public float $TotalQualifyingLifePremium=0.0,
/** @var float */
public float $AnnTransfer=0.0,
/** @var float */
public float $TotalAnnTransfer=0.0,
/** @var float */
public float $AnnFlow=0.0,
/** @var float */
public float $TotalAnnFlow=0.0,
/** @var float */
public float $Points=0.0,
/** @var float */
public float $Life_Expected=0.0,
/** @var float */
public float $TotalLife_Expected=0.0,
/** @var string|null */
public ?string $FullName=null,
/** @var int */
public int $InterestPercent=0,
/** @var float */
public float $InterestPercentDecimal=0.0,
/** @var int */
public int $Apps=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['OLifeID'])) $this->OLifeID = $o['OLifeID'];
if (isset($o['SourceInfo'])) $this->SourceInfo = $o['SourceInfo'];
if (isset($o['CreateDate'])) $this->CreateDate = JsonConverters::from('DateTime', $o['CreateDate']);
if (isset($o['TransExeDate'])) $this->TransExeDate = JsonConverters::from('DateTime', $o['TransExeDate']);
if (isset($o['HoldingID'])) $this->HoldingID = $o['HoldingID'];
if (isset($o['HoldingTypeCode'])) $this->HoldingTypeCode = $o['HoldingTypeCode'];
if (isset($o['HoldingStatus'])) $this->HoldingStatus = $o['HoldingStatus'];
if (isset($o['AsOfDate'])) $this->AsOfDate = JsonConverters::from('DateTime', $o['AsOfDate']);
if (isset($o['Policy_PolNumber'])) $this->Policy_PolNumber = $o['Policy_PolNumber'];
if (isset($o['Policy_LineOfBusiness'])) $this->Policy_LineOfBusiness = $o['Policy_LineOfBusiness'];
if (isset($o['Policy_ProductType'])) $this->Policy_ProductType = $o['Policy_ProductType'];
if (isset($o['Policy_ProductCode'])) $this->Policy_ProductCode = $o['Policy_ProductCode'];
if (isset($o['Policy_CarrierCode'])) $this->Policy_CarrierCode = $o['Policy_CarrierCode'];
if (isset($o['Policy_PlanName'])) $this->Policy_PlanName = $o['Policy_PlanName'];
if (isset($o['Policy_PolicyStatus'])) $this->Policy_PolicyStatus = $o['Policy_PolicyStatus'];
if (isset($o['Policy_Jurisdiction'])) $this->Policy_Jurisdiction = $o['Policy_Jurisdiction'];
if (isset($o['Policy_StatusChangeDate'])) $this->Policy_StatusChangeDate = JsonConverters::from('DateTime', $o['Policy_StatusChangeDate']);
if (isset($o['Policy_PaymentMode'])) $this->Policy_PaymentMode = $o['Policy_PaymentMode'];
if (isset($o['Policy_PaymentModeTC'])) $this->Policy_PaymentModeTC = $o['Policy_PaymentModeTC'];
if (isset($o['Policy_PaymentAmt'])) $this->Policy_PaymentAmt = $o['Policy_PaymentAmt'];
if (isset($o['TotalPolicy_PaymentAmt'])) $this->TotalPolicy_PaymentAmt = $o['TotalPolicy_PaymentAmt'];
if (isset($o['Policy_PaymentMethod'])) $this->Policy_PaymentMethod = $o['Policy_PaymentMethod'];
if (isset($o['Life_TargetPremAmt'])) $this->Life_TargetPremAmt = $o['Life_TargetPremAmt'];
if (isset($o['TotalLife_TargetPremAmt'])) $this->TotalLife_TargetPremAmt = $o['TotalLife_TargetPremAmt'];
if (isset($o['Life_FaceAmt'])) $this->Life_FaceAmt = $o['Life_FaceAmt'];
if (isset($o['TotalLife_FaceAmt'])) $this->TotalLife_FaceAmt = $o['TotalLife_FaceAmt'];
if (isset($o['ApplicationInfo_TrackingID'])) $this->ApplicationInfo_TrackingID = $o['ApplicationInfo_TrackingID'];
if (isset($o['ApplicationInfo_CWAAmt'])) $this->ApplicationInfo_CWAAmt = $o['ApplicationInfo_CWAAmt'];
if (isset($o['TotalApplicationInfo_CWAAmt'])) $this->TotalApplicationInfo_CWAAmt = $o['TotalApplicationInfo_CWAAmt'];
if (isset($o['ApplicationInfo_SubmissionType'])) $this->ApplicationInfo_SubmissionType = $o['ApplicationInfo_SubmissionType'];
if (isset($o['ApplicationInfo_HOPolicyMailDate'])) $this->ApplicationInfo_HOPolicyMailDate = JsonConverters::from('DateTime', $o['ApplicationInfo_HOPolicyMailDate']);
if (isset($o['ApplicationInfo_HoUnderwriterName'])) $this->ApplicationInfo_HoUnderwriterName = $o['ApplicationInfo_HoUnderwriterName'];
if (isset($o['ApplicationInfo_PlacementEndDate'])) $this->ApplicationInfo_PlacementEndDate = JsonConverters::from('DateTime', $o['ApplicationInfo_PlacementEndDate']);
if (isset($o['ApplicationInfo_NBContactName'])) $this->ApplicationInfo_NBContactName = $o['ApplicationInfo_NBContactName'];
if (isset($o['ApplicationInfo_SignedDate'])) $this->ApplicationInfo_SignedDate = JsonConverters::from('DateTime', $o['ApplicationInfo_SignedDate']);
if (isset($o['Client'])) $this->Client = $o['Client'];
if (isset($o['AgentID'])) $this->AgentID = $o['AgentID'];
if (isset($o['AgentNM'])) $this->AgentNM = $o['AgentNM'];
if (isset($o['Agent1Percent'])) $this->Agent1Percent = $o['Agent1Percent'];
if (isset($o['AgentNM2'])) $this->AgentNM2 = $o['AgentNM2'];
if (isset($o['Agent2Percent'])) $this->Agent2Percent = $o['Agent2Percent'];
if (isset($o['AgentNM3'])) $this->AgentNM3 = $o['AgentNM3'];
if (isset($o['Agent3Percent'])) $this->Agent3Percent = $o['Agent3Percent'];
if (isset($o['AgentNM4'])) $this->AgentNM4 = $o['AgentNM4'];
if (isset($o['Agent4Percent'])) $this->Agent4Percent = $o['Agent4Percent'];
if (isset($o['QualifyingLifePremium'])) $this->QualifyingLifePremium = $o['QualifyingLifePremium'];
if (isset($o['TotalQualifyingLifePremium'])) $this->TotalQualifyingLifePremium = $o['TotalQualifyingLifePremium'];
if (isset($o['AnnTransfer'])) $this->AnnTransfer = $o['AnnTransfer'];
if (isset($o['TotalAnnTransfer'])) $this->TotalAnnTransfer = $o['TotalAnnTransfer'];
if (isset($o['AnnFlow'])) $this->AnnFlow = $o['AnnFlow'];
if (isset($o['TotalAnnFlow'])) $this->TotalAnnFlow = $o['TotalAnnFlow'];
if (isset($o['Points'])) $this->Points = $o['Points'];
if (isset($o['Life_Expected'])) $this->Life_Expected = $o['Life_Expected'];
if (isset($o['TotalLife_Expected'])) $this->TotalLife_Expected = $o['TotalLife_Expected'];
if (isset($o['FullName'])) $this->FullName = $o['FullName'];
if (isset($o['InterestPercent'])) $this->InterestPercent = $o['InterestPercent'];
if (isset($o['InterestPercentDecimal'])) $this->InterestPercentDecimal = $o['InterestPercentDecimal'];
if (isset($o['Apps'])) $this->Apps = $o['Apps'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->OLifeID)) $o['OLifeID'] = $this->OLifeID;
if (isset($this->SourceInfo)) $o['SourceInfo'] = $this->SourceInfo;
if (isset($this->CreateDate)) $o['CreateDate'] = JsonConverters::to('DateTime', $this->CreateDate);
if (isset($this->TransExeDate)) $o['TransExeDate'] = JsonConverters::to('DateTime', $this->TransExeDate);
if (isset($this->HoldingID)) $o['HoldingID'] = $this->HoldingID;
if (isset($this->HoldingTypeCode)) $o['HoldingTypeCode'] = $this->HoldingTypeCode;
if (isset($this->HoldingStatus)) $o['HoldingStatus'] = $this->HoldingStatus;
if (isset($this->AsOfDate)) $o['AsOfDate'] = JsonConverters::to('DateTime', $this->AsOfDate);
if (isset($this->Policy_PolNumber)) $o['Policy_PolNumber'] = $this->Policy_PolNumber;
if (isset($this->Policy_LineOfBusiness)) $o['Policy_LineOfBusiness'] = $this->Policy_LineOfBusiness;
if (isset($this->Policy_ProductType)) $o['Policy_ProductType'] = $this->Policy_ProductType;
if (isset($this->Policy_ProductCode)) $o['Policy_ProductCode'] = $this->Policy_ProductCode;
if (isset($this->Policy_CarrierCode)) $o['Policy_CarrierCode'] = $this->Policy_CarrierCode;
if (isset($this->Policy_PlanName)) $o['Policy_PlanName'] = $this->Policy_PlanName;
if (isset($this->Policy_PolicyStatus)) $o['Policy_PolicyStatus'] = $this->Policy_PolicyStatus;
if (isset($this->Policy_Jurisdiction)) $o['Policy_Jurisdiction'] = $this->Policy_Jurisdiction;
if (isset($this->Policy_StatusChangeDate)) $o['Policy_StatusChangeDate'] = JsonConverters::to('DateTime', $this->Policy_StatusChangeDate);
if (isset($this->Policy_PaymentMode)) $o['Policy_PaymentMode'] = $this->Policy_PaymentMode;
if (isset($this->Policy_PaymentModeTC)) $o['Policy_PaymentModeTC'] = $this->Policy_PaymentModeTC;
if (isset($this->Policy_PaymentAmt)) $o['Policy_PaymentAmt'] = $this->Policy_PaymentAmt;
if (isset($this->TotalPolicy_PaymentAmt)) $o['TotalPolicy_PaymentAmt'] = $this->TotalPolicy_PaymentAmt;
if (isset($this->Policy_PaymentMethod)) $o['Policy_PaymentMethod'] = $this->Policy_PaymentMethod;
if (isset($this->Life_TargetPremAmt)) $o['Life_TargetPremAmt'] = $this->Life_TargetPremAmt;
if (isset($this->TotalLife_TargetPremAmt)) $o['TotalLife_TargetPremAmt'] = $this->TotalLife_TargetPremAmt;
if (isset($this->Life_FaceAmt)) $o['Life_FaceAmt'] = $this->Life_FaceAmt;
if (isset($this->TotalLife_FaceAmt)) $o['TotalLife_FaceAmt'] = $this->TotalLife_FaceAmt;
if (isset($this->ApplicationInfo_TrackingID)) $o['ApplicationInfo_TrackingID'] = $this->ApplicationInfo_TrackingID;
if (isset($this->ApplicationInfo_CWAAmt)) $o['ApplicationInfo_CWAAmt'] = $this->ApplicationInfo_CWAAmt;
if (isset($this->TotalApplicationInfo_CWAAmt)) $o['TotalApplicationInfo_CWAAmt'] = $this->TotalApplicationInfo_CWAAmt;
if (isset($this->ApplicationInfo_SubmissionType)) $o['ApplicationInfo_SubmissionType'] = $this->ApplicationInfo_SubmissionType;
if (isset($this->ApplicationInfo_HOPolicyMailDate)) $o['ApplicationInfo_HOPolicyMailDate'] = JsonConverters::to('DateTime', $this->ApplicationInfo_HOPolicyMailDate);
if (isset($this->ApplicationInfo_HoUnderwriterName)) $o['ApplicationInfo_HoUnderwriterName'] = $this->ApplicationInfo_HoUnderwriterName;
if (isset($this->ApplicationInfo_PlacementEndDate)) $o['ApplicationInfo_PlacementEndDate'] = JsonConverters::to('DateTime', $this->ApplicationInfo_PlacementEndDate);
if (isset($this->ApplicationInfo_NBContactName)) $o['ApplicationInfo_NBContactName'] = $this->ApplicationInfo_NBContactName;
if (isset($this->ApplicationInfo_SignedDate)) $o['ApplicationInfo_SignedDate'] = JsonConverters::to('DateTime', $this->ApplicationInfo_SignedDate);
if (isset($this->Client)) $o['Client'] = $this->Client;
if (isset($this->AgentID)) $o['AgentID'] = $this->AgentID;
if (isset($this->AgentNM)) $o['AgentNM'] = $this->AgentNM;
if (isset($this->Agent1Percent)) $o['Agent1Percent'] = $this->Agent1Percent;
if (isset($this->AgentNM2)) $o['AgentNM2'] = $this->AgentNM2;
if (isset($this->Agent2Percent)) $o['Agent2Percent'] = $this->Agent2Percent;
if (isset($this->AgentNM3)) $o['AgentNM3'] = $this->AgentNM3;
if (isset($this->Agent3Percent)) $o['Agent3Percent'] = $this->Agent3Percent;
if (isset($this->AgentNM4)) $o['AgentNM4'] = $this->AgentNM4;
if (isset($this->Agent4Percent)) $o['Agent4Percent'] = $this->Agent4Percent;
if (isset($this->QualifyingLifePremium)) $o['QualifyingLifePremium'] = $this->QualifyingLifePremium;
if (isset($this->TotalQualifyingLifePremium)) $o['TotalQualifyingLifePremium'] = $this->TotalQualifyingLifePremium;
if (isset($this->AnnTransfer)) $o['AnnTransfer'] = $this->AnnTransfer;
if (isset($this->TotalAnnTransfer)) $o['TotalAnnTransfer'] = $this->TotalAnnTransfer;
if (isset($this->AnnFlow)) $o['AnnFlow'] = $this->AnnFlow;
if (isset($this->TotalAnnFlow)) $o['TotalAnnFlow'] = $this->TotalAnnFlow;
if (isset($this->Points)) $o['Points'] = $this->Points;
if (isset($this->Life_Expected)) $o['Life_Expected'] = $this->Life_Expected;
if (isset($this->TotalLife_Expected)) $o['TotalLife_Expected'] = $this->TotalLife_Expected;
if (isset($this->FullName)) $o['FullName'] = $this->FullName;
if (isset($this->InterestPercent)) $o['InterestPercent'] = $this->InterestPercent;
if (isset($this->InterestPercentDecimal)) $o['InterestPercentDecimal'] = $this->InterestPercentDecimal;
if (isset($this->Apps)) $o['Apps'] = $this->Apps;
return empty($o) ? new class(){} : $o;
}
}
class LSW_OLifEResponse implements JsonSerializable
{
public function __construct(
/** @var ResponseStatus|null */
public ?ResponseStatus $ResponseStatus=null,
/** @var array<LSW_OLifE>|null */
public ?array $LSW_OLifE=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ResponseStatus'])) $this->ResponseStatus = JsonConverters::from('ResponseStatus', $o['ResponseStatus']);
if (isset($o['LSW_OLifE'])) $this->LSW_OLifE = JsonConverters::fromArray('LSW_OLifE', $o['LSW_OLifE']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ResponseStatus)) $o['ResponseStatus'] = JsonConverters::to('ResponseStatus', $this->ResponseStatus);
if (isset($this->LSW_OLifE)) $o['LSW_OLifE'] = JsonConverters::toArray('LSW_OLifE', $this->LSW_OLifE);
return empty($o) ? new class(){} : $o;
}
}
class LSW_OLifERequest implements JsonSerializable
{
public function __construct(
/** @var DateTime */
public DateTime $StartDate=new DateTime(),
/** @var DateTime */
public DateTime $EndDate=new DateTime(),
/** @var int */
public int $AgentID=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['StartDate'])) $this->StartDate = JsonConverters::from('DateTime', $o['StartDate']);
if (isset($o['EndDate'])) $this->EndDate = JsonConverters::from('DateTime', $o['EndDate']);
if (isset($o['AgentID'])) $this->AgentID = $o['AgentID'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->StartDate)) $o['StartDate'] = JsonConverters::to('DateTime', $this->StartDate);
if (isset($this->EndDate)) $o['EndDate'] = JsonConverters::to('DateTime', $this->EndDate);
if (isset($this->AgentID)) $o['AgentID'] = $this->AgentID;
return empty($o) ? new class(){} : $o;
}
}
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.
GET /v1/LSW_OLifE/{StartDate}/{EndDate} 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
}
},
LSW_OLifE:
[
{
OLifeID: 0,
SourceInfo: String,
CreateDate: 0001-01-01,
TransExeDate: 0001-01-01,
HoldingID: String,
HoldingTypeCode: String,
HoldingStatus: String,
AsOfDate: 0001-01-01,
Policy_PolNumber: String,
Policy_LineOfBusiness: String,
Policy_ProductType: String,
Policy_ProductCode: String,
Policy_CarrierCode: String,
Policy_PlanName: String,
Policy_PolicyStatus: String,
Policy_Jurisdiction: String,
Policy_StatusChangeDate: 0001-01-01,
Policy_PaymentMode: String,
Policy_PaymentModeTC: String,
Policy_PaymentAmt: 0,
TotalPolicy_PaymentAmt: 0,
Policy_PaymentMethod: String,
Life_TargetPremAmt: 0,
TotalLife_TargetPremAmt: 0,
Life_FaceAmt: 0,
TotalLife_FaceAmt: 0,
ApplicationInfo_TrackingID: String,
ApplicationInfo_CWAAmt: String,
TotalApplicationInfo_CWAAmt: String,
ApplicationInfo_SubmissionType: String,
ApplicationInfo_HOPolicyMailDate: 0001-01-01,
ApplicationInfo_HoUnderwriterName: String,
ApplicationInfo_PlacementEndDate: 0001-01-01,
ApplicationInfo_NBContactName: String,
ApplicationInfo_SignedDate: 0001-01-01,
Client: String,
AgentID: 0,
AgentNM: String,
Agent1Percent: String,
AgentNM2: String,
Agent2Percent: String,
AgentNM3: String,
Agent3Percent: String,
AgentNM4: String,
Agent4Percent: String,
QualifyingLifePremium: 0,
TotalQualifyingLifePremium: 0,
AnnTransfer: 0,
TotalAnnTransfer: 0,
AnnFlow: 0,
TotalAnnFlow: 0,
Points: 0,
Life_Expected: 0,
TotalLife_Expected: 0,
FullName: String,
InterestPercent: 0,
InterestPercentDecimal: 0,
Apps: 0
}
]
}