Trendsic Platform Service

<back to all web services

PolicyRequiredDocumentRequest

Requires Authentication
Requires any of the roles:Agent, Administrator, Agent, Administrator, Agent, Administrator, Agent, Administrator
The following routes are available for this service:
PUT,DELETE,OPTIONS/v1/PolicyRequiredDocument/{Id}
POST,OPTIONS/v1/PolicyRequiredDocument
GET/v1/PolicyRequiredDocument/GetAllByPolicyAssociateId/{PolicyAssociateId}
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';

class PolicyDocumentStatus implements IConvertible
{
    int? Id;
    String? Name;
    bool? IsNBCStatus;
    bool? IsAgentStatus;

    PolicyDocumentStatus({this.Id,this.Name,this.IsNBCStatus,this.IsAgentStatus});
    PolicyDocumentStatus.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        Name = json['Name'];
        IsNBCStatus = json['IsNBCStatus'];
        IsAgentStatus = json['IsAgentStatus'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'Name': Name,
        'IsNBCStatus': IsNBCStatus,
        'IsAgentStatus': IsAgentStatus
    };

    getTypeName() => "PolicyDocumentStatus";
    TypeContext? context = _ctx;
}

class PolicyRequiredDocument implements IConvertible
{
    int? Id;
    String? PolicyAssociateId;
    int? PolicyDocumentId;
    int? NBCStatusId;
    int? AgentStatusId;
    List<PolicyDocumentStatus>? StatusOptions = [];

    PolicyRequiredDocument({this.Id,this.PolicyAssociateId,this.PolicyDocumentId,this.NBCStatusId,this.AgentStatusId,this.StatusOptions});
    PolicyRequiredDocument.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        PolicyAssociateId = json['PolicyAssociateId'];
        PolicyDocumentId = json['PolicyDocumentId'];
        NBCStatusId = json['NBCStatusId'];
        AgentStatusId = json['AgentStatusId'];
        StatusOptions = JsonConverters.fromJson(json['StatusOptions'],'List<PolicyDocumentStatus>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'PolicyAssociateId': PolicyAssociateId,
        'PolicyDocumentId': PolicyDocumentId,
        'NBCStatusId': NBCStatusId,
        'AgentStatusId': AgentStatusId,
        'StatusOptions': JsonConverters.toJson(StatusOptions,'List<PolicyDocumentStatus>',context!)
    };

    getTypeName() => "PolicyRequiredDocument";
    TypeContext? context = _ctx;
}

class PolicyDocumentReminder implements IConvertible
{
    int? Id;
    int? PolicyDocumentId;
    String? ReminderFor;
    int? ReminderLeadTime;
    String? ReminderMessage;
    int? AdminAgentId;
    bool? NeedsPrompt;

    PolicyDocumentReminder({this.Id,this.PolicyDocumentId,this.ReminderFor,this.ReminderLeadTime,this.ReminderMessage,this.AdminAgentId,this.NeedsPrompt});
    PolicyDocumentReminder.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        PolicyDocumentId = json['PolicyDocumentId'];
        ReminderFor = json['ReminderFor'];
        ReminderLeadTime = json['ReminderLeadTime'];
        ReminderMessage = json['ReminderMessage'];
        AdminAgentId = json['AdminAgentId'];
        NeedsPrompt = json['NeedsPrompt'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'PolicyDocumentId': PolicyDocumentId,
        'ReminderFor': ReminderFor,
        'ReminderLeadTime': ReminderLeadTime,
        'ReminderMessage': ReminderMessage,
        'AdminAgentId': AdminAgentId,
        'NeedsPrompt': NeedsPrompt
    };

    getTypeName() => "PolicyDocumentReminder";
    TypeContext? context = _ctx;
}

class Reminder implements IConvertible
{
    String? ReminderId;
    String? TableName;
    String? FieldName;
    int? RecordId;
    DateTime? ReminderDate;
    String? ReminderNote;
    DateTime? CreatedDate;
    String? CreatedBy;
    DateTime? CompletedDate;

    Reminder({this.ReminderId,this.TableName,this.FieldName,this.RecordId,this.ReminderDate,this.ReminderNote,this.CreatedDate,this.CreatedBy,this.CompletedDate});
    Reminder.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ReminderId = json['ReminderId'];
        TableName = json['TableName'];
        FieldName = json['FieldName'];
        RecordId = json['RecordId'];
        ReminderDate = JsonConverters.fromJson(json['ReminderDate'],'DateTime',context!);
        ReminderNote = json['ReminderNote'];
        CreatedDate = JsonConverters.fromJson(json['CreatedDate'],'DateTime',context!);
        CreatedBy = json['CreatedBy'];
        CompletedDate = JsonConverters.fromJson(json['CompletedDate'],'DateTime',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ReminderId': ReminderId,
        'TableName': TableName,
        'FieldName': FieldName,
        'RecordId': RecordId,
        'ReminderDate': JsonConverters.toJson(ReminderDate,'DateTime',context!),
        'ReminderNote': ReminderNote,
        'CreatedDate': JsonConverters.toJson(CreatedDate,'DateTime',context!),
        'CreatedBy': CreatedBy,
        'CompletedDate': JsonConverters.toJson(CompletedDate,'DateTime',context!)
    };

    getTypeName() => "Reminder";
    TypeContext? context = _ctx;
}

class ReminderExtended extends Reminder implements IConvertible
{
    String? AgentName;
    String? RecordAgentName;
    int? RecordAgentID;
    bool? IsAdmin;
    int? AgentID;

    ReminderExtended({this.AgentName,this.RecordAgentName,this.RecordAgentID,this.IsAdmin,this.AgentID});
    ReminderExtended.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        AgentName = json['AgentName'];
        RecordAgentName = json['RecordAgentName'];
        RecordAgentID = json['RecordAgentID'];
        IsAdmin = json['IsAdmin'];
        AgentID = json['AgentID'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'AgentName': AgentName,
        'RecordAgentName': RecordAgentName,
        'RecordAgentID': RecordAgentID,
        'IsAdmin': IsAdmin,
        'AgentID': AgentID
    });

    getTypeName() => "ReminderExtended";
    TypeContext? context = _ctx;
}

class PolicyRequiredDocumentExtended extends PolicyRequiredDocument implements IConvertible
{
    List<PolicyDocumentReminder>? Reminders = [];
    List<ReminderExtended>? AgentReminders = [];

    PolicyRequiredDocumentExtended({this.Reminders,this.AgentReminders});
    PolicyRequiredDocumentExtended.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        Reminders = JsonConverters.fromJson(json['Reminders'],'List<PolicyDocumentReminder>',context!);
        AgentReminders = JsonConverters.fromJson(json['AgentReminders'],'List<ReminderExtended>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'Reminders': JsonConverters.toJson(Reminders,'List<PolicyDocumentReminder>',context!),
        'AgentReminders': JsonConverters.toJson(AgentReminders,'List<ReminderExtended>',context!)
    });

    getTypeName() => "PolicyRequiredDocumentExtended";
    TypeContext? context = _ctx;
}

class PolicyRequiredDocumentResponse implements IConvertible
{
    ResponseStatus? ResponseStatus;
    List<PolicyRequiredDocumentExtended>? PolicyRequiredDocuments = [];

    PolicyRequiredDocumentResponse({this.ResponseStatus,this.PolicyRequiredDocuments});
    PolicyRequiredDocumentResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
        PolicyRequiredDocuments = JsonConverters.fromJson(json['PolicyRequiredDocuments'],'List<PolicyRequiredDocumentExtended>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!),
        'PolicyRequiredDocuments': JsonConverters.toJson(PolicyRequiredDocuments,'List<PolicyRequiredDocumentExtended>',context!)
    };

    getTypeName() => "PolicyRequiredDocumentResponse";
    TypeContext? context = _ctx;
}

class PolicyRequiredDocumentRequest implements IConvertible
{
    PolicyRequiredDocumentExtended? PolicyRequiredDocument;
    String? PolicyAssociateId;
    int? Id;

    PolicyRequiredDocumentRequest({this.PolicyRequiredDocument,this.PolicyAssociateId,this.Id});
    PolicyRequiredDocumentRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        PolicyRequiredDocument = JsonConverters.fromJson(json['PolicyRequiredDocument'],'PolicyRequiredDocumentExtended',context!);
        PolicyAssociateId = json['PolicyAssociateId'];
        Id = json['Id'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'PolicyRequiredDocument': JsonConverters.toJson(PolicyRequiredDocument,'PolicyRequiredDocumentExtended',context!),
        'PolicyAssociateId': PolicyAssociateId,
        'Id': Id
    };

    getTypeName() => "PolicyRequiredDocumentRequest";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
    'PolicyDocumentStatus': TypeInfo(TypeOf.Class, create:() => PolicyDocumentStatus()),
    'PolicyRequiredDocument': TypeInfo(TypeOf.Class, create:() => PolicyRequiredDocument()),
    'List<PolicyDocumentStatus>': TypeInfo(TypeOf.Class, create:() => <PolicyDocumentStatus>[]),
    'PolicyDocumentReminder': TypeInfo(TypeOf.Class, create:() => PolicyDocumentReminder()),
    'Reminder': TypeInfo(TypeOf.Class, create:() => Reminder()),
    'ReminderExtended': TypeInfo(TypeOf.Class, create:() => ReminderExtended()),
    'PolicyRequiredDocumentExtended': TypeInfo(TypeOf.Class, create:() => PolicyRequiredDocumentExtended()),
    'List<PolicyDocumentReminder>': TypeInfo(TypeOf.Class, create:() => <PolicyDocumentReminder>[]),
    'List<ReminderExtended>': TypeInfo(TypeOf.Class, create:() => <ReminderExtended>[]),
    'PolicyRequiredDocumentResponse': TypeInfo(TypeOf.Class, create:() => PolicyRequiredDocumentResponse()),
    'List<PolicyRequiredDocumentExtended>': TypeInfo(TypeOf.Class, create:() => <PolicyRequiredDocumentExtended>[]),
    'PolicyRequiredDocumentRequest': TypeInfo(TypeOf.Class, create:() => PolicyRequiredDocumentRequest()),
});

Dart PolicyRequiredDocumentRequest 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/PolicyRequiredDocument HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<PolicyRequiredDocumentRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <Id>0</Id>
  <PolicyAssociateId>00000000-0000-0000-0000-000000000000</PolicyAssociateId>
  <PolicyRequiredDocument>
    <AgentStatusId>0</AgentStatusId>
    <Id>0</Id>
    <NBCStatusId>0</NBCStatusId>
    <PolicyAssociateId>00000000-0000-0000-0000-000000000000</PolicyAssociateId>
    <PolicyDocumentId>0</PolicyDocumentId>
    <StatusOptions>
      <PolicyDocumentStatus>
        <Id>0</Id>
        <IsAgentStatus>false</IsAgentStatus>
        <IsNBCStatus>false</IsNBCStatus>
        <Name>String</Name>
      </PolicyDocumentStatus>
    </StatusOptions>
    <AgentReminders>
      <ReminderExtended>
        <CompletedDate>0001-01-01T00:00:00</CompletedDate>
        <CreatedBy>String</CreatedBy>
        <CreatedDate>0001-01-01T00:00:00</CreatedDate>
        <FieldName>String</FieldName>
        <RecordId>0</RecordId>
        <ReminderDate>0001-01-01T00:00:00</ReminderDate>
        <ReminderId>00000000-0000-0000-0000-000000000000</ReminderId>
        <ReminderNote>String</ReminderNote>
        <TableName>String</TableName>
        <AgentID>0</AgentID>
        <AgentName>String</AgentName>
        <IsAdmin>false</IsAdmin>
        <RecordAgentID>0</RecordAgentID>
        <RecordAgentName>String</RecordAgentName>
      </ReminderExtended>
    </AgentReminders>
    <Reminders>
      <PolicyDocumentReminder>
        <AdminAgentId>0</AdminAgentId>
        <Id>0</Id>
        <NeedsPrompt>false</NeedsPrompt>
        <PolicyDocumentId>0</PolicyDocumentId>
        <ReminderFor>String</ReminderFor>
        <ReminderLeadTime>0</ReminderLeadTime>
        <ReminderMessage>String</ReminderMessage>
      </PolicyDocumentReminder>
    </Reminders>
  </PolicyRequiredDocument>
</PolicyRequiredDocumentRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<PolicyRequiredDocumentResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <PolicyRequiredDocuments>
    <PolicyRequiredDocumentExtended>
      <AgentStatusId>0</AgentStatusId>
      <Id>0</Id>
      <NBCStatusId>0</NBCStatusId>
      <PolicyAssociateId>00000000-0000-0000-0000-000000000000</PolicyAssociateId>
      <PolicyDocumentId>0</PolicyDocumentId>
      <StatusOptions>
        <PolicyDocumentStatus>
          <Id>0</Id>
          <IsAgentStatus>false</IsAgentStatus>
          <IsNBCStatus>false</IsNBCStatus>
          <Name>String</Name>
        </PolicyDocumentStatus>
      </StatusOptions>
      <AgentReminders>
        <ReminderExtended>
          <CompletedDate>0001-01-01T00:00:00</CompletedDate>
          <CreatedBy>String</CreatedBy>
          <CreatedDate>0001-01-01T00:00:00</CreatedDate>
          <FieldName>String</FieldName>
          <RecordId>0</RecordId>
          <ReminderDate>0001-01-01T00:00:00</ReminderDate>
          <ReminderId>00000000-0000-0000-0000-000000000000</ReminderId>
          <ReminderNote>String</ReminderNote>
          <TableName>String</TableName>
          <AgentID>0</AgentID>
          <AgentName>String</AgentName>
          <IsAdmin>false</IsAdmin>
          <RecordAgentID>0</RecordAgentID>
          <RecordAgentName>String</RecordAgentName>
        </ReminderExtended>
      </AgentReminders>
      <Reminders>
        <PolicyDocumentReminder>
          <AdminAgentId>0</AdminAgentId>
          <Id>0</Id>
          <NeedsPrompt>false</NeedsPrompt>
          <PolicyDocumentId>0</PolicyDocumentId>
          <ReminderFor>String</ReminderFor>
          <ReminderLeadTime>0</ReminderLeadTime>
          <ReminderMessage>String</ReminderMessage>
        </PolicyDocumentReminder>
      </Reminders>
    </PolicyRequiredDocumentExtended>
  </PolicyRequiredDocuments>
  <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>
</PolicyRequiredDocumentResponse>