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 .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.

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

<QuoteListResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <Quotes>
    <QuoteSummary>
      <ApprovedAt>0001-01-01T00:00:00</ApprovedAt>
      <ApprovedByName>String</ApprovedByName>
      <CreatedAt>0001-01-01T00:00:00</CreatedAt>
      <DeclinedAt>0001-01-01T00:00:00</DeclinedAt>
      <ExpiresAt>0001-01-01T00:00:00</ExpiresAt>
      <IsLocked>false</IsLocked>
      <Name>String</Name>
      <ProjectID>0</ProjectID>
      <QuoteID>0</QuoteID>
      <QuoteUID>00000000-0000-0000-0000-000000000000</QuoteUID>
      <Status>String</Status>
      <Total>0</Total>
    </QuoteSummary>
  </Quotes>
  <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>
</QuoteListResponse>