| GET | /v1/coverage/restrictions |
|---|
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
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 ClientWorkerRestrictionsRequest implements IConvertible
{
ClientWorkerRestrictionsRequest();
ClientWorkerRestrictionsRequest.fromJson(Map<String, dynamic> json) : super();
fromMap(Map<String, dynamic> json) {
return this;
}
Map<String, dynamic> toJson() => {};
getTypeName() => "ClientWorkerRestrictionsRequest";
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>[]),
'ClientWorkerRestrictionsRequest': TypeInfo(TypeOf.Class, create:() => ClientWorkerRestrictionsRequest()),
});
Dart ClientWorkerRestrictionsRequest 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/coverage/restrictions HTTP/1.1 Host: api.dev.dynamics.trendsic.com Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"Restrictions":[{"ClientWorkerRestrictionID":0,"BranchId":"00000000000000000000000000000000","ClientContactID":0,"WorkerContactID":0,"RestrictionLevel":"String","Reason":"String","SourceRatingID":0,"CreatedBy":"String","CreatedAt":"0001-01-01T00:00:00.0000000","UpdatedAt":"0001-01-01T00:00:00.0000000","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"}}}