bandwidth-sdk 6.2.0 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/bandwidth.rb +3 -2
- data/lib/bandwidth/api_helper.rb +0 -12
- data/lib/bandwidth/client.rb +8 -8
- data/lib/bandwidth/configuration.rb +15 -15
- data/lib/bandwidth/http/auth/{two_factor_auth_basic_auth.rb → multi_factor_auth_basic_auth.rb} +3 -3
- data/lib/bandwidth/messaging_lib/messaging/client.rb +14 -5
- data/lib/bandwidth/messaging_lib/messaging/controllers/api_controller.rb +25 -29
- data/lib/bandwidth/messaging_lib/messaging/models/bandwidth_message_item.rb +47 -2
- data/lib/bandwidth/messaging_lib/messaging/models/media.rb +5 -75
- data/lib/bandwidth/models/base_model.rb +19 -8
- data/lib/bandwidth/multi_factor_auth_lib/multi_factor_auth.rb +23 -0
- 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 +0 -0
- data/lib/bandwidth/{two_factor_auth_lib/two_factor_auth → multi_factor_auth_lib/multi_factor_auth}/controllers/mfa_controller.rb +7 -7
- data/lib/bandwidth/{two_factor_auth_lib/two_factor_auth → multi_factor_auth_lib/multi_factor_auth}/exceptions/error_with_request_exception.rb +0 -0
- data/lib/bandwidth/{two_factor_auth_lib/two_factor_auth → multi_factor_auth_lib/multi_factor_auth}/exceptions/forbidden_request_exception.rb +0 -0
- data/lib/bandwidth/{two_factor_auth_lib/two_factor_auth → multi_factor_auth_lib/multi_factor_auth}/exceptions/unauthorized_request_exception.rb +0 -0
- data/lib/bandwidth/{two_factor_auth_lib/two_factor_auth → multi_factor_auth_lib/multi_factor_auth}/models/two_factor_code_request_schema.rb +0 -0
- data/lib/bandwidth/{two_factor_auth_lib/two_factor_auth → multi_factor_auth_lib/multi_factor_auth}/models/two_factor_messaging_response.rb +0 -0
- data/lib/bandwidth/{two_factor_auth_lib/two_factor_auth → multi_factor_auth_lib/multi_factor_auth}/models/two_factor_verify_code_response.rb +0 -0
- data/lib/bandwidth/{two_factor_auth_lib/two_factor_auth → multi_factor_auth_lib/multi_factor_auth}/models/two_factor_verify_request_schema.rb +0 -0
- data/lib/bandwidth/{two_factor_auth_lib/two_factor_auth → multi_factor_auth_lib/multi_factor_auth}/models/two_factor_voice_response.rb +0 -0
- data/lib/bandwidth/utilities/date_time_helper.rb +156 -0
- data/lib/bandwidth/voice_lib/voice.rb +14 -18
- data/lib/bandwidth/voice_lib/voice/client.rb +14 -5
- data/lib/bandwidth/voice_lib/voice/controllers/api_controller.rb +248 -230
- data/lib/bandwidth/voice_lib/voice/exceptions/{api_error_response_exception.rb → api_error_exception.rb} +2 -2
- data/lib/bandwidth/voice_lib/voice/models/{recording_metadata_response.rb → call_recording_metadata.rb} +47 -28
- data/lib/bandwidth/voice_lib/voice/models/call_state.rb +232 -0
- data/lib/bandwidth/voice_lib/voice/models/callback_method_enum.rb +2 -20
- 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} +8 -8
- data/lib/bandwidth/voice_lib/voice/models/{conference_recording_metadata_response.rb → conference_recording_metadata.rb} +34 -18
- data/lib/bandwidth/voice_lib/voice/models/{conference_detail.rb → conference_state.rb} +22 -14
- data/lib/bandwidth/voice_lib/voice/models/{api_create_call_request.rb → create_call_request.rb} +35 -59
- data/lib/bandwidth/voice_lib/voice/models/{api_call_response.rb → create_call_response.rb} +28 -23
- data/lib/bandwidth/voice_lib/voice/models/{modify_call_recording_state.rb → modify_call_recording_request.rb} +4 -4
- data/lib/bandwidth/voice_lib/voice/models/{api_modify_call_request.rb → modify_call_request.rb} +25 -25
- data/lib/bandwidth/voice_lib/voice/models/{api_modify_conference_request.rb → modify_conference_request.rb} +11 -11
- 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/{api_transcribe_recording_request.rb → transcribe_recording_request.rb} +8 -8
- data/lib/bandwidth/voice_lib/voice/models/{transcription.rb → transcription_metadata.rb} +19 -10
- data/lib/bandwidth/web_rtc_lib/web_rtc/client.rb +4 -4
- data/lib/bandwidth/web_rtc_lib/web_rtc/controllers/api_controller.rb +14 -14
- data/test/integration/test_integration.rb +13 -13
- metadata +29 -32
- data/lib/bandwidth/two_factor_auth_lib/two_factor_auth.rb +0 -22
- data/lib/bandwidth/voice_lib/voice/models/api_call_state_response.rb +0 -164
- data/lib/bandwidth/voice_lib/voice/models/disconnect_cause_enum.rb +0 -47
- 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,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,47 +0,0 @@
|
|
1
|
-
# bandwidth
|
2
|
-
#
|
3
|
-
# This file was automatically generated by APIMATIC v2.0
|
4
|
-
# ( https://apimatic.io ).
|
5
|
-
|
6
|
-
module Bandwidth
|
7
|
-
# DisconnectCause.
|
8
|
-
class DisconnectCauseEnum
|
9
|
-
DISCONNECT_CAUSE_ENUM = [
|
10
|
-
# TODO: Write general description for BUSY
|
11
|
-
BUSY = 'busy'.freeze,
|
12
|
-
|
13
|
-
# TODO: Write general description for CALLBACKERROR
|
14
|
-
CALLBACKERROR = 'callback-error'.freeze,
|
15
|
-
|
16
|
-
# TODO: Write general description for CANCEL
|
17
|
-
CANCEL = 'cancel'.freeze,
|
18
|
-
|
19
|
-
# TODO: Write general description for ERROR
|
20
|
-
ERROR = 'error'.freeze,
|
21
|
-
|
22
|
-
# TODO: Write general description for HANGUP
|
23
|
-
HANGUP = 'hangup'.freeze,
|
24
|
-
|
25
|
-
# TODO: Write general description for INVALIDBXML
|
26
|
-
INVALIDBXML = 'invalid-bxml'.freeze,
|
27
|
-
|
28
|
-
# TODO: Write general description for REJECTED
|
29
|
-
REJECTED = 'rejected'.freeze,
|
30
|
-
|
31
|
-
# TODO: Write general description for TIMEOUT
|
32
|
-
TIMEOUT = 'timeout'.freeze,
|
33
|
-
|
34
|
-
# TODO: Write general description for ACCOUNTLIMIT
|
35
|
-
ACCOUNTLIMIT = 'account-limit'.freeze,
|
36
|
-
|
37
|
-
# TODO: Write general description for NODECAPACITYEXCEEDED
|
38
|
-
NODECAPACITYEXCEEDED = 'node-capacity-exceeded'.freeze,
|
39
|
-
|
40
|
-
# TODO: Write general description for UNKNOWN
|
41
|
-
UNKNOWN = 'unknown'.freeze,
|
42
|
-
|
43
|
-
# TODO: Write general description for APPLICATIONERROR
|
44
|
-
APPLICATIONERROR = 'application-error'.freeze
|
45
|
-
].freeze
|
46
|
-
end
|
47
|
-
end
|
@@ -1,20 +0,0 @@
|
|
1
|
-
# bandwidth
|
2
|
-
#
|
3
|
-
# This file was automatically generated by APIMATIC v2.0
|
4
|
-
# ( https://apimatic.io ).
|
5
|
-
|
6
|
-
module Bandwidth
|
7
|
-
# State2.
|
8
|
-
class State2Enum
|
9
|
-
STATE2_ENUM = [
|
10
|
-
# TODO: Write general description for NOT_RECORDING
|
11
|
-
NOT_RECORDING = 'NOT_RECORDING'.freeze,
|
12
|
-
|
13
|
-
# TODO: Write general description for PAUSED
|
14
|
-
PAUSED = 'PAUSED'.freeze,
|
15
|
-
|
16
|
-
# TODO: Write general description for RECORDING
|
17
|
-
RECORDING = 'RECORDING'.freeze
|
18
|
-
].freeze
|
19
|
-
end
|
20
|
-
end
|
@@ -1,29 +0,0 @@
|
|
1
|
-
# bandwidth
|
2
|
-
#
|
3
|
-
# This file was automatically generated by APIMATIC v2.0
|
4
|
-
# ( https://apimatic.io ).
|
5
|
-
|
6
|
-
module Bandwidth
|
7
|
-
# Status1.
|
8
|
-
class Status1Enum
|
9
|
-
STATUS1_ENUM = [
|
10
|
-
# TODO: Write general description for PROCESSING
|
11
|
-
PROCESSING = 'processing'.freeze,
|
12
|
-
|
13
|
-
# TODO: Write general description for PARTIAL
|
14
|
-
PARTIAL = 'partial'.freeze,
|
15
|
-
|
16
|
-
# TODO: Write general description for COMPLETE
|
17
|
-
COMPLETE = 'complete'.freeze,
|
18
|
-
|
19
|
-
# TODO: Write general description for DELETED
|
20
|
-
DELETED = 'deleted'.freeze,
|
21
|
-
|
22
|
-
# TODO: Write general description for ERROR
|
23
|
-
ERROR = 'error'.freeze,
|
24
|
-
|
25
|
-
# TODO: Write general description for ALREADYINPROGRESS
|
26
|
-
ALREADYINPROGRESS = 'already-in-progress'.freeze
|
27
|
-
].freeze
|
28
|
-
end
|
29
|
-
end
|
@@ -1,32 +0,0 @@
|
|
1
|
-
# bandwidth
|
2
|
-
#
|
3
|
-
# This file was automatically generated by APIMATIC v2.0
|
4
|
-
# ( https://apimatic.io ).
|
5
|
-
|
6
|
-
module Bandwidth
|
7
|
-
# Status3.
|
8
|
-
class Status3Enum
|
9
|
-
STATUS3_ENUM = [
|
10
|
-
# TODO: Write general description for NONE
|
11
|
-
NONE = 'none'.freeze,
|
12
|
-
|
13
|
-
# TODO: Write general description for PROCESSING
|
14
|
-
PROCESSING = 'processing'.freeze,
|
15
|
-
|
16
|
-
# TODO: Write general description for AVAILABLE
|
17
|
-
AVAILABLE = 'available'.freeze,
|
18
|
-
|
19
|
-
# TODO: Write general description for ERROR
|
20
|
-
ERROR = 'error'.freeze,
|
21
|
-
|
22
|
-
# TODO: Write general description for TIMEOUT
|
23
|
-
TIMEOUT = 'timeout'.freeze,
|
24
|
-
|
25
|
-
# TODO: Write general description for FILESIZETOOBIG
|
26
|
-
FILESIZETOOBIG = 'file-size-too-big'.freeze,
|
27
|
-
|
28
|
-
# TODO: Write general description for FILESIZETOOSMALL
|
29
|
-
FILESIZETOOSMALL = 'file-size-too-small'.freeze
|
30
|
-
].freeze
|
31
|
-
end
|
32
|
-
end
|