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

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

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

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

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

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

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

            return(p);
        }
コード例 #2
0
        /// <summary>
        /// Generate the necessary parameters
        /// </summary>
        public List <KeyValuePair <string, string> > GetParams()
        {
            var p = new List <KeyValuePair <string, string> >();

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            return(p);
        }
コード例 #4
0
        /// <summary>
        /// Generate the necessary parameters
        /// </summary>
        public List <KeyValuePair <string, string> > GetParams()
        {
            var p = new List <KeyValuePair <string, string> >();

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            return(p);
        }