Converts the action response back to a JSON-compatible map.
Map<String, dynamic> toJson() => { 'code': code, 'action': action, 'message': message, };