toJson method
Implementation
Map<String, dynamic> toJson() {
final body = this.body;
final keyword = this.keyword;
final mediaUrl = this.mediaUrl;
final messageType = this.messageType;
final originationNumber = this.originationNumber;
final senderId = this.senderId;
final substitutions = this.substitutions;
return {
if (body != null) 'Body': body,
if (keyword != null) 'Keyword': keyword,
if (mediaUrl != null) 'MediaUrl': mediaUrl,
if (messageType != null) 'MessageType': messageType.toValue(),
if (originationNumber != null) 'OriginationNumber': originationNumber,
if (senderId != null) 'SenderId': senderId,
if (substitutions != null) 'Substitutions': substitutions,
};
}