bandwidth-sdk 6.2.0 → 9.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/api_helper.rb +19 -29
- data/lib/bandwidth/client.rb +8 -8
- data/lib/bandwidth/configuration.rb +20 -32
- data/lib/bandwidth/http/auth/{two_factor_auth_basic_auth.rb → multi_factor_auth_basic_auth.rb} +3 -3
- data/lib/bandwidth/http/faraday_client.rb +1 -1
- data/lib/bandwidth/messaging_lib/messaging/client.rb +14 -5
- data/lib/bandwidth/messaging_lib/messaging/controllers/api_controller.rb +78 -71
- data/lib/bandwidth/messaging_lib/messaging/controllers/base_controller.rb +3 -5
- data/lib/bandwidth/messaging_lib/messaging/exceptions/messaging_exception.rb +5 -2
- data/lib/bandwidth/messaging_lib/messaging/models/bandwidth_callback_message.rb +31 -11
- data/lib/bandwidth/messaging_lib/messaging/models/bandwidth_message.rb +54 -25
- data/lib/bandwidth/messaging_lib/messaging/models/bandwidth_message_item.rb +102 -24
- data/lib/bandwidth/messaging_lib/messaging/models/bandwidth_messages_list.rb +23 -4
- data/lib/bandwidth/messaging_lib/messaging/models/deferred_result.rb +20 -4
- data/lib/bandwidth/messaging_lib/messaging/models/media.rb +27 -80
- data/lib/bandwidth/messaging_lib/messaging/models/message_request.rb +32 -14
- data/lib/bandwidth/messaging_lib/messaging/models/page_info.rb +28 -8
- data/lib/bandwidth/messaging_lib/messaging/models/tag.rb +20 -4
- data/lib/bandwidth/models/base_model.rb +30 -8
- data/lib/bandwidth/{two_factor_auth_lib/two_factor_auth → multi_factor_auth_lib/multi_factor_auth}/client.rb +15 -6
- data/lib/bandwidth/{two_factor_auth_lib/two_factor_auth → multi_factor_auth_lib/multi_factor_auth}/controllers/base_controller.rb +3 -5
- data/lib/bandwidth/{two_factor_auth_lib/two_factor_auth → multi_factor_auth_lib/multi_factor_auth}/controllers/mfa_controller.rb +28 -23
- data/lib/bandwidth/{two_factor_auth_lib/two_factor_auth → multi_factor_auth_lib/multi_factor_auth}/exceptions/error_with_request_exception.rb +5 -2
- data/lib/bandwidth/{two_factor_auth_lib/two_factor_auth → multi_factor_auth_lib/multi_factor_auth}/exceptions/forbidden_request_exception.rb +4 -1
- data/lib/bandwidth/{two_factor_auth_lib/two_factor_auth → multi_factor_auth_lib/multi_factor_auth}/exceptions/unauthorized_request_exception.rb +4 -1
- data/lib/bandwidth/{two_factor_auth_lib/two_factor_auth → multi_factor_auth_lib/multi_factor_auth}/models/two_factor_code_request_schema.rb +27 -12
- data/lib/bandwidth/{two_factor_auth_lib/two_factor_auth → multi_factor_auth_lib/multi_factor_auth}/models/two_factor_messaging_response.rb +17 -2
- data/lib/bandwidth/{two_factor_auth_lib/two_factor_auth → multi_factor_auth_lib/multi_factor_auth}/models/two_factor_verify_code_response.rb +17 -2
- data/lib/bandwidth/{two_factor_auth_lib/two_factor_auth → multi_factor_auth_lib/multi_factor_auth}/models/two_factor_verify_request_schema.rb +29 -10
- data/lib/bandwidth/{two_factor_auth_lib/two_factor_auth → multi_factor_auth_lib/multi_factor_auth}/models/two_factor_voice_response.rb +17 -2
- data/lib/bandwidth/multi_factor_auth_lib/multi_factor_auth.rb +23 -0
- data/lib/bandwidth/phone_number_lookup_lib/phone_number_lookup/controllers/api_controller.rb +212 -210
- data/lib/bandwidth/phone_number_lookup_lib/phone_number_lookup/controllers/base_controller.rb +3 -5
- data/lib/bandwidth/phone_number_lookup_lib/phone_number_lookup/exceptions/accounts_tnlookup400_error_exception.rb +4 -1
- data/lib/bandwidth/phone_number_lookup_lib/phone_number_lookup/models/order_request.rb +17 -2
- data/lib/bandwidth/phone_number_lookup_lib/phone_number_lookup/models/order_response.rb +20 -4
- data/lib/bandwidth/phone_number_lookup_lib/phone_number_lookup/models/order_status.rb +28 -7
- data/lib/bandwidth/phone_number_lookup_lib/phone_number_lookup/models/result.rb +43 -18
- data/lib/bandwidth/utilities/date_time_helper.rb +156 -0
- data/lib/bandwidth/utilities/file_wrapper.rb +1 -2
- data/lib/bandwidth/voice_lib/voice/client.rb +14 -5
- data/lib/bandwidth/voice_lib/voice/controllers/api_controller.rb +418 -379
- data/lib/bandwidth/voice_lib/voice/controllers/base_controller.rb +3 -5
- data/lib/bandwidth/voice_lib/voice/exceptions/{api_error_response_exception.rb → api_error_exception.rb} +8 -5
- data/lib/bandwidth/voice_lib/voice/models/call_callback.rb +343 -0
- data/lib/bandwidth/voice_lib/voice/models/call_recording_metadata.rb +250 -0
- data/lib/bandwidth/voice_lib/voice/models/call_state.rb +284 -0
- data/lib/bandwidth/voice_lib/voice/models/callback_method_enum.rb +2 -20
- data/lib/bandwidth/voice_lib/voice/models/conference_callback.rb +211 -0
- data/lib/bandwidth/voice_lib/voice/models/conference_event_method_enum.rb +2 -20
- data/lib/bandwidth/voice_lib/voice/models/{conference_member_detail.rb → conference_member_state.rb} +43 -20
- data/lib/bandwidth/voice_lib/voice/models/conference_recording_metadata.rb +173 -0
- data/lib/bandwidth/voice_lib/voice/models/conference_state.rb +153 -0
- data/lib/bandwidth/voice_lib/voice/models/create_call_request.rb +301 -0
- data/lib/bandwidth/voice_lib/voice/models/create_call_response.rb +256 -0
- data/lib/bandwidth/voice_lib/voice/models/diversion.rb +80 -0
- data/lib/bandwidth/voice_lib/voice/models/fallback_method_enum.rb +17 -0
- data/lib/bandwidth/voice_lib/voice/models/machine_detection_configuration.rb +218 -0
- data/lib/bandwidth/voice_lib/voice/models/mode_enum.rb +20 -0
- data/lib/bandwidth/voice_lib/voice/models/{modify_call_recording_state.rb → modify_call_recording_request.rb} +19 -6
- data/lib/bandwidth/voice_lib/voice/models/modify_call_request.rb +156 -0
- data/lib/bandwidth/voice_lib/voice/models/modify_conference_request.rb +144 -0
- data/lib/bandwidth/voice_lib/voice/models/state1_enum.rb +7 -4
- data/lib/bandwidth/voice_lib/voice/models/state_enum.rb +4 -7
- data/lib/bandwidth/voice_lib/voice/models/transcribe_recording_request.rb +108 -0
- data/lib/bandwidth/voice_lib/voice/models/transcript.rb +20 -4
- data/lib/bandwidth/voice_lib/voice/models/transcription.rb +35 -17
- data/lib/bandwidth/voice_lib/voice/models/transcription_metadata.rb +89 -0
- data/lib/bandwidth/voice_lib/voice/models/transcription_response.rb +18 -1
- data/lib/bandwidth/voice_lib/voice.rb +20 -18
- data/lib/bandwidth/web_rtc_lib/utils/web_rtc_transfer.rb +7 -2
- data/lib/bandwidth/web_rtc_lib/web_rtc/client.rb +4 -4
- data/lib/bandwidth/web_rtc_lib/web_rtc/controllers/api_controller.rb +75 -64
- data/lib/bandwidth/web_rtc_lib/web_rtc/controllers/base_controller.rb +3 -5
- data/lib/bandwidth/web_rtc_lib/web_rtc/exceptions/error_exception.rb +5 -2
- data/lib/bandwidth/web_rtc_lib/web_rtc/models/accounts_participants_response.rb +20 -5
- data/lib/bandwidth/web_rtc_lib/web_rtc/models/participant.rb +37 -14
- data/lib/bandwidth/web_rtc_lib/web_rtc/models/participant_subscription.rb +15 -2
- data/lib/bandwidth/web_rtc_lib/web_rtc/models/session.rb +20 -4
- data/lib/bandwidth/web_rtc_lib/web_rtc/models/subscriptions.rb +20 -3
- data/lib/bandwidth.rb +20 -18
- data/test/integration/test_integration.rb +92 -57
- metadata +35 -31
- data/lib/bandwidth/two_factor_auth_lib/two_factor_auth.rb +0 -22
- data/lib/bandwidth/voice_lib/voice/models/api_call_response.rb +0 -207
- data/lib/bandwidth/voice_lib/voice/models/api_call_state_response.rb +0 -164
- data/lib/bandwidth/voice_lib/voice/models/api_create_call_request.rb +0 -248
- data/lib/bandwidth/voice_lib/voice/models/api_modify_call_request.rb +0 -116
- data/lib/bandwidth/voice_lib/voice/models/api_modify_conference_request.rb +0 -107
- data/lib/bandwidth/voice_lib/voice/models/api_transcribe_recording_request.rb +0 -80
- data/lib/bandwidth/voice_lib/voice/models/conference_detail.rb +0 -108
- data/lib/bandwidth/voice_lib/voice/models/conference_recording_metadata_response.rb +0 -126
- data/lib/bandwidth/voice_lib/voice/models/disconnect_cause_enum.rb +0 -47
- data/lib/bandwidth/voice_lib/voice/models/recording_metadata_response.rb +0 -190
- data/lib/bandwidth/voice_lib/voice/models/state2_enum.rb +0 -20
- data/lib/bandwidth/voice_lib/voice/models/status1_enum.rb +0 -29
- data/lib/bandwidth/voice_lib/voice/models/status3_enum.rb +0 -32
|
@@ -0,0 +1,173 @@
|
|
|
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
|
+
# ConferenceRecordingMetadata Model.
|
|
9
|
+
class ConferenceRecordingMetadata < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for this method
|
|
14
|
+
# @return [String]
|
|
15
|
+
attr_accessor :account_id
|
|
16
|
+
|
|
17
|
+
# TODO: Write general description for this method
|
|
18
|
+
# @return [String]
|
|
19
|
+
attr_accessor :conference_id
|
|
20
|
+
|
|
21
|
+
# TODO: Write general description for this method
|
|
22
|
+
# @return [String]
|
|
23
|
+
attr_accessor :name
|
|
24
|
+
|
|
25
|
+
# TODO: Write general description for this method
|
|
26
|
+
# @return [String]
|
|
27
|
+
attr_accessor :recording_id
|
|
28
|
+
|
|
29
|
+
# Format is ISO-8601
|
|
30
|
+
# @return [String]
|
|
31
|
+
attr_accessor :duration
|
|
32
|
+
|
|
33
|
+
# Format is ISO-8601
|
|
34
|
+
# @return [Integer]
|
|
35
|
+
attr_accessor :channels
|
|
36
|
+
|
|
37
|
+
# Format is ISO-8601
|
|
38
|
+
# @return [DateTime]
|
|
39
|
+
attr_accessor :start_time
|
|
40
|
+
|
|
41
|
+
# Format is ISO-8601
|
|
42
|
+
# @return [DateTime]
|
|
43
|
+
attr_accessor :end_time
|
|
44
|
+
|
|
45
|
+
# Format is ISO-8601
|
|
46
|
+
# @return [FileFormatEnum]
|
|
47
|
+
attr_accessor :file_format
|
|
48
|
+
|
|
49
|
+
# The current status of the recording. Current possible values are
|
|
50
|
+
# 'processing', 'partial', 'complete', 'deleted', and 'error'. Additional
|
|
51
|
+
# states may be added in the future, so your application must be tolerant of
|
|
52
|
+
# unknown values.
|
|
53
|
+
# @return [String]
|
|
54
|
+
attr_accessor :status
|
|
55
|
+
|
|
56
|
+
# The current status of the recording. Current possible values are
|
|
57
|
+
# 'processing', 'partial', 'complete', 'deleted', and 'error'. Additional
|
|
58
|
+
# states may be added in the future, so your application must be tolerant of
|
|
59
|
+
# unknown values.
|
|
60
|
+
# @return [String]
|
|
61
|
+
attr_accessor :media_url
|
|
62
|
+
|
|
63
|
+
# A mapping from model property names to API property names.
|
|
64
|
+
def self.names
|
|
65
|
+
@_hash = {} if @_hash.nil?
|
|
66
|
+
@_hash['account_id'] = 'accountId'
|
|
67
|
+
@_hash['conference_id'] = 'conferenceId'
|
|
68
|
+
@_hash['name'] = 'name'
|
|
69
|
+
@_hash['recording_id'] = 'recordingId'
|
|
70
|
+
@_hash['duration'] = 'duration'
|
|
71
|
+
@_hash['channels'] = 'channels'
|
|
72
|
+
@_hash['start_time'] = 'startTime'
|
|
73
|
+
@_hash['end_time'] = 'endTime'
|
|
74
|
+
@_hash['file_format'] = 'fileFormat'
|
|
75
|
+
@_hash['status'] = 'status'
|
|
76
|
+
@_hash['media_url'] = 'mediaUrl'
|
|
77
|
+
@_hash
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# An array for optional fields
|
|
81
|
+
def optionals
|
|
82
|
+
%w[
|
|
83
|
+
account_id
|
|
84
|
+
conference_id
|
|
85
|
+
name
|
|
86
|
+
recording_id
|
|
87
|
+
duration
|
|
88
|
+
channels
|
|
89
|
+
start_time
|
|
90
|
+
end_time
|
|
91
|
+
file_format
|
|
92
|
+
status
|
|
93
|
+
media_url
|
|
94
|
+
]
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# An array for nullable fields
|
|
98
|
+
def nullables
|
|
99
|
+
[]
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
def initialize(account_id = nil,
|
|
103
|
+
conference_id = nil,
|
|
104
|
+
name = nil,
|
|
105
|
+
recording_id = nil,
|
|
106
|
+
duration = nil,
|
|
107
|
+
channels = nil,
|
|
108
|
+
start_time = nil,
|
|
109
|
+
end_time = nil,
|
|
110
|
+
file_format = nil,
|
|
111
|
+
status = nil,
|
|
112
|
+
media_url = nil)
|
|
113
|
+
@account_id = account_id unless account_id == SKIP
|
|
114
|
+
@conference_id = conference_id unless conference_id == SKIP
|
|
115
|
+
@name = name unless name == SKIP
|
|
116
|
+
@recording_id = recording_id unless recording_id == SKIP
|
|
117
|
+
@duration = duration unless duration == SKIP
|
|
118
|
+
@channels = channels unless channels == SKIP
|
|
119
|
+
@start_time = start_time unless start_time == SKIP
|
|
120
|
+
@end_time = end_time unless end_time == SKIP
|
|
121
|
+
@file_format = file_format unless file_format == SKIP
|
|
122
|
+
@status = status unless status == SKIP
|
|
123
|
+
@media_url = media_url unless media_url == SKIP
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# Creates an instance of the object from a hash.
|
|
127
|
+
def self.from_hash(hash)
|
|
128
|
+
return nil unless hash
|
|
129
|
+
|
|
130
|
+
# Extract variables from the hash.
|
|
131
|
+
account_id = hash.key?('accountId') ? hash['accountId'] : SKIP
|
|
132
|
+
conference_id = hash.key?('conferenceId') ? hash['conferenceId'] : SKIP
|
|
133
|
+
name = hash.key?('name') ? hash['name'] : SKIP
|
|
134
|
+
recording_id = hash.key?('recordingId') ? hash['recordingId'] : SKIP
|
|
135
|
+
duration = hash.key?('duration') ? hash['duration'] : SKIP
|
|
136
|
+
channels = hash.key?('channels') ? hash['channels'] : SKIP
|
|
137
|
+
start_time = if hash.key?('startTime')
|
|
138
|
+
(DateTimeHelper.from_rfc3339(hash['startTime']) if hash['startTime'])
|
|
139
|
+
else
|
|
140
|
+
SKIP
|
|
141
|
+
end
|
|
142
|
+
end_time = if hash.key?('endTime')
|
|
143
|
+
(DateTimeHelper.from_rfc3339(hash['endTime']) if hash['endTime'])
|
|
144
|
+
else
|
|
145
|
+
SKIP
|
|
146
|
+
end
|
|
147
|
+
file_format = hash.key?('fileFormat') ? hash['fileFormat'] : SKIP
|
|
148
|
+
status = hash.key?('status') ? hash['status'] : SKIP
|
|
149
|
+
media_url = hash.key?('mediaUrl') ? hash['mediaUrl'] : SKIP
|
|
150
|
+
|
|
151
|
+
# Create object from extracted values.
|
|
152
|
+
ConferenceRecordingMetadata.new(account_id,
|
|
153
|
+
conference_id,
|
|
154
|
+
name,
|
|
155
|
+
recording_id,
|
|
156
|
+
duration,
|
|
157
|
+
channels,
|
|
158
|
+
start_time,
|
|
159
|
+
end_time,
|
|
160
|
+
file_format,
|
|
161
|
+
status,
|
|
162
|
+
media_url)
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
def to_start_time
|
|
166
|
+
DateTimeHelper.to_rfc3339(start_time)
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
def to_end_time
|
|
170
|
+
DateTimeHelper.to_rfc3339(end_time)
|
|
171
|
+
end
|
|
172
|
+
end
|
|
173
|
+
end
|
|
@@ -0,0 +1,153 @@
|
|
|
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
|
+
# ConferenceState Model.
|
|
9
|
+
class ConferenceState < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for this method
|
|
14
|
+
# @return [String]
|
|
15
|
+
attr_accessor :id
|
|
16
|
+
|
|
17
|
+
# TODO: Write general description for this method
|
|
18
|
+
# @return [String]
|
|
19
|
+
attr_accessor :name
|
|
20
|
+
|
|
21
|
+
# TODO: Write general description for this method
|
|
22
|
+
# @return [DateTime]
|
|
23
|
+
attr_accessor :created_time
|
|
24
|
+
|
|
25
|
+
# TODO: Write general description for this method
|
|
26
|
+
# @return [DateTime]
|
|
27
|
+
attr_accessor :completed_time
|
|
28
|
+
|
|
29
|
+
# TODO: Write general description for this method
|
|
30
|
+
# @return [String]
|
|
31
|
+
attr_accessor :conference_event_url
|
|
32
|
+
|
|
33
|
+
# TODO: Write general description for this method
|
|
34
|
+
# @return [ConferenceEventMethodEnum]
|
|
35
|
+
attr_accessor :conference_event_method
|
|
36
|
+
|
|
37
|
+
# TODO: Write general description for this method
|
|
38
|
+
# @return [String]
|
|
39
|
+
attr_accessor :tag
|
|
40
|
+
|
|
41
|
+
# TODO: Write general description for this method
|
|
42
|
+
# @return [List of ConferenceMemberState]
|
|
43
|
+
attr_accessor :active_members
|
|
44
|
+
|
|
45
|
+
# A mapping from model property names to API property names.
|
|
46
|
+
def self.names
|
|
47
|
+
@_hash = {} if @_hash.nil?
|
|
48
|
+
@_hash['id'] = 'id'
|
|
49
|
+
@_hash['name'] = 'name'
|
|
50
|
+
@_hash['created_time'] = 'createdTime'
|
|
51
|
+
@_hash['completed_time'] = 'completedTime'
|
|
52
|
+
@_hash['conference_event_url'] = 'conferenceEventUrl'
|
|
53
|
+
@_hash['conference_event_method'] = 'conferenceEventMethod'
|
|
54
|
+
@_hash['tag'] = 'tag'
|
|
55
|
+
@_hash['active_members'] = 'activeMembers'
|
|
56
|
+
@_hash
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# An array for optional fields
|
|
60
|
+
def optionals
|
|
61
|
+
%w[
|
|
62
|
+
id
|
|
63
|
+
name
|
|
64
|
+
created_time
|
|
65
|
+
completed_time
|
|
66
|
+
conference_event_url
|
|
67
|
+
conference_event_method
|
|
68
|
+
tag
|
|
69
|
+
active_members
|
|
70
|
+
]
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# An array for nullable fields
|
|
74
|
+
def nullables
|
|
75
|
+
%w[
|
|
76
|
+
completed_time
|
|
77
|
+
conference_event_url
|
|
78
|
+
conference_event_method
|
|
79
|
+
tag
|
|
80
|
+
]
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
def initialize(id = nil,
|
|
84
|
+
name = nil,
|
|
85
|
+
created_time = nil,
|
|
86
|
+
completed_time = nil,
|
|
87
|
+
conference_event_url = nil,
|
|
88
|
+
conference_event_method = nil,
|
|
89
|
+
tag = nil,
|
|
90
|
+
active_members = nil)
|
|
91
|
+
@id = id unless id == SKIP
|
|
92
|
+
@name = name unless name == SKIP
|
|
93
|
+
@created_time = created_time unless created_time == SKIP
|
|
94
|
+
@completed_time = completed_time unless completed_time == SKIP
|
|
95
|
+
@conference_event_url = conference_event_url unless conference_event_url == SKIP
|
|
96
|
+
@conference_event_method = conference_event_method unless conference_event_method == SKIP
|
|
97
|
+
@tag = tag unless tag == SKIP
|
|
98
|
+
@active_members = active_members unless active_members == SKIP
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Creates an instance of the object from a hash.
|
|
102
|
+
def self.from_hash(hash)
|
|
103
|
+
return nil unless hash
|
|
104
|
+
|
|
105
|
+
# Extract variables from the hash.
|
|
106
|
+
id = hash.key?('id') ? hash['id'] : SKIP
|
|
107
|
+
name = hash.key?('name') ? hash['name'] : SKIP
|
|
108
|
+
created_time = if hash.key?('createdTime')
|
|
109
|
+
(DateTimeHelper.from_rfc3339(hash['createdTime']) if hash['createdTime'])
|
|
110
|
+
else
|
|
111
|
+
SKIP
|
|
112
|
+
end
|
|
113
|
+
completed_time = if hash.key?('completedTime')
|
|
114
|
+
(DateTimeHelper.from_rfc3339(hash['completedTime']) if hash['completedTime'])
|
|
115
|
+
else
|
|
116
|
+
SKIP
|
|
117
|
+
end
|
|
118
|
+
conference_event_url =
|
|
119
|
+
hash.key?('conferenceEventUrl') ? hash['conferenceEventUrl'] : SKIP
|
|
120
|
+
conference_event_method =
|
|
121
|
+
hash.key?('conferenceEventMethod') ? hash['conferenceEventMethod'] : SKIP
|
|
122
|
+
tag = hash.key?('tag') ? hash['tag'] : SKIP
|
|
123
|
+
# Parameter is an array, so we need to iterate through it
|
|
124
|
+
active_members = nil
|
|
125
|
+
unless hash['activeMembers'].nil?
|
|
126
|
+
active_members = []
|
|
127
|
+
hash['activeMembers'].each do |structure|
|
|
128
|
+
active_members << (ConferenceMemberState.from_hash(structure) if structure)
|
|
129
|
+
end
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
active_members = SKIP unless hash.key?('activeMembers')
|
|
133
|
+
|
|
134
|
+
# Create object from extracted values.
|
|
135
|
+
ConferenceState.new(id,
|
|
136
|
+
name,
|
|
137
|
+
created_time,
|
|
138
|
+
completed_time,
|
|
139
|
+
conference_event_url,
|
|
140
|
+
conference_event_method,
|
|
141
|
+
tag,
|
|
142
|
+
active_members)
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
def to_created_time
|
|
146
|
+
DateTimeHelper.to_rfc3339(created_time)
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
def to_completed_time
|
|
150
|
+
DateTimeHelper.to_rfc3339(completed_time)
|
|
151
|
+
end
|
|
152
|
+
end
|
|
153
|
+
end
|
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
# bandwidth
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
|
4
|
+
# ( https://apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module Bandwidth
|
|
7
|
+
# CreateCallRequest Model.
|
|
8
|
+
class CreateCallRequest < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Format is E164
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :from
|
|
15
|
+
|
|
16
|
+
# Format is E164 or SIP URI
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :to
|
|
19
|
+
|
|
20
|
+
# A comma-separated list of 'User-To-User' headers to be sent in the INVITE
|
|
21
|
+
# when calling a SIP URI. Each value must end with an 'encoding' parameter
|
|
22
|
+
# as described in https://tools.ietf.org/html/rfc7433. Only 'jwt' and
|
|
23
|
+
# 'base64' encodings are allowed. The entire value cannot exceed 350
|
|
24
|
+
# characters, including parameters and separators.
|
|
25
|
+
# @return [String]
|
|
26
|
+
attr_accessor :uui
|
|
27
|
+
|
|
28
|
+
# A comma-separated list of 'User-To-User' headers to be sent in the INVITE
|
|
29
|
+
# when calling a SIP URI. Each value must end with an 'encoding' parameter
|
|
30
|
+
# as described in https://tools.ietf.org/html/rfc7433. Only 'jwt' and
|
|
31
|
+
# 'base64' encodings are allowed. The entire value cannot exceed 350
|
|
32
|
+
# characters, including parameters and separators.
|
|
33
|
+
# @return [Float]
|
|
34
|
+
attr_accessor :call_timeout
|
|
35
|
+
|
|
36
|
+
# A comma-separated list of 'User-To-User' headers to be sent in the INVITE
|
|
37
|
+
# when calling a SIP URI. Each value must end with an 'encoding' parameter
|
|
38
|
+
# as described in https://tools.ietf.org/html/rfc7433. Only 'jwt' and
|
|
39
|
+
# 'base64' encodings are allowed. The entire value cannot exceed 350
|
|
40
|
+
# characters, including parameters and separators.
|
|
41
|
+
# @return [Float]
|
|
42
|
+
attr_accessor :callback_timeout
|
|
43
|
+
|
|
44
|
+
# A comma-separated list of 'User-To-User' headers to be sent in the INVITE
|
|
45
|
+
# when calling a SIP URI. Each value must end with an 'encoding' parameter
|
|
46
|
+
# as described in https://tools.ietf.org/html/rfc7433. Only 'jwt' and
|
|
47
|
+
# 'base64' encodings are allowed. The entire value cannot exceed 350
|
|
48
|
+
# characters, including parameters and separators.
|
|
49
|
+
# @return [String]
|
|
50
|
+
attr_accessor :answer_url
|
|
51
|
+
|
|
52
|
+
# A comma-separated list of 'User-To-User' headers to be sent in the INVITE
|
|
53
|
+
# when calling a SIP URI. Each value must end with an 'encoding' parameter
|
|
54
|
+
# as described in https://tools.ietf.org/html/rfc7433. Only 'jwt' and
|
|
55
|
+
# 'base64' encodings are allowed. The entire value cannot exceed 350
|
|
56
|
+
# characters, including parameters and separators.
|
|
57
|
+
# @return [String]
|
|
58
|
+
attr_accessor :answer_fallback_url
|
|
59
|
+
|
|
60
|
+
# A comma-separated list of 'User-To-User' headers to be sent in the INVITE
|
|
61
|
+
# when calling a SIP URI. Each value must end with an 'encoding' parameter
|
|
62
|
+
# as described in https://tools.ietf.org/html/rfc7433. Only 'jwt' and
|
|
63
|
+
# 'base64' encodings are allowed. The entire value cannot exceed 350
|
|
64
|
+
# characters, including parameters and separators.
|
|
65
|
+
# @return [String]
|
|
66
|
+
attr_accessor :username
|
|
67
|
+
|
|
68
|
+
# A comma-separated list of 'User-To-User' headers to be sent in the INVITE
|
|
69
|
+
# when calling a SIP URI. Each value must end with an 'encoding' parameter
|
|
70
|
+
# as described in https://tools.ietf.org/html/rfc7433. Only 'jwt' and
|
|
71
|
+
# 'base64' encodings are allowed. The entire value cannot exceed 350
|
|
72
|
+
# characters, including parameters and separators.
|
|
73
|
+
# @return [String]
|
|
74
|
+
attr_accessor :password
|
|
75
|
+
|
|
76
|
+
# A comma-separated list of 'User-To-User' headers to be sent in the INVITE
|
|
77
|
+
# when calling a SIP URI. Each value must end with an 'encoding' parameter
|
|
78
|
+
# as described in https://tools.ietf.org/html/rfc7433. Only 'jwt' and
|
|
79
|
+
# 'base64' encodings are allowed. The entire value cannot exceed 350
|
|
80
|
+
# characters, including parameters and separators.
|
|
81
|
+
# @return [String]
|
|
82
|
+
attr_accessor :fallback_username
|
|
83
|
+
|
|
84
|
+
# A comma-separated list of 'User-To-User' headers to be sent in the INVITE
|
|
85
|
+
# when calling a SIP URI. Each value must end with an 'encoding' parameter
|
|
86
|
+
# as described in https://tools.ietf.org/html/rfc7433. Only 'jwt' and
|
|
87
|
+
# 'base64' encodings are allowed. The entire value cannot exceed 350
|
|
88
|
+
# characters, including parameters and separators.
|
|
89
|
+
# @return [String]
|
|
90
|
+
attr_accessor :fallback_password
|
|
91
|
+
|
|
92
|
+
# A comma-separated list of 'User-To-User' headers to be sent in the INVITE
|
|
93
|
+
# when calling a SIP URI. Each value must end with an 'encoding' parameter
|
|
94
|
+
# as described in https://tools.ietf.org/html/rfc7433. Only 'jwt' and
|
|
95
|
+
# 'base64' encodings are allowed. The entire value cannot exceed 350
|
|
96
|
+
# characters, including parameters and separators.
|
|
97
|
+
# @return [AnswerMethodEnum]
|
|
98
|
+
attr_accessor :answer_method
|
|
99
|
+
|
|
100
|
+
# A comma-separated list of 'User-To-User' headers to be sent in the INVITE
|
|
101
|
+
# when calling a SIP URI. Each value must end with an 'encoding' parameter
|
|
102
|
+
# as described in https://tools.ietf.org/html/rfc7433. Only 'jwt' and
|
|
103
|
+
# 'base64' encodings are allowed. The entire value cannot exceed 350
|
|
104
|
+
# characters, including parameters and separators.
|
|
105
|
+
# @return [AnswerFallbackMethodEnum]
|
|
106
|
+
attr_accessor :answer_fallback_method
|
|
107
|
+
|
|
108
|
+
# A comma-separated list of 'User-To-User' headers to be sent in the INVITE
|
|
109
|
+
# when calling a SIP URI. Each value must end with an 'encoding' parameter
|
|
110
|
+
# as described in https://tools.ietf.org/html/rfc7433. Only 'jwt' and
|
|
111
|
+
# 'base64' encodings are allowed. The entire value cannot exceed 350
|
|
112
|
+
# characters, including parameters and separators.
|
|
113
|
+
# @return [String]
|
|
114
|
+
attr_accessor :disconnect_url
|
|
115
|
+
|
|
116
|
+
# A comma-separated list of 'User-To-User' headers to be sent in the INVITE
|
|
117
|
+
# when calling a SIP URI. Each value must end with an 'encoding' parameter
|
|
118
|
+
# as described in https://tools.ietf.org/html/rfc7433. Only 'jwt' and
|
|
119
|
+
# 'base64' encodings are allowed. The entire value cannot exceed 350
|
|
120
|
+
# characters, including parameters and separators.
|
|
121
|
+
# @return [DisconnectMethodEnum]
|
|
122
|
+
attr_accessor :disconnect_method
|
|
123
|
+
|
|
124
|
+
# A comma-separated list of 'User-To-User' headers to be sent in the INVITE
|
|
125
|
+
# when calling a SIP URI. Each value must end with an 'encoding' parameter
|
|
126
|
+
# as described in https://tools.ietf.org/html/rfc7433. Only 'jwt' and
|
|
127
|
+
# 'base64' encodings are allowed. The entire value cannot exceed 350
|
|
128
|
+
# characters, including parameters and separators.
|
|
129
|
+
# @return [String]
|
|
130
|
+
attr_accessor :tag
|
|
131
|
+
|
|
132
|
+
# A comma-separated list of 'User-To-User' headers to be sent in the INVITE
|
|
133
|
+
# when calling a SIP URI. Each value must end with an 'encoding' parameter
|
|
134
|
+
# as described in https://tools.ietf.org/html/rfc7433. Only 'jwt' and
|
|
135
|
+
# 'base64' encodings are allowed. The entire value cannot exceed 350
|
|
136
|
+
# characters, including parameters and separators.
|
|
137
|
+
# @return [String]
|
|
138
|
+
attr_accessor :application_id
|
|
139
|
+
|
|
140
|
+
# A comma-separated list of 'User-To-User' headers to be sent in the INVITE
|
|
141
|
+
# when calling a SIP URI. Each value must end with an 'encoding' parameter
|
|
142
|
+
# as described in https://tools.ietf.org/html/rfc7433. Only 'jwt' and
|
|
143
|
+
# 'base64' encodings are allowed. The entire value cannot exceed 350
|
|
144
|
+
# characters, including parameters and separators.
|
|
145
|
+
# @return [MachineDetectionRequest]
|
|
146
|
+
attr_accessor :machine_detection
|
|
147
|
+
|
|
148
|
+
# A mapping from model property names to API property names.
|
|
149
|
+
def self.names
|
|
150
|
+
@_hash = {} if @_hash.nil?
|
|
151
|
+
@_hash['from'] = 'from'
|
|
152
|
+
@_hash['to'] = 'to'
|
|
153
|
+
@_hash['uui'] = 'uui'
|
|
154
|
+
@_hash['call_timeout'] = 'callTimeout'
|
|
155
|
+
@_hash['callback_timeout'] = 'callbackTimeout'
|
|
156
|
+
@_hash['answer_url'] = 'answerUrl'
|
|
157
|
+
@_hash['answer_fallback_url'] = 'answerFallbackUrl'
|
|
158
|
+
@_hash['username'] = 'username'
|
|
159
|
+
@_hash['password'] = 'password'
|
|
160
|
+
@_hash['fallback_username'] = 'fallbackUsername'
|
|
161
|
+
@_hash['fallback_password'] = 'fallbackPassword'
|
|
162
|
+
@_hash['answer_method'] = 'answerMethod'
|
|
163
|
+
@_hash['answer_fallback_method'] = 'answerFallbackMethod'
|
|
164
|
+
@_hash['disconnect_url'] = 'disconnectUrl'
|
|
165
|
+
@_hash['disconnect_method'] = 'disconnectMethod'
|
|
166
|
+
@_hash['tag'] = 'tag'
|
|
167
|
+
@_hash['application_id'] = 'applicationId'
|
|
168
|
+
@_hash['machine_detection'] = 'machineDetection'
|
|
169
|
+
@_hash
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
# An array for optional fields
|
|
173
|
+
def optionals
|
|
174
|
+
%w[
|
|
175
|
+
uui
|
|
176
|
+
call_timeout
|
|
177
|
+
callback_timeout
|
|
178
|
+
answer_fallback_url
|
|
179
|
+
username
|
|
180
|
+
password
|
|
181
|
+
fallback_username
|
|
182
|
+
fallback_password
|
|
183
|
+
answer_method
|
|
184
|
+
answer_fallback_method
|
|
185
|
+
disconnect_url
|
|
186
|
+
disconnect_method
|
|
187
|
+
tag
|
|
188
|
+
machine_detection
|
|
189
|
+
]
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
# An array for nullable fields
|
|
193
|
+
def nullables
|
|
194
|
+
%w[
|
|
195
|
+
uui
|
|
196
|
+
call_timeout
|
|
197
|
+
callback_timeout
|
|
198
|
+
answer_fallback_url
|
|
199
|
+
username
|
|
200
|
+
password
|
|
201
|
+
fallback_username
|
|
202
|
+
fallback_password
|
|
203
|
+
answer_method
|
|
204
|
+
answer_fallback_method
|
|
205
|
+
disconnect_url
|
|
206
|
+
disconnect_method
|
|
207
|
+
tag
|
|
208
|
+
]
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
def initialize(from = nil,
|
|
212
|
+
to = nil,
|
|
213
|
+
answer_url = nil,
|
|
214
|
+
application_id = nil,
|
|
215
|
+
uui = nil,
|
|
216
|
+
call_timeout = nil,
|
|
217
|
+
callback_timeout = nil,
|
|
218
|
+
answer_fallback_url = nil,
|
|
219
|
+
username = nil,
|
|
220
|
+
password = nil,
|
|
221
|
+
fallback_username = nil,
|
|
222
|
+
fallback_password = nil,
|
|
223
|
+
answer_method = nil,
|
|
224
|
+
answer_fallback_method = nil,
|
|
225
|
+
disconnect_url = nil,
|
|
226
|
+
disconnect_method = nil,
|
|
227
|
+
tag = nil,
|
|
228
|
+
machine_detection = nil)
|
|
229
|
+
@from = from unless from == SKIP
|
|
230
|
+
@to = to unless to == SKIP
|
|
231
|
+
@uui = uui unless uui == SKIP
|
|
232
|
+
@call_timeout = call_timeout unless call_timeout == SKIP
|
|
233
|
+
@callback_timeout = callback_timeout unless callback_timeout == SKIP
|
|
234
|
+
@answer_url = answer_url unless answer_url == SKIP
|
|
235
|
+
@answer_fallback_url = answer_fallback_url unless answer_fallback_url == SKIP
|
|
236
|
+
@username = username unless username == SKIP
|
|
237
|
+
@password = password unless password == SKIP
|
|
238
|
+
@fallback_username = fallback_username unless fallback_username == SKIP
|
|
239
|
+
@fallback_password = fallback_password unless fallback_password == SKIP
|
|
240
|
+
@answer_method = answer_method unless answer_method == SKIP
|
|
241
|
+
@answer_fallback_method = answer_fallback_method unless answer_fallback_method == SKIP
|
|
242
|
+
@disconnect_url = disconnect_url unless disconnect_url == SKIP
|
|
243
|
+
@disconnect_method = disconnect_method unless disconnect_method == SKIP
|
|
244
|
+
@tag = tag unless tag == SKIP
|
|
245
|
+
@application_id = application_id unless application_id == SKIP
|
|
246
|
+
@machine_detection = machine_detection unless machine_detection == SKIP
|
|
247
|
+
end
|
|
248
|
+
|
|
249
|
+
# Creates an instance of the object from a hash.
|
|
250
|
+
def self.from_hash(hash)
|
|
251
|
+
return nil unless hash
|
|
252
|
+
|
|
253
|
+
# Extract variables from the hash.
|
|
254
|
+
from = hash.key?('from') ? hash['from'] : SKIP
|
|
255
|
+
to = hash.key?('to') ? hash['to'] : SKIP
|
|
256
|
+
answer_url = hash.key?('answerUrl') ? hash['answerUrl'] : SKIP
|
|
257
|
+
application_id = hash.key?('applicationId') ? hash['applicationId'] : SKIP
|
|
258
|
+
uui = hash.key?('uui') ? hash['uui'] : SKIP
|
|
259
|
+
call_timeout = hash.key?('callTimeout') ? hash['callTimeout'] : SKIP
|
|
260
|
+
callback_timeout =
|
|
261
|
+
hash.key?('callbackTimeout') ? hash['callbackTimeout'] : SKIP
|
|
262
|
+
answer_fallback_url =
|
|
263
|
+
hash.key?('answerFallbackUrl') ? hash['answerFallbackUrl'] : SKIP
|
|
264
|
+
username = hash.key?('username') ? hash['username'] : SKIP
|
|
265
|
+
password = hash.key?('password') ? hash['password'] : SKIP
|
|
266
|
+
fallback_username =
|
|
267
|
+
hash.key?('fallbackUsername') ? hash['fallbackUsername'] : SKIP
|
|
268
|
+
fallback_password =
|
|
269
|
+
hash.key?('fallbackPassword') ? hash['fallbackPassword'] : SKIP
|
|
270
|
+
answer_method = hash.key?('answerMethod') ? hash['answerMethod'] : SKIP
|
|
271
|
+
answer_fallback_method =
|
|
272
|
+
hash.key?('answerFallbackMethod') ? hash['answerFallbackMethod'] : SKIP
|
|
273
|
+
disconnect_url = hash.key?('disconnectUrl') ? hash['disconnectUrl'] : SKIP
|
|
274
|
+
disconnect_method =
|
|
275
|
+
hash.key?('disconnectMethod') ? hash['disconnectMethod'] : SKIP
|
|
276
|
+
tag = hash.key?('tag') ? hash['tag'] : SKIP
|
|
277
|
+
machine_detection = MachineDetectionConfiguration.from_hash(hash['machineDetection']) if
|
|
278
|
+
hash['machineDetection']
|
|
279
|
+
|
|
280
|
+
# Create object from extracted values.
|
|
281
|
+
CreateCallRequest.new(from,
|
|
282
|
+
to,
|
|
283
|
+
answer_url,
|
|
284
|
+
application_id,
|
|
285
|
+
uui,
|
|
286
|
+
call_timeout,
|
|
287
|
+
callback_timeout,
|
|
288
|
+
answer_fallback_url,
|
|
289
|
+
username,
|
|
290
|
+
password,
|
|
291
|
+
fallback_username,
|
|
292
|
+
fallback_password,
|
|
293
|
+
answer_method,
|
|
294
|
+
answer_fallback_method,
|
|
295
|
+
disconnect_url,
|
|
296
|
+
disconnect_method,
|
|
297
|
+
tag,
|
|
298
|
+
machine_detection)
|
|
299
|
+
end
|
|
300
|
+
end
|
|
301
|
+
end
|