| Requires any of the roles: | Agent, Administrator |
| POST,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 EstimateRevisionCreateRequest implements IConvertible
{
String? RfpDocumentUID;
String? Label;
String? Reason;
EstimateRevisionCreateRequest({this.RfpDocumentUID,this.Label,this.Reason});
EstimateRevisionCreateRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
RfpDocumentUID = json['RfpDocumentUID'];
Label = json['Label'];
Reason = json['Reason'];
return this;
}
Map<String, dynamic> toJson() => {
'RfpDocumentUID': RfpDocumentUID,
'Label': Label,
'Reason': Reason
};
getTypeName() => "EstimateRevisionCreateRequest";
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>[]),
'EstimateRevisionCreateRequest': TypeInfo(TypeOf.Class, create:() => EstimateRevisionCreateRequest()),
});
Dart EstimateRevisionCreateRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/Rfp/{RfpDocumentUID}/Estimate/Revisions HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<EstimateRevisionCreateRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<Label>String</Label>
<Reason>String</Reason>
<RfpDocumentUID>00000000-0000-0000-0000-000000000000</RfpDocumentUID>
</EstimateRevisionCreateRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<EstimateRevisionListResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<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>
<RevisionNo>0</RevisionNo>
<Revisions>
<EstimateRevision>
<CreatedAt>0001-01-01T00:00:00</CreatedAt>
<CreatedBy>String</CreatedBy>
<EstimateRevisionID>0</EstimateRevisionID>
<Label>String</Label>
<LineCount>0</LineCount>
<Reason>String</Reason>
<RevisionNo>0</RevisionNo>
<RfpDocumentID>0</RfpDocumentID>
<SnapshotJson>String</SnapshotJson>
<TotalAmount>0</TotalAmount>
<Trigger>String</Trigger>
</EstimateRevision>
</Revisions>
</EstimateRevisionListResponse>