| 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()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
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: application/xml
Content-Type: application/xml
Content-Length: length
<TwilioSMSEvent xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CPU.Notifications.ServiceModel">
<APIVersion>String</APIVersion>
<AccountSid>String</AccountSid>
<ErrorCode>0</ErrorCode>
<From>String</From>
<MessageSid>String</MessageSid>
<MessageStatus>String</MessageStatus>
<MessagingServiceSid>String</MessagingServiceSid>
<SmsSid>String</SmsSid>
<SmsStatus>String</SmsStatus>
<To>String</To>
</TwilioSMSEvent>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length (string)