Trendsic Platform Service

<back to all web services

ComparablesRequest

Requires Authentication
Requires any of the roles:Agent, Administrator
The following routes are available for this service:
GET,OPTIONS/v1/Rfp/{RfpDocumentUID}/Comparables
import 'package:servicestack/servicestack.dart';

class ComparableLettingView implements IConvertible
{
    String? ProjectNumber;
    DateTime? LettingDate;
    double? AgeYears;
    String? Parish;
    String? LettingUrl;
    double? WinnerTotal;
    double? SpreadPct;
    int? BidderCount;
    int? SharedCount;
    int? ItemCount;
    double? OverlapPct;
    double? MobilizationPct;
    double? TrafficControlPct;

    ComparableLettingView({this.ProjectNumber,this.LettingDate,this.AgeYears,this.Parish,this.LettingUrl,this.WinnerTotal,this.SpreadPct,this.BidderCount,this.SharedCount,this.ItemCount,this.OverlapPct,this.MobilizationPct,this.TrafficControlPct});
    ComparableLettingView.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ProjectNumber = json['ProjectNumber'];
        LettingDate = JsonConverters.fromJson(json['LettingDate'],'DateTime',context!);
        AgeYears = JsonConverters.toDouble(json['AgeYears']);
        Parish = json['Parish'];
        LettingUrl = json['LettingUrl'];
        WinnerTotal = JsonConverters.toDouble(json['WinnerTotal']);
        SpreadPct = JsonConverters.toDouble(json['SpreadPct']);
        BidderCount = json['BidderCount'];
        SharedCount = json['SharedCount'];
        ItemCount = json['ItemCount'];
        OverlapPct = JsonConverters.toDouble(json['OverlapPct']);
        MobilizationPct = JsonConverters.toDouble(json['MobilizationPct']);
        TrafficControlPct = JsonConverters.toDouble(json['TrafficControlPct']);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ProjectNumber': ProjectNumber,
        'LettingDate': JsonConverters.toJson(LettingDate,'DateTime',context!),
        'AgeYears': AgeYears,
        'Parish': Parish,
        'LettingUrl': LettingUrl,
        'WinnerTotal': WinnerTotal,
        'SpreadPct': SpreadPct,
        'BidderCount': BidderCount,
        'SharedCount': SharedCount,
        'ItemCount': ItemCount,
        'OverlapPct': OverlapPct,
        'MobilizationPct': MobilizationPct,
        'TrafficControlPct': TrafficControlPct
    };

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

class ComparablesSummaryView implements IConvertible
{
    double? MedianMobilizationPct;
    double? MedianTrafficControlPct;
    double? MedianSpreadPct;
    double? AppliedMobilizationPct;
    String? Note;

    ComparablesSummaryView({this.MedianMobilizationPct,this.MedianTrafficControlPct,this.MedianSpreadPct,this.AppliedMobilizationPct,this.Note});
    ComparablesSummaryView.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        MedianMobilizationPct = JsonConverters.toDouble(json['MedianMobilizationPct']);
        MedianTrafficControlPct = JsonConverters.toDouble(json['MedianTrafficControlPct']);
        MedianSpreadPct = JsonConverters.toDouble(json['MedianSpreadPct']);
        AppliedMobilizationPct = JsonConverters.toDouble(json['AppliedMobilizationPct']);
        Note = json['Note'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'MedianMobilizationPct': MedianMobilizationPct,
        'MedianTrafficControlPct': MedianTrafficControlPct,
        'MedianSpreadPct': MedianSpreadPct,
        'AppliedMobilizationPct': AppliedMobilizationPct,
        'Note': Note
    };

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

class ComparablesResponse implements IConvertible
{
    ResponseStatus? ResponseStatus;
    List<ComparableLettingView>? Comparables = [];
    ComparablesSummaryView? Summary;

    ComparablesResponse({this.ResponseStatus,this.Comparables,this.Summary});
    ComparablesResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

class ComparablesRequest implements IConvertible
{
    String? RfpDocumentUID;

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

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

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

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

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

Dart ComparablesRequest DTOs

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

HTTP + OTHER

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

GET /v1/Rfp/{RfpDocumentUID}/Comparables HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"Comparables":[{"ProjectNumber":"String","LettingDate":"0001-01-01T00:00:00.0000000","AgeYears":0,"Parish":"String","LettingUrl":"String","WinnerTotal":0,"SpreadPct":0,"BidderCount":0,"SharedCount":0,"ItemCount":0,"OverlapPct":0,"MobilizationPct":0,"TrafficControlPct":0}],"Summary":{"MedianMobilizationPct":0,"MedianTrafficControlPct":0,"MedianSpreadPct":0,"AppliedMobilizationPct":0,"Note":"String"}}