CPU.Notifications

<back to all web services

TwilioSMSEvent

The following routes are available for this service:
POST/smsStatus
import 'package:servicestack/servicestack.dart';

class TwilioSMSEvent implements IConvertible
{
    String? accountSid;
    String? apiVersion;
    int? errorCode;
    String? from;
    String? messageSid;
    String? messageStatus;
    String? messagingServiceSid;
    String? smsSid;
    String? smsStatus;
    String? to;

    TwilioSMSEvent({this.accountSid,this.apiVersion,this.errorCode,this.from,this.messageSid,this.messageStatus,this.messagingServiceSid,this.smsSid,this.smsStatus,this.to});
    TwilioSMSEvent.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        accountSid = json['accountSid'];
        apiVersion = json['apiVersion'];
        errorCode = json['errorCode'];
        from = json['from'];
        messageSid = json['messageSid'];
        messageStatus = json['messageStatus'];
        messagingServiceSid = json['messagingServiceSid'];
        smsSid = json['smsSid'];
        smsStatus = json['smsStatus'];
        to = json['to'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'accountSid': accountSid,
        'apiVersion': apiVersion,
        'errorCode': errorCode,
        'from': from,
        'messageSid': messageSid,
        'messageStatus': messageStatus,
        'messagingServiceSid': messagingServiceSid,
        'smsSid': smsSid,
        'smsStatus': smsStatus,
        'to': to
    };

    getTypeName() => "TwilioSMSEvent";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'cpmwebservices_t.clarkpud.com', types: <String, TypeInfo> {
    'TwilioSMSEvent': TypeInfo(TypeOf.Class, create:() => TwilioSMSEvent()),
});

Dart TwilioSMSEvent DTOs

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

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /smsStatus HTTP/1.1 
Host: cpmwebservices-t.clarkpud.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	accountSid: String,
	apiVersion: String,
	errorCode: 0,
	from: String,
	messageSid: String,
	messageStatus: String,
	messagingServiceSid: String,
	smsSid: String,
	smsStatus: String,
	to: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

(string)