bandwidth-sdk 18.0.0 → 18.1.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 (82) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +4 -4
  3. data/README.md +28 -1
  4. data/bandwidth.yml +944 -19
  5. data/coverage/.last_run.json +1 -1
  6. data/coverage/.resultset.json +784 -152
  7. data/coverage/index.html +21650 -14800
  8. data/docs/BrtcError.md +26 -0
  9. data/docs/BrtcErrorResponse.md +22 -0
  10. data/docs/BrtcErrorSource.md +24 -0
  11. data/docs/BrtcLink.md +22 -0
  12. data/docs/CreateCall.md +2 -2
  13. data/docs/CreateEndpointRequestBase.md +26 -0
  14. data/docs/CreateEndpointResponse.md +22 -0
  15. data/docs/CreateEndpointResponseData.md +32 -0
  16. data/docs/CreateWebRtcConnectionRequest.md +28 -0
  17. data/docs/Device.md +24 -0
  18. data/docs/DeviceStatusEnum.md +15 -0
  19. data/docs/Endpoint.md +30 -0
  20. data/docs/EndpointDirectionEnum.md +15 -0
  21. data/docs/EndpointEvent.md +34 -0
  22. data/docs/EndpointEventTypeEnum.md +15 -0
  23. data/docs/EndpointResponse.md +22 -0
  24. data/docs/EndpointStatusEnum.md +15 -0
  25. data/docs/EndpointTypeEnum.md +15 -0
  26. data/docs/Endpoints.md +28 -0
  27. data/docs/EndpointsApi.md +395 -0
  28. data/docs/InboundCallback.md +2 -2
  29. data/docs/ListEndpointsResponse.md +24 -0
  30. data/docs/LookupResult.md +1 -1
  31. data/docs/MachineDetectionConfiguration.md +1 -1
  32. data/docs/MessageRequest.md +1 -1
  33. data/docs/Page.md +24 -0
  34. data/docs/RbmActionBase.md +1 -1
  35. data/docs/RbmSuggestionResponse.md +1 -1
  36. data/docs/SipConnectionMetadata.md +24 -0
  37. data/docs/SipCredentials.md +20 -0
  38. data/docs/StatusCallback.md +1 -1
  39. data/docs/SyncLookupRequest.md +3 -1
  40. data/docs/UpdateCall.md +1 -1
  41. data/docs/WebhookSubscriptionError.md +22 -0
  42. data/docs/WebhookSubscriptionsListBody.md +1 -1
  43. data/lib/bandwidth-sdk/api/endpoints_api.rb +397 -0
  44. data/lib/bandwidth-sdk/configuration.rb +30 -0
  45. data/lib/bandwidth-sdk/models/brtc_error.rb +219 -0
  46. data/lib/bandwidth-sdk/models/brtc_error_response.rb +204 -0
  47. data/lib/bandwidth-sdk/models/brtc_error_source.rb +176 -0
  48. data/lib/bandwidth-sdk/models/brtc_link.rb +166 -0
  49. data/lib/bandwidth-sdk/models/create_call.rb +7 -7
  50. data/lib/bandwidth-sdk/models/create_endpoint_request_base.rb +250 -0
  51. data/lib/bandwidth-sdk/models/create_endpoint_response.rb +218 -0
  52. data/lib/bandwidth-sdk/models/create_endpoint_response_data.rb +356 -0
  53. data/lib/bandwidth-sdk/models/create_web_rtc_connection_request.rb +266 -0
  54. data/lib/bandwidth-sdk/models/device.rb +258 -0
  55. data/lib/bandwidth-sdk/models/device_status_enum.rb +40 -0
  56. data/lib/bandwidth-sdk/models/endpoint.rb +329 -0
  57. data/lib/bandwidth-sdk/models/endpoint_direction_enum.rb +41 -0
  58. data/lib/bandwidth-sdk/models/endpoint_event.rb +381 -0
  59. data/lib/bandwidth-sdk/models/endpoint_event_type_enum.rb +40 -0
  60. data/lib/bandwidth-sdk/models/endpoint_response.rb +218 -0
  61. data/lib/bandwidth-sdk/models/endpoint_status_enum.rb +40 -0
  62. data/lib/bandwidth-sdk/models/endpoint_type_enum.rb +39 -0
  63. data/lib/bandwidth-sdk/models/endpoints.rb +311 -0
  64. data/lib/bandwidth-sdk/models/inbound_callback.rb +2 -2
  65. data/lib/bandwidth-sdk/models/list_endpoints_response.rb +229 -0
  66. data/lib/bandwidth-sdk/models/lookup_result.rb +1 -1
  67. data/lib/bandwidth-sdk/models/machine_detection_configuration.rb +1 -1
  68. data/lib/bandwidth-sdk/models/message_request.rb +1 -1
  69. data/lib/bandwidth-sdk/models/page.rb +259 -0
  70. data/lib/bandwidth-sdk/models/sip_connection_metadata.rb +175 -0
  71. data/lib/bandwidth-sdk/models/sip_credentials.rb +156 -0
  72. data/lib/bandwidth-sdk/models/status_callback.rb +1 -1
  73. data/lib/bandwidth-sdk/models/sync_lookup_request.rb +35 -4
  74. data/lib/bandwidth-sdk/models/update_call.rb +6 -6
  75. data/lib/bandwidth-sdk/models/webhook_subscription_error.rb +165 -0
  76. data/lib/bandwidth-sdk/models/webhook_subscriptions_list_body.rb +1 -1
  77. data/lib/bandwidth-sdk/version.rb +1 -1
  78. data/lib/bandwidth-sdk.rb +24 -1
  79. data/spec/smoke/endpoints_api_spec.rb +148 -0
  80. data/spec/unit/api/endpoints_api_spec.rb +172 -0
  81. data/spec/unit/api/phone_number_lookup_api_spec.rb +2 -0
  82. metadata +104 -52
@@ -0,0 +1,397 @@
1
+ =begin
2
+ #Bandwidth
3
+
4
+ #Bandwidth's Communication APIs
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: letstalk@bandwidth.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.17.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module Bandwidth
16
+ class EndpointsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Create Endpoint
23
+ # Creates a new Endpoint for the specified account.
24
+ # @param account_id [String] Your Bandwidth Account ID.
25
+ # @param body [CreateWebRtcConnectionRequest]
26
+ # @param [Hash] opts the optional parameters
27
+ # @return [CreateEndpointResponse]
28
+ def create_endpoint(account_id, body, opts = {})
29
+ data, _status_code, _headers = create_endpoint_with_http_info(account_id, body, opts)
30
+ data
31
+ end
32
+
33
+ # Create Endpoint
34
+ # Creates a new Endpoint for the specified account.
35
+ # @param account_id [String] Your Bandwidth Account ID.
36
+ # @param body [CreateWebRtcConnectionRequest]
37
+ # @param [Hash] opts the optional parameters
38
+ # @return [Array<(CreateEndpointResponse, Integer, Hash)>] CreateEndpointResponse data, response status code and response headers
39
+ def create_endpoint_with_http_info(account_id, body, opts = {})
40
+ if @api_client.config.debugging
41
+ @api_client.config.logger.debug 'Calling API: EndpointsApi.create_endpoint ...'
42
+ end
43
+ # verify the required parameter 'account_id' is set
44
+ if @api_client.config.client_side_validation && account_id.nil?
45
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling EndpointsApi.create_endpoint"
46
+ end
47
+ # verify the required parameter 'body' is set
48
+ if @api_client.config.client_side_validation && body.nil?
49
+ fail ArgumentError, "Missing the required parameter 'body' when calling EndpointsApi.create_endpoint"
50
+ end
51
+ # resource path
52
+ local_var_path = '/accounts/{accountId}/endpoints'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s))
53
+
54
+ # query parameters
55
+ query_params = opts[:query_params] || {}
56
+
57
+ # header parameters
58
+ header_params = opts[:header_params] || {}
59
+ # HTTP header 'Accept' (if needed)
60
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
61
+ # HTTP header 'Content-Type'
62
+ content_type = @api_client.select_header_content_type(['application/json'])
63
+ if !content_type.nil?
64
+ header_params['Content-Type'] = content_type
65
+ end
66
+
67
+ # form parameters
68
+ form_params = opts[:form_params] || {}
69
+
70
+ # http body (model)
71
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
72
+
73
+ # return_type
74
+ return_type = opts[:debug_return_type] || 'CreateEndpointResponse'
75
+
76
+ # auth_names
77
+ auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2']
78
+
79
+ new_options = opts.merge(
80
+ :operation => :"EndpointsApi.create_endpoint",
81
+ :header_params => header_params,
82
+ :query_params => query_params,
83
+ :form_params => form_params,
84
+ :body => post_body,
85
+ :auth_names => auth_names,
86
+ :return_type => return_type
87
+ )
88
+
89
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
90
+ if @api_client.config.debugging
91
+ @api_client.config.logger.debug "API called: EndpointsApi#create_endpoint\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
92
+ end
93
+ return data, status_code, headers
94
+ end
95
+
96
+ # Delete Endpoint
97
+ # Deletes the specified endpoint. If the endpoint is actively streaming media, the media stream will be terminated.
98
+ # @param account_id [String] Your Bandwidth Account ID.
99
+ # @param endpoint_id [String] BRTC Endpoint ID.
100
+ # @param [Hash] opts the optional parameters
101
+ # @return [nil]
102
+ def delete_endpoint(account_id, endpoint_id, opts = {})
103
+ delete_endpoint_with_http_info(account_id, endpoint_id, opts)
104
+ nil
105
+ end
106
+
107
+ # Delete Endpoint
108
+ # Deletes the specified endpoint. If the endpoint is actively streaming media, the media stream will be terminated.
109
+ # @param account_id [String] Your Bandwidth Account ID.
110
+ # @param endpoint_id [String] BRTC Endpoint ID.
111
+ # @param [Hash] opts the optional parameters
112
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
113
+ def delete_endpoint_with_http_info(account_id, endpoint_id, opts = {})
114
+ if @api_client.config.debugging
115
+ @api_client.config.logger.debug 'Calling API: EndpointsApi.delete_endpoint ...'
116
+ end
117
+ # verify the required parameter 'account_id' is set
118
+ if @api_client.config.client_side_validation && account_id.nil?
119
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling EndpointsApi.delete_endpoint"
120
+ end
121
+ # verify the required parameter 'endpoint_id' is set
122
+ if @api_client.config.client_side_validation && endpoint_id.nil?
123
+ fail ArgumentError, "Missing the required parameter 'endpoint_id' when calling EndpointsApi.delete_endpoint"
124
+ end
125
+ # resource path
126
+ local_var_path = '/accounts/{accountId}/endpoints/{endpointId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'endpointId' + '}', CGI.escape(endpoint_id.to_s))
127
+
128
+ # query parameters
129
+ query_params = opts[:query_params] || {}
130
+
131
+ # header parameters
132
+ header_params = opts[:header_params] || {}
133
+ # HTTP header 'Accept' (if needed)
134
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
135
+
136
+ # form parameters
137
+ form_params = opts[:form_params] || {}
138
+
139
+ # http body (model)
140
+ post_body = opts[:debug_body]
141
+
142
+ # return_type
143
+ return_type = opts[:debug_return_type]
144
+
145
+ # auth_names
146
+ auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2']
147
+
148
+ new_options = opts.merge(
149
+ :operation => :"EndpointsApi.delete_endpoint",
150
+ :header_params => header_params,
151
+ :query_params => query_params,
152
+ :form_params => form_params,
153
+ :body => post_body,
154
+ :auth_names => auth_names,
155
+ :return_type => return_type
156
+ )
157
+
158
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
159
+ if @api_client.config.debugging
160
+ @api_client.config.logger.debug "API called: EndpointsApi#delete_endpoint\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
161
+ end
162
+ return data, status_code, headers
163
+ end
164
+
165
+ # Get Endpoint
166
+ # Returns information about the specified endpoint.
167
+ # @param account_id [String] Your Bandwidth Account ID.
168
+ # @param endpoint_id [String] BRTC Endpoint ID.
169
+ # @param [Hash] opts the optional parameters
170
+ # @return [EndpointResponse]
171
+ def get_endpoint(account_id, endpoint_id, opts = {})
172
+ data, _status_code, _headers = get_endpoint_with_http_info(account_id, endpoint_id, opts)
173
+ data
174
+ end
175
+
176
+ # Get Endpoint
177
+ # Returns information about the specified endpoint.
178
+ # @param account_id [String] Your Bandwidth Account ID.
179
+ # @param endpoint_id [String] BRTC Endpoint ID.
180
+ # @param [Hash] opts the optional parameters
181
+ # @return [Array<(EndpointResponse, Integer, Hash)>] EndpointResponse data, response status code and response headers
182
+ def get_endpoint_with_http_info(account_id, endpoint_id, opts = {})
183
+ if @api_client.config.debugging
184
+ @api_client.config.logger.debug 'Calling API: EndpointsApi.get_endpoint ...'
185
+ end
186
+ # verify the required parameter 'account_id' is set
187
+ if @api_client.config.client_side_validation && account_id.nil?
188
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling EndpointsApi.get_endpoint"
189
+ end
190
+ # verify the required parameter 'endpoint_id' is set
191
+ if @api_client.config.client_side_validation && endpoint_id.nil?
192
+ fail ArgumentError, "Missing the required parameter 'endpoint_id' when calling EndpointsApi.get_endpoint"
193
+ end
194
+ # resource path
195
+ local_var_path = '/accounts/{accountId}/endpoints/{endpointId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'endpointId' + '}', CGI.escape(endpoint_id.to_s))
196
+
197
+ # query parameters
198
+ query_params = opts[:query_params] || {}
199
+
200
+ # header parameters
201
+ header_params = opts[:header_params] || {}
202
+ # HTTP header 'Accept' (if needed)
203
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
204
+
205
+ # form parameters
206
+ form_params = opts[:form_params] || {}
207
+
208
+ # http body (model)
209
+ post_body = opts[:debug_body]
210
+
211
+ # return_type
212
+ return_type = opts[:debug_return_type] || 'EndpointResponse'
213
+
214
+ # auth_names
215
+ auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2']
216
+
217
+ new_options = opts.merge(
218
+ :operation => :"EndpointsApi.get_endpoint",
219
+ :header_params => header_params,
220
+ :query_params => query_params,
221
+ :form_params => form_params,
222
+ :body => post_body,
223
+ :auth_names => auth_names,
224
+ :return_type => return_type
225
+ )
226
+
227
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
228
+ if @api_client.config.debugging
229
+ @api_client.config.logger.debug "API called: EndpointsApi#get_endpoint\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
230
+ end
231
+ return data, status_code, headers
232
+ end
233
+
234
+ # List Endpoints
235
+ # Returns a list of endpoints associated with the specified account.
236
+ # @param account_id [String] Your Bandwidth Account ID.
237
+ # @param [Hash] opts the optional parameters
238
+ # @option opts [EndpointTypeEnum] :type The type of endpoint.
239
+ # @option opts [EndpointStatusEnum] :status The status of the endpoint.
240
+ # @option opts [String] :after_cursor The cursor to use for pagination. This is the value of the &#x60;next&#x60; link in the previous response.
241
+ # @option opts [Integer] :limit The maximum number of endpoints to return in the response. (default to 100)
242
+ # @return [ListEndpointsResponse]
243
+ def list_endpoints(account_id, opts = {})
244
+ data, _status_code, _headers = list_endpoints_with_http_info(account_id, opts)
245
+ data
246
+ end
247
+
248
+ # List Endpoints
249
+ # Returns a list of endpoints associated with the specified account.
250
+ # @param account_id [String] Your Bandwidth Account ID.
251
+ # @param [Hash] opts the optional parameters
252
+ # @option opts [EndpointTypeEnum] :type The type of endpoint.
253
+ # @option opts [EndpointStatusEnum] :status The status of the endpoint.
254
+ # @option opts [String] :after_cursor The cursor to use for pagination. This is the value of the &#x60;next&#x60; link in the previous response.
255
+ # @option opts [Integer] :limit The maximum number of endpoints to return in the response. (default to 100)
256
+ # @return [Array<(ListEndpointsResponse, Integer, Hash)>] ListEndpointsResponse data, response status code and response headers
257
+ def list_endpoints_with_http_info(account_id, opts = {})
258
+ if @api_client.config.debugging
259
+ @api_client.config.logger.debug 'Calling API: EndpointsApi.list_endpoints ...'
260
+ end
261
+ # verify the required parameter 'account_id' is set
262
+ if @api_client.config.client_side_validation && account_id.nil?
263
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling EndpointsApi.list_endpoints"
264
+ end
265
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 1000
266
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling EndpointsApi.list_endpoints, must be smaller than or equal to 1000.'
267
+ end
268
+
269
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
270
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling EndpointsApi.list_endpoints, must be greater than or equal to 1.'
271
+ end
272
+
273
+ # resource path
274
+ local_var_path = '/accounts/{accountId}/endpoints'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s))
275
+
276
+ # query parameters
277
+ query_params = opts[:query_params] || {}
278
+ query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
279
+ query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
280
+ query_params[:'afterCursor'] = opts[:'after_cursor'] if !opts[:'after_cursor'].nil?
281
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
282
+
283
+ # header parameters
284
+ header_params = opts[:header_params] || {}
285
+ # HTTP header 'Accept' (if needed)
286
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
287
+
288
+ # form parameters
289
+ form_params = opts[:form_params] || {}
290
+
291
+ # http body (model)
292
+ post_body = opts[:debug_body]
293
+
294
+ # return_type
295
+ return_type = opts[:debug_return_type] || 'ListEndpointsResponse'
296
+
297
+ # auth_names
298
+ auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2']
299
+
300
+ new_options = opts.merge(
301
+ :operation => :"EndpointsApi.list_endpoints",
302
+ :header_params => header_params,
303
+ :query_params => query_params,
304
+ :form_params => form_params,
305
+ :body => post_body,
306
+ :auth_names => auth_names,
307
+ :return_type => return_type
308
+ )
309
+
310
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
311
+ if @api_client.config.debugging
312
+ @api_client.config.logger.debug "API called: EndpointsApi#list_endpoints\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
313
+ end
314
+ return data, status_code, headers
315
+ end
316
+
317
+ # Update Endpoint BXML
318
+ # Updates the BXML for the specified endpoint.
319
+ # @param account_id [String] Your Bandwidth Account ID.
320
+ # @param endpoint_id [String] BRTC Endpoint ID.
321
+ # @param body [String]
322
+ # @param [Hash] opts the optional parameters
323
+ # @return [nil]
324
+ def update_endpoint_bxml(account_id, endpoint_id, body, opts = {})
325
+ update_endpoint_bxml_with_http_info(account_id, endpoint_id, body, opts)
326
+ nil
327
+ end
328
+
329
+ # Update Endpoint BXML
330
+ # Updates the BXML for the specified endpoint.
331
+ # @param account_id [String] Your Bandwidth Account ID.
332
+ # @param endpoint_id [String] BRTC Endpoint ID.
333
+ # @param body [String]
334
+ # @param [Hash] opts the optional parameters
335
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
336
+ def update_endpoint_bxml_with_http_info(account_id, endpoint_id, body, opts = {})
337
+ if @api_client.config.debugging
338
+ @api_client.config.logger.debug 'Calling API: EndpointsApi.update_endpoint_bxml ...'
339
+ end
340
+ # verify the required parameter 'account_id' is set
341
+ if @api_client.config.client_side_validation && account_id.nil?
342
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling EndpointsApi.update_endpoint_bxml"
343
+ end
344
+ # verify the required parameter 'endpoint_id' is set
345
+ if @api_client.config.client_side_validation && endpoint_id.nil?
346
+ fail ArgumentError, "Missing the required parameter 'endpoint_id' when calling EndpointsApi.update_endpoint_bxml"
347
+ end
348
+ # verify the required parameter 'body' is set
349
+ if @api_client.config.client_side_validation && body.nil?
350
+ fail ArgumentError, "Missing the required parameter 'body' when calling EndpointsApi.update_endpoint_bxml"
351
+ end
352
+ # resource path
353
+ local_var_path = '/accounts/{accountId}/endpoints/{endpointId}/bxml'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'endpointId' + '}', CGI.escape(endpoint_id.to_s))
354
+
355
+ # query parameters
356
+ query_params = opts[:query_params] || {}
357
+
358
+ # header parameters
359
+ header_params = opts[:header_params] || {}
360
+ # HTTP header 'Accept' (if needed)
361
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
362
+ # HTTP header 'Content-Type'
363
+ content_type = @api_client.select_header_content_type(['application/xml'])
364
+ if !content_type.nil?
365
+ header_params['Content-Type'] = content_type
366
+ end
367
+
368
+ # form parameters
369
+ form_params = opts[:form_params] || {}
370
+
371
+ # http body (model)
372
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
373
+
374
+ # return_type
375
+ return_type = opts[:debug_return_type]
376
+
377
+ # auth_names
378
+ auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2']
379
+
380
+ new_options = opts.merge(
381
+ :operation => :"EndpointsApi.update_endpoint_bxml",
382
+ :header_params => header_params,
383
+ :query_params => query_params,
384
+ :form_params => form_params,
385
+ :body => post_body,
386
+ :auth_names => auth_names,
387
+ :return_type => return_type
388
+ )
389
+
390
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
391
+ if @api_client.config.debugging
392
+ @api_client.config.logger.debug "API called: EndpointsApi#update_endpoint_bxml\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
393
+ end
394
+ return data, status_code, headers
395
+ end
396
+ end
397
+ end
@@ -403,6 +403,36 @@ module Bandwidth
403
403
  description: "Production",
404
404
  }
405
405
  ],
406
+ "EndpointsApi.create_endpoint": [
407
+ {
408
+ url: "https://api.bandwidth.com/v2",
409
+ description: "Production",
410
+ }
411
+ ],
412
+ "EndpointsApi.delete_endpoint": [
413
+ {
414
+ url: "https://api.bandwidth.com/v2",
415
+ description: "Production",
416
+ }
417
+ ],
418
+ "EndpointsApi.get_endpoint": [
419
+ {
420
+ url: "https://api.bandwidth.com/v2",
421
+ description: "Production",
422
+ }
423
+ ],
424
+ "EndpointsApi.list_endpoints": [
425
+ {
426
+ url: "https://api.bandwidth.com/v2",
427
+ description: "Production",
428
+ }
429
+ ],
430
+ "EndpointsApi.update_endpoint_bxml": [
431
+ {
432
+ url: "https://api.bandwidth.com/v2",
433
+ description: "Production",
434
+ }
435
+ ],
406
436
  "MFAApi.generate_messaging_code": [
407
437
  {
408
438
  url: "https://mfa.bandwidth.com/api/v1",
@@ -0,0 +1,219 @@
1
+ =begin
2
+ #Bandwidth
3
+
4
+ #Bandwidth's Communication APIs
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: letstalk@bandwidth.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.17.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Bandwidth
17
+ class BrtcError < ApiModelBase
18
+ # A unique identifier for the error.
19
+ attr_accessor :id
20
+
21
+ # The type of error.
22
+ attr_accessor :type
23
+
24
+ # A description of the error.
25
+ attr_accessor :description
26
+
27
+ # A code that uniquely identifies the error.
28
+ attr_accessor :code
29
+
30
+ attr_accessor :source
31
+
32
+ # Attribute mapping from ruby-style variable name to JSON key.
33
+ def self.attribute_map
34
+ {
35
+ :'id' => :'id',
36
+ :'type' => :'type',
37
+ :'description' => :'description',
38
+ :'code' => :'code',
39
+ :'source' => :'source'
40
+ }
41
+ end
42
+
43
+ # Returns attribute mapping this model knows about
44
+ def self.acceptable_attribute_map
45
+ attribute_map
46
+ end
47
+
48
+ # Returns all the JSON keys this model knows about
49
+ def self.acceptable_attributes
50
+ acceptable_attribute_map.values
51
+ end
52
+
53
+ # Attribute type mapping.
54
+ def self.openapi_types
55
+ {
56
+ :'id' => :'String',
57
+ :'type' => :'String',
58
+ :'description' => :'String',
59
+ :'code' => :'String',
60
+ :'source' => :'BrtcErrorSource'
61
+ }
62
+ end
63
+
64
+ # List of attributes with nullable: true
65
+ def self.openapi_nullable
66
+ Set.new([
67
+ ])
68
+ end
69
+
70
+ # Initializes the object
71
+ # @param [Hash] attributes Model attributes in the form of hash
72
+ def initialize(attributes = {})
73
+ if (!attributes.is_a?(Hash))
74
+ fail ArgumentError, 'The input argument (attributes) must be a hash in `Bandwidth::BrtcError` initialize method'
75
+ end
76
+
77
+ # check to see if the attribute exists and convert string to symbol for hash key
78
+ acceptable_attribute_map = self.class.acceptable_attribute_map
79
+ attributes = attributes.each_with_object({}) { |(k, v), h|
80
+ if (!acceptable_attribute_map.key?(k.to_sym))
81
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::BrtcError`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
82
+ end
83
+ h[k.to_sym] = v
84
+ }
85
+
86
+ if attributes.key?(:'id')
87
+ self.id = attributes[:'id']
88
+ end
89
+
90
+ if attributes.key?(:'type')
91
+ self.type = attributes[:'type']
92
+ else
93
+ self.type = nil
94
+ end
95
+
96
+ if attributes.key?(:'description')
97
+ self.description = attributes[:'description']
98
+ else
99
+ self.description = nil
100
+ end
101
+
102
+ if attributes.key?(:'code')
103
+ self.code = attributes[:'code']
104
+ end
105
+
106
+ if attributes.key?(:'source')
107
+ self.source = attributes[:'source']
108
+ end
109
+ end
110
+
111
+ # Show invalid properties with the reasons. Usually used together with valid?
112
+ # @return Array for valid properties with the reasons
113
+ def list_invalid_properties
114
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
115
+ invalid_properties = Array.new
116
+ if @type.nil?
117
+ invalid_properties.push('invalid value for "type", type cannot be nil.')
118
+ end
119
+
120
+ if @description.nil?
121
+ invalid_properties.push('invalid value for "description", description cannot be nil.')
122
+ end
123
+
124
+ invalid_properties
125
+ end
126
+
127
+ # Check to see if the all the properties in the model are valid
128
+ # @return true if the model is valid
129
+ def valid?
130
+ warn '[DEPRECATED] the `valid?` method is obsolete'
131
+ return false if @type.nil?
132
+ return false if @description.nil?
133
+ true
134
+ end
135
+
136
+ # Custom attribute writer method with validation
137
+ # @param [Object] type Value to be assigned
138
+ def type=(type)
139
+ if type.nil?
140
+ fail ArgumentError, 'type cannot be nil'
141
+ end
142
+
143
+ @type = type
144
+ end
145
+
146
+ # Custom attribute writer method with validation
147
+ # @param [Object] description Value to be assigned
148
+ def description=(description)
149
+ if description.nil?
150
+ fail ArgumentError, 'description cannot be nil'
151
+ end
152
+
153
+ @description = description
154
+ end
155
+
156
+ # Checks equality by comparing each attribute.
157
+ # @param [Object] Object to be compared
158
+ def ==(o)
159
+ return true if self.equal?(o)
160
+ self.class == o.class &&
161
+ id == o.id &&
162
+ type == o.type &&
163
+ description == o.description &&
164
+ code == o.code &&
165
+ source == o.source
166
+ end
167
+
168
+ # @see the `==` method
169
+ # @param [Object] Object to be compared
170
+ def eql?(o)
171
+ self == o
172
+ end
173
+
174
+ # Calculates hash code according to all attributes.
175
+ # @return [Integer] Hash code
176
+ def hash
177
+ [id, type, description, code, source].hash
178
+ end
179
+
180
+ # Builds the object from hash
181
+ # @param [Hash] attributes Model attributes in the form of hash
182
+ # @return [Object] Returns the model itself
183
+ def self.build_from_hash(attributes)
184
+ return nil unless attributes.is_a?(Hash)
185
+ attributes = attributes.transform_keys(&:to_sym)
186
+ transformed_hash = {}
187
+ openapi_types.each_pair do |key, type|
188
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
189
+ transformed_hash["#{key}"] = nil
190
+ elsif type =~ /\AArray<(.*)>/i
191
+ # check to ensure the input is an array given that the attribute
192
+ # is documented as an array but the input is not
193
+ if attributes[attribute_map[key]].is_a?(Array)
194
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
195
+ end
196
+ elsif !attributes[attribute_map[key]].nil?
197
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
198
+ end
199
+ end
200
+ new(transformed_hash)
201
+ end
202
+
203
+ # Returns the object in the form of hash
204
+ # @return [Hash] Returns the object in the form of hash
205
+ def to_hash
206
+ hash = {}
207
+ self.class.attribute_map.each_pair do |attr, param|
208
+ value = self.send(attr)
209
+ if value.nil?
210
+ is_nullable = self.class.openapi_nullable.include?(attr)
211
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
212
+ end
213
+
214
+ hash[param] = _to_hash(value)
215
+ end
216
+ hash
217
+ end
218
+ end
219
+ end