Example #1
0
 /// <summary>
 /// Construct a new CreateBindingOptions
 /// </summary>
 ///
 /// <param name="pathServiceSid"> The service_sid </param>
 /// <param name="identity"> The identity </param>
 /// <param name="bindingType"> The binding_type </param>
 /// <param name="address"> The address </param>
 public CreateBindingOptions(string pathServiceSid, string identity, BindingResource.BindingTypeEnum bindingType, string address)
 {
     PathServiceSid = pathServiceSid;
     Identity       = identity;
     BindingType    = bindingType;
     Address        = address;
     Tag            = new List <string>();
 }
Example #2
0
        /// <summary>
        /// create
        /// </summary>
        ///
        /// <param name="pathServiceSid"> The service_sid </param>
        /// <param name="identity"> The identity </param>
        /// <param name="bindingType"> The binding_type </param>
        /// <param name="address"> The address </param>
        /// <param name="tag"> The tag </param>
        /// <param name="notificationProtocolVersion"> The notification_protocol_version </param>
        /// <param name="credentialSid"> The credential_sid </param>
        /// <param name="endpoint"> The endpoint </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Binding </returns>
        public static BindingResource Create(string pathServiceSid, string identity, BindingResource.BindingTypeEnum bindingType, string address, List <string> tag = null, string notificationProtocolVersion = null, string credentialSid = null, string endpoint = null, ITwilioRestClient client = null)
        {
            var options = new CreateBindingOptions(pathServiceSid, identity, bindingType, address)
            {
                Tag = tag, NotificationProtocolVersion = notificationProtocolVersion, CredentialSid = credentialSid, Endpoint = endpoint
            };

            return(Create(options, client));
        }