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
@@ -1,22 +0,0 @@
|
|
1
|
-
# bandwidth
|
2
|
-
#
|
3
|
-
# This file was automatically generated by APIMATIC v2.0
|
4
|
-
# ( https://apimatic.io ).
|
5
|
-
|
6
|
-
|
7
|
-
require_relative 'two_factor_auth/client.rb'
|
8
|
-
|
9
|
-
# Models
|
10
|
-
require_relative 'two_factor_auth/models/two_factor_code_request_schema.rb'
|
11
|
-
require_relative 'two_factor_auth/models/two_factor_voice_response.rb'
|
12
|
-
require_relative 'two_factor_auth/models/two_factor_messaging_response.rb'
|
13
|
-
require_relative 'two_factor_auth/models/two_factor_verify_request_schema.rb'
|
14
|
-
require_relative 'two_factor_auth/models/two_factor_verify_code_response.rb'
|
15
|
-
|
16
|
-
# Exceptions
|
17
|
-
require_relative 'two_factor_auth/exceptions/error_with_request_exception.rb'
|
18
|
-
require_relative 'two_factor_auth/exceptions/unauthorized_request_exception.rb'
|
19
|
-
require_relative 'two_factor_auth/exceptions/forbidden_request_exception.rb'
|
20
|
-
# Controllers
|
21
|
-
require_relative 'two_factor_auth/controllers/base_controller.rb'
|
22
|
-
require_relative 'two_factor_auth/controllers/mfa_controller.rb'
|
@@ -1,207 +0,0 @@
|
|
1
|
-
# bandwidth
|
2
|
-
#
|
3
|
-
# This file was automatically generated by APIMATIC v2.0
|
4
|
-
# ( https://apimatic.io ).
|
5
|
-
|
6
|
-
require 'date'
|
7
|
-
module Bandwidth
|
8
|
-
# ApiCallResponse Model.
|
9
|
-
class ApiCallResponse < BaseModel
|
10
|
-
# TODO: Write general description for this method
|
11
|
-
# @return [String]
|
12
|
-
attr_accessor :account_id
|
13
|
-
|
14
|
-
# TODO: Write general description for this method
|
15
|
-
# @return [String]
|
16
|
-
attr_accessor :call_id
|
17
|
-
|
18
|
-
# TODO: Write general description for this method
|
19
|
-
# @return [String]
|
20
|
-
attr_accessor :application_id
|
21
|
-
|
22
|
-
# TODO: Write general description for this method
|
23
|
-
# @return [String]
|
24
|
-
attr_accessor :to
|
25
|
-
|
26
|
-
# TODO: Write general description for this method
|
27
|
-
# @return [String]
|
28
|
-
attr_accessor :from
|
29
|
-
|
30
|
-
# TODO: Write general description for this method
|
31
|
-
# @return [DateTime]
|
32
|
-
attr_accessor :start_time
|
33
|
-
|
34
|
-
# TODO: Write general description for this method
|
35
|
-
# @return [String]
|
36
|
-
attr_accessor :call_url
|
37
|
-
|
38
|
-
# TODO: Write general description for this method
|
39
|
-
# @return [Float]
|
40
|
-
attr_accessor :call_timeout
|
41
|
-
|
42
|
-
# TODO: Write general description for this method
|
43
|
-
# @return [Float]
|
44
|
-
attr_accessor :callback_timeout
|
45
|
-
|
46
|
-
# TODO: Write general description for this method
|
47
|
-
# @return [String]
|
48
|
-
attr_accessor :answer_url
|
49
|
-
|
50
|
-
# TODO: Write general description for this method
|
51
|
-
# @return [AnswerMethodEnum]
|
52
|
-
attr_accessor :answer_method
|
53
|
-
|
54
|
-
# TODO: Write general description for this method
|
55
|
-
# @return [String]
|
56
|
-
attr_accessor :answer_fallback_url
|
57
|
-
|
58
|
-
# TODO: Write general description for this method
|
59
|
-
# @return [AnswerFallbackMethodEnum]
|
60
|
-
attr_accessor :answer_fallback_method
|
61
|
-
|
62
|
-
# TODO: Write general description for this method
|
63
|
-
# @return [String]
|
64
|
-
attr_accessor :disconnect_url
|
65
|
-
|
66
|
-
# TODO: Write general description for this method
|
67
|
-
# @return [DisconnectMethodEnum]
|
68
|
-
attr_accessor :disconnect_method
|
69
|
-
|
70
|
-
# TODO: Write general description for this method
|
71
|
-
# @return [String]
|
72
|
-
attr_accessor :username
|
73
|
-
|
74
|
-
# TODO: Write general description for this method
|
75
|
-
# @return [String]
|
76
|
-
attr_accessor :password
|
77
|
-
|
78
|
-
# TODO: Write general description for this method
|
79
|
-
# @return [String]
|
80
|
-
attr_accessor :fallback_username
|
81
|
-
|
82
|
-
# TODO: Write general description for this method
|
83
|
-
# @return [String]
|
84
|
-
attr_accessor :fallback_password
|
85
|
-
|
86
|
-
# TODO: Write general description for this method
|
87
|
-
# @return [String]
|
88
|
-
attr_accessor :tag
|
89
|
-
|
90
|
-
# A mapping from model property names to API property names.
|
91
|
-
def self.names
|
92
|
-
@_hash = {} if @_hash.nil?
|
93
|
-
@_hash['account_id'] = 'accountId'
|
94
|
-
@_hash['call_id'] = 'callId'
|
95
|
-
@_hash['application_id'] = 'applicationId'
|
96
|
-
@_hash['to'] = 'to'
|
97
|
-
@_hash['from'] = 'from'
|
98
|
-
@_hash['start_time'] = 'startTime'
|
99
|
-
@_hash['call_url'] = 'callUrl'
|
100
|
-
@_hash['call_timeout'] = 'callTimeout'
|
101
|
-
@_hash['callback_timeout'] = 'callbackTimeout'
|
102
|
-
@_hash['answer_url'] = 'answerUrl'
|
103
|
-
@_hash['answer_method'] = 'answerMethod'
|
104
|
-
@_hash['answer_fallback_url'] = 'answerFallbackUrl'
|
105
|
-
@_hash['answer_fallback_method'] = 'answerFallbackMethod'
|
106
|
-
@_hash['disconnect_url'] = 'disconnectUrl'
|
107
|
-
@_hash['disconnect_method'] = 'disconnectMethod'
|
108
|
-
@_hash['username'] = 'username'
|
109
|
-
@_hash['password'] = 'password'
|
110
|
-
@_hash['fallback_username'] = 'fallbackUsername'
|
111
|
-
@_hash['fallback_password'] = 'fallbackPassword'
|
112
|
-
@_hash['tag'] = 'tag'
|
113
|
-
@_hash
|
114
|
-
end
|
115
|
-
|
116
|
-
def initialize(account_id = nil,
|
117
|
-
call_id = nil,
|
118
|
-
application_id = nil,
|
119
|
-
to = nil,
|
120
|
-
from = nil,
|
121
|
-
call_url = nil,
|
122
|
-
answer_url = nil,
|
123
|
-
answer_method = nil,
|
124
|
-
disconnect_method = nil,
|
125
|
-
start_time = nil,
|
126
|
-
call_timeout = nil,
|
127
|
-
callback_timeout = nil,
|
128
|
-
answer_fallback_url = nil,
|
129
|
-
answer_fallback_method = nil,
|
130
|
-
disconnect_url = nil,
|
131
|
-
username = nil,
|
132
|
-
password = nil,
|
133
|
-
fallback_username = nil,
|
134
|
-
fallback_password = nil,
|
135
|
-
tag = nil)
|
136
|
-
@account_id = account_id
|
137
|
-
@call_id = call_id
|
138
|
-
@application_id = application_id
|
139
|
-
@to = to
|
140
|
-
@from = from
|
141
|
-
@start_time = start_time
|
142
|
-
@call_url = call_url
|
143
|
-
@call_timeout = call_timeout
|
144
|
-
@callback_timeout = callback_timeout
|
145
|
-
@answer_url = answer_url
|
146
|
-
@answer_method = answer_method
|
147
|
-
@answer_fallback_url = answer_fallback_url
|
148
|
-
@answer_fallback_method = answer_fallback_method
|
149
|
-
@disconnect_url = disconnect_url
|
150
|
-
@disconnect_method = disconnect_method
|
151
|
-
@username = username
|
152
|
-
@password = password
|
153
|
-
@fallback_username = fallback_username
|
154
|
-
@fallback_password = fallback_password
|
155
|
-
@tag = tag
|
156
|
-
end
|
157
|
-
|
158
|
-
# Creates an instance of the object from a hash.
|
159
|
-
def self.from_hash(hash)
|
160
|
-
return nil unless hash
|
161
|
-
|
162
|
-
# Extract variables from the hash.
|
163
|
-
account_id = hash['accountId']
|
164
|
-
call_id = hash['callId']
|
165
|
-
application_id = hash['applicationId']
|
166
|
-
to = hash['to']
|
167
|
-
from = hash['from']
|
168
|
-
call_url = hash['callUrl']
|
169
|
-
answer_url = hash['answerUrl']
|
170
|
-
answer_method = hash['answerMethod']
|
171
|
-
disconnect_method = hash['disconnectMethod']
|
172
|
-
start_time = APIHelper.rfc3339(hash['startTime']) if hash['startTime']
|
173
|
-
call_timeout = hash['callTimeout']
|
174
|
-
callback_timeout = hash['callbackTimeout']
|
175
|
-
answer_fallback_url = hash['answerFallbackUrl']
|
176
|
-
answer_fallback_method = hash['answerFallbackMethod']
|
177
|
-
disconnect_url = hash['disconnectUrl']
|
178
|
-
username = hash['username']
|
179
|
-
password = hash['password']
|
180
|
-
fallback_username = hash['fallbackUsername']
|
181
|
-
fallback_password = hash['fallbackPassword']
|
182
|
-
tag = hash['tag']
|
183
|
-
|
184
|
-
# Create object from extracted values.
|
185
|
-
ApiCallResponse.new(account_id,
|
186
|
-
call_id,
|
187
|
-
application_id,
|
188
|
-
to,
|
189
|
-
from,
|
190
|
-
call_url,
|
191
|
-
answer_url,
|
192
|
-
answer_method,
|
193
|
-
disconnect_method,
|
194
|
-
start_time,
|
195
|
-
call_timeout,
|
196
|
-
callback_timeout,
|
197
|
-
answer_fallback_url,
|
198
|
-
answer_fallback_method,
|
199
|
-
disconnect_url,
|
200
|
-
username,
|
201
|
-
password,
|
202
|
-
fallback_username,
|
203
|
-
fallback_password,
|
204
|
-
tag)
|
205
|
-
end
|
206
|
-
end
|
207
|
-
end
|
@@ -1,164 +0,0 @@
|
|
1
|
-
# bandwidth
|
2
|
-
#
|
3
|
-
# This file was automatically generated by APIMATIC v2.0
|
4
|
-
# ( https://apimatic.io ).
|
5
|
-
|
6
|
-
require 'date'
|
7
|
-
module Bandwidth
|
8
|
-
# ApiCallStateResponse Model.
|
9
|
-
class ApiCallStateResponse < BaseModel
|
10
|
-
# TODO: Write general description for this method
|
11
|
-
# @return [String]
|
12
|
-
attr_accessor :call_id
|
13
|
-
|
14
|
-
# TODO: Write general description for this method
|
15
|
-
# @return [String]
|
16
|
-
attr_accessor :parent_call_id
|
17
|
-
|
18
|
-
# TODO: Write general description for this method
|
19
|
-
# @return [String]
|
20
|
-
attr_accessor :application_id
|
21
|
-
|
22
|
-
# TODO: Write general description for this method
|
23
|
-
# @return [String]
|
24
|
-
attr_accessor :account_id
|
25
|
-
|
26
|
-
# TODO: Write general description for this method
|
27
|
-
# @return [String]
|
28
|
-
attr_accessor :to
|
29
|
-
|
30
|
-
# TODO: Write general description for this method
|
31
|
-
# @return [String]
|
32
|
-
attr_accessor :from
|
33
|
-
|
34
|
-
# TODO: Write general description for this method
|
35
|
-
# @return [String]
|
36
|
-
attr_accessor :direction
|
37
|
-
|
38
|
-
# TODO: Write general description for this method
|
39
|
-
# @return [StateEnum]
|
40
|
-
attr_accessor :state
|
41
|
-
|
42
|
-
# TODO: Write general description for this method
|
43
|
-
# @return [DateTime]
|
44
|
-
attr_accessor :start_time
|
45
|
-
|
46
|
-
# TODO: Write general description for this method
|
47
|
-
# @return [DateTime]
|
48
|
-
attr_accessor :answer_time
|
49
|
-
|
50
|
-
# TODO: Write general description for this method
|
51
|
-
# @return [DateTime]
|
52
|
-
attr_accessor :end_time
|
53
|
-
|
54
|
-
# TODO: Write general description for this method
|
55
|
-
# @return [DisconnectCauseEnum]
|
56
|
-
attr_accessor :disconnect_cause
|
57
|
-
|
58
|
-
# TODO: Write general description for this method
|
59
|
-
# @return [String]
|
60
|
-
attr_accessor :error_message
|
61
|
-
|
62
|
-
# TODO: Write general description for this method
|
63
|
-
# @return [String]
|
64
|
-
attr_accessor :error_id
|
65
|
-
|
66
|
-
# TODO: Write general description for this method
|
67
|
-
# @return [DateTime]
|
68
|
-
attr_accessor :last_update
|
69
|
-
|
70
|
-
# A mapping from model property names to API property names.
|
71
|
-
def self.names
|
72
|
-
@_hash = {} if @_hash.nil?
|
73
|
-
@_hash['call_id'] = 'callId'
|
74
|
-
@_hash['parent_call_id'] = 'parentCallId'
|
75
|
-
@_hash['application_id'] = 'applicationId'
|
76
|
-
@_hash['account_id'] = 'accountId'
|
77
|
-
@_hash['to'] = 'to'
|
78
|
-
@_hash['from'] = 'from'
|
79
|
-
@_hash['direction'] = 'direction'
|
80
|
-
@_hash['state'] = 'state'
|
81
|
-
@_hash['start_time'] = 'startTime'
|
82
|
-
@_hash['answer_time'] = 'answerTime'
|
83
|
-
@_hash['end_time'] = 'endTime'
|
84
|
-
@_hash['disconnect_cause'] = 'disconnectCause'
|
85
|
-
@_hash['error_message'] = 'errorMessage'
|
86
|
-
@_hash['error_id'] = 'errorId'
|
87
|
-
@_hash['last_update'] = 'lastUpdate'
|
88
|
-
@_hash
|
89
|
-
end
|
90
|
-
|
91
|
-
def initialize(call_id = nil,
|
92
|
-
parent_call_id = nil,
|
93
|
-
application_id = nil,
|
94
|
-
account_id = nil,
|
95
|
-
to = nil,
|
96
|
-
from = nil,
|
97
|
-
direction = nil,
|
98
|
-
state = nil,
|
99
|
-
start_time = nil,
|
100
|
-
answer_time = nil,
|
101
|
-
end_time = nil,
|
102
|
-
disconnect_cause = nil,
|
103
|
-
error_message = nil,
|
104
|
-
error_id = nil,
|
105
|
-
last_update = nil)
|
106
|
-
@call_id = call_id
|
107
|
-
@parent_call_id = parent_call_id
|
108
|
-
@application_id = application_id
|
109
|
-
@account_id = account_id
|
110
|
-
@to = to
|
111
|
-
@from = from
|
112
|
-
@direction = direction
|
113
|
-
@state = state
|
114
|
-
@start_time = start_time
|
115
|
-
@answer_time = answer_time
|
116
|
-
@end_time = end_time
|
117
|
-
@disconnect_cause = disconnect_cause
|
118
|
-
@error_message = error_message
|
119
|
-
@error_id = error_id
|
120
|
-
@last_update = last_update
|
121
|
-
end
|
122
|
-
|
123
|
-
# Creates an instance of the object from a hash.
|
124
|
-
def self.from_hash(hash)
|
125
|
-
return nil unless hash
|
126
|
-
|
127
|
-
# Extract variables from the hash.
|
128
|
-
call_id = hash['callId']
|
129
|
-
parent_call_id = hash['parentCallId']
|
130
|
-
application_id = hash['applicationId']
|
131
|
-
account_id = hash['accountId']
|
132
|
-
to = hash['to']
|
133
|
-
from = hash['from']
|
134
|
-
direction = hash['direction']
|
135
|
-
state = hash['state']
|
136
|
-
start_time = APIHelper.rfc3339(hash['startTime']) if hash['startTime']
|
137
|
-
answer_time = APIHelper.rfc3339(hash['answerTime']) if
|
138
|
-
hash['answerTime']
|
139
|
-
end_time = APIHelper.rfc3339(hash['endTime']) if hash['endTime']
|
140
|
-
disconnect_cause = hash['disconnectCause']
|
141
|
-
error_message = hash['errorMessage']
|
142
|
-
error_id = hash['errorId']
|
143
|
-
last_update = APIHelper.rfc3339(hash['lastUpdate']) if
|
144
|
-
hash['lastUpdate']
|
145
|
-
|
146
|
-
# Create object from extracted values.
|
147
|
-
ApiCallStateResponse.new(call_id,
|
148
|
-
parent_call_id,
|
149
|
-
application_id,
|
150
|
-
account_id,
|
151
|
-
to,
|
152
|
-
from,
|
153
|
-
direction,
|
154
|
-
state,
|
155
|
-
start_time,
|
156
|
-
answer_time,
|
157
|
-
end_time,
|
158
|
-
disconnect_cause,
|
159
|
-
error_message,
|
160
|
-
error_id,
|
161
|
-
last_update)
|
162
|
-
end
|
163
|
-
end
|
164
|
-
end
|
@@ -1,248 +0,0 @@
|
|
1
|
-
# bandwidth
|
2
|
-
#
|
3
|
-
# This file was automatically generated by APIMATIC v2.0
|
4
|
-
# ( https://apimatic.io ).
|
5
|
-
|
6
|
-
module Bandwidth
|
7
|
-
# ApiCreateCallRequest Model.
|
8
|
-
class ApiCreateCallRequest < BaseModel
|
9
|
-
# Format is E164
|
10
|
-
# @return [String]
|
11
|
-
attr_accessor :from
|
12
|
-
|
13
|
-
# Format is E164 or SIP URI
|
14
|
-
# @return [String]
|
15
|
-
attr_accessor :to
|
16
|
-
|
17
|
-
# When calling a SIP URI, this will be sent as the 'User-To-User' header
|
18
|
-
# within the initial INVITE. An 'encoding' parameter must be specified as
|
19
|
-
# described in https://tools.ietf.org/html/rfc7433. This header cannot
|
20
|
-
# exceed 256 characters, including the encoding parameter.
|
21
|
-
# @return [String]
|
22
|
-
attr_accessor :uui
|
23
|
-
|
24
|
-
# When calling a SIP URI, this will be sent as the 'User-To-User' header
|
25
|
-
# within the initial INVITE. An 'encoding' parameter must be specified as
|
26
|
-
# described in https://tools.ietf.org/html/rfc7433. This header cannot
|
27
|
-
# exceed 256 characters, including the encoding parameter.
|
28
|
-
# @return [Float]
|
29
|
-
attr_accessor :call_timeout
|
30
|
-
|
31
|
-
# When calling a SIP URI, this will be sent as the 'User-To-User' header
|
32
|
-
# within the initial INVITE. An 'encoding' parameter must be specified as
|
33
|
-
# described in https://tools.ietf.org/html/rfc7433. This header cannot
|
34
|
-
# exceed 256 characters, including the encoding parameter.
|
35
|
-
# @return [Float]
|
36
|
-
attr_accessor :callback_timeout
|
37
|
-
|
38
|
-
# When calling a SIP URI, this will be sent as the 'User-To-User' header
|
39
|
-
# within the initial INVITE. An 'encoding' parameter must be specified as
|
40
|
-
# described in https://tools.ietf.org/html/rfc7433. This header cannot
|
41
|
-
# exceed 256 characters, including the encoding parameter.
|
42
|
-
# @return [String]
|
43
|
-
attr_accessor :answer_url
|
44
|
-
|
45
|
-
# When calling a SIP URI, this will be sent as the 'User-To-User' header
|
46
|
-
# within the initial INVITE. An 'encoding' parameter must be specified as
|
47
|
-
# described in https://tools.ietf.org/html/rfc7433. This header cannot
|
48
|
-
# exceed 256 characters, including the encoding parameter.
|
49
|
-
# @return [String]
|
50
|
-
attr_accessor :answer_fallback_url
|
51
|
-
|
52
|
-
# When calling a SIP URI, this will be sent as the 'User-To-User' header
|
53
|
-
# within the initial INVITE. An 'encoding' parameter must be specified as
|
54
|
-
# described in https://tools.ietf.org/html/rfc7433. This header cannot
|
55
|
-
# exceed 256 characters, including the encoding parameter.
|
56
|
-
# @return [String]
|
57
|
-
attr_accessor :username
|
58
|
-
|
59
|
-
# When calling a SIP URI, this will be sent as the 'User-To-User' header
|
60
|
-
# within the initial INVITE. An 'encoding' parameter must be specified as
|
61
|
-
# described in https://tools.ietf.org/html/rfc7433. This header cannot
|
62
|
-
# exceed 256 characters, including the encoding parameter.
|
63
|
-
# @return [String]
|
64
|
-
attr_accessor :password
|
65
|
-
|
66
|
-
# When calling a SIP URI, this will be sent as the 'User-To-User' header
|
67
|
-
# within the initial INVITE. An 'encoding' parameter must be specified as
|
68
|
-
# described in https://tools.ietf.org/html/rfc7433. This header cannot
|
69
|
-
# exceed 256 characters, including the encoding parameter.
|
70
|
-
# @return [String]
|
71
|
-
attr_accessor :fallback_username
|
72
|
-
|
73
|
-
# When calling a SIP URI, this will be sent as the 'User-To-User' header
|
74
|
-
# within the initial INVITE. An 'encoding' parameter must be specified as
|
75
|
-
# described in https://tools.ietf.org/html/rfc7433. This header cannot
|
76
|
-
# exceed 256 characters, including the encoding parameter.
|
77
|
-
# @return [String]
|
78
|
-
attr_accessor :fallback_password
|
79
|
-
|
80
|
-
# When calling a SIP URI, this will be sent as the 'User-To-User' header
|
81
|
-
# within the initial INVITE. An 'encoding' parameter must be specified as
|
82
|
-
# described in https://tools.ietf.org/html/rfc7433. This header cannot
|
83
|
-
# exceed 256 characters, including the encoding parameter.
|
84
|
-
# @return [AnswerMethodEnum]
|
85
|
-
attr_accessor :answer_method
|
86
|
-
|
87
|
-
# When calling a SIP URI, this will be sent as the 'User-To-User' header
|
88
|
-
# within the initial INVITE. An 'encoding' parameter must be specified as
|
89
|
-
# described in https://tools.ietf.org/html/rfc7433. This header cannot
|
90
|
-
# exceed 256 characters, including the encoding parameter.
|
91
|
-
# @return [AnswerFallbackMethodEnum]
|
92
|
-
attr_accessor :answer_fallback_method
|
93
|
-
|
94
|
-
# When calling a SIP URI, this will be sent as the 'User-To-User' header
|
95
|
-
# within the initial INVITE. An 'encoding' parameter must be specified as
|
96
|
-
# described in https://tools.ietf.org/html/rfc7433. This header cannot
|
97
|
-
# exceed 256 characters, including the encoding parameter.
|
98
|
-
# @return [String]
|
99
|
-
attr_accessor :disconnect_url
|
100
|
-
|
101
|
-
# When calling a SIP URI, this will be sent as the 'User-To-User' header
|
102
|
-
# within the initial INVITE. An 'encoding' parameter must be specified as
|
103
|
-
# described in https://tools.ietf.org/html/rfc7433. This header cannot
|
104
|
-
# exceed 256 characters, including the encoding parameter.
|
105
|
-
# @return [DisconnectMethodEnum]
|
106
|
-
attr_accessor :disconnect_method
|
107
|
-
|
108
|
-
# When calling a SIP URI, this will be sent as the 'User-To-User' header
|
109
|
-
# within the initial INVITE. An 'encoding' parameter must be specified as
|
110
|
-
# described in https://tools.ietf.org/html/rfc7433. This header cannot
|
111
|
-
# exceed 256 characters, including the encoding parameter.
|
112
|
-
# @return [String]
|
113
|
-
attr_accessor :tag
|
114
|
-
|
115
|
-
# When calling a SIP URI, this will be sent as the 'User-To-User' header
|
116
|
-
# within the initial INVITE. An 'encoding' parameter must be specified as
|
117
|
-
# described in https://tools.ietf.org/html/rfc7433. This header cannot
|
118
|
-
# exceed 256 characters, including the encoding parameter.
|
119
|
-
# @return [String]
|
120
|
-
attr_accessor :application_id
|
121
|
-
|
122
|
-
# When calling a SIP URI, this will be sent as the 'User-To-User' header
|
123
|
-
# within the initial INVITE. An 'encoding' parameter must be specified as
|
124
|
-
# described in https://tools.ietf.org/html/rfc7433. This header cannot
|
125
|
-
# exceed 256 characters, including the encoding parameter.
|
126
|
-
# @return [String]
|
127
|
-
attr_accessor :obfuscated_to
|
128
|
-
|
129
|
-
# When calling a SIP URI, this will be sent as the 'User-To-User' header
|
130
|
-
# within the initial INVITE. An 'encoding' parameter must be specified as
|
131
|
-
# described in https://tools.ietf.org/html/rfc7433. This header cannot
|
132
|
-
# exceed 256 characters, including the encoding parameter.
|
133
|
-
# @return [String]
|
134
|
-
attr_accessor :obfuscated_from
|
135
|
-
|
136
|
-
# A mapping from model property names to API property names.
|
137
|
-
def self.names
|
138
|
-
@_hash = {} if @_hash.nil?
|
139
|
-
@_hash['from'] = 'from'
|
140
|
-
@_hash['to'] = 'to'
|
141
|
-
@_hash['uui'] = 'uui'
|
142
|
-
@_hash['call_timeout'] = 'callTimeout'
|
143
|
-
@_hash['callback_timeout'] = 'callbackTimeout'
|
144
|
-
@_hash['answer_url'] = 'answerUrl'
|
145
|
-
@_hash['answer_fallback_url'] = 'answerFallbackUrl'
|
146
|
-
@_hash['username'] = 'username'
|
147
|
-
@_hash['password'] = 'password'
|
148
|
-
@_hash['fallback_username'] = 'fallbackUsername'
|
149
|
-
@_hash['fallback_password'] = 'fallbackPassword'
|
150
|
-
@_hash['answer_method'] = 'answerMethod'
|
151
|
-
@_hash['answer_fallback_method'] = 'answerFallbackMethod'
|
152
|
-
@_hash['disconnect_url'] = 'disconnectUrl'
|
153
|
-
@_hash['disconnect_method'] = 'disconnectMethod'
|
154
|
-
@_hash['tag'] = 'tag'
|
155
|
-
@_hash['application_id'] = 'applicationId'
|
156
|
-
@_hash['obfuscated_to'] = 'obfuscatedTo'
|
157
|
-
@_hash['obfuscated_from'] = 'obfuscatedFrom'
|
158
|
-
@_hash
|
159
|
-
end
|
160
|
-
|
161
|
-
def initialize(from = nil,
|
162
|
-
to = nil,
|
163
|
-
answer_url = nil,
|
164
|
-
application_id = nil,
|
165
|
-
uui = nil,
|
166
|
-
call_timeout = nil,
|
167
|
-
callback_timeout = nil,
|
168
|
-
answer_fallback_url = nil,
|
169
|
-
username = nil,
|
170
|
-
password = nil,
|
171
|
-
fallback_username = nil,
|
172
|
-
fallback_password = nil,
|
173
|
-
answer_method = nil,
|
174
|
-
answer_fallback_method = nil,
|
175
|
-
disconnect_url = nil,
|
176
|
-
disconnect_method = nil,
|
177
|
-
tag = nil,
|
178
|
-
obfuscated_to = nil,
|
179
|
-
obfuscated_from = nil)
|
180
|
-
@from = from
|
181
|
-
@to = to
|
182
|
-
@uui = uui
|
183
|
-
@call_timeout = call_timeout
|
184
|
-
@callback_timeout = callback_timeout
|
185
|
-
@answer_url = answer_url
|
186
|
-
@answer_fallback_url = answer_fallback_url
|
187
|
-
@username = username
|
188
|
-
@password = password
|
189
|
-
@fallback_username = fallback_username
|
190
|
-
@fallback_password = fallback_password
|
191
|
-
@answer_method = answer_method
|
192
|
-
@answer_fallback_method = answer_fallback_method
|
193
|
-
@disconnect_url = disconnect_url
|
194
|
-
@disconnect_method = disconnect_method
|
195
|
-
@tag = tag
|
196
|
-
@application_id = application_id
|
197
|
-
@obfuscated_to = obfuscated_to
|
198
|
-
@obfuscated_from = obfuscated_from
|
199
|
-
end
|
200
|
-
|
201
|
-
# Creates an instance of the object from a hash.
|
202
|
-
def self.from_hash(hash)
|
203
|
-
return nil unless hash
|
204
|
-
|
205
|
-
# Extract variables from the hash.
|
206
|
-
from = hash['from']
|
207
|
-
to = hash['to']
|
208
|
-
answer_url = hash['answerUrl']
|
209
|
-
application_id = hash['applicationId']
|
210
|
-
uui = hash['uui']
|
211
|
-
call_timeout = hash['callTimeout']
|
212
|
-
callback_timeout = hash['callbackTimeout']
|
213
|
-
answer_fallback_url = hash['answerFallbackUrl']
|
214
|
-
username = hash['username']
|
215
|
-
password = hash['password']
|
216
|
-
fallback_username = hash['fallbackUsername']
|
217
|
-
fallback_password = hash['fallbackPassword']
|
218
|
-
answer_method = hash['answerMethod']
|
219
|
-
answer_fallback_method = hash['answerFallbackMethod']
|
220
|
-
disconnect_url = hash['disconnectUrl']
|
221
|
-
disconnect_method = hash['disconnectMethod']
|
222
|
-
tag = hash['tag']
|
223
|
-
obfuscated_to = hash['obfuscatedTo']
|
224
|
-
obfuscated_from = hash['obfuscatedFrom']
|
225
|
-
|
226
|
-
# Create object from extracted values.
|
227
|
-
ApiCreateCallRequest.new(from,
|
228
|
-
to,
|
229
|
-
answer_url,
|
230
|
-
application_id,
|
231
|
-
uui,
|
232
|
-
call_timeout,
|
233
|
-
callback_timeout,
|
234
|
-
answer_fallback_url,
|
235
|
-
username,
|
236
|
-
password,
|
237
|
-
fallback_username,
|
238
|
-
fallback_password,
|
239
|
-
answer_method,
|
240
|
-
answer_fallback_method,
|
241
|
-
disconnect_url,
|
242
|
-
disconnect_method,
|
243
|
-
tag,
|
244
|
-
obfuscated_to,
|
245
|
-
obfuscated_from)
|
246
|
-
end
|
247
|
-
end
|
248
|
-
end
|