Class: Bandwidth::TwoFactorVerifyRequestSchema

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/bandwidth/two_factor_auth_lib/two_factor_auth/models/two_factor_verify_request_schema.rb

Overview

TwoFactorVerifyRequestSchema Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(to = nil, from = nil, application_id = nil, scope = nil, code = nil) ⇒ TwoFactorVerifyRequestSchema

Returns a new instance of TwoFactorVerifyRequestSchema.



40
41
42
43
44
45
46
47
48
49
50
# File 'lib/bandwidth/two_factor_auth_lib/two_factor_auth/models/two_factor_verify_request_schema.rb', line 40

def initialize(to = nil,
               from = nil,
               application_id = nil,
               scope = nil,
               code = nil)
  @to = to
  @from = from
  @application_id = application_id
  @scope = scope
  @code = code
end

Instance Attribute Details

#application_idString

TODO: Write general description for this method

Returns:

  • (String)


19
20
21
# File 'lib/bandwidth/two_factor_auth_lib/two_factor_auth/models/two_factor_verify_request_schema.rb', line 19

def application_id
  @application_id
end

#codeString

TODO: Write general description for this method

Returns:

  • (String)


27
28
29
# File 'lib/bandwidth/two_factor_auth_lib/two_factor_auth/models/two_factor_verify_request_schema.rb', line 27

def code
  @code
end

#fromString

TODO: Write general description for this method

Returns:

  • (String)


15
16
17
# File 'lib/bandwidth/two_factor_auth_lib/two_factor_auth/models/two_factor_verify_request_schema.rb', line 15

def from
  @from
end

#scopeString

TODO: Write general description for this method

Returns:

  • (String)


23
24
25
# File 'lib/bandwidth/two_factor_auth_lib/two_factor_auth/models/two_factor_verify_request_schema.rb', line 23

def scope
  @scope
end

#toString

TODO: Write general description for this method

Returns:

  • (String)


11
12
13
# File 'lib/bandwidth/two_factor_auth_lib/two_factor_auth/models/two_factor_verify_request_schema.rb', line 11

def to
  @to
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# File 'lib/bandwidth/two_factor_auth_lib/two_factor_auth/models/two_factor_verify_request_schema.rb', line 53

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  to = hash['to']
  from = hash['from']
  application_id = hash['applicationId']
  scope = hash['scope']
  code = hash['code']

  # Create object from extracted values.
  TwoFactorVerifyRequestSchema.new(to,
                                   from,
                                   application_id,
                                   scope,
                                   code)
end

.namesObject

A mapping from model property names to API property names.



30
31
32
33
34
35
36
37
38
# File 'lib/bandwidth/two_factor_auth_lib/two_factor_auth/models/two_factor_verify_request_schema.rb', line 30

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['to'] = 'to'
  @_hash['from'] = 'from'
  @_hash['application_id'] = 'applicationId'
  @_hash['scope'] = 'scope'
  @_hash['code'] = 'code'
  @_hash
end