| DELETE | /v1/coverage/restriction/{ClientWorkerRestrictionID} |
|---|
import 'package:servicestack/servicestack.dart';
class ClientWorkerRestriction implements IConvertible
{
int? ClientWorkerRestrictionID;
String? BranchId;
int? ClientContactID;
int? WorkerContactID;
String? RestrictionLevel;
String? Reason;
int? SourceRatingID;
String? CreatedBy;
DateTime? CreatedAt;
DateTime? UpdatedAt;
String? ClientName;
String? WorkerName;
String? LevelLabel;
ClientWorkerRestriction({this.ClientWorkerRestrictionID,this.BranchId,this.ClientContactID,this.WorkerContactID,this.RestrictionLevel,this.Reason,this.SourceRatingID,this.CreatedBy,this.CreatedAt,this.UpdatedAt,this.ClientName,this.WorkerName,this.LevelLabel});
ClientWorkerRestriction.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ClientWorkerRestrictionID = json['ClientWorkerRestrictionID'];
BranchId = json['BranchId'];
ClientContactID = json['ClientContactID'];
WorkerContactID = json['WorkerContactID'];
RestrictionLevel = json['RestrictionLevel'];
Reason = json['Reason'];
SourceRatingID = json['SourceRatingID'];
CreatedBy = json['CreatedBy'];
CreatedAt = JsonConverters.fromJson(json['CreatedAt'],'DateTime',context!);
UpdatedAt = JsonConverters.fromJson(json['UpdatedAt'],'DateTime',context!);
ClientName = json['ClientName'];
WorkerName = json['WorkerName'];
LevelLabel = json['LevelLabel'];
return this;
}
Map<String, dynamic> toJson() => {
'ClientWorkerRestrictionID': ClientWorkerRestrictionID,
'BranchId': BranchId,
'ClientContactID': ClientContactID,
'WorkerContactID': WorkerContactID,
'RestrictionLevel': RestrictionLevel,
'Reason': Reason,
'SourceRatingID': SourceRatingID,
'CreatedBy': CreatedBy,
'CreatedAt': JsonConverters.toJson(CreatedAt,'DateTime',context!),
'UpdatedAt': JsonConverters.toJson(UpdatedAt,'DateTime',context!),
'ClientName': ClientName,
'WorkerName': WorkerName,
'LevelLabel': LevelLabel
};
getTypeName() => "ClientWorkerRestriction";
TypeContext? context = _ctx;
}
class RestrictionParty implements IConvertible
{
int? ContactId;
String? Name;
RestrictionParty({this.ContactId,this.Name});
RestrictionParty.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ContactId = json['ContactId'];
Name = json['Name'];
return this;
}
Map<String, dynamic> toJson() => {
'ContactId': ContactId,
'Name': Name
};
getTypeName() => "RestrictionParty";
TypeContext? context = _ctx;
}
class ClientWorkerRestrictionsResponse implements IConvertible
{
List<ClientWorkerRestriction>? Restrictions = [];
List<RestrictionParty>? Clients = [];
List<RestrictionParty>? Workers = [];
ResponseStatus? ResponseStatus;
ClientWorkerRestrictionsResponse({this.Restrictions,this.Clients,this.Workers,this.ResponseStatus});
ClientWorkerRestrictionsResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Restrictions = JsonConverters.fromJson(json['Restrictions'],'List<ClientWorkerRestriction>',context!);
Clients = JsonConverters.fromJson(json['Clients'],'List<RestrictionParty>',context!);
Workers = JsonConverters.fromJson(json['Workers'],'List<RestrictionParty>',context!);
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Restrictions': JsonConverters.toJson(Restrictions,'List<ClientWorkerRestriction>',context!),
'Clients': JsonConverters.toJson(Clients,'List<RestrictionParty>',context!),
'Workers': JsonConverters.toJson(Workers,'List<RestrictionParty>',context!),
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
};
getTypeName() => "ClientWorkerRestrictionsResponse";
TypeContext? context = _ctx;
}
class ClientWorkerRestrictionClearRequest implements IConvertible
{
int? ClientWorkerRestrictionID;
ClientWorkerRestrictionClearRequest({this.ClientWorkerRestrictionID});
ClientWorkerRestrictionClearRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ClientWorkerRestrictionID = json['ClientWorkerRestrictionID'];
return this;
}
Map<String, dynamic> toJson() => {
'ClientWorkerRestrictionID': ClientWorkerRestrictionID
};
getTypeName() => "ClientWorkerRestrictionClearRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'ClientWorkerRestriction': TypeInfo(TypeOf.Class, create:() => ClientWorkerRestriction()),
'RestrictionParty': TypeInfo(TypeOf.Class, create:() => RestrictionParty()),
'ClientWorkerRestrictionsResponse': TypeInfo(TypeOf.Class, create:() => ClientWorkerRestrictionsResponse()),
'List<ClientWorkerRestriction>': TypeInfo(TypeOf.Class, create:() => <ClientWorkerRestriction>[]),
'List<RestrictionParty>': TypeInfo(TypeOf.Class, create:() => <RestrictionParty>[]),
'ClientWorkerRestrictionClearRequest': TypeInfo(TypeOf.Class, create:() => ClientWorkerRestrictionClearRequest()),
});
Dart ClientWorkerRestrictionClearRequest 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.
DELETE /v1/coverage/restriction/{ClientWorkerRestrictionID} HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
Restrictions:
[
{
ClientWorkerRestrictionID: 0,
BranchId: 00000000000000000000000000000000,
ClientContactID: 0,
WorkerContactID: 0,
RestrictionLevel: String,
Reason: String,
SourceRatingID: 0,
CreatedBy: String,
CreatedAt: 0001-01-01,
UpdatedAt: 0001-01-01,
ClientName: String,
WorkerName: String,
LevelLabel: String
}
],
Clients:
[
{
ContactId: 0,
Name: String
}
],
Workers:
[
{
ContactId: 0,
Name: String
}
],
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
}
}