diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES
index 53e9a751..fb9bbfbb 100644
--- a/.openapi-generator/FILES
+++ b/.openapi-generator/FILES
@@ -45,16 +45,34 @@ docs/CreateAsyncBulkLookupResponse.md
docs/CreateAsyncBulkLookupResponseData.md
docs/CreateCall.md
docs/CreateCallResponse.md
+docs/CreateEndpointRequestBase.md
+docs/CreateEndpointResponse.md
+docs/CreateEndpointResponseData.md
docs/CreateMessageRequestError.md
docs/CreateMultiChannelMessageResponse.md
docs/CreateSyncLookupResponse.md
docs/CreateSyncLookupResponseData.md
+docs/CreateWebRtcConnectionRequest.md
docs/DeactivationEventEnum.md
+docs/Device.md
+docs/DeviceStatusEnum.md
docs/DisconnectCallback.md
docs/Diversion.md
docs/DtmfCallback.md
+docs/Endpoint.md
+docs/EndpointDirectionEnum.md
+docs/EndpointEvent.md
+docs/EndpointEventTypeEnum.md
+docs/EndpointResponse.md
+docs/EndpointStatusEnum.md
+docs/EndpointTypeEnum.md
+docs/Endpoints.md
+docs/EndpointsApi.md
docs/Error.md
+docs/Error1.md
+docs/Error1Source.md
docs/ErrorObject.md
+docs/ErrorResponse.md
docs/ErrorSource.md
docs/FailureWebhook.md
docs/FieldError.md
@@ -70,8 +88,10 @@ docs/InitiateCallback.md
docs/LatestMessageDeliveryStatusEnum.md
docs/LineTypeEnum.md
docs/Link.md
+docs/Link1.md
docs/LinkSchema.md
docs/LinksObject.md
+docs/ListEndpointsResponse.md
docs/ListMessageDirectionEnum.md
docs/ListMessageItem.md
docs/LookupErrorResponse.md
@@ -119,6 +139,7 @@ docs/MultiChannelMessageContent.md
docs/MultiChannelMessageRequest.md
docs/MultiChannelMessageResponseData.md
docs/OptInWorkflow.md
+docs/Page.md
docs/PageInfo.md
docs/PhoneNumberLookupApi.md
docs/PriorityEnum.md
@@ -149,6 +170,8 @@ docs/RecordingTranscriptions.md
docs/RecordingsApi.md
docs/RedirectCallback.md
docs/RedirectMethodEnum.md
+docs/SipConnectionMetadata.md
+docs/SipCredentials.md
docs/SmsMessageContent.md
docs/StandaloneCardOrientationEnum.md
docs/StatisticsApi.md
@@ -195,6 +218,7 @@ git_push.sh
lib/bandwidth-sdk.rb
lib/bandwidth-sdk/api/calls_api.rb
lib/bandwidth-sdk/api/conferences_api.rb
+lib/bandwidth-sdk/api/endpoints_api.rb
lib/bandwidth-sdk/api/media_api.rb
lib/bandwidth-sdk/api/messages_api.rb
lib/bandwidth-sdk/api/mfa_api.rb
@@ -247,16 +271,33 @@ lib/bandwidth-sdk/models/create_async_bulk_lookup_response.rb
lib/bandwidth-sdk/models/create_async_bulk_lookup_response_data.rb
lib/bandwidth-sdk/models/create_call.rb
lib/bandwidth-sdk/models/create_call_response.rb
+lib/bandwidth-sdk/models/create_endpoint_request_base.rb
+lib/bandwidth-sdk/models/create_endpoint_response.rb
+lib/bandwidth-sdk/models/create_endpoint_response_data.rb
lib/bandwidth-sdk/models/create_message_request_error.rb
lib/bandwidth-sdk/models/create_multi_channel_message_response.rb
lib/bandwidth-sdk/models/create_sync_lookup_response.rb
lib/bandwidth-sdk/models/create_sync_lookup_response_data.rb
+lib/bandwidth-sdk/models/create_web_rtc_connection_request.rb
lib/bandwidth-sdk/models/deactivation_event_enum.rb
+lib/bandwidth-sdk/models/device.rb
+lib/bandwidth-sdk/models/device_status_enum.rb
lib/bandwidth-sdk/models/disconnect_callback.rb
lib/bandwidth-sdk/models/diversion.rb
lib/bandwidth-sdk/models/dtmf_callback.rb
+lib/bandwidth-sdk/models/endpoint.rb
+lib/bandwidth-sdk/models/endpoint_direction_enum.rb
+lib/bandwidth-sdk/models/endpoint_event.rb
+lib/bandwidth-sdk/models/endpoint_event_type_enum.rb
+lib/bandwidth-sdk/models/endpoint_response.rb
+lib/bandwidth-sdk/models/endpoint_status_enum.rb
+lib/bandwidth-sdk/models/endpoint_type_enum.rb
+lib/bandwidth-sdk/models/endpoints.rb
lib/bandwidth-sdk/models/error.rb
+lib/bandwidth-sdk/models/error1.rb
+lib/bandwidth-sdk/models/error1_source.rb
lib/bandwidth-sdk/models/error_object.rb
+lib/bandwidth-sdk/models/error_response.rb
lib/bandwidth-sdk/models/error_source.rb
lib/bandwidth-sdk/models/failure_webhook.rb
lib/bandwidth-sdk/models/field_error.rb
@@ -272,8 +313,10 @@ lib/bandwidth-sdk/models/initiate_callback.rb
lib/bandwidth-sdk/models/latest_message_delivery_status_enum.rb
lib/bandwidth-sdk/models/line_type_enum.rb
lib/bandwidth-sdk/models/link.rb
+lib/bandwidth-sdk/models/link1.rb
lib/bandwidth-sdk/models/link_schema.rb
lib/bandwidth-sdk/models/links_object.rb
+lib/bandwidth-sdk/models/list_endpoints_response.rb
lib/bandwidth-sdk/models/list_message_direction_enum.rb
lib/bandwidth-sdk/models/list_message_item.rb
lib/bandwidth-sdk/models/lookup_error_response.rb
@@ -317,6 +360,7 @@ lib/bandwidth-sdk/models/multi_channel_message_content.rb
lib/bandwidth-sdk/models/multi_channel_message_request.rb
lib/bandwidth-sdk/models/multi_channel_message_response_data.rb
lib/bandwidth-sdk/models/opt_in_workflow.rb
+lib/bandwidth-sdk/models/page.rb
lib/bandwidth-sdk/models/page_info.rb
lib/bandwidth-sdk/models/priority_enum.rb
lib/bandwidth-sdk/models/product_type_enum.rb
@@ -345,6 +389,8 @@ lib/bandwidth-sdk/models/recording_transcription_metadata.rb
lib/bandwidth-sdk/models/recording_transcriptions.rb
lib/bandwidth-sdk/models/redirect_callback.rb
lib/bandwidth-sdk/models/redirect_method_enum.rb
+lib/bandwidth-sdk/models/sip_connection_metadata.rb
+lib/bandwidth-sdk/models/sip_credentials.rb
lib/bandwidth-sdk/models/sms_message_content.rb
lib/bandwidth-sdk/models/standalone_card_orientation_enum.rb
lib/bandwidth-sdk/models/status_callback.rb
diff --git a/README.md b/README.md
index e981ea0b..fbe7c73b 100644
--- a/README.md
+++ b/README.md
@@ -131,6 +131,11 @@ Class | Method | HTTP request | Description
*Bandwidth::ConferencesApi* | [**update_conference**](docs/ConferencesApi.md#update_conference) | **POST** /accounts/{accountId}/conferences/{conferenceId} | Update Conference
*Bandwidth::ConferencesApi* | [**update_conference_bxml**](docs/ConferencesApi.md#update_conference_bxml) | **PUT** /accounts/{accountId}/conferences/{conferenceId}/bxml | Update Conference BXML
*Bandwidth::ConferencesApi* | [**update_conference_member**](docs/ConferencesApi.md#update_conference_member) | **PUT** /accounts/{accountId}/conferences/{conferenceId}/members/{memberId} | Update Conference Member
+*Bandwidth::EndpointsApi* | [**create_endpoint**](docs/EndpointsApi.md#create_endpoint) | **POST** /accounts/{accountId}/endpoints | Create Endpoint
+*Bandwidth::EndpointsApi* | [**delete_endpoint**](docs/EndpointsApi.md#delete_endpoint) | **DELETE** /accounts/{accountId}/endpoints/{endpointId} | Delete Endpoint
+*Bandwidth::EndpointsApi* | [**get_endpoint**](docs/EndpointsApi.md#get_endpoint) | **GET** /accounts/{accountId}/endpoints/{endpointId} | Get Endpoint
+*Bandwidth::EndpointsApi* | [**list_endpoints**](docs/EndpointsApi.md#list_endpoints) | **GET** /accounts/{accountId}/endpoints | List Endpoints
+*Bandwidth::EndpointsApi* | [**update_endpoint_bxml**](docs/EndpointsApi.md#update_endpoint_bxml) | **PUT** /accounts/{accountId}/endpoints/{endpointId}/bxml | Update Endpoint BXML
*Bandwidth::MFAApi* | [**generate_messaging_code**](docs/MFAApi.md#generate_messaging_code) | **POST** /accounts/{accountId}/code/messaging | Messaging Authentication Code
*Bandwidth::MFAApi* | [**generate_voice_code**](docs/MFAApi.md#generate_voice_code) | **POST** /accounts/{accountId}/code/voice | Voice Authentication Code
*Bandwidth::MFAApi* | [**verify_code**](docs/MFAApi.md#verify_code) | **POST** /accounts/{accountId}/code/verify | Verify Authentication Code
@@ -210,16 +215,33 @@ Class | Method | HTTP request | Description
- [Bandwidth::CreateAsyncBulkLookupResponseData](docs/CreateAsyncBulkLookupResponseData.md)
- [Bandwidth::CreateCall](docs/CreateCall.md)
- [Bandwidth::CreateCallResponse](docs/CreateCallResponse.md)
+ - [Bandwidth::CreateEndpointRequestBase](docs/CreateEndpointRequestBase.md)
+ - [Bandwidth::CreateEndpointResponse](docs/CreateEndpointResponse.md)
+ - [Bandwidth::CreateEndpointResponseData](docs/CreateEndpointResponseData.md)
- [Bandwidth::CreateMessageRequestError](docs/CreateMessageRequestError.md)
- [Bandwidth::CreateMultiChannelMessageResponse](docs/CreateMultiChannelMessageResponse.md)
- [Bandwidth::CreateSyncLookupResponse](docs/CreateSyncLookupResponse.md)
- [Bandwidth::CreateSyncLookupResponseData](docs/CreateSyncLookupResponseData.md)
+ - [Bandwidth::CreateWebRtcConnectionRequest](docs/CreateWebRtcConnectionRequest.md)
- [Bandwidth::DeactivationEventEnum](docs/DeactivationEventEnum.md)
+ - [Bandwidth::Device](docs/Device.md)
+ - [Bandwidth::DeviceStatusEnum](docs/DeviceStatusEnum.md)
- [Bandwidth::DisconnectCallback](docs/DisconnectCallback.md)
- [Bandwidth::Diversion](docs/Diversion.md)
- [Bandwidth::DtmfCallback](docs/DtmfCallback.md)
+ - [Bandwidth::Endpoint](docs/Endpoint.md)
+ - [Bandwidth::EndpointDirectionEnum](docs/EndpointDirectionEnum.md)
+ - [Bandwidth::EndpointEvent](docs/EndpointEvent.md)
+ - [Bandwidth::EndpointEventTypeEnum](docs/EndpointEventTypeEnum.md)
+ - [Bandwidth::EndpointResponse](docs/EndpointResponse.md)
+ - [Bandwidth::EndpointStatusEnum](docs/EndpointStatusEnum.md)
+ - [Bandwidth::EndpointTypeEnum](docs/EndpointTypeEnum.md)
+ - [Bandwidth::Endpoints](docs/Endpoints.md)
- [Bandwidth::Error](docs/Error.md)
+ - [Bandwidth::Error1](docs/Error1.md)
+ - [Bandwidth::Error1Source](docs/Error1Source.md)
- [Bandwidth::ErrorObject](docs/ErrorObject.md)
+ - [Bandwidth::ErrorResponse](docs/ErrorResponse.md)
- [Bandwidth::ErrorSource](docs/ErrorSource.md)
- [Bandwidth::FailureWebhook](docs/FailureWebhook.md)
- [Bandwidth::FieldError](docs/FieldError.md)
@@ -235,8 +257,10 @@ Class | Method | HTTP request | Description
- [Bandwidth::LatestMessageDeliveryStatusEnum](docs/LatestMessageDeliveryStatusEnum.md)
- [Bandwidth::LineTypeEnum](docs/LineTypeEnum.md)
- [Bandwidth::Link](docs/Link.md)
+ - [Bandwidth::Link1](docs/Link1.md)
- [Bandwidth::LinkSchema](docs/LinkSchema.md)
- [Bandwidth::LinksObject](docs/LinksObject.md)
+ - [Bandwidth::ListEndpointsResponse](docs/ListEndpointsResponse.md)
- [Bandwidth::ListMessageDirectionEnum](docs/ListMessageDirectionEnum.md)
- [Bandwidth::ListMessageItem](docs/ListMessageItem.md)
- [Bandwidth::LookupErrorResponse](docs/LookupErrorResponse.md)
@@ -280,6 +304,7 @@ Class | Method | HTTP request | Description
- [Bandwidth::MultiChannelMessageRequest](docs/MultiChannelMessageRequest.md)
- [Bandwidth::MultiChannelMessageResponseData](docs/MultiChannelMessageResponseData.md)
- [Bandwidth::OptInWorkflow](docs/OptInWorkflow.md)
+ - [Bandwidth::Page](docs/Page.md)
- [Bandwidth::PageInfo](docs/PageInfo.md)
- [Bandwidth::PriorityEnum](docs/PriorityEnum.md)
- [Bandwidth::ProductTypeEnum](docs/ProductTypeEnum.md)
@@ -308,6 +333,8 @@ Class | Method | HTTP request | Description
- [Bandwidth::RecordingTranscriptions](docs/RecordingTranscriptions.md)
- [Bandwidth::RedirectCallback](docs/RedirectCallback.md)
- [Bandwidth::RedirectMethodEnum](docs/RedirectMethodEnum.md)
+ - [Bandwidth::SipConnectionMetadata](docs/SipConnectionMetadata.md)
+ - [Bandwidth::SipCredentials](docs/SipCredentials.md)
- [Bandwidth::SmsMessageContent](docs/SmsMessageContent.md)
- [Bandwidth::StandaloneCardOrientationEnum](docs/StandaloneCardOrientationEnum.md)
- [Bandwidth::StatusCallback](docs/StatusCallback.md)
diff --git a/bandwidth.yml b/bandwidth.yml
index 835ec5a9..c7105f39 100644
--- a/bandwidth.yml
+++ b/bandwidth.yml
@@ -22,6 +22,7 @@ tags:
- name: MFA
- name: Phone Number Lookup
- name: Toll-Free Verification
+ - name: Endpoints
paths:
/users/{accountId}/media:
get:
@@ -1690,6 +1691,180 @@ paths:
'503':
$ref: '#/components/responses/tfvServiceUnavailableResponse'
servers: *ref_4
+ /accounts/{accountId}/endpoints:
+ get:
+ tags:
+ - Endpoints
+ summary: List Endpoints
+ description: Returns a list of endpoints associated with the specified account.
+ operationId: listEndpoints
+ parameters:
+ - $ref: '#/components/parameters/accountId'
+ - $ref: '#/components/parameters/endpointType'
+ - $ref: '#/components/parameters/endpointStatus'
+ - $ref: '#/components/parameters/afterCursor'
+ - $ref: '#/components/parameters/limit1'
+ responses:
+ '200':
+ $ref: '#/components/responses/listEndpointsResponse'
+ '400':
+ $ref: '#/components/responses/badRequestErrorResponse'
+ '401':
+ $ref: '#/components/responses/unauthorizedErrorResponse'
+ '403':
+ $ref: '#/components/responses/forbiddenErrorResponse'
+ '404':
+ $ref: '#/components/responses/notFoundErrorResponse'
+ '405':
+ $ref: '#/components/responses/methodNotAllowedErrorResponse'
+ '415':
+ $ref: '#/components/responses/unsupportedMediaTypeErrorResponse'
+ '429':
+ $ref: '#/components/responses/tooManyRequestsErrorResponse'
+ '500':
+ $ref: '#/components/responses/serviceUnavailableErrorResponse'
+ x-badges:
+ - name: Beta
+ color: '#076EA8'
+ post:
+ tags:
+ - Endpoints
+ summary: Create Endpoint
+ description: Creates a new Endpoint for the specified account.
+ operationId: createEndpoint
+ parameters:
+ - $ref: '#/components/parameters/accountId'
+ requestBody:
+ $ref: '#/components/requestBodies/createEndpointRequest'
+ responses:
+ '201':
+ $ref: '#/components/responses/createEndpointResponse'
+ '400':
+ $ref: '#/components/responses/badRequestErrorResponse'
+ '401':
+ $ref: '#/components/responses/unauthorizedErrorResponse'
+ '403':
+ $ref: '#/components/responses/forbiddenErrorResponse'
+ '404':
+ $ref: '#/components/responses/notFoundErrorResponse'
+ '405':
+ $ref: '#/components/responses/methodNotAllowedErrorResponse'
+ '415':
+ $ref: '#/components/responses/unsupportedMediaTypeErrorResponse'
+ '429':
+ $ref: '#/components/responses/tooManyRequestsErrorResponse'
+ '500':
+ $ref: '#/components/responses/serviceUnavailableErrorResponse'
+ callbacks:
+ endpointEventCallback:
+ $ref: '#/components/callbacks/endpointEvent'
+ x-badges:
+ - name: Beta
+ color: '#076EA8'
+ servers: &ref_5
+ - url: https://api.bandwidth.com/v2
+ description: Production
+ /accounts/{accountId}/endpoints/{endpointId}:
+ get:
+ tags:
+ - Endpoints
+ summary: Get Endpoint
+ description: Returns information about the specified endpoint.
+ operationId: getEndpoint
+ parameters:
+ - $ref: '#/components/parameters/accountId'
+ - $ref: '#/components/parameters/endpointId'
+ responses:
+ '200':
+ $ref: '#/components/responses/getEndpointResponse'
+ '400':
+ $ref: '#/components/responses/badRequestErrorResponse'
+ '401':
+ $ref: '#/components/responses/unauthorizedErrorResponse'
+ '403':
+ $ref: '#/components/responses/forbiddenErrorResponse'
+ '404':
+ $ref: '#/components/responses/notFoundErrorResponse'
+ '405':
+ $ref: '#/components/responses/methodNotAllowedErrorResponse'
+ '415':
+ $ref: '#/components/responses/unsupportedMediaTypeErrorResponse'
+ '429':
+ $ref: '#/components/responses/tooManyRequestsErrorResponse'
+ '500':
+ $ref: '#/components/responses/serviceUnavailableErrorResponse'
+ x-badges:
+ - name: Beta
+ color: '#076EA8'
+ delete:
+ tags:
+ - Endpoints
+ summary: Delete Endpoint
+ description: >-
+ Deletes the specified endpoint. If the endpoint is actively streaming
+ media, the media stream will be terminated.
+ operationId: deleteEndpoint
+ parameters:
+ - $ref: '#/components/parameters/accountId'
+ - $ref: '#/components/parameters/endpointId'
+ responses:
+ '204':
+ description: No Content
+ '400':
+ $ref: '#/components/responses/badRequestErrorResponse'
+ '401':
+ $ref: '#/components/responses/unauthorizedErrorResponse'
+ '403':
+ $ref: '#/components/responses/forbiddenErrorResponse'
+ '404':
+ $ref: '#/components/responses/notFoundErrorResponse'
+ '405':
+ $ref: '#/components/responses/methodNotAllowedErrorResponse'
+ '415':
+ $ref: '#/components/responses/unsupportedMediaTypeErrorResponse'
+ '429':
+ $ref: '#/components/responses/tooManyRequestsErrorResponse'
+ '500':
+ $ref: '#/components/responses/serviceUnavailableErrorResponse'
+ x-badges:
+ - name: Beta
+ color: '#076EA8'
+ servers: *ref_5
+ /accounts/{accountId}/endpoints/{endpointId}/bxml:
+ put:
+ tags:
+ - Endpoints
+ summary: Update Endpoint BXML
+ description: Updates the BXML for the specified endpoint.
+ operationId: updateEndpointBxml
+ parameters:
+ - $ref: '#/components/parameters/accountId'
+ - $ref: '#/components/parameters/endpointId'
+ requestBody:
+ $ref: '#/components/requestBodies/updateEndpointBxmlRequest'
+ responses:
+ '204':
+ description: No Content
+ '400':
+ $ref: '#/components/responses/badRequestErrorResponse'
+ '401':
+ $ref: '#/components/responses/unauthorizedErrorResponse'
+ '403':
+ $ref: '#/components/responses/forbiddenErrorResponse'
+ '404':
+ $ref: '#/components/responses/notFoundErrorResponse'
+ '405':
+ $ref: '#/components/responses/methodNotAllowedErrorResponse'
+ '415':
+ $ref: '#/components/responses/unsupportedMediaTypeErrorResponse'
+ '429':
+ $ref: '#/components/responses/tooManyRequestsErrorResponse'
+ '500':
+ $ref: '#/components/responses/serviceUnavailableErrorResponse'
+ x-badges:
+ - name: Beta
+ color: '#076EA8'
+ servers: *ref_5
components:
schemas:
applicationId:
@@ -3280,8 +3455,8 @@ components:
May be cleared by setting `tag=""`
- Max length 256 characters.
- maxLength: 256
+ Max length 4096 characters.
+ maxLength: 4096
example: arbitrary text here
createCallResponse:
type: object
@@ -3658,11 +3833,11 @@ components:
May be cleared by setting `tag=""`.
- Max length 256 characters.
+ Max length 4096 characters.
Not allowed if `state` is `completed`.
- maxLength: 256
+ maxLength: 4096
example: My Custom Tag
updateCallRecording:
type: object
@@ -6687,6 +6862,367 @@ components:
nullable: true
example: >-
cv.user123|sess456|mno|tfree|read_write|X7yZ9aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVw
+ endpointId:
+ type: string
+ description: The unique ID of the endpoint.
+ example: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85
+ endpointStatusEnum:
+ type: string
+ enum:
+ - CONNECTED
+ - DISCONNECTED
+ deviceStatusEnum:
+ type: string
+ enum:
+ - CONNECTED
+ - DISCONNECTED
+ endpointTypeEnum:
+ type: string
+ enum:
+ - WEBRTC
+ endpointDirectionEnum:
+ type: string
+ enum:
+ - INBOUND
+ - OUTBOUND
+ - BIDIRECTIONAL
+ sipCredentials:
+ type: object
+ properties:
+ username:
+ type: string
+ description: The username for the SIP connection.
+ example: username
+ password:
+ type: string
+ description: The password for the SIP connection.
+ example: password
+ sipConnectionMetadata:
+ title: SIP Connection
+ type: object
+ properties:
+ ipAddress:
+ type: string
+ format: ipv4
+ description: The IP address of the SIP connection.
+ example: 192.168.0.0
+ port:
+ type: integer
+ description: The port of the SIP connection.
+ example: 5060
+ credentials:
+ $ref: '#/components/schemas/sipCredentials'
+ uuiHeader:
+ type: string
+ description: The User-to-User Information header for the SIP connection.
+ example: my-uui-header
+ webRtcConnectionMetadata:
+ title: WebRTC Connection
+ type: object
+ endpointToken:
+ type: string
+ description: >-
+ The json web token specific to the endpoint. Used to authenticate the
+ client with the media gateway.
+ example: xxxxx.yyyyy.zzzzz
+ endpointTag:
+ type: string
+ description: A tag for the endpoint.
+ example: my-tag
+ maximum: 1024
+ device:
+ type: object
+ properties:
+ deviceId:
+ type: string
+ description: The unique ID of the device.
+ example: d-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85
+ deviceName:
+ type: string
+ description: The name of the device.
+ maximum: 1024
+ example: David's iPhone
+ status:
+ $ref: '#/components/schemas/deviceStatusEnum'
+ creationTimestamp:
+ type: string
+ format: date-time
+ description: The time the device was created. In ISO-8601 format.
+ example: '2021-01-01T00:00:00Z'
+ required:
+ - deviceId
+ - status
+ - creationTimestamp
+ endpoints:
+ type: object
+ properties:
+ endpointId:
+ $ref: '#/components/schemas/endpointId'
+ type:
+ $ref: '#/components/schemas/endpointTypeEnum'
+ status:
+ $ref: '#/components/schemas/endpointStatusEnum'
+ creationTimestamp:
+ type: string
+ format: date-time
+ description: The time the endpoint was created. In ISO-8601 format.
+ example: '2021-01-01T00:00:00Z'
+ expirationTimestamp:
+ type: string
+ format: date-time
+ description: >-
+ The time the endpoint token will expire. In ISO-8601 format. Tokens
+ last 24 hours.
+ example: '2021-01-02T00:00:00Z'
+ tag:
+ $ref: '#/components/schemas/endpointTag'
+ required:
+ - endpointId
+ - type
+ - status
+ - creationTimestamp
+ - expirationTimestamp
+ endpoint:
+ type: object
+ allOf:
+ - $ref: '#/components/schemas/endpoints'
+ - type: object
+ properties:
+ devices:
+ type: array
+ items:
+ $ref: '#/components/schemas/device'
+ createWebRtcConnectionRequest:
+ allOf:
+ - $ref: '#/components/schemas/createEndpointRequestBase'
+ - type: object
+ properties:
+ connectionMetadata:
+ $ref: '#/components/schemas/webRtcConnectionMetadata'
+ createEndpointRequestBase:
+ type: object
+ properties:
+ type:
+ $ref: '#/components/schemas/endpointTypeEnum'
+ direction:
+ $ref: '#/components/schemas/endpointDirectionEnum'
+ eventCallbackUrl:
+ type: string
+ format: uri
+ description: The URL to send event callbacks to.
+ example: https://myapp.com/callback
+ eventFallbackUrl:
+ type: string
+ format: uri
+ description: The URL to send event fallbacks to.
+ example: https://fallback.myapp.com/callback
+ tag:
+ $ref: '#/components/schemas/endpointTag'
+ required:
+ - type
+ - direction
+ createEndpointRequest:
+ oneOf:
+ - $ref: '#/components/schemas/createWebRtcConnectionRequest'
+ discriminator:
+ propertyName: type
+ mapping:
+ WEBRTC: '#/components/schemas/createWebRtcConnectionRequest'
+ createEndpointResponseData:
+ allOf:
+ - $ref: '#/components/schemas/endpoint'
+ - type: object
+ properties:
+ token:
+ $ref: '#/components/schemas/endpointToken'
+ required:
+ - token
+ endpointEventTypeEnum:
+ type: string
+ enum:
+ - DEVICE_CONNECTED
+ - DEVICE_DISCONNECTED
+ endpointEvent:
+ description: An event that occurred on an endpoint.
+ allOf:
+ - $ref: '#/components/schemas/endpoints'
+ - type: object
+ properties:
+ eventTime:
+ type: string
+ format: date-time
+ description: The time the event occurred. In ISO-8601 format.
+ example: '2021-01-01T00:00:00Z'
+ eventType:
+ $ref: '#/components/schemas/endpointEventTypeEnum'
+ device:
+ $ref: '#/components/schemas/device'
+ required:
+ - eventType
+ - eventTime
+ link1:
+ type: object
+ properties:
+ href:
+ type: string
+ description: The full URL of the link.
+ example: >-
+ https://api.bandwidth.com/v2/accounts/5500123/endpoints/e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85
+ rel:
+ type: string
+ description: The relationship of the link to the current resource.
+ example: self
+ method:
+ type: string
+ enum:
+ - GET
+ - POST
+ - DELETE
+ description: The HTTP method to use when making the request.
+ example: GET
+ page:
+ type: object
+ properties:
+ pageSize:
+ type: integer
+ description: The number of items per page.
+ minimum: 0
+ example: 10
+ totalElements:
+ type: integer
+ description: The total number of items.
+ minimum: 0
+ example: 100
+ totalPages:
+ type: integer
+ description: The total number of pages.
+ minimum: 0
+ example: 10
+ pageNumber:
+ type: integer
+ description: The current page number.
+ minimum: 0
+ example: 0
+ required:
+ - pageSize
+ error1:
+ type: object
+ properties:
+ id:
+ type: string
+ format: uuid
+ description: A unique identifier for the error.
+ example: 59512d87-7a92-4040-8e4a-78fb772019b9
+ type:
+ type: string
+ description: The type of error.
+ example: resource.not_found
+ description:
+ type: string
+ description: A description of the error.
+ example: The requested resource was not found.
+ code:
+ type: string
+ description: A code that uniquely identifies the error.
+ example: '404'
+ source:
+ type: object
+ properties:
+ parameter:
+ type: string
+ description: The URI parameter that caused the error.
+ example: accountId
+ field:
+ type: string
+ description: The request body field that caused the error.
+ example: accountId
+ header:
+ type: string
+ description: The header that caused the error.
+ example: Authorization
+ reference:
+ type: string
+ description: >-
+ The resource ID or path to the resource (or non-existent
+ resource) causing the error.
+ example: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85
+ required:
+ - type
+ - description
+ listEndpointsResponse:
+ type: object
+ properties:
+ links:
+ type: array
+ items:
+ $ref: '#/components/schemas/link1'
+ page:
+ $ref: '#/components/schemas/page'
+ data:
+ type: array
+ items:
+ $ref: '#/components/schemas/endpoints'
+ errors:
+ type: array
+ items:
+ $ref: '#/components/schemas/error1'
+ required:
+ - links
+ - data
+ - errors
+ endpointResponse:
+ type: object
+ properties:
+ links:
+ type: array
+ items:
+ $ref: '#/components/schemas/link1'
+ data:
+ $ref: '#/components/schemas/endpoint'
+ errors:
+ type: array
+ items:
+ $ref: '#/components/schemas/error1'
+ required:
+ - links
+ - data
+ - errors
+ createEndpointResponse:
+ type: object
+ properties:
+ links:
+ type: array
+ items:
+ $ref: '#/components/schemas/link1'
+ data:
+ $ref: '#/components/schemas/createEndpointResponseData'
+ errors:
+ type: array
+ items:
+ $ref: '#/components/schemas/error1'
+ required:
+ - links
+ - data
+ - errors
+ errorResponse:
+ type: object
+ properties:
+ links:
+ type: array
+ items:
+ $ref: '#/components/schemas/link1'
+ data:
+ type: object
+ nullable: true
+ additionalProperties: false
+ errors:
+ type: array
+ items:
+ $ref: '#/components/schemas/error1'
+ required:
+ - links
+ - data
+ - errors
responses:
createMessageResponse:
description: Accepted
@@ -7361,6 +7897,114 @@ components:
type: Service Unavailable
verifyPutResponse:
description: Accepted
+ listEndpointsResponse:
+ description: OK
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/listEndpointsResponse'
+ examples:
+ listEndpointsResponseExample:
+ $ref: '#/components/examples/listEndpointsResponseExample'
+ createEndpointResponse:
+ description: Created
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/createEndpointResponse'
+ examples:
+ createEndpointResponseExample:
+ $ref: '#/components/examples/createEndpointResponseExample'
+ getEndpointResponse:
+ description: OK
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/endpointResponse'
+ examples:
+ getEndpointResponseExample:
+ $ref: '#/components/examples/getEndpointResponseExample'
+ badRequestErrorResponse:
+ description: Bad Request
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/errorResponse'
+ examples:
+ badRequestErrorExample:
+ $ref: '#/components/examples/badRequestErrorExample'
+ unauthorizedErrorResponse:
+ description: Unauthorized
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/errorResponse'
+ examples:
+ unauthorizedErrorExample:
+ $ref: '#/components/examples/unauthorizedErrorExample'
+ forbiddenErrorResponse:
+ description: Forbidden
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/errorResponse'
+ examples:
+ forbiddenErrorExample:
+ $ref: '#/components/examples/forbiddenErrorExample'
+ notFoundErrorResponse:
+ description: Not Found
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/errorResponse'
+ examples:
+ notFoundErrorExample:
+ $ref: '#/components/examples/notFoundErrorExample'
+ methodNotAllowedErrorResponse:
+ description: Method Not Allowed
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/errorResponse'
+ examples:
+ methodNotAllowedErrorExample:
+ $ref: '#/components/examples/methodNotAllowedErrorExample'
+ unsupportedMediaTypeErrorResponse:
+ description: Unsupported Media Type
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/errorResponse'
+ examples:
+ unsuppotedMediaTypeErrorExample:
+ $ref: '#/components/examples/unsupportedMediaTypeErrorExample'
+ tooManyRequestsErrorResponse:
+ description: Too Many Requests
+ headers:
+ Retry-After:
+ description: >-
+ The number of seconds the client should wait before making another
+ request.
+ required: true
+ schema:
+ type: integer
+ example: 900
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/errorResponse'
+ examples:
+ tooManyRequestsErrorExample:
+ $ref: '#/components/examples/tooManyRequestsErrorExample'
+ serviceUnavailableErrorResponse:
+ description: Service Unavailable
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/errorResponse'
+ examples:
+ serviceUnavailableErrorExample:
+ $ref: '#/components/examples/serviceUnavailableErrorExample'
parameters:
accountId:
in: path
@@ -7860,6 +8504,45 @@ components:
type: string
description: Webhook subscription ID
example: 7bt57JcsVYJrN9K1OcV1Nu
+ endpointId:
+ name: endpointId
+ in: path
+ required: true
+ schema:
+ type: string
+ example: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85
+ description: BRTC Endpoint ID.
+ endpointType:
+ name: type
+ in: query
+ schema:
+ $ref: '#/components/schemas/endpointTypeEnum'
+ description: The type of endpoint.
+ endpointStatus:
+ name: status
+ in: query
+ schema:
+ $ref: '#/components/schemas/endpointStatusEnum'
+ description: The status of the endpoint.
+ afterCursor:
+ name: afterCursor
+ in: query
+ schema:
+ type: string
+ example: TWF5IHRoZSBmb3JjZSBiZSB3aXRoIHlvdQ==
+ description: >-
+ The cursor to use for pagination. This is the value of the `next` link
+ in the previous response.
+ limit1:
+ name: limit
+ in: query
+ schema:
+ type: integer
+ minimum: 1
+ maximum: 1000
+ default: 100
+ example: 2
+ description: The maximum number of endpoints to return in the response.
examples:
smsMessageReceivedCallbackExample:
summary: An example of a sms message-received callback body.
@@ -8342,6 +9025,205 @@ components:
Unexpected error. Please contact Bandwidth Support if your
requests are receiving this status code for an extended period of
time.
+ listEndpointsResponseExample:
+ summary: List Endpoints Paginated Response
+ value:
+ links:
+ - href: >-
+ https://api.bandwidth.com/v2/accounts/5500123/endpoints?type=SIP&status=CONNECTED&limit=2
+ rel: self
+ method: GET
+ - href: >-
+ https://api.bandwidth.com/v2/accounts/5500123/endpoints?type=SIP&status=CONNECTED&limit=2&afterCursor=TWF5IHRoZSBmb3JjZSBiZSB3aXRoIHlvdQ==
+ rel: next
+ method: GET
+ page:
+ pageSize: 2
+ totalElements: 10
+ totalPages: 5
+ pageNumber: 0
+ data:
+ - endpointId: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85
+ type: WEBRTC
+ status: CONNECTED
+ creationTimestamp: '2021-01-01T00:00:00Z'
+ expirationTimestamp: '2021-01-02T00:00:00Z'
+ tag: my-tag
+ - endpointId: e-2cb0-4a07-b215-b22865662d85-15ac29a2-1331029c
+ type: WEBRTC
+ status: CONNECTED
+ creationTimestamp: '2021-01-01T00:00:00Z'
+ expirationTimestamp: '2021-01-02T00:00:00Z'
+ tag: my-tag
+ errors: []
+ createEndpointResponseExample:
+ summary: Create Endpoint Response
+ value:
+ links:
+ - href: >-
+ https://api.bandwidth.com/v2/accounts/5500123/endpoints/e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85
+ rel: endpoint
+ method: GET
+ data:
+ endpointId: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85
+ token: xxxxx.yyyyy.zzzzz
+ type: WEBRTC
+ status: CONNECTED
+ creationTimestamp: '2021-01-01T00:00:00Z'
+ expirationTimestamp: '2021-01-02T00:00:00Z'
+ devices: []
+ tag: my-tag
+ errors: []
+ getEndpointResponseExample:
+ summary: Get Endpoint Response
+ value:
+ links:
+ - href: >-
+ https://api.bandwidth.com/v2/accounts/5500123/endpoints/e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85
+ rel: self
+ method: GET
+ data:
+ endpointId: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85
+ type: WEBRTC
+ status: CONNECTED
+ creationTimestamp: '2021-01-01T00:00:00Z'
+ expirationTimestamp: '2021-01-02T00:00:00Z'
+ devices: []
+ tag: my-tag
+ errors: []
+ createSipEndpointRequestExample:
+ summary: SIP Endpoint Example
+ value:
+ type: SIP
+ connectionMetadata:
+ ipAddress: 0.0.0.0
+ port: 3000
+ credentials:
+ username: username
+ password: '********'
+ uuiHeader: 123456;encoding=jwt
+ direction: INBOUND
+ eventCallbackUrl: https://myEventCallbackUrl.com/callbacks/bandwidth
+ eventFallbackUrl: https://fallback.myEventCallbackUrl.com/callbacks/bandwidth
+ tag: '{"myTag": "myTagValue"}'
+ createWeRtcEndpointExample:
+ summary: WebRTC Endpoint Example
+ value:
+ type: WEBRTC
+ direction: BIDIRECTIONAL
+ eventCallbackUrl: https://myEventCallbackUrl.com/callbacks/bandwidth
+ eventFallbackUrl: https://fallback.myEventCallbackUrl.com/callbacks/bandwidth
+ tag: '{"myTag": "myTagValue"}'
+ updateEndpointBxmlRequestExample:
+ summary: Update Endpoint BXML Request Example
+ value:
+ endpointDisconnectedEventExample:
+ summary: Endpoint Disconnected Event
+ value:
+ endpointId: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85
+ type: WEBRTC
+ status: DISCONNECTED
+ creationTimestamp: '2021-01-01T00:00:00Z'
+ expirationTimestamp: '2021-01-02T00:00:00Z'
+ eventTime: '2021-01-01T00:00:00Z'
+ eventType: DEVICE_DISCONNECTED
+ tag: my-tag
+ badRequestErrorExample:
+ summary: Bad Request Error Example
+ value:
+ links: []
+ data: null
+ errors:
+ - id: 59512d87-7a92-4040-8e4a-78fb772019b9
+ type: invalid_parameter
+ description: accountId must not contain any characters other than numbers.
+ code: '400'
+ source:
+ parameter: accountId
+ unauthorizedErrorExample:
+ summary: Unauthorized Error Example
+ value:
+ links: []
+ data: null
+ errors:
+ - id: 59512d87-7a92-4040-8e4a-78fb772019b9
+ type: unauthorized
+ description: >-
+ The provided credentials are not authorized to access this
+ resource.
+ code: '401'
+ source:
+ header: Authorization
+ forbiddenErrorExample:
+ summary: Forbidden Error Example
+ value:
+ links: []
+ data: null
+ errors:
+ - id: 59512d87-7a92-4040-8e4a-78fb772019b9
+ type: forbidden
+ description: >-
+ The provided credentials are not authorized to access this
+ resource.
+ code: '403'
+ source:
+ header: Authorization
+ notFoundErrorExample:
+ summary: Not Found Error Example
+ value:
+ links: []
+ data: null
+ errors:
+ - id: 59512d87-7a92-4040-8e4a-78fb772019b9
+ type: resource_not_found
+ description: The requested resource was not found.
+ code: '404'
+ source:
+ reference: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85
+ methodNotAllowedErrorExample:
+ summary: Method Not Allowed Error Example
+ value:
+ links: []
+ data: null
+ errors:
+ - id: 59512d87-7a92-4040-8e4a-78fb772019b9
+ type: method_not_allowed
+ description: The requested method is not allowed on this resource.
+ code: '405'
+ source:
+ parameter: accountId
+ unsupportedMediaTypeErrorExample:
+ summary: Unsupported Media Type Error Example
+ value:
+ links: []
+ data: null
+ errors:
+ - id: 59512d87-7a92-4040-8e4a-78fb772019b9
+ type: unsupported_media_type
+ description: The provided media type is not supported.
+ code: '415'
+ source:
+ header: Content-Type
+ tooManyRequestsErrorExample:
+ summary: Too Many Requests Error Example
+ value:
+ links: []
+ data: null
+ errors:
+ - type: too_many_endpoints
+ description: >-
+ Too many endpoints. Please delete an existing endpoint or wait 24
+ hours for an endpoint to be removed.
+ serviceUnavailableErrorExample:
+ summary: Service Unavailable Error Example
+ value:
+ links: []
+ data: null
+ errors:
+ - id: 59512d87-7a92-4040-8e4a-78fb772019b9
+ type: service_unavailable
+ description: The service is currently unavailable.
+ code: '500'
requestBodies:
createMessageRequest:
content:
@@ -8697,6 +9579,30 @@ components:
application/json:
schema:
$ref: '#/components/schemas/webhookSubscriptionRequestSchema'
+ createEndpointRequest:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/createEndpointRequest'
+ examples:
+ createWebRtcEndpointRequestExample:
+ $ref: '#/components/examples/createWeRtcEndpointExample'
+ updateEndpointBxmlRequest:
+ required: true
+ content:
+ application/xml:
+ schema:
+ type: string
+ description: >-
+ The BXML document to update the endpoint with. This BXML document
+ will be executed against the endpoint when it is updated.
+
+ For more information, please refer to our [BXML
+ documentation](/docs/voice/bxml/).
+ examples:
+ updateEndpointBxmlRequestExample:
+ $ref: '#/components/examples/updateEndpointBxmlRequestExample'
securitySchemes:
Basic:
type: http
@@ -8830,3 +9736,17 @@ components:
$ref: '#/components/responses/tfvServerErrorResponse'
'503':
$ref: '#/components/responses/tfvServiceUnavailableResponse'
+ endpointEvent:
+ '{request.body#/eventCallbackUrl}':
+ post:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/endpointEvent'
+ examples:
+ endpointDisconnectedEventExample:
+ $ref: '#/components/examples/endpointDisconnectedEventExample'
+ responses:
+ '204':
+ description: Event was successfully received.
diff --git a/docs/CreateCall.md b/docs/CreateCall.md
index 20340a83..21fffab0 100644
--- a/docs/CreateCall.md
+++ b/docs/CreateCall.md
@@ -24,7 +24,7 @@
| **callback_timeout** | **Float** | This is the timeout (in seconds) to use when delivering webhooks for the call. Can be any numeric value (including decimals) between 1 and 25. | [optional][default to 15] |
| **machine_detection** | [**MachineDetectionConfiguration**](MachineDetectionConfiguration.md) | | [optional] |
| **priority** | **Integer** | The priority of this call over other calls from your account. For example, if during a call your application needs to place a new call and bridge it with the current call, you might want to create the call with priority 1 so that it will be the next call picked off your queue, ahead of other less time sensitive calls. A lower value means higher priority, so a priority 1 call takes precedence over a priority 2 call. | [optional][default to 5] |
-| **tag** | **String** | A custom string that will be sent with all webhooks for this call unless overwritten by a future <a href='/docs/voice/bxml/tag'>`<Tag>`</a> verb or `tag` attribute on another verb, or cleared. May be cleared by setting `tag=\"\"` Max length 256 characters. | [optional] |
+| **tag** | **String** | A custom string that will be sent with all webhooks for this call unless overwritten by a future <a href='/docs/voice/bxml/tag'>`<Tag>`</a> verb or `tag` attribute on another verb, or cleared. May be cleared by setting `tag=\"\"` Max length 4096 characters. | [optional] |
## Example
diff --git a/docs/CreateEndpointRequestBase.md b/docs/CreateEndpointRequestBase.md
new file mode 100644
index 00000000..c721cfb0
--- /dev/null
+++ b/docs/CreateEndpointRequestBase.md
@@ -0,0 +1,26 @@
+# Bandwidth::CreateEndpointRequestBase
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **type** | [**EndpointTypeEnum**](EndpointTypeEnum.md) | | |
+| **direction** | [**EndpointDirectionEnum**](EndpointDirectionEnum.md) | | |
+| **event_callback_url** | **String** | The URL to send event callbacks to. | [optional] |
+| **event_fallback_url** | **String** | The URL to send event fallbacks to. | [optional] |
+| **tag** | **String** | A tag for the endpoint. | [optional] |
+
+## Example
+
+```ruby
+require 'bandwidth-sdk'
+
+instance = Bandwidth::CreateEndpointRequestBase.new(
+ type: null,
+ direction: null,
+ event_callback_url: https://myapp.com/callback,
+ event_fallback_url: https://fallback.myapp.com/callback,
+ tag: my-tag
+)
+```
+
diff --git a/docs/CreateEndpointResponse.md b/docs/CreateEndpointResponse.md
new file mode 100644
index 00000000..3deec683
--- /dev/null
+++ b/docs/CreateEndpointResponse.md
@@ -0,0 +1,22 @@
+# Bandwidth::CreateEndpointResponse
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **links** | [**Array<Link1>**](Link1.md) | | |
+| **data** | [**CreateEndpointResponseData**](CreateEndpointResponseData.md) | | |
+| **errors** | [**Array<Error1>**](Error1.md) | | |
+
+## Example
+
+```ruby
+require 'bandwidth-sdk'
+
+instance = Bandwidth::CreateEndpointResponse.new(
+ links: null,
+ data: null,
+ errors: null
+)
+```
+
diff --git a/docs/CreateEndpointResponseData.md b/docs/CreateEndpointResponseData.md
new file mode 100644
index 00000000..81f43334
--- /dev/null
+++ b/docs/CreateEndpointResponseData.md
@@ -0,0 +1,32 @@
+# Bandwidth::CreateEndpointResponseData
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **endpoint_id** | **String** | The unique ID of the endpoint. | |
+| **type** | [**EndpointTypeEnum**](EndpointTypeEnum.md) | | |
+| **status** | [**EndpointStatusEnum**](EndpointStatusEnum.md) | | |
+| **creation_timestamp** | **Time** | The time the endpoint was created. In ISO-8601 format. | |
+| **expiration_timestamp** | **Time** | The time the endpoint token will expire. In ISO-8601 format. Tokens last 24 hours. | |
+| **tag** | **String** | A tag for the endpoint. | [optional] |
+| **devices** | [**Array<Device>**](Device.md) | | [optional] |
+| **token** | **String** | The json web token specific to the endpoint. Used to authenticate the client with the media gateway. | |
+
+## Example
+
+```ruby
+require 'bandwidth-sdk'
+
+instance = Bandwidth::CreateEndpointResponseData.new(
+ endpoint_id: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85,
+ type: null,
+ status: null,
+ creation_timestamp: 2021-01-01T00:00Z,
+ expiration_timestamp: 2021-01-02T00:00Z,
+ tag: my-tag,
+ devices: null,
+ token: xxxxx.yyyyy.zzzzz
+)
+```
+
diff --git a/docs/CreateWebRtcConnectionRequest.md b/docs/CreateWebRtcConnectionRequest.md
new file mode 100644
index 00000000..30bfec76
--- /dev/null
+++ b/docs/CreateWebRtcConnectionRequest.md
@@ -0,0 +1,28 @@
+# Bandwidth::CreateWebRtcConnectionRequest
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **type** | [**EndpointTypeEnum**](EndpointTypeEnum.md) | | |
+| **direction** | [**EndpointDirectionEnum**](EndpointDirectionEnum.md) | | |
+| **event_callback_url** | **String** | The URL to send event callbacks to. | [optional] |
+| **event_fallback_url** | **String** | The URL to send event fallbacks to. | [optional] |
+| **tag** | **String** | A tag for the endpoint. | [optional] |
+| **connection_metadata** | **Object** | | [optional] |
+
+## Example
+
+```ruby
+require 'bandwidth-sdk'
+
+instance = Bandwidth::CreateWebRtcConnectionRequest.new(
+ type: null,
+ direction: null,
+ event_callback_url: https://myapp.com/callback,
+ event_fallback_url: https://fallback.myapp.com/callback,
+ tag: my-tag,
+ connection_metadata: null
+)
+```
+
diff --git a/docs/Device.md b/docs/Device.md
new file mode 100644
index 00000000..a78fe939
--- /dev/null
+++ b/docs/Device.md
@@ -0,0 +1,24 @@
+# Bandwidth::Device
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **device_id** | **String** | The unique ID of the device. | |
+| **device_name** | **String** | The name of the device. | [optional] |
+| **status** | [**DeviceStatusEnum**](DeviceStatusEnum.md) | | |
+| **creation_timestamp** | **Time** | The time the device was created. In ISO-8601 format. | |
+
+## Example
+
+```ruby
+require 'bandwidth-sdk'
+
+instance = Bandwidth::Device.new(
+ device_id: d-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85,
+ device_name: David's iPhone,
+ status: null,
+ creation_timestamp: 2021-01-01T00:00Z
+)
+```
+
diff --git a/docs/DeviceStatusEnum.md b/docs/DeviceStatusEnum.md
new file mode 100644
index 00000000..cc34730e
--- /dev/null
+++ b/docs/DeviceStatusEnum.md
@@ -0,0 +1,15 @@
+# Bandwidth::DeviceStatusEnum
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+
+## Example
+
+```ruby
+require 'bandwidth-sdk'
+
+instance = Bandwidth::DeviceStatusEnum.new()
+```
+
diff --git a/docs/Endpoint.md b/docs/Endpoint.md
new file mode 100644
index 00000000..738bb946
--- /dev/null
+++ b/docs/Endpoint.md
@@ -0,0 +1,30 @@
+# Bandwidth::Endpoint
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **endpoint_id** | **String** | The unique ID of the endpoint. | |
+| **type** | [**EndpointTypeEnum**](EndpointTypeEnum.md) | | |
+| **status** | [**EndpointStatusEnum**](EndpointStatusEnum.md) | | |
+| **creation_timestamp** | **Time** | The time the endpoint was created. In ISO-8601 format. | |
+| **expiration_timestamp** | **Time** | The time the endpoint token will expire. In ISO-8601 format. Tokens last 24 hours. | |
+| **tag** | **String** | A tag for the endpoint. | [optional] |
+| **devices** | [**Array<Device>**](Device.md) | | [optional] |
+
+## Example
+
+```ruby
+require 'bandwidth-sdk'
+
+instance = Bandwidth::Endpoint.new(
+ endpoint_id: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85,
+ type: null,
+ status: null,
+ creation_timestamp: 2021-01-01T00:00Z,
+ expiration_timestamp: 2021-01-02T00:00Z,
+ tag: my-tag,
+ devices: null
+)
+```
+
diff --git a/docs/EndpointDirectionEnum.md b/docs/EndpointDirectionEnum.md
new file mode 100644
index 00000000..d10de036
--- /dev/null
+++ b/docs/EndpointDirectionEnum.md
@@ -0,0 +1,15 @@
+# Bandwidth::EndpointDirectionEnum
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+
+## Example
+
+```ruby
+require 'bandwidth-sdk'
+
+instance = Bandwidth::EndpointDirectionEnum.new()
+```
+
diff --git a/docs/EndpointEvent.md b/docs/EndpointEvent.md
new file mode 100644
index 00000000..3126ac14
--- /dev/null
+++ b/docs/EndpointEvent.md
@@ -0,0 +1,34 @@
+# Bandwidth::EndpointEvent
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **endpoint_id** | **String** | The unique ID of the endpoint. | |
+| **type** | [**EndpointTypeEnum**](EndpointTypeEnum.md) | | |
+| **status** | [**EndpointStatusEnum**](EndpointStatusEnum.md) | | |
+| **creation_timestamp** | **Time** | The time the endpoint was created. In ISO-8601 format. | |
+| **expiration_timestamp** | **Time** | The time the endpoint token will expire. In ISO-8601 format. Tokens last 24 hours. | |
+| **tag** | **String** | A tag for the endpoint. | [optional] |
+| **event_time** | **Time** | The time the event occurred. In ISO-8601 format. | |
+| **event_type** | [**EndpointEventTypeEnum**](EndpointEventTypeEnum.md) | | |
+| **device** | [**Device**](Device.md) | | [optional] |
+
+## Example
+
+```ruby
+require 'bandwidth-sdk'
+
+instance = Bandwidth::EndpointEvent.new(
+ endpoint_id: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85,
+ type: null,
+ status: null,
+ creation_timestamp: 2021-01-01T00:00Z,
+ expiration_timestamp: 2021-01-02T00:00Z,
+ tag: my-tag,
+ event_time: 2021-01-01T00:00Z,
+ event_type: null,
+ device: null
+)
+```
+
diff --git a/docs/EndpointEventTypeEnum.md b/docs/EndpointEventTypeEnum.md
new file mode 100644
index 00000000..2d786c87
--- /dev/null
+++ b/docs/EndpointEventTypeEnum.md
@@ -0,0 +1,15 @@
+# Bandwidth::EndpointEventTypeEnum
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+
+## Example
+
+```ruby
+require 'bandwidth-sdk'
+
+instance = Bandwidth::EndpointEventTypeEnum.new()
+```
+
diff --git a/docs/EndpointResponse.md b/docs/EndpointResponse.md
new file mode 100644
index 00000000..9a6bf7c3
--- /dev/null
+++ b/docs/EndpointResponse.md
@@ -0,0 +1,22 @@
+# Bandwidth::EndpointResponse
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **links** | [**Array<Link1>**](Link1.md) | | |
+| **data** | [**Endpoint**](Endpoint.md) | | |
+| **errors** | [**Array<Error1>**](Error1.md) | | |
+
+## Example
+
+```ruby
+require 'bandwidth-sdk'
+
+instance = Bandwidth::EndpointResponse.new(
+ links: null,
+ data: null,
+ errors: null
+)
+```
+
diff --git a/docs/EndpointStatusEnum.md b/docs/EndpointStatusEnum.md
new file mode 100644
index 00000000..5c9f11f6
--- /dev/null
+++ b/docs/EndpointStatusEnum.md
@@ -0,0 +1,15 @@
+# Bandwidth::EndpointStatusEnum
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+
+## Example
+
+```ruby
+require 'bandwidth-sdk'
+
+instance = Bandwidth::EndpointStatusEnum.new()
+```
+
diff --git a/docs/EndpointTypeEnum.md b/docs/EndpointTypeEnum.md
new file mode 100644
index 00000000..ab977490
--- /dev/null
+++ b/docs/EndpointTypeEnum.md
@@ -0,0 +1,15 @@
+# Bandwidth::EndpointTypeEnum
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+
+## Example
+
+```ruby
+require 'bandwidth-sdk'
+
+instance = Bandwidth::EndpointTypeEnum.new()
+```
+
diff --git a/docs/Endpoints.md b/docs/Endpoints.md
new file mode 100644
index 00000000..33a5bff1
--- /dev/null
+++ b/docs/Endpoints.md
@@ -0,0 +1,28 @@
+# Bandwidth::Endpoints
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **endpoint_id** | **String** | The unique ID of the endpoint. | |
+| **type** | [**EndpointTypeEnum**](EndpointTypeEnum.md) | | |
+| **status** | [**EndpointStatusEnum**](EndpointStatusEnum.md) | | |
+| **creation_timestamp** | **Time** | The time the endpoint was created. In ISO-8601 format. | |
+| **expiration_timestamp** | **Time** | The time the endpoint token will expire. In ISO-8601 format. Tokens last 24 hours. | |
+| **tag** | **String** | A tag for the endpoint. | [optional] |
+
+## Example
+
+```ruby
+require 'bandwidth-sdk'
+
+instance = Bandwidth::Endpoints.new(
+ endpoint_id: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85,
+ type: null,
+ status: null,
+ creation_timestamp: 2021-01-01T00:00Z,
+ expiration_timestamp: 2021-01-02T00:00Z,
+ tag: my-tag
+)
+```
+
diff --git a/docs/EndpointsApi.md b/docs/EndpointsApi.md
new file mode 100644
index 00000000..bae5ab8b
--- /dev/null
+++ b/docs/EndpointsApi.md
@@ -0,0 +1,395 @@
+# Bandwidth::EndpointsApi
+
+All URIs are relative to *http://localhost*
+
+| Method | HTTP request | Description |
+| ------ | ------------ | ----------- |
+| [**create_endpoint**](EndpointsApi.md#create_endpoint) | **POST** /accounts/{accountId}/endpoints | Create Endpoint |
+| [**delete_endpoint**](EndpointsApi.md#delete_endpoint) | **DELETE** /accounts/{accountId}/endpoints/{endpointId} | Delete Endpoint |
+| [**get_endpoint**](EndpointsApi.md#get_endpoint) | **GET** /accounts/{accountId}/endpoints/{endpointId} | Get Endpoint |
+| [**list_endpoints**](EndpointsApi.md#list_endpoints) | **GET** /accounts/{accountId}/endpoints | List Endpoints |
+| [**update_endpoint_bxml**](EndpointsApi.md#update_endpoint_bxml) | **PUT** /accounts/{accountId}/endpoints/{endpointId}/bxml | Update Endpoint BXML |
+
+
+## create_endpoint
+
+> create_endpoint(account_id, body)
+
+Create Endpoint
+
+Creates a new Endpoint for the specified account.
+
+### Examples
+
+```ruby
+require 'time'
+require 'bandwidth-sdk'
+# setup authorization
+Bandwidth.configure do |config|
+ # Configure HTTP basic authorization: Basic
+ config.username = 'YOUR USERNAME'
+ config.password = 'YOUR PASSWORD'
+
+ # Configure OAuth2 access token for authorization: OAuth2
+ config.access_token = 'YOUR ACCESS TOKEN'
+end
+
+api_instance = Bandwidth::EndpointsApi.new
+account_id = '9900000' # String | Your Bandwidth Account ID.
+body = 3.56 # CreateWebRtcConnectionRequest |
+
+begin
+ # Create Endpoint
+ result = api_instance.create_endpoint(account_id, body)
+ p result
+rescue Bandwidth::ApiError => e
+ puts "Error when calling EndpointsApi->create_endpoint: #{e}"
+end
+```
+
+#### Using the create_endpoint_with_http_info variant
+
+This returns an Array which contains the response data, status code and headers.
+
+> , Integer, Hash)> create_endpoint_with_http_info(account_id, body)
+
+```ruby
+begin
+ # Create Endpoint
+ data, status_code, headers = api_instance.create_endpoint_with_http_info(account_id, body)
+ p status_code # => 2xx
+ p headers # => { ... }
+ p data # =>
+rescue Bandwidth::ApiError => e
+ puts "Error when calling EndpointsApi->create_endpoint_with_http_info: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **account_id** | **String** | Your Bandwidth Account ID. | |
+| **body** | **CreateWebRtcConnectionRequest** | | |
+
+### Return type
+
+[**CreateEndpointResponse**](CreateEndpointResponse.md)
+
+### Authorization
+
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
+
+## delete_endpoint
+
+> delete_endpoint(account_id, endpoint_id)
+
+Delete Endpoint
+
+Deletes the specified endpoint. If the endpoint is actively streaming media, the media stream will be terminated.
+
+### Examples
+
+```ruby
+require 'time'
+require 'bandwidth-sdk'
+# setup authorization
+Bandwidth.configure do |config|
+ # Configure HTTP basic authorization: Basic
+ config.username = 'YOUR USERNAME'
+ config.password = 'YOUR PASSWORD'
+
+ # Configure OAuth2 access token for authorization: OAuth2
+ config.access_token = 'YOUR ACCESS TOKEN'
+end
+
+api_instance = Bandwidth::EndpointsApi.new
+account_id = '9900000' # String | Your Bandwidth Account ID.
+endpoint_id = 'e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85' # String | BRTC Endpoint ID.
+
+begin
+ # Delete Endpoint
+ api_instance.delete_endpoint(account_id, endpoint_id)
+rescue Bandwidth::ApiError => e
+ puts "Error when calling EndpointsApi->delete_endpoint: #{e}"
+end
+```
+
+#### Using the delete_endpoint_with_http_info variant
+
+This returns an Array which contains the response data (`nil` in this case), status code and headers.
+
+> delete_endpoint_with_http_info(account_id, endpoint_id)
+
+```ruby
+begin
+ # Delete Endpoint
+ data, status_code, headers = api_instance.delete_endpoint_with_http_info(account_id, endpoint_id)
+ p status_code # => 2xx
+ p headers # => { ... }
+ p data # => nil
+rescue Bandwidth::ApiError => e
+ puts "Error when calling EndpointsApi->delete_endpoint_with_http_info: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **account_id** | **String** | Your Bandwidth Account ID. | |
+| **endpoint_id** | **String** | BRTC Endpoint ID. | |
+
+### Return type
+
+nil (empty response body)
+
+### Authorization
+
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
+## get_endpoint
+
+> get_endpoint(account_id, endpoint_id)
+
+Get Endpoint
+
+Returns information about the specified endpoint.
+
+### Examples
+
+```ruby
+require 'time'
+require 'bandwidth-sdk'
+# setup authorization
+Bandwidth.configure do |config|
+ # Configure HTTP basic authorization: Basic
+ config.username = 'YOUR USERNAME'
+ config.password = 'YOUR PASSWORD'
+
+ # Configure OAuth2 access token for authorization: OAuth2
+ config.access_token = 'YOUR ACCESS TOKEN'
+end
+
+api_instance = Bandwidth::EndpointsApi.new
+account_id = '9900000' # String | Your Bandwidth Account ID.
+endpoint_id = 'e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85' # String | BRTC Endpoint ID.
+
+begin
+ # Get Endpoint
+ result = api_instance.get_endpoint(account_id, endpoint_id)
+ p result
+rescue Bandwidth::ApiError => e
+ puts "Error when calling EndpointsApi->get_endpoint: #{e}"
+end
+```
+
+#### Using the get_endpoint_with_http_info variant
+
+This returns an Array which contains the response data, status code and headers.
+
+> , Integer, Hash)> get_endpoint_with_http_info(account_id, endpoint_id)
+
+```ruby
+begin
+ # Get Endpoint
+ data, status_code, headers = api_instance.get_endpoint_with_http_info(account_id, endpoint_id)
+ p status_code # => 2xx
+ p headers # => { ... }
+ p data # =>
+rescue Bandwidth::ApiError => e
+ puts "Error when calling EndpointsApi->get_endpoint_with_http_info: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **account_id** | **String** | Your Bandwidth Account ID. | |
+| **endpoint_id** | **String** | BRTC Endpoint ID. | |
+
+### Return type
+
+[**EndpointResponse**](EndpointResponse.md)
+
+### Authorization
+
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
+## list_endpoints
+
+> list_endpoints(account_id, opts)
+
+List Endpoints
+
+Returns a list of endpoints associated with the specified account.
+
+### Examples
+
+```ruby
+require 'time'
+require 'bandwidth-sdk'
+# setup authorization
+Bandwidth.configure do |config|
+ # Configure HTTP basic authorization: Basic
+ config.username = 'YOUR USERNAME'
+ config.password = 'YOUR PASSWORD'
+
+ # Configure OAuth2 access token for authorization: OAuth2
+ config.access_token = 'YOUR ACCESS TOKEN'
+end
+
+api_instance = Bandwidth::EndpointsApi.new
+account_id = '9900000' # String | Your Bandwidth Account ID.
+opts = {
+ type: Bandwidth::EndpointTypeEnum::WEBRTC, # EndpointTypeEnum | The type of endpoint.
+ status: Bandwidth::EndpointStatusEnum::CONNECTED, # EndpointStatusEnum | The status of the endpoint.
+ after_cursor: 'TWF5IHRoZSBmb3JjZSBiZSB3aXRoIHlvdQ==', # String | The cursor to use for pagination. This is the value of the `next` link in the previous response.
+ limit: 2 # Integer | The maximum number of endpoints to return in the response.
+}
+
+begin
+ # List Endpoints
+ result = api_instance.list_endpoints(account_id, opts)
+ p result
+rescue Bandwidth::ApiError => e
+ puts "Error when calling EndpointsApi->list_endpoints: #{e}"
+end
+```
+
+#### Using the list_endpoints_with_http_info variant
+
+This returns an Array which contains the response data, status code and headers.
+
+> , Integer, Hash)> list_endpoints_with_http_info(account_id, opts)
+
+```ruby
+begin
+ # List Endpoints
+ data, status_code, headers = api_instance.list_endpoints_with_http_info(account_id, opts)
+ p status_code # => 2xx
+ p headers # => { ... }
+ p data # =>
+rescue Bandwidth::ApiError => e
+ puts "Error when calling EndpointsApi->list_endpoints_with_http_info: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **account_id** | **String** | Your Bandwidth Account ID. | |
+| **type** | [**EndpointTypeEnum**](.md) | The type of endpoint. | [optional] |
+| **status** | [**EndpointStatusEnum**](.md) | The status of the endpoint. | [optional] |
+| **after_cursor** | **String** | The cursor to use for pagination. This is the value of the `next` link in the previous response. | [optional] |
+| **limit** | **Integer** | The maximum number of endpoints to return in the response. | [optional][default to 100] |
+
+### Return type
+
+[**ListEndpointsResponse**](ListEndpointsResponse.md)
+
+### Authorization
+
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
+## update_endpoint_bxml
+
+> update_endpoint_bxml(account_id, endpoint_id, body)
+
+Update Endpoint BXML
+
+Updates the BXML for the specified endpoint.
+
+### Examples
+
+```ruby
+require 'time'
+require 'bandwidth-sdk'
+# setup authorization
+Bandwidth.configure do |config|
+ # Configure HTTP basic authorization: Basic
+ config.username = 'YOUR USERNAME'
+ config.password = 'YOUR PASSWORD'
+
+ # Configure OAuth2 access token for authorization: OAuth2
+ config.access_token = 'YOUR ACCESS TOKEN'
+end
+
+api_instance = Bandwidth::EndpointsApi.new
+account_id = '9900000' # String | Your Bandwidth Account ID.
+endpoint_id = 'e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85' # String | BRTC Endpoint ID.
+body = 'body_example' # String |
+
+begin
+ # Update Endpoint BXML
+ api_instance.update_endpoint_bxml(account_id, endpoint_id, body)
+rescue Bandwidth::ApiError => e
+ puts "Error when calling EndpointsApi->update_endpoint_bxml: #{e}"
+end
+```
+
+#### Using the update_endpoint_bxml_with_http_info variant
+
+This returns an Array which contains the response data (`nil` in this case), status code and headers.
+
+> update_endpoint_bxml_with_http_info(account_id, endpoint_id, body)
+
+```ruby
+begin
+ # Update Endpoint BXML
+ data, status_code, headers = api_instance.update_endpoint_bxml_with_http_info(account_id, endpoint_id, body)
+ p status_code # => 2xx
+ p headers # => { ... }
+ p data # => nil
+rescue Bandwidth::ApiError => e
+ puts "Error when calling EndpointsApi->update_endpoint_bxml_with_http_info: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **account_id** | **String** | Your Bandwidth Account ID. | |
+| **endpoint_id** | **String** | BRTC Endpoint ID. | |
+| **body** | **String** | | |
+
+### Return type
+
+nil (empty response body)
+
+### Authorization
+
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
+
+### HTTP request headers
+
+- **Content-Type**: application/xml
+- **Accept**: application/json
+
diff --git a/docs/Error1.md b/docs/Error1.md
new file mode 100644
index 00000000..a0226002
--- /dev/null
+++ b/docs/Error1.md
@@ -0,0 +1,26 @@
+# Bandwidth::Error1
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | A unique identifier for the error. | [optional] |
+| **type** | **String** | The type of error. | |
+| **description** | **String** | A description of the error. | |
+| **code** | **String** | A code that uniquely identifies the error. | [optional] |
+| **source** | [**Error1Source**](Error1Source.md) | | [optional] |
+
+## Example
+
+```ruby
+require 'bandwidth-sdk'
+
+instance = Bandwidth::Error1.new(
+ id: 59512d87-7a92-4040-8e4a-78fb772019b9,
+ type: resource.not_found,
+ description: The requested resource was not found.,
+ code: 404,
+ source: null
+)
+```
+
diff --git a/docs/Error1Source.md b/docs/Error1Source.md
new file mode 100644
index 00000000..e62ea7b3
--- /dev/null
+++ b/docs/Error1Source.md
@@ -0,0 +1,24 @@
+# Bandwidth::Error1Source
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **parameter** | **String** | The URI parameter that caused the error. | [optional] |
+| **field** | **String** | The request body field that caused the error. | [optional] |
+| **header** | **String** | The header that caused the error. | [optional] |
+| **reference** | **String** | The resource ID or path to the resource (or non-existent resource) causing the error. | [optional] |
+
+## Example
+
+```ruby
+require 'bandwidth-sdk'
+
+instance = Bandwidth::Error1Source.new(
+ parameter: accountId,
+ field: accountId,
+ header: Authorization,
+ reference: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85
+)
+```
+
diff --git a/docs/ErrorResponse.md b/docs/ErrorResponse.md
new file mode 100644
index 00000000..ba927df8
--- /dev/null
+++ b/docs/ErrorResponse.md
@@ -0,0 +1,22 @@
+# Bandwidth::ErrorResponse
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **links** | [**Array<Link1>**](Link1.md) | | |
+| **data** | **Object** | | |
+| **errors** | [**Array<Error1>**](Error1.md) | | |
+
+## Example
+
+```ruby
+require 'bandwidth-sdk'
+
+instance = Bandwidth::ErrorResponse.new(
+ links: null,
+ data: null,
+ errors: null
+)
+```
+
diff --git a/docs/Link1.md b/docs/Link1.md
new file mode 100644
index 00000000..c24d3067
--- /dev/null
+++ b/docs/Link1.md
@@ -0,0 +1,22 @@
+# Bandwidth::Link1
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **href** | **String** | The full URL of the link. | [optional] |
+| **rel** | **String** | The relationship of the link to the current resource. | [optional] |
+| **method** | **String** | The HTTP method to use when making the request. | [optional] |
+
+## Example
+
+```ruby
+require 'bandwidth-sdk'
+
+instance = Bandwidth::Link1.new(
+ href: https://api.bandwidth.com/v2/accounts/5500123/endpoints/e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85,
+ rel: self,
+ method: GET
+)
+```
+
diff --git a/docs/ListEndpointsResponse.md b/docs/ListEndpointsResponse.md
new file mode 100644
index 00000000..9d7767f9
--- /dev/null
+++ b/docs/ListEndpointsResponse.md
@@ -0,0 +1,24 @@
+# Bandwidth::ListEndpointsResponse
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **links** | [**Array<Link1>**](Link1.md) | | |
+| **page** | [**Page**](Page.md) | | [optional] |
+| **data** | [**Array<Endpoints>**](Endpoints.md) | | |
+| **errors** | [**Array<Error1>**](Error1.md) | | |
+
+## Example
+
+```ruby
+require 'bandwidth-sdk'
+
+instance = Bandwidth::ListEndpointsResponse.new(
+ links: null,
+ page: null,
+ data: null,
+ errors: null
+)
+```
+
diff --git a/docs/Page.md b/docs/Page.md
new file mode 100644
index 00000000..76cdf675
--- /dev/null
+++ b/docs/Page.md
@@ -0,0 +1,24 @@
+# Bandwidth::Page
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **page_size** | **Integer** | The number of items per page. | |
+| **total_elements** | **Integer** | The total number of items. | [optional] |
+| **total_pages** | **Integer** | The total number of pages. | [optional] |
+| **page_number** | **Integer** | The current page number. | [optional] |
+
+## Example
+
+```ruby
+require 'bandwidth-sdk'
+
+instance = Bandwidth::Page.new(
+ page_size: 10,
+ total_elements: 100,
+ total_pages: 10,
+ page_number: 0
+)
+```
+
diff --git a/docs/RbmActionBase.md b/docs/RbmActionBase.md
index b67a76b6..d582dce6 100644
--- a/docs/RbmActionBase.md
+++ b/docs/RbmActionBase.md
@@ -16,7 +16,7 @@ require 'bandwidth-sdk'
instance = Bandwidth::RbmActionBase.new(
type: null,
text: Hello world,
- postback_data: [B@662d3e85
+ postback_data: [B@2082e0e4
)
```
diff --git a/docs/RbmSuggestionResponse.md b/docs/RbmSuggestionResponse.md
index 2aa64e13..e458fcb1 100644
--- a/docs/RbmSuggestionResponse.md
+++ b/docs/RbmSuggestionResponse.md
@@ -14,7 +14,7 @@ require 'bandwidth-sdk'
instance = Bandwidth::RbmSuggestionResponse.new(
text: Yes, I would like to proceed,
- postback_data: [B@662d3e85
+ postback_data: [B@2082e0e4
)
```
diff --git a/docs/SipConnectionMetadata.md b/docs/SipConnectionMetadata.md
new file mode 100644
index 00000000..afdf8158
--- /dev/null
+++ b/docs/SipConnectionMetadata.md
@@ -0,0 +1,24 @@
+# Bandwidth::SipConnectionMetadata
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **ip_address** | **String** | The IP address of the SIP connection. | [optional] |
+| **port** | **Integer** | The port of the SIP connection. | [optional] |
+| **credentials** | [**SipCredentials**](SipCredentials.md) | | [optional] |
+| **uui_header** | **String** | The User-to-User Information header for the SIP connection. | [optional] |
+
+## Example
+
+```ruby
+require 'bandwidth-sdk'
+
+instance = Bandwidth::SipConnectionMetadata.new(
+ ip_address: 192.168.0.0,
+ port: 5060,
+ credentials: null,
+ uui_header: my-uui-header
+)
+```
+
diff --git a/docs/SipCredentials.md b/docs/SipCredentials.md
new file mode 100644
index 00000000..c448769e
--- /dev/null
+++ b/docs/SipCredentials.md
@@ -0,0 +1,20 @@
+# Bandwidth::SipCredentials
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **username** | **String** | The username for the SIP connection. | [optional] |
+| **password** | **String** | The password for the SIP connection. | [optional] |
+
+## Example
+
+```ruby
+require 'bandwidth-sdk'
+
+instance = Bandwidth::SipCredentials.new(
+ username: username,
+ password: password
+)
+```
+
diff --git a/docs/UpdateCall.md b/docs/UpdateCall.md
index f8f4a16f..31c5c67a 100644
--- a/docs/UpdateCall.md
+++ b/docs/UpdateCall.md
@@ -13,7 +13,7 @@
| **redirect_fallback_method** | [**RedirectMethodEnum**](RedirectMethodEnum.md) | | [optional][default to 'POST'] |
| **fallback_username** | **String** | Basic auth username. | [optional] |
| **fallback_password** | **String** | Basic auth password. | [optional] |
-| **tag** | **String** | A custom string that will be sent with this and all future callbacks unless overwritten by a future `tag` attribute or [`<Tag>`](/docs/voice/bxml/tag) verb, or cleared. May be cleared by setting `tag=\"\"`. Max length 256 characters. Not allowed if `state` is `completed`. | [optional] |
+| **tag** | **String** | A custom string that will be sent with this and all future callbacks unless overwritten by a future `tag` attribute or [`<Tag>`](/docs/voice/bxml/tag) verb, or cleared. May be cleared by setting `tag=\"\"`. Max length 4096 characters. Not allowed if `state` is `completed`. | [optional] |
## Example
diff --git a/lib/bandwidth-sdk.rb b/lib/bandwidth-sdk.rb
index 718f3ece..f4c9d4ff 100644
--- a/lib/bandwidth-sdk.rb
+++ b/lib/bandwidth-sdk.rb
@@ -57,16 +57,33 @@
require 'bandwidth-sdk/models/create_async_bulk_lookup_response_data'
require 'bandwidth-sdk/models/create_call'
require 'bandwidth-sdk/models/create_call_response'
+require 'bandwidth-sdk/models/create_endpoint_request_base'
+require 'bandwidth-sdk/models/create_endpoint_response'
+require 'bandwidth-sdk/models/create_endpoint_response_data'
require 'bandwidth-sdk/models/create_message_request_error'
require 'bandwidth-sdk/models/create_multi_channel_message_response'
require 'bandwidth-sdk/models/create_sync_lookup_response'
require 'bandwidth-sdk/models/create_sync_lookup_response_data'
+require 'bandwidth-sdk/models/create_web_rtc_connection_request'
require 'bandwidth-sdk/models/deactivation_event_enum'
+require 'bandwidth-sdk/models/device'
+require 'bandwidth-sdk/models/device_status_enum'
require 'bandwidth-sdk/models/disconnect_callback'
require 'bandwidth-sdk/models/diversion'
require 'bandwidth-sdk/models/dtmf_callback'
+require 'bandwidth-sdk/models/endpoint'
+require 'bandwidth-sdk/models/endpoint_direction_enum'
+require 'bandwidth-sdk/models/endpoint_event'
+require 'bandwidth-sdk/models/endpoint_event_type_enum'
+require 'bandwidth-sdk/models/endpoint_response'
+require 'bandwidth-sdk/models/endpoint_status_enum'
+require 'bandwidth-sdk/models/endpoint_type_enum'
+require 'bandwidth-sdk/models/endpoints'
require 'bandwidth-sdk/models/error'
+require 'bandwidth-sdk/models/error1'
+require 'bandwidth-sdk/models/error1_source'
require 'bandwidth-sdk/models/error_object'
+require 'bandwidth-sdk/models/error_response'
require 'bandwidth-sdk/models/error_source'
require 'bandwidth-sdk/models/failure_webhook'
require 'bandwidth-sdk/models/field_error'
@@ -82,8 +99,10 @@
require 'bandwidth-sdk/models/latest_message_delivery_status_enum'
require 'bandwidth-sdk/models/line_type_enum'
require 'bandwidth-sdk/models/link'
+require 'bandwidth-sdk/models/link1'
require 'bandwidth-sdk/models/link_schema'
require 'bandwidth-sdk/models/links_object'
+require 'bandwidth-sdk/models/list_endpoints_response'
require 'bandwidth-sdk/models/list_message_direction_enum'
require 'bandwidth-sdk/models/list_message_item'
require 'bandwidth-sdk/models/lookup_error_response'
@@ -127,6 +146,7 @@
require 'bandwidth-sdk/models/multi_channel_message_request'
require 'bandwidth-sdk/models/multi_channel_message_response_data'
require 'bandwidth-sdk/models/opt_in_workflow'
+require 'bandwidth-sdk/models/page'
require 'bandwidth-sdk/models/page_info'
require 'bandwidth-sdk/models/priority_enum'
require 'bandwidth-sdk/models/product_type_enum'
@@ -155,6 +175,8 @@
require 'bandwidth-sdk/models/recording_transcriptions'
require 'bandwidth-sdk/models/redirect_callback'
require 'bandwidth-sdk/models/redirect_method_enum'
+require 'bandwidth-sdk/models/sip_connection_metadata'
+require 'bandwidth-sdk/models/sip_credentials'
require 'bandwidth-sdk/models/sms_message_content'
require 'bandwidth-sdk/models/standalone_card_orientation_enum'
require 'bandwidth-sdk/models/status_callback'
@@ -233,6 +255,7 @@
# APIs
require 'bandwidth-sdk/api/calls_api'
require 'bandwidth-sdk/api/conferences_api'
+require 'bandwidth-sdk/api/endpoints_api'
require 'bandwidth-sdk/api/mfa_api'
require 'bandwidth-sdk/api/media_api'
require 'bandwidth-sdk/api/messages_api'
diff --git a/lib/bandwidth-sdk/api/endpoints_api.rb b/lib/bandwidth-sdk/api/endpoints_api.rb
new file mode 100644
index 00000000..e669fe2d
--- /dev/null
+++ b/lib/bandwidth-sdk/api/endpoints_api.rb
@@ -0,0 +1,397 @@
+=begin
+#Bandwidth
+
+#Bandwidth's Communication APIs
+
+The version of the OpenAPI document: 1.0.0
+Contact: letstalk@bandwidth.com
+Generated by: https://openapi-generator.tech
+Generator version: 7.17.0
+
+=end
+
+require 'cgi'
+
+module Bandwidth
+ class EndpointsApi
+ attr_accessor :api_client
+
+ def initialize(api_client = ApiClient.default)
+ @api_client = api_client
+ end
+ # Create Endpoint
+ # Creates a new Endpoint for the specified account.
+ # @param account_id [String] Your Bandwidth Account ID.
+ # @param body [CreateWebRtcConnectionRequest]
+ # @param [Hash] opts the optional parameters
+ # @return [CreateEndpointResponse]
+ def create_endpoint(account_id, body, opts = {})
+ data, _status_code, _headers = create_endpoint_with_http_info(account_id, body, opts)
+ data
+ end
+
+ # Create Endpoint
+ # Creates a new Endpoint for the specified account.
+ # @param account_id [String] Your Bandwidth Account ID.
+ # @param body [CreateWebRtcConnectionRequest]
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(CreateEndpointResponse, Integer, Hash)>] CreateEndpointResponse data, response status code and response headers
+ def create_endpoint_with_http_info(account_id, body, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: EndpointsApi.create_endpoint ...'
+ end
+ # verify the required parameter 'account_id' is set
+ if @api_client.config.client_side_validation && account_id.nil?
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling EndpointsApi.create_endpoint"
+ end
+ # verify the required parameter 'body' is set
+ if @api_client.config.client_side_validation && body.nil?
+ fail ArgumentError, "Missing the required parameter 'body' when calling EndpointsApi.create_endpoint"
+ end
+ # resource path
+ local_var_path = '/accounts/{accountId}/endpoints'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['application/json'])
+ if !content_type.nil?
+ header_params['Content-Type'] = content_type
+ end
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'CreateEndpointResponse'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2']
+
+ new_options = opts.merge(
+ :operation => :"EndpointsApi.create_endpoint",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: EndpointsApi#create_endpoint\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Delete Endpoint
+ # Deletes the specified endpoint. If the endpoint is actively streaming media, the media stream will be terminated.
+ # @param account_id [String] Your Bandwidth Account ID.
+ # @param endpoint_id [String] BRTC Endpoint ID.
+ # @param [Hash] opts the optional parameters
+ # @return [nil]
+ def delete_endpoint(account_id, endpoint_id, opts = {})
+ delete_endpoint_with_http_info(account_id, endpoint_id, opts)
+ nil
+ end
+
+ # Delete Endpoint
+ # Deletes the specified endpoint. If the endpoint is actively streaming media, the media stream will be terminated.
+ # @param account_id [String] Your Bandwidth Account ID.
+ # @param endpoint_id [String] BRTC Endpoint ID.
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
+ def delete_endpoint_with_http_info(account_id, endpoint_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: EndpointsApi.delete_endpoint ...'
+ end
+ # verify the required parameter 'account_id' is set
+ if @api_client.config.client_side_validation && account_id.nil?
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling EndpointsApi.delete_endpoint"
+ end
+ # verify the required parameter 'endpoint_id' is set
+ if @api_client.config.client_side_validation && endpoint_id.nil?
+ fail ArgumentError, "Missing the required parameter 'endpoint_id' when calling EndpointsApi.delete_endpoint"
+ end
+ # resource path
+ local_var_path = '/accounts/{accountId}/endpoints/{endpointId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'endpointId' + '}', CGI.escape(endpoint_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type]
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2']
+
+ new_options = opts.merge(
+ :operation => :"EndpointsApi.delete_endpoint",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: EndpointsApi#delete_endpoint\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Get Endpoint
+ # Returns information about the specified endpoint.
+ # @param account_id [String] Your Bandwidth Account ID.
+ # @param endpoint_id [String] BRTC Endpoint ID.
+ # @param [Hash] opts the optional parameters
+ # @return [EndpointResponse]
+ def get_endpoint(account_id, endpoint_id, opts = {})
+ data, _status_code, _headers = get_endpoint_with_http_info(account_id, endpoint_id, opts)
+ data
+ end
+
+ # Get Endpoint
+ # Returns information about the specified endpoint.
+ # @param account_id [String] Your Bandwidth Account ID.
+ # @param endpoint_id [String] BRTC Endpoint ID.
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(EndpointResponse, Integer, Hash)>] EndpointResponse data, response status code and response headers
+ def get_endpoint_with_http_info(account_id, endpoint_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: EndpointsApi.get_endpoint ...'
+ end
+ # verify the required parameter 'account_id' is set
+ if @api_client.config.client_side_validation && account_id.nil?
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling EndpointsApi.get_endpoint"
+ end
+ # verify the required parameter 'endpoint_id' is set
+ if @api_client.config.client_side_validation && endpoint_id.nil?
+ fail ArgumentError, "Missing the required parameter 'endpoint_id' when calling EndpointsApi.get_endpoint"
+ end
+ # resource path
+ local_var_path = '/accounts/{accountId}/endpoints/{endpointId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'endpointId' + '}', CGI.escape(endpoint_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'EndpointResponse'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2']
+
+ new_options = opts.merge(
+ :operation => :"EndpointsApi.get_endpoint",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: EndpointsApi#get_endpoint\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # List Endpoints
+ # Returns a list of endpoints associated with the specified account.
+ # @param account_id [String] Your Bandwidth Account ID.
+ # @param [Hash] opts the optional parameters
+ # @option opts [EndpointTypeEnum] :type The type of endpoint.
+ # @option opts [EndpointStatusEnum] :status The status of the endpoint.
+ # @option opts [String] :after_cursor The cursor to use for pagination. This is the value of the `next` link in the previous response.
+ # @option opts [Integer] :limit The maximum number of endpoints to return in the response. (default to 100)
+ # @return [ListEndpointsResponse]
+ def list_endpoints(account_id, opts = {})
+ data, _status_code, _headers = list_endpoints_with_http_info(account_id, opts)
+ data
+ end
+
+ # List Endpoints
+ # Returns a list of endpoints associated with the specified account.
+ # @param account_id [String] Your Bandwidth Account ID.
+ # @param [Hash] opts the optional parameters
+ # @option opts [EndpointTypeEnum] :type The type of endpoint.
+ # @option opts [EndpointStatusEnum] :status The status of the endpoint.
+ # @option opts [String] :after_cursor The cursor to use for pagination. This is the value of the `next` link in the previous response.
+ # @option opts [Integer] :limit The maximum number of endpoints to return in the response. (default to 100)
+ # @return [Array<(ListEndpointsResponse, Integer, Hash)>] ListEndpointsResponse data, response status code and response headers
+ def list_endpoints_with_http_info(account_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: EndpointsApi.list_endpoints ...'
+ end
+ # verify the required parameter 'account_id' is set
+ if @api_client.config.client_side_validation && account_id.nil?
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling EndpointsApi.list_endpoints"
+ end
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 1000
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling EndpointsApi.list_endpoints, must be smaller than or equal to 1000.'
+ end
+
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling EndpointsApi.list_endpoints, must be greater than or equal to 1.'
+ end
+
+ # resource path
+ local_var_path = '/accounts/{accountId}/endpoints'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+ query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
+ query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
+ query_params[:'afterCursor'] = opts[:'after_cursor'] if !opts[:'after_cursor'].nil?
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'ListEndpointsResponse'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2']
+
+ new_options = opts.merge(
+ :operation => :"EndpointsApi.list_endpoints",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: EndpointsApi#list_endpoints\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Update Endpoint BXML
+ # Updates the BXML for the specified endpoint.
+ # @param account_id [String] Your Bandwidth Account ID.
+ # @param endpoint_id [String] BRTC Endpoint ID.
+ # @param body [String]
+ # @param [Hash] opts the optional parameters
+ # @return [nil]
+ def update_endpoint_bxml(account_id, endpoint_id, body, opts = {})
+ update_endpoint_bxml_with_http_info(account_id, endpoint_id, body, opts)
+ nil
+ end
+
+ # Update Endpoint BXML
+ # Updates the BXML for the specified endpoint.
+ # @param account_id [String] Your Bandwidth Account ID.
+ # @param endpoint_id [String] BRTC Endpoint ID.
+ # @param body [String]
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
+ def update_endpoint_bxml_with_http_info(account_id, endpoint_id, body, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: EndpointsApi.update_endpoint_bxml ...'
+ end
+ # verify the required parameter 'account_id' is set
+ if @api_client.config.client_side_validation && account_id.nil?
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling EndpointsApi.update_endpoint_bxml"
+ end
+ # verify the required parameter 'endpoint_id' is set
+ if @api_client.config.client_side_validation && endpoint_id.nil?
+ fail ArgumentError, "Missing the required parameter 'endpoint_id' when calling EndpointsApi.update_endpoint_bxml"
+ end
+ # verify the required parameter 'body' is set
+ if @api_client.config.client_side_validation && body.nil?
+ fail ArgumentError, "Missing the required parameter 'body' when calling EndpointsApi.update_endpoint_bxml"
+ end
+ # resource path
+ local_var_path = '/accounts/{accountId}/endpoints/{endpointId}/bxml'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'endpointId' + '}', CGI.escape(endpoint_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['application/xml'])
+ if !content_type.nil?
+ header_params['Content-Type'] = content_type
+ end
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
+
+ # return_type
+ return_type = opts[:debug_return_type]
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2']
+
+ new_options = opts.merge(
+ :operation => :"EndpointsApi.update_endpoint_bxml",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: EndpointsApi#update_endpoint_bxml\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+ end
+end
diff --git a/lib/bandwidth-sdk/configuration.rb b/lib/bandwidth-sdk/configuration.rb
index 3ec4c23b..010085e1 100644
--- a/lib/bandwidth-sdk/configuration.rb
+++ b/lib/bandwidth-sdk/configuration.rb
@@ -403,6 +403,36 @@ def operation_server_settings
description: "Production",
}
],
+ "EndpointsApi.create_endpoint": [
+ {
+ url: "https://api.bandwidth.com/v2",
+ description: "Production",
+ }
+ ],
+ "EndpointsApi.delete_endpoint": [
+ {
+ url: "https://api.bandwidth.com/v2",
+ description: "Production",
+ }
+ ],
+ "EndpointsApi.get_endpoint": [
+ {
+ url: "https://api.bandwidth.com/v2",
+ description: "Production",
+ }
+ ],
+ "EndpointsApi.list_endpoints": [
+ {
+ url: "https://api.bandwidth.com/v2",
+ description: "Production",
+ }
+ ],
+ "EndpointsApi.update_endpoint_bxml": [
+ {
+ url: "https://api.bandwidth.com/v2",
+ description: "Production",
+ }
+ ],
"MFAApi.generate_messaging_code": [
{
url: "https://mfa.bandwidth.com/api/v1",
diff --git a/lib/bandwidth-sdk/models/create_call.rb b/lib/bandwidth-sdk/models/create_call.rb
index 8cb833a9..0025d234 100644
--- a/lib/bandwidth-sdk/models/create_call.rb
+++ b/lib/bandwidth-sdk/models/create_call.rb
@@ -71,7 +71,7 @@ class CreateCall < ApiModelBase
# The priority of this call over other calls from your account. For example, if during a call your application needs to place a new call and bridge it with the current call, you might want to create the call with priority 1 so that it will be the next call picked off your queue, ahead of other less time sensitive calls. A lower value means higher priority, so a priority 1 call takes precedence over a priority 2 call.
attr_accessor :priority
- # A custom string that will be sent with all webhooks for this call unless overwritten by a future `` verb or `tag` attribute on another verb, or cleared. May be cleared by setting `tag=\"\"` Max length 256 characters.
+ # A custom string that will be sent with all webhooks for this call unless overwritten by a future `` verb or `tag` attribute on another verb, or cleared. May be cleared by setting `tag=\"\"` Max length 4096 characters.
attr_accessor :tag
class EnumAttributeValidator
@@ -380,8 +380,8 @@ def list_invalid_properties
invalid_properties.push('invalid value for "priority", must be greater than or equal to 1.')
end
- if !@tag.nil? && @tag.to_s.length > 256
- invalid_properties.push('invalid value for "tag", the character length must be smaller than or equal to 256.')
+ if !@tag.nil? && @tag.to_s.length > 4096
+ invalid_properties.push('invalid value for "tag", the character length must be smaller than or equal to 4096.')
end
invalid_properties
@@ -409,7 +409,7 @@ def valid?
return false if !@callback_timeout.nil? && @callback_timeout < 1
return false if !@priority.nil? && @priority > 5
return false if !@priority.nil? && @priority < 1
- return false if !@tag.nil? && @tag.to_s.length > 256
+ return false if !@tag.nil? && @tag.to_s.length > 4096
true
end
@@ -572,8 +572,8 @@ def priority=(priority)
# Custom attribute writer method with validation
# @param [Object] tag Value to be assigned
def tag=(tag)
- if !tag.nil? && tag.to_s.length > 256
- fail ArgumentError, 'invalid value for "tag", the character length must be smaller than or equal to 256.'
+ if !tag.nil? && tag.to_s.length > 4096
+ fail ArgumentError, 'invalid value for "tag", the character length must be smaller than or equal to 4096.'
end
@tag = tag
diff --git a/lib/bandwidth-sdk/models/create_endpoint_request_base.rb b/lib/bandwidth-sdk/models/create_endpoint_request_base.rb
new file mode 100644
index 00000000..55ba4815
--- /dev/null
+++ b/lib/bandwidth-sdk/models/create_endpoint_request_base.rb
@@ -0,0 +1,250 @@
+=begin
+#Bandwidth
+
+#Bandwidth's Communication APIs
+
+The version of the OpenAPI document: 1.0.0
+Contact: letstalk@bandwidth.com
+Generated by: https://openapi-generator.tech
+Generator version: 7.17.0
+
+=end
+
+require 'date'
+require 'time'
+
+module Bandwidth
+ class CreateEndpointRequestBase < ApiModelBase
+ attr_accessor :type
+
+ attr_accessor :direction
+
+ # The URL to send event callbacks to.
+ attr_accessor :event_callback_url
+
+ # The URL to send event fallbacks to.
+ attr_accessor :event_fallback_url
+
+ # A tag for the endpoint.
+ attr_accessor :tag
+
+ class EnumAttributeValidator
+ attr_reader :datatype
+ attr_reader :allowable_values
+
+ def initialize(datatype, allowable_values)
+ @allowable_values = allowable_values.map do |value|
+ case datatype.to_s
+ when /Integer/i
+ value.to_i
+ when /Float/i
+ value.to_f
+ else
+ value
+ end
+ end
+ end
+
+ def valid?(value)
+ !value || allowable_values.include?(value)
+ end
+ end
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ def self.attribute_map
+ {
+ :'type' => :'type',
+ :'direction' => :'direction',
+ :'event_callback_url' => :'eventCallbackUrl',
+ :'event_fallback_url' => :'eventFallbackUrl',
+ :'tag' => :'tag'
+ }
+ end
+
+ # Returns attribute mapping this model knows about
+ def self.acceptable_attribute_map
+ attribute_map
+ end
+
+ # Returns all the JSON keys this model knows about
+ def self.acceptable_attributes
+ acceptable_attribute_map.values
+ end
+
+ # Attribute type mapping.
+ def self.openapi_types
+ {
+ :'type' => :'EndpointTypeEnum',
+ :'direction' => :'EndpointDirectionEnum',
+ :'event_callback_url' => :'String',
+ :'event_fallback_url' => :'String',
+ :'tag' => :'String'
+ }
+ end
+
+ # List of attributes with nullable: true
+ def self.openapi_nullable
+ Set.new([
+ ])
+ end
+
+ # Initializes the object
+ # @param [Hash] attributes Model attributes in the form of hash
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, 'The input argument (attributes) must be a hash in `Bandwidth::CreateEndpointRequestBase` initialize method'
+ end
+
+ # check to see if the attribute exists and convert string to symbol for hash key
+ acceptable_attribute_map = self.class.acceptable_attribute_map
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!acceptable_attribute_map.key?(k.to_sym))
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::CreateEndpointRequestBase`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
+ end
+ h[k.to_sym] = v
+ }
+
+ if attributes.key?(:'type')
+ self.type = attributes[:'type']
+ else
+ self.type = nil
+ end
+
+ if attributes.key?(:'direction')
+ self.direction = attributes[:'direction']
+ else
+ self.direction = nil
+ end
+
+ if attributes.key?(:'event_callback_url')
+ self.event_callback_url = attributes[:'event_callback_url']
+ end
+
+ if attributes.key?(:'event_fallback_url')
+ self.event_fallback_url = attributes[:'event_fallback_url']
+ end
+
+ if attributes.key?(:'tag')
+ self.tag = attributes[:'tag']
+ end
+ end
+
+ # Show invalid properties with the reasons. Usually used together with valid?
+ # @return Array for valid properties with the reasons
+ def list_invalid_properties
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
+ invalid_properties = Array.new
+ if @type.nil?
+ invalid_properties.push('invalid value for "type", type cannot be nil.')
+ end
+
+ if @direction.nil?
+ invalid_properties.push('invalid value for "direction", direction cannot be nil.')
+ end
+
+ invalid_properties
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ def valid?
+ warn '[DEPRECATED] the `valid?` method is obsolete'
+ return false if @type.nil?
+ return false if @direction.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param [Object] type Value to be assigned
+ def type=(type)
+ if type.nil?
+ fail ArgumentError, 'type cannot be nil'
+ end
+
+ @type = type
+ end
+
+ # Custom attribute writer method with validation
+ # @param [Object] direction Value to be assigned
+ def direction=(direction)
+ if direction.nil?
+ fail ArgumentError, 'direction cannot be nil'
+ end
+
+ @direction = direction
+ end
+
+ # Custom attribute writer method with validation
+ # @param [Object] tag Value to be assigned
+ def tag=(tag)
+ if tag.nil?
+ fail ArgumentError, 'tag cannot be nil'
+ end
+
+ @tag = tag
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param [Object] Object to be compared
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ type == o.type &&
+ direction == o.direction &&
+ event_callback_url == o.event_callback_url &&
+ event_fallback_url == o.event_fallback_url &&
+ tag == o.tag
+ end
+
+ # @see the `==` method
+ # @param [Object] Object to be compared
+ def eql?(o)
+ self == o
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ def hash
+ [type, direction, event_callback_url, event_fallback_url, tag].hash
+ end
+
+ # Builds the object from hash
+ # @param [Hash] attributes Model attributes in the form of hash
+ # @return [Object] Returns the model itself
+ def self.build_from_hash(attributes)
+ return nil unless attributes.is_a?(Hash)
+ attributes = attributes.transform_keys(&:to_sym)
+ transformed_hash = {}
+ openapi_types.each_pair do |key, type|
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = nil
+ elsif type =~ /\AArray<(.*)>/i
+ # check to ensure the input is an array given that the attribute
+ # is documented as an array but the input is not
+ if attributes[attribute_map[key]].is_a?(Array)
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
+ end
+ elsif !attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
+ end
+ end
+ new(transformed_hash)
+ end
+
+ # Returns the object in the form of hash
+ # @return [Hash] Returns the object in the form of hash
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ hash
+ end
+ end
+end
diff --git a/lib/bandwidth-sdk/models/create_endpoint_response.rb b/lib/bandwidth-sdk/models/create_endpoint_response.rb
new file mode 100644
index 00000000..d20b8232
--- /dev/null
+++ b/lib/bandwidth-sdk/models/create_endpoint_response.rb
@@ -0,0 +1,218 @@
+=begin
+#Bandwidth
+
+#Bandwidth's Communication APIs
+
+The version of the OpenAPI document: 1.0.0
+Contact: letstalk@bandwidth.com
+Generated by: https://openapi-generator.tech
+Generator version: 7.17.0
+
+=end
+
+require 'date'
+require 'time'
+
+module Bandwidth
+ class CreateEndpointResponse < ApiModelBase
+ attr_accessor :links
+
+ attr_accessor :data
+
+ attr_accessor :errors
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ def self.attribute_map
+ {
+ :'links' => :'links',
+ :'data' => :'data',
+ :'errors' => :'errors'
+ }
+ end
+
+ # Returns attribute mapping this model knows about
+ def self.acceptable_attribute_map
+ attribute_map
+ end
+
+ # Returns all the JSON keys this model knows about
+ def self.acceptable_attributes
+ acceptable_attribute_map.values
+ end
+
+ # Attribute type mapping.
+ def self.openapi_types
+ {
+ :'links' => :'Array',
+ :'data' => :'CreateEndpointResponseData',
+ :'errors' => :'Array'
+ }
+ end
+
+ # List of attributes with nullable: true
+ def self.openapi_nullable
+ Set.new([
+ ])
+ end
+
+ # Initializes the object
+ # @param [Hash] attributes Model attributes in the form of hash
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, 'The input argument (attributes) must be a hash in `Bandwidth::CreateEndpointResponse` initialize method'
+ end
+
+ # check to see if the attribute exists and convert string to symbol for hash key
+ acceptable_attribute_map = self.class.acceptable_attribute_map
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!acceptable_attribute_map.key?(k.to_sym))
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::CreateEndpointResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
+ end
+ h[k.to_sym] = v
+ }
+
+ if attributes.key?(:'links')
+ if (value = attributes[:'links']).is_a?(Array)
+ self.links = value
+ end
+ else
+ self.links = nil
+ end
+
+ if attributes.key?(:'data')
+ self.data = attributes[:'data']
+ else
+ self.data = nil
+ end
+
+ if attributes.key?(:'errors')
+ if (value = attributes[:'errors']).is_a?(Array)
+ self.errors = value
+ end
+ else
+ self.errors = nil
+ end
+ end
+
+ # Show invalid properties with the reasons. Usually used together with valid?
+ # @return Array for valid properties with the reasons
+ def list_invalid_properties
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
+ invalid_properties = Array.new
+ if @links.nil?
+ invalid_properties.push('invalid value for "links", links cannot be nil.')
+ end
+
+ if @data.nil?
+ invalid_properties.push('invalid value for "data", data cannot be nil.')
+ end
+
+ if @errors.nil?
+ invalid_properties.push('invalid value for "errors", errors cannot be nil.')
+ end
+
+ invalid_properties
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ def valid?
+ warn '[DEPRECATED] the `valid?` method is obsolete'
+ return false if @links.nil?
+ return false if @data.nil?
+ return false if @errors.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param [Object] links Value to be assigned
+ def links=(links)
+ if links.nil?
+ fail ArgumentError, 'links cannot be nil'
+ end
+
+ @links = links
+ end
+
+ # Custom attribute writer method with validation
+ # @param [Object] data Value to be assigned
+ def data=(data)
+ if data.nil?
+ fail ArgumentError, 'data cannot be nil'
+ end
+
+ @data = data
+ end
+
+ # Custom attribute writer method with validation
+ # @param [Object] errors Value to be assigned
+ def errors=(errors)
+ if errors.nil?
+ fail ArgumentError, 'errors cannot be nil'
+ end
+
+ @errors = errors
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param [Object] Object to be compared
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ links == o.links &&
+ data == o.data &&
+ errors == o.errors
+ end
+
+ # @see the `==` method
+ # @param [Object] Object to be compared
+ def eql?(o)
+ self == o
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ def hash
+ [links, data, errors].hash
+ end
+
+ # Builds the object from hash
+ # @param [Hash] attributes Model attributes in the form of hash
+ # @return [Object] Returns the model itself
+ def self.build_from_hash(attributes)
+ return nil unless attributes.is_a?(Hash)
+ attributes = attributes.transform_keys(&:to_sym)
+ transformed_hash = {}
+ openapi_types.each_pair do |key, type|
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = nil
+ elsif type =~ /\AArray<(.*)>/i
+ # check to ensure the input is an array given that the attribute
+ # is documented as an array but the input is not
+ if attributes[attribute_map[key]].is_a?(Array)
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
+ end
+ elsif !attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
+ end
+ end
+ new(transformed_hash)
+ end
+
+ # Returns the object in the form of hash
+ # @return [Hash] Returns the object in the form of hash
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ hash
+ end
+ end
+end
diff --git a/lib/bandwidth-sdk/models/create_endpoint_response_data.rb b/lib/bandwidth-sdk/models/create_endpoint_response_data.rb
new file mode 100644
index 00000000..a095f465
--- /dev/null
+++ b/lib/bandwidth-sdk/models/create_endpoint_response_data.rb
@@ -0,0 +1,356 @@
+=begin
+#Bandwidth
+
+#Bandwidth's Communication APIs
+
+The version of the OpenAPI document: 1.0.0
+Contact: letstalk@bandwidth.com
+Generated by: https://openapi-generator.tech
+Generator version: 7.17.0
+
+=end
+
+require 'date'
+require 'time'
+
+module Bandwidth
+ class CreateEndpointResponseData < ApiModelBase
+ # The unique ID of the endpoint.
+ attr_accessor :endpoint_id
+
+ attr_accessor :type
+
+ attr_accessor :status
+
+ # The time the endpoint was created. In ISO-8601 format.
+ attr_accessor :creation_timestamp
+
+ # The time the endpoint token will expire. In ISO-8601 format. Tokens last 24 hours.
+ attr_accessor :expiration_timestamp
+
+ # A tag for the endpoint.
+ attr_accessor :tag
+
+ attr_accessor :devices
+
+ # The json web token specific to the endpoint. Used to authenticate the client with the media gateway.
+ attr_accessor :token
+
+ class EnumAttributeValidator
+ attr_reader :datatype
+ attr_reader :allowable_values
+
+ def initialize(datatype, allowable_values)
+ @allowable_values = allowable_values.map do |value|
+ case datatype.to_s
+ when /Integer/i
+ value.to_i
+ when /Float/i
+ value.to_f
+ else
+ value
+ end
+ end
+ end
+
+ def valid?(value)
+ !value || allowable_values.include?(value)
+ end
+ end
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ def self.attribute_map
+ {
+ :'endpoint_id' => :'endpointId',
+ :'type' => :'type',
+ :'status' => :'status',
+ :'creation_timestamp' => :'creationTimestamp',
+ :'expiration_timestamp' => :'expirationTimestamp',
+ :'tag' => :'tag',
+ :'devices' => :'devices',
+ :'token' => :'token'
+ }
+ end
+
+ # Returns attribute mapping this model knows about
+ def self.acceptable_attribute_map
+ attribute_map
+ end
+
+ # Returns all the JSON keys this model knows about
+ def self.acceptable_attributes
+ acceptable_attribute_map.values
+ end
+
+ # Attribute type mapping.
+ def self.openapi_types
+ {
+ :'endpoint_id' => :'String',
+ :'type' => :'EndpointTypeEnum',
+ :'status' => :'EndpointStatusEnum',
+ :'creation_timestamp' => :'Time',
+ :'expiration_timestamp' => :'Time',
+ :'tag' => :'String',
+ :'devices' => :'Array',
+ :'token' => :'String'
+ }
+ end
+
+ # List of attributes with nullable: true
+ def self.openapi_nullable
+ Set.new([
+ ])
+ end
+
+ # List of class defined in allOf (OpenAPI v3)
+ def self.openapi_all_of
+ [
+ :'Endpoint'
+ ]
+ end
+
+ # Initializes the object
+ # @param [Hash] attributes Model attributes in the form of hash
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, 'The input argument (attributes) must be a hash in `Bandwidth::CreateEndpointResponseData` initialize method'
+ end
+
+ # check to see if the attribute exists and convert string to symbol for hash key
+ acceptable_attribute_map = self.class.acceptable_attribute_map
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!acceptable_attribute_map.key?(k.to_sym))
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::CreateEndpointResponseData`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
+ end
+ h[k.to_sym] = v
+ }
+
+ if attributes.key?(:'endpoint_id')
+ self.endpoint_id = attributes[:'endpoint_id']
+ else
+ self.endpoint_id = nil
+ end
+
+ if attributes.key?(:'type')
+ self.type = attributes[:'type']
+ else
+ self.type = nil
+ end
+
+ if attributes.key?(:'status')
+ self.status = attributes[:'status']
+ else
+ self.status = nil
+ end
+
+ if attributes.key?(:'creation_timestamp')
+ self.creation_timestamp = attributes[:'creation_timestamp']
+ else
+ self.creation_timestamp = nil
+ end
+
+ if attributes.key?(:'expiration_timestamp')
+ self.expiration_timestamp = attributes[:'expiration_timestamp']
+ else
+ self.expiration_timestamp = nil
+ end
+
+ if attributes.key?(:'tag')
+ self.tag = attributes[:'tag']
+ end
+
+ if attributes.key?(:'devices')
+ if (value = attributes[:'devices']).is_a?(Array)
+ self.devices = value
+ end
+ end
+
+ if attributes.key?(:'token')
+ self.token = attributes[:'token']
+ else
+ self.token = nil
+ end
+ end
+
+ # Show invalid properties with the reasons. Usually used together with valid?
+ # @return Array for valid properties with the reasons
+ def list_invalid_properties
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
+ invalid_properties = Array.new
+ if @endpoint_id.nil?
+ invalid_properties.push('invalid value for "endpoint_id", endpoint_id cannot be nil.')
+ end
+
+ if @type.nil?
+ invalid_properties.push('invalid value for "type", type cannot be nil.')
+ end
+
+ if @status.nil?
+ invalid_properties.push('invalid value for "status", status cannot be nil.')
+ end
+
+ if @creation_timestamp.nil?
+ invalid_properties.push('invalid value for "creation_timestamp", creation_timestamp cannot be nil.')
+ end
+
+ if @expiration_timestamp.nil?
+ invalid_properties.push('invalid value for "expiration_timestamp", expiration_timestamp cannot be nil.')
+ end
+
+ if @token.nil?
+ invalid_properties.push('invalid value for "token", token cannot be nil.')
+ end
+
+ invalid_properties
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ def valid?
+ warn '[DEPRECATED] the `valid?` method is obsolete'
+ return false if @endpoint_id.nil?
+ return false if @type.nil?
+ return false if @status.nil?
+ return false if @creation_timestamp.nil?
+ return false if @expiration_timestamp.nil?
+ return false if @token.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param [Object] endpoint_id Value to be assigned
+ def endpoint_id=(endpoint_id)
+ if endpoint_id.nil?
+ fail ArgumentError, 'endpoint_id cannot be nil'
+ end
+
+ @endpoint_id = endpoint_id
+ end
+
+ # Custom attribute writer method with validation
+ # @param [Object] type Value to be assigned
+ def type=(type)
+ if type.nil?
+ fail ArgumentError, 'type cannot be nil'
+ end
+
+ @type = type
+ end
+
+ # Custom attribute writer method with validation
+ # @param [Object] status Value to be assigned
+ def status=(status)
+ if status.nil?
+ fail ArgumentError, 'status cannot be nil'
+ end
+
+ @status = status
+ end
+
+ # Custom attribute writer method with validation
+ # @param [Object] creation_timestamp Value to be assigned
+ def creation_timestamp=(creation_timestamp)
+ if creation_timestamp.nil?
+ fail ArgumentError, 'creation_timestamp cannot be nil'
+ end
+
+ @creation_timestamp = creation_timestamp
+ end
+
+ # Custom attribute writer method with validation
+ # @param [Object] expiration_timestamp Value to be assigned
+ def expiration_timestamp=(expiration_timestamp)
+ if expiration_timestamp.nil?
+ fail ArgumentError, 'expiration_timestamp cannot be nil'
+ end
+
+ @expiration_timestamp = expiration_timestamp
+ end
+
+ # Custom attribute writer method with validation
+ # @param [Object] tag Value to be assigned
+ def tag=(tag)
+ if tag.nil?
+ fail ArgumentError, 'tag cannot be nil'
+ end
+
+ @tag = tag
+ end
+
+ # Custom attribute writer method with validation
+ # @param [Object] token Value to be assigned
+ def token=(token)
+ if token.nil?
+ fail ArgumentError, 'token cannot be nil'
+ end
+
+ @token = token
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param [Object] Object to be compared
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ endpoint_id == o.endpoint_id &&
+ type == o.type &&
+ status == o.status &&
+ creation_timestamp == o.creation_timestamp &&
+ expiration_timestamp == o.expiration_timestamp &&
+ tag == o.tag &&
+ devices == o.devices &&
+ token == o.token
+ end
+
+ # @see the `==` method
+ # @param [Object] Object to be compared
+ def eql?(o)
+ self == o
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ def hash
+ [endpoint_id, type, status, creation_timestamp, expiration_timestamp, tag, devices, token].hash
+ end
+
+ # Builds the object from hash
+ # @param [Hash] attributes Model attributes in the form of hash
+ # @return [Object] Returns the model itself
+ def self.build_from_hash(attributes)
+ return nil unless attributes.is_a?(Hash)
+ attributes = attributes.transform_keys(&:to_sym)
+ transformed_hash = {}
+ openapi_types.each_pair do |key, type|
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = nil
+ elsif type =~ /\AArray<(.*)>/i
+ # check to ensure the input is an array given that the attribute
+ # is documented as an array but the input is not
+ if attributes[attribute_map[key]].is_a?(Array)
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
+ end
+ elsif !attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
+ end
+ end
+ new(transformed_hash)
+ end
+
+ # Returns the object in the form of hash
+ # @return [Hash] Returns the object in the form of hash
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ hash
+ end
+ end
+end
diff --git a/lib/bandwidth-sdk/models/create_web_rtc_connection_request.rb b/lib/bandwidth-sdk/models/create_web_rtc_connection_request.rb
new file mode 100644
index 00000000..d405b090
--- /dev/null
+++ b/lib/bandwidth-sdk/models/create_web_rtc_connection_request.rb
@@ -0,0 +1,266 @@
+=begin
+#Bandwidth
+
+#Bandwidth's Communication APIs
+
+The version of the OpenAPI document: 1.0.0
+Contact: letstalk@bandwidth.com
+Generated by: https://openapi-generator.tech
+Generator version: 7.17.0
+
+=end
+
+require 'date'
+require 'time'
+
+module Bandwidth
+ class CreateWebRtcConnectionRequest < ApiModelBase
+ attr_accessor :type
+
+ attr_accessor :direction
+
+ # The URL to send event callbacks to.
+ attr_accessor :event_callback_url
+
+ # The URL to send event fallbacks to.
+ attr_accessor :event_fallback_url
+
+ # A tag for the endpoint.
+ attr_accessor :tag
+
+ attr_accessor :connection_metadata
+
+ class EnumAttributeValidator
+ attr_reader :datatype
+ attr_reader :allowable_values
+
+ def initialize(datatype, allowable_values)
+ @allowable_values = allowable_values.map do |value|
+ case datatype.to_s
+ when /Integer/i
+ value.to_i
+ when /Float/i
+ value.to_f
+ else
+ value
+ end
+ end
+ end
+
+ def valid?(value)
+ !value || allowable_values.include?(value)
+ end
+ end
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ def self.attribute_map
+ {
+ :'type' => :'type',
+ :'direction' => :'direction',
+ :'event_callback_url' => :'eventCallbackUrl',
+ :'event_fallback_url' => :'eventFallbackUrl',
+ :'tag' => :'tag',
+ :'connection_metadata' => :'connectionMetadata'
+ }
+ end
+
+ # Returns attribute mapping this model knows about
+ def self.acceptable_attribute_map
+ attribute_map
+ end
+
+ # Returns all the JSON keys this model knows about
+ def self.acceptable_attributes
+ acceptable_attribute_map.values
+ end
+
+ # Attribute type mapping.
+ def self.openapi_types
+ {
+ :'type' => :'EndpointTypeEnum',
+ :'direction' => :'EndpointDirectionEnum',
+ :'event_callback_url' => :'String',
+ :'event_fallback_url' => :'String',
+ :'tag' => :'String',
+ :'connection_metadata' => :'Object'
+ }
+ end
+
+ # List of attributes with nullable: true
+ def self.openapi_nullable
+ Set.new([
+ ])
+ end
+
+ # List of class defined in allOf (OpenAPI v3)
+ def self.openapi_all_of
+ [
+ :'CreateEndpointRequestBase'
+ ]
+ end
+
+ # Initializes the object
+ # @param [Hash] attributes Model attributes in the form of hash
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, 'The input argument (attributes) must be a hash in `Bandwidth::CreateWebRtcConnectionRequest` initialize method'
+ end
+
+ # check to see if the attribute exists and convert string to symbol for hash key
+ acceptable_attribute_map = self.class.acceptable_attribute_map
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!acceptable_attribute_map.key?(k.to_sym))
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::CreateWebRtcConnectionRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
+ end
+ h[k.to_sym] = v
+ }
+
+ if attributes.key?(:'type')
+ self.type = attributes[:'type']
+ else
+ self.type = nil
+ end
+
+ if attributes.key?(:'direction')
+ self.direction = attributes[:'direction']
+ else
+ self.direction = nil
+ end
+
+ if attributes.key?(:'event_callback_url')
+ self.event_callback_url = attributes[:'event_callback_url']
+ end
+
+ if attributes.key?(:'event_fallback_url')
+ self.event_fallback_url = attributes[:'event_fallback_url']
+ end
+
+ if attributes.key?(:'tag')
+ self.tag = attributes[:'tag']
+ end
+
+ if attributes.key?(:'connection_metadata')
+ self.connection_metadata = attributes[:'connection_metadata']
+ end
+ end
+
+ # Show invalid properties with the reasons. Usually used together with valid?
+ # @return Array for valid properties with the reasons
+ def list_invalid_properties
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
+ invalid_properties = Array.new
+ if @type.nil?
+ invalid_properties.push('invalid value for "type", type cannot be nil.')
+ end
+
+ if @direction.nil?
+ invalid_properties.push('invalid value for "direction", direction cannot be nil.')
+ end
+
+ invalid_properties
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ def valid?
+ warn '[DEPRECATED] the `valid?` method is obsolete'
+ return false if @type.nil?
+ return false if @direction.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param [Object] type Value to be assigned
+ def type=(type)
+ if type.nil?
+ fail ArgumentError, 'type cannot be nil'
+ end
+
+ @type = type
+ end
+
+ # Custom attribute writer method with validation
+ # @param [Object] direction Value to be assigned
+ def direction=(direction)
+ if direction.nil?
+ fail ArgumentError, 'direction cannot be nil'
+ end
+
+ @direction = direction
+ end
+
+ # Custom attribute writer method with validation
+ # @param [Object] tag Value to be assigned
+ def tag=(tag)
+ if tag.nil?
+ fail ArgumentError, 'tag cannot be nil'
+ end
+
+ @tag = tag
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param [Object] Object to be compared
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ type == o.type &&
+ direction == o.direction &&
+ event_callback_url == o.event_callback_url &&
+ event_fallback_url == o.event_fallback_url &&
+ tag == o.tag &&
+ connection_metadata == o.connection_metadata
+ end
+
+ # @see the `==` method
+ # @param [Object] Object to be compared
+ def eql?(o)
+ self == o
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ def hash
+ [type, direction, event_callback_url, event_fallback_url, tag, connection_metadata].hash
+ end
+
+ # Builds the object from hash
+ # @param [Hash] attributes Model attributes in the form of hash
+ # @return [Object] Returns the model itself
+ def self.build_from_hash(attributes)
+ return nil unless attributes.is_a?(Hash)
+ attributes = attributes.transform_keys(&:to_sym)
+ transformed_hash = {}
+ openapi_types.each_pair do |key, type|
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = nil
+ elsif type =~ /\AArray<(.*)>/i
+ # check to ensure the input is an array given that the attribute
+ # is documented as an array but the input is not
+ if attributes[attribute_map[key]].is_a?(Array)
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
+ end
+ elsif !attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
+ end
+ end
+ new(transformed_hash)
+ end
+
+ # Returns the object in the form of hash
+ # @return [Hash] Returns the object in the form of hash
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ hash
+ end
+ end
+end
diff --git a/lib/bandwidth-sdk/models/device.rb b/lib/bandwidth-sdk/models/device.rb
new file mode 100644
index 00000000..6d90e2e1
--- /dev/null
+++ b/lib/bandwidth-sdk/models/device.rb
@@ -0,0 +1,258 @@
+=begin
+#Bandwidth
+
+#Bandwidth's Communication APIs
+
+The version of the OpenAPI document: 1.0.0
+Contact: letstalk@bandwidth.com
+Generated by: https://openapi-generator.tech
+Generator version: 7.17.0
+
+=end
+
+require 'date'
+require 'time'
+
+module Bandwidth
+ class Device < ApiModelBase
+ # The unique ID of the device.
+ attr_accessor :device_id
+
+ # The name of the device.
+ attr_accessor :device_name
+
+ attr_accessor :status
+
+ # The time the device was created. In ISO-8601 format.
+ attr_accessor :creation_timestamp
+
+ class EnumAttributeValidator
+ attr_reader :datatype
+ attr_reader :allowable_values
+
+ def initialize(datatype, allowable_values)
+ @allowable_values = allowable_values.map do |value|
+ case datatype.to_s
+ when /Integer/i
+ value.to_i
+ when /Float/i
+ value.to_f
+ else
+ value
+ end
+ end
+ end
+
+ def valid?(value)
+ !value || allowable_values.include?(value)
+ end
+ end
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ def self.attribute_map
+ {
+ :'device_id' => :'deviceId',
+ :'device_name' => :'deviceName',
+ :'status' => :'status',
+ :'creation_timestamp' => :'creationTimestamp'
+ }
+ end
+
+ # Returns attribute mapping this model knows about
+ def self.acceptable_attribute_map
+ attribute_map
+ end
+
+ # Returns all the JSON keys this model knows about
+ def self.acceptable_attributes
+ acceptable_attribute_map.values
+ end
+
+ # Attribute type mapping.
+ def self.openapi_types
+ {
+ :'device_id' => :'String',
+ :'device_name' => :'String',
+ :'status' => :'DeviceStatusEnum',
+ :'creation_timestamp' => :'Time'
+ }
+ end
+
+ # List of attributes with nullable: true
+ def self.openapi_nullable
+ Set.new([
+ ])
+ end
+
+ # Initializes the object
+ # @param [Hash] attributes Model attributes in the form of hash
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, 'The input argument (attributes) must be a hash in `Bandwidth::Device` initialize method'
+ end
+
+ # check to see if the attribute exists and convert string to symbol for hash key
+ acceptable_attribute_map = self.class.acceptable_attribute_map
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!acceptable_attribute_map.key?(k.to_sym))
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::Device`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
+ end
+ h[k.to_sym] = v
+ }
+
+ if attributes.key?(:'device_id')
+ self.device_id = attributes[:'device_id']
+ else
+ self.device_id = nil
+ end
+
+ if attributes.key?(:'device_name')
+ self.device_name = attributes[:'device_name']
+ end
+
+ if attributes.key?(:'status')
+ self.status = attributes[:'status']
+ else
+ self.status = nil
+ end
+
+ if attributes.key?(:'creation_timestamp')
+ self.creation_timestamp = attributes[:'creation_timestamp']
+ else
+ self.creation_timestamp = nil
+ end
+ end
+
+ # Show invalid properties with the reasons. Usually used together with valid?
+ # @return Array for valid properties with the reasons
+ def list_invalid_properties
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
+ invalid_properties = Array.new
+ if @device_id.nil?
+ invalid_properties.push('invalid value for "device_id", device_id cannot be nil.')
+ end
+
+ if @status.nil?
+ invalid_properties.push('invalid value for "status", status cannot be nil.')
+ end
+
+ if @creation_timestamp.nil?
+ invalid_properties.push('invalid value for "creation_timestamp", creation_timestamp cannot be nil.')
+ end
+
+ invalid_properties
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ def valid?
+ warn '[DEPRECATED] the `valid?` method is obsolete'
+ return false if @device_id.nil?
+ return false if @status.nil?
+ return false if @creation_timestamp.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param [Object] device_id Value to be assigned
+ def device_id=(device_id)
+ if device_id.nil?
+ fail ArgumentError, 'device_id cannot be nil'
+ end
+
+ @device_id = device_id
+ end
+
+ # Custom attribute writer method with validation
+ # @param [Object] device_name Value to be assigned
+ def device_name=(device_name)
+ if device_name.nil?
+ fail ArgumentError, 'device_name cannot be nil'
+ end
+
+ @device_name = device_name
+ end
+
+ # Custom attribute writer method with validation
+ # @param [Object] status Value to be assigned
+ def status=(status)
+ if status.nil?
+ fail ArgumentError, 'status cannot be nil'
+ end
+
+ @status = status
+ end
+
+ # Custom attribute writer method with validation
+ # @param [Object] creation_timestamp Value to be assigned
+ def creation_timestamp=(creation_timestamp)
+ if creation_timestamp.nil?
+ fail ArgumentError, 'creation_timestamp cannot be nil'
+ end
+
+ @creation_timestamp = creation_timestamp
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param [Object] Object to be compared
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ device_id == o.device_id &&
+ device_name == o.device_name &&
+ status == o.status &&
+ creation_timestamp == o.creation_timestamp
+ end
+
+ # @see the `==` method
+ # @param [Object] Object to be compared
+ def eql?(o)
+ self == o
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ def hash
+ [device_id, device_name, status, creation_timestamp].hash
+ end
+
+ # Builds the object from hash
+ # @param [Hash] attributes Model attributes in the form of hash
+ # @return [Object] Returns the model itself
+ def self.build_from_hash(attributes)
+ return nil unless attributes.is_a?(Hash)
+ attributes = attributes.transform_keys(&:to_sym)
+ transformed_hash = {}
+ openapi_types.each_pair do |key, type|
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = nil
+ elsif type =~ /\AArray<(.*)>/i
+ # check to ensure the input is an array given that the attribute
+ # is documented as an array but the input is not
+ if attributes[attribute_map[key]].is_a?(Array)
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
+ end
+ elsif !attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
+ end
+ end
+ new(transformed_hash)
+ end
+
+ # Returns the object in the form of hash
+ # @return [Hash] Returns the object in the form of hash
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ hash
+ end
+ end
+end
diff --git a/lib/bandwidth-sdk/models/device_status_enum.rb b/lib/bandwidth-sdk/models/device_status_enum.rb
new file mode 100644
index 00000000..6ed7b323
--- /dev/null
+++ b/lib/bandwidth-sdk/models/device_status_enum.rb
@@ -0,0 +1,40 @@
+=begin
+#Bandwidth
+
+#Bandwidth's Communication APIs
+
+The version of the OpenAPI document: 1.0.0
+Contact: letstalk@bandwidth.com
+Generated by: https://openapi-generator.tech
+Generator version: 7.17.0
+
+=end
+
+require 'date'
+require 'time'
+
+module Bandwidth
+ class DeviceStatusEnum
+ CONNECTED = 'CONNECTED'.freeze
+ DISCONNECTED = 'DISCONNECTED'.freeze
+
+ def self.all_vars
+ @all_vars ||= [CONNECTED, DISCONNECTED].freeze
+ end
+
+ # Builds the enum from string
+ # @param [String] The enum value in the form of the string
+ # @return [String] The enum value
+ def self.build_from_hash(value)
+ new.build_from_hash(value)
+ end
+
+ # Builds the enum from string
+ # @param [String] The enum value in the form of the string
+ # @return [String] The enum value
+ def build_from_hash(value)
+ return value if DeviceStatusEnum.all_vars.include?(value)
+ raise "Invalid ENUM value #{value} for class #DeviceStatusEnum"
+ end
+ end
+end
diff --git a/lib/bandwidth-sdk/models/endpoint.rb b/lib/bandwidth-sdk/models/endpoint.rb
new file mode 100644
index 00000000..f1e09036
--- /dev/null
+++ b/lib/bandwidth-sdk/models/endpoint.rb
@@ -0,0 +1,329 @@
+=begin
+#Bandwidth
+
+#Bandwidth's Communication APIs
+
+The version of the OpenAPI document: 1.0.0
+Contact: letstalk@bandwidth.com
+Generated by: https://openapi-generator.tech
+Generator version: 7.17.0
+
+=end
+
+require 'date'
+require 'time'
+
+module Bandwidth
+ class Endpoint < ApiModelBase
+ # The unique ID of the endpoint.
+ attr_accessor :endpoint_id
+
+ attr_accessor :type
+
+ attr_accessor :status
+
+ # The time the endpoint was created. In ISO-8601 format.
+ attr_accessor :creation_timestamp
+
+ # The time the endpoint token will expire. In ISO-8601 format. Tokens last 24 hours.
+ attr_accessor :expiration_timestamp
+
+ # A tag for the endpoint.
+ attr_accessor :tag
+
+ attr_accessor :devices
+
+ class EnumAttributeValidator
+ attr_reader :datatype
+ attr_reader :allowable_values
+
+ def initialize(datatype, allowable_values)
+ @allowable_values = allowable_values.map do |value|
+ case datatype.to_s
+ when /Integer/i
+ value.to_i
+ when /Float/i
+ value.to_f
+ else
+ value
+ end
+ end
+ end
+
+ def valid?(value)
+ !value || allowable_values.include?(value)
+ end
+ end
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ def self.attribute_map
+ {
+ :'endpoint_id' => :'endpointId',
+ :'type' => :'type',
+ :'status' => :'status',
+ :'creation_timestamp' => :'creationTimestamp',
+ :'expiration_timestamp' => :'expirationTimestamp',
+ :'tag' => :'tag',
+ :'devices' => :'devices'
+ }
+ end
+
+ # Returns attribute mapping this model knows about
+ def self.acceptable_attribute_map
+ attribute_map
+ end
+
+ # Returns all the JSON keys this model knows about
+ def self.acceptable_attributes
+ acceptable_attribute_map.values
+ end
+
+ # Attribute type mapping.
+ def self.openapi_types
+ {
+ :'endpoint_id' => :'String',
+ :'type' => :'EndpointTypeEnum',
+ :'status' => :'EndpointStatusEnum',
+ :'creation_timestamp' => :'Time',
+ :'expiration_timestamp' => :'Time',
+ :'tag' => :'String',
+ :'devices' => :'Array'
+ }
+ end
+
+ # List of attributes with nullable: true
+ def self.openapi_nullable
+ Set.new([
+ ])
+ end
+
+ # List of class defined in allOf (OpenAPI v3)
+ def self.openapi_all_of
+ [
+ :'Endpoints'
+ ]
+ end
+
+ # Initializes the object
+ # @param [Hash] attributes Model attributes in the form of hash
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, 'The input argument (attributes) must be a hash in `Bandwidth::Endpoint` initialize method'
+ end
+
+ # check to see if the attribute exists and convert string to symbol for hash key
+ acceptable_attribute_map = self.class.acceptable_attribute_map
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!acceptable_attribute_map.key?(k.to_sym))
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::Endpoint`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
+ end
+ h[k.to_sym] = v
+ }
+
+ if attributes.key?(:'endpoint_id')
+ self.endpoint_id = attributes[:'endpoint_id']
+ else
+ self.endpoint_id = nil
+ end
+
+ if attributes.key?(:'type')
+ self.type = attributes[:'type']
+ else
+ self.type = nil
+ end
+
+ if attributes.key?(:'status')
+ self.status = attributes[:'status']
+ else
+ self.status = nil
+ end
+
+ if attributes.key?(:'creation_timestamp')
+ self.creation_timestamp = attributes[:'creation_timestamp']
+ else
+ self.creation_timestamp = nil
+ end
+
+ if attributes.key?(:'expiration_timestamp')
+ self.expiration_timestamp = attributes[:'expiration_timestamp']
+ else
+ self.expiration_timestamp = nil
+ end
+
+ if attributes.key?(:'tag')
+ self.tag = attributes[:'tag']
+ end
+
+ if attributes.key?(:'devices')
+ if (value = attributes[:'devices']).is_a?(Array)
+ self.devices = value
+ end
+ end
+ end
+
+ # Show invalid properties with the reasons. Usually used together with valid?
+ # @return Array for valid properties with the reasons
+ def list_invalid_properties
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
+ invalid_properties = Array.new
+ if @endpoint_id.nil?
+ invalid_properties.push('invalid value for "endpoint_id", endpoint_id cannot be nil.')
+ end
+
+ if @type.nil?
+ invalid_properties.push('invalid value for "type", type cannot be nil.')
+ end
+
+ if @status.nil?
+ invalid_properties.push('invalid value for "status", status cannot be nil.')
+ end
+
+ if @creation_timestamp.nil?
+ invalid_properties.push('invalid value for "creation_timestamp", creation_timestamp cannot be nil.')
+ end
+
+ if @expiration_timestamp.nil?
+ invalid_properties.push('invalid value for "expiration_timestamp", expiration_timestamp cannot be nil.')
+ end
+
+ invalid_properties
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ def valid?
+ warn '[DEPRECATED] the `valid?` method is obsolete'
+ return false if @endpoint_id.nil?
+ return false if @type.nil?
+ return false if @status.nil?
+ return false if @creation_timestamp.nil?
+ return false if @expiration_timestamp.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param [Object] endpoint_id Value to be assigned
+ def endpoint_id=(endpoint_id)
+ if endpoint_id.nil?
+ fail ArgumentError, 'endpoint_id cannot be nil'
+ end
+
+ @endpoint_id = endpoint_id
+ end
+
+ # Custom attribute writer method with validation
+ # @param [Object] type Value to be assigned
+ def type=(type)
+ if type.nil?
+ fail ArgumentError, 'type cannot be nil'
+ end
+
+ @type = type
+ end
+
+ # Custom attribute writer method with validation
+ # @param [Object] status Value to be assigned
+ def status=(status)
+ if status.nil?
+ fail ArgumentError, 'status cannot be nil'
+ end
+
+ @status = status
+ end
+
+ # Custom attribute writer method with validation
+ # @param [Object] creation_timestamp Value to be assigned
+ def creation_timestamp=(creation_timestamp)
+ if creation_timestamp.nil?
+ fail ArgumentError, 'creation_timestamp cannot be nil'
+ end
+
+ @creation_timestamp = creation_timestamp
+ end
+
+ # Custom attribute writer method with validation
+ # @param [Object] expiration_timestamp Value to be assigned
+ def expiration_timestamp=(expiration_timestamp)
+ if expiration_timestamp.nil?
+ fail ArgumentError, 'expiration_timestamp cannot be nil'
+ end
+
+ @expiration_timestamp = expiration_timestamp
+ end
+
+ # Custom attribute writer method with validation
+ # @param [Object] tag Value to be assigned
+ def tag=(tag)
+ if tag.nil?
+ fail ArgumentError, 'tag cannot be nil'
+ end
+
+ @tag = tag
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param [Object] Object to be compared
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ endpoint_id == o.endpoint_id &&
+ type == o.type &&
+ status == o.status &&
+ creation_timestamp == o.creation_timestamp &&
+ expiration_timestamp == o.expiration_timestamp &&
+ tag == o.tag &&
+ devices == o.devices
+ end
+
+ # @see the `==` method
+ # @param [Object] Object to be compared
+ def eql?(o)
+ self == o
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ def hash
+ [endpoint_id, type, status, creation_timestamp, expiration_timestamp, tag, devices].hash
+ end
+
+ # Builds the object from hash
+ # @param [Hash] attributes Model attributes in the form of hash
+ # @return [Object] Returns the model itself
+ def self.build_from_hash(attributes)
+ return nil unless attributes.is_a?(Hash)
+ attributes = attributes.transform_keys(&:to_sym)
+ transformed_hash = {}
+ openapi_types.each_pair do |key, type|
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = nil
+ elsif type =~ /\AArray<(.*)>/i
+ # check to ensure the input is an array given that the attribute
+ # is documented as an array but the input is not
+ if attributes[attribute_map[key]].is_a?(Array)
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
+ end
+ elsif !attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
+ end
+ end
+ new(transformed_hash)
+ end
+
+ # Returns the object in the form of hash
+ # @return [Hash] Returns the object in the form of hash
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ hash
+ end
+ end
+end
diff --git a/lib/bandwidth-sdk/models/endpoint_direction_enum.rb b/lib/bandwidth-sdk/models/endpoint_direction_enum.rb
new file mode 100644
index 00000000..a47c7226
--- /dev/null
+++ b/lib/bandwidth-sdk/models/endpoint_direction_enum.rb
@@ -0,0 +1,41 @@
+=begin
+#Bandwidth
+
+#Bandwidth's Communication APIs
+
+The version of the OpenAPI document: 1.0.0
+Contact: letstalk@bandwidth.com
+Generated by: https://openapi-generator.tech
+Generator version: 7.17.0
+
+=end
+
+require 'date'
+require 'time'
+
+module Bandwidth
+ class EndpointDirectionEnum
+ INBOUND = 'INBOUND'.freeze
+ OUTBOUND = 'OUTBOUND'.freeze
+ BIDIRECTIONAL = 'BIDIRECTIONAL'.freeze
+
+ def self.all_vars
+ @all_vars ||= [INBOUND, OUTBOUND, BIDIRECTIONAL].freeze
+ end
+
+ # Builds the enum from string
+ # @param [String] The enum value in the form of the string
+ # @return [String] The enum value
+ def self.build_from_hash(value)
+ new.build_from_hash(value)
+ end
+
+ # Builds the enum from string
+ # @param [String] The enum value in the form of the string
+ # @return [String] The enum value
+ def build_from_hash(value)
+ return value if EndpointDirectionEnum.all_vars.include?(value)
+ raise "Invalid ENUM value #{value} for class #EndpointDirectionEnum"
+ end
+ end
+end
diff --git a/lib/bandwidth-sdk/models/endpoint_event.rb b/lib/bandwidth-sdk/models/endpoint_event.rb
new file mode 100644
index 00000000..b5dca8f1
--- /dev/null
+++ b/lib/bandwidth-sdk/models/endpoint_event.rb
@@ -0,0 +1,381 @@
+=begin
+#Bandwidth
+
+#Bandwidth's Communication APIs
+
+The version of the OpenAPI document: 1.0.0
+Contact: letstalk@bandwidth.com
+Generated by: https://openapi-generator.tech
+Generator version: 7.17.0
+
+=end
+
+require 'date'
+require 'time'
+
+module Bandwidth
+ # An event that occurred on an endpoint.
+ class EndpointEvent < ApiModelBase
+ # The unique ID of the endpoint.
+ attr_accessor :endpoint_id
+
+ attr_accessor :type
+
+ attr_accessor :status
+
+ # The time the endpoint was created. In ISO-8601 format.
+ attr_accessor :creation_timestamp
+
+ # The time the endpoint token will expire. In ISO-8601 format. Tokens last 24 hours.
+ attr_accessor :expiration_timestamp
+
+ # A tag for the endpoint.
+ attr_accessor :tag
+
+ # The time the event occurred. In ISO-8601 format.
+ attr_accessor :event_time
+
+ attr_accessor :event_type
+
+ attr_accessor :device
+
+ class EnumAttributeValidator
+ attr_reader :datatype
+ attr_reader :allowable_values
+
+ def initialize(datatype, allowable_values)
+ @allowable_values = allowable_values.map do |value|
+ case datatype.to_s
+ when /Integer/i
+ value.to_i
+ when /Float/i
+ value.to_f
+ else
+ value
+ end
+ end
+ end
+
+ def valid?(value)
+ !value || allowable_values.include?(value)
+ end
+ end
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ def self.attribute_map
+ {
+ :'endpoint_id' => :'endpointId',
+ :'type' => :'type',
+ :'status' => :'status',
+ :'creation_timestamp' => :'creationTimestamp',
+ :'expiration_timestamp' => :'expirationTimestamp',
+ :'tag' => :'tag',
+ :'event_time' => :'eventTime',
+ :'event_type' => :'eventType',
+ :'device' => :'device'
+ }
+ end
+
+ # Returns attribute mapping this model knows about
+ def self.acceptable_attribute_map
+ attribute_map
+ end
+
+ # Returns all the JSON keys this model knows about
+ def self.acceptable_attributes
+ acceptable_attribute_map.values
+ end
+
+ # Attribute type mapping.
+ def self.openapi_types
+ {
+ :'endpoint_id' => :'String',
+ :'type' => :'EndpointTypeEnum',
+ :'status' => :'EndpointStatusEnum',
+ :'creation_timestamp' => :'Time',
+ :'expiration_timestamp' => :'Time',
+ :'tag' => :'String',
+ :'event_time' => :'Time',
+ :'event_type' => :'EndpointEventTypeEnum',
+ :'device' => :'Device'
+ }
+ end
+
+ # List of attributes with nullable: true
+ def self.openapi_nullable
+ Set.new([
+ ])
+ end
+
+ # List of class defined in allOf (OpenAPI v3)
+ def self.openapi_all_of
+ [
+ :'Endpoints'
+ ]
+ end
+
+ # Initializes the object
+ # @param [Hash] attributes Model attributes in the form of hash
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, 'The input argument (attributes) must be a hash in `Bandwidth::EndpointEvent` initialize method'
+ end
+
+ # check to see if the attribute exists and convert string to symbol for hash key
+ acceptable_attribute_map = self.class.acceptable_attribute_map
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!acceptable_attribute_map.key?(k.to_sym))
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::EndpointEvent`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
+ end
+ h[k.to_sym] = v
+ }
+
+ if attributes.key?(:'endpoint_id')
+ self.endpoint_id = attributes[:'endpoint_id']
+ else
+ self.endpoint_id = nil
+ end
+
+ if attributes.key?(:'type')
+ self.type = attributes[:'type']
+ else
+ self.type = nil
+ end
+
+ if attributes.key?(:'status')
+ self.status = attributes[:'status']
+ else
+ self.status = nil
+ end
+
+ if attributes.key?(:'creation_timestamp')
+ self.creation_timestamp = attributes[:'creation_timestamp']
+ else
+ self.creation_timestamp = nil
+ end
+
+ if attributes.key?(:'expiration_timestamp')
+ self.expiration_timestamp = attributes[:'expiration_timestamp']
+ else
+ self.expiration_timestamp = nil
+ end
+
+ if attributes.key?(:'tag')
+ self.tag = attributes[:'tag']
+ end
+
+ if attributes.key?(:'event_time')
+ self.event_time = attributes[:'event_time']
+ else
+ self.event_time = nil
+ end
+
+ if attributes.key?(:'event_type')
+ self.event_type = attributes[:'event_type']
+ else
+ self.event_type = nil
+ end
+
+ if attributes.key?(:'device')
+ self.device = attributes[:'device']
+ end
+ end
+
+ # Show invalid properties with the reasons. Usually used together with valid?
+ # @return Array for valid properties with the reasons
+ def list_invalid_properties
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
+ invalid_properties = Array.new
+ if @endpoint_id.nil?
+ invalid_properties.push('invalid value for "endpoint_id", endpoint_id cannot be nil.')
+ end
+
+ if @type.nil?
+ invalid_properties.push('invalid value for "type", type cannot be nil.')
+ end
+
+ if @status.nil?
+ invalid_properties.push('invalid value for "status", status cannot be nil.')
+ end
+
+ if @creation_timestamp.nil?
+ invalid_properties.push('invalid value for "creation_timestamp", creation_timestamp cannot be nil.')
+ end
+
+ if @expiration_timestamp.nil?
+ invalid_properties.push('invalid value for "expiration_timestamp", expiration_timestamp cannot be nil.')
+ end
+
+ if @event_time.nil?
+ invalid_properties.push('invalid value for "event_time", event_time cannot be nil.')
+ end
+
+ if @event_type.nil?
+ invalid_properties.push('invalid value for "event_type", event_type cannot be nil.')
+ end
+
+ invalid_properties
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ def valid?
+ warn '[DEPRECATED] the `valid?` method is obsolete'
+ return false if @endpoint_id.nil?
+ return false if @type.nil?
+ return false if @status.nil?
+ return false if @creation_timestamp.nil?
+ return false if @expiration_timestamp.nil?
+ return false if @event_time.nil?
+ return false if @event_type.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param [Object] endpoint_id Value to be assigned
+ def endpoint_id=(endpoint_id)
+ if endpoint_id.nil?
+ fail ArgumentError, 'endpoint_id cannot be nil'
+ end
+
+ @endpoint_id = endpoint_id
+ end
+
+ # Custom attribute writer method with validation
+ # @param [Object] type Value to be assigned
+ def type=(type)
+ if type.nil?
+ fail ArgumentError, 'type cannot be nil'
+ end
+
+ @type = type
+ end
+
+ # Custom attribute writer method with validation
+ # @param [Object] status Value to be assigned
+ def status=(status)
+ if status.nil?
+ fail ArgumentError, 'status cannot be nil'
+ end
+
+ @status = status
+ end
+
+ # Custom attribute writer method with validation
+ # @param [Object] creation_timestamp Value to be assigned
+ def creation_timestamp=(creation_timestamp)
+ if creation_timestamp.nil?
+ fail ArgumentError, 'creation_timestamp cannot be nil'
+ end
+
+ @creation_timestamp = creation_timestamp
+ end
+
+ # Custom attribute writer method with validation
+ # @param [Object] expiration_timestamp Value to be assigned
+ def expiration_timestamp=(expiration_timestamp)
+ if expiration_timestamp.nil?
+ fail ArgumentError, 'expiration_timestamp cannot be nil'
+ end
+
+ @expiration_timestamp = expiration_timestamp
+ end
+
+ # Custom attribute writer method with validation
+ # @param [Object] tag Value to be assigned
+ def tag=(tag)
+ if tag.nil?
+ fail ArgumentError, 'tag cannot be nil'
+ end
+
+ @tag = tag
+ end
+
+ # Custom attribute writer method with validation
+ # @param [Object] event_time Value to be assigned
+ def event_time=(event_time)
+ if event_time.nil?
+ fail ArgumentError, 'event_time cannot be nil'
+ end
+
+ @event_time = event_time
+ end
+
+ # Custom attribute writer method with validation
+ # @param [Object] event_type Value to be assigned
+ def event_type=(event_type)
+ if event_type.nil?
+ fail ArgumentError, 'event_type cannot be nil'
+ end
+
+ @event_type = event_type
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param [Object] Object to be compared
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ endpoint_id == o.endpoint_id &&
+ type == o.type &&
+ status == o.status &&
+ creation_timestamp == o.creation_timestamp &&
+ expiration_timestamp == o.expiration_timestamp &&
+ tag == o.tag &&
+ event_time == o.event_time &&
+ event_type == o.event_type &&
+ device == o.device
+ end
+
+ # @see the `==` method
+ # @param [Object] Object to be compared
+ def eql?(o)
+ self == o
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ def hash
+ [endpoint_id, type, status, creation_timestamp, expiration_timestamp, tag, event_time, event_type, device].hash
+ end
+
+ # Builds the object from hash
+ # @param [Hash] attributes Model attributes in the form of hash
+ # @return [Object] Returns the model itself
+ def self.build_from_hash(attributes)
+ return nil unless attributes.is_a?(Hash)
+ attributes = attributes.transform_keys(&:to_sym)
+ transformed_hash = {}
+ openapi_types.each_pair do |key, type|
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = nil
+ elsif type =~ /\AArray<(.*)>/i
+ # check to ensure the input is an array given that the attribute
+ # is documented as an array but the input is not
+ if attributes[attribute_map[key]].is_a?(Array)
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
+ end
+ elsif !attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
+ end
+ end
+ new(transformed_hash)
+ end
+
+ # Returns the object in the form of hash
+ # @return [Hash] Returns the object in the form of hash
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ hash
+ end
+ end
+end
diff --git a/lib/bandwidth-sdk/models/endpoint_event_type_enum.rb b/lib/bandwidth-sdk/models/endpoint_event_type_enum.rb
new file mode 100644
index 00000000..ccb0036c
--- /dev/null
+++ b/lib/bandwidth-sdk/models/endpoint_event_type_enum.rb
@@ -0,0 +1,40 @@
+=begin
+#Bandwidth
+
+#Bandwidth's Communication APIs
+
+The version of the OpenAPI document: 1.0.0
+Contact: letstalk@bandwidth.com
+Generated by: https://openapi-generator.tech
+Generator version: 7.17.0
+
+=end
+
+require 'date'
+require 'time'
+
+module Bandwidth
+ class EndpointEventTypeEnum
+ DEVICE_CONNECTED = 'DEVICE_CONNECTED'.freeze
+ DEVICE_DISCONNECTED = 'DEVICE_DISCONNECTED'.freeze
+
+ def self.all_vars
+ @all_vars ||= [DEVICE_CONNECTED, DEVICE_DISCONNECTED].freeze
+ end
+
+ # Builds the enum from string
+ # @param [String] The enum value in the form of the string
+ # @return [String] The enum value
+ def self.build_from_hash(value)
+ new.build_from_hash(value)
+ end
+
+ # Builds the enum from string
+ # @param [String] The enum value in the form of the string
+ # @return [String] The enum value
+ def build_from_hash(value)
+ return value if EndpointEventTypeEnum.all_vars.include?(value)
+ raise "Invalid ENUM value #{value} for class #EndpointEventTypeEnum"
+ end
+ end
+end
diff --git a/lib/bandwidth-sdk/models/endpoint_response.rb b/lib/bandwidth-sdk/models/endpoint_response.rb
new file mode 100644
index 00000000..d65f187a
--- /dev/null
+++ b/lib/bandwidth-sdk/models/endpoint_response.rb
@@ -0,0 +1,218 @@
+=begin
+#Bandwidth
+
+#Bandwidth's Communication APIs
+
+The version of the OpenAPI document: 1.0.0
+Contact: letstalk@bandwidth.com
+Generated by: https://openapi-generator.tech
+Generator version: 7.17.0
+
+=end
+
+require 'date'
+require 'time'
+
+module Bandwidth
+ class EndpointResponse < ApiModelBase
+ attr_accessor :links
+
+ attr_accessor :data
+
+ attr_accessor :errors
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ def self.attribute_map
+ {
+ :'links' => :'links',
+ :'data' => :'data',
+ :'errors' => :'errors'
+ }
+ end
+
+ # Returns attribute mapping this model knows about
+ def self.acceptable_attribute_map
+ attribute_map
+ end
+
+ # Returns all the JSON keys this model knows about
+ def self.acceptable_attributes
+ acceptable_attribute_map.values
+ end
+
+ # Attribute type mapping.
+ def self.openapi_types
+ {
+ :'links' => :'Array',
+ :'data' => :'Endpoint',
+ :'errors' => :'Array'
+ }
+ end
+
+ # List of attributes with nullable: true
+ def self.openapi_nullable
+ Set.new([
+ ])
+ end
+
+ # Initializes the object
+ # @param [Hash] attributes Model attributes in the form of hash
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, 'The input argument (attributes) must be a hash in `Bandwidth::EndpointResponse` initialize method'
+ end
+
+ # check to see if the attribute exists and convert string to symbol for hash key
+ acceptable_attribute_map = self.class.acceptable_attribute_map
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!acceptable_attribute_map.key?(k.to_sym))
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::EndpointResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
+ end
+ h[k.to_sym] = v
+ }
+
+ if attributes.key?(:'links')
+ if (value = attributes[:'links']).is_a?(Array)
+ self.links = value
+ end
+ else
+ self.links = nil
+ end
+
+ if attributes.key?(:'data')
+ self.data = attributes[:'data']
+ else
+ self.data = nil
+ end
+
+ if attributes.key?(:'errors')
+ if (value = attributes[:'errors']).is_a?(Array)
+ self.errors = value
+ end
+ else
+ self.errors = nil
+ end
+ end
+
+ # Show invalid properties with the reasons. Usually used together with valid?
+ # @return Array for valid properties with the reasons
+ def list_invalid_properties
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
+ invalid_properties = Array.new
+ if @links.nil?
+ invalid_properties.push('invalid value for "links", links cannot be nil.')
+ end
+
+ if @data.nil?
+ invalid_properties.push('invalid value for "data", data cannot be nil.')
+ end
+
+ if @errors.nil?
+ invalid_properties.push('invalid value for "errors", errors cannot be nil.')
+ end
+
+ invalid_properties
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ def valid?
+ warn '[DEPRECATED] the `valid?` method is obsolete'
+ return false if @links.nil?
+ return false if @data.nil?
+ return false if @errors.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param [Object] links Value to be assigned
+ def links=(links)
+ if links.nil?
+ fail ArgumentError, 'links cannot be nil'
+ end
+
+ @links = links
+ end
+
+ # Custom attribute writer method with validation
+ # @param [Object] data Value to be assigned
+ def data=(data)
+ if data.nil?
+ fail ArgumentError, 'data cannot be nil'
+ end
+
+ @data = data
+ end
+
+ # Custom attribute writer method with validation
+ # @param [Object] errors Value to be assigned
+ def errors=(errors)
+ if errors.nil?
+ fail ArgumentError, 'errors cannot be nil'
+ end
+
+ @errors = errors
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param [Object] Object to be compared
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ links == o.links &&
+ data == o.data &&
+ errors == o.errors
+ end
+
+ # @see the `==` method
+ # @param [Object] Object to be compared
+ def eql?(o)
+ self == o
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ def hash
+ [links, data, errors].hash
+ end
+
+ # Builds the object from hash
+ # @param [Hash] attributes Model attributes in the form of hash
+ # @return [Object] Returns the model itself
+ def self.build_from_hash(attributes)
+ return nil unless attributes.is_a?(Hash)
+ attributes = attributes.transform_keys(&:to_sym)
+ transformed_hash = {}
+ openapi_types.each_pair do |key, type|
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = nil
+ elsif type =~ /\AArray<(.*)>/i
+ # check to ensure the input is an array given that the attribute
+ # is documented as an array but the input is not
+ if attributes[attribute_map[key]].is_a?(Array)
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
+ end
+ elsif !attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
+ end
+ end
+ new(transformed_hash)
+ end
+
+ # Returns the object in the form of hash
+ # @return [Hash] Returns the object in the form of hash
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ hash
+ end
+ end
+end
diff --git a/lib/bandwidth-sdk/models/endpoint_status_enum.rb b/lib/bandwidth-sdk/models/endpoint_status_enum.rb
new file mode 100644
index 00000000..0f935de0
--- /dev/null
+++ b/lib/bandwidth-sdk/models/endpoint_status_enum.rb
@@ -0,0 +1,40 @@
+=begin
+#Bandwidth
+
+#Bandwidth's Communication APIs
+
+The version of the OpenAPI document: 1.0.0
+Contact: letstalk@bandwidth.com
+Generated by: https://openapi-generator.tech
+Generator version: 7.17.0
+
+=end
+
+require 'date'
+require 'time'
+
+module Bandwidth
+ class EndpointStatusEnum
+ CONNECTED = 'CONNECTED'.freeze
+ DISCONNECTED = 'DISCONNECTED'.freeze
+
+ def self.all_vars
+ @all_vars ||= [CONNECTED, DISCONNECTED].freeze
+ end
+
+ # Builds the enum from string
+ # @param [String] The enum value in the form of the string
+ # @return [String] The enum value
+ def self.build_from_hash(value)
+ new.build_from_hash(value)
+ end
+
+ # Builds the enum from string
+ # @param [String] The enum value in the form of the string
+ # @return [String] The enum value
+ def build_from_hash(value)
+ return value if EndpointStatusEnum.all_vars.include?(value)
+ raise "Invalid ENUM value #{value} for class #EndpointStatusEnum"
+ end
+ end
+end
diff --git a/lib/bandwidth-sdk/models/endpoint_type_enum.rb b/lib/bandwidth-sdk/models/endpoint_type_enum.rb
new file mode 100644
index 00000000..e88f0ee1
--- /dev/null
+++ b/lib/bandwidth-sdk/models/endpoint_type_enum.rb
@@ -0,0 +1,39 @@
+=begin
+#Bandwidth
+
+#Bandwidth's Communication APIs
+
+The version of the OpenAPI document: 1.0.0
+Contact: letstalk@bandwidth.com
+Generated by: https://openapi-generator.tech
+Generator version: 7.17.0
+
+=end
+
+require 'date'
+require 'time'
+
+module Bandwidth
+ class EndpointTypeEnum
+ WEBRTC = 'WEBRTC'.freeze
+
+ def self.all_vars
+ @all_vars ||= [WEBRTC].freeze
+ end
+
+ # Builds the enum from string
+ # @param [String] The enum value in the form of the string
+ # @return [String] The enum value
+ def self.build_from_hash(value)
+ new.build_from_hash(value)
+ end
+
+ # Builds the enum from string
+ # @param [String] The enum value in the form of the string
+ # @return [String] The enum value
+ def build_from_hash(value)
+ return value if EndpointTypeEnum.all_vars.include?(value)
+ raise "Invalid ENUM value #{value} for class #EndpointTypeEnum"
+ end
+ end
+end
diff --git a/lib/bandwidth-sdk/models/endpoints.rb b/lib/bandwidth-sdk/models/endpoints.rb
new file mode 100644
index 00000000..02ef5be5
--- /dev/null
+++ b/lib/bandwidth-sdk/models/endpoints.rb
@@ -0,0 +1,311 @@
+=begin
+#Bandwidth
+
+#Bandwidth's Communication APIs
+
+The version of the OpenAPI document: 1.0.0
+Contact: letstalk@bandwidth.com
+Generated by: https://openapi-generator.tech
+Generator version: 7.17.0
+
+=end
+
+require 'date'
+require 'time'
+
+module Bandwidth
+ class Endpoints < ApiModelBase
+ # The unique ID of the endpoint.
+ attr_accessor :endpoint_id
+
+ attr_accessor :type
+
+ attr_accessor :status
+
+ # The time the endpoint was created. In ISO-8601 format.
+ attr_accessor :creation_timestamp
+
+ # The time the endpoint token will expire. In ISO-8601 format. Tokens last 24 hours.
+ attr_accessor :expiration_timestamp
+
+ # A tag for the endpoint.
+ attr_accessor :tag
+
+ class EnumAttributeValidator
+ attr_reader :datatype
+ attr_reader :allowable_values
+
+ def initialize(datatype, allowable_values)
+ @allowable_values = allowable_values.map do |value|
+ case datatype.to_s
+ when /Integer/i
+ value.to_i
+ when /Float/i
+ value.to_f
+ else
+ value
+ end
+ end
+ end
+
+ def valid?(value)
+ !value || allowable_values.include?(value)
+ end
+ end
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ def self.attribute_map
+ {
+ :'endpoint_id' => :'endpointId',
+ :'type' => :'type',
+ :'status' => :'status',
+ :'creation_timestamp' => :'creationTimestamp',
+ :'expiration_timestamp' => :'expirationTimestamp',
+ :'tag' => :'tag'
+ }
+ end
+
+ # Returns attribute mapping this model knows about
+ def self.acceptable_attribute_map
+ attribute_map
+ end
+
+ # Returns all the JSON keys this model knows about
+ def self.acceptable_attributes
+ acceptable_attribute_map.values
+ end
+
+ # Attribute type mapping.
+ def self.openapi_types
+ {
+ :'endpoint_id' => :'String',
+ :'type' => :'EndpointTypeEnum',
+ :'status' => :'EndpointStatusEnum',
+ :'creation_timestamp' => :'Time',
+ :'expiration_timestamp' => :'Time',
+ :'tag' => :'String'
+ }
+ end
+
+ # List of attributes with nullable: true
+ def self.openapi_nullable
+ Set.new([
+ ])
+ end
+
+ # Initializes the object
+ # @param [Hash] attributes Model attributes in the form of hash
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, 'The input argument (attributes) must be a hash in `Bandwidth::Endpoints` initialize method'
+ end
+
+ # check to see if the attribute exists and convert string to symbol for hash key
+ acceptable_attribute_map = self.class.acceptable_attribute_map
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!acceptable_attribute_map.key?(k.to_sym))
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::Endpoints`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
+ end
+ h[k.to_sym] = v
+ }
+
+ if attributes.key?(:'endpoint_id')
+ self.endpoint_id = attributes[:'endpoint_id']
+ else
+ self.endpoint_id = nil
+ end
+
+ if attributes.key?(:'type')
+ self.type = attributes[:'type']
+ else
+ self.type = nil
+ end
+
+ if attributes.key?(:'status')
+ self.status = attributes[:'status']
+ else
+ self.status = nil
+ end
+
+ if attributes.key?(:'creation_timestamp')
+ self.creation_timestamp = attributes[:'creation_timestamp']
+ else
+ self.creation_timestamp = nil
+ end
+
+ if attributes.key?(:'expiration_timestamp')
+ self.expiration_timestamp = attributes[:'expiration_timestamp']
+ else
+ self.expiration_timestamp = nil
+ end
+
+ if attributes.key?(:'tag')
+ self.tag = attributes[:'tag']
+ end
+ end
+
+ # Show invalid properties with the reasons. Usually used together with valid?
+ # @return Array for valid properties with the reasons
+ def list_invalid_properties
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
+ invalid_properties = Array.new
+ if @endpoint_id.nil?
+ invalid_properties.push('invalid value for "endpoint_id", endpoint_id cannot be nil.')
+ end
+
+ if @type.nil?
+ invalid_properties.push('invalid value for "type", type cannot be nil.')
+ end
+
+ if @status.nil?
+ invalid_properties.push('invalid value for "status", status cannot be nil.')
+ end
+
+ if @creation_timestamp.nil?
+ invalid_properties.push('invalid value for "creation_timestamp", creation_timestamp cannot be nil.')
+ end
+
+ if @expiration_timestamp.nil?
+ invalid_properties.push('invalid value for "expiration_timestamp", expiration_timestamp cannot be nil.')
+ end
+
+ invalid_properties
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ def valid?
+ warn '[DEPRECATED] the `valid?` method is obsolete'
+ return false if @endpoint_id.nil?
+ return false if @type.nil?
+ return false if @status.nil?
+ return false if @creation_timestamp.nil?
+ return false if @expiration_timestamp.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param [Object] endpoint_id Value to be assigned
+ def endpoint_id=(endpoint_id)
+ if endpoint_id.nil?
+ fail ArgumentError, 'endpoint_id cannot be nil'
+ end
+
+ @endpoint_id = endpoint_id
+ end
+
+ # Custom attribute writer method with validation
+ # @param [Object] type Value to be assigned
+ def type=(type)
+ if type.nil?
+ fail ArgumentError, 'type cannot be nil'
+ end
+
+ @type = type
+ end
+
+ # Custom attribute writer method with validation
+ # @param [Object] status Value to be assigned
+ def status=(status)
+ if status.nil?
+ fail ArgumentError, 'status cannot be nil'
+ end
+
+ @status = status
+ end
+
+ # Custom attribute writer method with validation
+ # @param [Object] creation_timestamp Value to be assigned
+ def creation_timestamp=(creation_timestamp)
+ if creation_timestamp.nil?
+ fail ArgumentError, 'creation_timestamp cannot be nil'
+ end
+
+ @creation_timestamp = creation_timestamp
+ end
+
+ # Custom attribute writer method with validation
+ # @param [Object] expiration_timestamp Value to be assigned
+ def expiration_timestamp=(expiration_timestamp)
+ if expiration_timestamp.nil?
+ fail ArgumentError, 'expiration_timestamp cannot be nil'
+ end
+
+ @expiration_timestamp = expiration_timestamp
+ end
+
+ # Custom attribute writer method with validation
+ # @param [Object] tag Value to be assigned
+ def tag=(tag)
+ if tag.nil?
+ fail ArgumentError, 'tag cannot be nil'
+ end
+
+ @tag = tag
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param [Object] Object to be compared
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ endpoint_id == o.endpoint_id &&
+ type == o.type &&
+ status == o.status &&
+ creation_timestamp == o.creation_timestamp &&
+ expiration_timestamp == o.expiration_timestamp &&
+ tag == o.tag
+ end
+
+ # @see the `==` method
+ # @param [Object] Object to be compared
+ def eql?(o)
+ self == o
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ def hash
+ [endpoint_id, type, status, creation_timestamp, expiration_timestamp, tag].hash
+ end
+
+ # Builds the object from hash
+ # @param [Hash] attributes Model attributes in the form of hash
+ # @return [Object] Returns the model itself
+ def self.build_from_hash(attributes)
+ return nil unless attributes.is_a?(Hash)
+ attributes = attributes.transform_keys(&:to_sym)
+ transformed_hash = {}
+ openapi_types.each_pair do |key, type|
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = nil
+ elsif type =~ /\AArray<(.*)>/i
+ # check to ensure the input is an array given that the attribute
+ # is documented as an array but the input is not
+ if attributes[attribute_map[key]].is_a?(Array)
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
+ end
+ elsif !attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
+ end
+ end
+ new(transformed_hash)
+ end
+
+ # Returns the object in the form of hash
+ # @return [Hash] Returns the object in the form of hash
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ hash
+ end
+ end
+end
diff --git a/lib/bandwidth-sdk/models/error1.rb b/lib/bandwidth-sdk/models/error1.rb
new file mode 100644
index 00000000..9bf39581
--- /dev/null
+++ b/lib/bandwidth-sdk/models/error1.rb
@@ -0,0 +1,219 @@
+=begin
+#Bandwidth
+
+#Bandwidth's Communication APIs
+
+The version of the OpenAPI document: 1.0.0
+Contact: letstalk@bandwidth.com
+Generated by: https://openapi-generator.tech
+Generator version: 7.17.0
+
+=end
+
+require 'date'
+require 'time'
+
+module Bandwidth
+ class Error1 < ApiModelBase
+ # A unique identifier for the error.
+ attr_accessor :id
+
+ # The type of error.
+ attr_accessor :type
+
+ # A description of the error.
+ attr_accessor :description
+
+ # A code that uniquely identifies the error.
+ attr_accessor :code
+
+ attr_accessor :source
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ def self.attribute_map
+ {
+ :'id' => :'id',
+ :'type' => :'type',
+ :'description' => :'description',
+ :'code' => :'code',
+ :'source' => :'source'
+ }
+ end
+
+ # Returns attribute mapping this model knows about
+ def self.acceptable_attribute_map
+ attribute_map
+ end
+
+ # Returns all the JSON keys this model knows about
+ def self.acceptable_attributes
+ acceptable_attribute_map.values
+ end
+
+ # Attribute type mapping.
+ def self.openapi_types
+ {
+ :'id' => :'String',
+ :'type' => :'String',
+ :'description' => :'String',
+ :'code' => :'String',
+ :'source' => :'Error1Source'
+ }
+ end
+
+ # List of attributes with nullable: true
+ def self.openapi_nullable
+ Set.new([
+ ])
+ end
+
+ # Initializes the object
+ # @param [Hash] attributes Model attributes in the form of hash
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, 'The input argument (attributes) must be a hash in `Bandwidth::Error1` initialize method'
+ end
+
+ # check to see if the attribute exists and convert string to symbol for hash key
+ acceptable_attribute_map = self.class.acceptable_attribute_map
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!acceptable_attribute_map.key?(k.to_sym))
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::Error1`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
+ end
+ h[k.to_sym] = v
+ }
+
+ if attributes.key?(:'id')
+ self.id = attributes[:'id']
+ end
+
+ if attributes.key?(:'type')
+ self.type = attributes[:'type']
+ else
+ self.type = nil
+ end
+
+ if attributes.key?(:'description')
+ self.description = attributes[:'description']
+ else
+ self.description = nil
+ end
+
+ if attributes.key?(:'code')
+ self.code = attributes[:'code']
+ end
+
+ if attributes.key?(:'source')
+ self.source = attributes[:'source']
+ end
+ end
+
+ # Show invalid properties with the reasons. Usually used together with valid?
+ # @return Array for valid properties with the reasons
+ def list_invalid_properties
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
+ invalid_properties = Array.new
+ if @type.nil?
+ invalid_properties.push('invalid value for "type", type cannot be nil.')
+ end
+
+ if @description.nil?
+ invalid_properties.push('invalid value for "description", description cannot be nil.')
+ end
+
+ invalid_properties
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ def valid?
+ warn '[DEPRECATED] the `valid?` method is obsolete'
+ return false if @type.nil?
+ return false if @description.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param [Object] type Value to be assigned
+ def type=(type)
+ if type.nil?
+ fail ArgumentError, 'type cannot be nil'
+ end
+
+ @type = type
+ end
+
+ # Custom attribute writer method with validation
+ # @param [Object] description Value to be assigned
+ def description=(description)
+ if description.nil?
+ fail ArgumentError, 'description cannot be nil'
+ end
+
+ @description = description
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param [Object] Object to be compared
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ id == o.id &&
+ type == o.type &&
+ description == o.description &&
+ code == o.code &&
+ source == o.source
+ end
+
+ # @see the `==` method
+ # @param [Object] Object to be compared
+ def eql?(o)
+ self == o
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ def hash
+ [id, type, description, code, source].hash
+ end
+
+ # Builds the object from hash
+ # @param [Hash] attributes Model attributes in the form of hash
+ # @return [Object] Returns the model itself
+ def self.build_from_hash(attributes)
+ return nil unless attributes.is_a?(Hash)
+ attributes = attributes.transform_keys(&:to_sym)
+ transformed_hash = {}
+ openapi_types.each_pair do |key, type|
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = nil
+ elsif type =~ /\AArray<(.*)>/i
+ # check to ensure the input is an array given that the attribute
+ # is documented as an array but the input is not
+ if attributes[attribute_map[key]].is_a?(Array)
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
+ end
+ elsif !attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
+ end
+ end
+ new(transformed_hash)
+ end
+
+ # Returns the object in the form of hash
+ # @return [Hash] Returns the object in the form of hash
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ hash
+ end
+ end
+end
diff --git a/lib/bandwidth-sdk/models/error1_source.rb b/lib/bandwidth-sdk/models/error1_source.rb
new file mode 100644
index 00000000..e4528e05
--- /dev/null
+++ b/lib/bandwidth-sdk/models/error1_source.rb
@@ -0,0 +1,176 @@
+=begin
+#Bandwidth
+
+#Bandwidth's Communication APIs
+
+The version of the OpenAPI document: 1.0.0
+Contact: letstalk@bandwidth.com
+Generated by: https://openapi-generator.tech
+Generator version: 7.17.0
+
+=end
+
+require 'date'
+require 'time'
+
+module Bandwidth
+ class Error1Source < ApiModelBase
+ # The URI parameter that caused the error.
+ attr_accessor :parameter
+
+ # The request body field that caused the error.
+ attr_accessor :field
+
+ # The header that caused the error.
+ attr_accessor :header
+
+ # The resource ID or path to the resource (or non-existent resource) causing the error.
+ attr_accessor :reference
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ def self.attribute_map
+ {
+ :'parameter' => :'parameter',
+ :'field' => :'field',
+ :'header' => :'header',
+ :'reference' => :'reference'
+ }
+ end
+
+ # Returns attribute mapping this model knows about
+ def self.acceptable_attribute_map
+ attribute_map
+ end
+
+ # Returns all the JSON keys this model knows about
+ def self.acceptable_attributes
+ acceptable_attribute_map.values
+ end
+
+ # Attribute type mapping.
+ def self.openapi_types
+ {
+ :'parameter' => :'String',
+ :'field' => :'String',
+ :'header' => :'String',
+ :'reference' => :'String'
+ }
+ end
+
+ # List of attributes with nullable: true
+ def self.openapi_nullable
+ Set.new([
+ ])
+ end
+
+ # Initializes the object
+ # @param [Hash] attributes Model attributes in the form of hash
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, 'The input argument (attributes) must be a hash in `Bandwidth::Error1Source` initialize method'
+ end
+
+ # check to see if the attribute exists and convert string to symbol for hash key
+ acceptable_attribute_map = self.class.acceptable_attribute_map
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!acceptable_attribute_map.key?(k.to_sym))
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::Error1Source`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
+ end
+ h[k.to_sym] = v
+ }
+
+ if attributes.key?(:'parameter')
+ self.parameter = attributes[:'parameter']
+ end
+
+ if attributes.key?(:'field')
+ self.field = attributes[:'field']
+ end
+
+ if attributes.key?(:'header')
+ self.header = attributes[:'header']
+ end
+
+ if attributes.key?(:'reference')
+ self.reference = attributes[:'reference']
+ end
+ end
+
+ # Show invalid properties with the reasons. Usually used together with valid?
+ # @return Array for valid properties with the reasons
+ def list_invalid_properties
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
+ invalid_properties = Array.new
+ invalid_properties
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ def valid?
+ warn '[DEPRECATED] the `valid?` method is obsolete'
+ true
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param [Object] Object to be compared
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ parameter == o.parameter &&
+ field == o.field &&
+ header == o.header &&
+ reference == o.reference
+ end
+
+ # @see the `==` method
+ # @param [Object] Object to be compared
+ def eql?(o)
+ self == o
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ def hash
+ [parameter, field, header, reference].hash
+ end
+
+ # Builds the object from hash
+ # @param [Hash] attributes Model attributes in the form of hash
+ # @return [Object] Returns the model itself
+ def self.build_from_hash(attributes)
+ return nil unless attributes.is_a?(Hash)
+ attributes = attributes.transform_keys(&:to_sym)
+ transformed_hash = {}
+ openapi_types.each_pair do |key, type|
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = nil
+ elsif type =~ /\AArray<(.*)>/i
+ # check to ensure the input is an array given that the attribute
+ # is documented as an array but the input is not
+ if attributes[attribute_map[key]].is_a?(Array)
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
+ end
+ elsif !attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
+ end
+ end
+ new(transformed_hash)
+ end
+
+ # Returns the object in the form of hash
+ # @return [Hash] Returns the object in the form of hash
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ hash
+ end
+ end
+end
diff --git a/lib/bandwidth-sdk/models/error_response.rb b/lib/bandwidth-sdk/models/error_response.rb
new file mode 100644
index 00000000..f7cfdca3
--- /dev/null
+++ b/lib/bandwidth-sdk/models/error_response.rb
@@ -0,0 +1,204 @@
+=begin
+#Bandwidth
+
+#Bandwidth's Communication APIs
+
+The version of the OpenAPI document: 1.0.0
+Contact: letstalk@bandwidth.com
+Generated by: https://openapi-generator.tech
+Generator version: 7.17.0
+
+=end
+
+require 'date'
+require 'time'
+
+module Bandwidth
+ class ErrorResponse < ApiModelBase
+ attr_accessor :links
+
+ attr_accessor :data
+
+ attr_accessor :errors
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ def self.attribute_map
+ {
+ :'links' => :'links',
+ :'data' => :'data',
+ :'errors' => :'errors'
+ }
+ end
+
+ # Returns attribute mapping this model knows about
+ def self.acceptable_attribute_map
+ attribute_map
+ end
+
+ # Returns all the JSON keys this model knows about
+ def self.acceptable_attributes
+ acceptable_attribute_map.values
+ end
+
+ # Attribute type mapping.
+ def self.openapi_types
+ {
+ :'links' => :'Array',
+ :'data' => :'Object',
+ :'errors' => :'Array'
+ }
+ end
+
+ # List of attributes with nullable: true
+ def self.openapi_nullable
+ Set.new([
+ :'data',
+ ])
+ end
+
+ # Initializes the object
+ # @param [Hash] attributes Model attributes in the form of hash
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, 'The input argument (attributes) must be a hash in `Bandwidth::ErrorResponse` initialize method'
+ end
+
+ # check to see if the attribute exists and convert string to symbol for hash key
+ acceptable_attribute_map = self.class.acceptable_attribute_map
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!acceptable_attribute_map.key?(k.to_sym))
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::ErrorResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
+ end
+ h[k.to_sym] = v
+ }
+
+ if attributes.key?(:'links')
+ if (value = attributes[:'links']).is_a?(Array)
+ self.links = value
+ end
+ else
+ self.links = nil
+ end
+
+ if attributes.key?(:'data')
+ self.data = attributes[:'data']
+ else
+ self.data = nil
+ end
+
+ if attributes.key?(:'errors')
+ if (value = attributes[:'errors']).is_a?(Array)
+ self.errors = value
+ end
+ else
+ self.errors = nil
+ end
+ end
+
+ # Show invalid properties with the reasons. Usually used together with valid?
+ # @return Array for valid properties with the reasons
+ def list_invalid_properties
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
+ invalid_properties = Array.new
+ if @links.nil?
+ invalid_properties.push('invalid value for "links", links cannot be nil.')
+ end
+
+ if @errors.nil?
+ invalid_properties.push('invalid value for "errors", errors cannot be nil.')
+ end
+
+ invalid_properties
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ def valid?
+ warn '[DEPRECATED] the `valid?` method is obsolete'
+ return false if @links.nil?
+ return false if @errors.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param [Object] links Value to be assigned
+ def links=(links)
+ if links.nil?
+ fail ArgumentError, 'links cannot be nil'
+ end
+
+ @links = links
+ end
+
+ # Custom attribute writer method with validation
+ # @param [Object] errors Value to be assigned
+ def errors=(errors)
+ if errors.nil?
+ fail ArgumentError, 'errors cannot be nil'
+ end
+
+ @errors = errors
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param [Object] Object to be compared
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ links == o.links &&
+ data == o.data &&
+ errors == o.errors
+ end
+
+ # @see the `==` method
+ # @param [Object] Object to be compared
+ def eql?(o)
+ self == o
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ def hash
+ [links, data, errors].hash
+ end
+
+ # Builds the object from hash
+ # @param [Hash] attributes Model attributes in the form of hash
+ # @return [Object] Returns the model itself
+ def self.build_from_hash(attributes)
+ return nil unless attributes.is_a?(Hash)
+ attributes = attributes.transform_keys(&:to_sym)
+ transformed_hash = {}
+ openapi_types.each_pair do |key, type|
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = nil
+ elsif type =~ /\AArray<(.*)>/i
+ # check to ensure the input is an array given that the attribute
+ # is documented as an array but the input is not
+ if attributes[attribute_map[key]].is_a?(Array)
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
+ end
+ elsif !attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
+ end
+ end
+ new(transformed_hash)
+ end
+
+ # Returns the object in the form of hash
+ # @return [Hash] Returns the object in the form of hash
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ hash
+ end
+ end
+end
diff --git a/lib/bandwidth-sdk/models/link1.rb b/lib/bandwidth-sdk/models/link1.rb
new file mode 100644
index 00000000..68b6e81d
--- /dev/null
+++ b/lib/bandwidth-sdk/models/link1.rb
@@ -0,0 +1,200 @@
+=begin
+#Bandwidth
+
+#Bandwidth's Communication APIs
+
+The version of the OpenAPI document: 1.0.0
+Contact: letstalk@bandwidth.com
+Generated by: https://openapi-generator.tech
+Generator version: 7.17.0
+
+=end
+
+require 'date'
+require 'time'
+
+module Bandwidth
+ class Link1 < ApiModelBase
+ # The full URL of the link.
+ attr_accessor :href
+
+ # The relationship of the link to the current resource.
+ attr_accessor :rel
+
+ # The HTTP method to use when making the request.
+ attr_accessor :method
+
+ class EnumAttributeValidator
+ attr_reader :datatype
+ attr_reader :allowable_values
+
+ def initialize(datatype, allowable_values)
+ @allowable_values = allowable_values.map do |value|
+ case datatype.to_s
+ when /Integer/i
+ value.to_i
+ when /Float/i
+ value.to_f
+ else
+ value
+ end
+ end
+ end
+
+ def valid?(value)
+ !value || allowable_values.include?(value)
+ end
+ end
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ def self.attribute_map
+ {
+ :'href' => :'href',
+ :'rel' => :'rel',
+ :'method' => :'method'
+ }
+ end
+
+ # Returns attribute mapping this model knows about
+ def self.acceptable_attribute_map
+ attribute_map
+ end
+
+ # Returns all the JSON keys this model knows about
+ def self.acceptable_attributes
+ acceptable_attribute_map.values
+ end
+
+ # Attribute type mapping.
+ def self.openapi_types
+ {
+ :'href' => :'String',
+ :'rel' => :'String',
+ :'method' => :'String'
+ }
+ end
+
+ # List of attributes with nullable: true
+ def self.openapi_nullable
+ Set.new([
+ ])
+ end
+
+ # Initializes the object
+ # @param [Hash] attributes Model attributes in the form of hash
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, 'The input argument (attributes) must be a hash in `Bandwidth::Link1` initialize method'
+ end
+
+ # check to see if the attribute exists and convert string to symbol for hash key
+ acceptable_attribute_map = self.class.acceptable_attribute_map
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!acceptable_attribute_map.key?(k.to_sym))
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::Link1`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
+ end
+ h[k.to_sym] = v
+ }
+
+ if attributes.key?(:'href')
+ self.href = attributes[:'href']
+ end
+
+ if attributes.key?(:'rel')
+ self.rel = attributes[:'rel']
+ end
+
+ if attributes.key?(:'method')
+ self.method = attributes[:'method']
+ end
+ end
+
+ # Show invalid properties with the reasons. Usually used together with valid?
+ # @return Array for valid properties with the reasons
+ def list_invalid_properties
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
+ invalid_properties = Array.new
+ invalid_properties
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ def valid?
+ warn '[DEPRECATED] the `valid?` method is obsolete'
+ method_validator = EnumAttributeValidator.new('String', ['GET', 'POST', 'DELETE'])
+ return false unless method_validator.valid?(@method)
+ true
+ end
+
+ # Custom attribute writer method checking allowed values (enum).
+ # @param [Object] method Object to be assigned
+ def method=(method)
+ validator = EnumAttributeValidator.new('String', ['GET', 'POST', 'DELETE'])
+ unless validator.valid?(method)
+ fail ArgumentError, "invalid value for \"method\", must be one of #{validator.allowable_values}."
+ end
+ @method = method
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param [Object] Object to be compared
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ href == o.href &&
+ rel == o.rel &&
+ method == o.method
+ end
+
+ # @see the `==` method
+ # @param [Object] Object to be compared
+ def eql?(o)
+ self == o
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ def hash
+ [href, rel, method].hash
+ end
+
+ # Builds the object from hash
+ # @param [Hash] attributes Model attributes in the form of hash
+ # @return [Object] Returns the model itself
+ def self.build_from_hash(attributes)
+ return nil unless attributes.is_a?(Hash)
+ attributes = attributes.transform_keys(&:to_sym)
+ transformed_hash = {}
+ openapi_types.each_pair do |key, type|
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = nil
+ elsif type =~ /\AArray<(.*)>/i
+ # check to ensure the input is an array given that the attribute
+ # is documented as an array but the input is not
+ if attributes[attribute_map[key]].is_a?(Array)
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
+ end
+ elsif !attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
+ end
+ end
+ new(transformed_hash)
+ end
+
+ # Returns the object in the form of hash
+ # @return [Hash] Returns the object in the form of hash
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ hash
+ end
+ end
+end
diff --git a/lib/bandwidth-sdk/models/list_endpoints_response.rb b/lib/bandwidth-sdk/models/list_endpoints_response.rb
new file mode 100644
index 00000000..c3fd58c9
--- /dev/null
+++ b/lib/bandwidth-sdk/models/list_endpoints_response.rb
@@ -0,0 +1,229 @@
+=begin
+#Bandwidth
+
+#Bandwidth's Communication APIs
+
+The version of the OpenAPI document: 1.0.0
+Contact: letstalk@bandwidth.com
+Generated by: https://openapi-generator.tech
+Generator version: 7.17.0
+
+=end
+
+require 'date'
+require 'time'
+
+module Bandwidth
+ class ListEndpointsResponse < ApiModelBase
+ attr_accessor :links
+
+ attr_accessor :page
+
+ attr_accessor :data
+
+ attr_accessor :errors
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ def self.attribute_map
+ {
+ :'links' => :'links',
+ :'page' => :'page',
+ :'data' => :'data',
+ :'errors' => :'errors'
+ }
+ end
+
+ # Returns attribute mapping this model knows about
+ def self.acceptable_attribute_map
+ attribute_map
+ end
+
+ # Returns all the JSON keys this model knows about
+ def self.acceptable_attributes
+ acceptable_attribute_map.values
+ end
+
+ # Attribute type mapping.
+ def self.openapi_types
+ {
+ :'links' => :'Array',
+ :'page' => :'Page',
+ :'data' => :'Array',
+ :'errors' => :'Array'
+ }
+ end
+
+ # List of attributes with nullable: true
+ def self.openapi_nullable
+ Set.new([
+ ])
+ end
+
+ # Initializes the object
+ # @param [Hash] attributes Model attributes in the form of hash
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, 'The input argument (attributes) must be a hash in `Bandwidth::ListEndpointsResponse` initialize method'
+ end
+
+ # check to see if the attribute exists and convert string to symbol for hash key
+ acceptable_attribute_map = self.class.acceptable_attribute_map
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!acceptable_attribute_map.key?(k.to_sym))
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::ListEndpointsResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
+ end
+ h[k.to_sym] = v
+ }
+
+ if attributes.key?(:'links')
+ if (value = attributes[:'links']).is_a?(Array)
+ self.links = value
+ end
+ else
+ self.links = nil
+ end
+
+ if attributes.key?(:'page')
+ self.page = attributes[:'page']
+ end
+
+ if attributes.key?(:'data')
+ if (value = attributes[:'data']).is_a?(Array)
+ self.data = value
+ end
+ else
+ self.data = nil
+ end
+
+ if attributes.key?(:'errors')
+ if (value = attributes[:'errors']).is_a?(Array)
+ self.errors = value
+ end
+ else
+ self.errors = nil
+ end
+ end
+
+ # Show invalid properties with the reasons. Usually used together with valid?
+ # @return Array for valid properties with the reasons
+ def list_invalid_properties
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
+ invalid_properties = Array.new
+ if @links.nil?
+ invalid_properties.push('invalid value for "links", links cannot be nil.')
+ end
+
+ if @data.nil?
+ invalid_properties.push('invalid value for "data", data cannot be nil.')
+ end
+
+ if @errors.nil?
+ invalid_properties.push('invalid value for "errors", errors cannot be nil.')
+ end
+
+ invalid_properties
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ def valid?
+ warn '[DEPRECATED] the `valid?` method is obsolete'
+ return false if @links.nil?
+ return false if @data.nil?
+ return false if @errors.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param [Object] links Value to be assigned
+ def links=(links)
+ if links.nil?
+ fail ArgumentError, 'links cannot be nil'
+ end
+
+ @links = links
+ end
+
+ # Custom attribute writer method with validation
+ # @param [Object] data Value to be assigned
+ def data=(data)
+ if data.nil?
+ fail ArgumentError, 'data cannot be nil'
+ end
+
+ @data = data
+ end
+
+ # Custom attribute writer method with validation
+ # @param [Object] errors Value to be assigned
+ def errors=(errors)
+ if errors.nil?
+ fail ArgumentError, 'errors cannot be nil'
+ end
+
+ @errors = errors
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param [Object] Object to be compared
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ links == o.links &&
+ page == o.page &&
+ data == o.data &&
+ errors == o.errors
+ end
+
+ # @see the `==` method
+ # @param [Object] Object to be compared
+ def eql?(o)
+ self == o
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ def hash
+ [links, page, data, errors].hash
+ end
+
+ # Builds the object from hash
+ # @param [Hash] attributes Model attributes in the form of hash
+ # @return [Object] Returns the model itself
+ def self.build_from_hash(attributes)
+ return nil unless attributes.is_a?(Hash)
+ attributes = attributes.transform_keys(&:to_sym)
+ transformed_hash = {}
+ openapi_types.each_pair do |key, type|
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = nil
+ elsif type =~ /\AArray<(.*)>/i
+ # check to ensure the input is an array given that the attribute
+ # is documented as an array but the input is not
+ if attributes[attribute_map[key]].is_a?(Array)
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
+ end
+ elsif !attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
+ end
+ end
+ new(transformed_hash)
+ end
+
+ # Returns the object in the form of hash
+ # @return [Hash] Returns the object in the form of hash
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ hash
+ end
+ end
+end
diff --git a/lib/bandwidth-sdk/models/page.rb b/lib/bandwidth-sdk/models/page.rb
new file mode 100644
index 00000000..eb89ea1c
--- /dev/null
+++ b/lib/bandwidth-sdk/models/page.rb
@@ -0,0 +1,259 @@
+=begin
+#Bandwidth
+
+#Bandwidth's Communication APIs
+
+The version of the OpenAPI document: 1.0.0
+Contact: letstalk@bandwidth.com
+Generated by: https://openapi-generator.tech
+Generator version: 7.17.0
+
+=end
+
+require 'date'
+require 'time'
+
+module Bandwidth
+ class Page < ApiModelBase
+ # The number of items per page.
+ attr_accessor :page_size
+
+ # The total number of items.
+ attr_accessor :total_elements
+
+ # The total number of pages.
+ attr_accessor :total_pages
+
+ # The current page number.
+ attr_accessor :page_number
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ def self.attribute_map
+ {
+ :'page_size' => :'pageSize',
+ :'total_elements' => :'totalElements',
+ :'total_pages' => :'totalPages',
+ :'page_number' => :'pageNumber'
+ }
+ end
+
+ # Returns attribute mapping this model knows about
+ def self.acceptable_attribute_map
+ attribute_map
+ end
+
+ # Returns all the JSON keys this model knows about
+ def self.acceptable_attributes
+ acceptable_attribute_map.values
+ end
+
+ # Attribute type mapping.
+ def self.openapi_types
+ {
+ :'page_size' => :'Integer',
+ :'total_elements' => :'Integer',
+ :'total_pages' => :'Integer',
+ :'page_number' => :'Integer'
+ }
+ end
+
+ # List of attributes with nullable: true
+ def self.openapi_nullable
+ Set.new([
+ ])
+ end
+
+ # Initializes the object
+ # @param [Hash] attributes Model attributes in the form of hash
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, 'The input argument (attributes) must be a hash in `Bandwidth::Page` initialize method'
+ end
+
+ # check to see if the attribute exists and convert string to symbol for hash key
+ acceptable_attribute_map = self.class.acceptable_attribute_map
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!acceptable_attribute_map.key?(k.to_sym))
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::Page`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
+ end
+ h[k.to_sym] = v
+ }
+
+ if attributes.key?(:'page_size')
+ self.page_size = attributes[:'page_size']
+ else
+ self.page_size = nil
+ end
+
+ if attributes.key?(:'total_elements')
+ self.total_elements = attributes[:'total_elements']
+ end
+
+ if attributes.key?(:'total_pages')
+ self.total_pages = attributes[:'total_pages']
+ end
+
+ if attributes.key?(:'page_number')
+ self.page_number = attributes[:'page_number']
+ end
+ end
+
+ # Show invalid properties with the reasons. Usually used together with valid?
+ # @return Array for valid properties with the reasons
+ def list_invalid_properties
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
+ invalid_properties = Array.new
+ if @page_size.nil?
+ invalid_properties.push('invalid value for "page_size", page_size cannot be nil.')
+ end
+
+ if @page_size < 0
+ invalid_properties.push('invalid value for "page_size", must be greater than or equal to 0.')
+ end
+
+ if !@total_elements.nil? && @total_elements < 0
+ invalid_properties.push('invalid value for "total_elements", must be greater than or equal to 0.')
+ end
+
+ if !@total_pages.nil? && @total_pages < 0
+ invalid_properties.push('invalid value for "total_pages", must be greater than or equal to 0.')
+ end
+
+ if !@page_number.nil? && @page_number < 0
+ invalid_properties.push('invalid value for "page_number", must be greater than or equal to 0.')
+ end
+
+ invalid_properties
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ def valid?
+ warn '[DEPRECATED] the `valid?` method is obsolete'
+ return false if @page_size.nil?
+ return false if @page_size < 0
+ return false if !@total_elements.nil? && @total_elements < 0
+ return false if !@total_pages.nil? && @total_pages < 0
+ return false if !@page_number.nil? && @page_number < 0
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param [Object] page_size Value to be assigned
+ def page_size=(page_size)
+ if page_size.nil?
+ fail ArgumentError, 'page_size cannot be nil'
+ end
+
+ if page_size < 0
+ fail ArgumentError, 'invalid value for "page_size", must be greater than or equal to 0.'
+ end
+
+ @page_size = page_size
+ end
+
+ # Custom attribute writer method with validation
+ # @param [Object] total_elements Value to be assigned
+ def total_elements=(total_elements)
+ if total_elements.nil?
+ fail ArgumentError, 'total_elements cannot be nil'
+ end
+
+ if total_elements < 0
+ fail ArgumentError, 'invalid value for "total_elements", must be greater than or equal to 0.'
+ end
+
+ @total_elements = total_elements
+ end
+
+ # Custom attribute writer method with validation
+ # @param [Object] total_pages Value to be assigned
+ def total_pages=(total_pages)
+ if total_pages.nil?
+ fail ArgumentError, 'total_pages cannot be nil'
+ end
+
+ if total_pages < 0
+ fail ArgumentError, 'invalid value for "total_pages", must be greater than or equal to 0.'
+ end
+
+ @total_pages = total_pages
+ end
+
+ # Custom attribute writer method with validation
+ # @param [Object] page_number Value to be assigned
+ def page_number=(page_number)
+ if page_number.nil?
+ fail ArgumentError, 'page_number cannot be nil'
+ end
+
+ if page_number < 0
+ fail ArgumentError, 'invalid value for "page_number", must be greater than or equal to 0.'
+ end
+
+ @page_number = page_number
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param [Object] Object to be compared
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ page_size == o.page_size &&
+ total_elements == o.total_elements &&
+ total_pages == o.total_pages &&
+ page_number == o.page_number
+ end
+
+ # @see the `==` method
+ # @param [Object] Object to be compared
+ def eql?(o)
+ self == o
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ def hash
+ [page_size, total_elements, total_pages, page_number].hash
+ end
+
+ # Builds the object from hash
+ # @param [Hash] attributes Model attributes in the form of hash
+ # @return [Object] Returns the model itself
+ def self.build_from_hash(attributes)
+ return nil unless attributes.is_a?(Hash)
+ attributes = attributes.transform_keys(&:to_sym)
+ transformed_hash = {}
+ openapi_types.each_pair do |key, type|
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = nil
+ elsif type =~ /\AArray<(.*)>/i
+ # check to ensure the input is an array given that the attribute
+ # is documented as an array but the input is not
+ if attributes[attribute_map[key]].is_a?(Array)
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
+ end
+ elsif !attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
+ end
+ end
+ new(transformed_hash)
+ end
+
+ # Returns the object in the form of hash
+ # @return [Hash] Returns the object in the form of hash
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ hash
+ end
+ end
+end
diff --git a/lib/bandwidth-sdk/models/sip_connection_metadata.rb b/lib/bandwidth-sdk/models/sip_connection_metadata.rb
new file mode 100644
index 00000000..6371c51d
--- /dev/null
+++ b/lib/bandwidth-sdk/models/sip_connection_metadata.rb
@@ -0,0 +1,175 @@
+=begin
+#Bandwidth
+
+#Bandwidth's Communication APIs
+
+The version of the OpenAPI document: 1.0.0
+Contact: letstalk@bandwidth.com
+Generated by: https://openapi-generator.tech
+Generator version: 7.17.0
+
+=end
+
+require 'date'
+require 'time'
+
+module Bandwidth
+ class SipConnectionMetadata < ApiModelBase
+ # The IP address of the SIP connection.
+ attr_accessor :ip_address
+
+ # The port of the SIP connection.
+ attr_accessor :port
+
+ attr_accessor :credentials
+
+ # The User-to-User Information header for the SIP connection.
+ attr_accessor :uui_header
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ def self.attribute_map
+ {
+ :'ip_address' => :'ipAddress',
+ :'port' => :'port',
+ :'credentials' => :'credentials',
+ :'uui_header' => :'uuiHeader'
+ }
+ end
+
+ # Returns attribute mapping this model knows about
+ def self.acceptable_attribute_map
+ attribute_map
+ end
+
+ # Returns all the JSON keys this model knows about
+ def self.acceptable_attributes
+ acceptable_attribute_map.values
+ end
+
+ # Attribute type mapping.
+ def self.openapi_types
+ {
+ :'ip_address' => :'String',
+ :'port' => :'Integer',
+ :'credentials' => :'SipCredentials',
+ :'uui_header' => :'String'
+ }
+ end
+
+ # List of attributes with nullable: true
+ def self.openapi_nullable
+ Set.new([
+ ])
+ end
+
+ # Initializes the object
+ # @param [Hash] attributes Model attributes in the form of hash
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, 'The input argument (attributes) must be a hash in `Bandwidth::SipConnectionMetadata` initialize method'
+ end
+
+ # check to see if the attribute exists and convert string to symbol for hash key
+ acceptable_attribute_map = self.class.acceptable_attribute_map
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!acceptable_attribute_map.key?(k.to_sym))
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::SipConnectionMetadata`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
+ end
+ h[k.to_sym] = v
+ }
+
+ if attributes.key?(:'ip_address')
+ self.ip_address = attributes[:'ip_address']
+ end
+
+ if attributes.key?(:'port')
+ self.port = attributes[:'port']
+ end
+
+ if attributes.key?(:'credentials')
+ self.credentials = attributes[:'credentials']
+ end
+
+ if attributes.key?(:'uui_header')
+ self.uui_header = attributes[:'uui_header']
+ end
+ end
+
+ # Show invalid properties with the reasons. Usually used together with valid?
+ # @return Array for valid properties with the reasons
+ def list_invalid_properties
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
+ invalid_properties = Array.new
+ invalid_properties
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ def valid?
+ warn '[DEPRECATED] the `valid?` method is obsolete'
+ true
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param [Object] Object to be compared
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ ip_address == o.ip_address &&
+ port == o.port &&
+ credentials == o.credentials &&
+ uui_header == o.uui_header
+ end
+
+ # @see the `==` method
+ # @param [Object] Object to be compared
+ def eql?(o)
+ self == o
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ def hash
+ [ip_address, port, credentials, uui_header].hash
+ end
+
+ # Builds the object from hash
+ # @param [Hash] attributes Model attributes in the form of hash
+ # @return [Object] Returns the model itself
+ def self.build_from_hash(attributes)
+ return nil unless attributes.is_a?(Hash)
+ attributes = attributes.transform_keys(&:to_sym)
+ transformed_hash = {}
+ openapi_types.each_pair do |key, type|
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = nil
+ elsif type =~ /\AArray<(.*)>/i
+ # check to ensure the input is an array given that the attribute
+ # is documented as an array but the input is not
+ if attributes[attribute_map[key]].is_a?(Array)
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
+ end
+ elsif !attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
+ end
+ end
+ new(transformed_hash)
+ end
+
+ # Returns the object in the form of hash
+ # @return [Hash] Returns the object in the form of hash
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ hash
+ end
+ end
+end
diff --git a/lib/bandwidth-sdk/models/sip_credentials.rb b/lib/bandwidth-sdk/models/sip_credentials.rb
new file mode 100644
index 00000000..460b5fb6
--- /dev/null
+++ b/lib/bandwidth-sdk/models/sip_credentials.rb
@@ -0,0 +1,156 @@
+=begin
+#Bandwidth
+
+#Bandwidth's Communication APIs
+
+The version of the OpenAPI document: 1.0.0
+Contact: letstalk@bandwidth.com
+Generated by: https://openapi-generator.tech
+Generator version: 7.17.0
+
+=end
+
+require 'date'
+require 'time'
+
+module Bandwidth
+ class SipCredentials < ApiModelBase
+ # The username for the SIP connection.
+ attr_accessor :username
+
+ # The password for the SIP connection.
+ attr_accessor :password
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ def self.attribute_map
+ {
+ :'username' => :'username',
+ :'password' => :'password'
+ }
+ end
+
+ # Returns attribute mapping this model knows about
+ def self.acceptable_attribute_map
+ attribute_map
+ end
+
+ # Returns all the JSON keys this model knows about
+ def self.acceptable_attributes
+ acceptable_attribute_map.values
+ end
+
+ # Attribute type mapping.
+ def self.openapi_types
+ {
+ :'username' => :'String',
+ :'password' => :'String'
+ }
+ end
+
+ # List of attributes with nullable: true
+ def self.openapi_nullable
+ Set.new([
+ ])
+ end
+
+ # Initializes the object
+ # @param [Hash] attributes Model attributes in the form of hash
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, 'The input argument (attributes) must be a hash in `Bandwidth::SipCredentials` initialize method'
+ end
+
+ # check to see if the attribute exists and convert string to symbol for hash key
+ acceptable_attribute_map = self.class.acceptable_attribute_map
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!acceptable_attribute_map.key?(k.to_sym))
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::SipCredentials`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
+ end
+ h[k.to_sym] = v
+ }
+
+ if attributes.key?(:'username')
+ self.username = attributes[:'username']
+ end
+
+ if attributes.key?(:'password')
+ self.password = attributes[:'password']
+ end
+ end
+
+ # Show invalid properties with the reasons. Usually used together with valid?
+ # @return Array for valid properties with the reasons
+ def list_invalid_properties
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
+ invalid_properties = Array.new
+ invalid_properties
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ def valid?
+ warn '[DEPRECATED] the `valid?` method is obsolete'
+ true
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param [Object] Object to be compared
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ username == o.username &&
+ password == o.password
+ end
+
+ # @see the `==` method
+ # @param [Object] Object to be compared
+ def eql?(o)
+ self == o
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ def hash
+ [username, password].hash
+ end
+
+ # Builds the object from hash
+ # @param [Hash] attributes Model attributes in the form of hash
+ # @return [Object] Returns the model itself
+ def self.build_from_hash(attributes)
+ return nil unless attributes.is_a?(Hash)
+ attributes = attributes.transform_keys(&:to_sym)
+ transformed_hash = {}
+ openapi_types.each_pair do |key, type|
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = nil
+ elsif type =~ /\AArray<(.*)>/i
+ # check to ensure the input is an array given that the attribute
+ # is documented as an array but the input is not
+ if attributes[attribute_map[key]].is_a?(Array)
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
+ end
+ elsif !attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
+ end
+ end
+ new(transformed_hash)
+ end
+
+ # Returns the object in the form of hash
+ # @return [Hash] Returns the object in the form of hash
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ hash
+ end
+ end
+end
diff --git a/lib/bandwidth-sdk/models/update_call.rb b/lib/bandwidth-sdk/models/update_call.rb
index acb96d2b..360dd01c 100644
--- a/lib/bandwidth-sdk/models/update_call.rb
+++ b/lib/bandwidth-sdk/models/update_call.rb
@@ -39,7 +39,7 @@ class UpdateCall < ApiModelBase
# Basic auth password.
attr_accessor :fallback_password
- # A custom string that will be sent with this and all future callbacks unless overwritten by a future `tag` attribute or [``](/docs/voice/bxml/tag) verb, or cleared. May be cleared by setting `tag=\"\"`. Max length 256 characters. Not allowed if `state` is `completed`.
+ # A custom string that will be sent with this and all future callbacks unless overwritten by a future `tag` attribute or [``](/docs/voice/bxml/tag) verb, or cleared. May be cleared by setting `tag=\"\"`. Max length 4096 characters. Not allowed if `state` is `completed`.
attr_accessor :tag
class EnumAttributeValidator
@@ -206,8 +206,8 @@ def list_invalid_properties
invalid_properties.push('invalid value for "fallback_password", the character length must be smaller than or equal to 1024.')
end
- if !@tag.nil? && @tag.to_s.length > 256
- invalid_properties.push('invalid value for "tag", the character length must be smaller than or equal to 256.')
+ if !@tag.nil? && @tag.to_s.length > 4096
+ invalid_properties.push('invalid value for "tag", the character length must be smaller than or equal to 4096.')
end
invalid_properties
@@ -221,7 +221,7 @@ def valid?
return false if !@password.nil? && @password.to_s.length > 1024
return false if !@fallback_username.nil? && @fallback_username.to_s.length > 1024
return false if !@fallback_password.nil? && @fallback_password.to_s.length > 1024
- return false if !@tag.nil? && @tag.to_s.length > 256
+ return false if !@tag.nil? && @tag.to_s.length > 4096
true
end
@@ -268,8 +268,8 @@ def fallback_password=(fallback_password)
# Custom attribute writer method with validation
# @param [Object] tag Value to be assigned
def tag=(tag)
- if !tag.nil? && tag.to_s.length > 256
- fail ArgumentError, 'invalid value for "tag", the character length must be smaller than or equal to 256.'
+ if !tag.nil? && tag.to_s.length > 4096
+ fail ArgumentError, 'invalid value for "tag", the character length must be smaller than or equal to 4096.'
end
@tag = tag