示例#1
0
        public void InternetPasswordReset(string phoneNumber, string internetPassword)
        {
            if (phoneNumber.Length != 0)
            {
                SubscriberType mySubscriberType = _subscriberService.GetSubscriberByNumberProv(_loginInformation.LoginToken, phoneNumber);

                if (mySubscriberType == null)
                {
                    throw new Exception("A subscriber with the default phone number does not exist. Phone Number = " +
                                        phoneNumber + Environment.NewLine);
                }

                SubscriberInternetAccessType mySubscriberInternetAccessType = _subscriberService.GetSubscriberInternetAccess(_loginInformation.LoginToken, mySubscriberType.SubscriberGuid);

                if (mySubscriberInternetAccessType == null)
                {
                    throw new Exception("A subscriber with this guid does not exist. Guid = " + mySubscriberType.SubscriberGuid + Environment.NewLine);
                }

                //internet access is not returned from get subscriber
                mySubscriberType.InternetAccess = new InternetAccessType
                {
                    ServiceEnabled = mySubscriberInternetAccessType.InternetAccessEnabled,
                    Password       = internetPassword
                };

                _subscriberService.AddOrUpdateSubscriberProv(_loginInformation.LoginToken, mySubscriberType);
            }
        }
示例#2
0
        public SubscriberType RetrieveSubscriberByDefaultPhoneNumber(string defaultPhoneNumber)
        {
            defaultPhoneNumber = defaultPhoneNumber.PadLeft(10, '0');

            SubscriberType mySubscriberType = _subscriberService.GetSubscriberByNumberProv(_loginInformation.LoginToken, defaultPhoneNumber);

            return(mySubscriberType);
        }
示例#3
0
 public void AddOrUpdateSubscriberProv(SubscriberType subscriberType)
 {
     _subscriberService.AddOrUpdateSubscriberProv(_loginInformation.LoginToken, subscriberType);
 }