| Requires any of the roles: | Agent, Administrator |
| GET,POST,PUT,DELETE,OPTIONS | /v1/Listings/{ID} | ||
|---|---|---|---|
| GET,POST,PUT,DELETE,OPTIONS | /v1/Listings | ||
| GET,POST,PUT,DELETE,OPTIONS | /v1/Listings/DateRange/{ParamStartDate}/{ParamEndDate}/{AgentID} | ||
| GET,POST,PUT,DELETE,OPTIONS | /v1/Listings/DateRange/{ParamStartDate}/{ParamEndDate} |
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
class Listing implements IConvertible
{
int? ID;
DateTime? LISTINGDATE;
DateTime? LISTINGTDATE;
String? POLICY;
String? OAGENT;
String? INSURED;
String? PREMIUM;
String? PART;
double? AMOUNT;
String? AGENTNM;
String? LISTINGCTYPE;
String? COMPANY;
String? APPROVED;
String? CARDCREDIT;
String? REGION;
String? FPAYOUT;
String? PROMOPTS;
String? APPCNT;
String? PARTPERCENT;
double? GROSS;
String? CITY;
String? STATE;
String? AGENTNO;
String? TYPE;
String? COMMRATE;
int? AgentID;
int? OAgentID;
double? FIELDPAYOUT;
Listing({this.ID,this.LISTINGDATE,this.LISTINGTDATE,this.POLICY,this.OAGENT,this.INSURED,this.PREMIUM,this.PART,this.AMOUNT,this.AGENTNM,this.LISTINGCTYPE,this.COMPANY,this.APPROVED,this.CARDCREDIT,this.REGION,this.FPAYOUT,this.PROMOPTS,this.APPCNT,this.PARTPERCENT,this.GROSS,this.CITY,this.STATE,this.AGENTNO,this.TYPE,this.COMMRATE,this.AgentID,this.OAgentID,this.FIELDPAYOUT});
Listing.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ID = json['ID'];
LISTINGDATE = JsonConverters.fromJson(json['LISTINGDATE'],'DateTime',context!);
LISTINGTDATE = JsonConverters.fromJson(json['LISTINGTDATE'],'DateTime',context!);
POLICY = json['POLICY'];
OAGENT = json['OAGENT'];
INSURED = json['INSURED'];
PREMIUM = json['PREMIUM'];
PART = json['PART'];
AMOUNT = JsonConverters.toDouble(json['AMOUNT']);
AGENTNM = json['AGENTNM'];
LISTINGCTYPE = json['LISTINGCTYPE'];
COMPANY = json['COMPANY'];
APPROVED = json['APPROVED'];
CARDCREDIT = json['CARDCREDIT'];
REGION = json['REGION'];
FPAYOUT = json['FPAYOUT'];
PROMOPTS = json['PROMOPTS'];
APPCNT = json['APPCNT'];
PARTPERCENT = json['PARTPERCENT'];
GROSS = JsonConverters.toDouble(json['GROSS']);
CITY = json['CITY'];
STATE = json['STATE'];
AGENTNO = json['AGENTNO'];
TYPE = json['TYPE'];
COMMRATE = json['COMMRATE'];
AgentID = json['AgentID'];
OAgentID = json['OAgentID'];
FIELDPAYOUT = JsonConverters.toDouble(json['FIELDPAYOUT']);
return this;
}
Map<String, dynamic> toJson() => {
'ID': ID,
'LISTINGDATE': JsonConverters.toJson(LISTINGDATE,'DateTime',context!),
'LISTINGTDATE': JsonConverters.toJson(LISTINGTDATE,'DateTime',context!),
'POLICY': POLICY,
'OAGENT': OAGENT,
'INSURED': INSURED,
'PREMIUM': PREMIUM,
'PART': PART,
'AMOUNT': AMOUNT,
'AGENTNM': AGENTNM,
'LISTINGCTYPE': LISTINGCTYPE,
'COMPANY': COMPANY,
'APPROVED': APPROVED,
'CARDCREDIT': CARDCREDIT,
'REGION': REGION,
'FPAYOUT': FPAYOUT,
'PROMOPTS': PROMOPTS,
'APPCNT': APPCNT,
'PARTPERCENT': PARTPERCENT,
'GROSS': GROSS,
'CITY': CITY,
'STATE': STATE,
'AGENTNO': AGENTNO,
'TYPE': TYPE,
'COMMRATE': COMMRATE,
'AgentID': AgentID,
'OAgentID': OAgentID,
'FIELDPAYOUT': FIELDPAYOUT
};
getTypeName() => "Listing";
TypeContext? context = _ctx;
}
class ListingsResponse implements IConvertible
{
ResponseStatus? ResponseStatus;
List<Listing>? Listings = [];
ListingsResponse({this.ResponseStatus,this.Listings});
ListingsResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
Listings = JsonConverters.fromJson(json['Listings'],'List<Listing>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!),
'Listings': JsonConverters.toJson(Listings,'List<Listing>',context!)
};
getTypeName() => "ListingsResponse";
TypeContext? context = _ctx;
}
class ListingsRequest implements IConvertible
{
List<Listing>? Listings = [];
int? AgentID;
DateTime? ParamStartDate;
DateTime? ParamEndDate;
ListingsRequest({this.Listings,this.AgentID,this.ParamStartDate,this.ParamEndDate});
ListingsRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Listings = JsonConverters.fromJson(json['Listings'],'List<Listing>',context!);
AgentID = json['AgentID'];
ParamStartDate = JsonConverters.fromJson(json['ParamStartDate'],'DateTime',context!);
ParamEndDate = JsonConverters.fromJson(json['ParamEndDate'],'DateTime',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Listings': JsonConverters.toJson(Listings,'List<Listing>',context!),
'AgentID': AgentID,
'ParamStartDate': JsonConverters.toJson(ParamStartDate,'DateTime',context!),
'ParamEndDate': JsonConverters.toJson(ParamEndDate,'DateTime',context!)
};
getTypeName() => "ListingsRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'Listing': TypeInfo(TypeOf.Class, create:() => Listing()),
'ListingsResponse': TypeInfo(TypeOf.Class, create:() => ListingsResponse()),
'List<Listing>': TypeInfo(TypeOf.Class, create:() => <Listing>[]),
'ListingsRequest': TypeInfo(TypeOf.Class, create:() => ListingsRequest()),
});
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.
POST /v1/Listings/{ID} HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<ListingsRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<AgentID>0</AgentID>
<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>
<ParamEndDate>0001-01-01T00:00:00</ParamEndDate>
<ParamStartDate>0001-01-01T00:00:00</ParamStartDate>
</ListingsRequest>
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>