Exemplo n.º 1
0
 /// <summary>
 /// Construct a new CreateUserBindingOptions
 /// </summary>
 ///
 /// <param name="pathServiceSid"> The service_sid </param>
 /// <param name="pathIdentity"> The identity </param>
 /// <param name="bindingType"> The binding_type </param>
 /// <param name="address"> The address </param>
 public CreateUserBindingOptions(string pathServiceSid, string pathIdentity, UserBindingResource.BindingTypeEnum bindingType, string address)
 {
     PathServiceSid = pathServiceSid;
     PathIdentity   = pathIdentity;
     BindingType    = bindingType;
     Address        = address;
     Tag            = new List <string>();
 }
Exemplo n.º 2
0
        /// <summary>
        /// create
        /// </summary>
        /// <param name="pathServiceSid"> The service_sid </param>
        /// <param name="pathIdentity"> 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 UserBinding </returns>
        public static UserBindingResource Create(string pathServiceSid,
                                                 string pathIdentity,
                                                 UserBindingResource.BindingTypeEnum bindingType,
                                                 string address,
                                                 List <string> tag = null,
                                                 string notificationProtocolVersion = null,
                                                 string credentialSid     = null,
                                                 string endpoint          = null,
                                                 ITwilioRestClient client = null)
        {
            var options = new CreateUserBindingOptions(pathServiceSid, pathIdentity, bindingType, address)
            {
                Tag = tag, NotificationProtocolVersion = notificationProtocolVersion, CredentialSid = credentialSid, Endpoint = endpoint
            };

            return(Create(options, client));
        }