Class: Bandwidth::TranscribeRecordingRequest

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/bandwidth/voice_lib/voice/models/transcribe_recording_request.rb

Overview

TranscribeRecordingRequest Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(callback_url = nil, callback_method = nil, username = nil, password = nil, tag = nil, callback_timeout = nil) ⇒ TranscribeRecordingRequest

Returns a new instance of TranscribeRecordingRequest.



71
72
73
74
75
76
77
78
79
80
81
82
83
# File 'lib/bandwidth/voice_lib/voice/models/transcribe_recording_request.rb', line 71

def initialize(callback_url = nil,
               callback_method = nil,
               username = nil,
               password = nil,
               tag = nil,
               callback_timeout = nil)
  @callback_url = callback_url unless callback_url == SKIP
  @callback_method = callback_method unless callback_method == SKIP
  @username = username unless username == SKIP
  @password = password unless password == SKIP
  @tag = tag unless tag == SKIP
  @callback_timeout = callback_timeout unless callback_timeout == SKIP
end

Instance Attribute Details

#callback_methodCallbackMethodEnum

TODO: Write general description for this method

Returns:



18
19
20
# File 'lib/bandwidth/voice_lib/voice/models/transcribe_recording_request.rb', line 18

def callback_method
  @callback_method
end

#callback_timeoutFloat

TODO: Write general description for this method

Returns:

  • (Float)


34
35
36
# File 'lib/bandwidth/voice_lib/voice/models/transcribe_recording_request.rb', line 34

def callback_timeout
  @callback_timeout
end

#callback_urlString

TODO: Write general description for this method

Returns:

  • (String)


14
15
16
# File 'lib/bandwidth/voice_lib/voice/models/transcribe_recording_request.rb', line 14

def callback_url
  @callback_url
end

#passwordString

TODO: Write general description for this method

Returns:

  • (String)


26
27
28
# File 'lib/bandwidth/voice_lib/voice/models/transcribe_recording_request.rb', line 26

def password
  @password
end

#tagString

TODO: Write general description for this method

Returns:

  • (String)


30
31
32
# File 'lib/bandwidth/voice_lib/voice/models/transcribe_recording_request.rb', line 30

def tag
  @tag
end

#usernameString

TODO: Write general description for this method

Returns:

  • (String)


22
23
24
# File 'lib/bandwidth/voice_lib/voice/models/transcribe_recording_request.rb', line 22

def username
  @username
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# File 'lib/bandwidth/voice_lib/voice/models/transcribe_recording_request.rb', line 86

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  callback_url = hash.key?('callbackUrl') ? hash['callbackUrl'] : SKIP
  callback_method =
    hash.key?('callbackMethod') ? hash['callbackMethod'] : SKIP
  username = hash.key?('username') ? hash['username'] : SKIP
  password = hash.key?('password') ? hash['password'] : SKIP
  tag = hash.key?('tag') ? hash['tag'] : SKIP
  callback_timeout =
    hash.key?('callbackTimeout') ? hash['callbackTimeout'] : SKIP

  # Create object from extracted values.
  TranscribeRecordingRequest.new(callback_url,
                                 callback_method,
                                 username,
                                 password,
                                 tag,
                                 callback_timeout)
end

.namesObject

A mapping from model property names to API property names.



37
38
39
40
41
42
43
44
45
46
# File 'lib/bandwidth/voice_lib/voice/models/transcribe_recording_request.rb', line 37

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['callback_url'] = 'callbackUrl'
  @_hash['callback_method'] = 'callbackMethod'
  @_hash['username'] = 'username'
  @_hash['password'] = 'password'
  @_hash['tag'] = 'tag'
  @_hash['callback_timeout'] = 'callbackTimeout'
  @_hash
end

Instance Method Details

#nullablesObject

An array for nullable fields



61
62
63
64
65
66
67
68
69
# File 'lib/bandwidth/voice_lib/voice/models/transcribe_recording_request.rb', line 61

def nullables
  %w[
    callback_method
    username
    password
    tag
    callback_timeout
  ]
end

#optionalsObject

An array for optional fields



49
50
51
52
53
54
55
56
57
58
# File 'lib/bandwidth/voice_lib/voice/models/transcribe_recording_request.rb', line 49

def optionals
  %w[
    callback_url
    callback_method
    username
    password
    tag
    callback_timeout
  ]
end