bandwidth-sdk 3.3.0 → 3.8.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 (45) 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/bxml/verbs/conference.rb +28 -0
  19. data/lib/bandwidth/voice_lib/voice.rb +5 -0
  20. data/lib/bandwidth/voice_lib/voice/client.rb +7 -2
  21. data/lib/bandwidth/voice_lib/voice/controllers/api_controller.rb +352 -115
  22. data/lib/bandwidth/voice_lib/voice/controllers/base_controller.rb +1 -1
  23. data/lib/bandwidth/voice_lib/voice/models/api_create_call_request.rb +20 -2
  24. data/lib/bandwidth/voice_lib/voice/models/call_engine_modify_conference_request.rb +35 -0
  25. data/lib/bandwidth/voice_lib/voice/models/conference_detail.rb +105 -0
  26. data/lib/bandwidth/voice_lib/voice/models/conference_event_method_enum.rb +35 -0
  27. data/lib/bandwidth/voice_lib/voice/models/conference_member_detail.rb +80 -0
  28. data/lib/bandwidth/voice_lib/voice/models/disconnect_cause_enum.rb +4 -1
  29. data/lib/bandwidth/voice_lib/voice/models/recording_metadata_response.rb +1 -1
  30. data/lib/bandwidth/voice_lib/voice/models/status1_enum.rb +8 -14
  31. data/lib/bandwidth/voice_lib/voice/models/status2_enum.rb +32 -0
  32. data/lib/bandwidth/voice_lib/voice/models/status_enum.rb +4 -13
  33. data/lib/bandwidth/voice_lib/voice/models/transcription.rb +1 -1
  34. data/lib/bandwidth/web_rtc_lib/web_rtc.rb +21 -0
  35. data/lib/bandwidth/web_rtc_lib/web_rtc/client.rb +49 -0
  36. data/lib/bandwidth/web_rtc_lib/web_rtc/controllers/api_controller.rb +692 -0
  37. data/lib/bandwidth/web_rtc_lib/web_rtc/controllers/base_controller.rb +49 -0
  38. data/lib/bandwidth/web_rtc_lib/web_rtc/exceptions/error_exception.rb +34 -0
  39. data/lib/bandwidth/web_rtc_lib/web_rtc/models/accounts_participants_response.rb +47 -0
  40. data/lib/bandwidth/web_rtc_lib/web_rtc/models/participant.rb +83 -0
  41. data/lib/bandwidth/web_rtc_lib/web_rtc/models/participant_subscription.rb +35 -0
  42. data/lib/bandwidth/web_rtc_lib/web_rtc/models/publish_permission_enum.rb +17 -0
  43. data/lib/bandwidth/web_rtc_lib/web_rtc/models/session.rb +44 -0
  44. data/lib/bandwidth/web_rtc_lib/web_rtc/models/subscriptions.rb +54 -0
  45. metadata +22 -2
@@ -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.3.0'
16
+ 'user-agent' => 'ruby-sdk-refs/tags/ruby3.8.0'
17
17
  }
18
18
  end
19
19
 
@@ -50,6 +50,14 @@ module Bandwidth
50
50
  # @return [String]
51
51
  attr_accessor :application_id
52
52
 
53
+ # Format is E164
54
+ # @return [String]
55
+ attr_accessor :obfuscated_to
56
+
57
+ # Format is E164
58
+ # @return [String]
59
+ attr_accessor :obfuscated_from
60
+
53
61
  # A mapping from model property names to API property names.
54
62
  def self.names
55
63
  @_hash = {} if @_hash.nil?
@@ -64,6 +72,8 @@ module Bandwidth
64
72
  @_hash['disconnect_method'] = 'disconnectMethod'
65
73
  @_hash['tag'] = 'tag'
66
74
  @_hash['application_id'] = 'applicationId'
75
+ @_hash['obfuscated_to'] = 'obfuscatedTo'
76
+ @_hash['obfuscated_from'] = 'obfuscatedFrom'
67
77
  @_hash
68
78
  end
69
79
 
@@ -77,7 +87,9 @@ module Bandwidth
77
87
  answer_method = nil,
78
88
  disconnect_url = nil,
79
89
  disconnect_method = nil,
80
- tag = nil)
90
+ tag = nil,
91
+ obfuscated_to = nil,
92
+ obfuscated_from = nil)
81
93
  @from = from
82
94
  @to = to
83
95
  @call_timeout = call_timeout
@@ -89,6 +101,8 @@ module Bandwidth
89
101
  @disconnect_method = disconnect_method
90
102
  @tag = tag
91
103
  @application_id = application_id
104
+ @obfuscated_to = obfuscated_to
105
+ @obfuscated_from = obfuscated_from
92
106
  end
93
107
 
94
108
  # Creates an instance of the object from a hash.
@@ -107,6 +121,8 @@ module Bandwidth
107
121
  disconnect_url = hash['disconnectUrl']
108
122
  disconnect_method = hash['disconnectMethod']
109
123
  tag = hash['tag']
124
+ obfuscated_to = hash['obfuscatedTo']
125
+ obfuscated_from = hash['obfuscatedFrom']
110
126
 
111
127
  # Create object from extracted values.
112
128
  ApiCreateCallRequest.new(from,
@@ -119,7 +135,9 @@ module Bandwidth
119
135
  answer_method,
120
136
  disconnect_url,
121
137
  disconnect_method,
122
- tag)
138
+ tag,
139
+ obfuscated_to,
140
+ obfuscated_from)
123
141
  end
124
142
  end
125
143
  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
+ # CallEngineModifyConferenceRequest Model.
8
+ class CallEngineModifyConferenceRequest < BaseModel
9
+ # TODO: Write general description for this method
10
+ # @return [StatusEnum]
11
+ attr_accessor :status
12
+
13
+ # A mapping from model property names to API property names.
14
+ def self.names
15
+ @_hash = {} if @_hash.nil?
16
+ @_hash['status'] = 'status'
17
+ @_hash
18
+ end
19
+
20
+ def initialize(status = nil)
21
+ @status = status
22
+ end
23
+
24
+ # Creates an instance of the object from a hash.
25
+ def self.from_hash(hash)
26
+ return nil unless hash
27
+
28
+ # Extract variables from the hash.
29
+ status = hash['status']
30
+
31
+ # Create object from extracted values.
32
+ CallEngineModifyConferenceRequest.new(status)
33
+ end
34
+ end
35
+ 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
@@ -38,7 +38,10 @@ module Bandwidth
38
38
  NODECAPACITYEXCEEDED = 'node-capacity-exceeded'.freeze,
39
39
 
40
40
  # TODO: Write general description for UNKNOWN
41
- UNKNOWN = 'unknown'.freeze
41
+ UNKNOWN = 'unknown'.freeze,
42
+
43
+ # TODO: Write general description for APPLICATIONERROR
44
+ APPLICATIONERROR = 'application-error'.freeze
42
45
  ].freeze
43
46
  end
44
47
  end
@@ -55,7 +55,7 @@ module Bandwidth
55
55
  attr_accessor :file_format
56
56
 
57
57
  # Format is ISO-8601
58
- # @return [StatusEnum]
58
+ # @return [Status1Enum]
59
59
  attr_accessor :status
60
60
 
61
61
  # Format is ISO-8601
@@ -7,26 +7,20 @@ module Bandwidth
7
7
  # Status1.
8
8
  class Status1Enum
9
9
  STATUS1_ENUM = [
10
- # TODO: Write general description for REQUESTED
11
- REQUESTED = 'requested'.freeze,
12
-
13
- # TODO: Write general description for NONE
14
- NONE = 'none'.freeze,
15
-
16
10
  # TODO: Write general description for PROCESSING
17
11
  PROCESSING = 'processing'.freeze,
18
12
 
19
- # TODO: Write general description for AVAILABLE
20
- AVAILABLE = 'available'.freeze,
13
+ # TODO: Write general description for PARTIAL
14
+ PARTIAL = 'partial'.freeze,
21
15
 
22
- # TODO: Write general description for ERROR
23
- ERROR = 'error'.freeze,
16
+ # TODO: Write general description for COMPLETE
17
+ COMPLETE = 'complete'.freeze,
24
18
 
25
- # TODO: Write general description for TIMEOUT
26
- TIMEOUT = 'timeout'.freeze,
19
+ # TODO: Write general description for DELETED
20
+ DELETED = 'deleted'.freeze,
27
21
 
28
- # TODO: Write general description for FILESIZETOOBIG
29
- FILESIZETOOBIG = 'file-size-too-big'.freeze
22
+ # TODO: Write general description for ERROR
23
+ ERROR = 'error'.freeze
30
24
  ].freeze
31
25
  end
32
26
  end
@@ -0,0 +1,32 @@
1
+ # bandwidth
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module Bandwidth
7
+ # Status2.
8
+ class Status2Enum
9
+ STATUS2_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
@@ -7,20 +7,11 @@ module Bandwidth
7
7
  # Status.
8
8
  class StatusEnum
9
9
  STATUS_ENUM = [
10
- # TODO: Write general description for PROCESSING
11
- PROCESSING = 'processing'.freeze,
10
+ # TODO: Write general description for ACTIVE
11
+ ACTIVE = 'active'.freeze,
12
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
13
+ # TODO: Write general description for COMPLETED
14
+ COMPLETED = 'completed'.freeze
24
15
  ].freeze
25
16
  end
26
17
  end