| POST,OPTIONS | /v1/projects/{ProjectID}/rfis/{RfiID}/status |
|---|
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
class Rfi implements IConvertible
{
int? RfiID;
String? RfiUID;
int? ProjectID;
String? RfiNo;
String? Subject;
String? Question;
String? Answer;
String? Discipline;
String? AskedOf;
String? Status;
bool? CostImpact;
bool? ScheduleImpact;
DateTime? SubmittedDate;
DateTime? DueDate;
DateTime? AnsweredDate;
DateTime? ClosedDate;
int? PromotedChangeOrderID;
String? CreatedBy;
DateTime? CreatedAt;
DateTime? UpdatedAt;
int? DaysOpen;
Rfi({this.RfiID,this.RfiUID,this.ProjectID,this.RfiNo,this.Subject,this.Question,this.Answer,this.Discipline,this.AskedOf,this.Status,this.CostImpact,this.ScheduleImpact,this.SubmittedDate,this.DueDate,this.AnsweredDate,this.ClosedDate,this.PromotedChangeOrderID,this.CreatedBy,this.CreatedAt,this.UpdatedAt,this.DaysOpen});
Rfi.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
RfiID = json['RfiID'];
RfiUID = json['RfiUID'];
ProjectID = json['ProjectID'];
RfiNo = json['RfiNo'];
Subject = json['Subject'];
Question = json['Question'];
Answer = json['Answer'];
Discipline = json['Discipline'];
AskedOf = json['AskedOf'];
Status = json['Status'];
CostImpact = json['CostImpact'];
ScheduleImpact = json['ScheduleImpact'];
SubmittedDate = JsonConverters.fromJson(json['SubmittedDate'],'DateTime',context!);
DueDate = JsonConverters.fromJson(json['DueDate'],'DateTime',context!);
AnsweredDate = JsonConverters.fromJson(json['AnsweredDate'],'DateTime',context!);
ClosedDate = JsonConverters.fromJson(json['ClosedDate'],'DateTime',context!);
PromotedChangeOrderID = json['PromotedChangeOrderID'];
CreatedBy = json['CreatedBy'];
CreatedAt = JsonConverters.fromJson(json['CreatedAt'],'DateTime',context!);
UpdatedAt = JsonConverters.fromJson(json['UpdatedAt'],'DateTime',context!);
DaysOpen = json['DaysOpen'];
return this;
}
Map<String, dynamic> toJson() => {
'RfiID': RfiID,
'RfiUID': RfiUID,
'ProjectID': ProjectID,
'RfiNo': RfiNo,
'Subject': Subject,
'Question': Question,
'Answer': Answer,
'Discipline': Discipline,
'AskedOf': AskedOf,
'Status': Status,
'CostImpact': CostImpact,
'ScheduleImpact': ScheduleImpact,
'SubmittedDate': JsonConverters.toJson(SubmittedDate,'DateTime',context!),
'DueDate': JsonConverters.toJson(DueDate,'DateTime',context!),
'AnsweredDate': JsonConverters.toJson(AnsweredDate,'DateTime',context!),
'ClosedDate': JsonConverters.toJson(ClosedDate,'DateTime',context!),
'PromotedChangeOrderID': PromotedChangeOrderID,
'CreatedBy': CreatedBy,
'CreatedAt': JsonConverters.toJson(CreatedAt,'DateTime',context!),
'UpdatedAt': JsonConverters.toJson(UpdatedAt,'DateTime',context!),
'DaysOpen': DaysOpen
};
getTypeName() => "Rfi";
TypeContext? context = _ctx;
}
class RfiResponse implements IConvertible
{
ResponseStatus? ResponseStatus;
Rfi? Rfi;
RfiResponse({this.ResponseStatus,this.Rfi});
RfiResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
Rfi = JsonConverters.fromJson(json['Rfi'],'Rfi',context!);
return this;
}
Map<String, dynamic> toJson() => {
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!),
'Rfi': JsonConverters.toJson(Rfi,'Rfi',context!)
};
getTypeName() => "RfiResponse";
TypeContext? context = _ctx;
}
class RfiStatusRequest implements IConvertible
{
int? ProjectID;
int? RfiID;
String? Status;
RfiStatusRequest({this.ProjectID,this.RfiID,this.Status});
RfiStatusRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ProjectID = json['ProjectID'];
RfiID = json['RfiID'];
Status = json['Status'];
return this;
}
Map<String, dynamic> toJson() => {
'ProjectID': ProjectID,
'RfiID': RfiID,
'Status': Status
};
getTypeName() => "RfiStatusRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'Rfi': TypeInfo(TypeOf.Class, create:() => Rfi()),
'RfiResponse': TypeInfo(TypeOf.Class, create:() => RfiResponse()),
'RfiStatusRequest': TypeInfo(TypeOf.Class, create:() => RfiStatusRequest()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/projects/{ProjectID}/rfis/{RfiID}/status HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
ProjectID: 0,
RfiID: 0,
Status: String
}
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
}
},
Rfi:
{
RfiID: 0,
RfiUID: 00000000000000000000000000000000,
ProjectID: 0,
RfiNo: String,
Subject: String,
Question: String,
Answer: String,
Discipline: String,
AskedOf: String,
Status: String,
CostImpact: False,
ScheduleImpact: False,
SubmittedDate: 0001-01-01,
DueDate: 0001-01-01,
AnsweredDate: 0001-01-01,
ClosedDate: 0001-01-01,
PromotedChangeOrderID: 0,
CreatedBy: String,
CreatedAt: 0001-01-01,
UpdatedAt: 0001-01-01,
DaysOpen: 0
}
}