bandwidth-sdk 3.4.0 → 3.9.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.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/lib/bandwidth.rb +2 -0
  3. data/lib/bandwidth/api_helper.rb +14 -9
  4. data/lib/bandwidth/client.rb +11 -2
  5. data/lib/bandwidth/configuration.rb +23 -5
  6. data/lib/bandwidth/http/auth/web_rtc_basic_auth.rb +22 -0
  7. data/lib/bandwidth/messaging_lib/messaging/client.rb +7 -2
  8. data/lib/bandwidth/messaging_lib/messaging/controllers/api_controller.rb +18 -12
  9. data/lib/bandwidth/messaging_lib/messaging/controllers/base_controller.rb +1 -1
  10. data/lib/bandwidth/two_factor_auth_lib/two_factor_auth.rb +1 -0
  11. data/lib/bandwidth/two_factor_auth_lib/two_factor_auth/client.rb +7 -2
  12. data/lib/bandwidth/two_factor_auth_lib/two_factor_auth/controllers/api_controller.rb +38 -9
  13. data/lib/bandwidth/two_factor_auth_lib/two_factor_auth/controllers/base_controller.rb +1 -1
  14. data/lib/bandwidth/two_factor_auth_lib/two_factor_auth/exceptions/invalid_request_exception.rb +29 -0
  15. data/lib/bandwidth/two_factor_auth_lib/two_factor_auth/models/two_factor_code_request_schema.rb +30 -4
  16. data/lib/bandwidth/two_factor_auth_lib/two_factor_auth/models/two_factor_verify_request_schema.rb +33 -10
  17. data/lib/bandwidth/voice_lib/bxml/verbs/bridge.rb +22 -0
  18. data/lib/bandwidth/voice_lib/voice.rb +6 -2
  19. data/lib/bandwidth/voice_lib/voice/client.rb +7 -2
  20. data/lib/bandwidth/voice_lib/voice/controllers/api_controller.rb +625 -55
  21. data/lib/bandwidth/voice_lib/voice/controllers/base_controller.rb +1 -1
  22. data/lib/bandwidth/voice_lib/voice/models/call_engine_modify_conference_request.rb +38 -2
  23. data/lib/bandwidth/voice_lib/voice/models/conference_detail.rb +105 -0
  24. data/lib/bandwidth/voice_lib/voice/models/conference_event_method_enum.rb +35 -0
  25. data/lib/bandwidth/voice_lib/voice/models/conference_member_detail.rb +80 -0
  26. data/lib/bandwidth/voice_lib/voice/models/conference_recording_metadata_response.rb +125 -0
  27. data/lib/bandwidth/voice_lib/voice/models/recording_metadata_response.rb +27 -0
  28. data/lib/bandwidth/voice_lib/voice/models/status1_enum.rb +4 -1
  29. data/lib/bandwidth/voice_lib/voice/models/{status2_enum.rb → status3_enum.rb} +3 -3
  30. data/lib/bandwidth/voice_lib/voice/models/transcription.rb +1 -1
  31. data/lib/bandwidth/web_rtc_lib/web_rtc.rb +21 -0
  32. data/lib/bandwidth/web_rtc_lib/web_rtc/client.rb +49 -0
  33. data/lib/bandwidth/web_rtc_lib/web_rtc/controllers/api_controller.rb +692 -0
  34. data/lib/bandwidth/web_rtc_lib/web_rtc/controllers/base_controller.rb +49 -0
  35. data/lib/bandwidth/web_rtc_lib/web_rtc/exceptions/error_exception.rb +34 -0
  36. data/lib/bandwidth/web_rtc_lib/web_rtc/models/accounts_participants_response.rb +47 -0
  37. data/lib/bandwidth/web_rtc_lib/web_rtc/models/participant.rb +83 -0
  38. data/lib/bandwidth/web_rtc_lib/web_rtc/models/participant_subscription.rb +35 -0
  39. data/lib/bandwidth/web_rtc_lib/web_rtc/models/publish_permission_enum.rb +17 -0
  40. data/lib/bandwidth/web_rtc_lib/web_rtc/models/session.rb +44 -0
  41. data/lib/bandwidth/web_rtc_lib/web_rtc/models/subscriptions.rb +54 -0
  42. metadata +41 -11
@@ -13,7 +13,7 @@ module Bandwidth
13
13
  @http_call_back = http_call_back
14
14
 
15
15
  @global_headers = {
16
- 'user-agent' => 'ruby-sdk-refs/tags/ruby3.4.0'
16
+ 'user-agent' => 'ruby-sdk-refs/tags/ruby3.9.0'
17
17
  }
18
18
  end
19
19
 
@@ -10,15 +10,43 @@ module Bandwidth
10
10
  # @return [StatusEnum]
11
11
  attr_accessor :status
12
12
 
13
+ # TODO: Write general description for this method
14
+ # @return [String]
15
+ attr_accessor :redirect_url
16
+
17
+ # TODO: Write general description for this method
18
+ # @return [RedirectMethodEnum]
19
+ attr_accessor :redirect_method
20
+
21
+ # TODO: Write general description for this method
22
+ # @return [String]
23
+ attr_accessor :username
24
+
25
+ # TODO: Write general description for this method
26
+ # @return [String]
27
+ attr_accessor :password
28
+
13
29
  # A mapping from model property names to API property names.
14
30
  def self.names
15
31
  @_hash = {} if @_hash.nil?
16
32
  @_hash['status'] = 'status'
33
+ @_hash['redirect_url'] = 'redirectUrl'
34
+ @_hash['redirect_method'] = 'redirectMethod'
35
+ @_hash['username'] = 'username'
36
+ @_hash['password'] = 'password'
17
37
  @_hash
18
38
  end
19
39
 
20
- def initialize(status = nil)
40
+ def initialize(redirect_url = nil,
41
+ status = nil,
42
+ redirect_method = nil,
43
+ username = nil,
44
+ password = nil)
21
45
  @status = status
46
+ @redirect_url = redirect_url
47
+ @redirect_method = redirect_method
48
+ @username = username
49
+ @password = password
22
50
  end
23
51
 
24
52
  # Creates an instance of the object from a hash.
@@ -26,10 +54,18 @@ module Bandwidth
26
54
  return nil unless hash
27
55
 
28
56
  # Extract variables from the hash.
57
+ redirect_url = hash['redirectUrl']
29
58
  status = hash['status']
59
+ redirect_method = hash['redirectMethod']
60
+ username = hash['username']
61
+ password = hash['password']
30
62
 
31
63
  # Create object from extracted values.
32
- CallEngineModifyConferenceRequest.new(status)
64
+ CallEngineModifyConferenceRequest.new(redirect_url,
65
+ status,
66
+ redirect_method,
67
+ username,
68
+ password)
33
69
  end
34
70
  end
35
71
  end
@@ -0,0 +1,105 @@
1
+ # bandwidth
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module Bandwidth
7
+ # ConferenceDetail Model.
8
+ class ConferenceDetail < BaseModel
9
+ # TODO: Write general description for this method
10
+ # @return [String]
11
+ attr_accessor :id
12
+
13
+ # TODO: Write general description for this method
14
+ # @return [String]
15
+ attr_accessor :name
16
+
17
+ # TODO: Write general description for this method
18
+ # @return [Long]
19
+ attr_accessor :created_time
20
+
21
+ # TODO: Write general description for this method
22
+ # @return [Long]
23
+ attr_accessor :completed_time
24
+
25
+ # TODO: Write general description for this method
26
+ # @return [String]
27
+ attr_accessor :conference_event_url
28
+
29
+ # TODO: Write general description for this method
30
+ # @return [ConferenceEventMethodEnum]
31
+ attr_accessor :conference_event_method
32
+
33
+ # TODO: Write general description for this method
34
+ # @return [String]
35
+ attr_accessor :tag
36
+
37
+ # TODO: Write general description for this method
38
+ # @return [List of ConferenceMemberDetail]
39
+ attr_accessor :active_members
40
+
41
+ # A mapping from model property names to API property names.
42
+ def self.names
43
+ @_hash = {} if @_hash.nil?
44
+ @_hash['id'] = 'id'
45
+ @_hash['name'] = 'name'
46
+ @_hash['created_time'] = 'createdTime'
47
+ @_hash['completed_time'] = 'completedTime'
48
+ @_hash['conference_event_url'] = 'conferenceEventUrl'
49
+ @_hash['conference_event_method'] = 'conferenceEventMethod'
50
+ @_hash['tag'] = 'tag'
51
+ @_hash['active_members'] = 'activeMembers'
52
+ @_hash
53
+ end
54
+
55
+ def initialize(id = nil,
56
+ name = nil,
57
+ created_time = nil,
58
+ completed_time = nil,
59
+ conference_event_url = nil,
60
+ conference_event_method = nil,
61
+ tag = nil,
62
+ active_members = nil)
63
+ @id = id
64
+ @name = name
65
+ @created_time = created_time
66
+ @completed_time = completed_time
67
+ @conference_event_url = conference_event_url
68
+ @conference_event_method = conference_event_method
69
+ @tag = tag
70
+ @active_members = active_members
71
+ end
72
+
73
+ # Creates an instance of the object from a hash.
74
+ def self.from_hash(hash)
75
+ return nil unless hash
76
+
77
+ # Extract variables from the hash.
78
+ id = hash['id']
79
+ name = hash['name']
80
+ created_time = hash['createdTime']
81
+ completed_time = hash['completedTime']
82
+ conference_event_url = hash['conferenceEventUrl']
83
+ conference_event_method = hash['conferenceEventMethod']
84
+ tag = hash['tag']
85
+ # Parameter is an array, so we need to iterate through it
86
+ active_members = nil
87
+ unless hash['activeMembers'].nil?
88
+ active_members = []
89
+ hash['activeMembers'].each do |structure|
90
+ active_members << (ConferenceMemberDetail.from_hash(structure) if structure)
91
+ end
92
+ end
93
+
94
+ # Create object from extracted values.
95
+ ConferenceDetail.new(id,
96
+ name,
97
+ created_time,
98
+ completed_time,
99
+ conference_event_url,
100
+ conference_event_method,
101
+ tag,
102
+ active_members)
103
+ end
104
+ end
105
+ end
@@ -0,0 +1,35 @@
1
+ # bandwidth
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module Bandwidth
7
+ # ConferenceEventMethod.
8
+ class ConferenceEventMethodEnum
9
+ CONFERENCE_EVENT_METHOD_ENUM = [
10
+ # TODO: Write general description for GET
11
+ GET = 'GET'.freeze,
12
+
13
+ # TODO: Write general description for HEAD
14
+ HEAD = 'HEAD'.freeze,
15
+
16
+ # TODO: Write general description for POST
17
+ POST = 'POST'.freeze,
18
+
19
+ # TODO: Write general description for PUT
20
+ PUT = 'PUT'.freeze,
21
+
22
+ # TODO: Write general description for PATCH
23
+ PATCH = 'PATCH'.freeze,
24
+
25
+ # TODO: Write general description for DELETE
26
+ DELETE = 'DELETE'.freeze,
27
+
28
+ # TODO: Write general description for OPTIONS
29
+ OPTIONS = 'OPTIONS'.freeze,
30
+
31
+ # TODO: Write general description for TRACE
32
+ TRACE = 'TRACE'.freeze
33
+ ].freeze
34
+ end
35
+ end
@@ -0,0 +1,80 @@
1
+ # bandwidth
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module Bandwidth
7
+ # ConferenceMemberDetail Model.
8
+ class ConferenceMemberDetail < BaseModel
9
+ # TODO: Write general description for this method
10
+ # @return [String]
11
+ attr_accessor :call_id
12
+
13
+ # TODO: Write general description for this method
14
+ # @return [String]
15
+ attr_accessor :conference_id
16
+
17
+ # TODO: Write general description for this method
18
+ # @return [String]
19
+ attr_accessor :member_url
20
+
21
+ # TODO: Write general description for this method
22
+ # @return [Boolean]
23
+ attr_accessor :mute
24
+
25
+ # TODO: Write general description for this method
26
+ # @return [Boolean]
27
+ attr_accessor :hold
28
+
29
+ # TODO: Write general description for this method
30
+ # @return [List of String]
31
+ attr_accessor :call_ids_to_coach
32
+
33
+ # A mapping from model property names to API property names.
34
+ def self.names
35
+ @_hash = {} if @_hash.nil?
36
+ @_hash['call_id'] = 'callId'
37
+ @_hash['conference_id'] = 'conferenceId'
38
+ @_hash['member_url'] = 'memberUrl'
39
+ @_hash['mute'] = 'mute'
40
+ @_hash['hold'] = 'hold'
41
+ @_hash['call_ids_to_coach'] = 'callIdsToCoach'
42
+ @_hash
43
+ end
44
+
45
+ def initialize(call_id = nil,
46
+ conference_id = nil,
47
+ member_url = nil,
48
+ mute = nil,
49
+ hold = nil,
50
+ call_ids_to_coach = nil)
51
+ @call_id = call_id
52
+ @conference_id = conference_id
53
+ @member_url = member_url
54
+ @mute = mute
55
+ @hold = hold
56
+ @call_ids_to_coach = call_ids_to_coach
57
+ end
58
+
59
+ # Creates an instance of the object from a hash.
60
+ def self.from_hash(hash)
61
+ return nil unless hash
62
+
63
+ # Extract variables from the hash.
64
+ call_id = hash['callId']
65
+ conference_id = hash['conferenceId']
66
+ member_url = hash['memberUrl']
67
+ mute = hash['mute']
68
+ hold = hash['hold']
69
+ call_ids_to_coach = hash['callIdsToCoach']
70
+
71
+ # Create object from extracted values.
72
+ ConferenceMemberDetail.new(call_id,
73
+ conference_id,
74
+ member_url,
75
+ mute,
76
+ hold,
77
+ call_ids_to_coach)
78
+ end
79
+ end
80
+ end
@@ -0,0 +1,125 @@
1
+ # bandwidth
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module Bandwidth
7
+ # ConferenceRecordingMetadataResponse Model.
8
+ class ConferenceRecordingMetadataResponse < BaseModel
9
+ # TODO: Write general description for this method
10
+ # @return [String]
11
+ attr_accessor :account_id
12
+
13
+ # TODO: Write general description for this method
14
+ # @return [String]
15
+ attr_accessor :conference_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 [String]
23
+ attr_accessor :recording_id
24
+
25
+ # Format is ISO-8601
26
+ # @return [String]
27
+ attr_accessor :duration
28
+
29
+ # Format is ISO-8601
30
+ # @return [Integer]
31
+ attr_accessor :channels
32
+
33
+ # Format is ISO-8601
34
+ # @return [Long]
35
+ attr_accessor :start_time
36
+
37
+ # Format is ISO-8601
38
+ # @return [Long]
39
+ attr_accessor :end_time
40
+
41
+ # Format is ISO-8601
42
+ # @return [FileFormatEnum]
43
+ attr_accessor :file_format
44
+
45
+ # Format is ISO-8601
46
+ # @return [Status1Enum]
47
+ attr_accessor :status
48
+
49
+ # Format is ISO-8601
50
+ # @return [String]
51
+ attr_accessor :media_url
52
+
53
+ # A mapping from model property names to API property names.
54
+ def self.names
55
+ @_hash = {} if @_hash.nil?
56
+ @_hash['account_id'] = 'accountId'
57
+ @_hash['conference_id'] = 'conferenceId'
58
+ @_hash['name'] = 'name'
59
+ @_hash['recording_id'] = 'recordingId'
60
+ @_hash['duration'] = 'duration'
61
+ @_hash['channels'] = 'channels'
62
+ @_hash['start_time'] = 'startTime'
63
+ @_hash['end_time'] = 'endTime'
64
+ @_hash['file_format'] = 'fileFormat'
65
+ @_hash['status'] = 'status'
66
+ @_hash['media_url'] = 'mediaUrl'
67
+ @_hash
68
+ end
69
+
70
+ def initialize(account_id = nil,
71
+ conference_id = nil,
72
+ name = nil,
73
+ recording_id = nil,
74
+ duration = nil,
75
+ channels = nil,
76
+ start_time = nil,
77
+ end_time = nil,
78
+ file_format = nil,
79
+ status = nil,
80
+ media_url = nil)
81
+ @account_id = account_id
82
+ @conference_id = conference_id
83
+ @name = name
84
+ @recording_id = recording_id
85
+ @duration = duration
86
+ @channels = channels
87
+ @start_time = start_time
88
+ @end_time = end_time
89
+ @file_format = file_format
90
+ @status = status
91
+ @media_url = media_url
92
+ end
93
+
94
+ # Creates an instance of the object from a hash.
95
+ def self.from_hash(hash)
96
+ return nil unless hash
97
+
98
+ # Extract variables from the hash.
99
+ account_id = hash['accountId']
100
+ conference_id = hash['conferenceId']
101
+ name = hash['name']
102
+ recording_id = hash['recordingId']
103
+ duration = hash['duration']
104
+ channels = hash['channels']
105
+ start_time = hash['startTime']
106
+ end_time = hash['endTime']
107
+ file_format = hash['fileFormat']
108
+ status = hash['status']
109
+ media_url = hash['mediaUrl']
110
+
111
+ # Create object from extracted values.
112
+ ConferenceRecordingMetadataResponse.new(account_id,
113
+ conference_id,
114
+ name,
115
+ recording_id,
116
+ duration,
117
+ channels,
118
+ start_time,
119
+ end_time,
120
+ file_format,
121
+ status,
122
+ media_url)
123
+ end
124
+ end
125
+ end
@@ -18,6 +18,10 @@ module Bandwidth
18
18
  # @return [String]
19
19
  attr_accessor :call_id
20
20
 
21
+ # TODO: Write general description for this method
22
+ # @return [String]
23
+ attr_accessor :parent_call_id
24
+
21
25
  # TODO: Write general description for this method
22
26
  # @return [String]
23
27
  attr_accessor :recording_id
@@ -30,6 +34,14 @@ module Bandwidth
30
34
  # @return [String]
31
35
  attr_accessor :from
32
36
 
37
+ # TODO: Write general description for this method
38
+ # @return [String]
39
+ attr_accessor :transfer_caller_id
40
+
41
+ # TODO: Write general description for this method
42
+ # @return [String]
43
+ attr_accessor :transfer_to
44
+
33
45
  # Format is ISO-8601
34
46
  # @return [String]
35
47
  attr_accessor :duration
@@ -72,9 +84,12 @@ module Bandwidth
72
84
  @_hash['application_id'] = 'applicationId'
73
85
  @_hash['account_id'] = 'accountId'
74
86
  @_hash['call_id'] = 'callId'
87
+ @_hash['parent_call_id'] = 'parentCallId'
75
88
  @_hash['recording_id'] = 'recordingId'
76
89
  @_hash['to'] = 'to'
77
90
  @_hash['from'] = 'from'
91
+ @_hash['transfer_caller_id'] = 'transferCallerId'
92
+ @_hash['transfer_to'] = 'transferTo'
78
93
  @_hash['duration'] = 'duration'
79
94
  @_hash['direction'] = 'direction'
80
95
  @_hash['channels'] = 'channels'
@@ -90,9 +105,12 @@ module Bandwidth
90
105
  def initialize(application_id = nil,
91
106
  account_id = nil,
92
107
  call_id = nil,
108
+ parent_call_id = nil,
93
109
  recording_id = nil,
94
110
  to = nil,
95
111
  from = nil,
112
+ transfer_caller_id = nil,
113
+ transfer_to = nil,
96
114
  duration = nil,
97
115
  direction = nil,
98
116
  channels = nil,
@@ -105,9 +123,12 @@ module Bandwidth
105
123
  @application_id = application_id
106
124
  @account_id = account_id
107
125
  @call_id = call_id
126
+ @parent_call_id = parent_call_id
108
127
  @recording_id = recording_id
109
128
  @to = to
110
129
  @from = from
130
+ @transfer_caller_id = transfer_caller_id
131
+ @transfer_to = transfer_to
111
132
  @duration = duration
112
133
  @direction = direction
113
134
  @channels = channels
@@ -127,9 +148,12 @@ module Bandwidth
127
148
  application_id = hash['applicationId']
128
149
  account_id = hash['accountId']
129
150
  call_id = hash['callId']
151
+ parent_call_id = hash['parentCallId']
130
152
  recording_id = hash['recordingId']
131
153
  to = hash['to']
132
154
  from = hash['from']
155
+ transfer_caller_id = hash['transferCallerId']
156
+ transfer_to = hash['transferTo']
133
157
  duration = hash['duration']
134
158
  direction = hash['direction']
135
159
  channels = hash['channels']
@@ -145,9 +169,12 @@ module Bandwidth
145
169
  RecordingMetadataResponse.new(application_id,
146
170
  account_id,
147
171
  call_id,
172
+ parent_call_id,
148
173
  recording_id,
149
174
  to,
150
175
  from,
176
+ transfer_caller_id,
177
+ transfer_to,
151
178
  duration,
152
179
  direction,
153
180
  channels,