| All Verbs | /nodes/live-answer/email |
|---|
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
class LiveAnswerEmailRecipient implements IConvertible
{
String? name;
String? address;
LiveAnswerEmailRecipient({this.name,this.address});
LiveAnswerEmailRecipient.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
name = json['name'];
address = json['address'];
return this;
}
Map<String, dynamic> toJson() => {
'name': name,
'address': address
};
getTypeName() => "LiveAnswerEmailRecipient";
TypeContext? context = _ctx;
}
class LiveAnswerSendEmail implements IConvertible
{
String? flowId;
String? sessionId;
String? nodeId;
String? clientId;
String? subject;
String? body;
List<LiveAnswerEmailRecipient>? to;
List<LiveAnswerEmailRecipient>? cc;
List<LiveAnswerEmailRecipient>? bcc;
LiveAnswerSendEmail({this.flowId,this.sessionId,this.nodeId,this.clientId,this.subject,this.body,this.to,this.cc,this.bcc});
LiveAnswerSendEmail.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
flowId = json['flowId'];
sessionId = json['sessionId'];
nodeId = json['nodeId'];
clientId = json['clientId'];
subject = json['subject'];
body = json['body'];
to = JsonConverters.fromJson(json['to'],'List<LiveAnswerEmailRecipient>',context!);
cc = JsonConverters.fromJson(json['cc'],'List<LiveAnswerEmailRecipient>',context!);
bcc = JsonConverters.fromJson(json['bcc'],'List<LiveAnswerEmailRecipient>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'flowId': flowId,
'sessionId': sessionId,
'nodeId': nodeId,
'clientId': clientId,
'subject': subject,
'body': body,
'to': JsonConverters.toJson(to,'List<LiveAnswerEmailRecipient>',context!),
'cc': JsonConverters.toJson(cc,'List<LiveAnswerEmailRecipient>',context!),
'bcc': JsonConverters.toJson(bcc,'List<LiveAnswerEmailRecipient>',context!)
};
getTypeName() => "LiveAnswerSendEmail";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'evovoice.io', types: <String, TypeInfo> {
'LiveAnswerEmailRecipient': TypeInfo(TypeOf.Class, create:() => LiveAnswerEmailRecipient()),
'LiveAnswerSendEmail': TypeInfo(TypeOf.Class, create:() => LiveAnswerSendEmail()),
'List<LiveAnswerEmailRecipient>': TypeInfo(TypeOf.Class, create:() => <LiveAnswerEmailRecipient>[]),
});
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.
POST /nodes/live-answer/email HTTP/1.1
Host: evovoice.io
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"flowId":"String","sessionId":"String","nodeId":"String","clientId":"String","subject":"String","body":"String","to":[{"name":"String","address":"String"}],"cc":[{"name":"String","address":"String"}],"bcc":[{"name":"String","address":"String"}]}