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.
Files changed (98) hide show
  1. checksums.yaml +4 -4
  2. data/lib/bandwidth/api_helper.rb +19 -29
  3. data/lib/bandwidth/client.rb +8 -8
  4. data/lib/bandwidth/configuration.rb +20 -32
  5. data/lib/bandwidth/http/auth/{two_factor_auth_basic_auth.rb → multi_factor_auth_basic_auth.rb} +3 -3
  6. data/lib/bandwidth/http/faraday_client.rb +1 -1
  7. data/lib/bandwidth/messaging_lib/messaging/client.rb +14 -5
  8. data/lib/bandwidth/messaging_lib/messaging/controllers/api_controller.rb +78 -71
  9. data/lib/bandwidth/messaging_lib/messaging/controllers/base_controller.rb +3 -5
  10. data/lib/bandwidth/messaging_lib/messaging/exceptions/messaging_exception.rb +5 -2
  11. data/lib/bandwidth/messaging_lib/messaging/models/bandwidth_callback_message.rb +31 -11
  12. data/lib/bandwidth/messaging_lib/messaging/models/bandwidth_message.rb +54 -25
  13. data/lib/bandwidth/messaging_lib/messaging/models/bandwidth_message_item.rb +102 -24
  14. data/lib/bandwidth/messaging_lib/messaging/models/bandwidth_messages_list.rb +23 -4
  15. data/lib/bandwidth/messaging_lib/messaging/models/deferred_result.rb +20 -4
  16. data/lib/bandwidth/messaging_lib/messaging/models/media.rb +27 -80
  17. data/lib/bandwidth/messaging_lib/messaging/models/message_request.rb +32 -14
  18. data/lib/bandwidth/messaging_lib/messaging/models/page_info.rb +28 -8
  19. data/lib/bandwidth/messaging_lib/messaging/models/tag.rb +20 -4
  20. data/lib/bandwidth/models/base_model.rb +30 -8
  21. data/lib/bandwidth/{two_factor_auth_lib/two_factor_auth → multi_factor_auth_lib/multi_factor_auth}/client.rb +15 -6
  22. data/lib/bandwidth/{two_factor_auth_lib/two_factor_auth → multi_factor_auth_lib/multi_factor_auth}/controllers/base_controller.rb +3 -5
  23. data/lib/bandwidth/{two_factor_auth_lib/two_factor_auth → multi_factor_auth_lib/multi_factor_auth}/controllers/mfa_controller.rb +28 -23
  24. 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
  25. data/lib/bandwidth/{two_factor_auth_lib/two_factor_auth → multi_factor_auth_lib/multi_factor_auth}/exceptions/forbidden_request_exception.rb +4 -1
  26. data/lib/bandwidth/{two_factor_auth_lib/two_factor_auth → multi_factor_auth_lib/multi_factor_auth}/exceptions/unauthorized_request_exception.rb +4 -1
  27. 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
  28. 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
  29. 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
  30. 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
  31. 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
  32. data/lib/bandwidth/multi_factor_auth_lib/multi_factor_auth.rb +23 -0
  33. data/lib/bandwidth/phone_number_lookup_lib/phone_number_lookup/controllers/api_controller.rb +212 -210
  34. data/lib/bandwidth/phone_number_lookup_lib/phone_number_lookup/controllers/base_controller.rb +3 -5
  35. data/lib/bandwidth/phone_number_lookup_lib/phone_number_lookup/exceptions/accounts_tnlookup400_error_exception.rb +4 -1
  36. data/lib/bandwidth/phone_number_lookup_lib/phone_number_lookup/models/order_request.rb +17 -2
  37. data/lib/bandwidth/phone_number_lookup_lib/phone_number_lookup/models/order_response.rb +20 -4
  38. data/lib/bandwidth/phone_number_lookup_lib/phone_number_lookup/models/order_status.rb +28 -7
  39. data/lib/bandwidth/phone_number_lookup_lib/phone_number_lookup/models/result.rb +43 -18
  40. data/lib/bandwidth/utilities/date_time_helper.rb +156 -0
  41. data/lib/bandwidth/utilities/file_wrapper.rb +1 -2
  42. data/lib/bandwidth/voice_lib/voice/client.rb +14 -5
  43. data/lib/bandwidth/voice_lib/voice/controllers/api_controller.rb +418 -379
  44. data/lib/bandwidth/voice_lib/voice/controllers/base_controller.rb +3 -5
  45. data/lib/bandwidth/voice_lib/voice/exceptions/{api_error_response_exception.rb → api_error_exception.rb} +8 -5
  46. data/lib/bandwidth/voice_lib/voice/models/call_callback.rb +343 -0
  47. data/lib/bandwidth/voice_lib/voice/models/call_recording_metadata.rb +250 -0
  48. data/lib/bandwidth/voice_lib/voice/models/call_state.rb +284 -0
  49. data/lib/bandwidth/voice_lib/voice/models/callback_method_enum.rb +2 -20
  50. data/lib/bandwidth/voice_lib/voice/models/conference_callback.rb +211 -0
  51. data/lib/bandwidth/voice_lib/voice/models/conference_event_method_enum.rb +2 -20
  52. data/lib/bandwidth/voice_lib/voice/models/{conference_member_detail.rb → conference_member_state.rb} +43 -20
  53. data/lib/bandwidth/voice_lib/voice/models/conference_recording_metadata.rb +173 -0
  54. data/lib/bandwidth/voice_lib/voice/models/conference_state.rb +153 -0
  55. data/lib/bandwidth/voice_lib/voice/models/create_call_request.rb +301 -0
  56. data/lib/bandwidth/voice_lib/voice/models/create_call_response.rb +256 -0
  57. data/lib/bandwidth/voice_lib/voice/models/diversion.rb +80 -0
  58. data/lib/bandwidth/voice_lib/voice/models/fallback_method_enum.rb +17 -0
  59. data/lib/bandwidth/voice_lib/voice/models/machine_detection_configuration.rb +218 -0
  60. data/lib/bandwidth/voice_lib/voice/models/mode_enum.rb +20 -0
  61. data/lib/bandwidth/voice_lib/voice/models/{modify_call_recording_state.rb → modify_call_recording_request.rb} +19 -6
  62. data/lib/bandwidth/voice_lib/voice/models/modify_call_request.rb +156 -0
  63. data/lib/bandwidth/voice_lib/voice/models/modify_conference_request.rb +144 -0
  64. data/lib/bandwidth/voice_lib/voice/models/state1_enum.rb +7 -4
  65. data/lib/bandwidth/voice_lib/voice/models/state_enum.rb +4 -7
  66. data/lib/bandwidth/voice_lib/voice/models/transcribe_recording_request.rb +108 -0
  67. data/lib/bandwidth/voice_lib/voice/models/transcript.rb +20 -4
  68. data/lib/bandwidth/voice_lib/voice/models/transcription.rb +35 -17
  69. data/lib/bandwidth/voice_lib/voice/models/transcription_metadata.rb +89 -0
  70. data/lib/bandwidth/voice_lib/voice/models/transcription_response.rb +18 -1
  71. data/lib/bandwidth/voice_lib/voice.rb +20 -18
  72. data/lib/bandwidth/web_rtc_lib/utils/web_rtc_transfer.rb +7 -2
  73. data/lib/bandwidth/web_rtc_lib/web_rtc/client.rb +4 -4
  74. data/lib/bandwidth/web_rtc_lib/web_rtc/controllers/api_controller.rb +75 -64
  75. data/lib/bandwidth/web_rtc_lib/web_rtc/controllers/base_controller.rb +3 -5
  76. data/lib/bandwidth/web_rtc_lib/web_rtc/exceptions/error_exception.rb +5 -2
  77. data/lib/bandwidth/web_rtc_lib/web_rtc/models/accounts_participants_response.rb +20 -5
  78. data/lib/bandwidth/web_rtc_lib/web_rtc/models/participant.rb +37 -14
  79. data/lib/bandwidth/web_rtc_lib/web_rtc/models/participant_subscription.rb +15 -2
  80. data/lib/bandwidth/web_rtc_lib/web_rtc/models/session.rb +20 -4
  81. data/lib/bandwidth/web_rtc_lib/web_rtc/models/subscriptions.rb +20 -3
  82. data/lib/bandwidth.rb +20 -18
  83. data/test/integration/test_integration.rb +92 -57
  84. metadata +35 -31
  85. data/lib/bandwidth/two_factor_auth_lib/two_factor_auth.rb +0 -22
  86. data/lib/bandwidth/voice_lib/voice/models/api_call_response.rb +0 -207
  87. data/lib/bandwidth/voice_lib/voice/models/api_call_state_response.rb +0 -164
  88. data/lib/bandwidth/voice_lib/voice/models/api_create_call_request.rb +0 -248
  89. data/lib/bandwidth/voice_lib/voice/models/api_modify_call_request.rb +0 -116
  90. data/lib/bandwidth/voice_lib/voice/models/api_modify_conference_request.rb +0 -107
  91. data/lib/bandwidth/voice_lib/voice/models/api_transcribe_recording_request.rb +0 -80
  92. data/lib/bandwidth/voice_lib/voice/models/conference_detail.rb +0 -108
  93. data/lib/bandwidth/voice_lib/voice/models/conference_recording_metadata_response.rb +0 -126
  94. data/lib/bandwidth/voice_lib/voice/models/disconnect_cause_enum.rb +0 -47
  95. data/lib/bandwidth/voice_lib/voice/models/recording_metadata_response.rb +0 -190
  96. data/lib/bandwidth/voice_lib/voice/models/state2_enum.rb +0 -20
  97. data/lib/bandwidth/voice_lib/voice/models/status1_enum.rb +0 -29
  98. data/lib/bandwidth/voice_lib/voice/models/status3_enum.rb +0 -32
@@ -1,190 +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
- # RecordingMetadataResponse Model.
9
- class RecordingMetadataResponse < BaseModel
10
- # TODO: Write general description for this method
11
- # @return [String]
12
- attr_accessor :application_id
13
-
14
- # TODO: Write general description for this method
15
- # @return [String]
16
- attr_accessor :account_id
17
-
18
- # TODO: Write general description for this method
19
- # @return [String]
20
- attr_accessor :call_id
21
-
22
- # TODO: Write general description for this method
23
- # @return [String]
24
- attr_accessor :parent_call_id
25
-
26
- # TODO: Write general description for this method
27
- # @return [String]
28
- attr_accessor :recording_id
29
-
30
- # TODO: Write general description for this method
31
- # @return [String]
32
- attr_accessor :to
33
-
34
- # TODO: Write general description for this method
35
- # @return [String]
36
- attr_accessor :from
37
-
38
- # TODO: Write general description for this method
39
- # @return [String]
40
- attr_accessor :transfer_caller_id
41
-
42
- # TODO: Write general description for this method
43
- # @return [String]
44
- attr_accessor :transfer_to
45
-
46
- # Format is ISO-8601
47
- # @return [String]
48
- attr_accessor :duration
49
-
50
- # Format is ISO-8601
51
- # @return [DirectionEnum]
52
- attr_accessor :direction
53
-
54
- # Format is ISO-8601
55
- # @return [Integer]
56
- attr_accessor :channels
57
-
58
- # Format is ISO-8601
59
- # @return [DateTime]
60
- attr_accessor :start_time
61
-
62
- # Format is ISO-8601
63
- # @return [DateTime]
64
- attr_accessor :end_time
65
-
66
- # Format is ISO-8601
67
- # @return [FileFormatEnum]
68
- attr_accessor :file_format
69
-
70
- # Format is ISO-8601
71
- # @return [Status1Enum]
72
- attr_accessor :status
73
-
74
- # Format is ISO-8601
75
- # @return [String]
76
- attr_accessor :media_url
77
-
78
- # Format is ISO-8601
79
- # @return [Transcription]
80
- attr_accessor :transcription
81
-
82
- # A mapping from model property names to API property names.
83
- def self.names
84
- @_hash = {} if @_hash.nil?
85
- @_hash['application_id'] = 'applicationId'
86
- @_hash['account_id'] = 'accountId'
87
- @_hash['call_id'] = 'callId'
88
- @_hash['parent_call_id'] = 'parentCallId'
89
- @_hash['recording_id'] = 'recordingId'
90
- @_hash['to'] = 'to'
91
- @_hash['from'] = 'from'
92
- @_hash['transfer_caller_id'] = 'transferCallerId'
93
- @_hash['transfer_to'] = 'transferTo'
94
- @_hash['duration'] = 'duration'
95
- @_hash['direction'] = 'direction'
96
- @_hash['channels'] = 'channels'
97
- @_hash['start_time'] = 'startTime'
98
- @_hash['end_time'] = 'endTime'
99
- @_hash['file_format'] = 'fileFormat'
100
- @_hash['status'] = 'status'
101
- @_hash['media_url'] = 'mediaUrl'
102
- @_hash['transcription'] = 'transcription'
103
- @_hash
104
- end
105
-
106
- def initialize(application_id = nil,
107
- account_id = nil,
108
- call_id = nil,
109
- parent_call_id = nil,
110
- recording_id = nil,
111
- to = nil,
112
- from = nil,
113
- transfer_caller_id = nil,
114
- transfer_to = nil,
115
- duration = nil,
116
- direction = nil,
117
- channels = nil,
118
- start_time = nil,
119
- end_time = nil,
120
- file_format = nil,
121
- status = nil,
122
- media_url = nil,
123
- transcription = nil)
124
- @application_id = application_id
125
- @account_id = account_id
126
- @call_id = call_id
127
- @parent_call_id = parent_call_id
128
- @recording_id = recording_id
129
- @to = to
130
- @from = from
131
- @transfer_caller_id = transfer_caller_id
132
- @transfer_to = transfer_to
133
- @duration = duration
134
- @direction = direction
135
- @channels = channels
136
- @start_time = start_time
137
- @end_time = end_time
138
- @file_format = file_format
139
- @status = status
140
- @media_url = media_url
141
- @transcription = transcription
142
- end
143
-
144
- # Creates an instance of the object from a hash.
145
- def self.from_hash(hash)
146
- return nil unless hash
147
-
148
- # Extract variables from the hash.
149
- application_id = hash['applicationId']
150
- account_id = hash['accountId']
151
- call_id = hash['callId']
152
- parent_call_id = hash['parentCallId']
153
- recording_id = hash['recordingId']
154
- to = hash['to']
155
- from = hash['from']
156
- transfer_caller_id = hash['transferCallerId']
157
- transfer_to = hash['transferTo']
158
- duration = hash['duration']
159
- direction = hash['direction']
160
- channels = hash['channels']
161
- start_time = APIHelper.rfc3339(hash['startTime']) if hash['startTime']
162
- end_time = APIHelper.rfc3339(hash['endTime']) if hash['endTime']
163
- file_format = hash['fileFormat']
164
- status = hash['status']
165
- media_url = hash['mediaUrl']
166
- transcription = Transcription.from_hash(hash['transcription']) if
167
- hash['transcription']
168
-
169
- # Create object from extracted values.
170
- RecordingMetadataResponse.new(application_id,
171
- account_id,
172
- call_id,
173
- parent_call_id,
174
- recording_id,
175
- to,
176
- from,
177
- transfer_caller_id,
178
- transfer_to,
179
- duration,
180
- direction,
181
- channels,
182
- start_time,
183
- end_time,
184
- file_format,
185
- status,
186
- media_url,
187
- transcription)
188
- end
189
- end
190
- 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