| Requires any of the roles: | Agent, Administrator |
| PUT,OPTIONS | /v1/contact/{ContactId}/say-name-as |
|---|
import 'package:servicestack/servicestack.dart';
class ContactQueueVisit implements IConvertible
{
String? CheckinId;
String? BranchId;
String? BranchName;
String? LineId;
String? ServiceName;
int? Outcome;
String? OutcomeLabel;
bool? IsAppointment;
DateTime? SignInUtc;
DateTime? CalledUtc;
DateTime? FirstStartUtc;
DateTime? CompletedTime;
int? WaitMinutes;
int? ServiceMinutes;
String? WindowName;
String? TicketLabel;
String? HoldReason;
DateTime? ReturnedTime;
int? PausedMinutes;
ContactQueueVisit({this.CheckinId,this.BranchId,this.BranchName,this.LineId,this.ServiceName,this.Outcome,this.OutcomeLabel,this.IsAppointment,this.SignInUtc,this.CalledUtc,this.FirstStartUtc,this.CompletedTime,this.WaitMinutes,this.ServiceMinutes,this.WindowName,this.TicketLabel,this.HoldReason,this.ReturnedTime,this.PausedMinutes});
ContactQueueVisit.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
CheckinId = json['CheckinId'];
BranchId = json['BranchId'];
BranchName = json['BranchName'];
LineId = json['LineId'];
ServiceName = json['ServiceName'];
Outcome = json['Outcome'];
OutcomeLabel = json['OutcomeLabel'];
IsAppointment = json['IsAppointment'];
SignInUtc = JsonConverters.fromJson(json['SignInUtc'],'DateTime',context!);
CalledUtc = JsonConverters.fromJson(json['CalledUtc'],'DateTime',context!);
FirstStartUtc = JsonConverters.fromJson(json['FirstStartUtc'],'DateTime',context!);
CompletedTime = JsonConverters.fromJson(json['CompletedTime'],'DateTime',context!);
WaitMinutes = json['WaitMinutes'];
ServiceMinutes = json['ServiceMinutes'];
WindowName = json['WindowName'];
TicketLabel = json['TicketLabel'];
HoldReason = json['HoldReason'];
ReturnedTime = JsonConverters.fromJson(json['ReturnedTime'],'DateTime',context!);
PausedMinutes = json['PausedMinutes'];
return this;
}
Map<String, dynamic> toJson() => {
'CheckinId': CheckinId,
'BranchId': BranchId,
'BranchName': BranchName,
'LineId': LineId,
'ServiceName': ServiceName,
'Outcome': Outcome,
'OutcomeLabel': OutcomeLabel,
'IsAppointment': IsAppointment,
'SignInUtc': JsonConverters.toJson(SignInUtc,'DateTime',context!),
'CalledUtc': JsonConverters.toJson(CalledUtc,'DateTime',context!),
'FirstStartUtc': JsonConverters.toJson(FirstStartUtc,'DateTime',context!),
'CompletedTime': JsonConverters.toJson(CompletedTime,'DateTime',context!),
'WaitMinutes': WaitMinutes,
'ServiceMinutes': ServiceMinutes,
'WindowName': WindowName,
'TicketLabel': TicketLabel,
'HoldReason': HoldReason,
'ReturnedTime': JsonConverters.toJson(ReturnedTime,'DateTime',context!),
'PausedMinutes': PausedMinutes
};
getTypeName() => "ContactQueueVisit";
TypeContext? context = _ctx;
}
class ContactQueueVisitSummary implements IConvertible
{
int? Visits;
int? Completed;
int? NoShows;
int? NoShows90d;
int? Cancelled;
int? Unfulfilled;
int? Appointments;
DateTime? LastVisitUtc;
DateTime? LastNoShowUtc;
double? AvgWaitMinutes;
bool? SmsOptIn;
int? TextsSent90d;
String? SayNameAs;
ContactQueueVisitSummary({this.Visits,this.Completed,this.NoShows,this.NoShows90d,this.Cancelled,this.Unfulfilled,this.Appointments,this.LastVisitUtc,this.LastNoShowUtc,this.AvgWaitMinutes,this.SmsOptIn,this.TextsSent90d,this.SayNameAs});
ContactQueueVisitSummary.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Visits = json['Visits'];
Completed = json['Completed'];
NoShows = json['NoShows'];
NoShows90d = json['NoShows90d'];
Cancelled = json['Cancelled'];
Unfulfilled = json['Unfulfilled'];
Appointments = json['Appointments'];
LastVisitUtc = JsonConverters.fromJson(json['LastVisitUtc'],'DateTime',context!);
LastNoShowUtc = JsonConverters.fromJson(json['LastNoShowUtc'],'DateTime',context!);
AvgWaitMinutes = JsonConverters.toDouble(json['AvgWaitMinutes']);
SmsOptIn = json['SmsOptIn'];
TextsSent90d = json['TextsSent90d'];
SayNameAs = json['SayNameAs'];
return this;
}
Map<String, dynamic> toJson() => {
'Visits': Visits,
'Completed': Completed,
'NoShows': NoShows,
'NoShows90d': NoShows90d,
'Cancelled': Cancelled,
'Unfulfilled': Unfulfilled,
'Appointments': Appointments,
'LastVisitUtc': JsonConverters.toJson(LastVisitUtc,'DateTime',context!),
'LastNoShowUtc': JsonConverters.toJson(LastNoShowUtc,'DateTime',context!),
'AvgWaitMinutes': AvgWaitMinutes,
'SmsOptIn': SmsOptIn,
'TextsSent90d': TextsSent90d,
'SayNameAs': SayNameAs
};
getTypeName() => "ContactQueueVisitSummary";
TypeContext? context = _ctx;
}
class ContactVisitsResponse implements IConvertible
{
ResponseStatus? ResponseStatus;
List<ContactQueueVisit>? Visits = [];
ContactQueueVisitSummary? Summary;
ContactVisitsResponse({this.ResponseStatus,this.Visits,this.Summary});
ContactVisitsResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
Visits = JsonConverters.fromJson(json['Visits'],'List<ContactQueueVisit>',context!);
Summary = JsonConverters.fromJson(json['Summary'],'ContactQueueVisitSummary',context!);
return this;
}
Map<String, dynamic> toJson() => {
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!),
'Visits': JsonConverters.toJson(Visits,'List<ContactQueueVisit>',context!),
'Summary': JsonConverters.toJson(Summary,'ContactQueueVisitSummary',context!)
};
getTypeName() => "ContactVisitsResponse";
TypeContext? context = _ctx;
}
class ContactSayNameAsRequest implements IConvertible
{
int? ContactId;
String? SayNameAs;
ContactSayNameAsRequest({this.ContactId,this.SayNameAs});
ContactSayNameAsRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ContactId = json['ContactId'];
SayNameAs = json['SayNameAs'];
return this;
}
Map<String, dynamic> toJson() => {
'ContactId': ContactId,
'SayNameAs': SayNameAs
};
getTypeName() => "ContactSayNameAsRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'ContactQueueVisit': TypeInfo(TypeOf.Class, create:() => ContactQueueVisit()),
'ContactQueueVisitSummary': TypeInfo(TypeOf.Class, create:() => ContactQueueVisitSummary()),
'ContactVisitsResponse': TypeInfo(TypeOf.Class, create:() => ContactVisitsResponse()),
'List<ContactQueueVisit>': TypeInfo(TypeOf.Class, create:() => <ContactQueueVisit>[]),
'ContactSayNameAsRequest': TypeInfo(TypeOf.Class, create:() => ContactSayNameAsRequest()),
});
Dart ContactSayNameAsRequest 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.
PUT /v1/contact/{ContactId}/say-name-as HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
ContactId: 0,
SayNameAs: 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
}
},
Visits:
[
{
CheckinId: 00000000000000000000000000000000,
BranchId: 00000000000000000000000000000000,
BranchName: String,
LineId: 00000000000000000000000000000000,
ServiceName: String,
Outcome: 0,
OutcomeLabel: String,
IsAppointment: False,
SignInUtc: 0001-01-01,
CalledUtc: 0001-01-01,
FirstStartUtc: 0001-01-01,
CompletedTime: 0001-01-01,
WaitMinutes: 0,
ServiceMinutes: 0,
WindowName: String,
TicketLabel: String,
HoldReason: String,
ReturnedTime: 0001-01-01,
PausedMinutes: 0
}
],
Summary:
{
Visits: 0,
Completed: 0,
NoShows: 0,
NoShows90d: 0,
Cancelled: 0,
Unfulfilled: 0,
Appointments: 0,
LastVisitUtc: 0001-01-01,
LastNoShowUtc: 0001-01-01,
AvgWaitMinutes: 0,
SmsOptIn: False,
TextsSent90d: 0,
SayNameAs: String
}
}