bandwidth-sdk 17.3.2 → 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 (95) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +6 -6
  3. data/README.md +28 -2
  4. data/bandwidth.yml +979 -60
  5. data/coverage/.last_run.json +1 -1
  6. data/coverage/.resultset.json +783 -152
  7. data/coverage/index.html +21642 -14804
  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/{BusinessRegistrationIssuingCountryEnum.md → DeviceStatusEnum.md} +2 -2
  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/MediaApi.md +1 -1
  33. data/docs/MessageRequest.md +1 -1
  34. data/docs/MmsMessageContentFile.md +1 -1
  35. data/docs/Page.md +24 -0
  36. data/docs/RbmActionBase.md +1 -1
  37. data/docs/RbmSuggestionResponse.md +1 -1
  38. data/docs/SipConnectionMetadata.md +24 -0
  39. data/docs/SipCredentials.md +20 -0
  40. data/docs/StatusCallback.md +1 -1
  41. data/docs/SyncLookupRequest.md +3 -1
  42. data/docs/TfvSubmissionInfo.md +3 -3
  43. data/docs/UpdateCall.md +1 -1
  44. data/docs/VerificationRequest.md +3 -3
  45. data/docs/VerificationUpdateRequest.md +3 -3
  46. data/docs/WebhookSubscriptionError.md +22 -0
  47. data/docs/WebhookSubscriptionsListBody.md +1 -1
  48. data/lib/bandwidth-sdk/api/endpoints_api.rb +397 -0
  49. data/lib/bandwidth-sdk/api/media_api.rb +2 -2
  50. data/lib/bandwidth-sdk/configuration.rb +30 -0
  51. data/lib/bandwidth-sdk/models/brtc_error.rb +219 -0
  52. data/lib/bandwidth-sdk/models/brtc_error_response.rb +204 -0
  53. data/lib/bandwidth-sdk/models/brtc_error_source.rb +176 -0
  54. data/lib/bandwidth-sdk/models/brtc_link.rb +166 -0
  55. data/lib/bandwidth-sdk/models/create_call.rb +7 -7
  56. data/lib/bandwidth-sdk/models/create_endpoint_request_base.rb +250 -0
  57. data/lib/bandwidth-sdk/models/create_endpoint_response.rb +218 -0
  58. data/lib/bandwidth-sdk/models/create_endpoint_response_data.rb +356 -0
  59. data/lib/bandwidth-sdk/models/create_web_rtc_connection_request.rb +266 -0
  60. data/lib/bandwidth-sdk/models/device.rb +258 -0
  61. data/lib/bandwidth-sdk/models/device_status_enum.rb +40 -0
  62. data/lib/bandwidth-sdk/models/endpoint.rb +329 -0
  63. data/lib/bandwidth-sdk/models/endpoint_direction_enum.rb +41 -0
  64. data/lib/bandwidth-sdk/models/endpoint_event.rb +381 -0
  65. data/lib/bandwidth-sdk/models/endpoint_event_type_enum.rb +40 -0
  66. data/lib/bandwidth-sdk/models/endpoint_response.rb +218 -0
  67. data/lib/bandwidth-sdk/models/endpoint_status_enum.rb +40 -0
  68. data/lib/bandwidth-sdk/models/endpoint_type_enum.rb +39 -0
  69. data/lib/bandwidth-sdk/models/endpoints.rb +311 -0
  70. data/lib/bandwidth-sdk/models/inbound_callback.rb +2 -2
  71. data/lib/bandwidth-sdk/models/list_endpoints_response.rb +229 -0
  72. data/lib/bandwidth-sdk/models/lookup_result.rb +1 -1
  73. data/lib/bandwidth-sdk/models/machine_detection_configuration.rb +1 -1
  74. data/lib/bandwidth-sdk/models/message_request.rb +1 -1
  75. data/lib/bandwidth-sdk/models/mms_message_content_file.rb +1 -1
  76. data/lib/bandwidth-sdk/models/page.rb +259 -0
  77. data/lib/bandwidth-sdk/models/sip_connection_metadata.rb +175 -0
  78. data/lib/bandwidth-sdk/models/sip_credentials.rb +156 -0
  79. data/lib/bandwidth-sdk/models/status_callback.rb +1 -1
  80. data/lib/bandwidth-sdk/models/sync_lookup_request.rb +35 -4
  81. data/lib/bandwidth-sdk/models/tfv_submission_info.rb +4 -2
  82. data/lib/bandwidth-sdk/models/update_call.rb +6 -6
  83. data/lib/bandwidth-sdk/models/verification_request.rb +4 -2
  84. data/lib/bandwidth-sdk/models/verification_update_request.rb +4 -2
  85. data/lib/bandwidth-sdk/models/webhook_subscription_error.rb +165 -0
  86. data/lib/bandwidth-sdk/models/webhook_subscriptions_list_body.rb +1 -1
  87. data/lib/bandwidth-sdk/version.rb +1 -1
  88. data/lib/bandwidth-sdk.rb +24 -2
  89. data/spec/smoke/endpoints_api_spec.rb +148 -0
  90. data/spec/smoke/phone_number_lookup_api_spec.rb +1 -9
  91. data/spec/unit/api/endpoints_api_spec.rb +172 -0
  92. data/spec/unit/api/phone_number_lookup_api_spec.rb +2 -0
  93. data/spec/unit/api/toll_free_verification_api_spec.rb +1 -1
  94. metadata +104 -54
  95. data/lib/bandwidth-sdk/models/business_registration_issuing_country_enum.rb +0 -55
@@ -17,9 +17,9 @@
17
17
  | **privacy_policy_url** | **String** | The Toll-Free Verification request privacy policy URL. | [optional] |
18
18
  | **terms_and_conditions_url** | **String** | The Toll-Free Verification request terms and conditions policy URL. | [optional] |
19
19
  | **business_dba** | **String** | The company 'Doing Business As'. | [optional] |
20
- | **business_registration_number** | **String** | Government-issued business identifying number. **Note:** If this field is provided, it is strongly recommended to also provide `businessRegistrationType` and `businessRegistrationIssuingCountry`. Submissions missing these fields have a high likelihood of rejection. | [optional] |
20
+ | **business_registration_number** | **String** | Government-issued business identifying number. **Note: As of October 19th, 2026 this field will be required when `businessEntityType` is _not_ `SOLE_PROPRIETOR`. If this field is provided, `businessRegistrationType` and `businessRegistrationIssuingCountry` are also required.** | [optional] |
21
21
  | **business_registration_type** | [**BusinessRegistrationTypeEnum**](BusinessRegistrationTypeEnum.md) | | [optional] |
22
- | **business_registration_issuing_country** | [**BusinessRegistrationIssuingCountryEnum**](BusinessRegistrationIssuingCountryEnum.md) | | [optional] |
22
+ | **business_registration_issuing_country** | **String** | The country issuing the business registration in ISO-3166-1 alpha-3 format. Alpha-2 format is accepted by the API, but alpha-3 is highly encouraged. **Note: As of October 19th, 2026 this field will be required when `businessRegistrationNumber` is provided.** | Registration Type | Supported Countries | |----------------------|------------------------------------| | EIN | USA | | CBN | CAN | | NEQ | CAN | | PROVINCIAL_NUMBER | CAN | | CRN | GBR, HKG | | VAT | GBR, IRL, BRA, NLD | | ACN | AUS | | ABN | AUS | | BRN | HKG | | SIREN | FRA | | SIRET | FRA | | NZBN | NZL | | UST_IDNR | DEU | | CIF | ESP | | NIF | ESP | | CNPJ | BRA | | UID | CHE | | OTHER | Must Provide Country Code | | [optional] |
23
23
  | **business_entity_type** | [**BusinessEntityTypeEnum**](BusinessEntityTypeEnum.md) | | |
24
24
  | **help_message_response** | **String** | A message that gets sent to users requesting help. | [optional] |
25
25
  | **age_gated_content** | **Boolean** | Indicates whether the content is age-gated. | [optional] |
@@ -46,7 +46,7 @@ instance = Bandwidth::VerificationRequest.new(
46
46
  business_dba: Another Company Name Inc.,
47
47
  business_registration_number: 12-3456789,
48
48
  business_registration_type: null,
49
- business_registration_issuing_country: null,
49
+ business_registration_issuing_country: USA,
50
50
  business_entity_type: null,
51
51
  help_message_response: Please contact support for assistance.,
52
52
  age_gated_content: false,
@@ -16,10 +16,10 @@
16
16
  | **privacy_policy_url** | **String** | The Toll-Free Verification request privacy policy URL. | [optional] |
17
17
  | **terms_and_conditions_url** | **String** | The Toll-Free Verification request terms and conditions policy URL. | [optional] |
18
18
  | **business_dba** | **String** | The company 'Doing Business As'. | [optional] |
19
- | **business_registration_number** | **String** | Government-issued business identifying number. **Note:** If this field is provided, it is strongly recommended to also provide `businessRegistrationType` and `businessRegistrationIssuingCountry`. Submissions missing these fields have a high likelihood of rejection. | [optional] |
19
+ | **business_registration_number** | **String** | Government-issued business identifying number. **Note: As of October 19th, 2026 this field will be required when `businessEntityType` is _not_ `SOLE_PROPRIETOR`. If this field is provided, `businessRegistrationType` and `businessRegistrationIssuingCountry` are also required.** | [optional] |
20
20
  | **business_registration_type** | [**BusinessRegistrationTypeEnum**](BusinessRegistrationTypeEnum.md) | | [optional] |
21
21
  | **business_entity_type** | [**BusinessEntityTypeEnum**](BusinessEntityTypeEnum.md) | | [optional] |
22
- | **business_registration_issuing_country** | [**BusinessRegistrationIssuingCountryEnum**](BusinessRegistrationIssuingCountryEnum.md) | | [optional] |
22
+ | **business_registration_issuing_country** | **String** | The country issuing the business registration in ISO-3166-1 alpha-3 format. Alpha-2 format is accepted by the API, but alpha-3 is highly encouraged. **Note: As of October 19th, 2026 this field will be required when `businessRegistrationNumber` is provided.** | Registration Type | Supported Countries | |----------------------|------------------------------------| | EIN | USA | | CBN | CAN | | NEQ | CAN | | PROVINCIAL_NUMBER | CAN | | CRN | GBR, HKG | | VAT | GBR, IRL, BRA, NLD | | ACN | AUS | | ABN | AUS | | BRN | HKG | | SIREN | FRA | | SIRET | FRA | | NZBN | NZL | | UST_IDNR | DEU | | CIF | ESP | | NIF | ESP | | CNPJ | BRA | | UID | CHE | | OTHER | Must Provide Country Code | | [optional] |
23
23
  | **help_message_response** | **String** | A message that gets sent to users requesting help. | [optional] |
24
24
  | **age_gated_content** | **Boolean** | Indicates whether the content is age-gated. | [optional] |
25
25
  | **cv_token** | **String** | The token provided by Campaign Verify to validate your political use case. Only required for 527 political organizations. If you are not a 527 political organization, this field should be omitted. Supplying an empty string will likely result in rejection. | [optional] |
@@ -45,7 +45,7 @@ instance = Bandwidth::VerificationUpdateRequest.new(
45
45
  business_registration_number: 12-3456789,
46
46
  business_registration_type: null,
47
47
  business_entity_type: null,
48
- business_registration_issuing_country: null,
48
+ business_registration_issuing_country: USA,
49
49
  help_message_response: Please contact support for assistance.,
50
50
  age_gated_content: false,
51
51
  cv_token: cv.user123|sess456|mno|tfree|read_write|X7yZ9aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVw
@@ -0,0 +1,22 @@
1
+ # Bandwidth::WebhookSubscriptionError
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **code** | **Integer** | | [optional] |
8
+ | **description** | **String** | | [optional] |
9
+ | **telephone_numbers** | [**Array<TelephoneNumber>**](TelephoneNumber.md) | | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'bandwidth-sdk'
15
+
16
+ instance = Bandwidth::WebhookSubscriptionError.new(
17
+ code: null,
18
+ description: null,
19
+ telephone_numbers: null
20
+ )
21
+ ```
22
+
@@ -5,7 +5,7 @@
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **links** | [**LinksObject**](LinksObject.md) | | [optional] |
8
- | **errors** | [**Array<Error>**](Error.md) | | [optional] |
8
+ | **errors** | [**Array<WebhookSubscriptionError>**](WebhookSubscriptionError.md) | | [optional] |
9
9
  | **data** | [**Array<WebhookSubscription>**](WebhookSubscription.md) | | |
10
10
 
11
11
  ## Example
@@ -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
@@ -224,7 +224,7 @@ module Bandwidth
224
224
  end
225
225
 
226
226
  # Upload Media
227
- # Upload a file. You may add headers to the request in order to provide some control to your media file. If a file is uploaded with the same name as a file that already exists under this account, the previous file will be overwritten. A list of supported media types can be found [here](https://support.bandwidth.com/hc/en-us/articles/360014128994-What-MMS-file-types-are-supported-).
227
+ # Upload a file. You may add headers to the request in order to provide some control to your media file. If a file is uploaded with the same name as a file that already exists under this account, the previous file will be overwritten. A list of supported media types can be found at [Bandwidth Support](https://www.bandwidth.com/support/en/articles/12823220-what-mms-file-types-are-supported).
228
228
  # @param account_id [String] Your Bandwidth Account ID.
229
229
  # @param media_id [String] Media ID to retrieve.
230
230
  # @param body [File]
@@ -238,7 +238,7 @@ module Bandwidth
238
238
  end
239
239
 
240
240
  # Upload Media
241
- # Upload a file. You may add headers to the request in order to provide some control to your media file. If a file is uploaded with the same name as a file that already exists under this account, the previous file will be overwritten. A list of supported media types can be found [here](https://support.bandwidth.com/hc/en-us/articles/360014128994-What-MMS-file-types-are-supported-).
241
+ # Upload a file. You may add headers to the request in order to provide some control to your media file. If a file is uploaded with the same name as a file that already exists under this account, the previous file will be overwritten. A list of supported media types can be found at [Bandwidth Support](https://www.bandwidth.com/support/en/articles/12823220-what-mms-file-types-are-supported).
242
242
  # @param account_id [String] Your Bandwidth Account ID.
243
243
  # @param media_id [String] Media ID to retrieve.
244
244
  # @param body [File]
@@ -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",