bandwidth-sdk 6.2.0 → 9.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bandwidth/api_helper.rb +19 -29
- data/lib/bandwidth/client.rb +8 -8
- data/lib/bandwidth/configuration.rb +20 -32
- data/lib/bandwidth/http/auth/{two_factor_auth_basic_auth.rb → multi_factor_auth_basic_auth.rb} +3 -3
- data/lib/bandwidth/http/faraday_client.rb +1 -1
- data/lib/bandwidth/messaging_lib/messaging/client.rb +14 -5
- data/lib/bandwidth/messaging_lib/messaging/controllers/api_controller.rb +78 -71
- data/lib/bandwidth/messaging_lib/messaging/controllers/base_controller.rb +3 -5
- data/lib/bandwidth/messaging_lib/messaging/exceptions/messaging_exception.rb +5 -2
- data/lib/bandwidth/messaging_lib/messaging/models/bandwidth_callback_message.rb +31 -11
- data/lib/bandwidth/messaging_lib/messaging/models/bandwidth_message.rb +54 -25
- data/lib/bandwidth/messaging_lib/messaging/models/bandwidth_message_item.rb +102 -24
- data/lib/bandwidth/messaging_lib/messaging/models/bandwidth_messages_list.rb +23 -4
- data/lib/bandwidth/messaging_lib/messaging/models/deferred_result.rb +20 -4
- data/lib/bandwidth/messaging_lib/messaging/models/media.rb +27 -80
- data/lib/bandwidth/messaging_lib/messaging/models/message_request.rb +32 -14
- data/lib/bandwidth/messaging_lib/messaging/models/page_info.rb +28 -8
- data/lib/bandwidth/messaging_lib/messaging/models/tag.rb +20 -4
- data/lib/bandwidth/models/base_model.rb +30 -8
- data/lib/bandwidth/{two_factor_auth_lib/two_factor_auth → multi_factor_auth_lib/multi_factor_auth}/client.rb +15 -6
- data/lib/bandwidth/{two_factor_auth_lib/two_factor_auth → multi_factor_auth_lib/multi_factor_auth}/controllers/base_controller.rb +3 -5
- data/lib/bandwidth/{two_factor_auth_lib/two_factor_auth → multi_factor_auth_lib/multi_factor_auth}/controllers/mfa_controller.rb +28 -23
- data/lib/bandwidth/{two_factor_auth_lib/two_factor_auth → multi_factor_auth_lib/multi_factor_auth}/exceptions/error_with_request_exception.rb +5 -2
- data/lib/bandwidth/{two_factor_auth_lib/two_factor_auth → multi_factor_auth_lib/multi_factor_auth}/exceptions/forbidden_request_exception.rb +4 -1
- data/lib/bandwidth/{two_factor_auth_lib/two_factor_auth → multi_factor_auth_lib/multi_factor_auth}/exceptions/unauthorized_request_exception.rb +4 -1
- data/lib/bandwidth/{two_factor_auth_lib/two_factor_auth → multi_factor_auth_lib/multi_factor_auth}/models/two_factor_code_request_schema.rb +27 -12
- data/lib/bandwidth/{two_factor_auth_lib/two_factor_auth → multi_factor_auth_lib/multi_factor_auth}/models/two_factor_messaging_response.rb +17 -2
- data/lib/bandwidth/{two_factor_auth_lib/two_factor_auth → multi_factor_auth_lib/multi_factor_auth}/models/two_factor_verify_code_response.rb +17 -2
- data/lib/bandwidth/{two_factor_auth_lib/two_factor_auth → multi_factor_auth_lib/multi_factor_auth}/models/two_factor_verify_request_schema.rb +29 -10
- data/lib/bandwidth/{two_factor_auth_lib/two_factor_auth → multi_factor_auth_lib/multi_factor_auth}/models/two_factor_voice_response.rb +17 -2
- data/lib/bandwidth/multi_factor_auth_lib/multi_factor_auth.rb +23 -0
- data/lib/bandwidth/phone_number_lookup_lib/phone_number_lookup/controllers/api_controller.rb +212 -210
- data/lib/bandwidth/phone_number_lookup_lib/phone_number_lookup/controllers/base_controller.rb +3 -5
- data/lib/bandwidth/phone_number_lookup_lib/phone_number_lookup/exceptions/accounts_tnlookup400_error_exception.rb +4 -1
- data/lib/bandwidth/phone_number_lookup_lib/phone_number_lookup/models/order_request.rb +17 -2
- data/lib/bandwidth/phone_number_lookup_lib/phone_number_lookup/models/order_response.rb +20 -4
- data/lib/bandwidth/phone_number_lookup_lib/phone_number_lookup/models/order_status.rb +28 -7
- data/lib/bandwidth/phone_number_lookup_lib/phone_number_lookup/models/result.rb +43 -18
- data/lib/bandwidth/utilities/date_time_helper.rb +156 -0
- data/lib/bandwidth/utilities/file_wrapper.rb +1 -2
- data/lib/bandwidth/voice_lib/voice/client.rb +14 -5
- data/lib/bandwidth/voice_lib/voice/controllers/api_controller.rb +418 -379
- data/lib/bandwidth/voice_lib/voice/controllers/base_controller.rb +3 -5
- data/lib/bandwidth/voice_lib/voice/exceptions/{api_error_response_exception.rb → api_error_exception.rb} +8 -5
- data/lib/bandwidth/voice_lib/voice/models/call_callback.rb +343 -0
- data/lib/bandwidth/voice_lib/voice/models/call_recording_metadata.rb +250 -0
- data/lib/bandwidth/voice_lib/voice/models/call_state.rb +284 -0
- data/lib/bandwidth/voice_lib/voice/models/callback_method_enum.rb +2 -20
- data/lib/bandwidth/voice_lib/voice/models/conference_callback.rb +211 -0
- data/lib/bandwidth/voice_lib/voice/models/conference_event_method_enum.rb +2 -20
- data/lib/bandwidth/voice_lib/voice/models/{conference_member_detail.rb → conference_member_state.rb} +43 -20
- data/lib/bandwidth/voice_lib/voice/models/conference_recording_metadata.rb +173 -0
- data/lib/bandwidth/voice_lib/voice/models/conference_state.rb +153 -0
- data/lib/bandwidth/voice_lib/voice/models/create_call_request.rb +301 -0
- data/lib/bandwidth/voice_lib/voice/models/create_call_response.rb +256 -0
- data/lib/bandwidth/voice_lib/voice/models/diversion.rb +80 -0
- data/lib/bandwidth/voice_lib/voice/models/fallback_method_enum.rb +17 -0
- data/lib/bandwidth/voice_lib/voice/models/machine_detection_configuration.rb +218 -0
- data/lib/bandwidth/voice_lib/voice/models/mode_enum.rb +20 -0
- data/lib/bandwidth/voice_lib/voice/models/{modify_call_recording_state.rb → modify_call_recording_request.rb} +19 -6
- data/lib/bandwidth/voice_lib/voice/models/modify_call_request.rb +156 -0
- data/lib/bandwidth/voice_lib/voice/models/modify_conference_request.rb +144 -0
- data/lib/bandwidth/voice_lib/voice/models/state1_enum.rb +7 -4
- data/lib/bandwidth/voice_lib/voice/models/state_enum.rb +4 -7
- data/lib/bandwidth/voice_lib/voice/models/transcribe_recording_request.rb +108 -0
- data/lib/bandwidth/voice_lib/voice/models/transcript.rb +20 -4
- data/lib/bandwidth/voice_lib/voice/models/transcription.rb +35 -17
- data/lib/bandwidth/voice_lib/voice/models/transcription_metadata.rb +89 -0
- data/lib/bandwidth/voice_lib/voice/models/transcription_response.rb +18 -1
- data/lib/bandwidth/voice_lib/voice.rb +20 -18
- data/lib/bandwidth/web_rtc_lib/utils/web_rtc_transfer.rb +7 -2
- data/lib/bandwidth/web_rtc_lib/web_rtc/client.rb +4 -4
- data/lib/bandwidth/web_rtc_lib/web_rtc/controllers/api_controller.rb +75 -64
- data/lib/bandwidth/web_rtc_lib/web_rtc/controllers/base_controller.rb +3 -5
- data/lib/bandwidth/web_rtc_lib/web_rtc/exceptions/error_exception.rb +5 -2
- data/lib/bandwidth/web_rtc_lib/web_rtc/models/accounts_participants_response.rb +20 -5
- data/lib/bandwidth/web_rtc_lib/web_rtc/models/participant.rb +37 -14
- data/lib/bandwidth/web_rtc_lib/web_rtc/models/participant_subscription.rb +15 -2
- data/lib/bandwidth/web_rtc_lib/web_rtc/models/session.rb +20 -4
- data/lib/bandwidth/web_rtc_lib/web_rtc/models/subscriptions.rb +20 -3
- data/lib/bandwidth.rb +20 -18
- data/test/integration/test_integration.rb +92 -57
- metadata +35 -31
- data/lib/bandwidth/two_factor_auth_lib/two_factor_auth.rb +0 -22
- data/lib/bandwidth/voice_lib/voice/models/api_call_response.rb +0 -207
- data/lib/bandwidth/voice_lib/voice/models/api_call_state_response.rb +0 -164
- data/lib/bandwidth/voice_lib/voice/models/api_create_call_request.rb +0 -248
- data/lib/bandwidth/voice_lib/voice/models/api_modify_call_request.rb +0 -116
- data/lib/bandwidth/voice_lib/voice/models/api_modify_conference_request.rb +0 -107
- data/lib/bandwidth/voice_lib/voice/models/api_transcribe_recording_request.rb +0 -80
- data/lib/bandwidth/voice_lib/voice/models/conference_detail.rb +0 -108
- data/lib/bandwidth/voice_lib/voice/models/conference_recording_metadata_response.rb +0 -126
- data/lib/bandwidth/voice_lib/voice/models/disconnect_cause_enum.rb +0 -47
- data/lib/bandwidth/voice_lib/voice/models/recording_metadata_response.rb +0 -190
- data/lib/bandwidth/voice_lib/voice/models/state2_enum.rb +0 -20
- data/lib/bandwidth/voice_lib/voice/models/status1_enum.rb +0 -29
- data/lib/bandwidth/voice_lib/voice/models/status3_enum.rb +0 -32
@@ -0,0 +1,156 @@
|
|
1
|
+
# bandwidth
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module Bandwidth
|
7
|
+
# ModifyCallRequest Model.
|
8
|
+
class ModifyCallRequest < BaseModel
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# TODO: Write general description for this method
|
13
|
+
# @return [StateEnum]
|
14
|
+
attr_accessor :state
|
15
|
+
|
16
|
+
# Required if state is 'active'
|
17
|
+
# @return [String]
|
18
|
+
attr_accessor :redirect_url
|
19
|
+
|
20
|
+
# Required if state is 'active'
|
21
|
+
# @return [String]
|
22
|
+
attr_accessor :redirect_fallback_url
|
23
|
+
|
24
|
+
# Required if state is 'active'
|
25
|
+
# @return [RedirectMethodEnum]
|
26
|
+
attr_accessor :redirect_method
|
27
|
+
|
28
|
+
# Required if state is 'active'
|
29
|
+
# @return [RedirectFallbackMethodEnum]
|
30
|
+
attr_accessor :redirect_fallback_method
|
31
|
+
|
32
|
+
# Required if state is 'active'
|
33
|
+
# @return [String]
|
34
|
+
attr_accessor :username
|
35
|
+
|
36
|
+
# Required if state is 'active'
|
37
|
+
# @return [String]
|
38
|
+
attr_accessor :password
|
39
|
+
|
40
|
+
# Required if state is 'active'
|
41
|
+
# @return [String]
|
42
|
+
attr_accessor :fallback_username
|
43
|
+
|
44
|
+
# Required if state is 'active'
|
45
|
+
# @return [String]
|
46
|
+
attr_accessor :fallback_password
|
47
|
+
|
48
|
+
# Required if state is 'active'
|
49
|
+
# @return [String]
|
50
|
+
attr_accessor :tag
|
51
|
+
|
52
|
+
# A mapping from model property names to API property names.
|
53
|
+
def self.names
|
54
|
+
@_hash = {} if @_hash.nil?
|
55
|
+
@_hash['state'] = 'state'
|
56
|
+
@_hash['redirect_url'] = 'redirectUrl'
|
57
|
+
@_hash['redirect_fallback_url'] = 'redirectFallbackUrl'
|
58
|
+
@_hash['redirect_method'] = 'redirectMethod'
|
59
|
+
@_hash['redirect_fallback_method'] = 'redirectFallbackMethod'
|
60
|
+
@_hash['username'] = 'username'
|
61
|
+
@_hash['password'] = 'password'
|
62
|
+
@_hash['fallback_username'] = 'fallbackUsername'
|
63
|
+
@_hash['fallback_password'] = 'fallbackPassword'
|
64
|
+
@_hash['tag'] = 'tag'
|
65
|
+
@_hash
|
66
|
+
end
|
67
|
+
|
68
|
+
# An array for optional fields
|
69
|
+
def optionals
|
70
|
+
%w[
|
71
|
+
state
|
72
|
+
redirect_url
|
73
|
+
redirect_fallback_url
|
74
|
+
redirect_method
|
75
|
+
redirect_fallback_method
|
76
|
+
username
|
77
|
+
password
|
78
|
+
fallback_username
|
79
|
+
fallback_password
|
80
|
+
tag
|
81
|
+
]
|
82
|
+
end
|
83
|
+
|
84
|
+
# An array for nullable fields
|
85
|
+
def nullables
|
86
|
+
%w[
|
87
|
+
state
|
88
|
+
redirect_url
|
89
|
+
redirect_fallback_url
|
90
|
+
redirect_method
|
91
|
+
redirect_fallback_method
|
92
|
+
username
|
93
|
+
password
|
94
|
+
fallback_username
|
95
|
+
fallback_password
|
96
|
+
tag
|
97
|
+
]
|
98
|
+
end
|
99
|
+
|
100
|
+
def initialize(state = StateEnum::ACTIVE,
|
101
|
+
redirect_url = nil,
|
102
|
+
redirect_fallback_url = nil,
|
103
|
+
redirect_method = nil,
|
104
|
+
redirect_fallback_method = nil,
|
105
|
+
username = nil,
|
106
|
+
password = nil,
|
107
|
+
fallback_username = nil,
|
108
|
+
fallback_password = nil,
|
109
|
+
tag = nil)
|
110
|
+
@state = state unless state == SKIP
|
111
|
+
@redirect_url = redirect_url unless redirect_url == SKIP
|
112
|
+
@redirect_fallback_url = redirect_fallback_url unless redirect_fallback_url == SKIP
|
113
|
+
@redirect_method = redirect_method unless redirect_method == SKIP
|
114
|
+
@redirect_fallback_method = redirect_fallback_method unless redirect_fallback_method == SKIP
|
115
|
+
@username = username unless username == SKIP
|
116
|
+
@password = password unless password == SKIP
|
117
|
+
@fallback_username = fallback_username unless fallback_username == SKIP
|
118
|
+
@fallback_password = fallback_password unless fallback_password == SKIP
|
119
|
+
@tag = tag unless tag == SKIP
|
120
|
+
end
|
121
|
+
|
122
|
+
# Creates an instance of the object from a hash.
|
123
|
+
def self.from_hash(hash)
|
124
|
+
return nil unless hash
|
125
|
+
|
126
|
+
# Extract variables from the hash.
|
127
|
+
state = hash['state'] ||= StateEnum::ACTIVE
|
128
|
+
redirect_url = hash.key?('redirectUrl') ? hash['redirectUrl'] : SKIP
|
129
|
+
redirect_fallback_url =
|
130
|
+
hash.key?('redirectFallbackUrl') ? hash['redirectFallbackUrl'] : SKIP
|
131
|
+
redirect_method =
|
132
|
+
hash.key?('redirectMethod') ? hash['redirectMethod'] : SKIP
|
133
|
+
redirect_fallback_method =
|
134
|
+
hash.key?('redirectFallbackMethod') ? hash['redirectFallbackMethod'] : SKIP
|
135
|
+
username = hash.key?('username') ? hash['username'] : SKIP
|
136
|
+
password = hash.key?('password') ? hash['password'] : SKIP
|
137
|
+
fallback_username =
|
138
|
+
hash.key?('fallbackUsername') ? hash['fallbackUsername'] : SKIP
|
139
|
+
fallback_password =
|
140
|
+
hash.key?('fallbackPassword') ? hash['fallbackPassword'] : SKIP
|
141
|
+
tag = hash.key?('tag') ? hash['tag'] : SKIP
|
142
|
+
|
143
|
+
# Create object from extracted values.
|
144
|
+
ModifyCallRequest.new(state,
|
145
|
+
redirect_url,
|
146
|
+
redirect_fallback_url,
|
147
|
+
redirect_method,
|
148
|
+
redirect_fallback_method,
|
149
|
+
username,
|
150
|
+
password,
|
151
|
+
fallback_username,
|
152
|
+
fallback_password,
|
153
|
+
tag)
|
154
|
+
end
|
155
|
+
end
|
156
|
+
end
|
@@ -0,0 +1,144 @@
|
|
1
|
+
# bandwidth
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module Bandwidth
|
7
|
+
# ModifyConferenceRequest Model.
|
8
|
+
class ModifyConferenceRequest < BaseModel
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# TODO: Write general description for this method
|
13
|
+
# @return [StatusEnum]
|
14
|
+
attr_accessor :status
|
15
|
+
|
16
|
+
# TODO: Write general description for this method
|
17
|
+
# @return [String]
|
18
|
+
attr_accessor :redirect_url
|
19
|
+
|
20
|
+
# TODO: Write general description for this method
|
21
|
+
# @return [String]
|
22
|
+
attr_accessor :redirect_fallback_url
|
23
|
+
|
24
|
+
# TODO: Write general description for this method
|
25
|
+
# @return [RedirectMethodEnum]
|
26
|
+
attr_accessor :redirect_method
|
27
|
+
|
28
|
+
# TODO: Write general description for this method
|
29
|
+
# @return [RedirectFallbackMethodEnum]
|
30
|
+
attr_accessor :redirect_fallback_method
|
31
|
+
|
32
|
+
# TODO: Write general description for this method
|
33
|
+
# @return [String]
|
34
|
+
attr_accessor :username
|
35
|
+
|
36
|
+
# TODO: Write general description for this method
|
37
|
+
# @return [String]
|
38
|
+
attr_accessor :password
|
39
|
+
|
40
|
+
# TODO: Write general description for this method
|
41
|
+
# @return [String]
|
42
|
+
attr_accessor :fallback_username
|
43
|
+
|
44
|
+
# TODO: Write general description for this method
|
45
|
+
# @return [String]
|
46
|
+
attr_accessor :fallback_password
|
47
|
+
|
48
|
+
# A mapping from model property names to API property names.
|
49
|
+
def self.names
|
50
|
+
@_hash = {} if @_hash.nil?
|
51
|
+
@_hash['status'] = 'status'
|
52
|
+
@_hash['redirect_url'] = 'redirectUrl'
|
53
|
+
@_hash['redirect_fallback_url'] = 'redirectFallbackUrl'
|
54
|
+
@_hash['redirect_method'] = 'redirectMethod'
|
55
|
+
@_hash['redirect_fallback_method'] = 'redirectFallbackMethod'
|
56
|
+
@_hash['username'] = 'username'
|
57
|
+
@_hash['password'] = 'password'
|
58
|
+
@_hash['fallback_username'] = 'fallbackUsername'
|
59
|
+
@_hash['fallback_password'] = 'fallbackPassword'
|
60
|
+
@_hash
|
61
|
+
end
|
62
|
+
|
63
|
+
# An array for optional fields
|
64
|
+
def optionals
|
65
|
+
%w[
|
66
|
+
status
|
67
|
+
redirect_url
|
68
|
+
redirect_fallback_url
|
69
|
+
redirect_method
|
70
|
+
redirect_fallback_method
|
71
|
+
username
|
72
|
+
password
|
73
|
+
fallback_username
|
74
|
+
fallback_password
|
75
|
+
]
|
76
|
+
end
|
77
|
+
|
78
|
+
# An array for nullable fields
|
79
|
+
def nullables
|
80
|
+
%w[
|
81
|
+
redirect_url
|
82
|
+
redirect_fallback_url
|
83
|
+
redirect_method
|
84
|
+
redirect_fallback_method
|
85
|
+
username
|
86
|
+
password
|
87
|
+
fallback_username
|
88
|
+
fallback_password
|
89
|
+
]
|
90
|
+
end
|
91
|
+
|
92
|
+
def initialize(status = nil,
|
93
|
+
redirect_url = nil,
|
94
|
+
redirect_fallback_url = nil,
|
95
|
+
redirect_method = nil,
|
96
|
+
redirect_fallback_method = nil,
|
97
|
+
username = nil,
|
98
|
+
password = nil,
|
99
|
+
fallback_username = nil,
|
100
|
+
fallback_password = nil)
|
101
|
+
@status = status unless status == SKIP
|
102
|
+
@redirect_url = redirect_url unless redirect_url == SKIP
|
103
|
+
@redirect_fallback_url = redirect_fallback_url unless redirect_fallback_url == SKIP
|
104
|
+
@redirect_method = redirect_method unless redirect_method == SKIP
|
105
|
+
@redirect_fallback_method = redirect_fallback_method unless redirect_fallback_method == SKIP
|
106
|
+
@username = username unless username == SKIP
|
107
|
+
@password = password unless password == SKIP
|
108
|
+
@fallback_username = fallback_username unless fallback_username == SKIP
|
109
|
+
@fallback_password = fallback_password unless fallback_password == SKIP
|
110
|
+
end
|
111
|
+
|
112
|
+
# Creates an instance of the object from a hash.
|
113
|
+
def self.from_hash(hash)
|
114
|
+
return nil unless hash
|
115
|
+
|
116
|
+
# Extract variables from the hash.
|
117
|
+
status = hash.key?('status') ? hash['status'] : SKIP
|
118
|
+
redirect_url = hash.key?('redirectUrl') ? hash['redirectUrl'] : SKIP
|
119
|
+
redirect_fallback_url =
|
120
|
+
hash.key?('redirectFallbackUrl') ? hash['redirectFallbackUrl'] : SKIP
|
121
|
+
redirect_method =
|
122
|
+
hash.key?('redirectMethod') ? hash['redirectMethod'] : SKIP
|
123
|
+
redirect_fallback_method =
|
124
|
+
hash.key?('redirectFallbackMethod') ? hash['redirectFallbackMethod'] : SKIP
|
125
|
+
username = hash.key?('username') ? hash['username'] : SKIP
|
126
|
+
password = hash.key?('password') ? hash['password'] : SKIP
|
127
|
+
fallback_username =
|
128
|
+
hash.key?('fallbackUsername') ? hash['fallbackUsername'] : SKIP
|
129
|
+
fallback_password =
|
130
|
+
hash.key?('fallbackPassword') ? hash['fallbackPassword'] : SKIP
|
131
|
+
|
132
|
+
# Create object from extracted values.
|
133
|
+
ModifyConferenceRequest.new(status,
|
134
|
+
redirect_url,
|
135
|
+
redirect_fallback_url,
|
136
|
+
redirect_method,
|
137
|
+
redirect_fallback_method,
|
138
|
+
username,
|
139
|
+
password,
|
140
|
+
fallback_username,
|
141
|
+
fallback_password)
|
142
|
+
end
|
143
|
+
end
|
144
|
+
end
|
@@ -7,11 +7,14 @@ module Bandwidth
|
|
7
7
|
# State1.
|
8
8
|
class State1Enum
|
9
9
|
STATE1_ENUM = [
|
10
|
-
# TODO: Write general description for
|
11
|
-
|
10
|
+
# TODO: Write general description for NOT_RECORDING
|
11
|
+
NOT_RECORDING = 'NOT_RECORDING'.freeze,
|
12
12
|
|
13
|
-
# TODO: Write general description for
|
14
|
-
|
13
|
+
# TODO: Write general description for PAUSED
|
14
|
+
PAUSED = 'PAUSED'.freeze,
|
15
|
+
|
16
|
+
# TODO: Write general description for RECORDING
|
17
|
+
RECORDING = 'RECORDING'.freeze
|
15
18
|
].freeze
|
16
19
|
end
|
17
20
|
end
|
@@ -7,14 +7,11 @@ module Bandwidth
|
|
7
7
|
# State.
|
8
8
|
class StateEnum
|
9
9
|
STATE_ENUM = [
|
10
|
-
# TODO: Write general description for
|
11
|
-
|
10
|
+
# TODO: Write general description for ACTIVE
|
11
|
+
ACTIVE = 'active'.freeze,
|
12
12
|
|
13
|
-
# TODO: Write general description for
|
14
|
-
|
15
|
-
|
16
|
-
# TODO: Write general description for INITIATED
|
17
|
-
INITIATED = 'INITIATED'.freeze
|
13
|
+
# TODO: Write general description for COMPLETED
|
14
|
+
COMPLETED = 'completed'.freeze
|
18
15
|
].freeze
|
19
16
|
end
|
20
17
|
end
|
@@ -0,0 +1,108 @@
|
|
1
|
+
# bandwidth
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module Bandwidth
|
7
|
+
# TranscribeRecordingRequest Model.
|
8
|
+
class TranscribeRecordingRequest < BaseModel
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# TODO: Write general description for this method
|
13
|
+
# @return [String]
|
14
|
+
attr_accessor :callback_url
|
15
|
+
|
16
|
+
# TODO: Write general description for this method
|
17
|
+
# @return [CallbackMethodEnum]
|
18
|
+
attr_accessor :callback_method
|
19
|
+
|
20
|
+
# TODO: Write general description for this method
|
21
|
+
# @return [String]
|
22
|
+
attr_accessor :username
|
23
|
+
|
24
|
+
# TODO: Write general description for this method
|
25
|
+
# @return [String]
|
26
|
+
attr_accessor :password
|
27
|
+
|
28
|
+
# TODO: Write general description for this method
|
29
|
+
# @return [String]
|
30
|
+
attr_accessor :tag
|
31
|
+
|
32
|
+
# TODO: Write general description for this method
|
33
|
+
# @return [Float]
|
34
|
+
attr_accessor :callback_timeout
|
35
|
+
|
36
|
+
# A mapping from model property names to API property names.
|
37
|
+
def self.names
|
38
|
+
@_hash = {} if @_hash.nil?
|
39
|
+
@_hash['callback_url'] = 'callbackUrl'
|
40
|
+
@_hash['callback_method'] = 'callbackMethod'
|
41
|
+
@_hash['username'] = 'username'
|
42
|
+
@_hash['password'] = 'password'
|
43
|
+
@_hash['tag'] = 'tag'
|
44
|
+
@_hash['callback_timeout'] = 'callbackTimeout'
|
45
|
+
@_hash
|
46
|
+
end
|
47
|
+
|
48
|
+
# An array for optional fields
|
49
|
+
def optionals
|
50
|
+
%w[
|
51
|
+
callback_url
|
52
|
+
callback_method
|
53
|
+
username
|
54
|
+
password
|
55
|
+
tag
|
56
|
+
callback_timeout
|
57
|
+
]
|
58
|
+
end
|
59
|
+
|
60
|
+
# An array for nullable fields
|
61
|
+
def nullables
|
62
|
+
%w[
|
63
|
+
callback_method
|
64
|
+
username
|
65
|
+
password
|
66
|
+
tag
|
67
|
+
callback_timeout
|
68
|
+
]
|
69
|
+
end
|
70
|
+
|
71
|
+
def initialize(callback_url = nil,
|
72
|
+
callback_method = nil,
|
73
|
+
username = nil,
|
74
|
+
password = nil,
|
75
|
+
tag = nil,
|
76
|
+
callback_timeout = nil)
|
77
|
+
@callback_url = callback_url unless callback_url == SKIP
|
78
|
+
@callback_method = callback_method unless callback_method == SKIP
|
79
|
+
@username = username unless username == SKIP
|
80
|
+
@password = password unless password == SKIP
|
81
|
+
@tag = tag unless tag == SKIP
|
82
|
+
@callback_timeout = callback_timeout unless callback_timeout == SKIP
|
83
|
+
end
|
84
|
+
|
85
|
+
# Creates an instance of the object from a hash.
|
86
|
+
def self.from_hash(hash)
|
87
|
+
return nil unless hash
|
88
|
+
|
89
|
+
# Extract variables from the hash.
|
90
|
+
callback_url = hash.key?('callbackUrl') ? hash['callbackUrl'] : SKIP
|
91
|
+
callback_method =
|
92
|
+
hash.key?('callbackMethod') ? hash['callbackMethod'] : SKIP
|
93
|
+
username = hash.key?('username') ? hash['username'] : SKIP
|
94
|
+
password = hash.key?('password') ? hash['password'] : SKIP
|
95
|
+
tag = hash.key?('tag') ? hash['tag'] : SKIP
|
96
|
+
callback_timeout =
|
97
|
+
hash.key?('callbackTimeout') ? hash['callbackTimeout'] : SKIP
|
98
|
+
|
99
|
+
# Create object from extracted values.
|
100
|
+
TranscribeRecordingRequest.new(callback_url,
|
101
|
+
callback_method,
|
102
|
+
username,
|
103
|
+
password,
|
104
|
+
tag,
|
105
|
+
callback_timeout)
|
106
|
+
end
|
107
|
+
end
|
108
|
+
end
|
@@ -6,6 +6,9 @@
|
|
6
6
|
module Bandwidth
|
7
7
|
# Transcript Model.
|
8
8
|
class Transcript < BaseModel
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
9
12
|
# TODO: Write general description for this method
|
10
13
|
# @return [String]
|
11
14
|
attr_accessor :text
|
@@ -22,10 +25,23 @@ module Bandwidth
|
|
22
25
|
@_hash
|
23
26
|
end
|
24
27
|
|
28
|
+
# An array for optional fields
|
29
|
+
def optionals
|
30
|
+
%w[
|
31
|
+
text
|
32
|
+
confidence
|
33
|
+
]
|
34
|
+
end
|
35
|
+
|
36
|
+
# An array for nullable fields
|
37
|
+
def nullables
|
38
|
+
[]
|
39
|
+
end
|
40
|
+
|
25
41
|
def initialize(text = nil,
|
26
42
|
confidence = nil)
|
27
|
-
@text = text
|
28
|
-
@confidence = confidence
|
43
|
+
@text = text unless text == SKIP
|
44
|
+
@confidence = confidence unless confidence == SKIP
|
29
45
|
end
|
30
46
|
|
31
47
|
# Creates an instance of the object from a hash.
|
@@ -33,8 +49,8 @@ module Bandwidth
|
|
33
49
|
return nil unless hash
|
34
50
|
|
35
51
|
# Extract variables from the hash.
|
36
|
-
text = hash['text']
|
37
|
-
confidence = hash['confidence']
|
52
|
+
text = hash.key?('text') ? hash['text'] : SKIP
|
53
|
+
confidence = hash.key?('confidence') ? hash['confidence'] : SKIP
|
38
54
|
|
39
55
|
# Create object from extracted values.
|
40
56
|
Transcript.new(text,
|
@@ -6,40 +6,58 @@
|
|
6
6
|
module Bandwidth
|
7
7
|
# Transcription Model.
|
8
8
|
class Transcription < BaseModel
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
9
12
|
# TODO: Write general description for this method
|
10
13
|
# @return [String]
|
11
14
|
attr_accessor :id
|
12
15
|
|
13
16
|
# TODO: Write general description for this method
|
14
|
-
# @return [
|
15
|
-
attr_accessor :
|
17
|
+
# @return [String]
|
18
|
+
attr_accessor :url
|
16
19
|
|
17
20
|
# TODO: Write general description for this method
|
18
21
|
# @return [String]
|
19
|
-
attr_accessor :
|
22
|
+
attr_accessor :status
|
20
23
|
|
21
24
|
# TODO: Write general description for this method
|
22
25
|
# @return [String]
|
23
|
-
attr_accessor :
|
26
|
+
attr_accessor :completed_time
|
24
27
|
|
25
28
|
# A mapping from model property names to API property names.
|
26
29
|
def self.names
|
27
30
|
@_hash = {} if @_hash.nil?
|
28
31
|
@_hash['id'] = 'id'
|
32
|
+
@_hash['url'] = 'url'
|
29
33
|
@_hash['status'] = 'status'
|
30
34
|
@_hash['completed_time'] = 'completedTime'
|
31
|
-
@_hash['url'] = 'url'
|
32
35
|
@_hash
|
33
36
|
end
|
34
37
|
|
38
|
+
# An array for optional fields
|
39
|
+
def optionals
|
40
|
+
%w[
|
41
|
+
id
|
42
|
+
url
|
43
|
+
status
|
44
|
+
completed_time
|
45
|
+
]
|
46
|
+
end
|
47
|
+
|
48
|
+
# An array for nullable fields
|
49
|
+
def nullables
|
50
|
+
[]
|
51
|
+
end
|
52
|
+
|
35
53
|
def initialize(id = nil,
|
54
|
+
url = nil,
|
36
55
|
status = nil,
|
37
|
-
completed_time = nil
|
38
|
-
|
39
|
-
@
|
40
|
-
@status = status
|
41
|
-
@completed_time = completed_time
|
42
|
-
@url = url
|
56
|
+
completed_time = nil)
|
57
|
+
@id = id unless id == SKIP
|
58
|
+
@url = url unless url == SKIP
|
59
|
+
@status = status unless status == SKIP
|
60
|
+
@completed_time = completed_time unless completed_time == SKIP
|
43
61
|
end
|
44
62
|
|
45
63
|
# Creates an instance of the object from a hash.
|
@@ -47,16 +65,16 @@ module Bandwidth
|
|
47
65
|
return nil unless hash
|
48
66
|
|
49
67
|
# Extract variables from the hash.
|
50
|
-
id = hash['id']
|
51
|
-
|
52
|
-
|
53
|
-
|
68
|
+
id = hash.key?('id') ? hash['id'] : SKIP
|
69
|
+
url = hash.key?('url') ? hash['url'] : SKIP
|
70
|
+
status = hash.key?('status') ? hash['status'] : SKIP
|
71
|
+
completed_time = hash.key?('completedTime') ? hash['completedTime'] : SKIP
|
54
72
|
|
55
73
|
# Create object from extracted values.
|
56
74
|
Transcription.new(id,
|
75
|
+
url,
|
57
76
|
status,
|
58
|
-
completed_time
|
59
|
-
url)
|
77
|
+
completed_time)
|
60
78
|
end
|
61
79
|
end
|
62
80
|
end
|
@@ -0,0 +1,89 @@
|
|
1
|
+
# bandwidth
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module Bandwidth
|
7
|
+
# TranscriptionMetadata Model.
|
8
|
+
class TranscriptionMetadata < BaseModel
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# TODO: Write general description for this method
|
13
|
+
# @return [String]
|
14
|
+
attr_accessor :id
|
15
|
+
|
16
|
+
# The current status of the transcription. Current values are 'none',
|
17
|
+
# 'processing', 'available', 'error', 'timeout', 'file-size-too-big', and
|
18
|
+
# 'file-size-too-small'. Additional states may be added in the future, so
|
19
|
+
# your application must be tolerant of unknown values.
|
20
|
+
# @return [String]
|
21
|
+
attr_accessor :status
|
22
|
+
|
23
|
+
# The current status of the transcription. Current values are 'none',
|
24
|
+
# 'processing', 'available', 'error', 'timeout', 'file-size-too-big', and
|
25
|
+
# 'file-size-too-small'. Additional states may be added in the future, so
|
26
|
+
# your application must be tolerant of unknown values.
|
27
|
+
# @return [String]
|
28
|
+
attr_accessor :completed_time
|
29
|
+
|
30
|
+
# The current status of the transcription. Current values are 'none',
|
31
|
+
# 'processing', 'available', 'error', 'timeout', 'file-size-too-big', and
|
32
|
+
# 'file-size-too-small'. Additional states may be added in the future, so
|
33
|
+
# your application must be tolerant of unknown values.
|
34
|
+
# @return [String]
|
35
|
+
attr_accessor :url
|
36
|
+
|
37
|
+
# A mapping from model property names to API property names.
|
38
|
+
def self.names
|
39
|
+
@_hash = {} if @_hash.nil?
|
40
|
+
@_hash['id'] = 'id'
|
41
|
+
@_hash['status'] = 'status'
|
42
|
+
@_hash['completed_time'] = 'completedTime'
|
43
|
+
@_hash['url'] = 'url'
|
44
|
+
@_hash
|
45
|
+
end
|
46
|
+
|
47
|
+
# An array for optional fields
|
48
|
+
def optionals
|
49
|
+
%w[
|
50
|
+
id
|
51
|
+
status
|
52
|
+
completed_time
|
53
|
+
url
|
54
|
+
]
|
55
|
+
end
|
56
|
+
|
57
|
+
# An array for nullable fields
|
58
|
+
def nullables
|
59
|
+
[]
|
60
|
+
end
|
61
|
+
|
62
|
+
def initialize(id = nil,
|
63
|
+
status = nil,
|
64
|
+
completed_time = nil,
|
65
|
+
url = nil)
|
66
|
+
@id = id unless id == SKIP
|
67
|
+
@status = status unless status == SKIP
|
68
|
+
@completed_time = completed_time unless completed_time == SKIP
|
69
|
+
@url = url unless url == SKIP
|
70
|
+
end
|
71
|
+
|
72
|
+
# Creates an instance of the object from a hash.
|
73
|
+
def self.from_hash(hash)
|
74
|
+
return nil unless hash
|
75
|
+
|
76
|
+
# Extract variables from the hash.
|
77
|
+
id = hash.key?('id') ? hash['id'] : SKIP
|
78
|
+
status = hash.key?('status') ? hash['status'] : SKIP
|
79
|
+
completed_time = hash.key?('completedTime') ? hash['completedTime'] : SKIP
|
80
|
+
url = hash.key?('url') ? hash['url'] : SKIP
|
81
|
+
|
82
|
+
# Create object from extracted values.
|
83
|
+
TranscriptionMetadata.new(id,
|
84
|
+
status,
|
85
|
+
completed_time,
|
86
|
+
url)
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|