| GET,OPTIONS | /v1/safety/actions/open |
|---|
import 'package:servicestack/servicestack.dart';
class CorrectiveAction implements IConvertible
{
int? CorrectiveActionID;
String? BranchId;
int? SafetyIncidentID;
String? Description;
String? Owner;
DateTime? DueDate;
String? Status;
String? Priority;
DateTime? CompletedAt;
String? IncidentNo;
String? IncidentTitle;
String? CreatedBy;
DateTime? CreatedAt;
DateTime? UpdatedAt;
CorrectiveAction({this.CorrectiveActionID,this.BranchId,this.SafetyIncidentID,this.Description,this.Owner,this.DueDate,this.Status,this.Priority,this.CompletedAt,this.IncidentNo,this.IncidentTitle,this.CreatedBy,this.CreatedAt,this.UpdatedAt});
CorrectiveAction.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
CorrectiveActionID = json['CorrectiveActionID'];
BranchId = json['BranchId'];
SafetyIncidentID = json['SafetyIncidentID'];
Description = json['Description'];
Owner = json['Owner'];
DueDate = JsonConverters.fromJson(json['DueDate'],'DateTime',context!);
Status = json['Status'];
Priority = json['Priority'];
CompletedAt = JsonConverters.fromJson(json['CompletedAt'],'DateTime',context!);
IncidentNo = json['IncidentNo'];
IncidentTitle = json['IncidentTitle'];
CreatedBy = json['CreatedBy'];
CreatedAt = JsonConverters.fromJson(json['CreatedAt'],'DateTime',context!);
UpdatedAt = JsonConverters.fromJson(json['UpdatedAt'],'DateTime',context!);
return this;
}
Map<String, dynamic> toJson() => {
'CorrectiveActionID': CorrectiveActionID,
'BranchId': BranchId,
'SafetyIncidentID': SafetyIncidentID,
'Description': Description,
'Owner': Owner,
'DueDate': JsonConverters.toJson(DueDate,'DateTime',context!),
'Status': Status,
'Priority': Priority,
'CompletedAt': JsonConverters.toJson(CompletedAt,'DateTime',context!),
'IncidentNo': IncidentNo,
'IncidentTitle': IncidentTitle,
'CreatedBy': CreatedBy,
'CreatedAt': JsonConverters.toJson(CreatedAt,'DateTime',context!),
'UpdatedAt': JsonConverters.toJson(UpdatedAt,'DateTime',context!)
};
getTypeName() => "CorrectiveAction";
TypeContext? context = _ctx;
}
class CorrectiveActionListResponse implements IConvertible
{
ResponseStatus? ResponseStatus;
List<CorrectiveAction>? Actions = [];
CorrectiveActionListResponse({this.ResponseStatus,this.Actions});
CorrectiveActionListResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
Actions = JsonConverters.fromJson(json['Actions'],'List<CorrectiveAction>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!),
'Actions': JsonConverters.toJson(Actions,'List<CorrectiveAction>',context!)
};
getTypeName() => "CorrectiveActionListResponse";
TypeContext? context = _ctx;
}
class CorrectiveActionOpenRequest implements IConvertible
{
CorrectiveActionOpenRequest();
CorrectiveActionOpenRequest.fromJson(Map<String, dynamic> json) : super();
fromMap(Map<String, dynamic> json) {
return this;
}
Map<String, dynamic> toJson() => {};
getTypeName() => "CorrectiveActionOpenRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'CorrectiveAction': TypeInfo(TypeOf.Class, create:() => CorrectiveAction()),
'CorrectiveActionListResponse': TypeInfo(TypeOf.Class, create:() => CorrectiveActionListResponse()),
'List<CorrectiveAction>': TypeInfo(TypeOf.Class, create:() => <CorrectiveAction>[]),
'CorrectiveActionOpenRequest': TypeInfo(TypeOf.Class, create:() => CorrectiveActionOpenRequest()),
});
Dart CorrectiveActionOpenRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v1/safety/actions/open HTTP/1.1 Host: api.dev.dynamics.trendsic.com Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"Actions":[{"CorrectiveActionID":0,"BranchId":"00000000000000000000000000000000","SafetyIncidentID":0,"Description":"String","Owner":"String","DueDate":"0001-01-01T00:00:00.0000000","Status":"String","Priority":"String","CompletedAt":"0001-01-01T00:00:00.0000000","IncidentNo":"String","IncidentTitle":"String","CreatedBy":"String","CreatedAt":"0001-01-01T00:00:00.0000000","UpdatedAt":"0001-01-01T00:00:00.0000000"}]}