| Requires any of the roles: | Agent, Administrator |
| GET,OPTIONS | /v1/Securities/DateRange/{ParamStartDate}/{ParamEndDate}/{AgentID} | ||
|---|---|---|---|
| GET,OPTIONS | /v1/Securities/DateRange/{ParamStartDate}/{ParamEndDate} |
<?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 Listing implements JsonSerializable
{
public function __construct(
/** @var int */
public int $ID=0,
/** @var DateTime */
public DateTime $LISTINGDATE=new DateTime(),
/** @var DateTime */
public DateTime $LISTINGTDATE=new DateTime(),
/** @var string|null */
public ?string $POLICY=null,
/** @var string|null */
public ?string $OAGENT=null,
/** @var string|null */
public ?string $INSURED=null,
/** @var string|null */
public ?string $PREMIUM=null,
/** @var string|null */
public ?string $PART=null,
/** @var float */
public float $AMOUNT=0.0,
/** @var string|null */
public ?string $AGENTNM=null,
/** @var string|null */
public ?string $LISTINGCTYPE=null,
/** @var string|null */
public ?string $COMPANY=null,
/** @var string|null */
public ?string $APPROVED=null,
/** @var string|null */
public ?string $CARDCREDIT=null,
/** @var string|null */
public ?string $REGION=null,
/** @var string|null */
public ?string $FPAYOUT=null,
/** @var string|null */
public ?string $PROMOPTS=null,
/** @var string|null */
public ?string $APPCNT=null,
/** @var string|null */
public ?string $PARTPERCENT=null,
/** @var float */
public float $GROSS=0.0,
/** @var string|null */
public ?string $CITY=null,
/** @var string|null */
public ?string $STATE=null,
/** @var string|null */
public ?string $AGENTNO=null,
/** @var string|null */
public ?string $TYPE=null,
/** @var string|null */
public ?string $COMMRATE=null,
/** @var int */
public int $AgentID=0,
/** @var int */
public int $OAgentID=0,
/** @var float */
public float $FIELDPAYOUT=0.0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ID'])) $this->ID = $o['ID'];
if (isset($o['LISTINGDATE'])) $this->LISTINGDATE = JsonConverters::from('DateTime', $o['LISTINGDATE']);
if (isset($o['LISTINGTDATE'])) $this->LISTINGTDATE = JsonConverters::from('DateTime', $o['LISTINGTDATE']);
if (isset($o['POLICY'])) $this->POLICY = $o['POLICY'];
if (isset($o['OAGENT'])) $this->OAGENT = $o['OAGENT'];
if (isset($o['INSURED'])) $this->INSURED = $o['INSURED'];
if (isset($o['PREMIUM'])) $this->PREMIUM = $o['PREMIUM'];
if (isset($o['PART'])) $this->PART = $o['PART'];
if (isset($o['AMOUNT'])) $this->AMOUNT = $o['AMOUNT'];
if (isset($o['AGENTNM'])) $this->AGENTNM = $o['AGENTNM'];
if (isset($o['LISTINGCTYPE'])) $this->LISTINGCTYPE = $o['LISTINGCTYPE'];
if (isset($o['COMPANY'])) $this->COMPANY = $o['COMPANY'];
if (isset($o['APPROVED'])) $this->APPROVED = $o['APPROVED'];
if (isset($o['CARDCREDIT'])) $this->CARDCREDIT = $o['CARDCREDIT'];
if (isset($o['REGION'])) $this->REGION = $o['REGION'];
if (isset($o['FPAYOUT'])) $this->FPAYOUT = $o['FPAYOUT'];
if (isset($o['PROMOPTS'])) $this->PROMOPTS = $o['PROMOPTS'];
if (isset($o['APPCNT'])) $this->APPCNT = $o['APPCNT'];
if (isset($o['PARTPERCENT'])) $this->PARTPERCENT = $o['PARTPERCENT'];
if (isset($o['GROSS'])) $this->GROSS = $o['GROSS'];
if (isset($o['CITY'])) $this->CITY = $o['CITY'];
if (isset($o['STATE'])) $this->STATE = $o['STATE'];
if (isset($o['AGENTNO'])) $this->AGENTNO = $o['AGENTNO'];
if (isset($o['TYPE'])) $this->TYPE = $o['TYPE'];
if (isset($o['COMMRATE'])) $this->COMMRATE = $o['COMMRATE'];
if (isset($o['AgentID'])) $this->AgentID = $o['AgentID'];
if (isset($o['OAgentID'])) $this->OAgentID = $o['OAgentID'];
if (isset($o['FIELDPAYOUT'])) $this->FIELDPAYOUT = $o['FIELDPAYOUT'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ID)) $o['ID'] = $this->ID;
if (isset($this->LISTINGDATE)) $o['LISTINGDATE'] = JsonConverters::to('DateTime', $this->LISTINGDATE);
if (isset($this->LISTINGTDATE)) $o['LISTINGTDATE'] = JsonConverters::to('DateTime', $this->LISTINGTDATE);
if (isset($this->POLICY)) $o['POLICY'] = $this->POLICY;
if (isset($this->OAGENT)) $o['OAGENT'] = $this->OAGENT;
if (isset($this->INSURED)) $o['INSURED'] = $this->INSURED;
if (isset($this->PREMIUM)) $o['PREMIUM'] = $this->PREMIUM;
if (isset($this->PART)) $o['PART'] = $this->PART;
if (isset($this->AMOUNT)) $o['AMOUNT'] = $this->AMOUNT;
if (isset($this->AGENTNM)) $o['AGENTNM'] = $this->AGENTNM;
if (isset($this->LISTINGCTYPE)) $o['LISTINGCTYPE'] = $this->LISTINGCTYPE;
if (isset($this->COMPANY)) $o['COMPANY'] = $this->COMPANY;
if (isset($this->APPROVED)) $o['APPROVED'] = $this->APPROVED;
if (isset($this->CARDCREDIT)) $o['CARDCREDIT'] = $this->CARDCREDIT;
if (isset($this->REGION)) $o['REGION'] = $this->REGION;
if (isset($this->FPAYOUT)) $o['FPAYOUT'] = $this->FPAYOUT;
if (isset($this->PROMOPTS)) $o['PROMOPTS'] = $this->PROMOPTS;
if (isset($this->APPCNT)) $o['APPCNT'] = $this->APPCNT;
if (isset($this->PARTPERCENT)) $o['PARTPERCENT'] = $this->PARTPERCENT;
if (isset($this->GROSS)) $o['GROSS'] = $this->GROSS;
if (isset($this->CITY)) $o['CITY'] = $this->CITY;
if (isset($this->STATE)) $o['STATE'] = $this->STATE;
if (isset($this->AGENTNO)) $o['AGENTNO'] = $this->AGENTNO;
if (isset($this->TYPE)) $o['TYPE'] = $this->TYPE;
if (isset($this->COMMRATE)) $o['COMMRATE'] = $this->COMMRATE;
if (isset($this->AgentID)) $o['AgentID'] = $this->AgentID;
if (isset($this->OAgentID)) $o['OAgentID'] = $this->OAgentID;
if (isset($this->FIELDPAYOUT)) $o['FIELDPAYOUT'] = $this->FIELDPAYOUT;
return empty($o) ? new class(){} : $o;
}
}
class ListingsResponse implements JsonSerializable
{
public function __construct(
/** @var ResponseStatus|null */
public ?ResponseStatus $ResponseStatus=null,
/** @var array<Listing>|null */
public ?array $Listings=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ResponseStatus'])) $this->ResponseStatus = JsonConverters::from('ResponseStatus', $o['ResponseStatus']);
if (isset($o['Listings'])) $this->Listings = JsonConverters::fromArray('Listing', $o['Listings']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ResponseStatus)) $o['ResponseStatus'] = JsonConverters::to('ResponseStatus', $this->ResponseStatus);
if (isset($this->Listings)) $o['Listings'] = JsonConverters::toArray('Listing', $this->Listings);
return empty($o) ? new class(){} : $o;
}
}
class SecuritiesListingsRequest implements JsonSerializable
{
public function __construct(
/** @var array<Listing>|null */
public ?array $Listings=null,
/** @var int */
public int $AgentID=0,
/** @var DateTime */
public DateTime $ParamStartDate=new DateTime(),
/** @var DateTime */
public DateTime $ParamEndDate=new DateTime()
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Listings'])) $this->Listings = JsonConverters::fromArray('Listing', $o['Listings']);
if (isset($o['AgentID'])) $this->AgentID = $o['AgentID'];
if (isset($o['ParamStartDate'])) $this->ParamStartDate = JsonConverters::from('DateTime', $o['ParamStartDate']);
if (isset($o['ParamEndDate'])) $this->ParamEndDate = JsonConverters::from('DateTime', $o['ParamEndDate']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Listings)) $o['Listings'] = JsonConverters::toArray('Listing', $this->Listings);
if (isset($this->AgentID)) $o['AgentID'] = $this->AgentID;
if (isset($this->ParamStartDate)) $o['ParamStartDate'] = JsonConverters::to('DateTime', $this->ParamStartDate);
if (isset($this->ParamEndDate)) $o['ParamEndDate'] = JsonConverters::to('DateTime', $this->ParamEndDate);
return empty($o) ? new class(){} : $o;
}
}
PHP SecuritiesListingsRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v1/Securities/DateRange/{ParamStartDate}/{ParamEndDate}/{AgentID} HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<ListingsResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<Listings>
<Listing>
<AGENTNM>String</AGENTNM>
<AGENTNO>String</AGENTNO>
<AMOUNT>0</AMOUNT>
<APPCNT>String</APPCNT>
<APPROVED>String</APPROVED>
<AgentID>0</AgentID>
<CARDCREDIT>String</CARDCREDIT>
<CITY>String</CITY>
<COMMRATE>String</COMMRATE>
<COMPANY>String</COMPANY>
<FIELDPAYOUT>0</FIELDPAYOUT>
<FPAYOUT>String</FPAYOUT>
<GROSS>0</GROSS>
<ID>0</ID>
<INSURED>String</INSURED>
<LISTINGCTYPE>String</LISTINGCTYPE>
<LISTINGDATE>0001-01-01T00:00:00</LISTINGDATE>
<LISTINGTDATE>0001-01-01T00:00:00</LISTINGTDATE>
<OAGENT>String</OAGENT>
<OAgentID>0</OAgentID>
<PART>String</PART>
<PARTPERCENT>String</PARTPERCENT>
<POLICY>String</POLICY>
<PREMIUM>String</PREMIUM>
<PROMOPTS>String</PROMOPTS>
<REGION>String</REGION>
<STATE>String</STATE>
<TYPE>String</TYPE>
</Listing>
</Listings>
<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>
</ListingsResponse>