public string ToJson() { var json = new Dictionary <string, object> { { "Text", _text }, { "ButtonTitle", _buttonTitle }, { "ButtonAction", _buttonAction }, { "Action", _action == null ? "" : _action.ToJson() }, { "MediaAttachment", _mediaAttachment == null ? "" : _mediaAttachment.ToJson() } }; return(GSJson.Serialize(json)); }
public string ToJson() { var json = new Dictionary <string, object> { { "Title", _title }, { "Text", _text }, { "Action", _action == null ? "" : _action.ToJson() }, { "Template", _templateName }, { "TemplatePlaceholders", _templatePlaceholders }, { "MediaAttachment", _mediaAttachment == null ? "" : _mediaAttachment.ToJson() }, { "ActionButtons", _actionButtons.ConvertAll(item => item.ToJson()) }, { "Customization", _customization == null ? "" : _customization.ToJson() }, { "Badge", _badge == null ? "" : _badge.ToJson() } }; return(GSJson.Serialize(json)); }
public void ProcessAction(GetSocialAction notificationAction) { _gs_processAction(notificationAction.ToJson()); }