class Bandwidth::TwoFactorCodeRequestSchema
TwoFactorCodeRequestSchema
Model.
Attributes
The application unique ID, obtained from Bandwidth
. @return [String]
The number of digits for your 2fa code. The valid number ranges from 2 to 8, inclusively. @return [Float]
The application phone number, the sender of the 2fa code. @return [String]
The message format of the 2fa code. There are three values that the system will replace “{CODE}”, “{NAME}”, “{SCOPE}”. The “{SCOPE}” and “{NAME} value template are optional, while ”{CODE}“ must be supplied. As the name would suggest, code will be replace with the actual 2fa code. Name is replaced with the application name, configured during provisioning of 2fa. The scope value is the same value sent during the call and partitioned by the server. @return [String]
An optional field to denote what scope or action the 2fa code is addressing. If not supplied, defaults to “2FA”. @return [String]
The phone number to send the 2fa code to. @return [String]
Public Class Methods
Creates an instance of the object from a hash.
# File lib/bandwidth/multi_factor_auth_lib/multi_factor_auth/models/two_factor_code_request_schema.rb, line 68 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. to = hash['to'] from = hash['from'] application_id = hash['applicationId'] message = hash['message'] digits = hash['digits'] scope = hash['scope'] # Create object from extracted values. TwoFactorCodeRequestSchema.new(to, from, application_id, message, digits, scope) end
A mapping from model property names to API property names.
# File lib/bandwidth/multi_factor_auth_lib/multi_factor_auth/models/two_factor_code_request_schema.rb, line 42 def self.names @_hash = {} if @_hash.nil? @_hash['to'] = 'to' @_hash['from'] = 'from' @_hash['application_id'] = 'applicationId' @_hash['scope'] = 'scope' @_hash['message'] = 'message' @_hash['digits'] = 'digits' @_hash end
# File lib/bandwidth/multi_factor_auth_lib/multi_factor_auth/models/two_factor_code_request_schema.rb, line 53 def initialize(to = nil, from = nil, application_id = nil, message = nil, digits = nil, scope = nil) @to = to @from = from @application_id = application_id @scope = scope @message = message @digits = digits end