예제 #1
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));
        }
예제 #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="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));
        }