Trendsic Platform Service

<back to all web services

EstimateRevisionListRequest

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

class EstimateRevision implements IConvertible
{
    int? EstimateRevisionID;
    int? RfpDocumentID;
    int? RevisionNo;
    String? Label;
    String? Reason;
    String? Trigger;
    double? TotalAmount;
    int? LineCount;
    String? CreatedBy;
    DateTime? CreatedAt;
    String? SnapshotJson;

    EstimateRevision({this.EstimateRevisionID,this.RfpDocumentID,this.RevisionNo,this.Label,this.Reason,this.Trigger,this.TotalAmount,this.LineCount,this.CreatedBy,this.CreatedAt,this.SnapshotJson});
    EstimateRevision.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        EstimateRevisionID = json['EstimateRevisionID'];
        RfpDocumentID = json['RfpDocumentID'];
        RevisionNo = json['RevisionNo'];
        Label = json['Label'];
        Reason = json['Reason'];
        Trigger = json['Trigger'];
        TotalAmount = JsonConverters.toDouble(json['TotalAmount']);
        LineCount = json['LineCount'];
        CreatedBy = json['CreatedBy'];
        CreatedAt = JsonConverters.fromJson(json['CreatedAt'],'DateTime',context!);
        SnapshotJson = json['SnapshotJson'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'EstimateRevisionID': EstimateRevisionID,
        'RfpDocumentID': RfpDocumentID,
        'RevisionNo': RevisionNo,
        'Label': Label,
        'Reason': Reason,
        'Trigger': Trigger,
        'TotalAmount': TotalAmount,
        'LineCount': LineCount,
        'CreatedBy': CreatedBy,
        'CreatedAt': JsonConverters.toJson(CreatedAt,'DateTime',context!),
        'SnapshotJson': SnapshotJson
    };

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

class EstimateRevisionListResponse implements IConvertible
{
    ResponseStatus? ResponseStatus;
    List<EstimateRevision>? Revisions = [];
    int? RevisionNo;

    EstimateRevisionListResponse({this.ResponseStatus,this.Revisions,this.RevisionNo});
    EstimateRevisionListResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

class EstimateRevisionListRequest implements IConvertible
{
    String? RfpDocumentUID;

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

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

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

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

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

Dart EstimateRevisionListRequest DTOs

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

HTTP + JSV

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

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

{
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	},
	Revisions: 
	[
		{
			EstimateRevisionID: 0,
			RfpDocumentID: 0,
			RevisionNo: 0,
			Label: String,
			Reason: String,
			Trigger: String,
			TotalAmount: 0,
			LineCount: 0,
			CreatedBy: String,
			CreatedAt: 0001-01-01,
			SnapshotJson: String
		}
	],
	RevisionNo: 0
}