Example #1
0
 public Errorhandling(Save s, StopLap sl)
 {
     suppress  = false;
     suppressc = SuppressionType.StandardClick;
     _s        = s;
     _sl       = sl;
 }
        private static string SuppressionTypeToString(SuppressionType type)
        {
            string list = "";

            switch (type)
            {
            case SuppressionType.Email:
                list = "email";
                break;

            case SuppressionType.Fax:
                list = "fax";
                break;

            case SuppressionType.Mobile:
                list = "mobile";
                break;

            case SuppressionType.Phone:
                list = "phone";
                break;
            }

            return(list);
        }
Example #3
0
 public Errorhandling(Save s, StopLap sl, bool suppressConsole, SuppressionType suppressClicks)
 {
     suppress  = suppressConsole;
     suppressc = suppressClicks;
     _s        = s;
     _sl       = sl;
 }
        /// <summary>
        /// Add one or more entries to a suppression list.
        /// </summary>
        /// <param name="listType">The suppression list type (email, etc).
        /// </param>
        /// <param name="entries">An array of entries (emails, phone
        /// numbers, etc).</param>
        /// <returns>A relay of the added records as suppression entries.
        /// </returns>
        public Responses.SuppressionCollection AddToSuppressionList(SuppressionType listType, string[] entries)
        {
            Requests.SuppressionEntries entry = new Requests.SuppressionEntries();
            entry.Values = entries;
            string list = ContactManagerAPI.SuppressionTypeToString(listType);

            return(this.connection.Call <Responses.SuppressionCollection>("POST", "suppression/" + list, null, entry));
        }
        /// <summary>
        /// Get a collection of suppression list entries.
        /// </summary>
        /// <param name="listType">The type of list to get entries from.
        /// </param>
        /// <param name="offset">The zero-based offset to start the page at.
        /// </param>
        /// <param name="limit">The number of entries to retrieve past the
        /// offset.</param>
        /// <param name="query">A query to filter / search for records in
        /// the list. See the API documentation for the query format and
        /// queryable fields.</param>
        /// <returns>A collection of suppression list entries.</returns>
        public Responses.SuppressionCollection GetSuppressionListEntries(SuppressionType listType, int offset, int limit, string query)
        {
            Dictionary <string, string> queryParameters = new Dictionary <string, string>();

            queryParameters.Add("offset", offset.ToString());
            queryParameters.Add("limit", limit.ToString());

            if (query.Length > 0)
            {
                queryParameters.Add("query", query);
            }

            string list = ContactManagerAPI.SuppressionTypeToString(listType);

            return(this.connection.Call <Responses.SuppressionCollection>("GET", "suppression/" + list, queryParameters, null));
        }
 /// <summary>
 /// Get a collection of suppression list entries.
 /// </summary>
 /// <param name="listType">The type of list to get entries from.
 /// </param>
 /// <param name="offset">The zero-based offset to start the page at.
 /// </param>
 /// <param name="limit">The number of entries to retrieve past the
 /// offset.</param>
 /// <returns>A collection of suppression list entries.</returns>
 public Responses.SuppressionCollection GetSuppressionListEntries(SuppressionType listType, int offset, int limit)
 {
     return(this.GetSuppressionListEntries(listType, offset, limit, ""));
 }
 /// <summary>
 /// Get a collection of suppression list entries.
 /// </summary>
 /// <param name="listType">The type of list to get entries from.
 /// </param>
 /// <returns>A collection of suppression list entries.</returns>
 public Responses.SuppressionCollection GetSuppressionListEntries(SuppressionType listType)
 {
     return(this.GetSuppressionListEntries(listType, 0, 100, ""));
 }