| POST | /workflow-redo-request/{Id}/approve |
|---|
import 'package:servicestack/servicestack.dart';
class WorkflowRedoRequestDetail implements IConvertible
{
int? id;
int? documentId;
int? stepId;
String? stepName;
int? requestedBy;
String? requestedByName;
int? approverId;
String? approverName;
int? status;
String? reason;
String? comment;
DateTime? createdAt;
DateTime? actionAt;
WorkflowRedoRequestDetail({this.id,this.documentId,this.stepId,this.stepName,this.requestedBy,this.requestedByName,this.approverId,this.approverName,this.status,this.reason,this.comment,this.createdAt,this.actionAt});
WorkflowRedoRequestDetail.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
documentId = json['documentId'];
stepId = json['stepId'];
stepName = json['stepName'];
requestedBy = json['requestedBy'];
requestedByName = json['requestedByName'];
approverId = json['approverId'];
approverName = json['approverName'];
status = json['status'];
reason = json['reason'];
comment = json['comment'];
createdAt = JsonConverters.fromJson(json['createdAt'],'DateTime',context!);
actionAt = JsonConverters.fromJson(json['actionAt'],'DateTime',context!);
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'documentId': documentId,
'stepId': stepId,
'stepName': stepName,
'requestedBy': requestedBy,
'requestedByName': requestedByName,
'approverId': approverId,
'approverName': approverName,
'status': status,
'reason': reason,
'comment': comment,
'createdAt': JsonConverters.toJson(createdAt,'DateTime',context!),
'actionAt': JsonConverters.toJson(actionAt,'DateTime',context!)
};
getTypeName() => "WorkflowRedoRequestDetail";
TypeContext? context = _ctx;
}
class WorkflowRedoRequestResponse implements IConvertible
{
int? code;
String? message;
bool? requiresApproval;
WorkflowRedoRequestDetail? request;
WorkflowRedoRequestResponse({this.code,this.message,this.requiresApproval,this.request});
WorkflowRedoRequestResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
code = json['code'];
message = json['message'];
requiresApproval = json['requiresApproval'];
request = JsonConverters.fromJson(json['request'],'WorkflowRedoRequestDetail',context!);
return this;
}
Map<String, dynamic> toJson() => {
'code': code,
'message': message,
'requiresApproval': requiresApproval,
'request': JsonConverters.toJson(request,'WorkflowRedoRequestDetail',context!)
};
getTypeName() => "WorkflowRedoRequestResponse";
TypeContext? context = _ctx;
}
class ApproveWorkflowRedoRequest implements IConvertible
{
int? id;
bool? approve;
String? comment;
ApproveWorkflowRedoRequest({this.id,this.approve,this.comment});
ApproveWorkflowRedoRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
approve = json['approve'];
comment = json['comment'];
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'approve': approve,
'comment': comment
};
getTypeName() => "ApproveWorkflowRedoRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'etc_api.vsmlab.vn', types: <String, TypeInfo> {
'WorkflowRedoRequestDetail': TypeInfo(TypeOf.Class, create:() => WorkflowRedoRequestDetail()),
'WorkflowRedoRequestResponse': TypeInfo(TypeOf.Class, create:() => WorkflowRedoRequestResponse()),
'ApproveWorkflowRedoRequest': TypeInfo(TypeOf.Class, create:() => ApproveWorkflowRedoRequest()),
});
Dart ApproveWorkflowRedoRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /workflow-redo-request/{Id}/approve HTTP/1.1
Host: etc-api.vsmlab.vn
Accept: application/json
Content-Type: application/json
Content-Length: length
{"id":0,"approve":false,"comment":"String"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"code":0,"message":"String","requiresApproval":false,"request":{"id":0,"documentId":0,"stepId":0,"stepName":"String","requestedBy":0,"requestedByName":"String","approverId":0,"approverName":"String","status":0,"reason":"String","comment":"String","createdAt":"0001-01-01T00:00:00.0000000+07:06","actionAt":"0001-01-01T00:00:00.0000000+07:06"}}