/// <summary>
        /// Create a new Factor for the Entity
        /// </summary>
        /// <param name="pathServiceSid"> Service Sid. </param>
        /// <param name="pathIdentity"> Unique identity of the Entity </param>
        /// <param name="binding"> A unique binding for this Factor </param>
        /// <param name="friendlyName"> The friendly name of this Factor </param>
        /// <param name="factorType"> The Type of this Factor </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Factor </returns>
        public static async System.Threading.Tasks.Task <FactorResource> CreateAsync(string pathServiceSid,
                                                                                     string pathIdentity,
                                                                                     string binding,
                                                                                     string friendlyName,
                                                                                     FactorResource.FactorTypesEnum factorType,
                                                                                     ITwilioRestClient client = null)
        {
            var options = new CreateFactorOptions(pathServiceSid, pathIdentity, binding, friendlyName, factorType);

            return(await CreateAsync(options, client));
        }
        /// <summary>
        /// Create a new Factor for the Entity
        /// </summary>
        /// <param name="pathServiceSid"> Service Sid. </param>
        /// <param name="pathIdentity"> Unique identity of the Entity </param>
        /// <param name="binding"> A unique binding for this Factor </param>
        /// <param name="friendlyName"> The friendly name of this Factor </param>
        /// <param name="factorType"> The Type of this Factor </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Factor </returns>
        public static FactorResource Create(string pathServiceSid,
                                            string pathIdentity,
                                            string binding,
                                            string friendlyName,
                                            FactorResource.FactorTypesEnum factorType,
                                            ITwilioRestClient client = null)
        {
            var options = new CreateFactorOptions(pathServiceSid, pathIdentity, binding, friendlyName, factorType);

            return(Create(options, client));
        }
Beispiel #3
0
 /// <summary>
 /// Construct a new CreateFactorOptions
 /// </summary>
 /// <param name="pathServiceSid"> Service Sid. </param>
 /// <param name="pathIdentity"> Unique identity of the Entity </param>
 /// <param name="binding"> A unique binding for this Factor </param>
 /// <param name="friendlyName"> The friendly name of this Factor </param>
 /// <param name="type"> The Type of this Factor </param>
 public CreateFactorOptions(string pathServiceSid,
                            string pathIdentity,
                            string binding,
                            string friendlyName,
                            FactorResource.FactorTypesEnum type)
 {
     PathServiceSid = pathServiceSid;
     PathIdentity   = pathIdentity;
     Binding        = binding;
     FriendlyName   = friendlyName;
     Type           = type;
 }
 /// <summary>
 /// Construct a new CreateFactorOptions
 /// </summary>
 /// <param name="pathServiceSid"> Service Sid. </param>
 /// <param name="pathIdentity"> Unique identity of the Entity </param>
 /// <param name="binding"> A unique binding for this Factor as a json string </param>
 /// <param name="friendlyName"> The friendly name of this Factor </param>
 /// <param name="factorType"> The Type of this Factor </param>
 /// <param name="config"> The config for this Factor as a json string </param>
 public CreateFactorOptions(string pathServiceSid,
                            string pathIdentity,
                            string binding,
                            string friendlyName,
                            FactorResource.FactorTypesEnum factorType,
                            string config)
 {
     PathServiceSid = pathServiceSid;
     PathIdentity   = pathIdentity;
     Binding        = binding;
     FriendlyName   = friendlyName;
     FactorType     = factorType;
     Config         = config;
 }