Class: Twilio::REST::Verify::V2::ServiceContext::EntityContext::NewFactorList
- Inherits:
-
ListResource
- Object
- ListResource
- Twilio::REST::Verify::V2::ServiceContext::EntityContext::NewFactorList
- Defined in:
- lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb
Instance Method Summary collapse
-
#create(friendly_name: nil, factor_type: nil, binding_alg: :unset, binding_public_key: :unset, config_app_id: :unset, config_notification_platform: :unset, config_notification_token: :unset, config_sdk_version: :unset, binding_secret: :unset, config_time_step: :unset, config_skew: :unset, config_code_length: :unset, config_alg: :unset, metadata: :unset) ⇒ NewFactorInstance
Create the NewFactorInstance.
-
#initialize(version, service_sid: nil, identity: nil) ⇒ NewFactorList
constructor
Initialize the NewFactorList.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, service_sid: nil, identity: nil) ⇒ NewFactorList
Initialize the NewFactorList
29 30 31 32 33 34 35 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb', line 29 def initialize(version, service_sid: nil, identity: nil) super(version) # Path Solution @solution = { service_sid: service_sid, identity: identity } @uri = "/Services/#{@solution[:service_sid]}/Entities/#{@solution[:identity]}/Factors" end |
Instance Method Details
#create(friendly_name: nil, factor_type: nil, binding_alg: :unset, binding_public_key: :unset, config_app_id: :unset, config_notification_platform: :unset, config_notification_token: :unset, config_sdk_version: :unset, binding_secret: :unset, config_time_step: :unset, config_skew: :unset, config_code_length: :unset, config_alg: :unset, metadata: :unset) ⇒ NewFactorInstance
Create the NewFactorInstance
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb', line 53 def create( friendly_name: nil, factor_type: nil, binding_alg: :unset, binding_public_key: :unset, config_app_id: :unset, config_notification_platform: :unset, config_notification_token: :unset, config_sdk_version: :unset, binding_secret: :unset, config_time_step: :unset, config_skew: :unset, config_code_length: :unset, config_alg: :unset, metadata: :unset ) data = Twilio::Values.of({ 'FriendlyName' => friendly_name, 'FactorType' => factor_type, 'Binding.Alg' => binding_alg, 'Binding.PublicKey' => binding_public_key, 'Config.AppId' => config_app_id, 'Config.NotificationPlatform' => config_notification_platform, 'Config.NotificationToken' => config_notification_token, 'Config.SdkVersion' => config_sdk_version, 'Binding.Secret' => binding_secret, 'Config.TimeStep' => config_time_step, 'Config.Skew' => config_skew, 'Config.CodeLength' => config_code_length, 'Config.Alg' => config_alg, 'Metadata' => Twilio.serialize_object(), }) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.create('POST', @uri, data: data, headers: headers) NewFactorInstance.new( @version, payload, service_sid: @solution[:service_sid], identity: @solution[:identity], ) end |
#to_s ⇒ Object
Provide a user friendly representation
106 107 108 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb', line 106 def to_s '#<Twilio.Verify.V2.NewFactorList>' end |