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