Trendsic Platform Service

<back to all web services

PolicyInfoRequest

Requires Authentication
Requires any of the roles:Agent, Administrator
The following routes are available for this service:
POST,OPTIONS/v1/GetPolicyInfo
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';

class PolicyInfo implements IConvertible
{
    String? ReqCode;
    DateTime? RequestedDate;
    String? ReqStatus;
    DateTime? FulfilledDate;

    PolicyInfo({this.ReqCode,this.RequestedDate,this.ReqStatus,this.FulfilledDate});
    PolicyInfo.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ReqCode = json['ReqCode'];
        RequestedDate = JsonConverters.fromJson(json['RequestedDate'],'DateTime',context!);
        ReqStatus = json['ReqStatus'];
        FulfilledDate = JsonConverters.fromJson(json['FulfilledDate'],'DateTime',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ReqCode': ReqCode,
        'RequestedDate': JsonConverters.toJson(RequestedDate,'DateTime',context!),
        'ReqStatus': ReqStatus,
        'FulfilledDate': JsonConverters.toJson(FulfilledDate,'DateTime',context!)
    };

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

class PolicyInfoResponse implements IConvertible
{
    ResponseStatus? ResponseStatus;
    List<PolicyInfo>? PolicyInfo = [];

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

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

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

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

class PolicyInfoRequest implements IConvertible
{
    String? PolicyNum;

    PolicyInfoRequest({this.PolicyNum});
    PolicyInfoRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        PolicyNum = json['PolicyNum'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'PolicyNum': PolicyNum
    };

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

TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
    'PolicyInfo': TypeInfo(TypeOf.Class, create:() => PolicyInfo()),
    'PolicyInfoResponse': TypeInfo(TypeOf.Class, create:() => PolicyInfoResponse()),
    'List<PolicyInfo>': TypeInfo(TypeOf.Class, create:() => <PolicyInfo>[]),
    'PolicyInfoRequest': TypeInfo(TypeOf.Class, create:() => PolicyInfoRequest()),
});

Dart PolicyInfoRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

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

{"PolicyNum":"String"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"PolicyInfo":[{"ReqCode":"String","RequestedDate":"0001-01-01T00:00:00.0000000","ReqStatus":"String","FulfilledDate":"0001-01-01T00:00:00.0000000"}]}