Trendsic Platform Service

<back to all web services

RfiPromoteToCoRequest

Requires Authentication
The following routes are available for this service:
POST,OPTIONS/v1/projects/{ProjectID}/rfis/{RfiID}/promote-to-co
import 'package:servicestack/servicestack.dart';

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 RfiPromoteToCoResponse implements IConvertible
{
    ResponseStatus? ResponseStatus;
    Rfi? Rfi;
    int? ChangeOrderID;
    String? CONumber;

    RfiPromoteToCoResponse({this.ResponseStatus,this.Rfi,this.ChangeOrderID,this.CONumber});
    RfiPromoteToCoResponse.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!);
        ChangeOrderID = json['ChangeOrderID'];
        CONumber = json['CONumber'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!),
        'Rfi': JsonConverters.toJson(Rfi,'Rfi',context!),
        'ChangeOrderID': ChangeOrderID,
        'CONumber': CONumber
    };

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

class RfiPromoteToCoRequest implements IConvertible
{
    int? ProjectID;
    int? RfiID;

    RfiPromoteToCoRequest({this.ProjectID,this.RfiID});
    RfiPromoteToCoRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
    'Rfi': TypeInfo(TypeOf.Class, create:() => Rfi()),
    'RfiPromoteToCoResponse': TypeInfo(TypeOf.Class, create:() => RfiPromoteToCoResponse()),
    'RfiPromoteToCoRequest': TypeInfo(TypeOf.Class, create:() => RfiPromoteToCoRequest()),
});

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

POST /v1/projects/{ProjectID}/rfis/{RfiID}/promote-to-co HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	ProjectID: 0,
	RfiID: 0
}
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
	},
	ChangeOrderID: 0,
	CONumber: String
}