Beispiel #1
0
        public void SetNotificationPreferences()
        {
            Assert.IsNotNull(TestData.NotificationPreferencesResponse);
            ApplicationDeliveryPreferencesType appPref = TestData.NotificationPreferencesResponse.ApplicationDeliveryPreferences;

            appPref.NotificationPayloadType = NotificationPayloadTypeCodeType.eBLSchemaSOAP;
            NotificationEnableTypeCollection userPref = TestData.NotificationPreferencesResponse.UserDeliveryPreferenceArray;
            SetNotificationPreferencesCall   api      = new SetNotificationPreferencesCall(this.apiContext);

            api.ApplicationDeliveryPreferences = appPref;
            api.UserDeliveryPreferenceList     = userPref;
            // Make API call.
            ApiException gotException = null;

            try
            {
                api.Execute();
            }
            catch (ApiException ex)
            {
                gotException = ex;
            }
            if (gotException != null)
            {
                Assert.IsTrue(appPref == null && userPref == null);
            }
        }
Beispiel #2
0
        private void BtnSetNotificationPreferences_Click(object sender, System.EventArgs e)
        {
            try
            {
                TxtStatus.Text = "";

                SetNotificationPreferencesCall apicall = new SetNotificationPreferencesCall(Context);
                apicall.ApplicationDeliveryPreferences = new ApplicationDeliveryPreferencesType();
                apicall.ApplicationDeliveryPreferences.ApplicationEnable = (EnableCodeType)Enum.Parse(typeof(EnableCodeType), CboStatus.SelectedItem.ToString());

                if (TxtUrl.Text.Length > 0)
                {
                    apicall.ApplicationDeliveryPreferences.ApplicationURL = TxtUrl.Text;
                }

                NotificationEnableTypeCollection notifications = new NotificationEnableTypeCollection();
                for (int inx = 0; inx < LblEvents.Length; inx++)
                {
                    NotificationEnableType net = new NotificationEnableType();
                    net.EventType   = (NotificationEventTypeCodeType)Enum.Parse(typeof(NotificationEventTypeCodeType), LblEvents[inx].Text);
                    net.EventEnable = (EnableCodeType)Enum.Parse(typeof(EnableCodeType), CboEventStatus[inx].SelectedItem.ToString());
                    notifications.Add(net);
                }

                apicall.SetNotificationPreferences(notifications);

                TxtStatus.Text = apicall.ApiResponse.Ack.ToString();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
		/// <summary>
		/// Manages notification and alert preferences for applications and users.
		/// </summary>
		/// 
		/// <param name="ApplicationDeliveryPreferences">
		/// Specifies application-level event preferences that have been enabled,
		/// including the URL to which notifications should be delivered and whether
		/// notifications should be enabled or disabled (although the
		/// UserDeliveryPreferenceArray input property specifies specific
		/// notification subscriptions).
		/// </param>
		///
		/// <param name="UserDeliveryPreferenceList">
		/// Specifies events and whether or not they are enabled.
		/// </param>
		///
		/// <param name="UserData">
		/// Specifies user data for notification settings, such as mobile phone number.
		/// </param>
		///
		/// <param name="EventPropertyList">
		/// Characteristics or details of an event such as type, name and value.
		/// Currently can only be set for wireless applications.
		/// </param>
		///
		/// <param name="DeliveryURLName">
		/// Specifies up to 25 ApplicationDeliveryPreferences.DeliveryURLDetails.DeliveryURLName
		/// to associate with a user token sent in a SetNotificationPreferences request. To
		/// specify multiple DeliveryURLNames, create separate instances of
		/// ApplicationDeliveryPreferences.DeliveryURLDetails.DeliveryURLName, and then enable
		/// up to 25 DeliveryURLNames by including them in comma-separated format in this field.
		/// </param>
		///
		public void SetNotificationPreferences(ApplicationDeliveryPreferencesType ApplicationDeliveryPreferences, NotificationEnableTypeCollection UserDeliveryPreferenceList, NotificationUserDataType UserData, NotificationEventPropertyTypeCollection EventPropertyList, string DeliveryURLName)
		{
			this.ApplicationDeliveryPreferences = ApplicationDeliveryPreferences;
			this.UserDeliveryPreferenceList = UserDeliveryPreferenceList;
			this.UserData = UserData;
			this.EventPropertyList = EventPropertyList;
			this.DeliveryURLName = DeliveryURLName;

			Execute();
			
		}
        /// <summary>
        /// For backward compatibility with old wrappers.
        /// </summary>
        public void SetNotificationPreferences(ApplicationDeliveryPreferencesType ApplicationDeliveryPreferences, NotificationEnableTypeCollection UserDeliveryPreferenceList)
        {
            this.ApplicationDeliveryPreferences = ApplicationDeliveryPreferences;
            this.UserDeliveryPreferenceList = UserDeliveryPreferenceList;

            Execute();
        }
 /// <summary>
 /// For backward compatibility with old wrappers.
 /// </summary>
 public void SetNotificationPreferences(NotificationEnableTypeCollection UserDeliveryPreferenceList)
 {
     this.UserDeliveryPreferenceList = UserDeliveryPreferenceList;
     Execute();
 }
        private void BtnSetNotificationPreferences_Click(object sender, System.EventArgs e)
        {
            try
            {
                TxtStatus.Text = "";

                SetNotificationPreferencesCall apicall = new SetNotificationPreferencesCall(Context);
                apicall.ApplicationDeliveryPreferences = new ApplicationDeliveryPreferencesType();
                apicall.ApplicationDeliveryPreferences.ApplicationEnable = (EnableCodeType) Enum.Parse(typeof(EnableCodeType), CboStatus.SelectedItem.ToString());

                if (TxtUrl.Text.Length > 0)
                    apicall.ApplicationDeliveryPreferences.ApplicationURL = TxtUrl.Text;

                NotificationEnableTypeCollection notifications = new NotificationEnableTypeCollection();
                for (int inx = 0; inx < LblEvents.Length; inx++)
                {
                    NotificationEnableType net = new NotificationEnableType();
                    net.EventType = (NotificationEventTypeCodeType) Enum.Parse(typeof(NotificationEventTypeCodeType), LblEvents[inx].Text);
                    net.EventEnable = (EnableCodeType) Enum.Parse(typeof(EnableCodeType), CboEventStatus[inx].SelectedItem.ToString());
                    notifications.Add(net);
                }

                apicall.SetNotificationPreferences(notifications);

                TxtStatus.Text = apicall.ApiResponse.Ack.ToString();

            }
            catch(Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Beispiel #7
0
 /// <summary>
 /// For backward compatibility with old wrappers.
 /// </summary>
 public void SetNotificationPreferences(NotificationEnableTypeCollection UserDeliveryPreferenceList)
 {
     this.UserDeliveryPreferenceList = UserDeliveryPreferenceList;
     Execute();
 }
Beispiel #8
0
        /// <summary>
        /// Manages notification and alert preferences for applications and users.
        /// </summary>
        ///
        /// <param name="ApplicationDeliveryPreferences">
        /// Specifies application-level event preferences that have been enabled,
        /// including the URL to which notifications should be delivered and whether
        /// notifications should be enabled or disabled (although the
        /// <b>UserDeliveryPreferenceArray</b> input property specifies specific
        /// notification subscriptions).
        /// </param>
        ///
        /// <param name="UserDeliveryPreferenceList">
        /// Specifies events and whether or not they are enabled.
        /// </param>
        ///
        /// <param name="UserData">
        /// Specifies user data for notification settings, such as mobile phone number.
        /// </param>
        ///
        /// <param name="EventPropertyList">
        /// Characteristics or details of an event such as type, name and value.
        /// Currently can only be set for wireless applications.
        /// </param>
        ///
        /// <param name="DeliveryURLName">
        /// Specifies up to 25 ApplicationDeliveryPreferences.DeliveryURLDetails.DeliveryURLName to associate with a user token sent in a SetNotificationPreferences request. To specify multiple DeliveryURLNames, create separate instances of ApplicationDeliveryPreferences.DeliveryURLDetails.DeliveryURLName, and then enable up to 25 DeliveryURLNames by including them in comma-separated format in this field.
        /// </param>
        ///
        public void SetNotificationPreferences(ApplicationDeliveryPreferencesType ApplicationDeliveryPreferences, NotificationEnableTypeCollection UserDeliveryPreferenceList, NotificationUserDataType UserData, NotificationEventPropertyTypeCollection EventPropertyList, string DeliveryURLName)
        {
            this.ApplicationDeliveryPreferences = ApplicationDeliveryPreferences;
            this.UserDeliveryPreferenceList     = UserDeliveryPreferenceList;
            this.UserData          = UserData;
            this.EventPropertyList = EventPropertyList;
            this.DeliveryURLName   = DeliveryURLName;

            Execute();
        }
Beispiel #9
0
        /// <summary>
        /// For backward compatibility with old wrappers.
        /// </summary>
        public void SetNotificationPreferences(ApplicationDeliveryPreferencesType ApplicationDeliveryPreferences, NotificationEnableTypeCollection UserDeliveryPreferenceList)
        {
            this.ApplicationDeliveryPreferences = ApplicationDeliveryPreferences;
            this.UserDeliveryPreferenceList     = UserDeliveryPreferenceList;

            Execute();
        }