Exemple #1
0
        /// <summary>
        /// Generate the necessary parameters
        /// </summary>
        public List <KeyValuePair <string, string> > GetParams()
        {
            var p = new List <KeyValuePair <string, string> >();

            if (HostedNumberOrderSids != null)
            {
                p.AddRange(HostedNumberOrderSids.Select(prop => new KeyValuePair <string, string>("HostedNumberOrderSids", prop)));
            }

            if (AddressSid != null)
            {
                p.Add(new KeyValuePair <string, string>("AddressSid", AddressSid.ToString()));
            }

            if (Email != null)
            {
                p.Add(new KeyValuePair <string, string>("Email", Email));
            }

            if (CcEmails != null)
            {
                p.AddRange(CcEmails.Select(prop => new KeyValuePair <string, string>("CcEmails", prop)));
            }

            return(p);
        }
        /// <summary>
        /// Generate the necessary parameters
        /// </summary>
        public List <KeyValuePair <string, string> > GetParams()
        {
            var p = new List <KeyValuePair <string, string> >();

            if (PhoneNumber != null)
            {
                p.Add(new KeyValuePair <string, string>("PhoneNumber", PhoneNumber.ToString()));
            }

            if (SmsCapability != null)
            {
                p.Add(new KeyValuePair <string, string>("SmsCapability", SmsCapability.Value.ToString().ToLower()));
            }

            if (AccountSid != null)
            {
                p.Add(new KeyValuePair <string, string>("AccountSid", AccountSid.ToString()));
            }

            if (FriendlyName != null)
            {
                p.Add(new KeyValuePair <string, string>("FriendlyName", FriendlyName));
            }

            if (UniqueName != null)
            {
                p.Add(new KeyValuePair <string, string>("UniqueName", UniqueName));
            }

            if (CcEmails != null)
            {
                p.AddRange(CcEmails.Select(prop => new KeyValuePair <string, string>("CcEmails", prop)));
            }

            if (SmsUrl != null)
            {
                p.Add(new KeyValuePair <string, string>("SmsUrl", SmsUrl.AbsoluteUri.TrimEnd('/')));
            }

            if (SmsMethod != null)
            {
                p.Add(new KeyValuePair <string, string>("SmsMethod", SmsMethod.ToString()));
            }

            if (SmsFallbackUrl != null)
            {
                p.Add(new KeyValuePair <string, string>("SmsFallbackUrl", SmsFallbackUrl.AbsoluteUri.TrimEnd('/')));
            }

            if (SmsFallbackMethod != null)
            {
                p.Add(new KeyValuePair <string, string>("SmsFallbackMethod", SmsFallbackMethod.ToString()));
            }

            if (StatusCallbackUrl != null)
            {
                p.Add(new KeyValuePair <string, string>("StatusCallbackUrl", StatusCallbackUrl.AbsoluteUri.TrimEnd('/')));
            }

            if (StatusCallbackMethod != null)
            {
                p.Add(new KeyValuePair <string, string>("StatusCallbackMethod", StatusCallbackMethod.ToString()));
            }

            if (SmsApplicationSid != null)
            {
                p.Add(new KeyValuePair <string, string>("SmsApplicationSid", SmsApplicationSid.ToString()));
            }

            if (AddressSid != null)
            {
                p.Add(new KeyValuePair <string, string>("AddressSid", AddressSid.ToString()));
            }

            if (Email != null)
            {
                p.Add(new KeyValuePair <string, string>("Email", Email));
            }

            if (VerificationType != null)
            {
                p.Add(new KeyValuePair <string, string>("VerificationType", VerificationType.ToString()));
            }

            if (VerificationDocumentSid != null)
            {
                p.Add(new KeyValuePair <string, string>("VerificationDocumentSid", VerificationDocumentSid.ToString()));
            }

            return(p);
        }
Exemple #3
0
        /// <summary>
        /// Generate the necessary parameters
        /// </summary>
        public List <KeyValuePair <string, string> > GetParams()
        {
            var p = new List <KeyValuePair <string, string> >();

            if (PhoneNumber != null)
            {
                p.Add(new KeyValuePair <string, string>("PhoneNumber", PhoneNumber.ToString()));
            }

            if (AreaCode != null)
            {
                p.Add(new KeyValuePair <string, string>("AreaCode", AreaCode));
            }

            if (ApiVersion != null)
            {
                p.Add(new KeyValuePair <string, string>("ApiVersion", ApiVersion));
            }

            if (FriendlyName != null)
            {
                p.Add(new KeyValuePair <string, string>("FriendlyName", FriendlyName));
            }

            if (SmsApplicationSid != null)
            {
                p.Add(new KeyValuePair <string, string>("SmsApplicationSid", SmsApplicationSid.ToString()));
            }

            if (SmsFallbackMethod != null)
            {
                p.Add(new KeyValuePair <string, string>("SmsFallbackMethod", SmsFallbackMethod.ToString()));
            }

            if (SmsFallbackUrl != null)
            {
                p.Add(new KeyValuePair <string, string>("SmsFallbackUrl", Serializers.Url(SmsFallbackUrl)));
            }

            if (SmsMethod != null)
            {
                p.Add(new KeyValuePair <string, string>("SmsMethod", SmsMethod.ToString()));
            }

            if (SmsUrl != null)
            {
                p.Add(new KeyValuePair <string, string>("SmsUrl", Serializers.Url(SmsUrl)));
            }

            if (StatusCallback != null)
            {
                p.Add(new KeyValuePair <string, string>("StatusCallback", Serializers.Url(StatusCallback)));
            }

            if (StatusCallbackMethod != null)
            {
                p.Add(new KeyValuePair <string, string>("StatusCallbackMethod", StatusCallbackMethod.ToString()));
            }

            if (VoiceApplicationSid != null)
            {
                p.Add(new KeyValuePair <string, string>("VoiceApplicationSid", VoiceApplicationSid.ToString()));
            }

            if (VoiceCallerIdLookup != null)
            {
                p.Add(new KeyValuePair <string, string>("VoiceCallerIdLookup", VoiceCallerIdLookup.Value.ToString().ToLower()));
            }

            if (VoiceFallbackMethod != null)
            {
                p.Add(new KeyValuePair <string, string>("VoiceFallbackMethod", VoiceFallbackMethod.ToString()));
            }

            if (VoiceFallbackUrl != null)
            {
                p.Add(new KeyValuePair <string, string>("VoiceFallbackUrl", Serializers.Url(VoiceFallbackUrl)));
            }

            if (VoiceMethod != null)
            {
                p.Add(new KeyValuePair <string, string>("VoiceMethod", VoiceMethod.ToString()));
            }

            if (VoiceUrl != null)
            {
                p.Add(new KeyValuePair <string, string>("VoiceUrl", Serializers.Url(VoiceUrl)));
            }

            if (EmergencyStatus != null)
            {
                p.Add(new KeyValuePair <string, string>("EmergencyStatus", EmergencyStatus.ToString()));
            }

            if (EmergencyAddressSid != null)
            {
                p.Add(new KeyValuePair <string, string>("EmergencyAddressSid", EmergencyAddressSid.ToString()));
            }

            if (TrunkSid != null)
            {
                p.Add(new KeyValuePair <string, string>("TrunkSid", TrunkSid.ToString()));
            }

            if (IdentitySid != null)
            {
                p.Add(new KeyValuePair <string, string>("IdentitySid", IdentitySid.ToString()));
            }

            if (AddressSid != null)
            {
                p.Add(new KeyValuePair <string, string>("AddressSid", AddressSid.ToString()));
            }

            if (VoiceReceiveMode != null)
            {
                p.Add(new KeyValuePair <string, string>("VoiceReceiveMode", VoiceReceiveMode.ToString()));
            }

            return(p);
        }