convertStringToCampaignType static method

NewsFeedCampaignType convertStringToCampaignType(
  1. String typeStr
)

Implementation

static NewsFeedCampaignType convertStringToCampaignType(final String typeStr) {
  switch (typeStr) {
    case "push_notification":
      return NewsFeedCampaignType.PushNotification;
    case "in_app_message":
      return NewsFeedCampaignType.InAppMessage;
    case "web_message":
      return NewsFeedCampaignType.WebMessage;
    case "all":
      return NewsFeedCampaignType.All;
    default:
      return NewsFeedCampaignType.Unknown;
  }
}