Esempio n. 1
0
 /// <summary>
 /// Construct a new CreateFactorOptions
 /// </summary>
 /// <param name="pathServiceSid"> Service Sid. </param>
 /// <param name="pathIdentity"> Unique external identifier of the Entity </param>
 /// <param name="friendlyName"> The friendly name of this Factor </param>
 /// <param name="factorType"> The Type of this Factor </param>
 public CreateFactorOptions(string pathServiceSid,
                            string pathIdentity,
                            string friendlyName,
                            FactorResource.FactorTypesEnum factorType)
 {
     PathServiceSid = pathServiceSid;
     PathIdentity   = pathIdentity;
     FriendlyName   = friendlyName;
     FactorType     = factorType;
 }
Esempio n. 2
0
        /// <summary>
        /// Create a new Factor for the Entity
        /// </summary>
        /// <param name="pathServiceSid"> Service Sid. </param>
        /// <param name="pathIdentity"> Unique external identifier 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>
        /// <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,
                                                                                     string config,
                                                                                     ITwilioRestClient client = null)
        {
            var options = new CreateFactorOptions(pathServiceSid, pathIdentity, binding, friendlyName, factorType, config);

            return(await CreateAsync(options, client));
        }
Esempio n. 3
0
        /// <summary>
        /// Create a new Factor for the Entity
        /// </summary>
        /// <param name="pathServiceSid"> Service Sid. </param>
        /// <param name="pathIdentity"> Unique external identifier 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>
        /// <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,
                                            string config,
                                            ITwilioRestClient client = null)
        {
            var options = new CreateFactorOptions(pathServiceSid, pathIdentity, binding, friendlyName, factorType, config);

            return(Create(options, client));
        }
Esempio n. 4
0
 /// <summary>
 /// Construct a new CreateFactorOptions
 /// </summary>
 /// <param name="pathServiceSid"> Service Sid. </param>
 /// <param name="pathIdentity"> Unique external identifier 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;
 }
Esempio n. 5
0
        /// <summary>
        /// Create a new Factor for the Entity
        /// </summary>
        /// <param name="pathServiceSid"> Service Sid. </param>
        /// <param name="pathIdentity"> Unique external identifier 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>
        /// <param name="twilioSandboxMode"> The Twilio-Sandbox-Mode HTTP request header </param>
        /// <param name="authorization"> The Authorization HTTP request header </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,
                                            string config,
                                            string twilioSandboxMode = null,
                                            string authorization     = null,
                                            ITwilioRestClient client = null)
        {
            var options = new CreateFactorOptions(pathServiceSid, pathIdentity, binding, friendlyName, factorType, config)
            {
                TwilioSandboxMode = twilioSandboxMode, Authorization = authorization
            };

            return(Create(options, client));
        }
Esempio n. 6
0
        /// <summary>
        /// Create a new Factor for the Entity
        /// </summary>
        /// <param name="pathServiceSid"> Service Sid. </param>
        /// <param name="pathIdentity"> Unique external identifier of the Entity </param>
        /// <param name="friendlyName"> The friendly name of this Factor </param>
        /// <param name="factorType"> The Type of this Factor </param>
        /// <param name="bindingAlg"> The algorithm used when `factor_type` is `push` </param>
        /// <param name="bindingPublicKey"> The public key encoded in Base64 </param>
        /// <param name="configAppId"> The ID that uniquely identifies your app in the Google or Apple store </param>
        /// <param name="configNotificationPlatform"> The transport technology used to generate the Notification Token </param>
        /// <param name="configNotificationToken"> For APN, the device token. For FCM the registration token </param>
        /// <param name="configSdkVersion"> The Verify Push SDK version used to configure the 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 friendlyName,
                                                                                     FactorResource.FactorTypesEnum factorType,
                                                                                     string bindingAlg       = null,
                                                                                     string bindingPublicKey = null,
                                                                                     string configAppId      = null,
                                                                                     FactorResource.NotificationPlatformsEnum configNotificationPlatform = null,
                                                                                     string configNotificationToken = null,
                                                                                     string configSdkVersion        = null,
                                                                                     ITwilioRestClient client       = null)
        {
            var options = new CreateFactorOptions(pathServiceSid, pathIdentity, friendlyName, factorType)
            {
                BindingAlg = bindingAlg, BindingPublicKey = bindingPublicKey, ConfigAppId = configAppId, ConfigNotificationPlatform = configNotificationPlatform, ConfigNotificationToken = configNotificationToken, ConfigSdkVersion = configSdkVersion
            };

            return(await CreateAsync(options, client));
        }
        /// <summary>
        /// Create a new Factor for the Entity
        /// </summary>
        /// <param name="pathServiceSid"> Service Sid. </param>
        /// <param name="pathIdentity"> Unique external identifier of the Entity </param>
        /// <param name="friendlyName"> The friendly name of this Factor </param>
        /// <param name="factorType"> The Type of this Factor </param>
        /// <param name="bindingAlg"> The algorithm used when `factor_type` is `push` </param>
        /// <param name="bindingPublicKey"> The public key encoded in Base64 </param>
        /// <param name="configAppId"> The ID that uniquely identifies your app in the Google or Apple store </param>
        /// <param name="configNotificationPlatform"> The transport technology used to generate the Notification Token </param>
        /// <param name="configNotificationToken"> For APN, the device token. For FCM the registration token </param>
        /// <param name="configSdkVersion"> The Verify Push SDK version used to configure the factor </param>
        /// <param name="twilioSandboxMode"> The Twilio-Sandbox-Mode HTTP request header </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 friendlyName,
                                            FactorResource.FactorTypesEnum factorType,
                                            string bindingAlg       = null,
                                            string bindingPublicKey = null,
                                            string configAppId      = null,
                                            FactorResource.NotificationPlatformsEnum configNotificationPlatform = null,
                                            string configNotificationToken = null,
                                            string configSdkVersion        = null,
                                            string twilioSandboxMode       = null,
                                            ITwilioRestClient client       = null)
        {
            var options = new CreateFactorOptions(pathServiceSid, pathIdentity, friendlyName, factorType)
            {
                BindingAlg = bindingAlg, BindingPublicKey = bindingPublicKey, ConfigAppId = configAppId, ConfigNotificationPlatform = configNotificationPlatform, ConfigNotificationToken = configNotificationToken, ConfigSdkVersion = configSdkVersion, TwilioSandboxMode = twilioSandboxMode
            };

            return(Create(options, client));
        }