toJson method
Implementation
Map<String, dynamic> toJson() {
final action = this.action;
final status = this.status;
final diagnosticCode = this.diagnosticCode;
final extensionFields = this.extensionFields;
final finalRecipient = this.finalRecipient;
final lastAttemptDate = this.lastAttemptDate;
final remoteMta = this.remoteMta;
return {
'Action': action.toValue(),
'Status': status,
if (diagnosticCode != null) 'DiagnosticCode': diagnosticCode,
if (extensionFields != null) 'ExtensionFields': extensionFields,
if (finalRecipient != null) 'FinalRecipient': finalRecipient,
if (lastAttemptDate != null)
'LastAttemptDate': iso8601ToJson(lastAttemptDate),
if (remoteMta != null) 'RemoteMta': remoteMta,
};
}