Evo Voice

<back to all web services

LiveAnswerSendEmail

The following routes are available for this service:
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>[]),
});

Dart LiveAnswerSendEmail DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

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: application/xml
Content-Type: application/xml
Content-Length: length

<LiveAnswerSendEmail xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Voice.Api.Nodes.AI">
  <Bcc>
    <LiveAnswerEmailRecipient>
      <Address>String</Address>
      <Name>String</Name>
    </LiveAnswerEmailRecipient>
  </Bcc>
  <Body>String</Body>
  <Cc>
    <LiveAnswerEmailRecipient>
      <Address>String</Address>
      <Name>String</Name>
    </LiveAnswerEmailRecipient>
  </Cc>
  <ClientId>String</ClientId>
  <FlowId>String</FlowId>
  <NodeId>String</NodeId>
  <SessionId>String</SessionId>
  <Subject>String</Subject>
  <To>
    <LiveAnswerEmailRecipient>
      <Address>String</Address>
      <Name>String</Name>
    </LiveAnswerEmailRecipient>
  </To>
</LiveAnswerSendEmail>