| POST,OPTIONS | /v1/worker/visit/{WorkerScheduleItemID}/flag |
|---|
import 'package:servicestack/servicestack.dart';
class WorkerVisitFlagResponse implements IConvertible
{
ResponseStatus? ResponseStatus;
bool? Success;
WorkerVisitFlagResponse({this.ResponseStatus,this.Success});
WorkerVisitFlagResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
Success = json['Success'];
return this;
}
Map<String, dynamic> toJson() => {
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!),
'Success': Success
};
getTypeName() => "WorkerVisitFlagResponse";
TypeContext? context = _ctx;
}
class WorkerVisitFlagRequest implements IConvertible
{
int? WorkerScheduleItemID;
String? Category;
String? Note;
WorkerVisitFlagRequest({this.WorkerScheduleItemID,this.Category,this.Note});
WorkerVisitFlagRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
WorkerScheduleItemID = json['WorkerScheduleItemID'];
Category = json['Category'];
Note = json['Note'];
return this;
}
Map<String, dynamic> toJson() => {
'WorkerScheduleItemID': WorkerScheduleItemID,
'Category': Category,
'Note': Note
};
getTypeName() => "WorkerVisitFlagRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'WorkerVisitFlagResponse': TypeInfo(TypeOf.Class, create:() => WorkerVisitFlagResponse()),
'WorkerVisitFlagRequest': TypeInfo(TypeOf.Class, create:() => WorkerVisitFlagRequest()),
});
Dart WorkerVisitFlagRequest DTOs
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/worker/visit/{WorkerScheduleItemID}/flag HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
WorkerScheduleItemID: 0,
Category: String,
Note: 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
}
},
Success: False
}