Trendsic Platform Service

<back to all web services

ProjectQuotesRequest

Requires Authentication
The following routes are available for this service:
GET,OPTIONS/v1/project/{ProjectUID}/quotes
import 'package:servicestack/servicestack.dart';

class QuoteSummary implements IConvertible
{
    int? QuoteID;
    String? QuoteUID;
    int? ProjectID;
    String? Name;
    String? Status;
    double? Total;
    bool? IsLocked;
    String? ApprovedByName;
    DateTime? ApprovedAt;
    DateTime? DeclinedAt;
    DateTime? ExpiresAt;
    DateTime? CreatedAt;

    QuoteSummary({this.QuoteID,this.QuoteUID,this.ProjectID,this.Name,this.Status,this.Total,this.IsLocked,this.ApprovedByName,this.ApprovedAt,this.DeclinedAt,this.ExpiresAt,this.CreatedAt});
    QuoteSummary.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        QuoteID = json['QuoteID'];
        QuoteUID = json['QuoteUID'];
        ProjectID = json['ProjectID'];
        Name = json['Name'];
        Status = json['Status'];
        Total = JsonConverters.toDouble(json['Total']);
        IsLocked = json['IsLocked'];
        ApprovedByName = json['ApprovedByName'];
        ApprovedAt = JsonConverters.fromJson(json['ApprovedAt'],'DateTime',context!);
        DeclinedAt = JsonConverters.fromJson(json['DeclinedAt'],'DateTime',context!);
        ExpiresAt = JsonConverters.fromJson(json['ExpiresAt'],'DateTime',context!);
        CreatedAt = JsonConverters.fromJson(json['CreatedAt'],'DateTime',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'QuoteID': QuoteID,
        'QuoteUID': QuoteUID,
        'ProjectID': ProjectID,
        'Name': Name,
        'Status': Status,
        'Total': Total,
        'IsLocked': IsLocked,
        'ApprovedByName': ApprovedByName,
        'ApprovedAt': JsonConverters.toJson(ApprovedAt,'DateTime',context!),
        'DeclinedAt': JsonConverters.toJson(DeclinedAt,'DateTime',context!),
        'ExpiresAt': JsonConverters.toJson(ExpiresAt,'DateTime',context!),
        'CreatedAt': JsonConverters.toJson(CreatedAt,'DateTime',context!)
    };

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

class QuoteListResponse implements IConvertible
{
    ResponseStatus? ResponseStatus;
    List<QuoteSummary>? Quotes = [];

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

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

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

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

class ProjectQuotesRequest implements IConvertible
{
    String? ProjectUID;

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

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

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

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

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

Dart ProjectQuotesRequest DTOs

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

HTTP + CSV

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

GET /v1/project/{ProjectUID}/quotes HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"Quotes":[{"QuoteID":0,"QuoteUID":"00000000000000000000000000000000","ProjectID":0,"Name":"String","Status":"String","Total":0,"IsLocked":false,"ApprovedByName":"String","ApprovedAt":"0001-01-01T00:00:00.0000000","DeclinedAt":"0001-01-01T00:00:00.0000000","ExpiresAt":"0001-01-01T00:00:00.0000000","CreatedAt":"0001-01-01T00:00:00.0000000"}]}