diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index cc7e7cc2..f96c2a0a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -45,7 +45,7 @@ jobs: fi - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Setup Dotnet uses: actions/setup-dotnet@v5 diff --git a/.github/workflows/test-pr.yml b/.github/workflows/test-pr.yml index ac1cae68..f3b39fb7 100644 --- a/.github/workflows/test-pr.yml +++ b/.github/workflows/test-pr.yml @@ -38,7 +38,7 @@ jobs: fail-fast: false steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Setup .NET uses: actions/setup-dotnet@v5 diff --git a/.github/workflows/test-smoke.yml b/.github/workflows/test-smoke.yml index 6cfac2de..fd0f93af 100644 --- a/.github/workflows/test-smoke.yml +++ b/.github/workflows/test-smoke.yml @@ -37,7 +37,7 @@ jobs: MANTECA_APPLICATION_ID: ${{ secrets.MANTECA_APPLICATION_ID }} steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Setup .NET uses: actions/setup-dotnet@v5 @@ -64,7 +64,7 @@ jobs: MANTECA_APPLICATION_ID: ${{ secrets.MANTECA_UP_APPLICATION_ID }} steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Setup .NET uses: actions/setup-dotnet@v5 diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 15009978..6043157a 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -10,6 +10,10 @@ docs/AsyncLookupRequest.md docs/BlockedWebhook.md docs/BridgeCompleteCallback.md docs/BridgeTargetCompleteCallback.md +docs/BrtcError.md +docs/BrtcErrorResponse.md +docs/BrtcErrorSource.md +docs/BrtcLink.md docs/BusinessEntityTypeEnum.md docs/BusinessRegistrationTypeEnum.md docs/CallDirectionEnum.md @@ -67,9 +71,7 @@ docs/EndpointStatusEnum.md docs/EndpointTypeEnum.md docs/Endpoints.md docs/EndpointsApi.md -docs/Error.md docs/ErrorObject.md -docs/ErrorResponse.md docs/ErrorSource.md docs/FailureWebhook.md docs/FieldError.md @@ -207,6 +209,7 @@ docs/VoiceApiError.md docs/VoiceCodeResponse.md docs/WebhookSubscription.md docs/WebhookSubscriptionBasicAuthentication.md +docs/WebhookSubscriptionError.md docs/WebhookSubscriptionRequestSchema.md docs/WebhookSubscriptionTypeEnum.md docs/WebhookSubscriptionsListBody.md @@ -251,6 +254,10 @@ src/Bandwidth.Standard/Model/AsyncLookupRequest.cs src/Bandwidth.Standard/Model/BlockedWebhook.cs src/Bandwidth.Standard/Model/BridgeCompleteCallback.cs src/Bandwidth.Standard/Model/BridgeTargetCompleteCallback.cs +src/Bandwidth.Standard/Model/BrtcError.cs +src/Bandwidth.Standard/Model/BrtcErrorResponse.cs +src/Bandwidth.Standard/Model/BrtcErrorSource.cs +src/Bandwidth.Standard/Model/BrtcLink.cs src/Bandwidth.Standard/Model/BusinessEntityTypeEnum.cs src/Bandwidth.Standard/Model/BusinessRegistrationTypeEnum.cs src/Bandwidth.Standard/Model/CallDirectionEnum.cs @@ -305,9 +312,7 @@ src/Bandwidth.Standard/Model/EndpointResponse.cs src/Bandwidth.Standard/Model/EndpointStatusEnum.cs src/Bandwidth.Standard/Model/EndpointTypeEnum.cs src/Bandwidth.Standard/Model/Endpoints.cs -src/Bandwidth.Standard/Model/Error.cs src/Bandwidth.Standard/Model/ErrorObject.cs -src/Bandwidth.Standard/Model/ErrorResponse.cs src/Bandwidth.Standard/Model/ErrorSource.cs src/Bandwidth.Standard/Model/FailureWebhook.cs src/Bandwidth.Standard/Model/FieldError.cs @@ -436,6 +441,7 @@ src/Bandwidth.Standard/Model/VoiceApiError.cs src/Bandwidth.Standard/Model/VoiceCodeResponse.cs src/Bandwidth.Standard/Model/WebhookSubscription.cs src/Bandwidth.Standard/Model/WebhookSubscriptionBasicAuthentication.cs +src/Bandwidth.Standard/Model/WebhookSubscriptionError.cs src/Bandwidth.Standard/Model/WebhookSubscriptionRequestSchema.cs src/Bandwidth.Standard/Model/WebhookSubscriptionTypeEnum.cs src/Bandwidth.Standard/Model/WebhookSubscriptionsListBody.cs diff --git a/Bandwidth.Standard.sln b/Bandwidth.Standard.sln index 049204ad..ae1c15eb 100644 --- a/Bandwidth.Standard.sln +++ b/Bandwidth.Standard.sln @@ -2,7 +2,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 14 VisualStudioVersion = 14.0.25420.1 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bandwidth.Standard", "src\Bandwidth.Standard\Bandwidth.Standard.csproj", "{5EFE889A-C3DA-4D5A-AD9B-AFA38EF89736}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bandwidth.Standard", "src\Bandwidth.Standard\Bandwidth.Standard.csproj", "{4268749C-D05D-457A-8EA1-94E9360E51F7}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bandwidth.Standard.Test", "src\Bandwidth.Standard.Test\Bandwidth.Standard.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}" EndProject @@ -12,10 +12,10 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {5EFE889A-C3DA-4D5A-AD9B-AFA38EF89736}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5EFE889A-C3DA-4D5A-AD9B-AFA38EF89736}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5EFE889A-C3DA-4D5A-AD9B-AFA38EF89736}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5EFE889A-C3DA-4D5A-AD9B-AFA38EF89736}.Release|Any CPU.Build.0 = Release|Any CPU + {4268749C-D05D-457A-8EA1-94E9360E51F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4268749C-D05D-457A-8EA1-94E9360E51F7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4268749C-D05D-457A-8EA1-94E9360E51F7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4268749C-D05D-457A-8EA1-94E9360E51F7}.Release|Any CPU.Build.0 = Release|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU diff --git a/README.md b/README.md index 4e87f13a..70cbdf89 100644 --- a/README.md +++ b/README.md @@ -181,6 +181,10 @@ Class | Method | HTTP request | Description - [Model.BlockedWebhook](docs/BlockedWebhook.md) - [Model.BridgeCompleteCallback](docs/BridgeCompleteCallback.md) - [Model.BridgeTargetCompleteCallback](docs/BridgeTargetCompleteCallback.md) + - [Model.BrtcError](docs/BrtcError.md) + - [Model.BrtcErrorResponse](docs/BrtcErrorResponse.md) + - [Model.BrtcErrorSource](docs/BrtcErrorSource.md) + - [Model.BrtcLink](docs/BrtcLink.md) - [Model.BusinessEntityTypeEnum](docs/BusinessEntityTypeEnum.md) - [Model.BusinessRegistrationTypeEnum](docs/BusinessRegistrationTypeEnum.md) - [Model.CallDirectionEnum](docs/CallDirectionEnum.md) @@ -235,9 +239,7 @@ Class | Method | HTTP request | Description - [Model.EndpointStatusEnum](docs/EndpointStatusEnum.md) - [Model.EndpointTypeEnum](docs/EndpointTypeEnum.md) - [Model.Endpoints](docs/Endpoints.md) - - [Model.Error](docs/Error.md) - [Model.ErrorObject](docs/ErrorObject.md) - - [Model.ErrorResponse](docs/ErrorResponse.md) - [Model.ErrorSource](docs/ErrorSource.md) - [Model.FailureWebhook](docs/FailureWebhook.md) - [Model.FieldError](docs/FieldError.md) @@ -366,6 +368,7 @@ Class | Method | HTTP request | Description - [Model.VoiceCodeResponse](docs/VoiceCodeResponse.md) - [Model.WebhookSubscription](docs/WebhookSubscription.md) - [Model.WebhookSubscriptionBasicAuthentication](docs/WebhookSubscriptionBasicAuthentication.md) + - [Model.WebhookSubscriptionError](docs/WebhookSubscriptionError.md) - [Model.WebhookSubscriptionRequestSchema](docs/WebhookSubscriptionRequestSchema.md) - [Model.WebhookSubscriptionTypeEnum](docs/WebhookSubscriptionTypeEnum.md) - [Model.WebhookSubscriptionsListBody](docs/WebhookSubscriptionsListBody.md) diff --git a/api/openapi.yaml b/api/openapi.yaml index 1ae72d70..ded6022d 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -5782,7 +5782,7 @@ paths: badRequestErrorExample: $ref: '#/components/examples/badRequestErrorExample' schema: - $ref: '#/components/schemas/errorResponse' + $ref: '#/components/schemas/brtcErrorResponse' description: Bad Request "401": content: @@ -5791,7 +5791,7 @@ paths: unauthorizedErrorExample: $ref: '#/components/examples/unauthorizedErrorExample' schema: - $ref: '#/components/schemas/errorResponse' + $ref: '#/components/schemas/brtcErrorResponse' description: Unauthorized "403": content: @@ -5800,7 +5800,7 @@ paths: forbiddenErrorExample: $ref: '#/components/examples/forbiddenErrorExample' schema: - $ref: '#/components/schemas/errorResponse' + $ref: '#/components/schemas/brtcErrorResponse' description: Forbidden "404": content: @@ -5809,7 +5809,7 @@ paths: notFoundErrorExample: $ref: '#/components/examples/notFoundErrorExample' schema: - $ref: '#/components/schemas/errorResponse' + $ref: '#/components/schemas/brtcErrorResponse' description: Not Found "405": content: @@ -5818,7 +5818,7 @@ paths: methodNotAllowedErrorExample: $ref: '#/components/examples/methodNotAllowedErrorExample' schema: - $ref: '#/components/schemas/errorResponse' + $ref: '#/components/schemas/brtcErrorResponse' description: Method Not Allowed "415": content: @@ -5827,7 +5827,7 @@ paths: unsuppotedMediaTypeErrorExample: $ref: '#/components/examples/unsupportedMediaTypeErrorExample' schema: - $ref: '#/components/schemas/errorResponse' + $ref: '#/components/schemas/brtcErrorResponse' description: Unsupported Media Type "429": content: @@ -5836,8 +5836,18 @@ paths: tooManyRequestsErrorExample: $ref: '#/components/examples/tooManyRequestsErrorExample' schema: - $ref: '#/components/schemas/errorResponse' + $ref: '#/components/schemas/brtcErrorResponse' description: Too Many Requests + headers: + Retry-After: + description: The number of seconds the client should wait before making + another request. + explode: false + required: true + schema: + example: 900 + type: integer + style: simple "500": content: application/json: @@ -5845,7 +5855,7 @@ paths: serviceUnavailableErrorExample: $ref: '#/components/examples/serviceUnavailableErrorExample' schema: - $ref: '#/components/schemas/errorResponse' + $ref: '#/components/schemas/brtcErrorResponse' description: Service Unavailable summary: List Endpoints tags: @@ -5888,7 +5898,7 @@ paths: badRequestErrorExample: $ref: '#/components/examples/badRequestErrorExample' schema: - $ref: '#/components/schemas/errorResponse' + $ref: '#/components/schemas/brtcErrorResponse' description: Bad Request "401": content: @@ -5897,7 +5907,7 @@ paths: unauthorizedErrorExample: $ref: '#/components/examples/unauthorizedErrorExample' schema: - $ref: '#/components/schemas/errorResponse' + $ref: '#/components/schemas/brtcErrorResponse' description: Unauthorized "403": content: @@ -5906,7 +5916,7 @@ paths: forbiddenErrorExample: $ref: '#/components/examples/forbiddenErrorExample' schema: - $ref: '#/components/schemas/errorResponse' + $ref: '#/components/schemas/brtcErrorResponse' description: Forbidden "404": content: @@ -5915,7 +5925,7 @@ paths: notFoundErrorExample: $ref: '#/components/examples/notFoundErrorExample' schema: - $ref: '#/components/schemas/errorResponse' + $ref: '#/components/schemas/brtcErrorResponse' description: Not Found "405": content: @@ -5924,7 +5934,7 @@ paths: methodNotAllowedErrorExample: $ref: '#/components/examples/methodNotAllowedErrorExample' schema: - $ref: '#/components/schemas/errorResponse' + $ref: '#/components/schemas/brtcErrorResponse' description: Method Not Allowed "415": content: @@ -5933,7 +5943,7 @@ paths: unsuppotedMediaTypeErrorExample: $ref: '#/components/examples/unsupportedMediaTypeErrorExample' schema: - $ref: '#/components/schemas/errorResponse' + $ref: '#/components/schemas/brtcErrorResponse' description: Unsupported Media Type "429": content: @@ -5942,8 +5952,18 @@ paths: tooManyRequestsErrorExample: $ref: '#/components/examples/tooManyRequestsErrorExample' schema: - $ref: '#/components/schemas/errorResponse' + $ref: '#/components/schemas/brtcErrorResponse' description: Too Many Requests + headers: + Retry-After: + description: The number of seconds the client should wait before making + another request. + explode: false + required: true + schema: + example: 900 + type: integer + style: simple "500": content: application/json: @@ -5951,7 +5971,7 @@ paths: serviceUnavailableErrorExample: $ref: '#/components/examples/serviceUnavailableErrorExample' schema: - $ref: '#/components/schemas/errorResponse' + $ref: '#/components/schemas/brtcErrorResponse' description: Service Unavailable summary: Create Endpoint tags: @@ -5996,7 +6016,7 @@ paths: badRequestErrorExample: $ref: '#/components/examples/badRequestErrorExample' schema: - $ref: '#/components/schemas/errorResponse' + $ref: '#/components/schemas/brtcErrorResponse' description: Bad Request "401": content: @@ -6005,7 +6025,7 @@ paths: unauthorizedErrorExample: $ref: '#/components/examples/unauthorizedErrorExample' schema: - $ref: '#/components/schemas/errorResponse' + $ref: '#/components/schemas/brtcErrorResponse' description: Unauthorized "403": content: @@ -6014,7 +6034,7 @@ paths: forbiddenErrorExample: $ref: '#/components/examples/forbiddenErrorExample' schema: - $ref: '#/components/schemas/errorResponse' + $ref: '#/components/schemas/brtcErrorResponse' description: Forbidden "404": content: @@ -6023,7 +6043,7 @@ paths: notFoundErrorExample: $ref: '#/components/examples/notFoundErrorExample' schema: - $ref: '#/components/schemas/errorResponse' + $ref: '#/components/schemas/brtcErrorResponse' description: Not Found "405": content: @@ -6032,7 +6052,7 @@ paths: methodNotAllowedErrorExample: $ref: '#/components/examples/methodNotAllowedErrorExample' schema: - $ref: '#/components/schemas/errorResponse' + $ref: '#/components/schemas/brtcErrorResponse' description: Method Not Allowed "415": content: @@ -6041,7 +6061,7 @@ paths: unsuppotedMediaTypeErrorExample: $ref: '#/components/examples/unsupportedMediaTypeErrorExample' schema: - $ref: '#/components/schemas/errorResponse' + $ref: '#/components/schemas/brtcErrorResponse' description: Unsupported Media Type "429": content: @@ -6050,8 +6070,18 @@ paths: tooManyRequestsErrorExample: $ref: '#/components/examples/tooManyRequestsErrorExample' schema: - $ref: '#/components/schemas/errorResponse' + $ref: '#/components/schemas/brtcErrorResponse' description: Too Many Requests + headers: + Retry-After: + description: The number of seconds the client should wait before making + another request. + explode: false + required: true + schema: + example: 900 + type: integer + style: simple "500": content: application/json: @@ -6059,7 +6089,7 @@ paths: serviceUnavailableErrorExample: $ref: '#/components/examples/serviceUnavailableErrorExample' schema: - $ref: '#/components/schemas/errorResponse' + $ref: '#/components/schemas/brtcErrorResponse' description: Service Unavailable summary: Delete Endpoint tags: @@ -6106,7 +6136,7 @@ paths: badRequestErrorExample: $ref: '#/components/examples/badRequestErrorExample' schema: - $ref: '#/components/schemas/errorResponse' + $ref: '#/components/schemas/brtcErrorResponse' description: Bad Request "401": content: @@ -6115,7 +6145,7 @@ paths: unauthorizedErrorExample: $ref: '#/components/examples/unauthorizedErrorExample' schema: - $ref: '#/components/schemas/errorResponse' + $ref: '#/components/schemas/brtcErrorResponse' description: Unauthorized "403": content: @@ -6124,7 +6154,7 @@ paths: forbiddenErrorExample: $ref: '#/components/examples/forbiddenErrorExample' schema: - $ref: '#/components/schemas/errorResponse' + $ref: '#/components/schemas/brtcErrorResponse' description: Forbidden "404": content: @@ -6133,7 +6163,7 @@ paths: notFoundErrorExample: $ref: '#/components/examples/notFoundErrorExample' schema: - $ref: '#/components/schemas/errorResponse' + $ref: '#/components/schemas/brtcErrorResponse' description: Not Found "405": content: @@ -6142,7 +6172,7 @@ paths: methodNotAllowedErrorExample: $ref: '#/components/examples/methodNotAllowedErrorExample' schema: - $ref: '#/components/schemas/errorResponse' + $ref: '#/components/schemas/brtcErrorResponse' description: Method Not Allowed "415": content: @@ -6151,7 +6181,7 @@ paths: unsuppotedMediaTypeErrorExample: $ref: '#/components/examples/unsupportedMediaTypeErrorExample' schema: - $ref: '#/components/schemas/errorResponse' + $ref: '#/components/schemas/brtcErrorResponse' description: Unsupported Media Type "429": content: @@ -6160,8 +6190,18 @@ paths: tooManyRequestsErrorExample: $ref: '#/components/examples/tooManyRequestsErrorExample' schema: - $ref: '#/components/schemas/errorResponse' + $ref: '#/components/schemas/brtcErrorResponse' description: Too Many Requests + headers: + Retry-After: + description: The number of seconds the client should wait before making + another request. + explode: false + required: true + schema: + example: 900 + type: integer + style: simple "500": content: application/json: @@ -6169,7 +6209,7 @@ paths: serviceUnavailableErrorExample: $ref: '#/components/examples/serviceUnavailableErrorExample' schema: - $ref: '#/components/schemas/errorResponse' + $ref: '#/components/schemas/brtcErrorResponse' description: Service Unavailable summary: Get Endpoint tags: @@ -6215,7 +6255,7 @@ paths: badRequestErrorExample: $ref: '#/components/examples/badRequestErrorExample' schema: - $ref: '#/components/schemas/errorResponse' + $ref: '#/components/schemas/brtcErrorResponse' description: Bad Request "401": content: @@ -6224,7 +6264,7 @@ paths: unauthorizedErrorExample: $ref: '#/components/examples/unauthorizedErrorExample' schema: - $ref: '#/components/schemas/errorResponse' + $ref: '#/components/schemas/brtcErrorResponse' description: Unauthorized "403": content: @@ -6233,7 +6273,7 @@ paths: forbiddenErrorExample: $ref: '#/components/examples/forbiddenErrorExample' schema: - $ref: '#/components/schemas/errorResponse' + $ref: '#/components/schemas/brtcErrorResponse' description: Forbidden "404": content: @@ -6242,7 +6282,7 @@ paths: notFoundErrorExample: $ref: '#/components/examples/notFoundErrorExample' schema: - $ref: '#/components/schemas/errorResponse' + $ref: '#/components/schemas/brtcErrorResponse' description: Not Found "405": content: @@ -6251,7 +6291,7 @@ paths: methodNotAllowedErrorExample: $ref: '#/components/examples/methodNotAllowedErrorExample' schema: - $ref: '#/components/schemas/errorResponse' + $ref: '#/components/schemas/brtcErrorResponse' description: Method Not Allowed "415": content: @@ -6260,7 +6300,7 @@ paths: unsuppotedMediaTypeErrorExample: $ref: '#/components/examples/unsupportedMediaTypeErrorExample' schema: - $ref: '#/components/schemas/errorResponse' + $ref: '#/components/schemas/brtcErrorResponse' description: Unsupported Media Type "429": content: @@ -6269,8 +6309,18 @@ paths: tooManyRequestsErrorExample: $ref: '#/components/examples/tooManyRequestsErrorExample' schema: - $ref: '#/components/schemas/errorResponse' + $ref: '#/components/schemas/brtcErrorResponse' description: Too Many Requests + headers: + Retry-After: + description: The number of seconds the client should wait before making + another request. + explode: false + required: true + schema: + example: 900 + type: integer + style: simple "500": content: application/json: @@ -6278,7 +6328,7 @@ paths: serviceUnavailableErrorExample: $ref: '#/components/examples/serviceUnavailableErrorExample' schema: - $ref: '#/components/schemas/errorResponse' + $ref: '#/components/schemas/brtcErrorResponse' description: Service Unavailable summary: Update Endpoint BXML tags: @@ -7112,11 +7162,9 @@ components: links: [] data: null errors: - - id: 59512d87-7a92-4040-8e4a-78fb772019b9 - type: too_many_requests - description: The client has sent too many requests in a given amount of - time. - code: "429" + - 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: @@ -8841,7 +8889,7 @@ components: badRequestErrorExample: $ref: '#/components/examples/badRequestErrorExample' schema: - $ref: '#/components/schemas/errorResponse' + $ref: '#/components/schemas/brtcErrorResponse' description: Bad Request unauthorizedErrorResponse: content: @@ -8850,7 +8898,7 @@ components: unauthorizedErrorExample: $ref: '#/components/examples/unauthorizedErrorExample' schema: - $ref: '#/components/schemas/errorResponse' + $ref: '#/components/schemas/brtcErrorResponse' description: Unauthorized forbiddenErrorResponse: content: @@ -8859,7 +8907,7 @@ components: forbiddenErrorExample: $ref: '#/components/examples/forbiddenErrorExample' schema: - $ref: '#/components/schemas/errorResponse' + $ref: '#/components/schemas/brtcErrorResponse' description: Forbidden notFoundErrorResponse: content: @@ -8868,7 +8916,7 @@ components: notFoundErrorExample: $ref: '#/components/examples/notFoundErrorExample' schema: - $ref: '#/components/schemas/errorResponse' + $ref: '#/components/schemas/brtcErrorResponse' description: Not Found methodNotAllowedErrorResponse: content: @@ -8877,7 +8925,7 @@ components: methodNotAllowedErrorExample: $ref: '#/components/examples/methodNotAllowedErrorExample' schema: - $ref: '#/components/schemas/errorResponse' + $ref: '#/components/schemas/brtcErrorResponse' description: Method Not Allowed unsupportedMediaTypeErrorResponse: content: @@ -8886,7 +8934,7 @@ components: unsuppotedMediaTypeErrorExample: $ref: '#/components/examples/unsupportedMediaTypeErrorExample' schema: - $ref: '#/components/schemas/errorResponse' + $ref: '#/components/schemas/brtcErrorResponse' description: Unsupported Media Type tooManyRequestsErrorResponse: content: @@ -8895,8 +8943,18 @@ components: tooManyRequestsErrorExample: $ref: '#/components/examples/tooManyRequestsErrorExample' schema: - $ref: '#/components/schemas/errorResponse' + $ref: '#/components/schemas/brtcErrorResponse' description: Too Many Requests + headers: + Retry-After: + description: The number of seconds the client should wait before making + another request. + explode: false + required: true + schema: + example: 900 + type: integer + style: simple serviceUnavailableErrorResponse: content: application/json: @@ -8904,7 +8962,7 @@ components: serviceUnavailableErrorExample: $ref: '#/components/examples/serviceUnavailableErrorExample' schema: - $ref: '#/components/schemas/errorResponse' + $ref: '#/components/schemas/brtcErrorResponse' description: Service Unavailable schemas: applicationId: @@ -9633,9 +9691,6 @@ components: type: array type: object link: - example: - rel: rel - href: href properties: rel: type: string @@ -9937,7 +9992,7 @@ components: rbmOpenUrlEnum: description: |- Specifies how the URL should be opened on a mobile device. - - `BROWSER` Opens the URL in the device's default browser. If application is not set or the device doesn’t support WebView, this option is used by default. + - `BROWSER` Opens the URL in the device's default browser. If application is not set or the device doesn't support WebView, this option is used by default. - `WEBVIEW` Opens the URL in an in-app WebView. enum: - BROWSER @@ -10930,9 +10985,9 @@ components: May be cleared by setting `tag=""` - Max length 256 characters. + Max length 4096 characters. example: arbitrary text here - maxLength: 256 + maxLength: 4096 nullable: true type: string required: @@ -11293,11 +11348,11 @@ components: May be cleared by setting `tag=""`. - Max length 256 characters. + Max length 4096 characters. Not allowed if `state` is `completed`. example: My Custom Tag - maxLength: 256 + maxLength: 4096 nullable: true type: string type: object @@ -15526,7 +15581,7 @@ components: $ref: '#/components/schemas/linksObject' errors: items: - $ref: '#/components/schemas/error' + $ref: '#/components/schemas/webhookSubscriptionError' type: array data: items: @@ -15558,7 +15613,7 @@ components: \ return the last page of result." type: string type: object - error: + webhookSubscriptionError: example: code: 0 telephoneNumbers: @@ -16194,6 +16249,25 @@ components: - eventType type: object description: An event that occurred on an endpoint. + brtcLink: + example: + method: GET + rel: self + href: https://api.bandwidth.com/v2/accounts/5500123/endpoints/e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + properties: + href: + description: The full URL of the link. + example: https://api.bandwidth.com/v2/accounts/5500123/endpoints/e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + type: string + rel: + description: The relationship of the link to the current resource. + example: self + type: string + method: + description: The HTTP method to use when making the request. + example: GET + type: string + type: object page: example: pageNumber: 0 @@ -16224,6 +16298,66 @@ components: required: - pageSize type: object + brtcError: + example: + code: "404" + description: The requested resource was not found. + id: 59512d87-7a92-4040-8e4a-78fb772019b9 + source: + reference: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + field: accountId + parameter: accountId + header: Authorization + type: resource.not_found + properties: + id: + description: A unique identifier for the error. + example: 59512d87-7a92-4040-8e4a-78fb772019b9 + format: uuid + type: string + type: + description: The type of error. + example: resource.not_found + type: string + description: + description: A description of the error. + example: The requested resource was not found. + type: string + code: + description: A code that uniquely identifies the error. + example: "404" + type: string + source: + $ref: '#/components/schemas/brtcErrorSource' + required: + - description + - type + type: object + brtcErrorSource: + example: + reference: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + field: accountId + parameter: accountId + header: Authorization + properties: + parameter: + description: The URI parameter that caused the error. + example: accountId + type: string + field: + description: The request body field that caused the error. + example: accountId + type: string + header: + description: The header that caused the error. + example: Authorization + type: string + reference: + description: The resource ID or path to the resource (or non-existent resource) + causing the error. + example: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + type: string + type: object listEndpointsResponse: example: data: @@ -16240,30 +16374,40 @@ components: type: WEBRTC status: CONNECTED links: - - rel: rel - href: href - - rel: rel - href: href + - method: GET + rel: self + href: https://api.bandwidth.com/v2/accounts/5500123/endpoints/e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + - method: GET + rel: self + href: https://api.bandwidth.com/v2/accounts/5500123/endpoints/e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 page: pageNumber: 0 totalPages: 10 pageSize: 10 totalElements: 100 errors: - - code: 0 - telephoneNumbers: - - telephoneNumber: telephoneNumber - - telephoneNumber: telephoneNumber - description: description - - code: 0 - telephoneNumbers: - - telephoneNumber: telephoneNumber - - telephoneNumber: telephoneNumber - description: description + - code: "404" + description: The requested resource was not found. + id: 59512d87-7a92-4040-8e4a-78fb772019b9 + source: + reference: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + field: accountId + parameter: accountId + header: Authorization + type: resource.not_found + - code: "404" + description: The requested resource was not found. + id: 59512d87-7a92-4040-8e4a-78fb772019b9 + source: + reference: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + field: accountId + parameter: accountId + header: Authorization + type: resource.not_found properties: links: items: - $ref: '#/components/schemas/link' + $ref: '#/components/schemas/brtcLink' type: array page: $ref: '#/components/schemas/page' @@ -16273,7 +16417,7 @@ components: type: array errors: items: - $ref: '#/components/schemas/error' + $ref: '#/components/schemas/brtcError' type: array required: - data @@ -16299,31 +16443,41 @@ components: type: WEBRTC status: CONNECTED links: - - rel: rel - href: href - - rel: rel - href: href + - method: GET + rel: self + href: https://api.bandwidth.com/v2/accounts/5500123/endpoints/e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + - method: GET + rel: self + href: https://api.bandwidth.com/v2/accounts/5500123/endpoints/e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 errors: - - code: 0 - telephoneNumbers: - - telephoneNumber: telephoneNumber - - telephoneNumber: telephoneNumber - description: description - - code: 0 - telephoneNumbers: - - telephoneNumber: telephoneNumber - - telephoneNumber: telephoneNumber - description: description + - code: "404" + description: The requested resource was not found. + id: 59512d87-7a92-4040-8e4a-78fb772019b9 + source: + reference: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + field: accountId + parameter: accountId + header: Authorization + type: resource.not_found + - code: "404" + description: The requested resource was not found. + id: 59512d87-7a92-4040-8e4a-78fb772019b9 + source: + reference: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + field: accountId + parameter: accountId + header: Authorization + type: resource.not_found properties: links: items: - $ref: '#/components/schemas/link' + $ref: '#/components/schemas/brtcLink' type: array data: $ref: '#/components/schemas/endpoint' errors: items: - $ref: '#/components/schemas/error' + $ref: '#/components/schemas/brtcError' type: array required: - data @@ -16350,60 +16504,80 @@ components: status: CONNECTED token: xxxxx.yyyyy.zzzzz links: - - rel: rel - href: href - - rel: rel - href: href + - method: GET + rel: self + href: https://api.bandwidth.com/v2/accounts/5500123/endpoints/e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + - method: GET + rel: self + href: https://api.bandwidth.com/v2/accounts/5500123/endpoints/e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 errors: - - code: 0 - telephoneNumbers: - - telephoneNumber: telephoneNumber - - telephoneNumber: telephoneNumber - description: description - - code: 0 - telephoneNumbers: - - telephoneNumber: telephoneNumber - - telephoneNumber: telephoneNumber - description: description + - code: "404" + description: The requested resource was not found. + id: 59512d87-7a92-4040-8e4a-78fb772019b9 + source: + reference: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + field: accountId + parameter: accountId + header: Authorization + type: resource.not_found + - code: "404" + description: The requested resource was not found. + id: 59512d87-7a92-4040-8e4a-78fb772019b9 + source: + reference: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + field: accountId + parameter: accountId + header: Authorization + type: resource.not_found properties: links: items: - $ref: '#/components/schemas/link' + $ref: '#/components/schemas/brtcLink' type: array data: $ref: '#/components/schemas/createEndpointResponseData' errors: items: - $ref: '#/components/schemas/error' + $ref: '#/components/schemas/brtcError' type: array required: - data - errors - links type: object - errorResponse: + brtcErrorResponse: example: data: "{}" links: - - rel: rel - href: href - - rel: rel - href: href + - method: GET + rel: self + href: https://api.bandwidth.com/v2/accounts/5500123/endpoints/e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + - method: GET + rel: self + href: https://api.bandwidth.com/v2/accounts/5500123/endpoints/e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 errors: - - code: 0 - telephoneNumbers: - - telephoneNumber: telephoneNumber - - telephoneNumber: telephoneNumber - description: description - - code: 0 - telephoneNumbers: - - telephoneNumber: telephoneNumber - - telephoneNumber: telephoneNumber - description: description + - code: "404" + description: The requested resource was not found. + id: 59512d87-7a92-4040-8e4a-78fb772019b9 + source: + reference: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + field: accountId + parameter: accountId + header: Authorization + type: resource.not_found + - code: "404" + description: The requested resource was not found. + id: 59512d87-7a92-4040-8e4a-78fb772019b9 + source: + reference: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + field: accountId + parameter: accountId + header: Authorization + type: resource.not_found properties: links: items: - $ref: '#/components/schemas/link' + $ref: '#/components/schemas/brtcLink' type: array data: additionalProperties: false @@ -16411,7 +16585,7 @@ components: type: object errors: items: - $ref: '#/components/schemas/error' + $ref: '#/components/schemas/brtcError' type: array required: - data diff --git a/bandwidth.yml b/bandwidth.yml index 4378c202..6ad54bc1 100644 --- a/bandwidth.yml +++ b/bandwidth.yml @@ -2571,7 +2571,7 @@ components: Specifies how the URL should be opened on a mobile device. - `BROWSER` Opens the URL in the device's default browser. If - application is not set or the device doesn’t support WebView, this + application is not set or the device doesn't support WebView, this option is used by default. - `WEBVIEW` Opens the URL in an in-app WebView. @@ -3455,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 @@ -3833,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 @@ -6635,7 +6635,7 @@ components: errors: type: array items: - $ref: '#/components/schemas/error' + $ref: '#/components/schemas/webhookSubscriptionError' data: items: $ref: '#/components/schemas/webhookSubscription' @@ -6661,7 +6661,7 @@ components: If more results exist than specified by 'size', this link return the last page of result. type: string - error: + webhookSubscriptionError: type: object properties: code: @@ -7060,6 +7060,22 @@ components: required: - eventType - eventTime + brtcLink: + 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 + description: The HTTP method to use when making the request. + example: GET page: type: object properties: @@ -7085,13 +7101,59 @@ components: example: 0 required: - pageSize + brtcError: + 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: + $ref: '#/components/schemas/brtcErrorSource' + required: + - type + - description + brtcErrorSource: + 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 listEndpointsResponse: type: object properties: links: type: array items: - $ref: '#/components/schemas/link' + $ref: '#/components/schemas/brtcLink' page: $ref: '#/components/schemas/page' data: @@ -7101,7 +7163,7 @@ components: errors: type: array items: - $ref: '#/components/schemas/error' + $ref: '#/components/schemas/brtcError' required: - links - data @@ -7112,13 +7174,13 @@ components: links: type: array items: - $ref: '#/components/schemas/link' + $ref: '#/components/schemas/brtcLink' data: $ref: '#/components/schemas/endpoint' errors: type: array items: - $ref: '#/components/schemas/error' + $ref: '#/components/schemas/brtcError' required: - links - data @@ -7129,24 +7191,24 @@ components: links: type: array items: - $ref: '#/components/schemas/link' + $ref: '#/components/schemas/brtcLink' data: $ref: '#/components/schemas/createEndpointResponseData' errors: type: array items: - $ref: '#/components/schemas/error' + $ref: '#/components/schemas/brtcError' required: - links - data - errors - errorResponse: + brtcErrorResponse: type: object properties: links: type: array items: - $ref: '#/components/schemas/link' + $ref: '#/components/schemas/brtcLink' data: type: object nullable: true @@ -7154,7 +7216,7 @@ components: errors: type: array items: - $ref: '#/components/schemas/error' + $ref: '#/components/schemas/brtcError' required: - links - data @@ -7865,7 +7927,7 @@ components: content: application/json: schema: - $ref: '#/components/schemas/errorResponse' + $ref: '#/components/schemas/brtcErrorResponse' examples: badRequestErrorExample: $ref: '#/components/examples/badRequestErrorExample' @@ -7874,7 +7936,7 @@ components: content: application/json: schema: - $ref: '#/components/schemas/errorResponse' + $ref: '#/components/schemas/brtcErrorResponse' examples: unauthorizedErrorExample: $ref: '#/components/examples/unauthorizedErrorExample' @@ -7883,7 +7945,7 @@ components: content: application/json: schema: - $ref: '#/components/schemas/errorResponse' + $ref: '#/components/schemas/brtcErrorResponse' examples: forbiddenErrorExample: $ref: '#/components/examples/forbiddenErrorExample' @@ -7892,7 +7954,7 @@ components: content: application/json: schema: - $ref: '#/components/schemas/errorResponse' + $ref: '#/components/schemas/brtcErrorResponse' examples: notFoundErrorExample: $ref: '#/components/examples/notFoundErrorExample' @@ -7901,7 +7963,7 @@ components: content: application/json: schema: - $ref: '#/components/schemas/errorResponse' + $ref: '#/components/schemas/brtcErrorResponse' examples: methodNotAllowedErrorExample: $ref: '#/components/examples/methodNotAllowedErrorExample' @@ -7910,16 +7972,25 @@ components: content: application/json: schema: - $ref: '#/components/schemas/errorResponse' + $ref: '#/components/schemas/brtcErrorResponse' 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' + $ref: '#/components/schemas/brtcErrorResponse' examples: tooManyRequestsErrorExample: $ref: '#/components/examples/tooManyRequestsErrorExample' @@ -7928,7 +7999,7 @@ components: content: application/json: schema: - $ref: '#/components/schemas/errorResponse' + $ref: '#/components/schemas/brtcErrorResponse' examples: serviceUnavailableErrorExample: $ref: '#/components/examples/serviceUnavailableErrorExample' @@ -9137,10 +9208,10 @@ components: links: [] data: null errors: - - id: 59512d87-7a92-4040-8e4a-78fb772019b9 - type: too_many_requests - description: The client has sent too many requests in a given amount of time. - code: '429' + - 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: diff --git a/docs/BrtcError.md b/docs/BrtcError.md new file mode 100644 index 00000000..68267631 --- /dev/null +++ b/docs/BrtcError.md @@ -0,0 +1,14 @@ +# Bandwidth.Standard.Model.BrtcError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **Guid** | 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** | [**BrtcErrorSource**](BrtcErrorSource.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/ErrorResponse.md b/docs/BrtcErrorResponse.md similarity index 64% rename from docs/ErrorResponse.md rename to docs/BrtcErrorResponse.md index ca74313d..a9a97cfb 100644 --- a/docs/ErrorResponse.md +++ b/docs/BrtcErrorResponse.md @@ -1,12 +1,12 @@ -# Bandwidth.Standard.Model.ErrorResponse +# Bandwidth.Standard.Model.BrtcErrorResponse ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Links** | [**List<Link>**](Link.md) | | +**Links** | [**List<BrtcLink>**](BrtcLink.md) | | **Data** | **Object** | | -**Errors** | [**List<Error>**](Error.md) | | +**Errors** | [**List<BrtcError>**](BrtcError.md) | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/BrtcErrorSource.md b/docs/BrtcErrorSource.md new file mode 100644 index 00000000..31883698 --- /dev/null +++ b/docs/BrtcErrorSource.md @@ -0,0 +1,13 @@ +# Bandwidth.Standard.Model.BrtcErrorSource + +## 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] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/BrtcLink.md b/docs/BrtcLink.md new file mode 100644 index 00000000..01de766d --- /dev/null +++ b/docs/BrtcLink.md @@ -0,0 +1,12 @@ +# Bandwidth.Standard.Model.BrtcLink + +## 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] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/CreateCall.md b/docs/CreateCall.md index 12f482bd..2ed6cdbd 100644 --- a/docs/CreateCall.md +++ b/docs/CreateCall.md @@ -24,7 +24,7 @@ Name | Type | Description | Notes **CallbackTimeout** | **double?** | 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 15D] **MachineDetection** | [**MachineDetectionConfiguration**](MachineDetectionConfiguration.md) | | [optional] **Priority** | **int?** | 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] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateEndpointResponse.md b/docs/CreateEndpointResponse.md index 2b0c3215..04353bc7 100644 --- a/docs/CreateEndpointResponse.md +++ b/docs/CreateEndpointResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Links** | [**List<Link>**](Link.md) | | +**Links** | [**List<BrtcLink>**](BrtcLink.md) | | **Data** | [**CreateEndpointResponseData**](CreateEndpointResponseData.md) | | -**Errors** | [**List<Error>**](Error.md) | | +**Errors** | [**List<BrtcError>**](BrtcError.md) | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EndpointResponse.md b/docs/EndpointResponse.md index e304334d..daeb0ccc 100644 --- a/docs/EndpointResponse.md +++ b/docs/EndpointResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Links** | [**List<Link>**](Link.md) | | +**Links** | [**List<BrtcLink>**](BrtcLink.md) | | **Data** | [**Endpoint**](Endpoint.md) | | -**Errors** | [**List<Error>**](Error.md) | | +**Errors** | [**List<BrtcError>**](BrtcError.md) | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EndpointsApi.md b/docs/EndpointsApi.md index 83d12261..824afb7d 100644 --- a/docs/EndpointsApi.md +++ b/docs/EndpointsApi.md @@ -112,7 +112,7 @@ catch (ApiException e) | **404** | Not Found | - | | **405** | Method Not Allowed | - | | **415** | Unsupported Media Type | - | -| **429** | Too Many Requests | - | +| **429** | Too Many Requests | * Retry-After - The number of seconds the client should wait before making another request.
| | **500** | Service Unavailable | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -215,7 +215,7 @@ void (empty response body) | **404** | Not Found | - | | **405** | Method Not Allowed | - | | **415** | Unsupported Media Type | - | -| **429** | Too Many Requests | - | +| **429** | Too Many Requests | * Retry-After - The number of seconds the client should wait before making another request.
| | **500** | Service Unavailable | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -322,7 +322,7 @@ catch (ApiException e) | **404** | Not Found | - | | **405** | Method Not Allowed | - | | **415** | Unsupported Media Type | - | -| **429** | Too Many Requests | - | +| **429** | Too Many Requests | * Retry-After - The number of seconds the client should wait before making another request.
| | **500** | Service Unavailable | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -435,7 +435,7 @@ catch (ApiException e) | **404** | Not Found | - | | **405** | Method Not Allowed | - | | **415** | Unsupported Media Type | - | -| **429** | Too Many Requests | - | +| **429** | Too Many Requests | * Retry-After - The number of seconds the client should wait before making another request.
| | **500** | Service Unavailable | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -540,7 +540,7 @@ void (empty response body) | **404** | Not Found | - | | **405** | Method Not Allowed | - | | **415** | Unsupported Media Type | - | -| **429** | Too Many Requests | - | +| **429** | Too Many Requests | * Retry-After - The number of seconds the client should wait before making another request.
| | **500** | Service Unavailable | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/ListEndpointsResponse.md b/docs/ListEndpointsResponse.md index bc29ba64..9a7b8bbf 100644 --- a/docs/ListEndpointsResponse.md +++ b/docs/ListEndpointsResponse.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Links** | [**List<Link>**](Link.md) | | +**Links** | [**List<BrtcLink>**](BrtcLink.md) | | **Page** | [**Page**](Page.md) | | [optional] **Data** | [**List<Endpoints>**](Endpoints.md) | | -**Errors** | [**List<Error>**](Error.md) | | +**Errors** | [**List<BrtcError>**](BrtcError.md) | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/LookupResult.md b/docs/LookupResult.md index 0eed2fbe..833661a8 100644 --- a/docs/LookupResult.md +++ b/docs/LookupResult.md @@ -14,7 +14,7 @@ Name | Type | Description | Notes **DeactivationDate** | **string** | [DNI-Only](#section/DNI-Only). The datetime the carrier reported a deactivation event. | [optional] **DeactivationEvent** | **DeactivationEventEnum** | | [optional] **LatestMessageDeliveryStatus** | **LatestMessageDeliveryStatusEnum** | | [optional] -**InitialMessageDeliveryStatusDate** | **DateTime** | [DNI-Only](#section/DNI-Only). The date the phone number entered the status described in `latestMessageDeliveryStatus`. Think of this as the \"start time\" for that status. Value resets every time the `latestMessageDeliveryStatus` changes. | [optional] +**InitialMessageDeliveryStatusDate** | **DateTime** | [DNI-Only](#section/DNI-Only). The date the phone number entered the status described in `latestMessageDeliveryStatus`. Think of this as the \"start time\" for that status. Value resets every time the `latestMessageDeliveryStatus` changes. | [optional] **LatestMessageDeliveryStatusDate** | **DateTime** | [DNI-Only](#section/DNI-Only). The date bandwidth last received delivery status information for this phone number. Use this field to understand how up-to-date the `latestMessageDeliveryStatus` is. Value resets every time the `latestMessageDeliveryStatus` changes. | [optional] **RcsEnabled** | **bool** | [RCS-Only](#section/RCS-Only). Indicates whether the phone number is capable of receiving RCS messages. Value will be null if account has RCS, but no value was returned. Absent when account does not have RCS. | [optional] diff --git a/docs/RbmOpenUrlEnum.md b/docs/RbmOpenUrlEnum.md index cf4a79ce..d62683aa 100644 --- a/docs/RbmOpenUrlEnum.md +++ b/docs/RbmOpenUrlEnum.md @@ -1,5 +1,5 @@ # Bandwidth.Standard.Model.RbmOpenUrlEnum -Specifies how the URL should be opened on a mobile device. - `BROWSER` Opens the URL in the device's default browser. If application is not set or the device doesn’t support WebView, this option is used by default. - `WEBVIEW` Opens the URL in an in-app WebView. +Specifies how the URL should be opened on a mobile device. - `BROWSER` Opens the URL in the device's default browser. If application is not set or the device doesn't support WebView, this option is used by default. - `WEBVIEW` Opens the URL in an in-app WebView. ## Properties diff --git a/docs/UpdateCall.md b/docs/UpdateCall.md index 8e13e5d1..906a8263 100644 --- a/docs/UpdateCall.md +++ b/docs/UpdateCall.md @@ -13,7 +13,7 @@ Name | Type | Description | Notes **RedirectFallbackMethod** | **RedirectMethodEnum** | | [optional] **FallbackUsername** | **string** | Basic auth username. | [optional] **FallbackPassword** | **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] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Error.md b/docs/WebhookSubscriptionError.md similarity index 89% rename from docs/Error.md rename to docs/WebhookSubscriptionError.md index 366809be..251d30ae 100644 --- a/docs/Error.md +++ b/docs/WebhookSubscriptionError.md @@ -1,4 +1,4 @@ -# Bandwidth.Standard.Model.Error +# Bandwidth.Standard.Model.WebhookSubscriptionError ## Properties diff --git a/docs/WebhookSubscriptionsListBody.md b/docs/WebhookSubscriptionsListBody.md index a778a052..e3e63e49 100644 --- a/docs/WebhookSubscriptionsListBody.md +++ b/docs/WebhookSubscriptionsListBody.md @@ -6,7 +6,7 @@ A list of all webhook subscriptions registered for this account ID for this part Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Links** | [**LinksObject**](LinksObject.md) | | [optional] -**Errors** | [**List<Error>**](Error.md) | | [optional] +**Errors** | [**List<WebhookSubscriptionError>**](WebhookSubscriptionError.md) | | [optional] **Data** | [**List<WebhookSubscription>**](WebhookSubscription.md) | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/generate-model-tests.sh b/generate-model-tests.sh new file mode 100644 index 00000000..e62a84da --- /dev/null +++ b/generate-model-tests.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# Generates new test files for models. Run from the root. + +# allow generator to write test files +sed -i.bak 's/^src\/Bandwidth\.Standard\.Test\//# src\/Bandwidth.Standard.Test\//' .openapi-generator-ignore && rm .openapi-generator-ignore.bak +# remove current test files for models +rm -f ./src/Bandwidth.Standard.Test/Unit/Model/* +# generate new test files for models +openapi-generator-cli generate -i bandwidth.yml -o ./ -c openapi-config.yml -g csharp > /dev/null +# move generated test files to the correct location +mv ./src/Bandwidth.Standard.Test/Model/* ./src/Bandwidth.Standard.Test/Unit/Model/ +# fix namespace declarations in moved test files +sed -i '' 's/namespace Bandwidth\.Standard\.Test\.Model/namespace Bandwidth.Standard.Test.Unit.Model/g' ./src/Bandwidth.Standard.Test/Unit/Model/*.cs +# remove the rest of the generated files +rm -rf ./src/Bandwidth.Standard.Test/Api ./src/Bandwidth.Standard.Test/Model +# discard changes to modified files only (leaves deletions and new test files intact) +modified=$(git diff --name-only --diff-filter=M) && [ -n "$modified" ] && echo "$modified" | xargs git checkout -- diff --git a/src/Bandwidth.Standard.Test/Unit/Api/EndpointsApiTests.cs b/src/Bandwidth.Standard.Test/Unit/Api/EndpointsApiTests.cs index f49b38b3..9a65fd59 100644 --- a/src/Bandwidth.Standard.Test/Unit/Api/EndpointsApiTests.cs +++ b/src/Bandwidth.Standard.Test/Unit/Api/EndpointsApiTests.cs @@ -77,7 +77,7 @@ public void CreateEndpointTest() ); CreateEndpointRequest createEndpointRequest = new CreateEndpointRequest(webRtcRequest); - var link = new Link(rel: "self", href: "/accounts/9900000/endpoints/e-15ac29a2"); + var link = new BrtcLink(rel: "self", href: "/accounts/9900000/endpoints/e-15ac29a2"); CreateEndpointResponseData responseData = new CreateEndpointResponseData( endpointId: "e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85", @@ -90,9 +90,9 @@ public void CreateEndpointTest() ); CreateEndpointResponse endpointResponse = new CreateEndpointResponse( - links: new List { link }, + links: new List { link }, data: responseData, - errors: new List() + errors: new List() ); var apiResponse = new ApiResponse(HttpStatusCode.Created, endpointResponse); @@ -180,7 +180,7 @@ public void GetEndpointTest() string endpointId = "e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; var endpointResponse = new EndpointResponse( - links: new List(), + links: new List(), data: new Endpoint( endpointId: endpointId, type: EndpointTypeEnum.WEBRTC, @@ -188,7 +188,7 @@ public void GetEndpointTest() creationTimestamp: new DateTime(2021, 1, 1, 0, 0, 0, DateTimeKind.Utc), expirationTimestamp: new DateTime(2021, 1, 2, 0, 0, 0, DateTimeKind.Utc) ), - errors: new List() + errors: new List() ); var apiResponse = new ApiResponse(HttpStatusCode.OK, endpointResponse); mockClient.Setup(x => x.Get("/accounts/{accountId}/endpoints/{endpointId}", It.IsAny(), fakeConfiguration)).Returns(apiResponse); @@ -262,9 +262,9 @@ public void ListEndpointsTest() string accountId = "9900000"; var listResponse = new ListEndpointsResponse( - links: new List(), + links: new List(), data: new List(), - errors: new List() + errors: new List() ); var apiResponse = new ApiResponse(HttpStatusCode.OK, listResponse); mockClient.Setup(x => x.Get("/accounts/{accountId}/endpoints", It.IsAny(), fakeConfiguration)).Returns(apiResponse); diff --git a/src/Bandwidth.Standard.Test/Unit/Model/ErrorResponseTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/BrtcErrorResponseTests.cs similarity index 55% rename from src/Bandwidth.Standard.Test/Unit/Model/ErrorResponseTests.cs rename to src/Bandwidth.Standard.Test/Unit/Model/BrtcErrorResponseTests.cs index 8d742b62..ff15d429 100644 --- a/src/Bandwidth.Standard.Test/Unit/Model/ErrorResponseTests.cs +++ b/src/Bandwidth.Standard.Test/Unit/Model/BrtcErrorResponseTests.cs @@ -23,21 +23,18 @@ namespace Bandwidth.Standard.Test.Unit.Model { /// - /// Class for testing ErrorResponse + /// Class for testing BrtcErrorResponse /// - public class ErrorResponseTests : IDisposable + public class BrtcErrorResponseTests : IDisposable { - private ErrorResponse instance; + private BrtcErrorResponse instance; - public ErrorResponseTests() + public BrtcErrorResponseTests() { - var link = new Link(rel: "self", href: "/accounts/123/endpoints"); - var error = new Error(code: 400, description: "Invalid input"); - - instance = new ErrorResponse( - links: new List { link }, - data: new object(), - errors: new List { error } + instance = new BrtcErrorResponse( + links: new List(), + data: new Object(), + errors: new List() ); } @@ -47,12 +44,12 @@ public void Dispose() } /// - /// Test an instance of ErrorResponse + /// Test an instance of BrtcErrorResponse /// [Fact] - public void ErrorResponseInstanceTest() + public void BrtcErrorResponseInstanceTest() { - Assert.IsType(instance); + Assert.IsType(instance); } /// @@ -61,10 +58,7 @@ public void ErrorResponseInstanceTest() [Fact] public void LinksTest() { - Assert.IsType>(instance.Links); - Assert.NotNull(instance.Links); - Assert.Single(instance.Links); - Assert.Equal("self", instance.Links[0].Rel); + Assert.IsType>(instance.Links); } /// @@ -82,9 +76,7 @@ public void DataTest() [Fact] public void ErrorsTest() { - Assert.IsType>(instance.Errors); - Assert.NotNull(instance.Errors); - Assert.Single(instance.Errors); + Assert.IsType>(instance.Errors); } } } diff --git a/src/Bandwidth.Standard.Test/Unit/Model/BrtcErrorSourceTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/BrtcErrorSourceTests.cs new file mode 100644 index 00000000..7ebc9f73 --- /dev/null +++ b/src/Bandwidth.Standard.Test/Unit/Model/BrtcErrorSourceTests.cs @@ -0,0 +1,96 @@ +/* + * Bandwidth + * + * Bandwidth's Communication APIs + * + * The version of the OpenAPI document: 1.0.0 + * Contact: letstalk@bandwidth.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Bandwidth.Standard.Model; +using Bandwidth.Standard.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Bandwidth.Standard.Test.Unit.Model +{ + /// + /// Class for testing BrtcErrorSource + /// + public class BrtcErrorSourceTests : IDisposable + { + private BrtcErrorSource instance; + + public BrtcErrorSourceTests() + { + instance = new BrtcErrorSource( + varParameter: "accountId", + field: "type", + header: "Authorization", + reference: "https://developer.bandwidth.com/errors/1001" + ); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of BrtcErrorSource + /// + [Fact] + public void BrtcErrorSourceInstanceTest() + { + Assert.IsType(instance); + } + + /// + /// Test the property 'Parameter' + /// + [Fact] + public void ParameterTest() + { + Assert.IsType(instance.Parameter); + Assert.Equal("accountId", instance.Parameter); + } + + /// + /// Test the property 'Field' + /// + [Fact] + public void FieldTest() + { + Assert.IsType(instance.Field); + Assert.Equal("type", instance.Field); + } + + /// + /// Test the property 'Header' + /// + [Fact] + public void HeaderTest() + { + Assert.IsType(instance.Header); + Assert.Equal("Authorization", instance.Header); + } + + /// + /// Test the property 'Reference' + /// + [Fact] + public void ReferenceTest() + { + Assert.IsType(instance.Reference); + Assert.Equal("https://developer.bandwidth.com/errors/1001", instance.Reference); + } + } +} diff --git a/src/Bandwidth.Standard.Test/Unit/Model/BrtcErrorTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/BrtcErrorTests.cs new file mode 100644 index 00000000..bca4a379 --- /dev/null +++ b/src/Bandwidth.Standard.Test/Unit/Model/BrtcErrorTests.cs @@ -0,0 +1,108 @@ +/* + * Bandwidth + * + * Bandwidth's Communication APIs + * + * The version of the OpenAPI document: 1.0.0 + * Contact: letstalk@bandwidth.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Bandwidth.Standard.Model; +using Bandwidth.Standard.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Bandwidth.Standard.Test.Unit.Model +{ + /// + /// Class for testing BrtcError + /// + public class BrtcErrorTests : IDisposable + { + private BrtcError instance; + + public BrtcErrorTests() + { + var source = new BrtcErrorSource(varParameter: "accountId"); + instance = new BrtcError( + id: Guid.Parse("550e8400-e29b-41d4-a716-446655440000"), + type: "validation", + description: "Invalid account ID", + code: "1001", + source: source + ); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of BrtcError + /// + [Fact] + public void BrtcErrorInstanceTest() + { + Assert.IsType(instance); + } + + /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + Assert.IsType(instance.Id); + Assert.Equal(Guid.Parse("550e8400-e29b-41d4-a716-446655440000"), instance.Id); + } + + /// + /// Test the property 'Type' + /// + [Fact] + public void TypeTest() + { + Assert.IsType(instance.Type); + Assert.Equal("validation", instance.Type); + } + + /// + /// Test the property 'Description' + /// + [Fact] + public void DescriptionTest() + { + Assert.IsType(instance.Description); + Assert.Equal("Invalid account ID", instance.Description); + } + + /// + /// Test the property 'Code' + /// + [Fact] + public void CodeTest() + { + Assert.IsType(instance.Code); + Assert.Equal("1001", instance.Code); + } + + /// + /// Test the property 'Source' + /// + [Fact] + public void SourceTest() + { + Assert.IsType(instance.Source); + Assert.Equal("accountId", instance.Source.Parameter); + } + } +} diff --git a/src/Bandwidth.Standard.Test/Unit/Model/BrtcLinkTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/BrtcLinkTests.cs new file mode 100644 index 00000000..1df23122 --- /dev/null +++ b/src/Bandwidth.Standard.Test/Unit/Model/BrtcLinkTests.cs @@ -0,0 +1,81 @@ +/* + * Bandwidth + * + * Bandwidth's Communication APIs + * + * The version of the OpenAPI document: 1.0.0 + * Contact: letstalk@bandwidth.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Bandwidth.Standard.Model; +using Bandwidth.Standard.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Bandwidth.Standard.Test.Unit.Model +{ + /// + /// Class for testing BrtcLink + /// + public class BrtcLinkTests : IDisposable + { + private BrtcLink instance; + + public BrtcLinkTests() + { + instance = new BrtcLink(href: "https://api.example.com/resource", rel: "self", method: "GET"); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of BrtcLink + /// + [Fact] + public void BrtcLinkInstanceTest() + { + Assert.IsType(instance); + } + + /// + /// Test the property 'Href' + /// + [Fact] + public void HrefTest() + { + Assert.IsType(instance.Href); + Assert.Equal("https://api.example.com/resource", instance.Href); + } + + /// + /// Test the property 'Rel' + /// + [Fact] + public void RelTest() + { + Assert.IsType(instance.Rel); + Assert.Equal("self", instance.Rel); + } + + /// + /// Test the property 'Method' + /// + [Fact] + public void MethodTest() + { + Assert.IsType(instance.Method); + Assert.Equal("GET", instance.Method); + } + } +} diff --git a/src/Bandwidth.Standard.Test/Unit/Model/CreateEndpointResponseTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/CreateEndpointResponseTests.cs index fe50958b..eaf6d6b4 100644 --- a/src/Bandwidth.Standard.Test/Unit/Model/CreateEndpointResponseTests.cs +++ b/src/Bandwidth.Standard.Test/Unit/Model/CreateEndpointResponseTests.cs @@ -44,12 +44,12 @@ public CreateEndpointResponseTests() token: "test-token-abc123" ); - var link = new Link(rel: "self", href: "/accounts/123/endpoints/e-15ac29a2"); + var link = new BrtcLink(rel: "self", href: "/accounts/123/endpoints/e-15ac29a2"); instance = new CreateEndpointResponse( - links: new List { link }, + links: new List { link }, data: responseData, - errors: new List() + errors: new List() ); } @@ -73,7 +73,7 @@ public void CreateEndpointResponseInstanceTest() [Fact] public void LinksTest() { - Assert.IsType>(instance.Links); + Assert.IsType>(instance.Links); Assert.Single(instance.Links); Assert.Equal("self", instance.Links[0].Rel); Assert.Equal("/accounts/123/endpoints/e-15ac29a2", instance.Links[0].Href); @@ -99,7 +99,7 @@ public void DataTest() [Fact] public void ErrorsTest() { - Assert.IsType>(instance.Errors); + Assert.IsType>(instance.Errors); Assert.Empty(instance.Errors); } diff --git a/src/Bandwidth.Standard.Test/Unit/Model/EndpointResponseTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/EndpointResponseTests.cs index d6656582..cfdb0bfa 100644 --- a/src/Bandwidth.Standard.Test/Unit/Model/EndpointResponseTests.cs +++ b/src/Bandwidth.Standard.Test/Unit/Model/EndpointResponseTests.cs @@ -43,12 +43,12 @@ public EndpointResponseTests() tag: "test-tag" ); - var link = new Link(rel: "self", href: "/accounts/123/endpoints/e-15ac29a2"); + var link = new BrtcLink(rel: "self", href: "/accounts/123/endpoints/e-15ac29a2"); instance = new EndpointResponse( - links: new List { link }, + links: new List { link }, data: endpointData, - errors: new List() + errors: new List() ); } @@ -72,7 +72,7 @@ public void EndpointResponseInstanceTest() [Fact] public void LinksTest() { - Assert.IsType>(instance.Links); + Assert.IsType>(instance.Links); Assert.Single(instance.Links); Assert.Equal("self", instance.Links[0].Rel); Assert.Equal("/accounts/123/endpoints/e-15ac29a2", instance.Links[0].Href); @@ -97,7 +97,7 @@ public void DataTest() [Fact] public void ErrorsTest() { - Assert.IsType>(instance.Errors); + Assert.IsType>(instance.Errors); Assert.Empty(instance.Errors); } diff --git a/src/Bandwidth.Standard.Test/Unit/Model/ListEndpointsResponseTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/ListEndpointsResponseTests.cs index c56f0955..f64837db 100644 --- a/src/Bandwidth.Standard.Test/Unit/Model/ListEndpointsResponseTests.cs +++ b/src/Bandwidth.Standard.Test/Unit/Model/ListEndpointsResponseTests.cs @@ -52,14 +52,14 @@ public ListEndpointsResponseTests() tag: "endpoint-2" ); - var selfLink = new Link(rel: "self", href: "/accounts/123/endpoints"); + var selfLink = new BrtcLink(rel: "self", href: "/accounts/123/endpoints"); var page = new Page(pageSize: 10, totalElements: 2, totalPages: 1, pageNumber: 0); instance = new ListEndpointsResponse( - links: new List { selfLink }, + links: new List { selfLink }, page: page, data: new List { endpoint1, endpoint2 }, - errors: new List() + errors: new List() ); } @@ -83,7 +83,7 @@ public void ListEndpointsResponseInstanceTest() [Fact] public void LinksTest() { - Assert.IsType>(instance.Links); + Assert.IsType>(instance.Links); Assert.Single(instance.Links); Assert.Equal("self", instance.Links[0].Rel); Assert.Equal("/accounts/123/endpoints", instance.Links[0].Href); @@ -120,7 +120,7 @@ public void DataTest() [Fact] public void ErrorsTest() { - Assert.IsType>(instance.Errors); + Assert.IsType>(instance.Errors); Assert.Empty(instance.Errors); } diff --git a/src/Bandwidth.Standard.Test/Unit/Model/ErrorTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/WebhookSubscriptionErrorTests.cs similarity index 60% rename from src/Bandwidth.Standard.Test/Unit/Model/ErrorTests.cs rename to src/Bandwidth.Standard.Test/Unit/Model/WebhookSubscriptionErrorTests.cs index 18f78e25..f0ee9fd6 100644 --- a/src/Bandwidth.Standard.Test/Unit/Model/ErrorTests.cs +++ b/src/Bandwidth.Standard.Test/Unit/Model/WebhookSubscriptionErrorTests.cs @@ -23,21 +23,18 @@ namespace Bandwidth.Standard.Test.Unit.Model { /// - /// Class for testing Error + /// Class for testing WebhookSubscriptionError /// - public class ErrorTests : IDisposable + public class WebhookSubscriptionErrorTests : IDisposable { - private Error instance; - private TelephoneNumber telephoneNumber; + private WebhookSubscriptionError instance; - public ErrorTests() + public WebhookSubscriptionErrorTests() { - telephoneNumber = new TelephoneNumber(varTelephoneNumber: "1234567890"); - - instance = new Error( - code: 123456, - description: "Test Description", - telephoneNumbers: new List { telephoneNumber } + instance = new WebhookSubscriptionError( + code: 4001, + description: "Invalid telephone number", + telephoneNumbers: new List { new TelephoneNumber(varTelephoneNumber: "+19195551234") } ); } @@ -47,12 +44,12 @@ public void Dispose() } /// - /// Test an instance of Error + /// Test an instance of WebhookSubscriptionError /// [Fact] - public void ErrorInstanceTest() + public void WebhookSubscriptionErrorInstanceTest() { - Assert.IsType(instance); + Assert.IsType(instance); } /// @@ -62,7 +59,7 @@ public void ErrorInstanceTest() public void CodeTest() { Assert.IsType(instance.Code); - Assert.Equal(123456, instance.Code); + Assert.Equal(4001, instance.Code); } /// @@ -72,7 +69,7 @@ public void CodeTest() public void DescriptionTest() { Assert.IsType(instance.Description); - Assert.Equal("Test Description", instance.Description); + Assert.Equal("Invalid telephone number", instance.Description); } /// @@ -82,7 +79,8 @@ public void DescriptionTest() public void TelephoneNumbersTest() { Assert.IsType>(instance.TelephoneNumbers); - Assert.Equal(telephoneNumber, instance.TelephoneNumbers.First()); + Assert.Single(instance.TelephoneNumbers); + Assert.Equal("+19195551234", instance.TelephoneNumbers[0].VarTelephoneNumber); } } } diff --git a/src/Bandwidth.Standard.Test/Unit/Model/WebhookSubscriptionsListBodyTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/WebhookSubscriptionsListBodyTests.cs index b66586a7..55170008 100644 --- a/src/Bandwidth.Standard.Test/Unit/Model/WebhookSubscriptionsListBodyTests.cs +++ b/src/Bandwidth.Standard.Test/Unit/Model/WebhookSubscriptionsListBodyTests.cs @@ -33,7 +33,7 @@ public WebhookSubscriptionsListBodyTests() { instance = new WebhookSubscriptionsListBody( links: new LinksObject(), - errors: new List(), + errors: new List(), data: new List() ); } @@ -67,7 +67,7 @@ public void LinksTest() [Fact] public void ErrorsTest() { - Assert.IsType>(instance.Errors); + Assert.IsType>(instance.Errors); } /// diff --git a/src/Bandwidth.Standard/Model/BrtcError.cs b/src/Bandwidth.Standard/Model/BrtcError.cs new file mode 100644 index 00000000..ce7f460a --- /dev/null +++ b/src/Bandwidth.Standard/Model/BrtcError.cs @@ -0,0 +1,142 @@ +/* + * Bandwidth + * + * Bandwidth's Communication APIs + * + * The version of the OpenAPI document: 1.0.0 + * Contact: letstalk@bandwidth.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Bandwidth.Standard.Client.OpenAPIDateConverter; + +namespace Bandwidth.Standard.Model +{ + /// + /// BrtcError + /// + [DataContract(Name = "brtcError")] + public partial class BrtcError : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected BrtcError() { } + /// + /// Initializes a new instance of the class. + /// + /// A unique identifier for the error.. + /// The type of error. (required). + /// A description of the error. (required). + /// A code that uniquely identifies the error.. + /// source. + public BrtcError(Guid id = default(Guid), string type = default(string), string description = default(string), string code = default(string), BrtcErrorSource source = default(BrtcErrorSource)) + { + // to ensure "type" is required (not null) + if (type == null) + { + throw new ArgumentNullException("type is a required property for BrtcError and cannot be null"); + } + this.Type = type; + // to ensure "description" is required (not null) + if (description == null) + { + throw new ArgumentNullException("description is a required property for BrtcError and cannot be null"); + } + this.Description = description; + this.Id = id; + this.Code = code; + this.Source = source; + } + + /// + /// A unique identifier for the error. + /// + /// A unique identifier for the error. + /// 59512d87-7a92-4040-8e4a-78fb772019b9 + [DataMember(Name = "id", EmitDefaultValue = false)] + public Guid Id { get; set; } + + /// + /// The type of error. + /// + /// The type of error. + /// resource.not_found + [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] + public string Type { get; set; } + + /// + /// A description of the error. + /// + /// A description of the error. + /// The requested resource was not found. + [DataMember(Name = "description", IsRequired = true, EmitDefaultValue = true)] + public string Description { get; set; } + + /// + /// A code that uniquely identifies the error. + /// + /// A code that uniquely identifies the error. + /// 404 + [DataMember(Name = "code", EmitDefaultValue = false)] + public string Code { get; set; } + + /// + /// Gets or Sets Source + /// + [DataMember(Name = "source", EmitDefaultValue = false)] + public BrtcErrorSource Source { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class BrtcError {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Code: ").Append(Code).Append("\n"); + sb.Append(" Source: ").Append(Source).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/Bandwidth.Standard/Model/ErrorResponse.cs b/src/Bandwidth.Standard/Model/BrtcErrorResponse.cs similarity index 80% rename from src/Bandwidth.Standard/Model/ErrorResponse.cs rename to src/Bandwidth.Standard/Model/BrtcErrorResponse.cs index bbd18219..2b8be3f3 100644 --- a/src/Bandwidth.Standard/Model/ErrorResponse.cs +++ b/src/Bandwidth.Standard/Model/BrtcErrorResponse.cs @@ -27,40 +27,40 @@ namespace Bandwidth.Standard.Model { /// - /// ErrorResponse + /// BrtcErrorResponse /// - [DataContract(Name = "errorResponse")] - public partial class ErrorResponse : IValidatableObject + [DataContract(Name = "brtcErrorResponse")] + public partial class BrtcErrorResponse : IValidatableObject { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected ErrorResponse() { } + protected BrtcErrorResponse() { } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// links (required). /// data (required). /// errors (required). - public ErrorResponse(List links = default(List), Object data = default(Object), List errors = default(List)) + public BrtcErrorResponse(List links = default(List), Object data = default(Object), List errors = default(List)) { // to ensure "links" is required (not null) if (links == null) { - throw new ArgumentNullException("links is a required property for ErrorResponse and cannot be null"); + throw new ArgumentNullException("links is a required property for BrtcErrorResponse and cannot be null"); } this.Links = links; // to ensure "data" is required (not null) if (data == null) { - throw new ArgumentNullException("data is a required property for ErrorResponse and cannot be null"); + throw new ArgumentNullException("data is a required property for BrtcErrorResponse and cannot be null"); } this.Data = data; // to ensure "errors" is required (not null) if (errors == null) { - throw new ArgumentNullException("errors is a required property for ErrorResponse and cannot be null"); + throw new ArgumentNullException("errors is a required property for BrtcErrorResponse and cannot be null"); } this.Errors = errors; } @@ -69,7 +69,7 @@ protected ErrorResponse() { } /// Gets or Sets Links /// [DataMember(Name = "links", IsRequired = true, EmitDefaultValue = true)] - public List Links { get; set; } + public List Links { get; set; } /// /// Gets or Sets Data @@ -81,7 +81,7 @@ protected ErrorResponse() { } /// Gets or Sets Errors /// [DataMember(Name = "errors", IsRequired = true, EmitDefaultValue = true)] - public List Errors { get; set; } + public List Errors { get; set; } /// /// Returns the string presentation of the object @@ -90,7 +90,7 @@ protected ErrorResponse() { } public override string ToString() { StringBuilder sb = new StringBuilder(); - sb.Append("class ErrorResponse {\n"); + sb.Append("class BrtcErrorResponse {\n"); sb.Append(" Links: ").Append(Links).Append("\n"); sb.Append(" Data: ").Append(Data).Append("\n"); sb.Append(" Errors: ").Append(Errors).Append("\n"); diff --git a/src/Bandwidth.Standard/Model/BrtcErrorSource.cs b/src/Bandwidth.Standard/Model/BrtcErrorSource.cs new file mode 100644 index 00000000..d06eef17 --- /dev/null +++ b/src/Bandwidth.Standard/Model/BrtcErrorSource.cs @@ -0,0 +1,118 @@ +/* + * Bandwidth + * + * Bandwidth's Communication APIs + * + * The version of the OpenAPI document: 1.0.0 + * Contact: letstalk@bandwidth.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Bandwidth.Standard.Client.OpenAPIDateConverter; + +namespace Bandwidth.Standard.Model +{ + /// + /// BrtcErrorSource + /// + [DataContract(Name = "brtcErrorSource")] + public partial class BrtcErrorSource : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// The URI parameter that caused the error.. + /// The request body field that caused the error.. + /// The header that caused the error.. + /// The resource ID or path to the resource (or non-existent resource) causing the error.. + public BrtcErrorSource(string varParameter = default(string), string field = default(string), string header = default(string), string reference = default(string)) + { + this.Parameter = varParameter; + this.Field = field; + this.Header = header; + this.Reference = reference; + } + + /// + /// The URI parameter that caused the error. + /// + /// The URI parameter that caused the error. + /// accountId + [DataMember(Name = "parameter", EmitDefaultValue = false)] + public string Parameter { get; set; } + + /// + /// The request body field that caused the error. + /// + /// The request body field that caused the error. + /// accountId + [DataMember(Name = "field", EmitDefaultValue = false)] + public string Field { get; set; } + + /// + /// The header that caused the error. + /// + /// The header that caused the error. + /// Authorization + [DataMember(Name = "header", EmitDefaultValue = false)] + public string Header { get; set; } + + /// + /// The resource ID or path to the resource (or non-existent resource) causing the error. + /// + /// The resource ID or path to the resource (or non-existent resource) causing the error. + /// e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + [DataMember(Name = "reference", EmitDefaultValue = false)] + public string Reference { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class BrtcErrorSource {\n"); + sb.Append(" Parameter: ").Append(Parameter).Append("\n"); + sb.Append(" Field: ").Append(Field).Append("\n"); + sb.Append(" Header: ").Append(Header).Append("\n"); + sb.Append(" Reference: ").Append(Reference).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/Bandwidth.Standard/Model/BrtcLink.cs b/src/Bandwidth.Standard/Model/BrtcLink.cs new file mode 100644 index 00000000..9015ec0e --- /dev/null +++ b/src/Bandwidth.Standard/Model/BrtcLink.cs @@ -0,0 +1,107 @@ +/* + * Bandwidth + * + * Bandwidth's Communication APIs + * + * The version of the OpenAPI document: 1.0.0 + * Contact: letstalk@bandwidth.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Bandwidth.Standard.Client.OpenAPIDateConverter; + +namespace Bandwidth.Standard.Model +{ + /// + /// BrtcLink + /// + [DataContract(Name = "brtcLink")] + public partial class BrtcLink : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// The full URL of the link.. + /// The relationship of the link to the current resource.. + /// The HTTP method to use when making the request.. + public BrtcLink(string href = default(string), string rel = default(string), string method = default(string)) + { + this.Href = href; + this.Rel = rel; + this.Method = method; + } + + /// + /// The full URL of the link. + /// + /// The full URL of the link. + /// https://api.bandwidth.com/v2/accounts/5500123/endpoints/e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + [DataMember(Name = "href", EmitDefaultValue = false)] + public string Href { get; set; } + + /// + /// The relationship of the link to the current resource. + /// + /// The relationship of the link to the current resource. + /// self + [DataMember(Name = "rel", EmitDefaultValue = false)] + public string Rel { get; set; } + + /// + /// The HTTP method to use when making the request. + /// + /// The HTTP method to use when making the request. + /// GET + [DataMember(Name = "method", EmitDefaultValue = false)] + public string Method { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class BrtcLink {\n"); + sb.Append(" Href: ").Append(Href).Append("\n"); + sb.Append(" Rel: ").Append(Rel).Append("\n"); + sb.Append(" Method: ").Append(Method).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/Bandwidth.Standard/Model/CreateCall.cs b/src/Bandwidth.Standard/Model/CreateCall.cs index f6d4bb65..c1ff7bd5 100644 --- a/src/Bandwidth.Standard/Model/CreateCall.cs +++ b/src/Bandwidth.Standard/Model/CreateCall.cs @@ -78,7 +78,7 @@ protected CreateCall() { } /// 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. (default to 15D). /// machineDetection. /// 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. (default to 5). - /// 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.. + /// 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.. public CreateCall(string to = default(string), string from = default(string), bool? privacy = default(bool?), string displayName = default(string), string uui = default(string), string applicationId = default(string), string answerUrl = default(string), CallbackMethodEnum? answerMethod = default(CallbackMethodEnum?), string username = default(string), string password = default(string), string answerFallbackUrl = default(string), CallbackMethodEnum? answerFallbackMethod = default(CallbackMethodEnum?), string fallbackUsername = default(string), string fallbackPassword = default(string), string disconnectUrl = default(string), CallbackMethodEnum? disconnectMethod = default(CallbackMethodEnum?), double? callTimeout = 30D, double? callbackTimeout = 15D, MachineDetectionConfiguration machineDetection = default(MachineDetectionConfiguration), int? priority = 5, string tag = default(string)) { // to ensure "to" is required (not null) @@ -262,9 +262,9 @@ protected CreateCall() { } public int? Priority { get; set; } /// - /// 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. + /// 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. /// - /// 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. + /// 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. /// arbitrary text here [DataMember(Name = "tag", EmitDefaultValue = true)] public string Tag { get; set; } @@ -403,9 +403,9 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } // Tag (string) maxLength - if (this.Tag != null && this.Tag.Length > 256) + if (this.Tag != null && this.Tag.Length > 4096) { - yield return new ValidationResult("Invalid value for Tag, length must be less than 256.", new [] { "Tag" }); + yield return new ValidationResult("Invalid value for Tag, length must be less than 4096.", new [] { "Tag" }); } yield break; diff --git a/src/Bandwidth.Standard/Model/CreateEndpointResponse.cs b/src/Bandwidth.Standard/Model/CreateEndpointResponse.cs index 71c7437f..37abd7d1 100644 --- a/src/Bandwidth.Standard/Model/CreateEndpointResponse.cs +++ b/src/Bandwidth.Standard/Model/CreateEndpointResponse.cs @@ -43,7 +43,7 @@ protected CreateEndpointResponse() { } /// links (required). /// data (required). /// errors (required). - public CreateEndpointResponse(List links = default(List), CreateEndpointResponseData data = default(CreateEndpointResponseData), List errors = default(List)) + public CreateEndpointResponse(List links = default(List), CreateEndpointResponseData data = default(CreateEndpointResponseData), List errors = default(List)) { // to ensure "links" is required (not null) if (links == null) @@ -69,7 +69,7 @@ protected CreateEndpointResponse() { } /// Gets or Sets Links /// [DataMember(Name = "links", IsRequired = true, EmitDefaultValue = true)] - public List Links { get; set; } + public List Links { get; set; } /// /// Gets or Sets Data @@ -81,7 +81,7 @@ protected CreateEndpointResponse() { } /// Gets or Sets Errors /// [DataMember(Name = "errors", IsRequired = true, EmitDefaultValue = true)] - public List Errors { get; set; } + public List Errors { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Bandwidth.Standard/Model/EndpointResponse.cs b/src/Bandwidth.Standard/Model/EndpointResponse.cs index 967013f9..88c45ab4 100644 --- a/src/Bandwidth.Standard/Model/EndpointResponse.cs +++ b/src/Bandwidth.Standard/Model/EndpointResponse.cs @@ -43,7 +43,7 @@ protected EndpointResponse() { } /// links (required). /// data (required). /// errors (required). - public EndpointResponse(List links = default(List), Endpoint data = default(Endpoint), List errors = default(List)) + public EndpointResponse(List links = default(List), Endpoint data = default(Endpoint), List errors = default(List)) { // to ensure "links" is required (not null) if (links == null) @@ -69,7 +69,7 @@ protected EndpointResponse() { } /// Gets or Sets Links /// [DataMember(Name = "links", IsRequired = true, EmitDefaultValue = true)] - public List Links { get; set; } + public List Links { get; set; } /// /// Gets or Sets Data @@ -81,7 +81,7 @@ protected EndpointResponse() { } /// Gets or Sets Errors /// [DataMember(Name = "errors", IsRequired = true, EmitDefaultValue = true)] - public List Errors { get; set; } + public List Errors { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Bandwidth.Standard/Model/ListEndpointsResponse.cs b/src/Bandwidth.Standard/Model/ListEndpointsResponse.cs index c1f321f1..c8c6f8a8 100644 --- a/src/Bandwidth.Standard/Model/ListEndpointsResponse.cs +++ b/src/Bandwidth.Standard/Model/ListEndpointsResponse.cs @@ -44,7 +44,7 @@ protected ListEndpointsResponse() { } /// page. /// data (required). /// errors (required). - public ListEndpointsResponse(List links = default(List), Page page = default(Page), List data = default(List), List errors = default(List)) + public ListEndpointsResponse(List links = default(List), Page page = default(Page), List data = default(List), List errors = default(List)) { // to ensure "links" is required (not null) if (links == null) @@ -71,7 +71,7 @@ protected ListEndpointsResponse() { } /// Gets or Sets Links /// [DataMember(Name = "links", IsRequired = true, EmitDefaultValue = true)] - public List Links { get; set; } + public List Links { get; set; } /// /// Gets or Sets Page @@ -89,7 +89,7 @@ protected ListEndpointsResponse() { } /// Gets or Sets Errors /// [DataMember(Name = "errors", IsRequired = true, EmitDefaultValue = true)] - public List Errors { get; set; } + public List Errors { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Bandwidth.Standard/Model/LookupResult.cs b/src/Bandwidth.Standard/Model/LookupResult.cs index 59ca935e..ca62c427 100644 --- a/src/Bandwidth.Standard/Model/LookupResult.cs +++ b/src/Bandwidth.Standard/Model/LookupResult.cs @@ -62,7 +62,7 @@ public partial class LookupResult : IValidatableObject /// [DNI-Only](#section/DNI-Only). The datetime the carrier reported a deactivation event.. /// deactivationEvent. /// latestMessageDeliveryStatus. - /// [DNI-Only](#section/DNI-Only). The date the phone number entered the status described in `latestMessageDeliveryStatus`. Think of this as the \"start time\" for that status. Value resets every time the `latestMessageDeliveryStatus` changes.. + /// [DNI-Only](#section/DNI-Only). The date the phone number entered the status described in `latestMessageDeliveryStatus`. Think of this as the \"start time\" for that status. Value resets every time the `latestMessageDeliveryStatus` changes.. /// [DNI-Only](#section/DNI-Only). The date bandwidth last received delivery status information for this phone number. Use this field to understand how up-to-date the `latestMessageDeliveryStatus` is. Value resets every time the `latestMessageDeliveryStatus` changes.. /// [RCS-Only](#section/RCS-Only). Indicates whether the phone number is capable of receiving RCS messages. Value will be null if account has RCS, but no value was returned. Absent when account does not have RCS. . public LookupResult(string phoneNumber = default(string), LineTypeEnum? lineType = default(LineTypeEnum?), string messagingProvider = default(string), string voiceProvider = default(string), string countryCodeA3 = default(string), string deactivationReporter = default(string), string deactivationDate = default(string), DeactivationEventEnum? deactivationEvent = default(DeactivationEventEnum?), LatestMessageDeliveryStatusEnum? latestMessageDeliveryStatus = default(LatestMessageDeliveryStatusEnum?), DateTime initialMessageDeliveryStatusDate = default(DateTime), DateTime latestMessageDeliveryStatusDate = default(DateTime), bool rcsEnabled = default(bool)) @@ -141,7 +141,7 @@ public partial class LookupResult : IValidatableObject /// [DNI-Only](#section/DNI-Only). The date bandwidth last received delivery status information for this phone number. Use this field to understand how up-to-date the `latestMessageDeliveryStatus` is. Value resets every time the `latestMessageDeliveryStatus` changes. /// /// [DNI-Only](#section/DNI-Only). The date bandwidth last received delivery status information for this phone number. Use this field to understand how up-to-date the `latestMessageDeliveryStatus` is. Value resets every time the `latestMessageDeliveryStatus` changes. - /// Sat Jun 21 00:00:00 UTC 2025 + /// Fri Jun 20 20:00:00 EDT 2025 [DataMember(Name = "latestMessageDeliveryStatusDate", EmitDefaultValue = false)] [JsonConverter(typeof(OpenAPIDateConverter))] public DateTime LatestMessageDeliveryStatusDate { get; set; } diff --git a/src/Bandwidth.Standard/Model/RbmActionBase.cs b/src/Bandwidth.Standard/Model/RbmActionBase.cs index f5088316..57f83663 100644 --- a/src/Bandwidth.Standard/Model/RbmActionBase.cs +++ b/src/Bandwidth.Standard/Model/RbmActionBase.cs @@ -78,7 +78,7 @@ protected RbmActionBase() { } /// Base64 payload the customer receives when the reply is clicked. /// /// Base64 payload the customer receives when the reply is clicked. - /// [B@4745bcc6 + /// [B@3d5e0bf0 [DataMember(Name = "postbackData", IsRequired = true, EmitDefaultValue = true)] public byte[] PostbackData { get; set; } diff --git a/src/Bandwidth.Standard/Model/RbmOpenUrlEnum.cs b/src/Bandwidth.Standard/Model/RbmOpenUrlEnum.cs index fe53b7e3..c9e395b7 100644 --- a/src/Bandwidth.Standard/Model/RbmOpenUrlEnum.cs +++ b/src/Bandwidth.Standard/Model/RbmOpenUrlEnum.cs @@ -27,9 +27,9 @@ namespace Bandwidth.Standard.Model { /// - /// Specifies how the URL should be opened on a mobile device. - `BROWSER` Opens the URL in the device's default browser. If application is not set or the device doesn’t support WebView, this option is used by default. - `WEBVIEW` Opens the URL in an in-app WebView. + /// Specifies how the URL should be opened on a mobile device. - `BROWSER` Opens the URL in the device's default browser. If application is not set or the device doesn't support WebView, this option is used by default. - `WEBVIEW` Opens the URL in an in-app WebView. /// - /// Specifies how the URL should be opened on a mobile device. - `BROWSER` Opens the URL in the device's default browser. If application is not set or the device doesn’t support WebView, this option is used by default. - `WEBVIEW` Opens the URL in an in-app WebView. + /// Specifies how the URL should be opened on a mobile device. - `BROWSER` Opens the URL in the device's default browser. If application is not set or the device doesn't support WebView, this option is used by default. - `WEBVIEW` Opens the URL in an in-app WebView. [JsonConverter(typeof(StringEnumConverter))] public enum RbmOpenUrlEnum { diff --git a/src/Bandwidth.Standard/Model/RbmSuggestionResponse.cs b/src/Bandwidth.Standard/Model/RbmSuggestionResponse.cs index d345d48b..493ca8e3 100644 --- a/src/Bandwidth.Standard/Model/RbmSuggestionResponse.cs +++ b/src/Bandwidth.Standard/Model/RbmSuggestionResponse.cs @@ -55,7 +55,7 @@ public partial class RbmSuggestionResponse : IValidatableObject /// Base64 payload the customer receives when the reply is clicked. /// /// Base64 payload the customer receives when the reply is clicked. - /// [B@4745bcc6 + /// [B@3d5e0bf0 [DataMember(Name = "postbackData", EmitDefaultValue = false)] public byte[] PostbackData { get; set; } diff --git a/src/Bandwidth.Standard/Model/UpdateCall.cs b/src/Bandwidth.Standard/Model/UpdateCall.cs index 3911111c..a61ff29b 100644 --- a/src/Bandwidth.Standard/Model/UpdateCall.cs +++ b/src/Bandwidth.Standard/Model/UpdateCall.cs @@ -62,7 +62,7 @@ public partial class UpdateCall : IValidatableObject /// redirectFallbackMethod. /// Basic auth username.. /// Basic auth password.. - /// 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`.. + /// 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`.. public UpdateCall(CallStateEnum? state = default(CallStateEnum?), string redirectUrl = default(string), RedirectMethodEnum? redirectMethod = default(RedirectMethodEnum?), string username = default(string), string password = default(string), string redirectFallbackUrl = default(string), RedirectMethodEnum? redirectFallbackMethod = default(RedirectMethodEnum?), string fallbackUsername = default(string), string fallbackPassword = default(string), string tag = default(string)) { this.State = state; @@ -126,9 +126,9 @@ public partial class UpdateCall : IValidatableObject public string FallbackPassword { get; set; } /// - /// 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`. + /// 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`. /// - /// 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`. + /// 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`. /// My Custom Tag [DataMember(Name = "tag", EmitDefaultValue = true)] public string Tag { get; set; } @@ -196,9 +196,9 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } // Tag (string) maxLength - if (this.Tag != null && this.Tag.Length > 256) + if (this.Tag != null && this.Tag.Length > 4096) { - yield return new ValidationResult("Invalid value for Tag, length must be less than 256.", new [] { "Tag" }); + yield return new ValidationResult("Invalid value for Tag, length must be less than 4096.", new [] { "Tag" }); } yield break; diff --git a/src/Bandwidth.Standard/Model/Error.cs b/src/Bandwidth.Standard/Model/WebhookSubscriptionError.cs similarity index 86% rename from src/Bandwidth.Standard/Model/Error.cs rename to src/Bandwidth.Standard/Model/WebhookSubscriptionError.cs index 5a78134a..b8340db0 100644 --- a/src/Bandwidth.Standard/Model/Error.cs +++ b/src/Bandwidth.Standard/Model/WebhookSubscriptionError.cs @@ -27,18 +27,18 @@ namespace Bandwidth.Standard.Model { /// - /// Error + /// WebhookSubscriptionError /// - [DataContract(Name = "error")] - public partial class Error : IValidatableObject + [DataContract(Name = "webhookSubscriptionError")] + public partial class WebhookSubscriptionError : IValidatableObject { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// code. /// description. /// telephoneNumbers. - public Error(int code = default(int), string description = default(string), List telephoneNumbers = default(List)) + public WebhookSubscriptionError(int code = default(int), string description = default(string), List telephoneNumbers = default(List)) { this.Code = code; this.Description = description; @@ -70,7 +70,7 @@ public partial class Error : IValidatableObject public override string ToString() { StringBuilder sb = new StringBuilder(); - sb.Append("class Error {\n"); + sb.Append("class WebhookSubscriptionError {\n"); sb.Append(" Code: ").Append(Code).Append("\n"); sb.Append(" Description: ").Append(Description).Append("\n"); sb.Append(" TelephoneNumbers: ").Append(TelephoneNumbers).Append("\n"); diff --git a/src/Bandwidth.Standard/Model/WebhookSubscriptionsListBody.cs b/src/Bandwidth.Standard/Model/WebhookSubscriptionsListBody.cs index 8d1782c8..5ac1d63c 100644 --- a/src/Bandwidth.Standard/Model/WebhookSubscriptionsListBody.cs +++ b/src/Bandwidth.Standard/Model/WebhookSubscriptionsListBody.cs @@ -43,7 +43,7 @@ protected WebhookSubscriptionsListBody() { } /// links. /// errors. /// data (required). - public WebhookSubscriptionsListBody(LinksObject links = default(LinksObject), List errors = default(List), List data = default(List)) + public WebhookSubscriptionsListBody(LinksObject links = default(LinksObject), List errors = default(List), List data = default(List)) { // to ensure "data" is required (not null) if (data == null) @@ -65,7 +65,7 @@ protected WebhookSubscriptionsListBody() { } /// Gets or Sets Errors /// [DataMember(Name = "errors", EmitDefaultValue = false)] - public List Errors { get; set; } + public List Errors { get; set; } /// /// Gets or Sets Data