bandwidth-sdk 3.9.0 → 3.13.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.rb +24 -1
- data/lib/bandwidth/client.rb +2 -0
- data/lib/bandwidth/configuration.rb +23 -4
- data/lib/bandwidth/messaging_lib/messaging/client.rb +2 -0
- data/lib/bandwidth/messaging_lib/messaging/controllers/base_controller.rb +1 -1
- data/lib/bandwidth/two_factor_auth_lib/two_factor_auth/client.rb +2 -0
- data/lib/bandwidth/two_factor_auth_lib/two_factor_auth/controllers/base_controller.rb +1 -1
- data/lib/bandwidth/voice_lib/bxml/verbs/bridge.rb +7 -1
- data/lib/bandwidth/voice_lib/bxml/verbs/conference.rb +5 -1
- data/lib/bandwidth/voice_lib/bxml/verbs/gather.rb +5 -1
- data/lib/bandwidth/voice_lib/bxml/verbs/phone_number.rb +5 -1
- data/lib/bandwidth/voice_lib/bxml/verbs/record.rb +5 -1
- data/lib/bandwidth/voice_lib/bxml/verbs/redirect.rb +5 -1
- data/lib/bandwidth/voice_lib/bxml/verbs/ring.rb +15 -0
- data/lib/bandwidth/voice_lib/bxml/verbs/sip_uri.rb +25 -0
- data/lib/bandwidth/voice_lib/bxml/verbs/start_gather.rb +20 -0
- data/lib/bandwidth/voice_lib/bxml/verbs/stop_gather.rb +14 -0
- data/lib/bandwidth/voice_lib/bxml/verbs/tag.rb +13 -0
- data/lib/bandwidth/voice_lib/bxml/verbs/transfer.rb +8 -1
- data/lib/bandwidth/voice_lib/voice.rb +2 -0
- data/lib/bandwidth/voice_lib/voice/client.rb +2 -0
- data/lib/bandwidth/voice_lib/voice/controllers/base_controller.rb +1 -1
- data/lib/bandwidth/voice_lib/voice/models/answer_fallback_method_enum.rb +17 -0
- data/lib/bandwidth/voice_lib/voice/models/api_call_response.rb +45 -0
- data/lib/bandwidth/voice_lib/voice/models/api_create_call_request.rb +45 -0
- data/lib/bandwidth/voice_lib/voice/models/api_modify_call_request.rb +36 -0
- data/lib/bandwidth/voice_lib/voice/models/api_transcribe_recording_request.rb +11 -2
- data/lib/bandwidth/voice_lib/voice/models/call_engine_modify_conference_request.rb +38 -2
- data/lib/bandwidth/voice_lib/voice/models/conference_detail.rb +7 -4
- data/lib/bandwidth/voice_lib/voice/models/conference_recording_metadata_response.rb +5 -4
- data/lib/bandwidth/voice_lib/voice/models/recording_metadata_response.rb +5 -4
- data/lib/bandwidth/voice_lib/voice/models/redirect_fallback_method_enum.rb +17 -0
- data/lib/bandwidth/voice_lib/voice/models/state_enum.rb +3 -3
- data/lib/bandwidth/web_rtc_lib/utils/web_rtc_transfer.rb +13 -0
- data/lib/bandwidth/web_rtc_lib/web_rtc/client.rb +2 -0
- data/lib/bandwidth/web_rtc_lib/web_rtc/controllers/base_controller.rb +1 -1
- metadata +11 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ed15d4c81ec792633ad41f4679425c1d1f3e57df7a83d8bc58def8b2a4812efa
|
4
|
+
data.tar.gz: b189ea95d1312ff6b2e6285fb94635744a6c0bb97f721a05537792196fc8d57c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 26963cb02c3572ed72702842c4544a9bbf9a88cc81854a25ae1024701fe49fc416df7b2a9a206ca3a7942e2a886b027e7b79903f9da940f0861d7dea083368ec
|
7
|
+
data.tar.gz: 30ac145418345e06cfdfcbe692c03ab974eef7494fe7120b7a37a13d8f06716093eab4f52aaac7ff8530dfe5b7baae1ccca67e5b68590f56f4539af91f61980b
|
data/lib/bandwidth.rb
CHANGED
@@ -42,4 +42,27 @@ require_relative 'bandwidth/http/auth/voice_basic_auth.rb'
|
|
42
42
|
require_relative 'bandwidth/web_rtc_lib/web_rtc'
|
43
43
|
require_relative 'bandwidth/http/auth/web_rtc_basic_auth.rb'
|
44
44
|
|
45
|
-
#
|
45
|
+
# External Files
|
46
|
+
require_relative 'bandwidth/voice_lib/bxml/bxml.rb'
|
47
|
+
require_relative 'bandwidth/voice_lib/bxml/verbs/bridge.rb'
|
48
|
+
require_relative 'bandwidth/voice_lib/bxml/verbs/conference.rb'
|
49
|
+
require_relative 'bandwidth/voice_lib/bxml/verbs/forward.rb'
|
50
|
+
require_relative 'bandwidth/voice_lib/bxml/verbs/gather.rb'
|
51
|
+
require_relative 'bandwidth/voice_lib/bxml/verbs/hangup.rb'
|
52
|
+
require_relative 'bandwidth/voice_lib/bxml/verbs/pause.rb'
|
53
|
+
require_relative 'bandwidth/voice_lib/bxml/verbs/pause_recording.rb'
|
54
|
+
require_relative 'bandwidth/voice_lib/bxml/verbs/phone_number.rb'
|
55
|
+
require_relative 'bandwidth/voice_lib/bxml/verbs/play_audio.rb'
|
56
|
+
require_relative 'bandwidth/voice_lib/bxml/verbs/record.rb'
|
57
|
+
require_relative 'bandwidth/voice_lib/bxml/verbs/redirect.rb'
|
58
|
+
require_relative 'bandwidth/voice_lib/bxml/verbs/resume_recording.rb'
|
59
|
+
require_relative 'bandwidth/voice_lib/bxml/verbs/ring.rb'
|
60
|
+
require_relative 'bandwidth/voice_lib/bxml/verbs/send_dtmf.rb'
|
61
|
+
require_relative 'bandwidth/voice_lib/bxml/verbs/speak_sentence.rb'
|
62
|
+
require_relative 'bandwidth/voice_lib/bxml/verbs/start_gather.rb'
|
63
|
+
require_relative 'bandwidth/voice_lib/bxml/verbs/start_recording.rb'
|
64
|
+
require_relative 'bandwidth/voice_lib/bxml/verbs/stop_gather.rb'
|
65
|
+
require_relative 'bandwidth/voice_lib/bxml/verbs/stop_recording.rb'
|
66
|
+
require_relative 'bandwidth/voice_lib/bxml/verbs/transfer.rb'
|
67
|
+
require_relative 'bandwidth/voice_lib/bxml/verbs/xml_verb.rb'
|
68
|
+
require_relative 'bandwidth/web_rtc_lib/utils/web_rtc_transfer.rb'
|
data/lib/bandwidth/client.rb
CHANGED
@@ -30,6 +30,7 @@ module Bandwidth
|
|
30
30
|
|
31
31
|
def initialize(timeout: 60, max_retries: 0, retry_interval: 1,
|
32
32
|
backoff_factor: 1, environment: Environment::PRODUCTION,
|
33
|
+
base_url: 'https://www.example.com',
|
33
34
|
messaging_basic_auth_user_name: 'TODO: Replace',
|
34
35
|
messaging_basic_auth_password: 'TODO: Replace',
|
35
36
|
two_factor_auth_basic_auth_user_name: 'TODO: Replace',
|
@@ -43,6 +44,7 @@ module Bandwidth
|
|
43
44
|
retry_interval: retry_interval,
|
44
45
|
backoff_factor: backoff_factor,
|
45
46
|
environment: environment,
|
47
|
+
base_url: base_url,
|
46
48
|
messaging_basic_auth_user_name: messaging_basic_auth_user_name,
|
47
49
|
messaging_basic_auth_password: messaging_basic_auth_password,
|
48
50
|
two_factor_auth_basic_auth_user_name: two_factor_auth_basic_auth_user_name,
|
@@ -7,7 +7,8 @@ module Bandwidth
|
|
7
7
|
# An enum for SDK environments.
|
8
8
|
class Environment
|
9
9
|
ENVIRONMENT = [
|
10
|
-
PRODUCTION = 'production'.freeze
|
10
|
+
PRODUCTION = 'production'.freeze,
|
11
|
+
CUSTOM = 'custom'.freeze
|
11
12
|
].freeze
|
12
13
|
end
|
13
14
|
|
@@ -32,6 +33,7 @@ module Bandwidth
|
|
32
33
|
attr_reader :retry_interval
|
33
34
|
attr_reader :backoff_factor
|
34
35
|
attr_reader :environment
|
36
|
+
attr_reader :base_url
|
35
37
|
attr_reader :messaging_basic_auth_user_name
|
36
38
|
attr_reader :messaging_basic_auth_password
|
37
39
|
attr_reader :two_factor_auth_basic_auth_user_name
|
@@ -47,6 +49,7 @@ module Bandwidth
|
|
47
49
|
|
48
50
|
def initialize(timeout: 60, max_retries: 0, retry_interval: 1,
|
49
51
|
backoff_factor: 1, environment: Environment::PRODUCTION,
|
52
|
+
base_url: 'https://www.example.com',
|
50
53
|
messaging_basic_auth_user_name: 'TODO: Replace',
|
51
54
|
messaging_basic_auth_password: 'TODO: Replace',
|
52
55
|
two_factor_auth_basic_auth_user_name: 'TODO: Replace',
|
@@ -71,6 +74,9 @@ module Bandwidth
|
|
71
74
|
# Current API environment
|
72
75
|
@environment = String(environment)
|
73
76
|
|
77
|
+
# baseUrl value
|
78
|
+
@base_url = base_url
|
79
|
+
|
74
80
|
# The username to use with basic authentication
|
75
81
|
@messaging_basic_auth_user_name = messaging_basic_auth_user_name
|
76
82
|
|
@@ -100,7 +106,7 @@ module Bandwidth
|
|
100
106
|
end
|
101
107
|
|
102
108
|
def clone_with(timeout: nil, max_retries: nil, retry_interval: nil,
|
103
|
-
backoff_factor: nil, environment: nil,
|
109
|
+
backoff_factor: nil, environment: nil, base_url: nil,
|
104
110
|
messaging_basic_auth_user_name: nil,
|
105
111
|
messaging_basic_auth_password: nil,
|
106
112
|
two_factor_auth_basic_auth_user_name: nil,
|
@@ -114,6 +120,7 @@ module Bandwidth
|
|
114
120
|
retry_interval ||= self.retry_interval
|
115
121
|
backoff_factor ||= self.backoff_factor
|
116
122
|
environment ||= self.environment
|
123
|
+
base_url ||= self.base_url
|
117
124
|
messaging_basic_auth_user_name ||= self.messaging_basic_auth_user_name
|
118
125
|
messaging_basic_auth_password ||= self.messaging_basic_auth_password
|
119
126
|
two_factor_auth_basic_auth_user_name ||= self.two_factor_auth_basic_auth_user_name
|
@@ -126,7 +133,7 @@ module Bandwidth
|
|
126
133
|
Configuration.new(
|
127
134
|
timeout: timeout, max_retries: max_retries,
|
128
135
|
retry_interval: retry_interval, backoff_factor: backoff_factor,
|
129
|
-
environment: environment,
|
136
|
+
environment: environment, base_url: base_url,
|
130
137
|
messaging_basic_auth_user_name: messaging_basic_auth_user_name,
|
131
138
|
messaging_basic_auth_password: messaging_basic_auth_password,
|
132
139
|
two_factor_auth_basic_auth_user_name: two_factor_auth_basic_auth_user_name,
|
@@ -152,6 +159,13 @@ module Bandwidth
|
|
152
159
|
Server::TWOFACTORAUTHDEFAULT => 'https://mfa.bandwidth.com/api/v1/',
|
153
160
|
Server::VOICEDEFAULT => 'https://voice.bandwidth.com',
|
154
161
|
Server::WEBRTCDEFAULT => 'https://api.webrtc.bandwidth.com/v1'
|
162
|
+
},
|
163
|
+
Environment::CUSTOM => {
|
164
|
+
Server::DEFAULT => '{base_url}',
|
165
|
+
Server::MESSAGINGDEFAULT => '{base_url}',
|
166
|
+
Server::TWOFACTORAUTHDEFAULT => '{base_url}',
|
167
|
+
Server::VOICEDEFAULT => '{base_url}',
|
168
|
+
Server::WEBRTCDEFAULT => '{base_url}'
|
155
169
|
}
|
156
170
|
}.freeze
|
157
171
|
|
@@ -160,7 +174,12 @@ module Bandwidth
|
|
160
174
|
# required.
|
161
175
|
# @return [String] The base URI.
|
162
176
|
def get_base_uri(server = Server::DEFAULT)
|
163
|
-
|
177
|
+
parameters = {
|
178
|
+
'base_url' => { 'value' => base_url, 'encode' => false }
|
179
|
+
}
|
180
|
+
APIHelper.append_url_with_template_parameters(
|
181
|
+
ENVIRONMENTS[environment][server], parameters
|
182
|
+
)
|
164
183
|
end
|
165
184
|
end
|
166
185
|
end
|
@@ -17,6 +17,7 @@ module Bandwidth
|
|
17
17
|
|
18
18
|
def initialize(timeout: 60, max_retries: 0, retry_interval: 1,
|
19
19
|
backoff_factor: 1, environment: Environment::PRODUCTION,
|
20
|
+
base_url: 'https://www.example.com',
|
20
21
|
messaging_basic_auth_user_name: 'TODO: Replace',
|
21
22
|
messaging_basic_auth_password: 'TODO: Replace',
|
22
23
|
two_factor_auth_basic_auth_user_name: 'TODO: Replace',
|
@@ -32,6 +33,7 @@ module Bandwidth
|
|
32
33
|
retry_interval: retry_interval,
|
33
34
|
backoff_factor: backoff_factor,
|
34
35
|
environment: environment,
|
36
|
+
base_url: base_url,
|
35
37
|
messaging_basic_auth_user_name: messaging_basic_auth_user_name,
|
36
38
|
messaging_basic_auth_password: messaging_basic_auth_password,
|
37
39
|
two_factor_auth_basic_auth_user_name: two_factor_auth_basic_auth_user_name,
|
@@ -17,6 +17,7 @@ module Bandwidth
|
|
17
17
|
|
18
18
|
def initialize(timeout: 60, max_retries: 0, retry_interval: 1,
|
19
19
|
backoff_factor: 1, environment: Environment::PRODUCTION,
|
20
|
+
base_url: 'https://www.example.com',
|
20
21
|
messaging_basic_auth_user_name: 'TODO: Replace',
|
21
22
|
messaging_basic_auth_password: 'TODO: Replace',
|
22
23
|
two_factor_auth_basic_auth_user_name: 'TODO: Replace',
|
@@ -32,6 +33,7 @@ module Bandwidth
|
|
32
33
|
retry_interval: retry_interval,
|
33
34
|
backoff_factor: backoff_factor,
|
34
35
|
environment: environment,
|
36
|
+
base_url: base_url,
|
35
37
|
messaging_basic_auth_user_name: messaging_basic_auth_user_name,
|
36
38
|
messaging_basic_auth_password: messaging_basic_auth_password,
|
37
39
|
two_factor_auth_basic_auth_user_name: two_factor_auth_basic_auth_user_name,
|
@@ -14,7 +14,13 @@ module Bandwidth
|
|
14
14
|
'bridgeTargetCompleteMethod' => bridge_target_complete_method,
|
15
15
|
'username' => username,
|
16
16
|
'password' => password,
|
17
|
-
'tag' => tag
|
17
|
+
'tag' => tag,
|
18
|
+
'bridgeCompleteFallbackUrl' => bridge_complete_fallback_url,
|
19
|
+
'bridgeCompleteFallbackMethod' => bridge_complete_fallback_method,
|
20
|
+
'bridgeTargetCompleteFallbackUrl' => bridge_target_complete_fallback_url,
|
21
|
+
'bridgeTargetCompleteFallbackMethod' => bridge_target_complete_fallback_method,
|
22
|
+
'fallbackUsername' => fallback_username,
|
23
|
+
'fallbackPassword' => fallback_password
|
18
24
|
}))
|
19
25
|
end
|
20
26
|
end
|
@@ -20,7 +20,11 @@ module Bandwidth
|
|
20
20
|
'conferenceEventMethod' => conference_event_method,
|
21
21
|
'username' => username,
|
22
22
|
'password' => password,
|
23
|
-
'tag' => tag
|
23
|
+
'tag' => tag,
|
24
|
+
'conferenceEventFallbackUrl' => conference_event_fallback_url,
|
25
|
+
'conferenceEventFallbackMethod' => conference_event_fallback_method,
|
26
|
+
'fallbackUsername' => fallback_username,
|
27
|
+
'fallbackPassword' => fallback_password
|
24
28
|
}))
|
25
29
|
end
|
26
30
|
end
|
@@ -17,7 +17,11 @@ module Bandwidth
|
|
17
17
|
'username' => username,
|
18
18
|
'password' => password,
|
19
19
|
'firstDigitTimeout' => first_digit_timeout,
|
20
|
-
'repeatCount' => repeat_count
|
20
|
+
'repeatCount' => repeat_count,
|
21
|
+
'gatherFallbackUrl' => gather_fallback_url,
|
22
|
+
'gatherFallbackMethod' => gather_fallback_method,
|
23
|
+
'fallbackUsername' => fallback_username,
|
24
|
+
'fallbackPassword' => fallback_password
|
21
25
|
})) do
|
22
26
|
def embedded_xml(xml, property, type)
|
23
27
|
if property
|
@@ -12,7 +12,11 @@ module Bandwidth
|
|
12
12
|
'transferDisconnectMethod' => transfer_disconnect_method,
|
13
13
|
'username' => username,
|
14
14
|
'password' => password,
|
15
|
-
'tag' => tag
|
15
|
+
'tag' => tag,
|
16
|
+
'transferAnswerFallbackUrl' => transfer_answer_fallback_url,
|
17
|
+
'transferAnswerFallbackMethod' => transfer_answer_fallback_method,
|
18
|
+
'fallbackUsername' => fallback_username,
|
19
|
+
'fallbackPassword' => fallback_password
|
16
20
|
}))
|
17
21
|
end
|
18
22
|
end
|
@@ -21,7 +21,11 @@ module Bandwidth
|
|
21
21
|
'transcribe' => transcribe,
|
22
22
|
'transcriptionAvailableUrl' => transcription_available_url,
|
23
23
|
'transcriptionAvailableMethod' => transcription_available_method,
|
24
|
-
'silenceTimeout' => silence_timeout
|
24
|
+
'silenceTimeout' => silence_timeout,
|
25
|
+
'recordCompleteFallbackUrl' => record_complete_fallback_url,
|
26
|
+
'recordCompleteFallbackMethod' => record_complete_fallback_method,
|
27
|
+
'fallbackUsername' => fallback_username,
|
28
|
+
'fallbackPassword' => fallback_password
|
25
29
|
}))
|
26
30
|
end
|
27
31
|
end
|
@@ -12,7 +12,11 @@ module Bandwidth
|
|
12
12
|
'redirectMethod' => redirect_method,
|
13
13
|
'tag' => tag,
|
14
14
|
'username' => username,
|
15
|
-
'password' => password
|
15
|
+
'password' => password,
|
16
|
+
'redirectFallbackUrl' => redirect_fallback_url,
|
17
|
+
'redirectFallbackMethod' => redirect_fallback_method,
|
18
|
+
'fallbackUsername' => fallback_username,
|
19
|
+
'fallbackPassword' => fallback_password
|
16
20
|
}))
|
17
21
|
end
|
18
22
|
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require_relative 'xml_verb'
|
2
|
+
|
3
|
+
module Bandwidth
|
4
|
+
module Voice
|
5
|
+
class SipUri
|
6
|
+
include XmlVerb
|
7
|
+
def to_bxml(xml)
|
8
|
+
xml.SipUri(uri, compact_hash({
|
9
|
+
'transferAnswerUrl' => transfer_answer_url,
|
10
|
+
'transferAnswerMethod' => transfer_answer_method,
|
11
|
+
'transferDisconnectUrl' => transfer_disconnect_url,
|
12
|
+
'transferDisconnectMethod' => transfer_disconnect_method,
|
13
|
+
'username' => username,
|
14
|
+
'password' => password,
|
15
|
+
'tag' => tag,
|
16
|
+
'uui' => uui,
|
17
|
+
'transferAnswerFallbackUrl' => transfer_answer_fallback_url,
|
18
|
+
'transferAnswerFallbackMethod' => transfer_answer_fallback_method,
|
19
|
+
'fallbackUsername' => fallback_username,
|
20
|
+
'fallbackPassword' => fallback_password
|
21
|
+
}))
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require_relative 'xml_verb'
|
2
|
+
|
3
|
+
module Bandwidth
|
4
|
+
module Voice
|
5
|
+
# The StartGather verb is used to start a gather
|
6
|
+
class StartGather
|
7
|
+
include XmlVerb
|
8
|
+
|
9
|
+
def to_bxml(xml)
|
10
|
+
xml.StartGather(compact_hash({
|
11
|
+
'username' => username,
|
12
|
+
'password' => password,
|
13
|
+
'tag' => tag,
|
14
|
+
'dtmfUrl' => dtmf_url,
|
15
|
+
'dtmfMethod' => dtmf_method,
|
16
|
+
}))
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -16,7 +16,11 @@ module Bandwidth
|
|
16
16
|
'username' => username,
|
17
17
|
'password' => password,
|
18
18
|
'diversionTreatment' => diversion_treatment,
|
19
|
-
'diversionReason' => diversion_reason
|
19
|
+
'diversionReason' => diversion_reason,
|
20
|
+
'transferCompleteFallbackUrl' => transfer_complete_fallback_url,
|
21
|
+
'transferCompleteFallbackMethod' => transfer_complete_fallback_method,
|
22
|
+
'fallbackUsername' => fallback_username,
|
23
|
+
'fallbackPassword' => fallback_password
|
20
24
|
})) do
|
21
25
|
def embedded_xml(xml, property, type)
|
22
26
|
if property
|
@@ -30,6 +34,9 @@ module Bandwidth
|
|
30
34
|
phone_numbers.each do |number|
|
31
35
|
embedded_xml(xml, number, PhoneNumber)
|
32
36
|
end
|
37
|
+
sip_uris.each do |sip_uri|
|
38
|
+
embedded_xml(xml, sip_uri, SipUri)
|
39
|
+
end
|
33
40
|
end
|
34
41
|
end
|
35
42
|
end
|
@@ -21,6 +21,7 @@ require_relative 'voice/models/recording_metadata_response.rb'
|
|
21
21
|
require_relative 'voice/models/transcript.rb'
|
22
22
|
require_relative 'voice/models/transcription.rb'
|
23
23
|
require_relative 'voice/models/transcription_response.rb'
|
24
|
+
require_relative 'voice/models/answer_fallback_method_enum.rb'
|
24
25
|
require_relative 'voice/models/answer_method_enum.rb'
|
25
26
|
require_relative 'voice/models/callback_method_enum.rb'
|
26
27
|
require_relative 'voice/models/conference_event_method_enum.rb'
|
@@ -28,6 +29,7 @@ require_relative 'voice/models/direction_enum.rb'
|
|
28
29
|
require_relative 'voice/models/disconnect_cause_enum.rb'
|
29
30
|
require_relative 'voice/models/disconnect_method_enum.rb'
|
30
31
|
require_relative 'voice/models/file_format_enum.rb'
|
32
|
+
require_relative 'voice/models/redirect_fallback_method_enum.rb'
|
31
33
|
require_relative 'voice/models/redirect_method_enum.rb'
|
32
34
|
require_relative 'voice/models/state_enum.rb'
|
33
35
|
require_relative 'voice/models/state1_enum.rb'
|
@@ -17,6 +17,7 @@ module Bandwidth
|
|
17
17
|
|
18
18
|
def initialize(timeout: 60, max_retries: 0, retry_interval: 1,
|
19
19
|
backoff_factor: 1, environment: Environment::PRODUCTION,
|
20
|
+
base_url: 'https://www.example.com',
|
20
21
|
messaging_basic_auth_user_name: 'TODO: Replace',
|
21
22
|
messaging_basic_auth_password: 'TODO: Replace',
|
22
23
|
two_factor_auth_basic_auth_user_name: 'TODO: Replace',
|
@@ -32,6 +33,7 @@ module Bandwidth
|
|
32
33
|
retry_interval: retry_interval,
|
33
34
|
backoff_factor: backoff_factor,
|
34
35
|
environment: environment,
|
36
|
+
base_url: base_url,
|
35
37
|
messaging_basic_auth_user_name: messaging_basic_auth_user_name,
|
36
38
|
messaging_basic_auth_password: messaging_basic_auth_password,
|
37
39
|
two_factor_auth_basic_auth_user_name: two_factor_auth_basic_auth_user_name,
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# bandwidth
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module Bandwidth
|
7
|
+
# AnswerFallbackMethod.
|
8
|
+
class AnswerFallbackMethodEnum
|
9
|
+
ANSWER_FALLBACK_METHOD_ENUM = [
|
10
|
+
# TODO: Write general description for POST
|
11
|
+
POST = 'POST'.freeze,
|
12
|
+
|
13
|
+
# TODO: Write general description for GET
|
14
|
+
GET = 'GET'.freeze
|
15
|
+
].freeze
|
16
|
+
end
|
17
|
+
end
|
@@ -39,6 +39,10 @@ module Bandwidth
|
|
39
39
|
# @return [Float]
|
40
40
|
attr_accessor :call_timeout
|
41
41
|
|
42
|
+
# TODO: Write general description for this method
|
43
|
+
# @return [Float]
|
44
|
+
attr_accessor :callback_timeout
|
45
|
+
|
42
46
|
# TODO: Write general description for this method
|
43
47
|
# @return [String]
|
44
48
|
attr_accessor :answer_url
|
@@ -47,6 +51,14 @@ module Bandwidth
|
|
47
51
|
# @return [AnswerMethodEnum]
|
48
52
|
attr_accessor :answer_method
|
49
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
|
+
|
50
62
|
# TODO: Write general description for this method
|
51
63
|
# @return [String]
|
52
64
|
attr_accessor :disconnect_url
|
@@ -63,6 +75,14 @@ module Bandwidth
|
|
63
75
|
# @return [String]
|
64
76
|
attr_accessor :password
|
65
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
|
+
|
66
86
|
# TODO: Write general description for this method
|
67
87
|
# @return [String]
|
68
88
|
attr_accessor :tag
|
@@ -78,12 +98,17 @@ module Bandwidth
|
|
78
98
|
@_hash['start_time'] = 'startTime'
|
79
99
|
@_hash['call_url'] = 'callUrl'
|
80
100
|
@_hash['call_timeout'] = 'callTimeout'
|
101
|
+
@_hash['callback_timeout'] = 'callbackTimeout'
|
81
102
|
@_hash['answer_url'] = 'answerUrl'
|
82
103
|
@_hash['answer_method'] = 'answerMethod'
|
104
|
+
@_hash['answer_fallback_url'] = 'answerFallbackUrl'
|
105
|
+
@_hash['answer_fallback_method'] = 'answerFallbackMethod'
|
83
106
|
@_hash['disconnect_url'] = 'disconnectUrl'
|
84
107
|
@_hash['disconnect_method'] = 'disconnectMethod'
|
85
108
|
@_hash['username'] = 'username'
|
86
109
|
@_hash['password'] = 'password'
|
110
|
+
@_hash['fallback_username'] = 'fallbackUsername'
|
111
|
+
@_hash['fallback_password'] = 'fallbackPassword'
|
87
112
|
@_hash['tag'] = 'tag'
|
88
113
|
@_hash
|
89
114
|
end
|
@@ -99,9 +124,14 @@ module Bandwidth
|
|
99
124
|
disconnect_method = nil,
|
100
125
|
start_time = nil,
|
101
126
|
call_timeout = nil,
|
127
|
+
callback_timeout = nil,
|
128
|
+
answer_fallback_url = nil,
|
129
|
+
answer_fallback_method = nil,
|
102
130
|
disconnect_url = nil,
|
103
131
|
username = nil,
|
104
132
|
password = nil,
|
133
|
+
fallback_username = nil,
|
134
|
+
fallback_password = nil,
|
105
135
|
tag = nil)
|
106
136
|
@account_id = account_id
|
107
137
|
@call_id = call_id
|
@@ -111,12 +141,17 @@ module Bandwidth
|
|
111
141
|
@start_time = start_time
|
112
142
|
@call_url = call_url
|
113
143
|
@call_timeout = call_timeout
|
144
|
+
@callback_timeout = callback_timeout
|
114
145
|
@answer_url = answer_url
|
115
146
|
@answer_method = answer_method
|
147
|
+
@answer_fallback_url = answer_fallback_url
|
148
|
+
@answer_fallback_method = answer_fallback_method
|
116
149
|
@disconnect_url = disconnect_url
|
117
150
|
@disconnect_method = disconnect_method
|
118
151
|
@username = username
|
119
152
|
@password = password
|
153
|
+
@fallback_username = fallback_username
|
154
|
+
@fallback_password = fallback_password
|
120
155
|
@tag = tag
|
121
156
|
end
|
122
157
|
|
@@ -136,9 +171,14 @@ module Bandwidth
|
|
136
171
|
disconnect_method = hash['disconnectMethod']
|
137
172
|
start_time = APIHelper.rfc3339(hash['startTime']) if hash['startTime']
|
138
173
|
call_timeout = hash['callTimeout']
|
174
|
+
callback_timeout = hash['callbackTimeout']
|
175
|
+
answer_fallback_url = hash['answerFallbackUrl']
|
176
|
+
answer_fallback_method = hash['answerFallbackMethod']
|
139
177
|
disconnect_url = hash['disconnectUrl']
|
140
178
|
username = hash['username']
|
141
179
|
password = hash['password']
|
180
|
+
fallback_username = hash['fallbackUsername']
|
181
|
+
fallback_password = hash['fallbackPassword']
|
142
182
|
tag = hash['tag']
|
143
183
|
|
144
184
|
# Create object from extracted values.
|
@@ -153,9 +193,14 @@ module Bandwidth
|
|
153
193
|
disconnect_method,
|
154
194
|
start_time,
|
155
195
|
call_timeout,
|
196
|
+
callback_timeout,
|
197
|
+
answer_fallback_url,
|
198
|
+
answer_fallback_method,
|
156
199
|
disconnect_url,
|
157
200
|
username,
|
158
201
|
password,
|
202
|
+
fallback_username,
|
203
|
+
fallback_password,
|
159
204
|
tag)
|
160
205
|
end
|
161
206
|
end
|
@@ -18,10 +18,18 @@ module Bandwidth
|
|
18
18
|
# @return [Float]
|
19
19
|
attr_accessor :call_timeout
|
20
20
|
|
21
|
+
# Format is E164
|
22
|
+
# @return [Float]
|
23
|
+
attr_accessor :callback_timeout
|
24
|
+
|
21
25
|
# Format is E164
|
22
26
|
# @return [String]
|
23
27
|
attr_accessor :answer_url
|
24
28
|
|
29
|
+
# Format is E164
|
30
|
+
# @return [String]
|
31
|
+
attr_accessor :answer_fallback_url
|
32
|
+
|
25
33
|
# Format is E164
|
26
34
|
# @return [String]
|
27
35
|
attr_accessor :username
|
@@ -30,10 +38,22 @@ module Bandwidth
|
|
30
38
|
# @return [String]
|
31
39
|
attr_accessor :password
|
32
40
|
|
41
|
+
# Format is E164
|
42
|
+
# @return [String]
|
43
|
+
attr_accessor :fallback_username
|
44
|
+
|
45
|
+
# Format is E164
|
46
|
+
# @return [String]
|
47
|
+
attr_accessor :fallback_password
|
48
|
+
|
33
49
|
# Format is E164
|
34
50
|
# @return [AnswerMethodEnum]
|
35
51
|
attr_accessor :answer_method
|
36
52
|
|
53
|
+
# Format is E164
|
54
|
+
# @return [AnswerFallbackMethodEnum]
|
55
|
+
attr_accessor :answer_fallback_method
|
56
|
+
|
37
57
|
# Format is E164
|
38
58
|
# @return [String]
|
39
59
|
attr_accessor :disconnect_url
|
@@ -64,10 +84,15 @@ module Bandwidth
|
|
64
84
|
@_hash['from'] = 'from'
|
65
85
|
@_hash['to'] = 'to'
|
66
86
|
@_hash['call_timeout'] = 'callTimeout'
|
87
|
+
@_hash['callback_timeout'] = 'callbackTimeout'
|
67
88
|
@_hash['answer_url'] = 'answerUrl'
|
89
|
+
@_hash['answer_fallback_url'] = 'answerFallbackUrl'
|
68
90
|
@_hash['username'] = 'username'
|
69
91
|
@_hash['password'] = 'password'
|
92
|
+
@_hash['fallback_username'] = 'fallbackUsername'
|
93
|
+
@_hash['fallback_password'] = 'fallbackPassword'
|
70
94
|
@_hash['answer_method'] = 'answerMethod'
|
95
|
+
@_hash['answer_fallback_method'] = 'answerFallbackMethod'
|
71
96
|
@_hash['disconnect_url'] = 'disconnectUrl'
|
72
97
|
@_hash['disconnect_method'] = 'disconnectMethod'
|
73
98
|
@_hash['tag'] = 'tag'
|
@@ -82,9 +107,14 @@ module Bandwidth
|
|
82
107
|
answer_url = nil,
|
83
108
|
application_id = nil,
|
84
109
|
call_timeout = nil,
|
110
|
+
callback_timeout = nil,
|
111
|
+
answer_fallback_url = nil,
|
85
112
|
username = nil,
|
86
113
|
password = nil,
|
114
|
+
fallback_username = nil,
|
115
|
+
fallback_password = nil,
|
87
116
|
answer_method = nil,
|
117
|
+
answer_fallback_method = nil,
|
88
118
|
disconnect_url = nil,
|
89
119
|
disconnect_method = nil,
|
90
120
|
tag = nil,
|
@@ -93,10 +123,15 @@ module Bandwidth
|
|
93
123
|
@from = from
|
94
124
|
@to = to
|
95
125
|
@call_timeout = call_timeout
|
126
|
+
@callback_timeout = callback_timeout
|
96
127
|
@answer_url = answer_url
|
128
|
+
@answer_fallback_url = answer_fallback_url
|
97
129
|
@username = username
|
98
130
|
@password = password
|
131
|
+
@fallback_username = fallback_username
|
132
|
+
@fallback_password = fallback_password
|
99
133
|
@answer_method = answer_method
|
134
|
+
@answer_fallback_method = answer_fallback_method
|
100
135
|
@disconnect_url = disconnect_url
|
101
136
|
@disconnect_method = disconnect_method
|
102
137
|
@tag = tag
|
@@ -115,9 +150,14 @@ module Bandwidth
|
|
115
150
|
answer_url = hash['answerUrl']
|
116
151
|
application_id = hash['applicationId']
|
117
152
|
call_timeout = hash['callTimeout']
|
153
|
+
callback_timeout = hash['callbackTimeout']
|
154
|
+
answer_fallback_url = hash['answerFallbackUrl']
|
118
155
|
username = hash['username']
|
119
156
|
password = hash['password']
|
157
|
+
fallback_username = hash['fallbackUsername']
|
158
|
+
fallback_password = hash['fallbackPassword']
|
120
159
|
answer_method = hash['answerMethod']
|
160
|
+
answer_fallback_method = hash['answerFallbackMethod']
|
121
161
|
disconnect_url = hash['disconnectUrl']
|
122
162
|
disconnect_method = hash['disconnectMethod']
|
123
163
|
tag = hash['tag']
|
@@ -130,9 +170,14 @@ module Bandwidth
|
|
130
170
|
answer_url,
|
131
171
|
application_id,
|
132
172
|
call_timeout,
|
173
|
+
callback_timeout,
|
174
|
+
answer_fallback_url,
|
133
175
|
username,
|
134
176
|
password,
|
177
|
+
fallback_username,
|
178
|
+
fallback_password,
|
135
179
|
answer_method,
|
180
|
+
answer_fallback_method,
|
136
181
|
disconnect_url,
|
137
182
|
disconnect_method,
|
138
183
|
tag,
|
@@ -14,10 +14,18 @@ module Bandwidth
|
|
14
14
|
# @return [String]
|
15
15
|
attr_accessor :redirect_url
|
16
16
|
|
17
|
+
# TODO: Write general description for this method
|
18
|
+
# @return [String]
|
19
|
+
attr_accessor :redirect_fallback_url
|
20
|
+
|
17
21
|
# TODO: Write general description for this method
|
18
22
|
# @return [RedirectMethodEnum]
|
19
23
|
attr_accessor :redirect_method
|
20
24
|
|
25
|
+
# TODO: Write general description for this method
|
26
|
+
# @return [RedirectFallbackMethodEnum]
|
27
|
+
attr_accessor :redirect_fallback_method
|
28
|
+
|
21
29
|
# TODO: Write general description for this method
|
22
30
|
# @return [String]
|
23
31
|
attr_accessor :username
|
@@ -26,6 +34,14 @@ module Bandwidth
|
|
26
34
|
# @return [String]
|
27
35
|
attr_accessor :password
|
28
36
|
|
37
|
+
# TODO: Write general description for this method
|
38
|
+
# @return [String]
|
39
|
+
attr_accessor :fallback_username
|
40
|
+
|
41
|
+
# TODO: Write general description for this method
|
42
|
+
# @return [String]
|
43
|
+
attr_accessor :fallback_password
|
44
|
+
|
29
45
|
# TODO: Write general description for this method
|
30
46
|
# @return [String]
|
31
47
|
attr_accessor :tag
|
@@ -35,24 +51,36 @@ module Bandwidth
|
|
35
51
|
@_hash = {} if @_hash.nil?
|
36
52
|
@_hash['state'] = 'state'
|
37
53
|
@_hash['redirect_url'] = 'redirectUrl'
|
54
|
+
@_hash['redirect_fallback_url'] = 'redirectFallbackUrl'
|
38
55
|
@_hash['redirect_method'] = 'redirectMethod'
|
56
|
+
@_hash['redirect_fallback_method'] = 'redirectFallbackMethod'
|
39
57
|
@_hash['username'] = 'username'
|
40
58
|
@_hash['password'] = 'password'
|
59
|
+
@_hash['fallback_username'] = 'fallbackUsername'
|
60
|
+
@_hash['fallback_password'] = 'fallbackPassword'
|
41
61
|
@_hash['tag'] = 'tag'
|
42
62
|
@_hash
|
43
63
|
end
|
44
64
|
|
45
65
|
def initialize(redirect_url = nil,
|
46
66
|
state = nil,
|
67
|
+
redirect_fallback_url = nil,
|
47
68
|
redirect_method = nil,
|
69
|
+
redirect_fallback_method = nil,
|
48
70
|
username = nil,
|
49
71
|
password = nil,
|
72
|
+
fallback_username = nil,
|
73
|
+
fallback_password = nil,
|
50
74
|
tag = nil)
|
51
75
|
@state = state
|
52
76
|
@redirect_url = redirect_url
|
77
|
+
@redirect_fallback_url = redirect_fallback_url
|
53
78
|
@redirect_method = redirect_method
|
79
|
+
@redirect_fallback_method = redirect_fallback_method
|
54
80
|
@username = username
|
55
81
|
@password = password
|
82
|
+
@fallback_username = fallback_username
|
83
|
+
@fallback_password = fallback_password
|
56
84
|
@tag = tag
|
57
85
|
end
|
58
86
|
|
@@ -63,17 +91,25 @@ module Bandwidth
|
|
63
91
|
# Extract variables from the hash.
|
64
92
|
redirect_url = hash['redirectUrl']
|
65
93
|
state = hash['state']
|
94
|
+
redirect_fallback_url = hash['redirectFallbackUrl']
|
66
95
|
redirect_method = hash['redirectMethod']
|
96
|
+
redirect_fallback_method = hash['redirectFallbackMethod']
|
67
97
|
username = hash['username']
|
68
98
|
password = hash['password']
|
99
|
+
fallback_username = hash['fallbackUsername']
|
100
|
+
fallback_password = hash['fallbackPassword']
|
69
101
|
tag = hash['tag']
|
70
102
|
|
71
103
|
# Create object from extracted values.
|
72
104
|
ApiModifyCallRequest.new(redirect_url,
|
73
105
|
state,
|
106
|
+
redirect_fallback_url,
|
74
107
|
redirect_method,
|
108
|
+
redirect_fallback_method,
|
75
109
|
username,
|
76
110
|
password,
|
111
|
+
fallback_username,
|
112
|
+
fallback_password,
|
77
113
|
tag)
|
78
114
|
end
|
79
115
|
end
|
@@ -26,6 +26,10 @@ module Bandwidth
|
|
26
26
|
# @return [String]
|
27
27
|
attr_accessor :tag
|
28
28
|
|
29
|
+
# TODO: Write general description for this method
|
30
|
+
# @return [Float]
|
31
|
+
attr_accessor :callback_timeout
|
32
|
+
|
29
33
|
# A mapping from model property names to API property names.
|
30
34
|
def self.names
|
31
35
|
@_hash = {} if @_hash.nil?
|
@@ -34,6 +38,7 @@ module Bandwidth
|
|
34
38
|
@_hash['username'] = 'username'
|
35
39
|
@_hash['password'] = 'password'
|
36
40
|
@_hash['tag'] = 'tag'
|
41
|
+
@_hash['callback_timeout'] = 'callbackTimeout'
|
37
42
|
@_hash
|
38
43
|
end
|
39
44
|
|
@@ -41,12 +46,14 @@ module Bandwidth
|
|
41
46
|
callback_method = nil,
|
42
47
|
username = nil,
|
43
48
|
password = nil,
|
44
|
-
tag = nil
|
49
|
+
tag = nil,
|
50
|
+
callback_timeout = nil)
|
45
51
|
@callback_url = callback_url
|
46
52
|
@callback_method = callback_method
|
47
53
|
@username = username
|
48
54
|
@password = password
|
49
55
|
@tag = tag
|
56
|
+
@callback_timeout = callback_timeout
|
50
57
|
end
|
51
58
|
|
52
59
|
# Creates an instance of the object from a hash.
|
@@ -59,13 +66,15 @@ module Bandwidth
|
|
59
66
|
username = hash['username']
|
60
67
|
password = hash['password']
|
61
68
|
tag = hash['tag']
|
69
|
+
callback_timeout = hash['callbackTimeout']
|
62
70
|
|
63
71
|
# Create object from extracted values.
|
64
72
|
ApiTranscribeRecordingRequest.new(callback_url,
|
65
73
|
callback_method,
|
66
74
|
username,
|
67
75
|
password,
|
68
|
-
tag
|
76
|
+
tag,
|
77
|
+
callback_timeout)
|
69
78
|
end
|
70
79
|
end
|
71
80
|
end
|
@@ -14,10 +14,18 @@ module Bandwidth
|
|
14
14
|
# @return [String]
|
15
15
|
attr_accessor :redirect_url
|
16
16
|
|
17
|
+
# TODO: Write general description for this method
|
18
|
+
# @return [String]
|
19
|
+
attr_accessor :redirect_fallback_url
|
20
|
+
|
17
21
|
# TODO: Write general description for this method
|
18
22
|
# @return [RedirectMethodEnum]
|
19
23
|
attr_accessor :redirect_method
|
20
24
|
|
25
|
+
# TODO: Write general description for this method
|
26
|
+
# @return [RedirectFallbackMethodEnum]
|
27
|
+
attr_accessor :redirect_fallback_method
|
28
|
+
|
21
29
|
# TODO: Write general description for this method
|
22
30
|
# @return [String]
|
23
31
|
attr_accessor :username
|
@@ -26,27 +34,47 @@ module Bandwidth
|
|
26
34
|
# @return [String]
|
27
35
|
attr_accessor :password
|
28
36
|
|
37
|
+
# TODO: Write general description for this method
|
38
|
+
# @return [String]
|
39
|
+
attr_accessor :fallback_username
|
40
|
+
|
41
|
+
# TODO: Write general description for this method
|
42
|
+
# @return [String]
|
43
|
+
attr_accessor :fallback_password
|
44
|
+
|
29
45
|
# A mapping from model property names to API property names.
|
30
46
|
def self.names
|
31
47
|
@_hash = {} if @_hash.nil?
|
32
48
|
@_hash['status'] = 'status'
|
33
49
|
@_hash['redirect_url'] = 'redirectUrl'
|
50
|
+
@_hash['redirect_fallback_url'] = 'redirectFallbackUrl'
|
34
51
|
@_hash['redirect_method'] = 'redirectMethod'
|
52
|
+
@_hash['redirect_fallback_method'] = 'redirectFallbackMethod'
|
35
53
|
@_hash['username'] = 'username'
|
36
54
|
@_hash['password'] = 'password'
|
55
|
+
@_hash['fallback_username'] = 'fallbackUsername'
|
56
|
+
@_hash['fallback_password'] = 'fallbackPassword'
|
37
57
|
@_hash
|
38
58
|
end
|
39
59
|
|
40
60
|
def initialize(redirect_url = nil,
|
41
61
|
status = nil,
|
62
|
+
redirect_fallback_url = nil,
|
42
63
|
redirect_method = nil,
|
64
|
+
redirect_fallback_method = nil,
|
43
65
|
username = nil,
|
44
|
-
password = nil
|
66
|
+
password = nil,
|
67
|
+
fallback_username = nil,
|
68
|
+
fallback_password = nil)
|
45
69
|
@status = status
|
46
70
|
@redirect_url = redirect_url
|
71
|
+
@redirect_fallback_url = redirect_fallback_url
|
47
72
|
@redirect_method = redirect_method
|
73
|
+
@redirect_fallback_method = redirect_fallback_method
|
48
74
|
@username = username
|
49
75
|
@password = password
|
76
|
+
@fallback_username = fallback_username
|
77
|
+
@fallback_password = fallback_password
|
50
78
|
end
|
51
79
|
|
52
80
|
# Creates an instance of the object from a hash.
|
@@ -56,16 +84,24 @@ module Bandwidth
|
|
56
84
|
# Extract variables from the hash.
|
57
85
|
redirect_url = hash['redirectUrl']
|
58
86
|
status = hash['status']
|
87
|
+
redirect_fallback_url = hash['redirectFallbackUrl']
|
59
88
|
redirect_method = hash['redirectMethod']
|
89
|
+
redirect_fallback_method = hash['redirectFallbackMethod']
|
60
90
|
username = hash['username']
|
61
91
|
password = hash['password']
|
92
|
+
fallback_username = hash['fallbackUsername']
|
93
|
+
fallback_password = hash['fallbackPassword']
|
62
94
|
|
63
95
|
# Create object from extracted values.
|
64
96
|
CallEngineModifyConferenceRequest.new(redirect_url,
|
65
97
|
status,
|
98
|
+
redirect_fallback_url,
|
66
99
|
redirect_method,
|
100
|
+
redirect_fallback_method,
|
67
101
|
username,
|
68
|
-
password
|
102
|
+
password,
|
103
|
+
fallback_username,
|
104
|
+
fallback_password)
|
69
105
|
end
|
70
106
|
end
|
71
107
|
end
|
@@ -3,6 +3,7 @@
|
|
3
3
|
# This file was automatically generated by APIMATIC v2.0
|
4
4
|
# ( https://apimatic.io ).
|
5
5
|
|
6
|
+
require 'date'
|
6
7
|
module Bandwidth
|
7
8
|
# ConferenceDetail Model.
|
8
9
|
class ConferenceDetail < BaseModel
|
@@ -15,11 +16,11 @@ module Bandwidth
|
|
15
16
|
attr_accessor :name
|
16
17
|
|
17
18
|
# TODO: Write general description for this method
|
18
|
-
# @return [
|
19
|
+
# @return [DateTime]
|
19
20
|
attr_accessor :created_time
|
20
21
|
|
21
22
|
# TODO: Write general description for this method
|
22
|
-
# @return [
|
23
|
+
# @return [DateTime]
|
23
24
|
attr_accessor :completed_time
|
24
25
|
|
25
26
|
# TODO: Write general description for this method
|
@@ -77,8 +78,10 @@ module Bandwidth
|
|
77
78
|
# Extract variables from the hash.
|
78
79
|
id = hash['id']
|
79
80
|
name = hash['name']
|
80
|
-
created_time = hash['createdTime']
|
81
|
-
|
81
|
+
created_time = APIHelper.rfc3339(hash['createdTime']) if
|
82
|
+
hash['createdTime']
|
83
|
+
completed_time = APIHelper.rfc3339(hash['completedTime']) if
|
84
|
+
hash['completedTime']
|
82
85
|
conference_event_url = hash['conferenceEventUrl']
|
83
86
|
conference_event_method = hash['conferenceEventMethod']
|
84
87
|
tag = hash['tag']
|
@@ -3,6 +3,7 @@
|
|
3
3
|
# This file was automatically generated by APIMATIC v2.0
|
4
4
|
# ( https://apimatic.io ).
|
5
5
|
|
6
|
+
require 'date'
|
6
7
|
module Bandwidth
|
7
8
|
# ConferenceRecordingMetadataResponse Model.
|
8
9
|
class ConferenceRecordingMetadataResponse < BaseModel
|
@@ -31,11 +32,11 @@ module Bandwidth
|
|
31
32
|
attr_accessor :channels
|
32
33
|
|
33
34
|
# Format is ISO-8601
|
34
|
-
# @return [
|
35
|
+
# @return [DateTime]
|
35
36
|
attr_accessor :start_time
|
36
37
|
|
37
38
|
# Format is ISO-8601
|
38
|
-
# @return [
|
39
|
+
# @return [DateTime]
|
39
40
|
attr_accessor :end_time
|
40
41
|
|
41
42
|
# Format is ISO-8601
|
@@ -102,8 +103,8 @@ module Bandwidth
|
|
102
103
|
recording_id = hash['recordingId']
|
103
104
|
duration = hash['duration']
|
104
105
|
channels = hash['channels']
|
105
|
-
start_time = hash['startTime']
|
106
|
-
end_time = hash['endTime']
|
106
|
+
start_time = APIHelper.rfc3339(hash['startTime']) if hash['startTime']
|
107
|
+
end_time = APIHelper.rfc3339(hash['endTime']) if hash['endTime']
|
107
108
|
file_format = hash['fileFormat']
|
108
109
|
status = hash['status']
|
109
110
|
media_url = hash['mediaUrl']
|
@@ -3,6 +3,7 @@
|
|
3
3
|
# This file was automatically generated by APIMATIC v2.0
|
4
4
|
# ( https://apimatic.io ).
|
5
5
|
|
6
|
+
require 'date'
|
6
7
|
module Bandwidth
|
7
8
|
# RecordingMetadataResponse Model.
|
8
9
|
class RecordingMetadataResponse < BaseModel
|
@@ -55,11 +56,11 @@ module Bandwidth
|
|
55
56
|
attr_accessor :channels
|
56
57
|
|
57
58
|
# Format is ISO-8601
|
58
|
-
# @return [
|
59
|
+
# @return [DateTime]
|
59
60
|
attr_accessor :start_time
|
60
61
|
|
61
62
|
# Format is ISO-8601
|
62
|
-
# @return [
|
63
|
+
# @return [DateTime]
|
63
64
|
attr_accessor :end_time
|
64
65
|
|
65
66
|
# Format is ISO-8601
|
@@ -157,8 +158,8 @@ module Bandwidth
|
|
157
158
|
duration = hash['duration']
|
158
159
|
direction = hash['direction']
|
159
160
|
channels = hash['channels']
|
160
|
-
start_time = hash['startTime']
|
161
|
-
end_time = hash['endTime']
|
161
|
+
start_time = APIHelper.rfc3339(hash['startTime']) if hash['startTime']
|
162
|
+
end_time = APIHelper.rfc3339(hash['endTime']) if hash['endTime']
|
162
163
|
file_format = hash['fileFormat']
|
163
164
|
status = hash['status']
|
164
165
|
media_url = hash['mediaUrl']
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# bandwidth
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module Bandwidth
|
7
|
+
# RedirectFallbackMethod.
|
8
|
+
class RedirectFallbackMethodEnum
|
9
|
+
REDIRECT_FALLBACK_METHOD_ENUM = [
|
10
|
+
# TODO: Write general description for POST
|
11
|
+
POST = 'POST'.freeze,
|
12
|
+
|
13
|
+
# TODO: Write general description for GET
|
14
|
+
GET = 'GET'.freeze
|
15
|
+
].freeze
|
16
|
+
end
|
17
|
+
end
|
@@ -8,13 +8,13 @@ module Bandwidth
|
|
8
8
|
class StateEnum
|
9
9
|
STATE_ENUM = [
|
10
10
|
# TODO: Write general description for DISCONNECTED
|
11
|
-
DISCONNECTED = '
|
11
|
+
DISCONNECTED = 'disconnected'.freeze,
|
12
12
|
|
13
13
|
# TODO: Write general description for ANSWERED
|
14
|
-
ANSWERED = '
|
14
|
+
ANSWERED = 'answered'.freeze,
|
15
15
|
|
16
16
|
# TODO: Write general description for INITIATED
|
17
|
-
INITIATED = '
|
17
|
+
INITIATED = 'initiated'.freeze
|
18
18
|
].freeze
|
19
19
|
end
|
20
20
|
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# web_rtc_transfer.rb
|
2
|
+
#
|
3
|
+
# Custom transfer BXML for WebRtc
|
4
|
+
#
|
5
|
+
# @copyright Bandwidth INC
|
6
|
+
|
7
|
+
module Bandwidth
|
8
|
+
module WebRtc
|
9
|
+
def generate_bxml(device_token, sip_uri="sip:sipx.webrtc.bandwidth.com:5060")
|
10
|
+
return '<?xml version="1.0" encoding="UTF-8"?><Response><Transfer><SipUri uui="%s;encoding=jwt">%s</SipUri></Transfer></Response>' % [device_token, sip_uri]
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -17,6 +17,7 @@ module Bandwidth
|
|
17
17
|
|
18
18
|
def initialize(timeout: 60, max_retries: 0, retry_interval: 1,
|
19
19
|
backoff_factor: 1, environment: Environment::PRODUCTION,
|
20
|
+
base_url: 'https://www.example.com',
|
20
21
|
messaging_basic_auth_user_name: 'TODO: Replace',
|
21
22
|
messaging_basic_auth_password: 'TODO: Replace',
|
22
23
|
two_factor_auth_basic_auth_user_name: 'TODO: Replace',
|
@@ -32,6 +33,7 @@ module Bandwidth
|
|
32
33
|
retry_interval: retry_interval,
|
33
34
|
backoff_factor: backoff_factor,
|
34
35
|
environment: environment,
|
36
|
+
base_url: base_url,
|
35
37
|
messaging_basic_auth_user_name: messaging_basic_auth_user_name,
|
36
38
|
messaging_basic_auth_password: messaging_basic_auth_password,
|
37
39
|
two_factor_auth_basic_auth_user_name: two_factor_auth_basic_auth_user_name,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bandwidth-sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.13.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- APIMatic SDK Generator
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-12-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: logging
|
@@ -166,10 +166,15 @@ files:
|
|
166
166
|
- lib/bandwidth/voice_lib/bxml/verbs/record.rb
|
167
167
|
- lib/bandwidth/voice_lib/bxml/verbs/redirect.rb
|
168
168
|
- lib/bandwidth/voice_lib/bxml/verbs/resume_recording.rb
|
169
|
+
- lib/bandwidth/voice_lib/bxml/verbs/ring.rb
|
169
170
|
- lib/bandwidth/voice_lib/bxml/verbs/send_dtmf.rb
|
171
|
+
- lib/bandwidth/voice_lib/bxml/verbs/sip_uri.rb
|
170
172
|
- lib/bandwidth/voice_lib/bxml/verbs/speak_sentence.rb
|
173
|
+
- lib/bandwidth/voice_lib/bxml/verbs/start_gather.rb
|
171
174
|
- lib/bandwidth/voice_lib/bxml/verbs/start_recording.rb
|
175
|
+
- lib/bandwidth/voice_lib/bxml/verbs/stop_gather.rb
|
172
176
|
- lib/bandwidth/voice_lib/bxml/verbs/stop_recording.rb
|
177
|
+
- lib/bandwidth/voice_lib/bxml/verbs/tag.rb
|
173
178
|
- lib/bandwidth/voice_lib/bxml/verbs/transfer.rb
|
174
179
|
- lib/bandwidth/voice_lib/bxml/verbs/xml_verb.rb
|
175
180
|
- lib/bandwidth/voice_lib/voice.rb
|
@@ -177,6 +182,7 @@ files:
|
|
177
182
|
- lib/bandwidth/voice_lib/voice/controllers/api_controller.rb
|
178
183
|
- lib/bandwidth/voice_lib/voice/controllers/base_controller.rb
|
179
184
|
- lib/bandwidth/voice_lib/voice/exceptions/api_error_response_exception.rb
|
185
|
+
- lib/bandwidth/voice_lib/voice/models/answer_fallback_method_enum.rb
|
180
186
|
- lib/bandwidth/voice_lib/voice/models/answer_method_enum.rb
|
181
187
|
- lib/bandwidth/voice_lib/voice/models/api_call_response.rb
|
182
188
|
- lib/bandwidth/voice_lib/voice/models/api_call_state_response.rb
|
@@ -195,6 +201,7 @@ files:
|
|
195
201
|
- lib/bandwidth/voice_lib/voice/models/file_format_enum.rb
|
196
202
|
- lib/bandwidth/voice_lib/voice/models/modify_call_recording_state.rb
|
197
203
|
- lib/bandwidth/voice_lib/voice/models/recording_metadata_response.rb
|
204
|
+
- lib/bandwidth/voice_lib/voice/models/redirect_fallback_method_enum.rb
|
198
205
|
- lib/bandwidth/voice_lib/voice/models/redirect_method_enum.rb
|
199
206
|
- lib/bandwidth/voice_lib/voice/models/state1_enum.rb
|
200
207
|
- lib/bandwidth/voice_lib/voice/models/state2_enum.rb
|
@@ -205,6 +212,7 @@ files:
|
|
205
212
|
- lib/bandwidth/voice_lib/voice/models/transcript.rb
|
206
213
|
- lib/bandwidth/voice_lib/voice/models/transcription.rb
|
207
214
|
- lib/bandwidth/voice_lib/voice/models/transcription_response.rb
|
215
|
+
- lib/bandwidth/web_rtc_lib/utils/web_rtc_transfer.rb
|
208
216
|
- lib/bandwidth/web_rtc_lib/web_rtc.rb
|
209
217
|
- lib/bandwidth/web_rtc_lib/web_rtc/client.rb
|
210
218
|
- lib/bandwidth/web_rtc_lib/web_rtc/controllers/api_controller.rb
|
@@ -235,7 +243,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
235
243
|
- !ruby/object:Gem::Version
|
236
244
|
version: '0'
|
237
245
|
requirements: []
|
238
|
-
rubygems_version: 3.1.
|
246
|
+
rubygems_version: 3.1.4
|
239
247
|
signing_key:
|
240
248
|
specification_version: 4
|
241
249
|
summary: bandwidth
|